:root { --bg: #08090a; --panel: #111316; --panel2: #171a1e; --line: #23272c; --line2: #323840; --ink: #e9edf1; --ink2: #9aa3ad; --ink3: #687079;
  --blue: #4cc2ff; --blue2: #1a8fd6; --ok: #45d38a; --warn: #ffb547; --bad: #ff6464; --r: 12px; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font: 16px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 14px) 18px 12px;
  background: linear-gradient(var(--bg) 70%, transparent); }
.top b { letter-spacing: .22em; font-size: 15px; }
.state { margin-left: auto; font-size: 13px; color: var(--ink2); }
main { max-width: 640px; margin: 0 auto; padding: 0 16px calc(env(safe-area-inset-bottom) + 90px); }
.tab { display: none; }
.tab.on { display: block; }

.orb { position: relative; display: inline-grid; place-items: center; border-radius: 50%; border: 0; padding: 0;
  background: radial-gradient(circle at 50% 42%, #9fe1ff 0, #3db3f5 22%, #0f5d93 58%, #071a29 100%); }
.orb.sm { width: 14px; height: 14px; box-shadow: 0 0 12px rgba(76, 194, 255, .6); }
.orb.sm.busy { animation: breathe 1.2s ease-in-out infinite; }
.mic-wrap { display: grid; justify-items: center; padding: 22px 0 10px; }
.orb.big { width: 168px; height: 168px; box-shadow: 0 0 60px rgba(76, 194, 255, .35), inset 0 0 30px rgba(0, 0, 0, .4); transition: transform .15s ease; }
.orb.big:active { transform: scale(.96); }
.orb.big svg { width: 54px; height: 54px; fill: #eaf8ff; position: relative; z-index: 2; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.orb .ring { position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(76, 194, 255, .35); opacity: 0; }
.orb.listening { box-shadow: 0 0 90px rgba(76, 194, 255, .7), inset 0 0 30px rgba(0, 0, 0, .3); }
.orb.listening .ring { animation: ripple 1.6s ease-out infinite; }
.orb.listening .ring.r2 { animation-delay: .8s; }
@keyframes ripple { from { opacity: .9; transform: scale(.92); } to { opacity: 0; transform: scale(1.35); } }
@keyframes breathe { 50% { opacity: .35; } }
.hint { color: var(--ink2); margin: 16px 0 0; font-size: 15px; text-align: center; min-height: 22px; }

.compose { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; margin: 14px 0 22px; }
.compose textarea { width: 100%; resize: vertical; min-height: 84px; border: 0; background: transparent; outline: none; padding: 6px; font-size: 16px; }
.row { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.go { border: 0; border-radius: 10px; background: var(--blue); color: #04121c; font-weight: 700; padding: 11px 18px; }
.go:disabled { opacity: .45; }
.ghost { border: 1px solid var(--line2); background: transparent; border-radius: 10px; padding: 10px 14px; color: var(--ink2); }
.ghost.sm, .go.sm { padding: 7px 11px; font-size: 14px; }
.danger { color: var(--bad); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 15px; margin-bottom: 12px; }
.card .meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink3); margin-bottom: 6px; }
.chip { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-radius: 20px; padding: 2px 9px; border: 1px solid var(--line2); color: var(--ink2); }
.chip.running, .chip.queued { color: var(--blue); border-color: rgba(76, 194, 255, .45); }
.chip.done { color: var(--ok); border-color: rgba(69, 211, 138, .4); }
.chip.failed { color: var(--bad); border-color: rgba(255, 100, 100, .4); }
.said { color: var(--ink2); font-size: 14.5px; margin: 0 0 8px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.said.open { -webkit-line-clamp: unset; }
.reply { font-size: 16px; margin: 4px 0 8px; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.items li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; font-size: 14.5px; background: var(--panel2); border-radius: 9px; padding: 8px 10px; }
.items .ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 14px; background: #1e2329; }
.items li.needs_you .ic { background: rgba(255, 181, 71, .16); }
.items li.failed .ic { background: rgba(255, 100, 100, .16); }
.items small { display: block; color: var(--ink3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.err { color: var(--bad); font-size: 14.5px; margin: 6px 0; }
.foot { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }
.working { display: flex; align-items: center; gap: 10px; color: var(--blue); font-size: 14.5px; }
.dots i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin-right: 3px; animation: breathe 1s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
.empty { color: var(--ink3); text-align: center; padding: 30px 10px; }
h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); margin: 22px 2px 10px; display: flex; align-items: center; gap: 8px; }
h2 .push { margin-left: auto; }
.note { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; }
.note input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); }
.note.done p { color: var(--ink3); text-decoration: line-through; }
.note p { margin: 0; white-space: pre-wrap; }
.note .app { font-size: 11.5px; color: var(--blue); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.x { border: 0; background: none; color: var(--ink3); font-size: 18px; padding: 0 4px; }
.brief { white-space: pre-wrap; font-size: 14px; color: var(--ink2); max-height: 4.4em; overflow: hidden; margin: 6px 0 0; }
.brief.open { max-height: none; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; }
.field textarea, .field input { width: 100%; border: 1px solid var(--line2); background: var(--panel); border-radius: 10px; padding: 10px; font-size: 14.5px; }
.field textarea { min-height: 220px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; }
.small { font-size: 13.5px; color: var(--ink2); }
code { background: var(--panel2); border-radius: 5px; padding: 1px 5px; font-size: 13px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(13, 15, 17, .96); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(10px); }
.tabs button { border: 0; background: none; color: var(--ink3); padding: 14px 0 15px; font-size: 14px; font-weight: 600; }
.tabs button.on { color: var(--blue); }
.tabs i { font-style: normal; font-size: 11px; background: var(--blue2); color: #fff; border-radius: 9px; padding: 1px 6px; margin-left: 2px; }
.tabs i:empty { display: none; }
.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 12px); transform: translateX(-50%); z-index: 20; background: var(--ink); color: var(--bg);
  border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 14.5px; max-width: calc(100% - 32px); }

body.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login .card, form.card { width: min(360px, 100%); display: grid; gap: 8px; padding: 22px; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; letter-spacing: .22em; }
form.card label { font-size: 13px; color: var(--ink2); }
form.card input { height: 46px; border: 1px solid var(--line2); background: var(--panel2); border-radius: 10px; padding: 0 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.row.left { justify-content: flex-start; }
.wrap { word-break: break-all; }
.gap { margin-top: 20px; }
a.ghost { text-decoration: none; display: inline-block; }

/* small hotkey window on the laptop */
body.laptop .mic-wrap { padding-top: 8px; }
body.laptop .orb.big { width: 120px; height: 120px; }
body.laptop .orb.big svg { width: 40px; height: 40px; }
body.laptop .tabs { display: none; }
body.laptop main { padding-bottom: 24px; }
