/* =========================================================================
   Echo Studio — design system
   Paper, forest, citron and coral; Cormorant Garamond for voice, DM Sans for UI.
   ========================================================================= */

:root {
  color-scheme: light;
  --bg: #f7f6f0;
  --bg-dot: rgba(119, 130, 92, 0.1);
  --surface: #fffefa;
  --surface-2: #faf9f4;
  --surface-3: #f2f3e9;
  --surface-sunk: #f1f0e8;
  --ink: #26332a;
  --ink-2: #4a5147;
  --ink-3: #7b7d71;
  --ink-4: #a4a397;
  --line: #eae8df;
  --line-2: #dcdacd;
  --accent: #304b39;
  --accent-hover: #426145;
  --accent-ink: #fffefa;
  --accent-soft: #eef1dd;
  --accent-text: #55704a;
  --fern: #6f8660;
  --moss: #88a36a;
  --citron: #e6edbe;
  --coral: #d18269;
  --coral-soft: #f7e8e0;
  --coral-text: #a55a43;
  --danger: #b4533e;
  --danger-soft: #f8e4dd;
  --amber: #b9822c;
  --amber-soft: #f6ecd8;
  --hero: #304b39;
  --hero-2: #223628;
  --hero-ink: #fffefa;
  --hero-muted: rgba(255, 254, 250, 0.68);
  --toast-bg: #26332a;
  --toast-ink: #f7f6f0;
  --shadow-xs: 0 1px 2px rgba(44, 51, 34, 0.05);
  --shadow-sm: 0 3px 10px -3px rgba(44, 51, 34, 0.12);
  --shadow: 0 14px 34px -14px rgba(44, 51, 34, 0.25);
  --shadow-lg: 0 34px 80px -28px rgba(31, 39, 29, 0.42);
  --ring: 0 0 0 3px rgba(136, 163, 106, 0.35);
  --badge-s: 48%;
  --badge-l: 91%;
  --heat-0: #ebe9de;
  --heat-1: #dfe7bf;
  --heat-2: #b7c98a;
  --heat-3: #7e9a5f;
  --heat-4: #3d5a44;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --fast: 150ms;
  --mid: 260ms;
  --slow: 520ms;
  --sidebar: 250px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111713;
  --bg-dot: rgba(200, 220, 170, 0.05);
  --surface: #171f19;
  --surface-2: #1b241d;
  --surface-3: #222c24;
  --surface-sunk: #141b16;
  --ink: #edf0e3;
  --ink-2: #c8ccbc;
  --ink-3: #979b89;
  --ink-4: #6b705f;
  --line: #263027;
  --line-2: #344036;
  --accent: #d3e29d;
  --accent-hover: #e1ecb6;
  --accent-ink: #172014;
  --accent-soft: #243021;
  --accent-text: #bcd083;
  --fern: #afc58c;
  --moss: #9dbb78;
  --citron: #3a4a2c;
  --coral: #e0957c;
  --coral-soft: #3a2620;
  --coral-text: #eba68f;
  --danger: #e07a62;
  --danger-soft: #3a211b;
  --amber: #e1b060;
  --amber-soft: #352a17;
  --hero: #1f3326;
  --hero-2: #16261c;
  --hero-ink: #f3f5ea;
  --hero-muted: rgba(243, 245, 234, 0.64);
  --toast-bg: #edf0e3;
  --toast-ink: #16201a;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 3px 10px -3px rgba(0, 0, 0, 0.45);
  --shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 34px 80px -28px rgba(0, 0, 0, 0.75);
  --ring: 0 0 0 3px rgba(157, 187, 120, 0.35);
  --badge-s: 28%;
  --badge-l: 22%;
  --heat-0: #1f2820;
  --heat-1: #2e3f27;
  --heat-2: #4b6937;
  --heat-3: #7f9f55;
  --heat-4: #c3d98d;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111713;
    --bg-dot: rgba(200, 220, 170, 0.05);
    --surface: #171f19;
    --surface-2: #1b241d;
    --surface-3: #222c24;
    --surface-sunk: #141b16;
    --ink: #edf0e3;
    --ink-2: #c8ccbc;
    --ink-3: #979b89;
    --ink-4: #6b705f;
    --line: #263027;
    --line-2: #344036;
    --accent: #d3e29d;
    --accent-hover: #e1ecb6;
    --accent-ink: #172014;
    --accent-soft: #243021;
    --accent-text: #bcd083;
    --fern: #afc58c;
    --moss: #9dbb78;
    --citron: #3a4a2c;
    --coral: #e0957c;
    --coral-soft: #3a2620;
    --coral-text: #eba68f;
    --danger: #e07a62;
    --danger-soft: #3a211b;
    --amber: #e1b060;
    --amber-soft: #352a17;
    --hero: #1f3326;
    --hero-2: #16261c;
    --hero-ink: #f3f5ea;
    --hero-muted: rgba(243, 245, 234, 0.64);
    --toast-bg: #edf0e3;
    --toast-ink: #16201a;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 3px 10px -3px rgba(0, 0, 0, 0.45);
    --shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 34px 80px -28px rgba(0, 0, 0, 0.75);
    --ring: 0 0 0 3px rgba(157, 187, 120, 0.35);
    --badge-s: 28%;
    --badge-l: 22%;
    --heat-0: #1f2820;
    --heat-1: #2e3f27;
    --heat-2: #4b6937;
    --heat-3: #7f9f55;
    --heat-4: #c3d98d;
  }
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  transition: background-color var(--mid) ease, color var(--mid) ease;
}

body.has-modal {
  overflow: hidden;
}

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

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
}

::selection {
  color: var(--ink);
  background: var(--citron);
}

[hidden] {
  display: none !important;
}

.icon-defs,
.visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

kbd {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
}

/* ------------------------------------------------------------------ motion */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: none; }
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes ring-out {
  from { opacity: 0.65; transform: scale(1); }
  to { opacity: 0; transform: scale(1.9); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--tilt, 0deg)); }
  50% { transform: translateY(-12px) rotate(var(--tilt, 0deg)); }
}

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

@keyframes bar-dance {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(209, 130, 105, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(209, 130, 105, 0); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@keyframes word-in {
  from { opacity: 0; filter: blur(3px); transform: translateY(3px); }
  to { opacity: 1; filter: none; transform: none; }
}

@keyframes check-pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes item-out {
  to { opacity: 0; transform: translateX(24px) scale(0.98); height: 0; margin: 0; padding-top: 0; padding-bottom: 0; }
}

@keyframes card-out {
  to { opacity: 0; transform: scale(0.92) translateY(8px); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(40px); }
}

@keyframes toast-timer {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@keyframes ripple {
  to { transform: scale(1); opacity: 0; }
}

@keyframes heat-in {
  from { opacity: 0; transform: scale(0.3); }
  to { opacity: 1; transform: none; }
}

@keyframes glow-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

@keyframes think {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(0.94); filter: brightness(1.15); }
}

@keyframes highlight {
  0% { background-color: var(--citron); }
  100% { background-color: transparent; }
}

/* ------------------------------------------------------------------ controls */

.btn {
  position: relative;
  display: inline-flex;
  min-height: 40px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--fast) ease, color var(--fast) ease, border-color var(--fast) ease,
    transform var(--fast) var(--ease), box-shadow var(--mid) ease, opacity var(--fast) ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 16px -8px rgba(48, 75, 57, 0.55);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(48, 75, 57, 0.6);
}

.btn-soft {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-soft:hover:not(:disabled) {
  background: var(--citron);
}

.btn-ghost {
  border-color: var(--line-2);
  color: var(--ink-2);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-sm {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
}

.btn-lg {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn .icon {
  width: 15px;
  height: 15px;
}

.btn.is-loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid var(--accent-ink);
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: spin 700ms linear infinite;
}

.btn-soft.is-loading::after,
.btn-ghost.is-loading::after {
  border-color: var(--accent);
  border-right-color: transparent;
}

.btn.is-success {
  background: var(--moss);
  color: #fff;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: background-color var(--fast) ease, color var(--fast) ease, transform var(--fast) var(--ease);
}

.icon-btn:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn.is-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.icon-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.icon-btn-sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.icon-btn-sm .icon {
  width: 14px;
  height: 14px;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: text-decoration-color var(--fast) ease, color var(--fast) ease;
}

.link-btn:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.text-btn {
  display: inline-flex;
  padding: 4px 2px;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color var(--fast) ease, gap var(--fast) var(--ease);
}

.text-btn:hover {
  gap: 7px;
  color: var(--accent-text);
}

.text-btn .icon {
  width: 12px;
  height: 12px;
}

.chip {
  display: inline-flex;
  min-height: 30px;
  padding: 0 12px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease,
    transform var(--fast) var(--ease);
}

.chip:hover {
  border-color: var(--moss);
  background: var(--surface-3);
  transform: translateY(-1px);
}

.chip.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.chip .icon {
  width: 13px;
  height: 13px;
  color: var(--fern);
}

.chip.is-active .icon {
  color: inherit;
}

.chip-count {
  opacity: 0.6;
  font-size: 11px;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--line-2);
  transition: background-color var(--mid) ease;
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  content: "";
  transition: transform var(--mid) var(--spring);
}

.switch input:checked + .switch-track {
  background: var(--accent);
}

.switch input:checked + .switch-track::after {
  transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
  box-shadow: var(--ring);
}

.switch-sm .switch-track {
  width: 30px;
  height: 18px;
}

.switch-sm .switch-track::after {
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
}

.switch-sm input:checked + .switch-track::after {
  transform: translateX(12px);
}

.segmented {
  position: relative;
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-sunk);
}

.segment {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 34px;
  padding: 0 14px;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--mid) ease;
}

.segment:hover,
.segment.is-active {
  color: var(--ink);
}

.segment .icon {
  width: 14px;
  height: 14px;
}

.segment-indicator {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 380ms var(--ease), width 380ms var(--ease);
}

.segment-count {
  display: inline-grid;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink-3);
  font-size: 10.5px;
  transition: background-color var(--mid) ease, color var(--mid) ease;
}

.segment.is-active .segment-count {
  background: var(--accent);
  color: var(--accent-ink);
}

.segmented.is-small .segment {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
}

.select-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-pill select {
  min-height: 32px;
  max-width: 190px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
}

.select-pill select:hover {
  border-color: var(--moss);
}

.select-pill::after {
  position: absolute;
  right: 13px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  content: "";
  pointer-events: none;
  transform: translateY(-2px) rotate(45deg);
}

.count-pill {
  display: inline-grid;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--moss);
}

/* ------------------------------------------------------------------ boot */

.boot-screen {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--bg);
  transition: opacity 500ms var(--ease), visibility 500ms;
}

.boot-screen.is-done {
  opacity: 0;
  visibility: hidden;
}

.boot-symbol {
  width: 54px !important;
  height: 54px !important;
  border-radius: 16px !important;
  animation: breathe 1.8s ease-in-out infinite;
}

.boot-symbol .icon {
  width: 26px !important;
  height: 26px !important;
}

.boot-bars {
  display: flex;
  height: 22px;
  align-items: center;
  gap: 4px;
}

.boot-bars span {
  width: 4px;
  height: 100%;
  border-radius: 4px;
  background: var(--moss);
  animation: bar-dance 900ms ease-in-out infinite;
}

.boot-bars span:nth-child(2) { animation-delay: -150ms; }
.boot-bars span:nth-child(3) { animation-delay: -300ms; }
.boot-bars span:nth-child(4) { animation-delay: -450ms; }
.boot-bars span:nth-child(5) { animation-delay: -600ms; }

.boot-screen p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------ brand */

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-symbol {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #3b5c45, #263d2e);
  color: #e6edbe;
  box-shadow: 0 6px 14px -6px rgba(38, 61, 46, 0.6);
}

.brand-symbol .icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.9;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-name > span {
  font-weight: 400;
}

.brand-light {
  color: var(--hero-ink);
}

.brand-light .brand-symbol {
  background: #e6edbe;
  color: #263d2e;
}

/* ------------------------------------------------------------------ auth */

.auth-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  animation: fade-in 500ms var(--ease) both;
}

.auth-screen.is-leaving {
  animation: auth-leave 520ms var(--ease) forwards;
}

@keyframes auth-leave {
  to { opacity: 0; transform: scale(1.02); filter: blur(4px); }
}

.auth-art {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 44px 52px;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(155deg, #33503d 0%, #243a2b 55%, #1b2d21 100%);
  color: #fffefa;
}

.auth-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  animation: glow-drift 14s ease-in-out infinite;
}

.auth-glow-a {
  top: -120px;
  right: -100px;
  background: rgba(209, 130, 105, 0.35);
}

.auth-glow-b {
  bottom: -160px;
  left: -120px;
  background: rgba(230, 237, 190, 0.28);
  animation-delay: -7s;
}

.auth-orb {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 60px 0 36px;
}

.auth-orb-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(230, 237, 190, 0.45);
  border-radius: 50%;
  animation: ring-out 3.6s var(--ease) infinite;
}

.auth-orb-ring:nth-child(2) { animation-delay: -1.2s; }
.auth-orb-ring:nth-child(3) { animation-delay: -2.4s; }

.auth-orb-core {
  position: absolute;
  inset: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3f7d9, #d8e3a3 60%, #b9c982);
  color: #243a2b;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.5), 0 0 0 10px rgba(230, 237, 190, 0.08);
  animation: breathe 4s ease-in-out infinite;
}

.auth-orb-core .icon {
  width: 30px;
  height: 30px;
  stroke-width: 1.8;
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 440px;
}

.auth-kicker {
  color: rgba(230, 237, 190, 0.85);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.auth-copy h2 {
  margin: 16px 0 28px;
  font-family: var(--serif);
  font-size: clamp(44px, 4.6vw, 64px);
  font-weight: 400;
  line-height: 0.96;
}

.auth-copy h2 em {
  color: #e6edbe;
}

.auth-features {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.auth-features li {
  display: flex;
  padding: 12px 14px;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  opacity: 0.58;
  transition: opacity 500ms ease, background-color 500ms ease, border-color 500ms ease, transform 500ms var(--ease);
}

.auth-features li.is-active {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  opacity: 1;
  transform: translateX(6px);
}

.feature-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: rgba(230, 237, 190, 0.14);
  color: #e6edbe;
}

.auth-features strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.auth-features span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 254, 250, 0.66);
  font-size: 12.5px;
  line-height: 1.55;
}

.auth-floaters {
  position: absolute;
  top: 70px;
  right: 40px;
  width: 270px;
  height: 330px;
  pointer-events: none;
}

.floater {
  position: absolute;
  display: flex;
  padding: 12px 14px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.1);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  animation: float 7s ease-in-out infinite;
}

.floater strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}

.floater small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 254, 250, 0.62);
  font-size: 11px;
}

.floater-a {
  top: 0;
  right: 0;
  --tilt: 2deg;
}

.floater-b {
  top: 118px;
  right: 60px;
  --tilt: -2deg;
  animation-delay: -2.4s;
}

.floater-c {
  top: 232px;
  right: 8px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  --tilt: 1deg;
  animation-delay: -4.8s;
}

.floater-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: rgba(209, 130, 105, 0.9);
  color: #fff;
}

.floater-icon.is-citron {
  background: #e6edbe;
  color: #243a2b;
}

.floater-wave {
  display: flex;
  height: 22px;
  align-items: center;
  gap: 3px;
}

.floater-wave span {
  width: 3px;
  height: 100%;
  border-radius: 3px;
  background: #e6edbe;
  animation: bar-dance 1.1s ease-in-out infinite;
}

.floater-wave span:nth-child(2n) { animation-delay: -200ms; }
.floater-wave span:nth-child(3n) { animation-delay: -450ms; }
.floater-wave span:nth-child(5n) { animation-delay: -700ms; }

.auth-foot {
  position: relative;
  z-index: 1;
  display: flex;
  margin: auto 0 0;
  padding-top: 36px;
  align-items: center;
  gap: 8px;
  color: rgba(255, 254, 250, 0.6);
  font-size: 12px;
}

.auth-panel {
  display: grid;
  padding: 40px 28px;
  place-items: center;
  background:
    radial-gradient(var(--bg-dot) 0.8px, transparent 0.8px) 0 0 / 18px 18px,
    var(--bg);
}

.auth-card {
  width: min(420px, 100%);
  animation: rise 640ms var(--ease) 120ms both;
}

.auth-tabs {
  position: relative;
  display: grid;
  margin-bottom: 30px;
  padding: 5px;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-sunk);
}

.auth-tab {
  position: relative;
  z-index: 1;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--mid) ease;
}

.auth-tab.is-active {
  color: var(--ink);
}

.auth-tab-indicator {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 420ms var(--ease);
}

.auth-tabs.is-register .auth-tab-indicator {
  transform: translateX(100%);
}

.auth-form.is-entering-forward {
  animation: form-forward 420ms var(--ease) both;
}

.auth-form.is-entering-back {
  animation: form-back 420ms var(--ease) both;
}

@keyframes form-forward {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes form-back {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: none; }
}

.auth-form-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
}

.auth-form-head p {
  margin: 10px 0 26px;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.6;
}

.float-field {
  position: relative;
  margin-bottom: 14px;
}

.float-field input {
  width: 100%;
  height: 58px;
  padding: 24px 16px 8px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  transition: border-color var(--fast) ease, box-shadow var(--mid) ease, background-color var(--fast) ease;
}

.float-field.has-action input {
  padding-right: 52px;
}

.float-field input:hover {
  border-color: var(--ink-4);
}

.float-field input:focus {
  border-color: var(--moss);
  box-shadow: var(--ring);
}

.float-field label {
  position: absolute;
  top: 19px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 14px;
  pointer-events: none;
  transform-origin: left top;
  transition: top var(--mid) var(--ease), font-size var(--mid) var(--ease), color var(--mid) ease,
    letter-spacing var(--mid) ease;
}

.float-field label .icon {
  width: 1.1em;
  height: 1.1em;
}

.float-field input:focus + label,
.float-field input:not(:placeholder-shown) + label {
  top: 9px;
  color: var(--accent-text);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.float-field.is-invalid input {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.float-field.is-invalid label {
  color: var(--danger);
}

.field-action {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color var(--fast) ease, color var(--fast) ease;
}

.field-action:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.check {
  position: relative;
  display: inline-flex;
  margin: 4px 0 18px;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.check input {
  position: absolute;
  opacity: 0;
}

.check-box {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface);
  color: transparent;
  transition: background-color var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease;
}

.check-box .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.6;
}

.check input:checked + .check-box {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.check input:checked + .check-box .icon {
  animation: check-pop 320ms var(--spring);
}

.check input:focus-visible + .check-box {
  box-shadow: var(--ring);
}

.password-meter {
  margin: -4px 0 16px;
}

.password-meter-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.password-meter-track span {
  display: block;
  width: 4%;
  height: 100%;
  border-radius: inherit;
  background: var(--danger);
  transition: width 420ms var(--ease), background-color 420ms ease;
}

.password-meter[data-score="1"] .password-meter-track span { width: 25%; background: var(--danger); }
.password-meter[data-score="2"] .password-meter-track span { width: 50%; background: var(--amber); }
.password-meter[data-score="3"] .password-meter-track span { width: 76%; background: var(--moss); }
.password-meter[data-score="4"] .password-meter-track span { width: 100%; background: var(--accent-text); }

.password-meter small {
  display: block;
  margin-top: 7px;
  color: var(--ink-3);
  font-size: 11.5px;
}

.form-error {
  display: flex;
  margin: 0 0 14px;
  padding: 11px 13px;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  animation: shake 420ms var(--ease);
}

.auth-submit .icon {
  transition: transform var(--mid) var(--ease);
}

.auth-submit:hover .icon {
  transform: translateX(4px);
}

.auth-switch {
  margin: 18px 0 0;
  color: var(--ink-3);
  font-size: 13px;
  text-align: center;
}

.auth-privacy {
  display: flex;
  margin: 30px 0 0;
  padding-top: 18px;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.6;
}

.auth-privacy .icon {
  margin-top: 1px;
  color: var(--moss);
}

/* ------------------------------------------------------------------ shell */

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.app-shell.is-entering .sidebar {
  animation: sidebar-in 620ms var(--ease) both;
}

.app-shell.is-entering .topbar {
  animation: fade-in 620ms var(--ease) 120ms both;
}

@keyframes sidebar-in {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: none; }
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  height: 100vh;
  padding: 28px 18px 20px;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
  scrollbar-width: none;
}

.sidebar > .brand {
  margin: 0 0 40px 6px;
}

.side-label {
  margin: 0 0 10px 12px;
  color: var(--ink-4);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.side-nav {
  position: relative;
  display: grid;
  margin-bottom: 24px;
  gap: 3px;
}

.nav-indicator {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 44px;
  border-radius: 11px;
  background: var(--surface-3);
  opacity: 0;
  pointer-events: none;
  transition: transform 420ms var(--ease), height 420ms var(--ease), opacity var(--mid) ease;
}

.nav-indicator::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--moss);
  content: "";
}

.nav-link {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 44px;
  padding: 0 12px 0 14px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-3);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color var(--fast) ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.nav-link.is-active .icon {
  color: var(--accent-text);
}

.nav-link > span:not(.nav-rec) {
  flex: 1;
}

.nav-link .icon {
  width: 17px;
  height: 17px;
  transition: transform var(--mid) var(--spring), color var(--fast) ease;
}

.nav-link:hover .icon {
  transform: scale(1.12);
}

.nav-link kbd {
  border: 0;
  background: var(--surface-3);
  transition: background-color var(--fast) ease, color var(--fast) ease;
}

.nav-link.is-active kbd {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.nav-badge {
  padding: 2px 6px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e6edbe, #f2d9c8);
  color: #304b39;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-rec {
  display: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.nav-link.is-recording .nav-rec {
  display: inline-block;
}

.streak-card {
  display: flex;
  margin-top: auto;
  padding: 14px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--amber-soft), var(--surface));
}

.streak-flame {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--surface);
  color: var(--amber);
  box-shadow: var(--shadow-xs);
}

.streak-card.is-hot .streak-flame .icon {
  fill: var(--amber);
  animation: breathe 1.6s ease-in-out infinite;
}

.streak-card strong,
.privacy-note strong {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
}

.streak-card small {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.45;
}

.privacy-note {
  display: flex;
  margin-top: 10px;
  padding: 14px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.privacy-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
}

.privacy-icon > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moss);
  animation: pulse-dot 2.6s ease-in-out infinite;
}

.privacy-note p {
  margin: 3px 0 0;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.55;
}

.profile {
  display: flex;
  margin-top: 16px;
  padding: 14px 4px 0;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #e6edbe, #f0dccd);
  color: #304b39;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.avatar-xl {
  width: 68px;
  height: 68px;
  font-size: 34px;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line);
}

.profile-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.profile-copy strong,
.profile-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 13px;
  font-weight: 650;
}

.profile-copy small {
  color: var(--ink-3);
  font-size: 11px;
}

.main-panel {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  background:
    radial-gradient(var(--bg-dot) 0.8px, transparent 0.8px) 0 0 / 18px 18px,
    var(--bg);
}

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 64px;
  padding: 0 36px;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
}

.brand-compact {
  display: none;
}

.breadcrumb {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.breadcrumb > span {
  color: var(--ink-4);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.breadcrumb > .icon {
  width: 12px;
  height: 12px;
  color: var(--ink-4);
}

.breadcrumb > strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  animation: fade-in 300ms ease;
}

.search-trigger {
  display: flex;
  width: min(360px, 34vw);
  height: 38px;
  margin-left: auto;
  padding: 0 8px 0 13px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-4);
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--fast) ease, box-shadow var(--mid) ease, color var(--fast) ease;
}

.search-trigger:hover {
  border-color: var(--moss);
  box-shadow: var(--shadow-sm);
  color: var(--ink-3);
}

.search-trigger > span {
  flex: 1;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.engine-badge {
  display: inline-flex;
  height: 30px;
  margin-right: 6px;
  padding: 0 11px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.engine-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.engine-badge.is-claude .engine-dot {
  background: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-soft);
}

.theme-icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-icon-moon {
    display: none;
  }
}

#theme-toggle .icon {
  animation: scale-in 360ms var(--spring);
}

.badge {
  position: absolute;
  top: 3px;
  right: 2px;
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  animation: scale-in 360ms var(--spring);
}

.avatar-btn {
  display: grid;
  margin-left: 4px;
  padding: 2px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: box-shadow var(--mid) ease, transform var(--fast) var(--ease);
}

.avatar-btn:hover {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.avatar-btn .avatar {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.popover-anchor {
  position: relative;
}

.popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  width: 320px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
  animation: pop-in 240ms var(--ease);
}

.popover-head {
  display: flex;
  padding: 8px 10px 10px;
  align-items: center;
  justify-content: space-between;
}

.popover-head strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.popover-head .link-btn {
  font-size: 12px;
}

.popover-label {
  margin: 10px 10px 4px;
  color: var(--ink-4);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.notif-list {
  display: grid;
  max-height: 210px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  gap: 2px;
  list-style: none;
}

.notif-item {
  display: flex;
  padding: 9px 10px;
  align-items: flex-start;
  gap: 10px;
  border-radius: 12px;
  font-size: 12.5px;
  transition: background-color var(--fast) ease;
}

.notif-item:hover {
  background: var(--surface-3);
}

.notif-item .icon {
  margin-top: 2px;
  color: var(--ink-3);
}

.notif-item.is-unread .icon {
  color: var(--coral);
}

.notif-item strong {
  display: block;
  font-weight: 600;
}

.notif-item small {
  color: var(--ink-3);
  font-size: 11px;
}

.notif-empty {
  padding: 8px 10px 10px;
  color: var(--ink-4);
  font-size: 12px;
}

.notif-permission:not(:empty) {
  margin: 0 4px 6px;
}

.user-popover {
  width: 260px;
}

.user-popover-head {
  display: flex;
  padding: 10px 10px 12px;
  align-items: center;
  gap: 12px;
}

.user-popover-head div {
  display: grid;
  min-width: 0;
}

.user-popover-head strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-popover-head small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-popover hr {
  height: 1px;
  margin: 6px 4px;
  border: 0;
  background: var(--line);
}

.menu-item {
  display: flex;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--fast) ease, color var(--fast) ease;
}

.menu-item:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.menu-item kbd {
  margin-left: auto;
}

.menu-item.is-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ------------------------------------------------------------------ views */

.views {
  min-width: 0;
}

.view {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 44px 40px 72px;
}

.view.is-entering {
  animation: view-in 420ms var(--ease) both;
}

.view.is-entering > *,
.view.is-entering .stat-grid > *,
.view.is-entering .launch-grid > *,
.view.is-entering .home-grid > *,
.view.is-entering .split-aside > *,
.view.is-entering .account-grid > * {
  animation: rise var(--slow) var(--ease) both;
}

.view.is-entering > :nth-child(2),
.view.is-entering :is(.stat-grid, .launch-grid, .home-grid, .split-aside, .account-grid) > :nth-child(1) { animation-delay: 70ms; }
.view.is-entering > :nth-child(3),
.view.is-entering :is(.stat-grid, .launch-grid, .home-grid, .split-aside, .account-grid) > :nth-child(2) { animation-delay: 130ms; }
.view.is-entering > :nth-child(4),
.view.is-entering :is(.stat-grid, .launch-grid, .home-grid, .split-aside, .account-grid) > :nth-child(3) { animation-delay: 190ms; }
.view.is-entering > :nth-child(5),
.view.is-entering :is(.stat-grid, .launch-grid, .home-grid, .split-aside, .account-grid) > :nth-child(4) { animation-delay: 250ms; }
.view.is-entering > :nth-child(6),
.view.is-entering :is(.stat-grid, .launch-grid, .home-grid, .split-aside, .account-grid) > :nth-child(5) { animation-delay: 310ms; }
.view.is-entering > :nth-child(n + 7) { animation-delay: 360ms; }

.page-head {
  margin-bottom: 30px;
}

.page-head.is-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.page-head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.13em;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-soft);
}

.display {
  margin: 16px 0 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 70px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.01em;
}

.display em {
  color: var(--fern);
}

.lede {
  max-width: 540px;
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.7;
}

.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--mid) ease, box-shadow var(--mid) ease;
}

.panel-head {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.1;
}

.panel-meta {
  color: var(--ink-4);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.panel-sub {
  margin: -6px 0 16px;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.6;
}

.count-label {
  margin: 0 0 14px;
  color: var(--ink-4);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.empty-state {
  display: grid;
  padding: 56px 20px;
  justify-items: center;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius-xl);
  text-align: center;
  animation: rise var(--slow) var(--ease) both;
}

.empty-state.is-compact {
  padding: 36px 20px;
}

.empty-icon {
  display: grid;
  width: 60px;
  height: 60px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  animation: breathe 3.2s ease-in-out infinite;
}

.empty-icon .icon {
  width: 26px;
  height: 26px;
}

.empty-state h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.empty-state p {
  max-width: 340px;
  margin: 8px 0 18px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.6;
}

.empty-inline {
  margin: 0;
  padding: 14px 4px;
  color: var(--ink-4);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ home */

.home-hero {
  display: grid;
  margin-bottom: 30px;
  align-items: center;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.home-quote {
  display: flex;
  max-width: 560px;
  margin: 18px 0 0;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-3);
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  line-height: 1.4;
}

.home-quote .icon {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  color: var(--coral);
}

.hero-clock {
  position: relative;
  display: grid;
  width: 176px;
  height: 176px;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}

.clock-ring {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  transform: rotate(-90deg);
}

.clock-track,
.clock-progress,
.ring-track,
.ring-value {
  fill: none;
  stroke-width: 6;
}

.clock-track,
.ring-track {
  stroke: var(--line);
}

.clock-progress {
  stroke: var(--moss);
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  stroke-dashoffset: 339.3;
  transition: stroke-dashoffset 1.4s var(--ease);
}

.clock-face {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.clock-face strong {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.clock-face span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 650;
}

.hero-clock small {
  position: relative;
  max-width: 110px;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.35;
  text-align: center;
}

.launch-grid {
  display: grid;
  margin-bottom: 18px;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.launch-card {
  position: relative;
  display: flex;
  min-height: 240px;
  padding: 26px;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) ease, border-color var(--mid) ease;
}

.launch-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.launch-card:active {
  transform: translateY(-1px) scale(0.99);
}

.launch-assistant {
  border-color: transparent;
  background:
    radial-gradient(circle at 86% 22%, rgba(230, 237, 190, 0.2), transparent 42%),
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(150deg, var(--hero), var(--hero-2));
  color: var(--hero-ink);
}

.launch-dictate {
  background:
    radial-gradient(circle at 88% 18%, var(--coral-soft), transparent 45%),
    linear-gradient(150deg, var(--surface), var(--surface-2));
}

.launch-visual {
  position: absolute;
  top: 24px;
  right: 24px;
}

.mini-orb {
  position: relative;
  display: block;
  width: 86px;
  height: 86px;
}

.mini-orb span {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(230, 237, 190, 0.5);
  border-radius: 50%;
  animation: ring-out 3s var(--ease) infinite;
}

.mini-orb span:nth-child(2) { animation-delay: -1s; }
.mini-orb span:nth-child(3) { animation-delay: -2s; }

.mini-orb::after {
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3f7d9, #cbd98f);
  box-shadow: 0 0 30px rgba(230, 237, 190, 0.5);
  content: "";
  animation: breathe 3s ease-in-out infinite;
}

.mini-wave {
  display: flex;
  height: 58px;
  align-items: center;
  gap: 4px;
}

.mini-wave span {
  width: 4px;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(var(--coral), var(--moss));
  animation: bar-dance 1.2s ease-in-out infinite;
}

.mini-wave span:nth-child(2n) { animation-delay: -300ms; }
.mini-wave span:nth-child(3n) { animation-delay: -600ms; }
.mini-wave span:nth-child(5n) { animation-delay: -900ms; }

.launch-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.14em;
  opacity: 0.85;
}

.launch-kicker .icon {
  width: 14px;
  height: 14px;
}

.launch-title {
  margin-top: auto;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 0.98;
}

.launch-assistant .launch-title em {
  color: #e6edbe;
}

.launch-dictate .launch-title em {
  color: var(--fern);
}

.launch-text {
  max-width: 380px;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.75;
}

.launch-cta {
  display: inline-flex;
  margin-top: 4px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
}

.launch-cta .icon {
  transition: transform var(--mid) var(--ease);
}

.launch-card:hover .launch-cta .icon {
  transform: translateX(5px);
}

.stat-grid {
  display: grid;
  margin-bottom: 18px;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  position: relative;
  padding: 18px 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.stat-label {
  color: var(--ink-4);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.stat-value {
  display: block;
  margin: 8px 0 4px;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-card small {
  color: var(--ink-3);
  font-size: 11.5px;
}

.stat-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.stat-icon.is-flame {
  background: var(--amber-soft);
  color: var(--amber);
}

.home-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.panel-tasks,
.panel-notes {
  grid-column: span 6;
}

.panel-rhythm {
  grid-column: span 5;
}

.panel-topics {
  grid-column: span 4;
}

.panel-tip {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, var(--surface), var(--accent-soft));
}

.mini-task-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 4px;
  list-style: none;
}

.mini-task {
  display: flex;
  min-height: 46px;
  padding: 6px 8px;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  transition: background-color var(--fast) ease, opacity var(--mid) ease;
}

.mini-task:hover {
  background: var(--surface-2);
}

.mini-task-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-note-list {
  display: grid;
  gap: 8px;
}

.mini-note {
  display: grid;
  width: 100%;
  padding: 12px 14px;
  align-items: center;
  gap: 2px 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--fast) ease, transform var(--mid) var(--ease), background-color var(--fast) ease;
}

.mini-note:hover {
  border-color: var(--moss);
  background: var(--surface);
  transform: translateX(4px);
}

.mini-note .note-emoji {
  grid-row: span 2;
  font-size: 20px;
}

.mini-note strong {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-note p {
  margin: 0;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-note time {
  grid-row: 1;
  grid-column: 3;
  color: var(--ink-4);
  font-size: 10.5px;
  white-space: nowrap;
}

.heatmap {
  display: grid;
  gap: 4px;
  grid-auto-flow: column;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(7, auto);
}

.heat-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--heat-0);
  animation: heat-in 420ms var(--spring) both;
  animation-delay: var(--delay, 0ms);
  transition: transform var(--fast) var(--ease);
}

.heat-cell:hover {
  transform: scale(1.35);
}

.heat-cell.is-today {
  box-shadow: 0 0 0 1.5px var(--coral);
}

.heat-cell.is-future {
  opacity: 0.35;
}

.level-1 { background: var(--heat-1) !important; }
.level-2 { background: var(--heat-2) !important; }
.level-3 { background: var(--heat-3) !important; }
.level-4 { background: var(--heat-4) !important; }

.heatmap-legend {
  display: flex;
  margin-top: 12px;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--ink-4);
  font-size: 10.5px;
}

.heatmap-legend i {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--heat-0);
}

.heatmap-legend span {
  margin: 0 4px;
}

.topic-bars {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 12px;
  list-style: none;
}

.topic-bar-head {
  display: flex;
  margin-bottom: 6px;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.topic-bar-head strong {
  flex: 1;
  font-weight: 600;
}

.topic-bar-head span {
  color: var(--ink-3);
  font-size: 11.5px;
}

.topic-bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.topic-bar-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: hsl(var(--hue, 90) 42% 55%);
  transition: width 1s var(--ease);
}

.tip-nav {
  display: flex;
  gap: 2px;
}

.tip-text {
  margin: 4px 0 auto;
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  line-height: 1.3;
  transition: opacity 300ms ease, transform 300ms var(--ease);
}

.tip-text.is-changing {
  opacity: 0;
  transform: translateY(6px);
}

.tip-dots {
  display: flex;
  margin-top: 16px;
  gap: 5px;
}

.tip-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--line-2);
  transition: width var(--mid) var(--ease), background-color var(--mid) ease;
}

.tip-dots span.is-active {
  width: 18px;
  background: var(--moss);
}

/* ------------------------------------------------------------------ shared task + note bits */

.check-btn {
  position: relative;
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 1.8px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
  color: transparent;
  cursor: pointer;
  transition: border-color var(--fast) ease, background-color var(--mid) ease, color var(--fast) ease,
    transform var(--fast) var(--ease);
}

.check-btn:hover {
  border-color: var(--moss);
  color: var(--moss);
}

.check-btn:active {
  transform: scale(0.85);
}

.check-btn .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.8;
}

.check-btn.is-checked {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.check-btn.is-checked .icon {
  animation: check-pop 360ms var(--spring);
}

.due-chip {
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  padding: 0 8px;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.due-chip .icon {
  width: 11px;
  height: 11px;
}

.due-chip.is-soon {
  background: var(--amber-soft);
  color: var(--amber);
}

.due-chip.is-overdue {
  background: var(--danger-soft);
  color: var(--danger);
}

.due-chip.is-done {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.topic-badge {
  display: inline-flex;
  height: 24px;
  padding: 0 9px 0 6px;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: hsl(var(--hue, 80) var(--badge-s) var(--badge-l));
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.mood-badge {
  display: inline-flex;
  flex: 0 0 auto;
  height: 24px;
  padding: 0 9px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.topic-badge {
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------ split layout */

.split-layout {
  display: grid;
  align-items: start;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.split-main {
  min-width: 0;
}

.split-aside {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
}

/* ------------------------------------------------------------------ assistant */

.chat-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.chat-toolbar,
.studio-toolbar {
  display: flex;
  min-height: 52px;
  padding: 8px 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.live-label.is-listening .status-dot {
  background: var(--coral);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.live-label.is-thinking .status-dot {
  background: var(--amber);
  animation: pulse-dot 0.9s ease-in-out infinite;
}

.chat-tools,
.studio-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.orb-stage {
  --level: 0;
  display: grid;
  padding: 26px 20px 16px;
  justify-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 0%, var(--accent-soft), transparent 70%);
}

.orb {
  position: relative;
  width: 112px;
  height: 112px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform var(--slow) var(--ease), margin var(--slow) var(--ease);
}

.orb-stage {
  transition: padding var(--slow) var(--ease);
}

.chat-panel.has-conversation .orb-stage {
  padding: 12px 20px 8px;
}

.chat-panel.has-conversation .orb {
  margin: -16px 0;
  transform: scale(0.7);
}

.orb:focus-visible {
  outline-offset: 6px;
}

.orb-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(136, 163, 106, 0.38), transparent 68%);
  transform: scale(calc(1 + var(--level) * 0.55));
  transition: transform 90ms linear;
}

.orb:not(.is-listening) .orb-halo {
  animation: breathe 3.6s ease-in-out infinite;
}

.orb-ring {
  position: absolute;
  inset: 18px;
  border: 2px solid var(--moss);
  border-radius: 50%;
  opacity: 0;
}

.orb.is-listening .orb-ring {
  animation: ring-out 1.8s var(--ease) infinite;
}

.orb.is-listening .orb-ring-late {
  animation-delay: 0.9s;
}

.orb-core {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #5d8466, #304b39 58%, #1f3326);
  color: #e9f0c4;
  box-shadow: 0 14px 30px -12px rgba(38, 61, 46, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: scale(calc(1 + var(--level) * 0.16));
  transition: transform 90ms linear, background 300ms ease;
}

.orb:hover .orb-core {
  box-shadow: 0 18px 36px -12px rgba(38, 61, 46, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.orb.is-listening .orb-core {
  background: radial-gradient(circle at 34% 28%, #f0a88f, #d18269 58%, #a95a42);
  color: #fff;
}

.orb.is-thinking .orb-core {
  animation: think 1.1s ease-in-out infinite;
}

.orb-core .icon {
  width: 30px;
  height: 30px;
  stroke-width: 1.8;
}

.orb-icon-stop,
.orb.is-listening .orb-icon-mic {
  display: none;
}

.orb.is-listening .orb-icon-stop {
  display: block;
  fill: currentColor;
}

.orb-caption {
  margin: 0;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.orb-live {
  max-width: 520px;
  min-height: 22px;
  margin: 0;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  line-height: 1.35;
  text-align: center;
}

.orb-live:not(:empty)::after {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  background: var(--coral);
  content: "";
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}

.chat-feed {
  display: grid;
  max-height: 460px;
  min-height: 220px;
  padding: 22px 20px;
  align-content: start;
  gap: 16px;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-color: var(--line-2) transparent;
  scrollbar-width: thin;
}

.message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  animation: rise 380ms var(--ease) both;
}

.message.is-user {
  flex-direction: row-reverse;
}

.message-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.message-avatar .icon {
  width: 15px;
  height: 15px;
}

.message.is-user .message-avatar {
  background: var(--coral-soft);
  color: var(--coral-text);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}

.message-body {
  display: grid;
  min-width: 0;
  max-width: min(560px, 86%);
  justify-items: start;
}

.message.is-user .message-body {
  justify-items: end;
}

.message-meta {
  margin: 0 6px 5px;
  color: var(--ink-4);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
}

.bubble {
  padding: 11px 15px;
  border-radius: 18px 18px 18px 6px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message.is-user .bubble {
  border-radius: 18px 18px 6px 18px;
  background: var(--accent);
  color: var(--accent-ink);
}

.message.is-error .bubble {
  background: var(--danger-soft);
  color: var(--danger);
}

.bubble .word {
  display: inline;
  opacity: 0;
  animation: word-in 360ms var(--ease) forwards;
  animation-delay: calc(var(--i) * 24ms);
}

.engine-tag {
  display: inline-flex;
  margin: 5px 6px 0;
  align-items: center;
  gap: 5px;
  color: var(--ink-4);
  font-size: 10px;
  font-weight: 600;
}

.engine-tag .icon {
  width: 11px;
  height: 11px;
}

.typing-dots {
  display: inline-flex;
  height: 20px;
  align-items: center;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-4);
  animation: typing 1.2s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 150ms; }
.typing-dots span:nth-child(3) { animation-delay: 300ms; }

.chat-card {
  margin-left: 40px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  animation: rise 440ms var(--ease) both;
}

.chat-card-title {
  display: flex;
  margin: 0 0 10px;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
}

.chat-card-title .icon {
  width: 14px;
  height: 14px;
  color: var(--coral);
}

.chat-card-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 6px;
  list-style: none;
}

.chat-card-row {
  display: flex;
  width: 100%;
  padding: 9px 11px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 13px;
  text-align: left;
  transition: border-color var(--fast) ease, transform var(--mid) var(--ease);
}

button.chat-card-row {
  cursor: pointer;
}

button.chat-card-row:hover {
  border-color: var(--moss);
  transform: translateX(3px);
}

.chat-card-row > span:nth-child(2) {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-card-actions {
  display: flex;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.suggest-card {
  position: relative;
  overflow: hidden;
  border-color: var(--accent-soft);
  background:
    radial-gradient(circle at 100% 0%, var(--accent-soft), transparent 50%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.suggest-quote {
  margin: 0 0 14px;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--moss);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  line-height: 1.4;
  white-space: pre-wrap;
}

.suggest-meta {
  display: flex;
  margin: -6px 0 14px 17px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.polish-pill {
  display: inline-flex;
  height: 22px;
  padding: 0 8px;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
}

.polish-pill .icon {
  width: 11px;
  height: 11px;
}

.match-card {
  display: grid;
  margin-bottom: 12px;
  padding: 14px;
  align-items: center;
  gap: 4px 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.match-card.is-best {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.match-card .note-emoji {
  grid-row: span 3;
  font-size: 26px;
}

.match-label {
  color: var(--ink-4);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.match-card strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-reason {
  color: var(--ink-3);
  font-size: 12px;
}

.match-card .btn {
  grid-column: 3;
  grid-row: 1 / span 3;
}

.confidence {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
}

.confidence-track {
  width: 110px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.confidence-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--moss), var(--accent-text));
  transition: width 900ms var(--ease) 200ms;
}

.suggest-row {
  display: flex;
  margin-bottom: 10px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.suggest-row .select-pill select {
  max-width: 220px;
}

.inline-input {
  min-width: 0;
  height: 32px;
  flex: 1 1 180px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  outline: 0;
  background: var(--surface);
  font-size: 12.5px;
  transition: border-color var(--fast) ease, box-shadow var(--mid) ease;
}

.inline-input:focus {
  border-color: var(--moss);
  box-shadow: var(--ring);
}

.suggest-todos {
  margin: 4px 0 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--amber-soft);
}

.suggest-todos p {
  display: flex;
  margin: 0 0 8px;
  align-items: center;
  gap: 7px;
  color: var(--amber);
  font-size: 11.5px;
  font-weight: 650;
}

.suggest-todos ul {
  display: grid;
  margin: 0 0 10px;
  padding: 0;
  gap: 4px;
  list-style: none;
}

.suggest-todos li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
}

.suggest-done {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: scale-in 420ms var(--spring) both;
}

.suggest-done-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--moss);
  color: #fff;
}

.suggest-done-icon .icon {
  stroke-width: 2.6;
}

.suggest-done p {
  flex: 1;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.suggestion-area {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
}

.suggestion-label {
  color: var(--ink-4);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.suggestions {
  display: flex;
  margin-top: 9px;
  flex-wrap: wrap;
  gap: 6px;
}

.composer {
  display: flex;
  min-height: 58px;
  margin: 0 14px;
  padding: 8px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color var(--fast) ease, box-shadow var(--mid) ease;
}

.composer:focus-within {
  border-color: var(--moss);
  box-shadow: var(--ring);
}

.composer input {
  min-width: 0;
  height: 40px;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.composer input::placeholder {
  color: var(--ink-4);
}

.composer-mic,
.composer-send {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color var(--fast) ease, transform var(--fast) var(--ease), box-shadow var(--mid) ease;
}

.composer-mic {
  background: var(--surface-3);
  color: var(--accent-text);
}

.composer-mic:hover {
  background: var(--accent-soft);
}

.composer-mic.is-listening {
  background: var(--coral);
  color: #fff;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.composer-send {
  background: var(--accent);
  color: var(--accent-ink);
}

.composer-send:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px) rotate(-8deg);
}

.composer-send:disabled {
  cursor: wait;
  opacity: 0.5;
}

.composer-hint {
  display: flex;
  margin: 10px 18px 16px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--ink-4);
  font-size: 11px;
}

.composer-hint kbd {
  height: 18px;
  font-size: 10px;
}

.hint-dot {
  padding: 0 2px;
}

.how-steps {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 14px;
  list-style: none;
  counter-reset: step;
}

.how-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-num {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}

.how-steps strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.how-steps span:not(.step-num) {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.5;
}

.notebook-list {
  display: grid;
  max-height: 260px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  gap: 4px;
  list-style: none;
}

.notebook-item {
  display: flex;
  width: 100%;
  padding: 8px 10px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--fast) ease;
}

.notebook-item:hover {
  background: var(--surface-3);
}

.notebook-item span:nth-child(2) {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notebook-item small {
  color: var(--ink-4);
  font-size: 11px;
  white-space: nowrap;
}

.skill-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 11px;
  list-style: none;
}

.skill-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.5;
}

.skill-list .icon {
  margin-top: 2px;
  color: var(--fern);
}

/* ------------------------------------------------------------------ dictation */

.live-stats {
  display: flex;
  margin: 0;
  gap: 8px;
}

.live-stats div {
  min-width: 84px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
}

.live-stats dt {
  color: var(--ink-4);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.live-stats dd {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.studio-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.studio-stage {
  --level: 0;
  position: relative;
  display: grid;
  padding: 24px 20px 20px;
  justify-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 100%, var(--accent-soft), transparent 72%);
}

.wave-canvas {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 96px;
  transform: translateY(-62%);
  pointer-events: none;
}

.record-orb {
  position: relative;
  width: 92px;
  height: 92px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.record-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 130, 105, 0.35), transparent 68%);
  opacity: 0;
  transform: scale(calc(1 + var(--level) * 0.7));
  transition: opacity 300ms ease, transform 90ms linear;
}

.record-core {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #5d8466, #304b39 58%, #1f3326);
  color: #e9f0c4;
  box-shadow: 0 14px 28px -12px rgba(38, 61, 46, 0.75), 0 0 0 6px var(--surface), 0 0 0 7px var(--line);
  transition: background 300ms ease, transform var(--mid) var(--spring), box-shadow var(--mid) ease;
}

.record-orb:hover .record-core {
  transform: scale(1.05);
}

.record-core .icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.8;
}

.rec-icon-stop {
  display: none;
}

.studio-stage.is-recording .record-halo {
  opacity: 1;
}

.studio-stage.is-recording .record-core {
  background: radial-gradient(circle at 34% 28%, #f0a88f, #d18269 58%, #a95a42);
  color: #fff;
  box-shadow: 0 14px 28px -12px rgba(169, 90, 66, 0.75), 0 0 0 6px var(--surface), 0 0 0 7px var(--coral-soft);
}

.studio-stage.is-recording .rec-icon-mic {
  display: none;
}

.studio-stage.is-recording .rec-icon-stop {
  display: block;
  fill: currentColor;
}

.studio-status {
  position: relative;
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.editor {
  padding: 20px 22px 10px;
}

.editor.is-polishing .editor-body {
  border-radius: 12px;
  background: linear-gradient(100deg, transparent 30%, var(--accent-soft) 50%, transparent 70%) 0 0 / 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

.title-input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2;
}

.title-input::placeholder {
  color: var(--ink-4);
}

.title-input.is-suggested {
  animation: highlight 1.4s ease;
}

.tag-row {
  display: flex;
  min-height: 24px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row > * {
  animation: scale-in 320ms var(--spring) both;
}

.editor-body {
  position: relative;
}

.editor textarea {
  display: block;
  width: 100%;
  min-height: 190px;
  padding: 4px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.8;
  resize: vertical;
}

.editor textarea::placeholder {
  color: var(--ink-4);
}

.interim {
  min-height: 0;
  margin: 0;
  color: var(--ink-4);
  font-size: 15px;
  font-style: italic;
  line-height: 1.8;
}

.interim:not(:empty)::after {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  background: var(--coral);
  content: "";
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}

.polish-bar {
  display: flex;
  margin: 10px 0;
  padding: 10px 12px;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  background: var(--accent-soft);
  animation: rise 420ms var(--ease) both;
}

.polish-badge {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
}

.polish-copy {
  display: grid;
  min-width: 0;
  flex: 1;
}

.polish-copy strong {
  font-size: 13px;
  font-weight: 650;
}

.polish-copy small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diff-view {
  margin: 0 0 10px;
  padding: 14px 16px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
  animation: rise 420ms var(--ease) both;
}

.diff-view ins {
  padding: 1px 3px;
  border-radius: 5px;
  background: var(--citron);
  color: var(--ink);
  text-decoration: none;
}

.diff-view del {
  color: var(--coral-text);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  opacity: 0.75;
}

.studio-actions {
  display: flex;
  padding: 14px 22px 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.studio-actions-left,
.studio-actions-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.select-destination select {
  max-width: 220px;
}

.ai-suggestion {
  display: flex;
  margin: 0 22px 20px;
  padding: 12px 14px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--accent-soft);
  border-radius: 16px;
  background: linear-gradient(120deg, var(--accent-soft), var(--surface));
  animation: rise 420ms var(--ease) both;
}

.ai-suggestion-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--surface);
  color: var(--coral);
  box-shadow: var(--shadow-xs);
}

.ai-suggestion p {
  flex: 1;
  margin: 0;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.5;
}

.todo-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 6px;
  list-style: none;
}

.todo-item {
  display: flex;
  padding: 10px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  animation: rise 360ms var(--ease) both;
  transition: opacity var(--mid) ease;
}

.todo-item.is-off {
  opacity: 0.5;
}

.todo-item > div {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.todo-item strong {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.todo-item .due-chip {
  justify-self: start;
}

.notify-status {
  margin-top: 12px;
}

.notify-status:empty {
  display: none;
}

.permission-note {
  display: flex;
  padding: 10px 12px;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.45;
}

.permission-note .icon {
  color: var(--moss);
}

.permission-note.is-warning .icon {
  color: var(--amber);
}

.permission-note p {
  flex: 1;
  margin: 0;
}

.command-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 9px;
  list-style: none;
}

.command-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-2);
  font-size: 12.5px;
}

/* ------------------------------------------------------------------ notes */

.notes-toolbar {
  display: flex;
  margin-bottom: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.notes-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  width: 240px;
  height: 36px;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-4);
  transition: border-color var(--fast) ease, box-shadow var(--mid) ease, width var(--mid) var(--ease);
}

.search-box:focus-within {
  width: 280px;
  border-color: var(--moss);
  box-shadow: var(--ring);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.notes-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.note-card {
  position: relative;
  display: flex;
  min-height: 200px;
  padding: 18px;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) ease, border-color var(--mid) ease;
}

.note-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: hsl(var(--hue, 80) 45% 58%);
  content: "";
  opacity: 0.8;
}

.note-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}

.note-card:focus-visible {
  outline-offset: 2px;
}

.note-card.is-pinned {
  border-color: var(--moss);
}

.note-card.is-new {
  animation: rise 460ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.note-card.is-removing {
  animation: card-out 300ms var(--ease) forwards;
  pointer-events: none;
}

.note-card.is-flash {
  animation: highlight 1.6s ease;
}

.note-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-card-top time {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--ink-4);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-card h3 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.note-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  white-space: pre-line;
}

.note-card mark {
  border-radius: 3px;
  background: var(--citron);
  color: var(--ink);
}

.note-card-foot {
  display: flex;
  margin-top: auto;
  padding-top: 8px;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  color: var(--ink-4);
  font-size: 11px;
}

.note-card-foot > span {
  flex: 1;
}

.note-card-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--fast) ease, transform var(--mid) var(--ease);
}

.note-card:hover .note-card-actions,
.note-card:focus-within .note-card-actions,
.note-card.is-pinned .note-pin-btn {
  opacity: 1;
  transform: none;
}

.note-card.is-pinned .note-card-actions {
  opacity: 1;
  transform: none;
}

.note-pin-btn[aria-pressed="true"] .icon {
  fill: currentColor;
}

.search-empty {
  grid-column: 1 / -1;
  padding: 40px 10px;
  color: var(--ink-3);
  text-align: center;
}

/* ------------------------------------------------------------------ tasks */

.progress-card {
  display: flex;
  flex: 0 0 auto;
  padding: 14px 20px 14px 14px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.progress-ring {
  width: 72px;
  height: 72px;
  transform: rotate(-90deg);
}

.ring-value {
  stroke: var(--moss);
  stroke-linecap: round;
  stroke-dasharray: 213.6;
  stroke-dashoffset: 213.6;
  transition: stroke-dashoffset 1s var(--ease);
}

.progress-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}

.progress-card small {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 12px;
}

.notify-banner {
  display: flex;
  margin-bottom: 16px;
  padding: 14px 16px;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(120deg, var(--amber-soft), var(--surface));
  animation: rise 420ms var(--ease) both;
}

.notify-banner-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--surface);
  color: var(--amber);
  box-shadow: var(--shadow-xs);
}

.notify-banner-icon .icon {
  animation: ring-bell 3s ease-in-out infinite;
  transform-origin: 50% 10%;
}

@keyframes ring-bell {
  0%, 80%, 100% { transform: rotate(0); }
  84% { transform: rotate(14deg); }
  88% { transform: rotate(-12deg); }
  92% { transform: rotate(8deg); }
  96% { transform: rotate(-4deg); }
}

.notify-banner p {
  min-width: 200px;
  flex: 1;
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.notify-banner-actions {
  display: flex;
  gap: 8px;
}

.task-composer {
  display: flex;
  margin-bottom: 16px;
  padding: 8px 8px 8px 14px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--fast) ease, box-shadow var(--mid) ease;
}

.task-composer:focus-within {
  border-color: var(--moss);
  box-shadow: var(--ring);
}

.task-composer-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.task-composer input {
  min-width: 0;
  height: 40px;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.task-composer input::placeholder {
  color: var(--ink-4);
}

#task-mic.is-listening {
  background: var(--coral);
  color: #fff;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.tasks-view .segmented {
  margin-bottom: 16px;
}

.task-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.task-item {
  display: grid;
  padding: 12px 12px 12px 14px;
  align-items: center;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color var(--fast) ease, box-shadow var(--mid) ease, transform var(--mid) var(--ease),
    opacity var(--mid) ease;
}

.task-item:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}

.task-item.is-new {
  animation: rise 400ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}

.task-item.is-leaving {
  animation: item-out 360ms var(--ease) forwards;
}

.task-item.is-flash {
  animation: highlight 1.8s ease;
}

.task-body {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.task-text {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  background: linear-gradient(currentColor, currentColor) 0 55% / 0 1.5px no-repeat;
  transition: background-size 420ms var(--ease), color var(--mid) ease;
}

.task-item.is-done .task-text {
  color: var(--ink-4);
  background-size: 100% 1.5px;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.task-source {
  display: inline-flex;
  padding: 0;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  color: var(--ink-4);
  font-size: 11px;
  cursor: pointer;
}

.task-source:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.task-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--fast) ease;
}

.task-item:hover .task-actions,
.task-item:focus-within .task-actions {
  opacity: 1;
}

/* ------------------------------------------------------------------ account */

.account-grid {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: 340px minmax(0, 1fr);
}

.activity-panel {
  grid-column: 1 / -1;
}

.profile-hero {
  display: flex;
  margin-bottom: 20px;
  align-items: center;
  gap: 16px;
}

.profile-hero div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.profile-hero strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.profile-hero small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 12.5px;
  text-overflow: ellipsis;
}

.fact-grid {
  display: grid;
  margin: 0 0 18px;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.fact-grid div {
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-2);
}

.fact-grid dt {
  color: var(--ink-4);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-grid dd {
  margin: 5px 0 0;
  font-size: 13.5px;
  font-weight: 600;
}

.pref-row {
  display: flex;
  padding: 13px 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.pref-row:last-child {
  border-bottom: 0;
}

.pref-row strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.pref-row small {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 12px;
}

.activity-list {
  position: relative;
  display: grid;
  margin: 0;
  padding: 0;
  gap: 2px;
  list-style: none;
}

.activity-item {
  position: relative;
  display: grid;
  padding: 10px 8px;
  align-items: center;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  border-radius: 12px;
  animation: rise 380ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 30ms);
  transition: background-color var(--fast) ease;
}

.activity-item:hover {
  background: var(--surface-2);
}

.activity-item:not(:last-child)::after {
  position: absolute;
  top: 44px;
  bottom: -12px;
  left: 25px;
  width: 1.5px;
  background: var(--line);
  content: "";
}

.activity-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.activity-item.is-failed .activity-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.activity-item.is-logout .activity-icon {
  background: var(--surface-3);
  color: var(--ink-3);
}

.activity-item.is-register .activity-icon {
  background: var(--coral-soft);
  color: var(--coral-text);
}

.activity-item strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.activity-item small {
  color: var(--ink-3);
  font-size: 12px;
}

.activity-item time {
  color: var(--ink-3);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.activity-current {
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}

/* ------------------------------------------------------------------ dialogs */

.modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 23, 19, 0.46);
  opacity: 0;
  backdrop-filter: blur(5px);
  transition: opacity 240ms ease;
}

.modal.is-open .modal-backdrop {
  opacity: 1;
}

.modal-dialog {
  position: relative;
  width: min(660px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 240ms var(--ease), transform 340ms var(--spring);
}

.modal.is-open .modal-dialog {
  opacity: 1;
  transform: none;
}

.note-dialog {
  display: flex;
  padding: 22px 24px 18px;
  flex-direction: column;
  gap: 12px;
}

.note-dialog-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.note-emoji {
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
}

.note-title-input {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.note-meta {
  margin: -4px 0 0;
  color: var(--ink-4);
  font-size: 11.5px;
}

.note-textarea {
  width: 100%;
  min-height: 240px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.8;
  resize: vertical;
  transition: border-color var(--fast) ease, box-shadow var(--mid) ease;
}

.note-textarea:focus {
  border-color: var(--moss);
  box-shadow: var(--ring);
}

.note-dialog-tags {
  display: flex;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-4);
}

.note-dialog-tags input {
  min-width: 0;
  height: 38px;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.note-linked:empty {
  display: none;
}

.note-linked p {
  margin: 0 0 6px;
  color: var(--ink-4);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
}

.note-linked ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 4px;
  list-style: none;
}

.note-linked li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.note-polish-status {
  margin: 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12.5px;
  animation: rise 360ms var(--ease) both;
}

.note-dialog-foot {
  display: flex;
  padding-top: 6px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.foot-left,
.foot-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.palette {
  align-items: start;
  padding-top: min(14vh, 120px);
}

.palette-dialog {
  width: min(620px, 100%);
  overflow: hidden;
}

.palette-search {
  display: flex;
  padding: 0 18px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-4);
}

.palette-search .icon {
  width: 18px;
  height: 18px;
}

.palette-search input {
  min-width: 0;
  height: 60px;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.palette-list {
  max-height: min(420px, 55vh);
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
}

.palette-group {
  margin: 10px 10px 4px;
  color: var(--ink-4);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.palette-item {
  display: flex;
  min-height: 44px;
  padding: 8px 12px;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color 90ms ease;
}

.palette-item.is-selected {
  background: var(--accent-soft);
  color: var(--ink);
}

.palette-item-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--ink-3);
  font-size: 15px;
}

.palette-item.is-selected .palette-item-icon {
  background: var(--surface);
  color: var(--accent-text);
}

.palette-item-text {
  display: grid;
  min-width: 0;
  flex: 1;
}

.palette-item-text span,
.palette-item-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-item-text small {
  color: var(--ink-4);
  font-size: 11.5px;
}

.palette-item mark {
  border-radius: 3px;
  background: var(--citron);
  color: var(--ink);
}

.palette-item-hint {
  color: var(--ink-4);
  font-size: 11px;
}

.palette-empty {
  padding: 30px 10px;
  color: var(--ink-4);
  font-size: 13px;
  text-align: center;
}

.palette-foot {
  display: flex;
  padding: 10px 16px;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-4);
  font-size: 11px;
}

.palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.confirm-dialog {
  width: min(400px, 100%);
  padding: 28px 26px 22px;
  text-align: center;
}

.confirm-icon {
  display: inline-grid;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-icon .icon {
  width: 24px;
  height: 24px;
}

.confirm-dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.confirm-dialog p {
  margin: 8px 0 22px;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.6;
}

.confirm-dialog footer {
  display: flex;
  gap: 10px;
}

.confirm-dialog footer .btn {
  flex: 1;
}

.shortcuts-dialog {
  width: min(460px, 100%);
  padding: 22px 24px 24px;
}

.dialog-head {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  justify-content: space-between;
}

.dialog-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.shortcut-list {
  display: grid;
  margin: 0;
  gap: 2px;
}

.shortcut-list div {
  display: flex;
  padding: 9px 4px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.shortcut-list div:last-child {
  border-bottom: 0;
}

.shortcut-list dt {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-3);
  font-size: 12px;
}

.shortcut-list dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
}

/* ------------------------------------------------------------------ toasts, ripple, confetti */

.toast-stack {
  position: fixed;
  z-index: 120;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: min(380px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.toast {
  position: relative;
  display: grid;
  padding: 14px 12px 16px 14px;
  align-items: start;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 16px;
  background: var(--toast-bg);
  box-shadow: var(--shadow-lg);
  color: var(--toast-ink);
  pointer-events: auto;
  animation: toast-in 380ms var(--spring) both;
}

.toast.is-leaving {
  animation: toast-out 320ms var(--ease) forwards;
}

.toast-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: rgba(136, 163, 106, 0.25);
  color: var(--moss);
}

.toast.is-error .toast-icon {
  background: rgba(209, 130, 105, 0.22);
  color: var(--coral);
}

.toast.is-reminder {
  background: linear-gradient(140deg, #3b5c45, #223628);
  color: #fffefa;
}

.toast.is-reminder .toast-icon {
  background: #e6edbe;
  color: #223628;
  animation: ring-bell 2s ease-in-out infinite;
}

.toast-body {
  min-width: 0;
  padding-top: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.toast-body strong {
  display: block;
  margin-bottom: 1px;
  font-weight: 650;
}

.toast-actions {
  display: flex;
  margin-top: 10px;
  gap: 6px;
}

.toast-action {
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity var(--fast) ease, background-color var(--fast) ease;
}

.toast-action:hover {
  opacity: 1;
  background: rgba(127, 127, 127, 0.15);
}

.toast-close {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.55;
}

.toast-close:hover {
  opacity: 1;
}

.toast-close .icon {
  width: 13px;
  height: 13px;
}

.toast-timer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--moss);
  opacity: 0.8;
  transform-origin: left;
  animation: toast-timer linear forwards;
}

.toast.is-error .toast-timer {
  background: var(--coral);
}

.toast:hover .toast-timer {
  animation-play-state: paused;
}

.ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.22;
  pointer-events: none;
  transform: scale(0);
  animation: ripple 620ms var(--ease) forwards;
}

.confetti-layer {
  position: fixed;
  z-index: 150;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 13px;
  border-radius: 2px;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* ------------------------------------------------------------------ mobile tab bar */

.tabbar {
  display: none;
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1240px) {
  .panel-rhythm {
    grid-column: span 7;
  }

  .panel-topics {
    grid-column: span 5;
  }

  .panel-tip {
    grid-column: span 12;
  }

  .split-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

@media (max-width: 1100px) {
  :root {
    --sidebar: 78px;
  }

  .sidebar {
    padding: 22px 12px 16px;
    align-items: center;
  }

  .sidebar > .brand {
    margin: 0 0 30px;
  }

  .sidebar .brand-name,
  .side-label,
  .streak-card div,
  .privacy-note,
  .profile-copy,
  .nav-link kbd,
  .nav-badge {
    display: none;
  }

  .side-nav {
    width: 100%;
  }

  .nav-link {
    justify-content: center;
    padding: 0;
  }

  .nav-link > span:not(.nav-rec) {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .nav-link .nav-rec {
    position: absolute;
    top: 9px;
    right: 14px;
  }

  .nav-indicator::before {
    display: none;
  }

  .streak-card {
    padding: 6px;
    border: 0;
    background: none;
  }

  .profile {
    flex-direction: column;
    padding-inline: 0;
  }

  .split-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .split-aside {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .account-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    display: none;
  }

  .brand-compact {
    display: inline-flex;
  }

  .brand-compact .brand-symbol {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .topbar {
    height: 58px;
    padding: 0 16px;
    gap: 10px;
  }

  .breadcrumb > span,
  .breadcrumb > .icon {
    display: none;
  }

  .search-trigger {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .search-trigger span,
  .search-trigger kbd {
    display: none;
  }

  .engine-badge {
    display: none;
  }

  .view {
    padding: 28px 18px 120px;
  }

  .tabbar {
    position: fixed;
    z-index: 60;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    display: grid;
    height: 64px;
    padding: 0 6px;
    align-items: center;
    grid-template-columns: repeat(5, 1fr);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
  }

  .tab {
    display: flex;
    height: 52px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--ink-4);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--fast) ease, background-color var(--fast) ease;
  }

  .tab .icon {
    width: 19px;
    height: 19px;
    transition: transform var(--mid) var(--spring);
  }

  .tab.is-active {
    color: var(--accent-text);
  }

  .tab.is-active .icon {
    transform: translateY(-2px) scale(1.1);
  }

  .tab-primary-core {
    display: grid;
    width: 46px;
    height: 46px;
    margin-top: -26px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #3b5c45, #223628);
    color: #e6edbe;
    box-shadow: 0 10px 20px -8px rgba(34, 54, 40, 0.7), 0 0 0 5px var(--bg);
    transition: transform var(--mid) var(--spring);
  }

  .tab-primary.is-active .tab-primary-core,
  .tab-primary.is-recording .tab-primary-core {
    background: linear-gradient(145deg, #e39a80, #b9634a);
    color: #fff;
    transform: scale(1.06);
  }

  .tab-primary .icon {
    transform: none !important;
  }

  .toast-stack {
    right: 16px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    left: 16px;
    width: auto;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-tasks,
  .panel-notes,
  .panel-rhythm,
  .panel-topics {
    grid-column: span 12;
  }
}

@media (max-width: 900px) {
  .auth-screen {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-art {
    min-height: auto;
    padding: 28px 24px 30px;
  }

  .auth-orb,
  .auth-floaters,
  .auth-features,
  .auth-foot {
    display: none;
  }

  .auth-copy {
    margin-top: 26px;
  }

  .auth-copy h2 {
    margin: 14px 0 0;
    font-size: 40px;
  }
}

@media (max-width: 720px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .hero-clock {
    width: 124px;
    height: 124px;
    justify-self: start;
  }

  .clock-face strong {
    font-size: 32px;
  }

  .hero-clock small {
    display: none;
  }

  .launch-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .launch-card {
    min-height: 200px;
  }

  .page-head.is-row {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head-actions .btn {
    flex: 1;
  }

  .live-stats div {
    min-width: 0;
    flex: 1;
  }

  .display {
    font-size: clamp(40px, 11vw, 56px);
  }

  .notes-toolbar-right {
    width: 100%;
  }

  .search-box,
  .search-box:focus-within {
    width: auto;
    flex: 1;
  }

  .notes-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-card-actions,
  .task-actions {
    opacity: 1;
    transform: none;
  }

  .chat-card {
    margin-left: 0;
  }

  .match-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .match-card .btn {
    grid-column: 1 / -1;
    grid-row: auto;
    margin-top: 8px;
  }

  .segmented:not(.is-small) {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .studio-actions,
  .studio-actions-right {
    align-items: stretch;
  }

  .studio-actions-right {
    width: 100%;
  }

  .studio-actions-right .select-pill {
    flex: 1;
  }

  .studio-actions-right .select-pill select {
    width: 100%;
    max-width: none;
  }

  .pref-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .activity-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .activity-item time {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .stat-value {
    font-size: 36px;
  }

  .chat-toolbar .switch span:last-child {
    display: none;
  }

  .composer {
    margin: 0 10px;
  }

  .confirm-dialog footer {
    flex-direction: column-reverse;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
