/* Gzowo Concierge - styles: neutral graphite, one live accent, spring motion, phone-first with a desktop inspector layout. */
:root {
  color-scheme: light dark;
  --bg: #fafafb; --surface: #ffffff; --raised: #efeff2; --raised-2: #e4e4e9;
  --line: rgba(20, 20, 30, .08); --line-2: rgba(20, 20, 30, .16);
  --ink: #1d1d1f; --on-ink: #fafafb; --dim: #606067; --faint: #707077;
  --live: #b86e00; --err: #d70015;
  --track-off: #d1d1d6; --knob: #ffffff; --knob-on: #ffffff; --focus-line: rgba(20, 20, 30, .34);
  --shadow-s: 0 1px 2px rgba(20, 20, 40, .06), 0 6px 18px -8px rgba(20, 20, 40, .14);
  --shadow-m: 0 2px 6px rgba(20, 20, 40, .06), 0 14px 36px -12px rgba(20, 20, 40, .22);
  --shadow-l: 0 -6px 40px -10px rgba(20, 20, 40, .22);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.22, 1, .36, 1);
  --spring-b: cubic-bezier(.34, 1.4, .5, 1);
  --gut: 16px; --bar: 52px; --col: 720px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro", system-ui, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.1, 0.287, 0.473, 0.627, 0.743, 0.827, 0.886, 0.925, 0.952, 0.969, 0.98, 0.987, 0.992, 0.995, 0.997, 0.998, 1);
    --spring-b: linear(0, 0.097, 0.302, 0.523, 0.713, 0.856, 0.951, 1.006, 1.031, 1.038, 1.035, 1.027, 1.019, 1.012, 1.006, 1.002, 1, 0.999, 1);
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0f; --surface: #161618; --raised: #202024; --raised-2: #2b2b30;
    --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .17);
    --ink: #f5f5f7; --on-ink: #0d0d0f; --dim: #a6a6ad; --faint: #8e8e96;
    --live: #ffb340; --err: #ff6a61;
    --track-off: #3b3b41; --knob: #ffffff; --knob-on: #0d0d0f; --focus-line: rgba(255, 255, 255, .3);
    --shadow-s: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px -8px rgba(0, 0, 0, .6);
    --shadow-m: 0 2px 6px rgba(0, 0, 0, .4), 0 14px 36px -12px rgba(0, 0, 0, .7);
    --shadow-l: 0 -6px 40px -10px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; }
@supports (font: -apple-system-body) {
  @media (pointer: coarse) { html { font: -apple-system-body; } }
}
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--font); font-size: 1rem; line-height: 1.47; letter-spacing: -.011em; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ic { display: block; flex: none; }
[hidden] { display: none !important; }

button { transition: transform .5s var(--spring), background-color .2s, color .2s, opacity .2s; }
button:active:not(:disabled) { transition-duration: .06s, .06s, .06s, .06s; }

.icon-btn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: none; color: var(--dim); display: grid; place-items: center; }
.icon-btn:active { transform: scale(.9); background: var(--raised); color: var(--ink); }
.pill { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--raised); color: var(--ink); font-size: .88rem; font-weight: 550; white-space: nowrap; }
.pill::after { content: ""; position: absolute; inset: -4px; }
.pill:active { transform: scale(.96); background: var(--raised-2); }
.pill.block { width: 100%; min-height: 48px; font-size: 1rem; }
.btn { height: 48px; border: 0; border-radius: 24px; padding: 0 22px; font-size: 1rem; font-weight: 600; }
.btn:active { transform: scale(.97); }
.btn.ink { background: var(--ink); color: var(--on-ink); }
.btn.tonal { background: var(--raised); color: var(--ink); }
.btn.tonal:active { background: var(--raised-2); }
.btn.wide { width: 100%; }
@media (hover: hover) {
  .icon-btn:hover { background: var(--raised); color: var(--ink); }
  .pill:hover { background: var(--raised-2); }
  .btn.tonal:hover { background: var(--raised-2); }
  .btn.ink:hover { opacity: .88; }
}

#app { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }

.bar { flex: none; position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: calc(var(--bar) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(calc(var(--gut) - 8px), env(safe-area-inset-right)) 0 max(var(--gut), env(safe-area-inset-left)); background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { margin: 0; font-size: 1.0625rem; font-weight: 650; letter-spacing: -.022em; }

.orb { width: 28px; height: 28px; flex: none; overflow: visible; }
.orb.mini { width: 18px; height: 18px; }
.orb.big { width: 60px; height: 60px; }
.o-ring { fill: none; stroke: var(--ink); stroke-width: 2.4; transition: stroke .4s; }
.o-arc { fill: none; stroke: var(--live); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 22 78; opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity .3s; }
.o-core { fill: var(--ink); transform-box: fill-box; transform-origin: center; transition: transform .6s var(--spring-b); }
#app[data-state="busy"] .bar .o-ring { stroke: var(--line-2); }
#app[data-state="busy"] .bar .o-arc { opacity: 1; animation: orbit 1.1s linear infinite; }
#app[data-state="busy"] .bar .o-core { animation: breathe 1.6s ease-in-out infinite; }
#app[data-state="offline"] .bar .o-core { transform: scale(0); }
#app[data-state="offline"] .bar .o-ring { stroke: var(--faint); stroke-dasharray: 2 4.1; }
#banner .o-ring { stroke: var(--faint); stroke-dasharray: 2 4.1; }

#banner { position: absolute; z-index: 15; top: calc(var(--bar) + env(safe-area-inset-top) + 4px); left: var(--gut); right: var(--gut); width: fit-content; max-width: 420px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-m); font-size: .85rem; line-height: 1.3; opacity: 0; pointer-events: none; transform: translate3d(0, -14px, 0) scale(.97); transition: transform .5s var(--spring), opacity .25s; }
#banner.on { opacity: 1; transform: none; }

#log { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 14px max(var(--gut), env(safe-area-inset-right)) 120px max(var(--gut), env(safe-area-inset-left)); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; outline: none; }
#thread { max-width: var(--col); margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
#thread > * { flex: none; }
.fade-top { position: absolute; z-index: 5; left: 0; right: 0; top: calc(var(--bar) + env(safe-area-inset-top)); height: 18px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }

#thread > .row, #thread > .steps, #thread > .working { margin-top: 20px; }
#thread > :first-child { margin-top: 0; }
#thread > .row.user + .row.user { margin-top: 6px; }
#thread > .row.user + .steps, #thread > .row.bot + .steps, #thread > .steps + .row.bot { margin-top: 14px; }

.row.user { align-self: flex-end; max-width: min(84%, 540px); display: flex; flex-direction: column; align-items: flex-end; }
.bubble { position: relative; padding: 10px 16px; border-radius: 22px; background: var(--raised); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.38; transition: opacity .3s; }
.bubble.queued { opacity: .6; margin-bottom: 18px; }
.qs { position: absolute; right: 8px; top: 100%; margin-top: 3px; font-size: .75rem; line-height: 1.2; color: var(--faint); white-space: nowrap; opacity: 0; animation: fadein .3s 2.2s forwards; }

.row.bot { align-self: flex-start; max-width: min(100%, 40rem); position: relative; }
.md { overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .65em; }
.md .h { margin: 1em 0 .4em; font-size: 1.06em; font-weight: 650; letter-spacing: -.018em; }
.md ul, .md ol { margin: .2em 0 .75em; padding-left: 1.35em; }
.md li { margin: .28em 0; padding-left: .1em; }
.md li::marker { color: var(--faint); }
.md strong { font-weight: 620; }
.md code { font: .86em/1.4 var(--mono); background: var(--raised); padding: .12em .38em; border-radius: 6px; letter-spacing: 0; }
.md pre { margin: .6em 0 .9em; padding: 12px 14px; background: var(--raised); border-radius: 14px; overflow-x: auto; }
.md pre code { background: none; padding: 0; font-size: .8em; }
.md blockquote { margin: .6em 0 .8em; padding-left: 14px; border-left: 3px solid var(--line-2); color: var(--dim); }
.md a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.md a:hover { text-decoration-color: var(--ink); }
.md hr { border: 0; height: 1px; margin: 1em 0; background: var(--line); }
.copy { display: none; position: absolute; left: 100%; top: -6px; margin-left: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--faint); place-items: center; opacity: 0; }
.copy.ok { color: var(--ink); opacity: 1; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .copy { display: grid; }
  .row.bot:hover .copy, .copy:focus-visible { opacity: 1; }
  .copy:hover { background: var(--raised); color: var(--ink); }
}

.steps { align-self: flex-start; width: fit-content; max-width: min(100%, 460px); min-width: min(100%, 260px); background: var(--raised); border-radius: 20px; overflow: hidden; }
.step { display: grid; grid-template-columns: 18px minmax(0, 1fr) 18px; gap: 12px; align-items: start; padding: 11px 14px; font-size: .88rem; line-height: 1.35; color: var(--dim); }
.step + .step { box-shadow: inset 0 1px 0 var(--line); }
.step.running, .step.failed { color: var(--ink); }
.s-ic, .s-st { display: grid; place-items: center; padding-top: 1px; color: var(--faint); }
.step.running .s-ic { color: var(--ink); }
.step.failed .s-st { color: var(--err); }
.s-t { display: block; overflow-wrap: anywhere; }
.s-err { display: block; margin-top: 2px; font-size: .8rem; color: var(--err); }
.s-err:empty { display: none; }
.spin { display: block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--live); animation: orbit .8s linear infinite; }

.row.note { align-self: flex-start; max-width: 100%; display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.n-ic { color: var(--err); padding-top: 2px; }
.n-t { flex: 1 1 0; min-width: 12rem; color: var(--err); overflow-wrap: anywhere; }
.row.note .retry { margin-left: 28px; flex: none; }

.working { display: flex; align-items: center; gap: 10px; min-height: 28px; font-size: .9rem; color: var(--dim); }
.working span { animation: pulse 1.6s ease-in-out infinite; }
.working .o-ring { stroke: var(--line-2); }
.working .o-arc { opacity: 1; animation: orbit 1.1s linear infinite; }
.working .o-core { animation: breathe 1.6s ease-in-out infinite; }

.empty { margin: auto; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 12px; }
.empty > * { animation: rise .7s var(--spring) both; }
.empty > :nth-child(2) { animation-delay: .06s; }
.empty > :nth-child(3) { animation-delay: .14s; }
.hero .orb { animation: pop .9s var(--spring-b) both; }
.empty h2 { margin: 20px 0 26px; font-size: 1.65rem; line-height: 1.15; font-weight: 700; letter-spacing: -.028em; text-wrap: balance; }
.suggest { width: 100%; background: var(--raised); border-radius: 22px; overflow: hidden; }
.sug { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 18px; border: 0; background: none; text-align: left; font-size: 1rem; line-height: 1.3; }
.sug + .sug { box-shadow: inset 0 1px 0 var(--line); }
.sug .ic { color: var(--dim); }
.sug:active { background: var(--raised-2); transition-duration: .06s; }
@media (hover: hover) { .sug:hover { background: var(--raised-2); } }

#dock { position: absolute; z-index: 20; left: 0; right: 0; bottom: 0; padding: 30px max(var(--gut), env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 10px) max(var(--gut), env(safe-area-inset-left)); background: linear-gradient(to top, var(--bg) 58%, transparent); pointer-events: none; }
#app.kb #dock { padding-bottom: 8px; }
#dockInner { position: relative; max-width: var(--col); margin: 0 auto; }
#dockInner > * { pointer-events: auto; }
#pending { display: flex; flex-direction: column; gap: 8px; }
#pending:not(:empty) { margin-bottom: 8px; }

.ask { padding: 16px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-m); }
.ask-head { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--dim); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.6s ease-in-out infinite; }
.ask-q { margin: 8px 0 14px; font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
.ask-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ask.enter { transform-origin: 50% 100%; animation: rise-b .6s var(--spring-b) both; }
.ask.leave { animation: sink .26s var(--ease) both; pointer-events: none; }

.composer { display: flex; align-items: flex-end; gap: 4px; padding: 4px 4px 4px 18px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 26px; box-shadow: var(--shadow-s); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: var(--focus-line); box-shadow: var(--shadow-s), 0 0 0 3px var(--line); }
#input { flex: 1; min-width: 0; height: 44px; max-height: 168px; padding: 10px 0; border: 0; outline: 0; resize: none; background: none; font-size: max(16px, 1rem); line-height: 24px; overflow-y: hidden; scrollbar-width: none; }
#input::-webkit-scrollbar { display: none; }
#input::placeholder { color: var(--faint); opacity: 1; }
#send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--raised); color: var(--faint); display: grid; place-items: center; }
#send.ready { background: var(--ink); color: var(--on-ink); animation: pop .5s var(--spring-b) backwards; }
#send:disabled { cursor: default; }
#send .ic-face { display: none; }
#send[data-mode="live"] { background: var(--raised); color: var(--ink); }
#send[data-mode="live"] .ic-send { display: none; }
#send[data-mode="live"] .ic-face { display: block; }
#send[data-mode="live"]:not(:disabled):active { background: var(--raised-2); }
#send:not(:disabled):active { transform: scale(.9); }

#jump { position: absolute; top: -56px; left: 50%; width: 44px; height: 44px; margin-left: -22px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-s); opacity: 0; transform: translate3d(0, 10px, 0) scale(.9); pointer-events: none !important; transition: transform .5s var(--spring), opacity .2s; }
#jump.on { opacity: 1; transform: none; pointer-events: auto !important; }
#jump.on:active { transform: scale(.92); }

#scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .4); opacity: 0; pointer-events: none; }
#scrim.on { pointer-events: auto; }
#sheet { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; width: 100%; max-width: 600px; margin: 0 auto; max-height: min(88dvh, 780px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; box-shadow: var(--shadow-l); visibility: hidden; transform: translate3d(0, 100%, 0); outline: none; will-change: transform; }
#sheet::after { content: ""; position: absolute; left: -1px; right: -1px; top: 100%; height: 160px; background: var(--surface); }
.grab { flex: none; width: 36px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--line-2); }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 4px 8px 0 22px; }
.sheet-head h2 { margin: 0; font-size: 1.3rem; font-weight: 700; letter-spacing: -.026em; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px calc(env(safe-area-inset-bottom) + 84px); scrollbar-width: thin; }

.grp { margin-top: 22px; }
.grp:first-child { margin-top: 6px; }
.grp h3 { margin: 0 0 8px 8px; font-size: .8rem; font-weight: 600; color: var(--dim); letter-spacing: 0; }
.list { background: var(--raised); border-radius: 20px; overflow: hidden; }
.item { display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 4px 6px 4px 16px; }
.item + .item { box-shadow: inset 0 1px 0 var(--line); }
.item-t { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 6px 0; }
.i-main { font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.i-sub { margin-top: 1px; font-size: .8rem; line-height: 1.3; color: var(--dim); }
.foot { margin: 8px 8px 0; font-size: .8rem; line-height: 1.4; color: var(--dim); }
.foot.flush { margin: 0 8px 12px; }
.grp .list[hidden] + .foot.flush { margin-bottom: 0; }
.icon-btn.small { width: 44px; height: 44px; }

.switch { position: relative; flex: none; width: 59px; height: 44px; padding: 0; border: 0; border-radius: 22px; background: none; }
.track { position: absolute; left: 4px; top: 6.5px; width: 51px; height: 31px; border-radius: 16px; background: var(--track-off); transition: background-color .3s; }
.track::before { content: ""; position: absolute; left: 14px; top: 50%; width: 2px; height: 10px; margin-top: -5px; border-radius: 1px; background: var(--knob-on); opacity: 0; transition: opacity .25s; }
.track::after { content: ""; position: absolute; right: 12px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; border: 2px solid var(--faint); transition: opacity .25s; }
.knob { position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 14px; background: var(--knob); box-shadow: 0 2px 6px rgba(0, 0, 0, .28); transition: transform .55s var(--spring-b), width .22s var(--ease), background-color .3s; }
.switch[aria-checked="true"] .track { background: var(--ink); }
.switch[aria-checked="true"] .track::before { opacity: 1; }
.switch[aria-checked="true"] .track::after { opacity: 0; }
.switch[aria-checked="true"] .knob { transform: translate3d(20px, 0, 0); background: var(--knob-on); }
.switch:active .knob { width: 33px; transition-duration: .55s, .12s, .3s; }
.switch[aria-checked="true"]:active .knob { transform: translate3d(14px, 0, 0); }

.qr { width: 204px; height: 204px; margin: 4px auto 12px; padding: 14px; border-radius: 20px; background: #fff; display: grid; place-items: center; color: #55555b; font-size: .85rem; text-align: center; }
.qr svg { width: 100%; height: 100%; display: block; }
.pair-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.confirm .pill.block { margin-top: 0; }

#toast { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: calc(env(safe-area-inset-bottom) + 14px); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 5px 5px 20px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: .9rem; opacity: 0; pointer-events: none; transform: translate3d(0, 18px, 0) scale(.96); transition: transform .5s var(--spring-b), opacity .2s; }
#toast.on { opacity: 1; pointer-events: auto; transform: none; }
#toast .pill { background: rgba(127, 127, 135, .3); color: inherit; }

#login { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; background: var(--bg); }
#login.on { display: flex; }
.login-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; animation: rise .7s var(--spring) both; }
.login-card h2 { margin: 10px 0 0; font-size: 1.65rem; line-height: 1.15; font-weight: 700; letter-spacing: -.028em; }
.login-card p { margin: 0; color: var(--dim); font-size: .94rem; line-height: 1.45; text-wrap: pretty; }
.login-card .orb .o-arc { opacity: 1; animation: orbit 3.2s linear infinite; }
.login-card .orb .o-ring { stroke: var(--line-2); }
.field { position: relative; width: 100%; margin-top: 8px; }
.field input { width: 100%; height: 52px; padding: 0 104px 0 20px; border: 1px solid var(--line-2); border-radius: 26px; outline: 0; background: var(--surface); font-size: max(16px, 1rem); transition: border-color .2s, box-shadow .2s; }
.field input::placeholder { color: var(--faint); opacity: 1; }
.field input:focus { border-color: var(--focus-line); box-shadow: 0 0 0 3px var(--line); }
.field input[aria-invalid="true"] { border-color: var(--err); }
.field .pill { position: absolute; right: 8px; top: 8px; }
.field.plain input { padding: 0 20px; }
.login-form { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.login-form .field { margin-top: 0; }
.login-card .link { border: 0; background: none; color: var(--dim); font-size: .92rem; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.login-card .link:hover { color: var(--ink, var(--text)); }
.login-card .err.info { color: var(--dim); }
.login-card .btn { margin-top: 2px; }
.login-card .err { min-height: 1.3em; color: var(--err); font-size: .88rem; }
@media (min-width: 600px) {
  .login-card { padding: 44px 36px 36px; border-radius: 34px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-m); }
}

@media (min-width: 900px) {
  :root { --gut: 24px; --bar: 56px; --col: 720px; }
  html { font-size: 100%; }
  .bar { padding-right: calc(var(--gut) - 8px); }
  .brand h1 { font-size: 1rem; }
  #log { padding-top: 20px; }
  #scrim { display: none; }
  #sheet { left: auto; right: 12px; bottom: 12px; top: calc(var(--bar) + 8px); width: 360px; max-width: none; max-height: none; margin: 0; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-m); }
  #sheet::after, .grab { display: none; }
  .sheet-head { padding-top: 8px; }
  .sheet-body { padding-bottom: 88px; }
  #toast { bottom: 14px; }
}

@keyframes rise { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
@keyframes rise-user { from { opacity: 0; transform: translate3d(0, 16px, 0) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes rise-b { from { opacity: 0; transform: translate3d(0, 24px, 0) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sink { to { opacity: 0; transform: translate3d(0, 14px, 0) scale(.98); } }
@keyframes pop { from { transform: scale(.8); } to { transform: none; } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.78); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.enter { animation: rise .6s var(--spring) both; }
.row.user.enter { transform-origin: 100% 100%; animation-name: rise-user; }

@media (prefers-reduced-motion: reduce) {
  .enter, .row.user.enter, .empty > *, .login-card { animation: fade .2s both; }
  .ask.enter { animation: fade .2s both; }
  .ask.leave { animation: sink .15s both; }
  .hero .orb, #send.ready { animation: none; }
  .spin, .o-arc, #app[data-state="busy"] .bar .o-arc, .working .o-arc, .login-card .orb .o-arc { animation: pulse 1.4s ease-in-out infinite !important; }
  .o-core, .working .o-core, #app[data-state="busy"] .bar .o-core { animation: none !important; }
  button, .knob, .track, #toast, #jump, #banner { transition-duration: .01s, .15s !important; }
  .knob { transition: background-color .2s, transform .01s !important; }
  html { scroll-behavior: auto; }
}

.field-row { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.field-row label { margin-left: 8px; font-size: .8rem; font-weight: 600; color: var(--dim); }
.in { width: 100%; min-height: 48px; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 16px; outline: 0; background: var(--surface); font-size: max(16px, 1rem); line-height: 1.35; transition: border-color .2s, box-shadow .2s; }
.in:focus { border-color: var(--focus-line); box-shadow: 0 0 0 3px var(--line); }
.in::placeholder { color: var(--faint); opacity: 1; }
textarea.in { resize: none; display: block; min-height: 132px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.small { height: 44px; font-size: .94rem; }
.row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.note-err { margin: 10px 8px 0; font-size: .85rem; color: var(--err); }
.note-err:empty { display: none; }
.tag { margin-left: 8px; font-size: .72rem; font-weight: 600; color: var(--dim); background: var(--raised-2); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.sub-block { margin-top: 10px; }

#live { position: fixed; inset: 0; z-index: 50; outline: none; display: flex; background: var(--bg); visibility: hidden; opacity: 0; transform: translate3d(0, 28px, 0) scale(.985); transition: transform .6s var(--spring), opacity .25s, visibility 0s .6s; }
#live.on { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.live-scrim { display: none; }
.live-panel { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
.live-bar { flex: none; display: flex; align-items: center; justify-content: space-between; height: var(--bar); padding: 0 max(calc(var(--gut) - 8px), env(safe-area-inset-right)) 0 max(calc(var(--gut) + 6px), env(safe-area-inset-left)); }
.live-bar h2 { margin: 0; font-size: .94rem; font-weight: 600; color: var(--dim); letter-spacing: -.01em; }
.live-face { flex: 0 0 clamp(190px, 32dvh, 300px); position: relative; }
.live-face canvas { display: block; width: 100%; height: 100%; }
.live-status { flex: none; padding: 4px 24px 0; text-align: center; min-height: 3.6em; }
.live-status p { margin: 0; }
#liveStatus { font-size: 1.1rem; font-weight: 650; letter-spacing: -.02em; }
#liveHint { margin-top: 2px; font-size: .85rem; color: var(--dim); }
.live-tx { flex: none; display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; width: 100%; max-width: 34rem; min-height: 5.4em; margin: 0 auto; padding: 6px 28px 10px; text-align: center; }
.live-tx p { margin: 0; overflow: hidden; overflow-wrap: anywhere; }
#txUser { max-height: 2.7em; font-size: .94rem; line-height: 1.35; color: var(--dim); }
#txBot { max-height: 5.4em; display: flex; flex-direction: column; justify-content: flex-end; font-size: 1.12rem; line-height: 1.35; letter-spacing: -.014em; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%); mask-image: linear-gradient(to bottom, transparent, #000 22%); }
#txBot:empty, #txUser:empty { display: none; }
.live-cards { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 4px max(var(--gut), env(safe-area-inset-right)) 8px max(var(--gut), env(safe-area-inset-left)); scrollbar-width: thin; }
.cards-empty { display: none; margin: 0; font-size: .85rem; color: var(--faint); }
#liveSteps { display: flex; flex-direction: column; gap: 10px; }
#liveSteps > .steps { width: 100%; max-width: 100%; }
#liveSteps > .row.note { margin: 0; }
#livePending { display: flex; flex-direction: column; gap: 8px; }
.live-ctrl { flex: none; display: flex; align-items: flex-end; justify-content: center; gap: 30px; padding: 10px 16px calc(env(safe-area-inset-bottom) + 16px); }
.ctl:focus-visible { outline: none; }
.ctl:focus-visible .ball { outline: 2px solid var(--ink); outline-offset: 3px; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 64px; padding: 0; border: 0; background: none; color: var(--dim); font-size: .75rem; font-weight: 550; }
.ctl .ball { position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--raised); color: var(--ink); display: grid; place-items: center; transition: transform .5s var(--spring), background-color .2s, color .2s; }
.ctl .glyph { display: grid; place-items: center; }
.ctl:active .ball { transform: scale(.92); transition-duration: .06s; }
.ctl[aria-pressed="true"] .ball { background: var(--ink); color: var(--on-ink); }
.ctl.mic .ball { width: 76px; height: 76px; background: var(--ink); color: var(--on-ink); }
.ctl.mic.active .ball { background: var(--ink); }
.ring { position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; pointer-events: none; transition: opacity .3s; }
@media (hover: hover) { .ctl:hover .ball { background: var(--raised-2); } .ctl.mic:hover .ball { background: var(--ink); opacity: .9; } }

@media (min-width: 900px) {
  #live { align-items: center; justify-content: center; background: rgba(0, 0, 0, .42); }
  .live-scrim { display: block; position: absolute; inset: 0; }
  .live-panel { flex: none; width: min(980px, calc(100vw - 48px)); height: min(720px, calc(100vh - 48px)); display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto minmax(220px, 1fr) auto auto auto; padding-top: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 32px; box-shadow: var(--shadow-m); overflow: hidden; }
  .live-bar { grid-column: 1; grid-row: 1; height: 60px; padding: 0 12px 0 28px; }
  #liveCloseTop { display: none; }
  .live-face { grid-column: 1; grid-row: 2; flex: none; }
  .live-status { grid-column: 1; grid-row: 3; }
  .live-tx { grid-column: 1; grid-row: 4; }
  .live-ctrl { grid-column: 1; grid-row: 5; padding-bottom: 28px; }
  .live-cards { grid-column: 2; grid-row: 1 / -1; padding: 24px 20px; border-left: 1px solid var(--line); background: var(--bg); }
  .cards-empty { display: block; }
  .live-cards.has .cards-empty { display: none; }
}
@media (min-width: 900px) and (max-height: 640px) {
  .live-panel { grid-template-rows: auto minmax(160px, 1fr) auto auto auto; }
}

@media (prefers-reduced-motion: reduce) {
  #live { transform: none; transition: opacity .2s, visibility 0s .2s; }
  #live.on { transition-delay: 0s; }
  .ctl .ball { transition-duration: .01s, .15s, .15s; }
}
