:root {
  --accent: #17a897;
  --accent-ink: #073b35;
  --ink: #17211f;
  --muted: rgba(23, 33, 31, 0.66);
  --line: rgba(255, 255, 255, 0.36);
  --panel-alpha: 0.78;
  --bg-image: url("./background.svg");
  --background-image-opacity: 0.65;
  --bg-size: cover;
  --water-glass-surface: rgba(248, 255, 252, 0.38);
  --water-glass-border: rgba(255, 255, 255, 0.7);
  --water-glass-shadow: 0 14px 34px rgba(12, 46, 43, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  --water-glass-filter: blur(24px) saturate(1.34) contrast(1.03);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  position: relative;
  overflow: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: var(--bg-image);
  background-position: center;
  background-size: var(--bg-size);
  background-repeat: no-repeat;
  opacity: var(--background-image-opacity);
  pointer-events: none;
  transform: translateZ(0);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100dvh;
  display: grid;
  place-items: stretch;
  padding: 0;
  background: transparent;
}

.phone-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.top-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 18px 0;
  color: rgba(12, 27, 25, 0.78);
  font-size: 13px;
  font-weight: 650;
}

.server-status {
  max-width: 56%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: rgba(12, 27, 25, 0.68);
}

.server-status.online {
  color: var(--accent-ink);
  border-color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 72%, white);
  background: rgba(255, 255, 255, 0.78);
}

.server-status.offline {
  color: #9d2838;
}

.screen {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.view {
  position: absolute;
  inset: 0;
  display: none;
  min-height: 0;
}

.view-active {
  display: flex;
}

#chatView {
  flex-direction: column;
  padding: 14px 16px 12px;
}

#homeView {
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 2px 14px 10px;
}

/* Solitude emotion panel */

.phone-shell.subpage-mode .bottom-tabs {
  display: none;
}

#soloView {
  min-height: 0;
  flex-direction: column;
  padding: 4px 14px 14px;
}

#sailView {
  min-height: 0;
  flex-direction: column;
  padding: 4px 14px 14px;
}

#callView {
  min-height: 0;
  flex-direction: column;
  padding: 4px 18px calc(24px + env(safe-area-inset-bottom));
  color: #f5fbfa;
  background:
    radial-gradient(circle at 50% 24%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(10, 30, 31, 0.92), rgba(4, 15, 17, 0.97));
}

.call-topbar {
  min-height: 54px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  text-align: center;
  color: rgba(238, 250, 248, 0.68);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
}

.call-back-button {
  color: #f4fbfa;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.call-stage {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(22px, 7vh, 62px);
}

.call-avatar-wrap {
  position: relative;
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
}

.call-pulse {
  position: absolute;
  inset: -9px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 50%;
  opacity: 0;
}

#callView[data-call-state="listening"] .call-pulse,
#callView[data-call-state="thinking"] .call-pulse,
#callView[data-call-state="speaking"] .call-pulse {
  animation: call-pulse 1.8s ease-out infinite;
}

.call-avatar,
.call-avatar-fallback {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.call-avatar {
  object-fit: cover;
}

.call-avatar-fallback {
  display: grid;
  place-items: center;
  color: #ecfffb;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 74%, #0e3737), #132527);
  font-family: Georgia, serif;
  font-size: 2.5rem;
}

.call-stage h1 {
  margin: 18px 0 2px;
  font-family: Georgia, serif;
  font-size: 1.7rem;
  font-weight: 500;
}

.call-status,
.call-timer {
  margin: 4px 0 0;
  color: rgba(239, 250, 248, 0.74);
}

.call-status {
  min-height: 1.4em;
  font-size: 0.9rem;
}

.call-timer {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.call-captions {
  width: min(100%, 360px);
  max-height: 184px;
  margin-top: auto;
  overflow: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 100%);
}

.call-captions::-webkit-scrollbar {
  display: none;
}

.call-caption,
.call-caption-hint {
  margin: 10px 0;
  line-height: 1.52;
  font-size: 0.84rem;
}

.call-caption {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
}

.call-caption strong {
  color: color-mix(in srgb, var(--accent) 64%, white);
  font-size: 0.76rem;
  font-weight: 650;
}

.call-caption.user strong {
  color: rgba(239, 250, 248, 0.55);
}

.call-caption span {
  color: rgba(247, 252, 251, 0.9);
}

.call-caption-hint {
  color: rgba(239, 250, 248, 0.44);
  text-align: center;
}

.call-error {
  width: min(100%, 360px);
  margin: 10px 0 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 142, 142, 0.3);
  border-radius: 13px;
  color: #ffd6d6;
  background: rgba(92, 20, 20, 0.36);
  font-size: 0.76rem;
  line-height: 1.45;
}

.call-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  padding: 24px 8px 2px;
}

.call-control {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  color: rgba(247, 252, 251, 0.78);
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
}

.call-control-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 160ms ease, background 160ms ease;
}

.call-control svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.call-control:active .call-control-icon {
  transform: scale(0.94);
}

.call-control.active .call-control-icon {
  color: #08211f;
  background: rgba(239, 252, 249, 0.9);
}

.call-hangup .call-control-icon {
  width: 64px;
  height: 64px;
  color: white;
  border-color: rgba(255, 113, 113, 0.7);
  background: #df5157;
  box-shadow: 0 10px 28px rgba(153, 25, 37, 0.35);
}

.call-control:disabled {
  opacity: 0.42;
}

@keyframes call-pulse {
  0% { transform: scale(0.92); opacity: 0.58; }
  75%, 100% { transform: scale(1.18); opacity: 0; }
}

.sail-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0 10px;
}

.sail-header-copy {
  min-width: 0;
  flex: 1;
}

.sail-header-copy h1 {
  margin: 0;
  font-size: 23px;
}

.sail-refresh-button.is-loading svg {
  animation: solo-spin 0.9s linear infinite;
}

.sail-scroll {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 1px 1px 10px;
  scrollbar-width: thin;
}

.sail-context-card,
.sail-data-card {
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 16px 14px;
  background: rgba(250, 252, 248, 0.7);
  box-shadow: 0 16px 40px rgba(17, 49, 45, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(1.08);
}

.sail-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.sail-section-heading h2 {
  margin: 1px 0 0;
  color: rgba(25, 34, 33, 0.9);
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: 18px;
}

.sail-section-heading > small {
  max-width: 145px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

.sail-context-grid {
  display: grid;
  gap: 9px;
  margin-top: 13px;
}

.sail-context-item {
  display: grid;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 16px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.46);
}

.sail-context-item > span,
.sail-vitals-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sail-context-item strong {
  overflow-wrap: anywhere;
  color: rgba(22, 35, 33, 0.94);
  font-size: 16px;
}

.sail-context-item small {
  color: rgba(23, 33, 31, 0.6);
  font-size: 10px;
  line-height: 1.45;
}

.sail-health-chart {
  display: grid;
  gap: 5px;
  margin-top: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 16px;
  padding: 9px 10px 5px;
  background: rgba(255, 255, 255, 0.45);
}

.sail-chart-label {
  color: rgba(23, 33, 31, 0.64);
  font-size: 11px;
}

.sail-chart-label b {
  color: var(--accent-ink);
  font-size: 18px;
}

.sail-health-chart svg {
  width: 100%;
  height: 64px;
  overflow: visible;
}

.sail-vitals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
}

.sail-vitals-grid > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2px 5px;
  border-radius: 15px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.46);
}

.sail-vitals-grid span {
  grid-column: 1 / 3;
}

.sail-vitals-grid strong {
  color: var(--accent-ink);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.sail-vitals-grid small {
  color: var(--muted);
  font-size: 10px;
}

.sail-usage-list {
  display: grid;
  gap: 9px;
  margin-top: 13px;
}

.sail-usage-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.sail-usage-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 15%, white);
  font-size: 11px;
  font-weight: 800;
}

.sail-usage-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.sail-usage-copy > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.sail-usage-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sail-usage-copy > div:first-child span {
  flex: none;
  color: var(--muted);
  font-size: 10px;
}

.sail-usage-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(28, 61, 57, 0.09);
}

.sail-usage-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 62%, white), var(--accent));
}

.sail-empty,
.sail-panel-status {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.sail-empty {
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.42);
  text-align: center;
}

.sail-panel-status {
  margin-top: 12px;
  text-align: center;
}

.sail-panel-status.error {
  color: #ad4c43;
}

.solo-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0 10px;
}

.solo-header-copy {
  min-width: 0;
  flex: 1;
}

.solo-header-copy h1 {
  margin: 0;
  font-size: 23px;
}

.solo-refresh-button.is-loading svg {
  animation: solo-spin 0.9s linear infinite;
}

.solo-scroll {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 1px 1px 10px;
  scrollbar-width: thin;
}

.solo-mood-card,
.solo-next-card,
.solo-timeline-card {
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  background: rgba(250, 252, 248, 0.7);
  box-shadow: 0 16px 40px rgba(17, 49, 45, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(1.08);
}

.solo-mood-card {
  padding: 18px 14px 13px;
}

.solo-mood-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.solo-mood-meta time {
  flex: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.solo-chips {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.solo-chip {
  overflow: hidden;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.solo-chip.mode-chip {
  color: #4c3743;
  background: rgba(225, 196, 211, 0.62);
}

.solo-chip.drive-chip {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, 0.8));
}

#soloMoodLine {
  margin: 13px 2px 17px;
  color: rgba(25, 34, 33, 0.92);
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.solo-emotion-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.solo-emotion {
  --emotion-color: #c6a867;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.solo-emotion[data-bucket="joy"] { --emotion-color: #d6ad43; }
.solo-emotion[data-bucket="miss"] { --emotion-color: #bf809d; }
.solo-emotion[data-bucket="ache"] { --emotion-color: #d88b52; }
.solo-emotion[data-bucket="cross"] { --emotion-color: #b95750; }
.solo-emotion[data-bucket="low"] { --emotion-color: #718ba1; }
.solo-emotion[data-bucket="spark"] { --emotion-color: #c94f80; }

.solo-emotion.is-primary {
  border-color: color-mix(in srgb, var(--emotion-color) 26%, transparent);
  background: color-mix(in srgb, var(--emotion-color) 8%, rgba(255, 255, 255, 0.52));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--emotion-color) 10%, transparent);
}

.solo-emotion-toggle {
  width: 100%;
  min-height: 43px;
  display: grid;
  grid-template-columns: 5px 43px minmax(80px, 1fr) 29px 15px;
  align-items: center;
  gap: 8px;
  padding: 5px 7px 5px 5px;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.solo-emotion-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--emotion-color) 70%, white);
  outline-offset: -2px;
}

.solo-emotion-accent {
  width: 3px;
  height: 20px;
  justify-self: center;
  border-radius: 999px;
  background: var(--emotion-color);
  transition: width 180ms ease, height 180ms ease;
}

.solo-emotion.is-primary .solo-emotion-accent {
  width: 5px;
  height: 27px;
}

.solo-emotion-toggle strong {
  font-size: 13px;
  font-weight: 680;
}

.solo-emotion.is-primary .solo-emotion-toggle strong {
  font-weight: 820;
}

.solo-emotion-track,
.solo-channel-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--emotion-color) 13%, rgba(30, 45, 42, 0.08));
}

.solo-emotion-fill,
.solo-channel-track > span {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--emotion-color) 72%, white), var(--emotion-color));
  transition: width 600ms ease-out;
}

.solo-emotion-toggle output {
  justify-self: end;
  color: color-mix(in srgb, var(--emotion-color) 72%, #24302f);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.solo-emotion-chevron {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.solo-emotion-details {
  margin: 0 9px 9px 18px;
  padding: 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.42);
  animation: solo-reveal 180ms ease-out;
}

.solo-channel-list {
  display: grid;
  gap: 7px;
}

.solo-channel {
  display: grid;
  grid-template-columns: 58px minmax(70px, 1fr) 26px;
  align-items: center;
  gap: 7px;
  color: rgba(26, 38, 36, 0.78);
  font-size: 11px;
}

.solo-channel b {
  color: color-mix(in srgb, var(--emotion-color) 72%, #263230);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.solo-channel-track {
  height: 5px;
}

.solo-cause-section {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(33, 49, 46, 0.09);
}

.solo-cause-section > strong {
  color: rgba(25, 38, 35, 0.72);
  font-size: 11px;
}

.solo-cause {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  font-size: 10px;
  line-height: 1.45;
}

.solo-cause-source {
  padding: 2px 5px;
  border-radius: 6px;
  color: #5a4050;
  background: rgba(213, 178, 197, 0.38);
  font-weight: 700;
  white-space: nowrap;
}

.solo-cause-source.source-world { color: #31566f; background: rgba(144, 181, 207, 0.34); }
.solo-cause-source.source-peer { color: #5f4b25; background: rgba(218, 190, 119, 0.34); }
.solo-cause-source.source-self { color: #3a5f57; background: rgba(128, 184, 168, 0.3); }

.solo-cause-copy {
  min-width: 0;
  color: rgba(26, 37, 35, 0.78);
}

.solo-cause small {
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.solo-cause-empty,
.solo-panel-status {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.solo-panel-status {
  margin-top: 12px;
  text-align: center;
}

.solo-panel-status.is-muted {
  color: rgba(89, 72, 82, 0.7);
}

.solo-panel-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: var(--muted);
  text-align: center;
}

.solo-panel-empty > span {
  color: #a57892;
  font-family: ui-serif, serif;
  font-size: 32px;
}

.solo-panel-empty p {
  max-width: 240px;
  margin: 0;
  font-size: 11px;
}

.solo-next-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  color: var(--muted);
}

.solo-next-card > span {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #72576a;
  background: rgba(218, 190, 205, 0.42);
  font-weight: 800;
}

.solo-next-card strong {
  display: block;
  margin-bottom: 3px;
  color: rgba(25, 35, 33, 0.72);
  font-size: 12px;
}

.solo-next-card p {
  margin: 0;
  font-size: 10px;
  line-height: 1.55;
}

.solo-timeline-card {
  padding: 16px 14px 14px;
}

.solo-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.solo-section-heading h2 {
  margin: 1px 0 0;
  color: rgba(25, 34, 33, 0.9);
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: 18px;
}

.solo-section-heading small {
  max-width: 150px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  text-align: right;
}

.solo-timeline-legend {
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.solo-timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(35, 47, 44, 0.7);
  font-size: 10px;
  font-weight: 700;
}

.solo-timeline-legend span::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-color);
  content: "";
}

.solo-emotion-chart {
  min-height: 112px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(34, 54, 50, 0.08);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(238, 244, 239, 0.38));
}

.solo-emotion-chart svg {
  width: 100%;
  height: 112px;
  overflow: visible;
}

.solo-chart-grid {
  stroke: rgba(40, 60, 56, 0.08);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.solo-chart-line {
  filter: drop-shadow(0 2px 3px rgba(40, 48, 46, 0.08));
}

.solo-chart-focus {
  stroke: rgba(80, 54, 72, 0.4);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}

.solo-track-labels {
  display: flex;
  justify-content: space-between;
  margin: 4px 3px 0;
  color: var(--muted);
  font-size: 8px;
}

.solo-activity-track {
  position: relative;
  height: 35px;
  margin: 0 7px 3px;
}

.solo-activity-line {
  position: absolute;
  inset: 17px 0 auto;
  height: 1px;
  background: rgba(66, 87, 82, 0.18);
}

.solo-activity-point {
  position: absolute;
  top: 7px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid rgba(250, 252, 248, 0.95);
  border-radius: 50%;
  color: #5a4050;
  background: #dbc0cf;
  box-shadow: 0 2px 7px rgba(46, 57, 54, 0.16);
  font-size: 9px;
  font-weight: 800;
  transform: translateX(-50%);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.solo-activity-point.is-selected {
  z-index: 2;
  color: white;
  background: #72576a;
  transform: translateX(-50%) scale(1.18);
}

.solo-activity-list {
  display: grid;
  gap: 7px;
}

.solo-activity-card {
  overflow: hidden;
  border: 1px solid rgba(35, 52, 49, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.38);
  transition: border-color 160ms ease, background 160ms ease;
}

.solo-activity-card.is-selected {
  border-color: rgba(126, 83, 109, 0.28);
  background: rgba(246, 235, 241, 0.62);
}

.solo-activity-summary {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.solo-activity-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #604758;
  background: rgba(218, 190, 205, 0.42);
  font-size: 12px;
  font-weight: 850;
}

.solo-activity-icon.kind-idle {
  color: #49655f;
  background: rgba(170, 204, 191, 0.38);
}

.solo-activity-summary > span:nth-child(2) {
  min-width: 0;
}

.solo-activity-summary strong,
.solo-activity-summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.solo-activity-summary strong {
  color: rgba(25, 36, 34, 0.85);
  font-size: 11px;
}

.solo-activity-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.solo-activity-summary time {
  align-self: start;
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.solo-activity-detail {
  display: grid;
  gap: 6px;
  margin: 0 10px 10px 49px;
  padding-top: 8px;
  border-top: 1px solid rgba(38, 54, 50, 0.08);
  animation: solo-reveal 180ms ease-out;
}

.solo-activity-detail p,
.solo-activity-detail small {
  margin: 0;
  color: rgba(34, 47, 44, 0.68);
  font-size: 9px;
  line-height: 1.5;
}

.solo-activity-detail pre {
  max-height: 190px;
  margin: 0;
  overflow: auto;
  color: rgba(28, 40, 37, 0.8);
  font: 9px/1.55 ui-monospace, "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.solo-activity-detail a {
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 750;
  text-decoration: none;
}

.solo-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.solo-notes-grid > section {
  min-width: 0;
  padding: 10px;
  border-radius: 13px;
  background: rgba(236, 229, 233, 0.45);
}

.solo-notes-grid h3 {
  margin: 0 0 7px;
  color: rgba(31, 43, 40, 0.78);
  font-size: 10px;
}

.solo-note-list {
  display: grid;
  gap: 6px;
}

.solo-note-list > div {
  padding-top: 6px;
  border-top: 1px solid rgba(49, 63, 60, 0.08);
}

.solo-note-list > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.solo-note-list p,
.solo-note-empty {
  margin: 0;
  color: rgba(39, 52, 49, 0.68);
  font-size: 9px;
  line-height: 1.5;
}

.solo-note-list time {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.solo-timeline-empty {
  max-width: 270px;
  margin: 0;
  padding: 16px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 380px) {
  .solo-notes-grid { grid-template-columns: 1fr; }
  .solo-section-heading small { max-width: 115px; }
}

@keyframes solo-spin {
  to { transform: rotate(360deg); }
}

@keyframes solo-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

#musicView {
  min-height: 0;
  flex-direction: column;
  padding: 4px 12px 12px;
}

.phone-shell.music-mode .bottom-tabs {
  display: none;
}

.music-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 10px;
}

.music-header-copy {
  min-width: 0;
  flex: 1;
}

.music-header-copy h1 {
  font-size: 23px;
}

.music-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.music-header-actions .icon-button {
  width: 36px;
  height: 36px;
}

.music-status {
  max-width: 88px;
  overflow: hidden;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, white);
  border-radius: 999px;
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.54);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-status.offline {
  color: #9d2838;
  border-color: rgba(157, 40, 56, 0.32);
}

.duetto-frame-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#duettoFrame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: transparent;
}

.duetto-frame-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  background: rgba(246, 251, 247, 0.76);
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.duetto-frame-loading[hidden] {
  display: none;
}

.duetto-frame-loading.error {
  padding: 24px;
  color: #9d2838;
  text-align: center;
}

.duetto-frame-loading.error .duetto-loading-dot {
  background: #9d2838;
  animation: none;
}

.duetto-loading-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 30%, transparent);
  animation: duetto-loading-pulse 1.35s ease-out infinite;
}

@keyframes duetto-loading-pulse {
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.home-brand {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--accent-ink);
  font-size: clamp(24px, 7vw, 31px);
  font-weight: 700;
  letter-spacing: -0.035em;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.72);
}

.home-brand i {
  color: var(--accent);
  font-size: 0.78em;
  font-style: normal;
  font-weight: 500;
}

.home-card-grid {
  flex: 1;
  min-height: 390px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-card {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--accent);
  border-color: color-mix(in srgb, var(--accent) 48%, white);
  border-radius: 22px;
  padding: 14px 12px;
  color: var(--ink);
  background: rgba(246, 251, 247, 0.58);
  box-shadow:
    0 12px 28px rgba(16, 58, 54, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px) saturate(1.18);
  cursor: pointer;
  text-align: center;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.home-card:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 5px 16px rgba(16, 58, 54, 0.12);
}

.home-card.feature-ready {
  border-color: var(--accent);
}

.home-card-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.58);
}

.home-card-icon svg {
  width: 36px;
  height: 36px;
  stroke-width: 1.55;
}

.home-card-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.home-card-copy strong {
  color: rgba(20, 31, 29, 0.94);
  font-size: 20px;
  font-weight: 780;
  letter-spacing: 0.02em;
}

.home-card-copy small {
  min-height: 34px;
  color: rgba(23, 33, 31, 0.64);
  font-size: 12px;
  line-height: 1.45;
}

.home-card-stats {
  display: grid;
  gap: 2px;
}

.home-card-stats b {
  color: var(--accent-ink);
}

.health-card {
  gap: 6px;
  padding: 10px 11px;
}

.health-card-icon {
  width: 38px;
  height: 38px;
}

.health-card-icon svg {
  width: 25px;
  height: 25px;
}

.health-card-copy {
  width: 100%;
  gap: 5px;
}

.health-card-heading {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.health-card-heading strong {
  font-size: 16px;
  white-space: nowrap;
}

.health-card-heading small {
  min-height: 0;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-chart {
  min-height: 60px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 2px;
  border: 1px solid color-mix(in srgb, var(--accent) 23%, transparent);
  border-radius: 12px;
  padding: 4px 7px 3px;
  background: color-mix(in srgb, white 48%, transparent);
}

.health-chart-label {
  color: rgba(23, 33, 31, 0.62);
  font-size: 9px;
  line-height: 1.2;
  text-align: left;
}

.health-chart-label b {
  color: var(--accent-ink);
  font-size: 13px;
}

.health-chart svg {
  width: 100%;
  height: 38px;
  overflow: visible;
}

.health-chart-guide,
.health-chart-line {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.health-chart-guide {
  stroke: color-mix(in srgb, var(--accent) 18%, transparent);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.health-chart-line {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px color-mix(in srgb, var(--accent) 28%, transparent));
}

.health-chart-line.is-empty {
  opacity: 0.28;
}

.health-card-stats {
  min-height: 0 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

.health-card-stats span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-card.health-permission-needed .health-card-icon {
  animation: health-card-pulse 2.4s ease-in-out infinite;
}

@keyframes health-card-pulse {
  50% {
    box-shadow:
      inset 0 0 18px rgba(255, 255, 255, 0.58),
      0 0 0 6px color-mix(in srgb, var(--accent) 10%, transparent);
  }
}

.home-notice {
  min-height: 16px;
  color: var(--accent-ink);
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

.toolbox-strip {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, white);
  border-radius: 20px;
  padding: 7px 9px 7px 14px;
  background: rgba(246, 251, 247, 0.62);
  box-shadow: 0 9px 24px rgba(16, 58, 54, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(1.16);
}

.toolbox-title {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.toolbox-title svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.toolbox-title strong {
  font-size: 15px;
}

.toolbox-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.toolbox-actions button {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 4px 12px rgba(16, 58, 54, 0.08);
  cursor: pointer;
}

.toolbox-actions button:active {
  color: white;
  background: var(--accent);
}

.toolbox-actions svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.7;
}

#toolsView {
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 14px 16px 18px;
}

.tools-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tools-intro {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 16px;
  color: rgba(23, 33, 31, 0.68);
  background: rgba(255, 255, 255, 0.46);
  font-size: 13px;
  line-height: 1.55;
  backdrop-filter: blur(14px);
}

.tool-management-grid {
  display: grid;
  gap: 10px;
}

.tool-management-grid > button {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px 12px;
  border: 1px solid var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, white);
  border-radius: 18px;
  padding: 13px;
  color: var(--ink);
  background: rgba(246, 251, 247, 0.64);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(16px);
}

.tool-management-icon {
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.58);
}

.tool-management-icon svg {
  width: 25px;
  height: 25px;
}

.tool-management-grid strong {
  align-self: end;
  font-size: 15px;
}

.tool-management-grid small {
  align-self: start;
  color: var(--muted);
  font-size: 12px;
}

.tool-management-grid em {
  grid-column: 3;
  grid-row: 1 / 3;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.54);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.mcp-manager {
  display: grid;
  gap: 12px;
  scroll-margin-top: 12px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, white);
  border-radius: 20px;
  background: rgba(246, 251, 247, 0.68);
  backdrop-filter: blur(18px);
}

.mcp-manager-heading,
.mcp-manager-actions,
.mcp-server-heading,
.mcp-server-identity,
.mcp-card-actions,
.mcp-import-footer {
  display: flex;
  align-items: center;
}

.mcp-manager-heading,
.mcp-server-heading,
.mcp-import-footer {
  justify-content: space-between;
  gap: 12px;
}

.mcp-manager-heading h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.mcp-manager-actions {
  gap: 8px;
}

.mcp-global-status {
  padding: 4px 8px;
  border-radius: 999px;
  color: rgba(23, 33, 31, 0.62);
  background: rgba(23, 33, 31, 0.07);
  font-size: 10px;
  font-weight: 750;
}

.mcp-global-status.enabled {
  color: #236b51;
  background: rgba(62, 160, 119, 0.14);
}

.mcp-import-card {
  display: grid;
  gap: 8px;
}

.mcp-import-card > label,
.mcp-field > span,
.mcp-category-field legend {
  color: rgba(23, 33, 31, 0.68);
  font-size: 11px;
  font-weight: 750;
}

.mcp-import-card textarea,
.mcp-field select,
.mcp-secret-row input {
  width: 100%;
  border: 1px solid rgba(42, 94, 82, 0.17);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.mcp-import-card textarea {
  min-height: 132px;
  padding: 11px;
  resize: vertical;
  font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.mcp-import-card textarea:focus,
.mcp-field select:focus,
.mcp-secret-row input:focus {
  border-color: color-mix(in srgb, var(--accent) 72%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}

.mcp-import-footer small {
  max-width: 70%;
  color: rgba(23, 33, 31, 0.52);
  font-size: 10px;
  line-height: 1.45;
}

.mcp-manager-message {
  min-height: 16px;
  margin: 0;
  color: #286b59;
  font-size: 11px;
  line-height: 1.45;
}

.mcp-manager-message.error,
.mcp-server-error {
  color: #a13c4a;
}

.mcp-server-list {
  display: grid;
  gap: 12px;
}

.mcp-server-card,
.mcp-empty-state {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(42, 94, 82, 0.13);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.62);
}

.mcp-empty-state {
  place-items: center;
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

.mcp-empty-state p {
  max-width: 310px;
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}

.mcp-server-identity {
  min-width: 0;
  gap: 9px;
}

.mcp-server-identity > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.mcp-server-identity strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mcp-server-identity small,
.mcp-server-count,
.mcp-credential-state {
  color: var(--muted);
  font-size: 10px;
}

.mcp-status-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(57, 67, 65, 0.25);
  box-shadow: 0 0 0 3px rgba(57, 67, 65, 0.07);
}

.mcp-status-dot.connected {
  background: #3ca579;
  box-shadow: 0 0 0 3px rgba(60, 165, 121, 0.14);
}

.mcp-status-dot.error {
  background: #c84b5e;
  box-shadow: 0 0 0 3px rgba(200, 75, 94, 0.13);
}

.mcp-endpoint {
  overflow: hidden;
  padding: 7px 9px;
  border-radius: 10px;
  color: rgba(21, 58, 50, 0.72);
  background: rgba(38, 104, 87, 0.07);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mcp-server-error {
  margin: 0;
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(174, 49, 71, 0.07);
  font-size: 10px;
  line-height: 1.45;
}

.mcp-policy-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
}

.mcp-field {
  display: grid;
  align-content: start;
  gap: 6px;
}

.mcp-field select {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 11px;
}

.mcp-category-field {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
}

.mcp-category-field legend {
  width: 100%;
  margin-bottom: 1px;
}

.mcp-check-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  color: rgba(23, 33, 31, 0.68);
  background: rgba(42, 94, 82, 0.07);
  font-size: 10px;
  cursor: pointer;
}

.mcp-check-chip input,
.mcp-tool-row input {
  accent-color: var(--accent);
}

.mcp-tools-details {
  border-top: 1px solid rgba(42, 94, 82, 0.1);
  padding-top: 9px;
}

.mcp-tools-details summary {
  color: rgba(23, 33, 31, 0.72);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.mcp-tool-groups {
  display: grid;
  gap: 10px;
  padding-top: 9px;
}

.mcp-tool-group {
  display: grid;
  gap: 6px;
}

.mcp-tool-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.mcp-tool-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(42, 94, 82, 0.045);
  cursor: pointer;
}

.mcp-tool-row > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.mcp-tool-row strong {
  overflow-wrap: anywhere;
  font: 700 10px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.mcp-tool-row small,
.mcp-tool-empty {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.mcp-tool-row.blocked {
  cursor: not-allowed;
  opacity: 0.66;
}

.mcp-secret-row {
  display: grid;
  grid-template-columns: auto minmax(90px, 0.5fr) minmax(110px, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.mcp-secret-row input {
  min-width: 0;
  padding: 8px 9px;
  font-size: 10px;
}

.mcp-card-actions {
  justify-content: flex-end;
  gap: 7px;
}

.small-button.danger {
  color: #a13c4a;
  border-color: rgba(161, 60, 74, 0.2);
}

.chat-header,
.memory-header,
.schedule-header,
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 14px;
}

.settings-header {
  display: block;
  padding: 18px 20px 8px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0;
}

.icon-button,
.send-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.icon-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.send-button {
  color: white;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(10, 89, 81, 0.26);
}

.send-button:disabled {
  cursor: default;
  opacity: 0.48;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.message-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 4px 14px;
  scroll-behavior: smooth;
}

.chat-locator-rail {
  position: absolute;
  top: 48%;
  right: 0;
  z-index: 12;
  width: 23px;
  height: 62px;
  display: grid;
  place-items: center;
  padding: 10px 7px;
  border: 1px solid rgba(17, 28, 27, 0.12);
  border-right: 0;
  border-radius: 15px 0 0 15px;
  color: rgba(17, 28, 27, 0.72);
  background: rgba(247, 251, 248, 0.66);
  box-shadow: 0 8px 22px rgba(16, 37, 33, 0.12);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: width 160ms ease, background 160ms ease, color 160ms ease;
}

.chat-locator-rail[hidden] {
  display: none;
}

.chat-locator-rail:hover,
.chat-locator-rail:focus-visible {
  width: 27px;
  color: var(--accent);
  background: rgba(247, 251, 248, 0.9);
  outline: none;
}

.chat-locator-track {
  position: relative;
  width: 2px;
  height: 38px;
  border-radius: 999px;
  background: rgba(17, 28, 27, 0.24);
}

.chat-locator-dot {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 1.5px solid rgba(247, 251, 248, 0.95);
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 1px 5px rgba(16, 37, 33, 0.22);
  transform: translate(-50%, -50%);
  transition: top 120ms ease;
}

.empty-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 28px;
  color: rgba(23, 33, 31, 0.62);
  text-align: center;
  font-size: 18px;
  line-height: 1.45;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0;
}

.message.locator-target {
  border-radius: 18px;
  outline: 2px solid color-mix(in srgb, var(--accent) 64%, transparent);
  outline-offset: 4px;
  animation: locator-target-pulse 1.7s ease-out;
}

@keyframes locator-target-pulse {
  0%, 36% {
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    outline-color: color-mix(in srgb, var(--accent) 78%, transparent);
  }
  100% {
    background: transparent;
    outline-color: transparent;
  }
}

.message.user {
  justify-content: flex-end;
}

.message.assistant {
  justify-content: flex-start;
}

.message-content {
  overflow-wrap: anywhere;
  line-height: 1.62;
  font-size: 15px;
}

.message.user .message-content {
  white-space: pre-wrap;
  padding: 10px 13px;
  color: rgba(10, 43, 40, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(210, 239, 235, 0.42)),
    color-mix(in srgb, var(--accent) 13%, rgba(255, 255, 255, 0.54));
  border-radius: 18px 18px 5px 18px;
  box-shadow: 0 10px 25px rgba(12, 65, 61, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  backdrop-filter: blur(22px) saturate(1.18);
}

.message.assistant .message-content {
  color: rgba(17, 28, 27, 0.94);
}

.message.assistant.pending .message-content,
.message-content.long-plain-text {
  white-space: pre-wrap;
}

.message-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.message-user-body {
  width: min(84%, 34ch);
  justify-items: end;
}

.message-assistant-body {
  width: min(92%, 52ch);
}

.message-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #8bc9c0, var(--accent));
  box-shadow: 0 7px 18px rgba(15, 74, 76, 0.16);
  font-size: 13px;
  font-weight: 800;
}

.message-avatar-user {
  background: linear-gradient(145deg, #3d8eb4, #2569a2);
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-identity {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: rgba(17, 28, 27, 0.58);
  font-size: 11px;
  line-height: 1.2;
}

.message-identity strong {
  overflow: hidden;
  color: rgba(17, 28, 27, 0.76);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-user-body .message-identity {
  justify-content: flex-end;
}

.message-content > :first-child,
.message-reasoning-content > :first-child {
  margin-top: 0;
}

.message-content > :last-child,
.message-reasoning-content > :last-child {
  margin-bottom: 0;
}

.message-content p,
.message-content ul,
.message-content ol,
.message-content blockquote,
.message-content pre,
.message-content table {
  margin: 0.55em 0;
}

.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4 {
  margin: 0.8em 0 0.35em;
  line-height: 1.3;
}

.message-content h1 { font-size: 1.34em; }
.message-content h2 { font-size: 1.22em; }
.message-content h3,
.message-content h4 { font-size: 1.1em; }

.message-content ul,
.message-content ol {
  padding-left: 1.35em;
}

.message-content blockquote {
  padding: 0.2em 0 0.2em 0.8em;
  color: rgba(17, 28, 27, 0.67);
  border-left: 3px solid color-mix(in srgb, var(--accent) 48%, transparent);
}

.message-content code,
.message-reasoning-content code {
  padding: 0.12em 0.35em;
  border-radius: 5px;
  background: rgba(17, 28, 27, 0.08);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88em;
}

.message-content pre {
  max-width: 100%;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(17, 28, 27, 0.08);
}

.message-content pre code {
  padding: 0;
  background: transparent;
}

.message-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.message-content th,
.message-content td {
  padding: 5px 8px;
  border: 1px solid rgba(17, 28, 27, 0.15);
}

.message-content a {
  color: color-mix(in srgb, var(--accent) 76%, #185475);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.message-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.message-content .katex-display,
.message-reasoning-content .katex-display {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.message-reasoning {
  overflow: hidden;
  color: rgba(17, 28, 27, 0.68);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.34);
}

.message-reasoning summary {
  padding: 7px 10px;
  cursor: pointer;
  color: color-mix(in srgb, var(--accent) 72%, #24312f);
  font-size: 12px;
  font-weight: 650;
  list-style-position: inside;
  user-select: none;
}

.message-reasoning-content {
  max-height: 220px;
  overflow: auto;
  padding: 0 10px 9px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.55;
}

.message-reasoning-content.reasoning-presentation-status {
  color: color-mix(in srgb, var(--accent) 68%, rgba(17, 28, 27, 0.68));
  font-style: italic;
}

.conversation-summary {
  width: 100%;
  padding: 5px 0;
}

.conversation-summary details {
  width: 100%;
}

.conversation-summary summary {
  display: grid;
  grid-template-columns: minmax(18px, 1fr) auto minmax(18px, 1fr);
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: color-mix(in srgb, var(--accent) 72%, #34413f);
  font-size: 11px;
  font-weight: 700;
  list-style: none;
  user-select: none;
}

.conversation-summary summary::-webkit-details-marker {
  display: none;
}

.conversation-summary summary::before,
.conversation-summary summary::after {
  height: 1px;
  content: "";
  background: color-mix(in srgb, var(--accent) 38%, transparent);
}

.conversation-summary summary span {
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, 0.76));
}

.conversation-summary.pending summary {
  cursor: default;
  opacity: 0.76;
}

.conversation-summary.summary-presented summary span {
  animation: summary-presented-pulse 1.5s ease-out;
}

@keyframes summary-presented-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 42%, transparent);
  }
  55% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: none;
  }
}

.conversation-summary-content {
  max-height: 320px;
  overflow: auto;
  margin: 8px 14px 2px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 10px;
  color: rgba(17, 28, 27, 0.74);
  background: rgba(255, 255, 255, 0.54);
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.6;
}

.conversation-summary-content > :first-child {
  margin-top: 0;
}

.conversation-summary-content > :last-child {
  margin-bottom: 0;
}

.conversation-summary-content h4 {
  margin: 16px 0 6px;
  font-size: 13px;
  color: var(--accent);
}

.conversation-summary-meta {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.message-actions {
  display: flex;
  gap: 6px;
  opacity: 0.72;
}

.message-footer {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-user-body .message-footer,
.message-user-body .message-actions {
  justify-content: flex-end;
}

.message-time,
.message-usage {
  color: rgba(17, 28, 27, 0.48);
  font-size: 10px;
  line-height: 1.35;
}

.message-time {
  white-space: nowrap;
}

.message-actions button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: rgba(17, 28, 27, 0.62);
  background: transparent;
  cursor: pointer;
}

.message-action-button svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.message-actions button:hover,
.message-actions button:focus-visible {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.55);
}

.message-actions button:disabled {
  cursor: default;
  opacity: 0.38;
}

.message.assistant.pending .message-content::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.15em;
  border-radius: 2px;
  background: var(--accent);
  animation: blink 0.9s infinite;
}

.message-tools {
  overflow: hidden;
  color: rgba(17, 28, 27, 0.72);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.38);
}

.message-tools summary {
  padding: 7px 10px;
  cursor: pointer;
  color: color-mix(in srgb, var(--accent) 72%, #24312f);
  font-size: 12px;
  font-weight: 650;
  list-style-position: inside;
  user-select: none;
}

.message-tools-list {
  display: grid;
  gap: 5px;
  padding: 0 10px 9px;
}

.message-tool-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  line-height: 1.45;
}

.message-tool-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-tool-state {
  flex: 0 0 auto;
  font-weight: 650;
}

.message-tool-state.running {
  color: color-mix(in srgb, var(--accent) 78%, #6c594f);
}

.message-tool-state.success {
  color: #3f7662;
}

.message-tool-state.error,
.message-tools.failed summary {
  color: #a44343;
}

.message-stream-warning {
  margin: 8px 0 0;
  padding: 7px 9px;
  border: 1px solid rgba(166, 91, 68, 0.2);
  border-radius: 10px;
  color: #8b4d3d;
  background: rgba(255, 244, 235, 0.78);
  font-size: 0.78rem;
  line-height: 1.45;
}

@keyframes blink {
  0%,
  52% {
    opacity: 0.22;
  }
  53%,
  100% {
    opacity: 1;
  }
}

.composer-shell {
  display: grid;
  gap: 6px;
  position: relative;
}

.edit-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  color: rgba(17, 28, 27, 0.68);
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.edit-notice[hidden] {
  display: none;
}

.edit-notice button {
  padding: 3px 7px;
  border: 0;
  border-radius: 6px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.composer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(18px);
}

.composer textarea {
  width: 100%;
  max-height: 140px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  line-height: 1.5;
  padding: 9px 4px 9px 8px;
}

.composer textarea::placeholder {
  color: rgba(23, 33, 31, 0.46);
}

.composer-add-wrap {
  position: relative;
  align-self: end;
}

.composer-add-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: rgba(17, 28, 27, 0.7);
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.composer-add-button:hover,
.composer-add-button:focus-visible,
.composer-add-button[aria-expanded="true"] {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
}

.composer-add-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.composer-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  z-index: 30;
  width: max-content;
  min-width: 184px;
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  background: rgba(248, 252, 250, 0.94);
  box-shadow: 0 18px 44px rgba(25, 47, 43, 0.2);
  backdrop-filter: blur(18px);
}

.composer-menu[hidden] {
  display: none;
}

.composer-menu button {
  min-height: 40px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  color: rgba(17, 28, 27, 0.78);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.composer-menu button:hover,
.composer-menu button:focus-visible,
.composer-menu button.mode-active {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 12%, white 88%);
}

.composer-menu button svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
}

.composer-thinking-mode {
  border-color: color-mix(in srgb, var(--accent) 36%, rgba(255, 255, 255, 0.42));
}

.composer-thinking-mode textarea {
  color: color-mix(in srgb, var(--accent) 78%, #24312f);
}

.composer-attachment-tray {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 4px;
}

.composer-attachment-tray[hidden] {
  display: none;
}

.composer-draft-chip,
.composer-image-chip {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(249, 252, 250, 0.78);
  box-shadow: 0 6px 16px rgba(21, 51, 46, 0.09);
}

.composer-draft-chip {
  max-width: 210px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 7px 8px 7px 10px;
  border-radius: 11px;
  color: rgba(17, 28, 27, 0.68);
  cursor: pointer;
}

.composer-draft-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.composer-draft-chip strong {
  color: var(--accent-ink);
  font-size: 11px;
}

.composer-image-chip {
  width: 54px;
  height: 54px;
  border-radius: 12px;
}

.composer-image-chip img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.composer-image-chip button,
.composer-draft-chip button {
  border: 0;
  color: rgba(17, 28, 27, 0.72);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.composer-image-chip button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
}

.composer-image-processing {
  padding: 7px 10px;
  border-radius: 11px;
  color: rgba(17, 28, 27, 0.58);
  background: rgba(255, 255, 255, 0.66);
  font-size: 11px;
}

.composer-error {
  color: #9b3d47;
  background: rgba(255, 239, 241, 0.86);
}

.message-user-images {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.message-user-images img {
  width: 100%;
  max-height: 260px;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 13px;
  box-shadow: 0 8px 20px rgba(17, 41, 37, 0.12);
}

.message-user-images img:only-child {
  grid-column: 1 / -1;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.34);
}

.message-user-thinking {
  width: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 11px;
  color: rgba(17, 28, 27, 0.64);
  background: rgba(255, 255, 255, 0.36);
  font-size: 12px;
}

.message-user-thinking summary {
  padding: 7px 9px;
  cursor: pointer;
  color: color-mix(in srgb, var(--accent) 70%, #24312f);
  font-weight: 650;
}

.message-user-thinking div {
  max-height: 180px;
  overflow: auto;
  padding: 0 9px 9px;
  white-space: pre-wrap;
}

.recall-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(15, 29, 27, 0.34);
  backdrop-filter: blur(10px);
}

.recall-modal[hidden] {
  display: none;
}

.recall-dialog {
  width: min(92vw, 520px);
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(247, 251, 248, 0.96);
  box-shadow: 0 24px 70px rgba(16, 37, 33, 0.28);
}

.recall-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.recall-dialog-header h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.recall-dialog-meta {
  color: rgba(17, 28, 27, 0.58);
  font-size: 12px;
  line-height: 1.55;
}

.recall-dialog-list {
  min-height: 0;
  display: grid;
  gap: 9px;
  overflow-y: auto;
}

.chat-locator-dialog {
  width: min(92vw, 560px);
  max-height: min(84vh, 720px);
}

.chat-locator-search {
  display: grid;
  gap: 6px;
  color: rgba(17, 28, 27, 0.68);
  font-size: 12px;
}

.chat-locator-search input,
.chat-locator-jump-form input {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(17, 28, 27, 0.14);
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font: inherit;
  outline: none;
}

.chat-locator-search input:focus,
.chat-locator-jump-form input:focus {
  border-color: color-mix(in srgb, var(--accent) 54%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 11%, transparent);
}

.chat-locator-jump-form {
  display: flex;
  align-items: center;
  gap: 9px;
}

.chat-locator-jump-form label {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(17, 28, 27, 0.68);
  font-size: 13px;
}

.chat-locator-jump-form input {
  width: 78px;
  padding: 8px 9px;
}

.chat-locator-jump-form .primary-button {
  min-height: 38px;
  padding: 8px 16px;
}

.chat-locator-meta {
  min-height: 19px;
  margin: 0;
  color: rgba(17, 28, 27, 0.58);
  font-size: 12px;
  line-height: 1.55;
}

.chat-locator-meta.error {
  color: #a44545;
}

.chat-locator-results {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-locator-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px 2px;
}

.chat-locator-pager > span {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.chat-locator-result {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid rgba(17, 28, 27, 0.08);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
  cursor: pointer;
}

.chat-locator-result:hover,
.chat-locator-result:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, rgba(255, 255, 255, 0.82));
  outline: none;
}

.chat-locator-result.current {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, 0.8));
}

.chat-locator-result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(17, 28, 27, 0.58);
  font-size: 11px;
}

.chat-locator-result-meta strong {
  color: var(--accent);
  font-size: 12px;
}

.chat-locator-result-snippet {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(17, 28, 27, 0.82);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chat-locator-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 18px;
  color: rgba(17, 28, 27, 0.55);
  text-align: center;
  font-size: 13px;
}

.recall-memory-card {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid rgba(17, 28, 27, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
}

.recall-memory-card strong {
  color: rgba(17, 28, 27, 0.88);
  line-height: 1.55;
}

.recall-memory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.recall-memory-meta span {
  padding: 3px 6px;
  border-radius: 999px;
  color: rgba(17, 28, 27, 0.58);
  background: rgba(17, 28, 27, 0.055);
  font-size: 10px;
}

.recall-memory-reason {
  color: rgba(17, 28, 27, 0.58);
  font-size: 11px;
  line-height: 1.5;
}

.recall-empty {
  padding: 28px 14px;
  color: rgba(17, 28, 27, 0.54);
  text-align: center;
}

.recall-injection-details {
  flex: 0 0 auto;
  color: rgba(17, 28, 27, 0.62);
  font-size: 11px;
}

.recall-injection-details summary {
  cursor: pointer;
}

.recall-injection-details pre {
  max-height: 180px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: rgba(17, 28, 27, 0.06);
}

#memoryView,
#scheduleView,
#settingsView,
#toolsView {
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 12px;
}

#memoryView,
#scheduleView {
  padding: 14px 16px 12px;
}

.settings-list {
  display: grid;
  gap: 12px;
  padding: 8px 16px 20px;
}

.identity-panel {
  gap: 12px;
}

.summary-settings {
  gap: 12px;
}

.summary-settings-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.summary-settings-heading > div {
  display: grid;
  gap: 4px;
}

.summary-settings-heading strong {
  color: rgba(17, 28, 27, 0.88);
  font-size: 15px;
}

.summary-settings-heading small,
.summary-settings label small {
  color: rgba(23, 33, 31, 0.54);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}

.summary-settings label {
  display: grid;
  gap: 7px;
}

#summaryStatus,
#reasoningPresentationStatus {
  max-width: 42%;
  color: color-mix(in srgb, var(--accent) 76%, #31514d);
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
}

#reasoningPresentationStatus {
  flex: 0 0 auto;
  white-space: nowrap;
}

#summaryStatus.error,
#reasoningPresentationStatus.error {
  color: #a44343;
}

.identity-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.identity-panel-heading > div {
  display: grid;
  gap: 3px;
}

.identity-panel-heading strong {
  color: rgba(17, 28, 27, 0.88);
  font-size: 15px;
}

.identity-panel-heading small,
.identity-summary small {
  color: rgba(23, 33, 31, 0.52);
  font-size: 10px;
  line-height: 1.4;
}

#identityStatus {
  max-width: 45%;
  color: var(--accent);
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

#identityStatus.error {
  color: #b54848;
}

.identity-grid {
  display: grid;
  gap: 10px;
}

.identity-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(20, 76, 73, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.identity-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.identity-avatar-button {
  position: relative;
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #3d8eb4, #2569a2);
  box-shadow: 0 9px 24px rgba(15, 74, 76, 0.18);
  cursor: pointer;
}

.assistant-avatar-button {
  background: linear-gradient(145deg, #8bc9c0, var(--accent));
}

.identity-avatar-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.identity-panel .identity-avatar-fallback {
  color: white;
  font-size: 22px;
  font-weight: 850;
}

.identity-avatar-badge {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  background: rgba(17, 28, 27, 0.78);
}

.identity-avatar-badge svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.identity-summary {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.identity-panel .identity-role {
  color: color-mix(in srgb, var(--accent) 78%, #253331);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.identity-summary strong {
  overflow: hidden;
  color: rgba(17, 28, 27, 0.9);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-input {
  display: grid;
  gap: 6px;
}

.identity-input > span {
  font-size: 11px;
}

.identity-avatar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.identity-avatar-actions .secondary-button {
  min-height: 34px;
  padding: 8px 12px;
}

.identity-remove-button {
  min-height: 34px;
  padding: 8px 10px;
  border: 0;
  color: rgba(17, 28, 27, 0.56);
  background: transparent;
  cursor: pointer;
}

.field {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(246, 251, 247, 0.82);
  backdrop-filter: blur(14px);
}

.field span {
  color: rgba(23, 33, 31, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.field > small {
  color: rgba(23, 33, 31, 0.54);
  font-size: 11px;
  line-height: 1.45;
}

.chat-import-session {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  color: rgba(23, 33, 31, 0.68);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.field .chat-import-session input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--accent);
}

.field .chat-import-session span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.prompt-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.prompt-file-row code {
  overflow-wrap: anywhere;
  color: rgba(17, 28, 27, 0.78);
  font-size: 12px;
}

#systemPromptStatus.ready {
  color: var(--accent);
  font-weight: 750;
}

.prompt-file-actions .secondary-button {
  flex: 1 1 150px;
}

.field input:not([type="range"]):not([type="color"]),
.field textarea,
.field select {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  padding: 11px 12px;
}

.field textarea {
  resize: vertical;
  line-height: 1.5;
}

.field input[type="color"] {
  width: 52px;
  height: 38px;
  padding: 2px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  accent-color: var(--accent);
}

output {
  color: rgba(23, 33, 31, 0.66);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 700;
}

.primary-button {
  color: white;
  background: var(--accent);
}

.secondary-button {
  color: var(--accent-ink);
  background: rgba(246, 251, 247, 0.8);
  border-color: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px);
}

.segment-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.segment-button {
  min-width: 0;
  height: 36px;
  border: 0;
  border-radius: 7px;
  color: rgba(23, 33, 31, 0.58);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.segment-active {
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.62);
}

.memory-panels {
  flex: 1;
  min-height: 0;
  margin-top: 12px;
}

.memory-panel {
  display: none;
  min-height: 0;
}

.memory-panel.panel-active {
  display: grid;
  gap: 12px;
}

.memory-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 9px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.memory-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  padding: 7px 8px;
}

.small-icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  cursor: pointer;
}

.small-icon-button svg {
  width: 17px;
  height: 17px;
}

.panel-summary,
.inline-status,
.item-meta {
  color: rgba(23, 33, 31, 0.58);
  font-size: 12px;
  font-weight: 700;
}

.item-list {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
}

.memory-item {
  display: grid;
  gap: 7px;
  padding: 13px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.item-title {
  color: rgba(17, 28, 27, 0.94);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.item-body {
  margin: 0;
  color: rgba(17, 28, 27, 0.82);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.text-button {
  width: fit-content;
  border: 0;
  border-radius: 7px;
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.52);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.text-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.load-more-row {
  display: grid;
  place-items: center;
  padding: 4px 0 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.metric span {
  color: rgba(23, 33, 31, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.metric strong {
  color: rgba(17, 28, 27, 0.92);
  font-size: 21px;
  line-height: 1;
}

.schedule-dashboard {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 13px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.schedule-next {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.schedule-next span,
.schedule-next small,
.schedule-status {
  color: rgba(23, 33, 31, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.schedule-next strong {
  color: rgba(17, 28, 27, 0.94);
  font-size: 19px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.schedule-next small {
  line-height: 1.35;
}

.schedule-status {
  align-self: start;
  white-space: nowrap;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
}

.schedule-status.online {
  color: #0e665b;
}

.schedule-status.offline {
  color: #9d2838;
}

.schedule-section {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 13px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.section-title-row {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-title-row strong {
  color: rgba(17, 28, 27, 0.92);
  font-size: 14px;
  line-height: 1.25;
}

.schedule-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
}

.term-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px auto;
  align-items: end;
  gap: 8px;
}

.compact-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.compact-field span {
  color: rgba(23, 33, 31, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.compact-field input,
.compact-field textarea,
.compact-field select,
.course-import {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  padding: 10px 11px;
}

.task-field {
  grid-column: 1 / 3;
}

.message-tool-result {
  flex-basis: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 180px;
  overflow-y: auto;
}

.chat-locator-summary-result {
  padding: 3px 2px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 5%, rgba(255, 255, 255, 0.66));
  cursor: pointer;
}

.chat-locator-summary-result:hover,
.chat-locator-summary-result:focus-within {
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, rgba(255, 255, 255, 0.76));
}

.chat-locator-summary-result .conversation-summary-content {
  display: none;
}

.chat-locator-summary-result summary {
  pointer-events: none;
}

.message-heatmap-card {
  gap: 11px;
  overflow: hidden;
}

.message-heatmap-heading,
.message-heatmap-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.message-heatmap-heading > div {
  display: grid;
  gap: 3px;
}

.message-heatmap-heading .eyebrow {
  color: color-mix(in srgb, var(--accent) 72%, #324d48);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.message-heatmap-heading strong {
  color: rgba(17, 28, 27, 0.9);
  font-size: 15px;
}

.message-heatmap-heading small,
.message-heatmap-footer small {
  color: rgba(23, 33, 31, 0.54);
  font-size: 10px;
  line-height: 1.45;
}

.message-heatmap-heading small {
  max-width: 48%;
  text-align: right;
}

.message-heatmap-scroll {
  display: flex;
  justify-content: center;
  padding: 4px 0 7px;
}

.message-heatmap {
  display: grid;
  grid-template-columns: repeat(7, 30px);
  grid-auto-rows: 30px;
  gap: 2px;
  width: max-content;
}

.message-heatmap-period {
  display: grid;
  grid-template-columns: 34px minmax(86px, 1fr) minmax(76px, 1fr) 34px;
  align-items: center;
  gap: 7px;
}

.message-heatmap-period select {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(21, 54, 50, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  color: rgba(17, 28, 27, 0.82);
  padding: 5px 8px;
  font: inherit;
}

.message-heatmap-cell {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.message-heatmap-cell::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  inset: 4px;
  border-radius: 5px;
  background: rgba(26, 62, 57, 0.08);
}

.message-heatmap-cell[data-level="1"]::after,
.message-heatmap-legend i[data-level="1"] { background: color-mix(in srgb, var(--accent) 24%, white); }
.message-heatmap-cell[data-level="2"]::after,
.message-heatmap-legend i[data-level="2"] { background: color-mix(in srgb, var(--accent) 45%, white); }
.message-heatmap-cell[data-level="3"]::after,
.message-heatmap-legend i[data-level="3"] { background: color-mix(in srgb, var(--accent) 70%, white); }
.message-heatmap-cell[data-level="4"]::after,
.message-heatmap-legend i[data-level="4"] { background: color-mix(in srgb, var(--accent) 92%, #143d38); }

.message-heatmap-spacer {
  width: 30px;
  height: 30px;
}

.summary-token-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.message-heatmap-cell:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 2px;
}

.message-heatmap-footer {
  align-items: center;
}

.message-heatmap-footer > small {
  max-width: 66%;
}

.message-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 3px;
  color: rgba(23, 33, 31, 0.48);
  font-size: 9px;
  white-space: nowrap;
}

.message-heatmap-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: rgba(26, 62, 57, 0.08);
}

.todo-details-field {
  grid-column: 1 / 3;
}

.todo-details-field textarea {
  resize: vertical;
}

.schedule-form .small-icon-button {
  align-self: end;
  justify-self: end;
}

.term-form .secondary-button {
  min-height: 39px;
  padding: 9px 11px;
}

.course-import {
  resize: vertical;
  min-height: 96px;
  line-height: 1.5;
}

.week-section {
  padding: 10px;
}

.week-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
}

.week-heading {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: center;
}

.week-heading strong {
  color: rgba(17, 28, 27, 0.92);
  font-size: 15px;
  line-height: 1.2;
}

.week-heading span {
  color: rgba(23, 33, 31, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.week-grid {
  --period-count: 12;
  position: relative;
  display: grid;
  grid-template-columns: 48px repeat(7, minmax(0, 1fr));
  grid-template-rows: 42px repeat(var(--period-count), 54px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.24);
}

.week-corner,
.week-day,
.period-label,
.period-cell {
  min-width: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.week-corner {
  display: grid;
  place-items: center;
  color: rgba(23, 33, 31, 0.48);
  font-size: 12px;
  font-weight: 850;
}

.week-day {
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 4px 2px;
  color: rgba(23, 33, 31, 0.64);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.week-day strong {
  font-size: 13px;
  line-height: 1;
}

.week-day span {
  font-size: 11px;
  line-height: 1;
}

.week-day.is-today {
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.42);
}

.period-label {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  padding: 3px 2px;
  color: rgba(23, 33, 31, 0.56);
  text-align: center;
}

.period-label strong {
  color: rgba(17, 28, 27, 0.82);
  font-size: 16px;
  line-height: 1;
}

.period-label span {
  font-size: 10px;
  font-weight: 750;
  line-height: 1.05;
}

.period-cell {
  background: rgba(255, 255, 255, 0.12);
}

.week-course {
  z-index: 2;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  margin: 3px;
  padding: 7px 6px;
  border-radius: 7px;
  color: white;
  background: var(--course-bg);
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: 0 6px 14px rgba(15, 44, 42, 0.12);
  overflow: hidden;
}

.week-course.is-now {
  outline: 2px solid rgba(255, 255, 255, 0.86);
}

.week-course strong,
.week-course span {
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.24;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.week-course strong {
  -webkit-line-clamp: 4;
  font-size: 12px;
  font-weight: 900;
}

.week-course span {
  -webkit-line-clamp: 4;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.92;
}

.week-empty {
  z-index: 1;
  grid-column: 2 / -1;
  grid-row: 2 / 6;
  display: grid;
  place-items: center;
  color: rgba(23, 33, 31, 0.52);
  font-size: 14px;
  font-weight: 800;
}

.timeline-section {
  background: transparent;
  border-color: transparent;
  padding: 0;
}

.schedule-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.schedule-item.is-now {
  border-color: rgba(23, 168, 151, 0.62);
  background: rgba(255, 255, 255, 0.58);
}

.schedule-item.is-done {
  opacity: 0.62;
}

.schedule-time {
  display: grid;
  align-content: start;
  gap: 4px;
  color: rgba(23, 33, 31, 0.6);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.schedule-kind {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.56);
  font-size: 11px;
}

.schedule-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.schedule-title {
  color: rgba(17, 28, 27, 0.94);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.schedule-details {
  color: rgba(23, 33, 31, 0.76);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.schedule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-inline {
  padding: 24px 12px;
  color: rgba(23, 33, 31, 0.58);
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

.bottom-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 24px 24px 0 0;
  background: rgba(248, 255, 252, 0.64);
  box-shadow: 0 -9px 28px rgba(12, 46, 43, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(24px) saturate(1.28);
  backdrop-filter: blur(24px) saturate(1.28);
}

.tab-button {
  min-width: 0;
  height: 52px;
  display: grid;
  grid-template-columns: auto;
  grid-template-rows: 21px 16px;
  place-content: center;
  align-items: center;
  justify-items: center;
  gap: 3px;
  border: 0;
  border-radius: 8px;
  color: rgba(23, 33, 31, 0.56);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.tab-button svg {
  width: 19px;
  height: 19px;
}

.home-tab-button {
  grid-template-rows: 28px 16px;
  padding: 0;
}

.home-tab-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 34%, transparent);
  transform: translateY(-2px);
}

.home-tab-icon svg {
  width: 25px;
  height: 25px;
  transform: rotate(-8deg);
}

.feather-tab-icon .feather-outline {
  stroke-width: 0.8;
  opacity: 0.72;
}

.feather-tab-icon .feather-shaft {
  stroke-width: 1.25;
}

.feather-tab-icon .feather-vane {
  stroke-width: 0.72;
  opacity: 0.9;
}

.home-tab-button.tab-active {
  color: var(--accent-ink);
}

.home-tab-button.tab-active .home-tab-icon {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72), 0 7px 18px color-mix(in srgb, var(--accent) 42%, transparent);
}

.tab-active {
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.52);
}

/* Operit-inspired water glass: translucent tint, bright rim, soft shadow and backdrop blur. */
:is(
  .home-card,
  .health-card,
  .toolbox-strip,
  .solo-mood-card,
  .solo-next-card,
  .solo-timeline-card,
  .solo-emotion,
  .solo-activity-card,
  .solo-notes-grid > section,
  .sail-data-card,
  .sail-context-card,
  .sail-context-item,
  .identity-card,
  .field,
  .mcp-import-card,
  .mcp-server-card,
  .memory-search,
  .memory-item,
  .metric,
  .schedule-dashboard,
  .schedule-section,
  .schedule-item,
  .week-grid,
  .recall-dialog,
  .recall-memory-card,
  .chat-locator-dialog,
  .composer,
  .composer-menu
) {
  border-color: var(--water-glass-border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.56), rgba(238, 251, 247, 0.18) 52%, rgba(185, 231, 224, 0.16)),
    var(--water-glass-surface);
  box-shadow: var(--water-glass-shadow);
  -webkit-backdrop-filter: var(--water-glass-filter);
  backdrop-filter: var(--water-glass-filter);
}

:is(
  .field input:not([type="range"]):not([type="color"]),
  .field textarea,
  .field select,
  .compact-field input,
  .compact-field textarea,
  .compact-field select,
  .mcp-field input,
  .mcp-field textarea,
  .mcp-field select,
  .mcp-import-card textarea,
  .chat-locator-search input,
  .chat-locator-jump-form input
) {
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 5px 16px rgba(12, 46, 43, 0.07);
  -webkit-backdrop-filter: blur(16px) saturate(1.22);
  backdrop-filter: blur(16px) saturate(1.22);
}

.home-card:active,
.schedule-item.is-now,
.solo-emotion.is-primary,
.solo-activity-card.is-selected {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(219, 247, 241, 0.3)),
    color-mix(in srgb, var(--accent) 10%, transparent);
}

@media (max-width: 560px) {
  .app-shell {
    padding: 0;
  }

  .phone-shell {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .home-card-grid {
    min-height: 370px;
  }

  .schedule-dashboard {
    grid-template-columns: 1fr;
  }

  .schedule-status {
    justify-self: start;
  }

  .term-form {
    grid-template-columns: minmax(0, 1fr) 82px auto;
  }

  .week-grid {
    grid-template-columns: 44px repeat(7, minmax(0, 1fr));
    grid-template-rows: 40px repeat(var(--period-count), 52px);
  }

  .week-course {
    margin: 2px;
    padding: 6px 5px;
  }

  .week-course strong {
    font-size: 11px;
  }

  .week-course span {
    font-size: 10px;
  }

  .mcp-policy-grid {
    grid-template-columns: 1fr;
  }

  .mcp-secret-row {
    grid-template-columns: 1fr 1fr;
  }

  .mcp-credential-state {
    grid-column: 1 / -1;
  }
}

.summary-cancel-button {
  margin: 8px 0 0;
  padding: 5px 9px;
  min-height: 32px;
  font-size: 12px;
  color: inherit;
  opacity: .75;
}
.conversation-summary > details > summary {
  -webkit-touch-callout: none;
}

.api-budget { margin-top: 16px; min-width: 0; }
.api-budget > summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.api-budget output { display: block; margin: 10px 0; overflow-wrap: anywhere; }
.budget-price-form, .budget-reconcile-form { display: grid; gap: 10px; margin-top: 12px; }
.api-budget label { display: grid; gap: 5px; min-width: 0; }
.api-budget input, .api-budget select { width: 100%; min-width: 0; box-sizing: border-box; }
