:root {
  --bg: #07080d;
  --bg-2: #0c0e16;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --surface-solid: #11131c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eef0f7;
  --muted: #9097ad;
  --faint: #5c6278;
  --violet: #8b6cff;
  --cyan: #2fd6f0;
  --pink: #ff5fa2;
  --amber: #ffb347;
  --red: #ff5c6c;
  --green: #3ddc97;
  --grad: linear-gradient(120deg, var(--violet), var(--cyan));
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body { min-height: 100dvh; overflow-x: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--cyan); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: .85em; }
.err { color: var(--red); min-height: 1.2em; font-size: 13px; }

/* ---------- background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 800px at 80% -10%, #151a33 0%, transparent 60%), var(--bg); }
.bg-glow { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .22; animation: drift 28s ease-in-out infinite alternate; }
.bg-glow.a { background: var(--violet); top: -25vmax; left: -15vmax; }
.bg-glow.b { background: var(--cyan); bottom: -30vmax; right: -20vmax; opacity: .13; animation-duration: 34s; }
.bg-grain { position: absolute; inset: 0; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.1); } }

/* ---------- orb ---------- */
.orb { --level: 0; position: relative; border-radius: 50%; isolation: isolate; transform: scale(calc(1 + var(--level) * .35)); transition: transform .12s linear; }
.orb i { position: absolute; inset: 0; border-radius: 50%; mix-blend-mode: screen; }
.orb i:nth-child(1) { background: conic-gradient(from 0deg, var(--violet), var(--cyan), var(--pink), var(--violet)); filter: blur(6px); animation: spin 9s linear infinite; }
.orb i:nth-child(2) { inset: 12%; background: radial-gradient(circle at 30% 30%, #fff 0%, rgba(255,255,255,.35) 18%, transparent 55%), radial-gradient(circle at 70% 75%, var(--cyan), transparent 60%); animation: spin 6s linear infinite reverse; opacity: .9; }
.orb i:nth-child(3) { inset: -18%; background: radial-gradient(circle, rgba(139,108,255,.45), transparent 62%); filter: blur(10px); animation: breathe 4s ease-in-out infinite; z-index: -1; }
.orb.idle i:nth-child(1) { animation-duration: 14s; }
.orb.listening i:nth-child(1) { animation-duration: 3s; }
.orb.listening i:nth-child(3) { background: radial-gradient(circle, rgba(47,214,240,.6), transparent 62%); animation-duration: 1.2s; }
.orb.thinking i:nth-child(1) { animation-duration: 1.4s; filter: blur(4px) hue-rotate(40deg); }
.orb.thinking i:nth-child(2) { animation-duration: 1s; }
.orb.speaking i:nth-child(3) { animation: breathe .6s ease-in-out infinite; background: radial-gradient(circle, rgba(255,95,162,.5), transparent 62%); }
.orb-sm { width: 64px; height: 64px; margin: 0 auto 18px; }
.orb-dock { width: 50px; height: 50px; }
.orb-xl { width: min(46vw, 210px); height: min(46vw, 210px); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(.92); opacity: .7; } 50% { transform: scale(1.08); opacity: 1; } }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(380px, 100%); text-align: center; padding: 36px 26px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(24px); animation: rise .6s var(--ease) both; }
.login-card h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.login-card form { display: grid; gap: 10px; margin-top: 24px; }

/* ---------- layout ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--safe-t)) 16px 10px; backdrop-filter: blur(18px) saturate(1.4); background: linear-gradient(to bottom, rgba(7,8,13,.85), rgba(7,8,13,.55)); border-bottom: 1px solid transparent; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.01em; cursor: pointer; }
.brand-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 18px var(--violet); }
.topbar-right { display: flex; align-items: center; gap: 4px; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.spin svg { animation: spin 1s linear infinite; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-right: 4px; }
.sync-dot.ok { background: var(--green); box-shadow: 0 0 10px var(--green); }
.sync-dot.err { background: var(--red); }
.sync-dot.busy { background: var(--amber); animation: breathe 1s infinite; }

.view { max-width: 1180px; margin: 0 auto; padding: 8px 16px calc(120px + var(--safe-b)); outline: none; }
.view > * { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.stagger > * { animation: rise .55s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .04s } .stagger > *:nth-child(3) { animation-delay: .08s } .stagger > *:nth-child(4) { animation-delay: .12s }
.stagger > *:nth-child(5) { animation-delay: .16s } .stagger > *:nth-child(6) { animation-delay: .2s } .stagger > *:nth-child(n+7) { animation-delay: .24s }

.grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid.home { grid-template-columns: 1.35fr 1fr; align-items: start; } .grid.two { grid-template-columns: 1fr 1fr; } }
.col { display: grid; gap: 16px; align-content: start; min-width: 0; }

.hello { padding: 14px 2px 6px; }
.hello h1 { margin: 0; font-size: clamp(26px, 6vw, 36px); letter-spacing: -.03em; font-weight: 700; }
.hello h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.sheet-body > .chips:first-child { margin-top: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.chip.warn { color: var(--amber); border-color: rgba(255,179,71,.3); background: rgba(255,179,71,.08); }
.chip.hot { color: var(--pink); border-color: rgba(255,95,162,.3); background: rgba(255,95,162,.08); }
.chip.ok { color: var(--green); border-color: rgba(61,220,151,.3); background: rgba(61,220,151,.07); }
.chip.demo { color: var(--cyan); border-color: rgba(47,214,240,.35); }
button.chip { cursor: pointer; }
button.chip:hover { color: var(--text); border-color: var(--line-2); }

/* ---------- cards ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; backdrop-filter: blur(20px); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h2 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-h h2 .count { color: var(--text); background: var(--surface-2); border-radius: 999px; padding: 0 8px; font-size: 12px; letter-spacing: 0; }
.card.brief { background: linear-gradient(160deg, rgba(139,108,255,.14), rgba(47,214,240,.05) 60%), var(--surface); border-color: rgba(139,108,255,.25); overflow: hidden; }
.card.brief::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(120deg, rgba(139,108,255,.6), transparent 40%, rgba(47,214,240,.4)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.brief-headline { font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; margin: 0 0 12px; }
.focus-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.focus-list li { display: flex; gap: 10px; align-items: flex-start; }
.focus-list li::before { content: ""; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--grad); flex: none; }
.empty { text-align: center; padding: 22px 10px; color: var(--muted); }
.empty svg { width: 28px; height: 28px; color: var(--faint); margin-bottom: 6px; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); margin-top: 12px; }

/* ---------- rows ---------- */
.list { display: grid; gap: 8px; }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,.025); border: 1px solid transparent; transition: background .2s, border-color .2s, transform .25s var(--spring); cursor: pointer; min-width: 0; text-align: left; width: 100%; color: inherit; }
.row:hover { background: var(--surface-2); border-color: var(--line); }
.row:active { transform: scale(.985); }
.row-main { flex: 1; min-width: 0; }
.row-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.row-top .chip { padding: 1px 8px; font-size: 11.5px; }
.row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.ch { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; flex: none; background: var(--surface-2); }
.ch svg { width: 17px; height: 17px; }
.ch.email { color: #ff8b6b; background: rgba(255,139,107,.1); }
.ch.slack { color: #c58bff; background: rgba(197,139,255,.1); }
.ch.whatsapp { color: #4be38d; background: rgba(75,227,141,.1); }
.ch.loom { color: #8b9bff; background: rgba(139,155,255,.12); }
.ch.call { color: var(--cyan); background: rgba(47,214,240,.1); }
.ch.chase { color: var(--amber); background: rgba(255,179,71,.1); }
.client-tag { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.client-tag.t1 { color: #d9ccff; background: rgba(139,108,255,.2); }
.client-tag.t2 { color: #bdefff; background: rgba(47,214,240,.12); }
.wait { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.wait.warm { color: var(--amber); } .wait.hot { color: var(--red); }
.heat { height: 3px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.heat > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--amber), var(--red)); transform-origin: left; animation: grow 1s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.urg { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.urg.u3 { background: var(--red); box-shadow: 0 0 10px var(--red); animation: breathe 1.4s infinite; } .urg.u2 { background: var(--amber); } .urg.u1 { background: var(--cyan); } .urg.u0 { background: var(--faint); }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 600; font-size: 14px; transition: transform .2s var(--spring), background .2s, border-color .2s, opacity .2s; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.11); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { border: 0; background: var(--grad); color: #0a0b12; box-shadow: 0 6px 24px -8px rgba(139,108,255,.8); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--surface); }
.btn.danger { color: var(--red); border-color: rgba(255,92,108,.35); background: rgba(255,92,108,.08); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.btn.think { background: linear-gradient(120deg, rgba(139,108,255,.25), rgba(255,95,162,.18)); border-color: rgba(139,108,255,.4); }
.btn .spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input:not([type]), textarea, select {
  width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0,0,0,.25); outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { border-color: rgba(139,108,255,.7); box-shadow: 0 0 0 4px rgba(139,108,255,.15); }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.inline { display: flex; gap: 8px; align-items: center; }
.inline > input { flex: 1; min-width: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; transition: background .2s, color .2s; }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 10px 0 14px; }
.page-title { margin: 12px 2px 4px; font-size: 26px; letter-spacing: -.02em; }

/* ---------- dock ---------- */
.dock { position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 26px; background: rgba(17,19,28,.72); border: 1px solid var(--line-2); backdrop-filter: blur(24px) saturate(1.5); box-shadow: 0 20px 50px -20px rgba(0,0,0,.9); width: min(440px, calc(100% - 24px)); justify-content: space-between; }
.dock-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; border: 0; background: transparent; color: var(--faint); padding: 7px 4px; border-radius: 18px; font-size: 11px; font-weight: 600; transition: color .2s, background .2s; }
.dock-btn.on { color: var(--text); }
.dock-btn.on svg { color: var(--cyan); filter: drop-shadow(0 0 8px rgba(47,214,240,.6)); }
.dock-orb { border: 0; background: transparent; padding: 0 6px; margin-top: -26px; transition: transform .3s var(--spring); }
.dock-orb:active { transform: scale(.9); }
.dock-orb .orb { box-shadow: 0 10px 30px -6px rgba(139,108,255,.9); }
.badge { position: absolute; top: 2px; right: calc(50% - 20px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10.5px; display: grid; place-items: center; font-style: normal; }

/* ---------- sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(3,4,8,.6); backdrop-filter: blur(6px); animation: fade .25s both; }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 92dvh; display: flex; flex-direction: column; background: var(--surface-solid); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 24px 24px 0 0; animation: slideup .42s var(--ease) both; }
@media (min-width: 900px) { .sheet { left: auto; top: 0; bottom: 0; width: min(620px, 100%); max-height: none; border-radius: 24px 0 0 24px; border-bottom: 1px solid var(--line-2); animation-name: slidein; } }
.sheet.closing { animation: slidedown .28s ease-in both; }
@media (min-width: 900px) { .sheet.closing { animation-name: slideout; } }
.sheet-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.sheet-h h3 { margin: 0; flex: 1; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 8px auto 0; }
@media (min-width: 900px) { .sheet-grip { display: none; } }
.sheet-body { overflow-y: auto; padding: 16px; display: grid; gap: 14px; padding-bottom: calc(24px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
@keyframes fade { from { opacity: 0; } }
@keyframes slideup { from { transform: translateY(100%); } }
@keyframes slidedown { to { transform: translateY(100%); } }
@keyframes slidein { from { transform: translateX(100%); } }
@keyframes slideout { to { transform: translateX(100%); } }

/* ---------- conversation ---------- */
.msgs { display: grid; gap: 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; background: var(--surface-2); white-space: pre-wrap; word-break: break-word; font-size: 14.5px; animation: pop .35s var(--spring) both; }
.msg.out { justify-self: end; background: linear-gradient(135deg, rgba(139,108,255,.35), rgba(47,214,240,.22)); border-bottom-right-radius: 6px; }
.msg.in { border-bottom-left-radius: 6px; }
.msg-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; }
.msg.out .msg-meta { color: rgba(255,255,255,.65); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.composer { display: grid; gap: 10px; padding: 14px; border-radius: var(--radius); background: rgba(139,108,255,.07); border: 1px solid rgba(139,108,255,.25); }
.composer textarea { min-height: 160px; background: rgba(0,0,0,.3); }
.note { font-size: 13px; color: var(--amber); display: flex; gap: 6px; }
.review { font-size: 12.5px; color: var(--muted); }
.review b { color: var(--green); font-weight: 600; }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); justify-self: start; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s } .typing i:nth-child(3) { animation-delay: .3s }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ---------- timeline ---------- */
.timeline { position: relative; display: grid; gap: 6px; }
.tl-item { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: stretch; }
.tl-time { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 10px; text-align: right; }
.tl-block { padding: 9px 12px; border-radius: 12px; border-left: 3px solid var(--violet); background: var(--surface-2); min-width: 0; }
.tl-block.routine { border-left-color: var(--green); background: rgba(61,220,151,.06); }
.tl-block.free { border-left-color: transparent; border: 1px dashed var(--line-2); background: transparent; color: var(--muted); }
.tl-block.proposal { border-left-color: var(--cyan); background: rgba(47,214,240,.07); border-style: dashed; }
.tl-block.now { box-shadow: 0 0 0 1px rgba(47,214,240,.4); }
.tl-block .t { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.tl-block .s { font-size: 12.5px; color: var(--muted); }
.now-line { height: 2px; background: var(--grad); border-radius: 2px; margin: 4px 0 4px 64px; box-shadow: 0 0 12px var(--cyan); position: relative; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); }

/* ---------- clients ---------- */
.score-bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin: 8px 0 6px; }
.score-bar span { display: block; height: 100%; background: var(--grad); border-radius: inherit; animation: grow 1s var(--ease) both; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ---------- talk overlay ---------- */
.talk { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: radial-gradient(900px 700px at 50% 20%, rgba(139,108,255,.22), transparent 60%), rgba(5,6,10,.94); backdrop-filter: blur(24px); animation: fade .3s both; padding: calc(12px + var(--safe-t)) 16px calc(16px + var(--safe-b)); }
.talk-top { display: flex; justify-content: space-between; align-items: center; }
.talk-stage { display: grid; place-items: center; padding: 18px 0 8px; gap: 14px; }
.talk-status { font-size: 14px; color: var(--muted); min-height: 1.4em; text-align: center; }
.talk-live { font-size: 19px; text-align: center; min-height: 1.4em; max-width: 640px; margin: 0 auto; font-weight: 500; letter-spacing: -.01em; }
.talk-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; max-width: 720px; width: 100%; margin: 0 auto; padding: 6px 2px; }
.talk-log .msg { max-width: 92%; }
.talk-log .msg.user { align-self: flex-end; background: linear-gradient(135deg, rgba(139,108,255,.35), rgba(47,214,240,.22)); }
.talk-log .msg.assistant { align-self: flex-start; }
.talk-bar { display: flex; gap: 8px; align-items: flex-end; max-width: 720px; width: 100%; margin: 10px auto 0; }
.talk-bar textarea { min-height: 46px; max-height: 140px; border-radius: 16px; padding: 12px 14px; }
.mic { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--grad); color: #0a0b12; display: grid; place-items: center; box-shadow: 0 8px 26px -8px rgba(139,108,255,.9); transition: transform .2s var(--spring); }
.mic.on { background: var(--red); color: #fff; animation: breathe 1.2s infinite; }
.mic svg { width: 22px; height: 22px; }
.action-card { align-self: stretch; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); animation: pop .4s var(--spring) both; display: grid; gap: 8px; font-size: 14px; }
.action-card .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan); font-weight: 700; }
.suggest-row { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px; max-width: 720px; margin: 0 auto; width: 100%; scrollbar-width: none; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); top: calc(12px + var(--safe-t)); display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { padding: 11px 14px; border-radius: 14px; background: rgba(20,22,32,.95); border: 1px solid var(--line-2); box-shadow: 0 14px 40px -12px #000; animation: pop .35s var(--spring) both; font-size: 14px; pointer-events: auto; }
.toast.err { border-color: rgba(255,92,108,.5); color: #ffc2c8; }
.toast.ok { border-color: rgba(61,220,151,.45); }

/* ---------- settings ---------- */
.set-section { display: grid; gap: 12px; }
.acct { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.acct .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.acct .dot.error { background: var(--red); }
.qr { background: #fff; padding: 10px; border-radius: 14px; width: 220px; height: 220px; margin: 6px auto; display: block; }
table.spend { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.spend th, table.spend td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
table.spend th { color: var(--muted); font-weight: 600; font-size: 12px; }
.table-wrap { overflow-x: auto; }
details.help { font-size: 13.5px; color: var(--muted); }
details.help summary { cursor: pointer; color: var(--text); font-weight: 600; }
details.help ol { padding-left: 20px; }
code { font-family: var(--mono); font-size: 12.5px; background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.routine-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.days button { width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; font-size: 12px; color: var(--muted); }
.days button.on { background: rgba(139,108,255,.3); color: var(--text); border-color: rgba(139,108,255,.6); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; } }
@media (max-width: 420px) { .row { padding: 11px 10px; gap: 10px; } .card { padding: 14px; } }

.topbar .icon-btn.on { color: var(--cyan); background: var(--surface); }
@media (max-width: 380px) { .topbar .icon-btn { width: 34px; } .brand span:last-child { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* ---------- Google-style calendar ---------- */
.gcal { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gcal-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.gcal-bar .icon-btn { width: 32px; height: 32px; font-size: 20px; color: var(--text); }
.gcal-title { font-size: 16px; letter-spacing: -.01em; margin-left: 4px; }
.gcal-head, .gcal-allday { display: grid; border-bottom: 1px solid var(--line); }
.gcal-day { text-align: center; padding: 6px 0 4px; font-size: 11px; color: var(--muted); display: grid; gap: 1px; }
.gcal-day b { font-size: 19px; color: var(--text); font-weight: 600; width: 34px; height: 34px; line-height: 34px; margin: 0 auto; border-radius: 50%; }
.gcal-day.today span { color: var(--cyan); }
.gcal-day.today b { background: var(--grad); color: #0a0b12; }
.gcal-allday > div { min-height: 24px; padding: 2px; display: grid; gap: 2px; align-content: start; border-left: 1px solid var(--line); }
.gcal-allday > div:first-child { border-left: 0; }
.gcal-chip { font-size: 11.5px; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 35%, transparent); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.gcal-scroll { overflow-y: auto; max-height: min(68vh, 720px); -webkit-overflow-scrolling: touch; }
.gcal-grid { display: grid; position: relative; background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 46px); }
.gcal-hours { position: relative; }
.gcal-hours div { position: absolute; right: 6px; transform: translateY(-7px); font-family: var(--mono); font-size: 10px; color: var(--faint); }
.gcal-col { position: relative; border-left: 1px solid var(--line); cursor: copy; }
.gcal-ev { position: absolute; border-radius: 7px; padding: 3px 6px; overflow: hidden; background: color-mix(in srgb, var(--c) 38%, #11131c); border-left: 3px solid var(--c); font-size: 12px; line-height: 1.25; cursor: pointer; box-shadow: 0 2px 10px -4px rgba(0,0,0,.6); transition: transform .15s var(--spring), filter .15s; animation: pop .3s var(--spring) both; }
.gcal-ev:hover { transform: scale(1.02); filter: brightness(1.15); z-index: 3; }
.gcal-ev b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcal-ev span, .gcal-plan span { font-size: 10.5px; opacity: .8; }
.gcal-routine { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(61,220,151,.10) 0 6px, rgba(61,220,151,.04) 6px 12px); border-left: 2px solid rgba(61,220,151,.5); font-size: 10.5px; color: var(--green); padding: 2px 5px; overflow: hidden; pointer-events: none; }
.gcal-plan { position: absolute; left: 3px; right: 3px; border: 1.5px dashed var(--cyan); border-radius: 7px; background: rgba(47,214,240,.08); padding: 3px 6px; font-size: 11.5px; overflow: hidden; pointer-events: none; display: grid; }
.gcal-plan b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcal-now { position: absolute; left: -1px; right: 0; height: 2px; background: var(--red); z-index: 4; box-shadow: 0 0 8px var(--red); pointer-events: none; }
.gcal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

/* ---------- countdowns ---------- */
.countdowns { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.cd { position: relative; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); display: grid; gap: 2px; animation: pop .4s var(--spring) both; overflow: hidden; }
.cd .n { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd .u { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.cd .t { font-size: 13px; font-weight: 600; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cd .e { position: absolute; right: 8px; top: 8px; font-size: 20px; }
.cd.soon { border-color: rgba(255,95,162,.4); background: rgba(255,95,162,.06); }
.cd.today .n { background: linear-gradient(120deg, var(--pink), var(--amber)); -webkit-background-clip: text; background-clip: text; animation: breathe 1.6s infinite; }
.cd .bar { height: 3px; border-radius: 3px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.cd .bar i { display: block; height: 100%; background: var(--grad); animation: grow 1.2s var(--ease) both; transform-origin: left; }

.ch.asana { color: #f4a261; background: rgba(244,162,97,.12); }

/* ---------- daily habits ---------- */
.habit { display: grid; gap: 8px; }
.habit-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); text-align: left; transition: transform .2s var(--spring), background .25s, border-color .25s; }
.habit-btn:active { transform: scale(.97); }
.habit.done .habit-btn { background: rgba(61,220,151,.12); border-color: rgba(61,220,151,.45); }
.habit-emoji { font-size: 26px; transition: transform .4s var(--spring); }
.habit.done .habit-emoji { transform: scale(1.15) rotate(-8deg); }
.habit-main { flex: 1; display: grid; }
.habit-main small { color: var(--muted); font-size: 12.5px; }
.habit-streak { font-weight: 700; font-size: 15px; }
.habit-dots { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.habit-dots i { height: 8px; border-radius: 4px; background: var(--surface-2); }
.habit-dots i.on { background: var(--green); box-shadow: 0 0 6px rgba(61,220,151,.5); }

/* ---------- simple home ---------- */
.focus-stack { display: grid; gap: 14px; max-width: 640px; margin: 8px auto 0; }
.now-card { background: linear-gradient(160deg, rgba(47,214,240,.12), rgba(139,108,255,.06) 60%), var(--surface); border-color: rgba(47,214,240,.3); }
.now-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan); font-weight: 700; }
.now-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 2px; }
.now-then { margin-top: 10px; font-size: 14px; color: var(--muted); }
.now-then b { color: var(--text); font-weight: 600; }
.star-btn { border: 0; background: none; font-size: 18px; line-height: 1; padding: 4px; cursor: pointer; filter: grayscale(1); opacity: .45; transition: transform .2s var(--spring), opacity .2s, filter .2s; flex: none; }
.star-btn.on { filter: none; opacity: 1; transform: scale(1.1); }
