/* CURTISv2 v2 — "Presence". Chrome is quiet, hairline and typographic; the world carries the light. */
:root {
  --void: #08070C; --deep: #100E18;
  --nacre: #EEE8DD; --haze: #9A93A8; --iris: #4169E1; --solar: #4B9CD3; --ember: #FF7D6E;
  --hair: rgba(154, 147, 168, .22); --hair-strong: rgba(154, 147, 168, .34);
  --surface: rgba(8, 7, 12, .72);
  --serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --stage-top: 60vh; --free-left: 0px; --free-right: 0px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--void); color: var(--nacre); }
body {
  font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent;
  height: 100dvh; text-rendering: optimizeLegibility;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--iris); outline-offset: 2px; border-radius: 10px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.label { font: 500 12px/1.3 var(--sans); letter-spacing: .08em; color: var(--haze); margin: 0; }
.noscript { position: fixed; inset: 40% 0 auto; text-align: center; color: var(--haze); }

#world { position: fixed; inset: 0; width: 100vw; height: 100dvh; display: block; touch-action: none; }
body.booting #world { opacity: 0; }
#world { transition: opacity 1.2s var(--ease); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; font: 500 15px/1 var(--sans);
  transition: background .25s, border-color .25s, color .25s, transform .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-key { background: var(--iris); color: #FFFFFF; font-weight: 600; min-height: 54px; width: 100%; }
.btn-key svg { stroke-width: 1.8; }
.btn-key:hover { background: #5A7FEA; }
.btn-key.secondary { background: transparent; color: var(--nacre); border: 1px solid var(--hair-strong); font-weight: 500; }
.btn-key.secondary:hover { border-color: var(--iris); }
.btn-key[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn-quiet { border: 1px solid var(--hair-strong); color: var(--nacre); }
.btn-quiet:hover { border-color: var(--haze); }
.btn-key-quiet { border: 1px solid rgba(65, 105, 225, .45); color: var(--iris); width: 100%; }
.btn-key-quiet:hover { background: rgba(65, 105, 225, .08); }
.btn-ember { color: var(--ember); border: 1px solid rgba(255, 125, 110, .35); width: 100%; margin-top: 8px; }
.btn-ember:hover { background: rgba(255, 125, 110, .08); }
.icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; color: var(--haze); transition: color .2s, background .2s;
}
.icon-btn:hover { color: var(--nacre); background: rgba(154, 147, 168, .08); }
.icon-btn[aria-expanded="true"] { color: var(--iris); }

/* ---------- sign in ---------- */
.login {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: calc(24px + var(--sat)) calc(24px + var(--sar)) calc(28px + var(--sab)) calc(24px + var(--sal));
  background: linear-gradient(180deg, rgba(8, 7, 12, 0) 38%, rgba(8, 7, 12, .55) 62%, rgba(8, 7, 12, .8) 100%);
  animation: fadein .9s var(--ease) both;
}
.login.leaving { animation: fadeout .7s var(--ease) both; pointer-events: none; }
.login-inner { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.wordmark { font: 400 44px/1 var(--serif); letter-spacing: .02em; margin: 0; text-align: center; color: var(--nacre); }
.login-sub { margin: 0 0 18px; text-align: center; color: var(--haze); font-size: 15px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--haze); font-size: 13px; margin: 6px 0 2px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.pin-form { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.pin-field { position: relative; height: 60px; }
.pin-field input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.01; font-size: 16px; letter-spacing: 2em;
  color: transparent; caret-color: transparent; background: transparent; border: 0; z-index: 2; cursor: text;
}
.pin-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; pointer-events: none; }
.pin-cells i {
  display: block; border-radius: 14px; border: 1px solid var(--hair-strong); background: rgba(16, 14, 24, .55);
  position: relative; transition: border-color .2s, background .2s;
}
.pin-cells i::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--nacre); transform: scale(0); transition: transform .22s var(--ease);
}
.pin-cells i.on::after { transform: scale(1); }
.pin-field.focus .pin-cells i.cur { border-color: var(--iris); }
.pin-field:focus-within { outline: 2px solid var(--iris); outline-offset: 4px; border-radius: 16px; }
.pin-field.disabled .pin-cells i { opacity: .4; }
.pin-field.shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97); }
.pin-field.shake .pin-cells i { border-color: rgba(255, 125, 110, .7); }
#pin-go { align-self: center; min-width: 140px; }
.pin-error { min-height: 22px; margin: 0; text-align: center; color: var(--ember); font-size: 14px; }

@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeout { to { opacity: 0; transform: translateY(6px); } }

/* ---------- main ---------- */
#main { position: fixed; inset: 0; z-index: 10; pointer-events: none; animation: fadein 1s var(--ease) both; }
#main > * { pointer-events: auto; }
.top {
  position: absolute; top: 0; left: 0; right: 0; height: calc(52px + var(--sat));
  padding: var(--sat) calc(8px + var(--sar)) 0 calc(18px + var(--sal));
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wordmark-sm { font: 400 19px/1 var(--serif); letter-spacing: .03em; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--haze); flex: none; transition: background .4s, box-shadow .4s; }
.dot.on { background: var(--nacre); box-shadow: 0 0 10px rgba(238, 232, 221, .55); }
.dot.wait { animation: breathe 1.6s ease-in-out infinite; }
.dot.off { background: var(--ember); }
@keyframes breathe { 50% { opacity: .3; } }
.top-right { display: flex; align-items: center; gap: 2px; }

.models { position: relative; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--hair); }
.models button {
  min-height: 34px; padding: 0 12px; border-radius: 999px; font: 500 13px/1 var(--mono); color: var(--haze);
  transition: color .2s, background .2s; position: relative;
}
.models button::before { content: ""; position: absolute; inset: -5px -1px; } /* 44px hit area */
.models button:hover { color: var(--nacre); }
.models button.active { color: var(--nacre); background: rgba(154, 147, 168, .16); }
.cost { display: flex; align-items: baseline; gap: 8px; padding: 0 10px; font: 400 12px/1 var(--mono); color: var(--haze); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-session { color: var(--nacre); }
.cost.pulse .cost-reply, .cost.pulse .cost-session { animation: costpulse 1.6s var(--ease); }
@keyframes costpulse { 0% { color: var(--solar); } 100% { } }

/* the stage: status word and captions under the presence */
.stage {
  position: absolute; left: var(--free-left); right: var(--free-right); top: var(--stage-top);
  display: flex; flex-direction: column; align-items: center; pointer-events: none; padding: 0 24px;
  transition: left .6s var(--ease), right .6s var(--ease), top .6s var(--ease);
}
.status {
  margin: 0; font: 500 12px/1 var(--mono); letter-spacing: .08em; color: var(--haze); text-transform: lowercase;
  transition: color .6s; height: 14px;
}
.status[data-state="listening"] { color: var(--solar); }
.status[data-state="speaking"] { color: var(--solar); }
.captions {
  pointer-events: auto; margin-top: 22px; width: 100%; max-width: 680px; text-align: center; cursor: default;
  display: flex; flex-direction: column; align-items: center; gap: 10px; border-radius: 14px; padding: 2px 4px;
  transition: opacity 1.2s;
}
.captions.stale { opacity: .42; }
.cap-user { font: 400 14px/1.45 var(--sans); color: var(--haze); max-width: 34em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cap-user:empty, .cap-reply:empty { display: none; }
.cap-reply {
  font: 400 22px/28px var(--serif); color: var(--nacre); max-height: calc(28px * 4); overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; text-wrap: pretty;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30px); mask-image: linear-gradient(180deg, transparent 0, #000 30px);
}
.cap-reply.short { -webkit-mask-image: none; mask-image: none; }
.cap-reply .inner { display: block; }
.cap-reply .w { animation: wordin .5s var(--ease) both; }
@keyframes wordin { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }
.galaxy-msg { margin: 18px 0 0; font: 400 12px/1.4 var(--mono); color: var(--haze); }

.toast {
  position: absolute; top: calc(60px + var(--sat)); left: 50%; transform: translateX(-50%); z-index: 30;
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 999px; font-size: 13px; color: var(--nacre);
  background: var(--surface); border: 1px solid var(--hair); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  animation: fadein .3s var(--ease) both; pointer-events: none;
}
.toast.err { color: var(--ember); border-color: rgba(255, 125, 110, .35); }
.star-label {
  position: fixed; z-index: 15; pointer-events: none; transform: translate(14px, -50%);
  font: 400 17px/1.2 var(--serif); color: var(--nacre); text-shadow: 0 0 12px var(--void); white-space: nowrap;
}

/* ---------- dock ---------- */
.dock {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px calc(16px + var(--sar)) calc(14px + var(--sab)) calc(16px + var(--sal));
  display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px 52px; grid-template-areas: "form form form form" "hf ptt stop kbd";
  align-items: center; column-gap: 10px; row-gap: 12px;
}
#btn-hf { grid-area: hf; } #btn-ptt { grid-area: ptt; } #btn-stop { grid-area: stop; } #btn-kbd { grid-area: kbd; } #text-form { grid-area: form; }
.ctl {
  height: 52px; min-width: 52px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--haze); border: 1px solid var(--hair); background: rgba(8, 7, 12, .35);
  transition: color .25s, border-color .25s, background .25s, opacity .25s;
}
.ctl:hover { color: var(--nacre); border-color: var(--hair-strong); }
.ctl .ctl-text { display: none; font: 500 14px/1 var(--sans); }
#btn-hf[aria-pressed="true"] { color: var(--iris); border-color: rgba(65, 105, 225, .55); background: rgba(65, 105, 225, .10); }
#btn-stop { opacity: .55; }
#btn-stop.live { opacity: 1; color: var(--ember); border-color: rgba(255, 125, 110, .45); }
#btn-kbd[aria-expanded="true"] { color: var(--iris); border-color: rgba(65, 105, 225, .45); }
.capsule {
  height: 64px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 12px;
  border: 1px solid var(--hair-strong); background: rgba(16, 14, 24, .5); color: var(--nacre);
  font: 500 15px/1 var(--sans); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  transition: border-color .3s, background .3s, color .3s; -webkit-touch-callout: none;
}
.capsule:hover { border-color: rgba(65, 105, 225, .45); }
.cap-light { width: 8px; height: 8px; border-radius: 50%; background: var(--haze); transition: background .3s, box-shadow .3s; }
.capsule.active { border-color: var(--iris); background: rgba(65, 105, 225, .14); color: var(--nacre); }
.capsule.active .cap-light { background: var(--iris); box-shadow: 0 0 12px var(--iris); animation: breathe 1.2s ease-in-out infinite; }
.capsule.latched { background: rgba(65, 105, 225, .22); }
.text-row { display: none; align-items: center; gap: 8px; height: 52px; padding: 0 6px 0 18px; border-radius: 999px; border: 1px solid var(--hair-strong);
  background: var(--surface); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.dock.typing .text-row { display: flex; animation: fadein .3s var(--ease) both; }
.text-row:focus-within { border-color: rgba(65, 105, 225, .6); }
.text-row input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; font-size: 16px; color: var(--nacre); }
.text-row input::placeholder { color: var(--haze); opacity: .8; }
.text-row input:focus-visible { outline: none; }
.send { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--void); background: var(--nacre); position: relative; }
.send::before { content: ""; position: absolute; inset: -2px; }
.send svg { width: 18px; height: 18px; stroke-width: 2; }

/* ---------- thread ---------- */
.thread { display: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.transcript { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 18px; padding: 8px 0 16px; scrollbar-width: thin; scrollbar-color: var(--hair) transparent; }
.transcript:empty::before { content: "What you say and what Tom answers will appear here."; font-size: 13px; color: var(--haze); line-height: 1.5; }
.turn { animation: fadein .4s var(--ease) both; }
.turn .tt { margin: 0; }
.turn.user .tt { font: 400 14px/1.5 var(--sans); color: var(--haze); }
.turn.assistant .tt { font: 400 19px/1.4 var(--serif); color: var(--nacre); }
.turn.partial .tt { opacity: .7; }
.turn.plan .plan-title { font: 400 22px/1.3 var(--serif); color: var(--solar); }
.turn.plan .plan-sec { margin: 12px 0 4px; font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--haze); }
.turn.plan .plan-list { margin: 0; padding-left: 20px; font: 400 15px/1.45 var(--sans); color: var(--nacre); }
.turn.plan .plan-list li { margin: 4px 0; }
.turn.plan .plan-src { display: block; font: 400 11px/1.4 var(--mono); color: var(--haze); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font: 400 11px/1 var(--mono); color: var(--haze); padding: 5px 8px; border-radius: 999px; border: 1px solid var(--hair); font-variant-numeric: tabular-nums; }
.chip.ok { color: var(--nacre); }
.chip.no { color: var(--ember); border-color: rgba(255, 125, 110, .3); }
.timings { margin: 0; font: 400 11px/1.4 var(--mono); color: var(--haze); opacity: .8; min-height: 16px; }

/* ---------- sheets (phone: bottom sheets) ---------- */
.sheet, .thread.open {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 25; max-height: 82dvh; display: flex; flex-direction: column;
  padding: 6px calc(20px + var(--sar)) calc(20px + var(--sab)) calc(20px + var(--sal));
  background: rgba(12, 10, 18, .94); -webkit-backdrop-filter: blur(24px) saturate(1.1); backdrop-filter: blur(24px) saturate(1.1);
  border-top: 1px solid var(--hair); border-radius: 14px 14px 0 0; animation: sheetin .45s var(--ease) both;
}
@keyframes sheetin { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--hair-strong); margin: 6px auto 4px; flex: none; }
.thread.open { height: 72dvh; }
.thread.open .transcript { flex: 1; }
.note { height: 64dvh; }
.note-title { margin: 0; font: 400 26px/1.15 var(--serif); color: var(--nacre); overflow-wrap: anywhere; }
.note-meta { margin: 4px 0 8px; font: 400 11px/1.3 var(--mono); color: var(--haze); overflow-wrap: anywhere; }
.note-body { overflow-y: auto; overscroll-behavior: contain; flex: 1; font: 400 15px/1.62 var(--sans); color: #DDD7CC; padding-bottom: 12px; scrollbar-width: thin; scrollbar-color: var(--hair) transparent; }
.note-body h1, .note-body h2, .note-body h3, .note-body h4 { font: 400 21px/1.25 var(--serif); color: var(--nacre); margin: 1.2em 0 .4em; }
.note-body h3, .note-body h4 { font: 600 14px/1.3 var(--sans); letter-spacing: .02em; }
.note-body p { margin: 0 0 .9em; }
.note-body ul, .note-body ol { padding-left: 1.2em; margin: 0 0 .9em; }
.note-body li { margin: .2em 0; }
.note-body li::marker { color: var(--haze); }
.note-body blockquote { margin: 0 0 .9em; padding-left: 14px; border-left: 1px solid var(--solar); color: var(--nacre); font-style: italic; }
.note-body code { font: 400 13px/1.4 var(--mono); background: rgba(154, 147, 168, .12); padding: 1px 5px; border-radius: 5px; }
.note-body pre { background: rgba(154, 147, 168, .08); border: 1px solid var(--hair); border-radius: 10px; padding: 12px; overflow-x: auto; }
.note-body pre code { background: none; padding: 0; }
.note-body strong { color: var(--nacre); font-weight: 600; }
.note-body .lnk { color: var(--solar); }
.settings { gap: 4px; }
.sheet-title { margin: 0; font: 400 26px/1.15 var(--serif); }
.set-group { padding: 16px 0; border-bottom: 1px solid var(--hair); display: flex; flex-direction: column; gap: 10px; }
.field-row { display: flex; gap: 10px; }
.field-row input {
  flex: 1; min-width: 0; height: 48px; border-radius: 12px; border: 1px solid var(--hair-strong); background: rgba(8, 7, 12, .5);
  padding: 0 14px; font-size: 16px;
}
.field-row input:focus-visible { outline: 2px solid var(--iris); outline-offset: 2px; }
.hint { margin: 0; font-size: 13px; color: var(--haze); }
.pk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pk-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--hair); }
.pk-list li:last-child { border-bottom: 0; }
.pk-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pk-name b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-name small { font: 400 11px/1.2 var(--mono); color: var(--haze); }
.pk-remove { min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--haze); font-size: 13px; }
.pk-remove:hover, .pk-remove.confirm { color: var(--ember); }
.pk-empty { color: var(--haze); font-size: 13px; padding: 6px 0; }

/* ---------- phone-specific ---------- */
@media (max-width: 899px) {
  .models { border-color: transparent; }
  .models:not(.open) button.active { background: transparent; padding-right: 22px; }
  .models:not(.open) button.active::after {
    content: ""; position: absolute; right: 8px; top: 50%; width: 5px; height: 5px; margin-top: -4px;
    border-right: 1.5px solid var(--haze); border-bottom: 1.5px solid var(--haze); transform: rotate(45deg);
  }
  .models button:not(.active) { display: none; }
  .models.open { flex-direction: column; align-items: stretch; position: absolute; top: 0; right: 0; z-index: 40; background: rgba(12, 10, 18, .94); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); padding: 4px; border-radius: 14px; }
  .models-wrap { position: relative; }
  .models.open button { display: block; min-height: 44px; text-align: left; padding: 0 16px; }
  .cost-backend, .cost-reply { display: none; }
  .cost { padding: 0 6px; }
  .captions { cursor: pointer; }
  #main.sheet-open .stage, #main.sheet-open .dock { opacity: 0; pointer-events: none; visibility: hidden; }
}
@media (max-width: 359px) { .wordmark-sm { display: none; } }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .phone-only { display: none !important; }
  .top { height: 64px; padding: 0 20px 0 28px; }
  .wordmark-sm { font-size: 22px; }
  .top-right { gap: 10px; }
  .cost { gap: 10px; }
  .cost-reply::before { content: "·"; margin-right: 10px; color: var(--hair-strong); }
  .cost-session::before { content: "session"; margin-right: 6px; color: var(--haze); }
  .cap-reply { font-size: 30px; line-height: 38px; max-height: calc(38px * 4); }
  .cap-user { font-size: 15px; }
  .dock {
    left: var(--free-left); right: var(--free-right); margin: 0 auto; max-width: 860px; padding: 0 24px 26px;
    grid-template-columns: auto 220px minmax(0, 1fr) auto; grid-template-areas: "hf ptt form stop"; column-gap: 10px;
    transition: left .6s var(--ease), right .6s var(--ease);
  }
  .text-row { display: flex; }
  .ctl { padding: 0 18px; }
  .ctl .ctl-text { display: inline; }
  .capsule { height: 52px; }
  #main.narrow .dock { grid-template-columns: 52px 170px minmax(0, 1fr) 52px; padding: 0 20px 24px; }
  #main.narrow .ctl { padding: 0; }
  #main.narrow .ctl .ctl-text { display: none; }
  #main.narrow .cap-reply { font-size: 26px; line-height: 33px; max-height: calc(33px * 4); }
  .thread {
    display: flex; flex-direction: column; position: absolute; top: 64px; bottom: 0; left: 0; width: 360px;
    padding: 6px 22px 24px 28px; border-right: 1px solid var(--hair);
  }
  .thread .transcript { flex: 1; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28px); mask-image: linear-gradient(180deg, transparent 0, #000 28px); }
  .sheet { left: auto; top: 64px; bottom: 0; width: 520px; max-height: none; height: auto; border-radius: 0; border-top: 0; border-left: 1px solid var(--hair);
    padding: 10px 32px 28px; background: rgba(10, 9, 15, .74); animation: panelin .5s var(--ease) both; }
  .settings { width: 400px; }
  .note-title { font-size: 32px; }
  @keyframes panelin { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .thread { width: 300px; padding-left: 22px; }
  .sheet { width: 440px; }
}

@media (hover: none) { .models button::before { inset: -5px -1px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- save-a-passkey offer (2026-10-15) ---------- */
.pk-offer {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 40;
  bottom: calc(96px + var(--sab)); width: min(420px, calc(100vw - 32px));
  padding: 18px 18px 16px; border-radius: 22px; color: var(--nacre);
  background: var(--surface); border: 1px solid rgba(65, 105, 225, .45);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 0 40px rgba(65, 105, 225, .22); animation: fadein .3s var(--ease) both;
}
.pk-offer b { display: block; font: 600 16px/1.3 var(--sans); margin-bottom: 6px; }
.pk-offer p { margin: 0 0 14px; font-size: 14px; color: var(--haze); }
.pk-offer-row { display: flex; gap: 10px; }
.pk-offer-row .btn { flex: 1; min-height: 48px; }
.pk-offer-row .btn-key { width: auto; }
.pk-offer.hidden { display: none; }
