/* Beto chat (beto.sh/chat), RFC 2250: a workspace on a desk, a chat app on a
   phone, a big touch screen on a kiosk. Rail on the left, the conversation in a
   760 px column, the open tool in a panel on the right; on a phone or an upright
   kiosk the rail is a drawer and the panel a bottom sheet.
   Bengal Modern, as the landing: Sora for English, Anek Bangla for Bangla, indigo ink on jute paper, terracotta and gold accents, Betopia
   orange as a fill (never body text), indigo for the visitor's own bubbles. */
:root{
  --orange:#F79549; --orange-2:#ef7f2c; --orange-ink:#A9442E; --peach:#F9E2D3; --peach-2:#F3CDB6;
  --ink:#22264F; --ink-2:#2B2F5C; --slate:#3B3F68; --muted:#585C7C; --line:#E5D9C6; --line-2:#D8C9B1;
  --paper:#F4ECDF; --sand:#ECE1CF; --white:#FFFBF4; --green:#2E7D6B; --red:#b42318;
  --terra:#C8553D; --gold:#D9A441; --river:#2E7D6B;
  --accent:var(--orange); --accent-ink:var(--orange-ink);
  --sans:'Sora','Anek Bangla',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --display:'Sora','Anek Bangla',system-ui,sans-serif;
  --bn:'Anek Bangla',system-ui,sans-serif;
  --mono:'Martian Mono',ui-monospace,monospace;
  --rail:268px; --panel:404px; --top:64px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:var(--sans);color:var(--ink);background:var(--paper);-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;overflow:hidden}
:lang(bn){font-family:var(--bn)}
/* Sora for English, Anek Bangla for Bangla; headings tighter and bolder. */
.hero h2,.who h1,.panel-head h2,.q,.score b,.new-chat,.choice b,.eyebrow{font-family:var(--display);font-weight:700;letter-spacing:-.03em}
.code b{font-family:var(--mono)}
:lang(bn) .eyebrow,:lang(bn) .new-chat{font-family:var(--bn)}
button,input{font:inherit;color:inherit}
button{background:none;border:0;cursor:pointer}
ul,ol{list-style:none}
a{color:var(--orange-ink)}
a:hover{color:#8a3a08}
:focus-visible{outline:3px solid rgba(200,85,61,.55);outline-offset:2px;border-radius:8px}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.grow{flex:1}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.skip{position:absolute;left:12px;top:-60px;z-index:100;padding:10px 14px;border-radius:10px;background:var(--ink);color:#fff;font-weight:600;text-decoration:none}
.skip:focus{top:12px}

/* The 3D canvas from /js/stage.js covers the page; only the stage's rectangle
   is drawn. Keep it under the drawer, the sheet and the stage controls. */
.beto-canvas{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:3}

.app{display:flex;height:100%;height:100dvh;width:100%;overflow:hidden}

/* ---------- rail ---------- */
.rail{width:var(--rail);flex-shrink:0;display:flex;flex-direction:column;gap:16px;padding:18px 14px calc(16px + env(safe-area-inset-bottom));background:var(--white);border-right:1px solid var(--line);overflow-y:auto;overscroll-behavior:contain}
.rail-head{display:flex;align-items:center;justify-content:space-between}
/* The rail is indigo, as the landing's night: its tokens flip to light on dark,
   so every control in it follows without its own rules. */
.rail{--ink:#F6EEE0;--slate:#D6D9EC;--muted:#A6AACB;--line:rgba(246,238,224,.13);--line-2:rgba(246,238,224,.22);--sand:rgba(246,238,224,.08);--white:rgba(246,238,224,.07);--peach:rgba(244,199,106,.16);--orange-ink:#F4C76A;color:var(--ink);background:linear-gradient(180deg,#22264F 0%,#1F2449 55%,#1A2F3E 100%)!important;border-right:0!important}
.rail .new-chat{color:#22264F;background:linear-gradient(135deg,#F4C76A,#F79549)}
.rail .new-chat:hover{background:linear-gradient(135deg,#F7D184,#F79549);filter:brightness(1.04)}
.rail .seg button[aria-pressed="true"]{background:rgba(246,238,224,.16);box-shadow:none}
.rail .icon-btn{color:var(--ink)}
.rail .icon-btn:hover{background:var(--sand)}
.rail a{color:#F4C76A}
/* A textile weave under the header, as along the landing's sections. */
.top::after{content:"";position:absolute;left:0;right:0;bottom:-5px;height:4px;opacity:.45;pointer-events:none;background:repeating-linear-gradient(45deg,transparent 0 6px,var(--terra) 6px 7.5px,transparent 7.5px 13px),repeating-linear-gradient(-45deg,transparent 0 6px,var(--gold) 6px 7.5px,transparent 7.5px 13px)}
/* Choice icons cycle the landing's colours. */
.choice:nth-child(4n+1) .ic{background:#F6DDD3;color:var(--terra)}
.choice:nth-child(4n+2) .ic{background:#F6E7C6;color:#9A6C14}
.choice:nth-child(4n+3) .ic{background:#D7ECE5;color:var(--river)}
.choice:nth-child(4n+4) .ic{background:#DCDDEC;color:var(--ink)}
.choice:hover{border-color:var(--terra)}
/* A warm gold light behind the hero Beto. */
.hero-beto::before{content:"";position:absolute;left:50%;bottom:-4%;width:140%;height:90%;transform:translateX(-50%);border-radius:50%;background:radial-gradient(closest-side,rgba(244,199,106,.42),rgba(247,149,73,.12) 60%,transparent);pointer-events:none}
.logo{height:34px;width:auto;margin:2px 8px}
.new-chat{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border-radius:14px;background:var(--orange);color:var(--ink);font-size:16px;font-weight:700;transition:background .15s}
.new-chat:hover{background:var(--orange-2)}
.tools{display:flex;flex-direction:column;gap:2px}
.tool{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:0 12px;border-radius:12px;font-size:15.5px;font-weight:500;color:var(--slate);text-align:left;transition:background .15s}
.tool:hover{background:var(--sand)}
.tool[aria-current="true"]{background:var(--peach);color:var(--ink);font-weight:600}
.tool[aria-current="true"] svg{color:var(--orange-ink)}
.eyebrow{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:6px 12px}
.recent{display:flex;flex-direction:column;gap:2px;min-height:0}
.recent li{display:flex}
.recent-item{flex:1;min-width:0;display:block;min-height:40px;padding:9px 12px;border-radius:10px;font-size:15px;color:var(--slate);text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recent-item:hover{background:var(--sand)}
.recent-item[aria-current="true"]{background:var(--sand);color:var(--ink);font-weight:600}
.recent-empty{padding:4px 12px;font-size:14px;color:var(--muted);line-height:1.45}
.link-btn{align-self:flex-start;padding:6px 12px;min-height:32px;font-size:14px;font-weight:600;color:var(--orange-ink);text-decoration:underline;text-underline-offset:3px}
.rail-foot{margin-top:auto;display:flex;flex-direction:column;gap:8px;border-top:1px solid var(--line);padding-top:14px}
.person-btn{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border:1px solid var(--line-2);border-radius:12px;background:var(--white);font-size:15px;font-weight:600}
.person-btn:hover{background:var(--sand)}
.seg{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:4px;padding:4px;border-radius:12px;background:var(--sand)}
.seg button{min-height:44px;border-radius:9px;font-size:15px;font-weight:600;color:var(--slate)}
.seg button[aria-pressed="true"]{background:var(--white);color:var(--ink);box-shadow:0 1px 2px rgba(34,38,79,.12)}
.seg.reply-lang button{font-size:14px}
.seg.mode{display:inline-flex;border-radius:999px;padding:3px;gap:3px}
.seg.mode button{min-height:34px;padding:0 14px;border-radius:999px;font-size:14px}
.seg.mode button[aria-pressed="true"]{background:var(--ink);color:#fff;box-shadow:none}
.scrim{position:fixed;inset:0;background:rgba(34,38,79,.42);z-index:30}

/* ---------- main column ---------- */
.main{flex:1;min-width:0;display:flex;flex-direction:column;position:relative}
.top{display:flex;align-items:center;gap:10px;min-height:var(--top);padding:calc(8px + env(safe-area-inset-top)) 20px 8px 28px;border-bottom:1px solid var(--line);background:var(--white);position:relative;z-index:4}
.top-av{width:34px;height:34px;border-radius:10px;flex-shrink:0;object-fit:cover}
/* Live Betos in chat mode, drawn by the page's one 3D canvas into these boxes:
   the hero's while the chat is empty, then a full Beto beside the composer
   where there is room, or a head in the header where there is not. */
.main{container:main/inline-size}
.top-beto{display:none;width:40px;height:40px;flex-shrink:0;margin:-3px 0}
.buddy{display:none;position:absolute;right:calc(100% + 18px);bottom:-6px;width:118px;height:168px;pointer-events:none}
.hero-beto{position:relative;width:300px;height:250px}
.hero-beto .stage-fallback{display:none;position:absolute;left:50%;bottom:0;height:100%;transform:translateX(-50%)}
.hero-beto.fallback .stage-fallback,.hero-beto:not(.live) .stage-fallback{display:block}
.live-betos:not(.hero-visible):not(.sample):not(.avatar-mode) .top-beto{display:block}
.live-betos:not(.hero-visible):not(.sample):not(.avatar-mode) .top-beto ~ .who{margin-left:0}
.live-betos:not(.hero-visible):not(.sample):not(.avatar-mode) #topAv{display:none}
@container main (min-width:1040px){
  .live-betos:not(.hero-visible):not(.sample):not(.avatar-mode) .buddy{display:block}
  .live-betos:not(.hero-visible):not(.sample):not(.avatar-mode) .top-beto{display:none}
  .live-betos:not(.hero-visible):not(.sample):not(.avatar-mode) #topAv{display:block}
}
.rail.open ~ .main .top-beto{display:none!important}
/* The header sits under the 3D canvas so his head shows; nothing overlaps it. */
.live-betos .top{z-index:2}
.who{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.who h1{font-size:16px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.online{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dot{width:8px;height:8px;border-radius:50%;background:var(--green);flex-shrink:0}
.tag{font-size:12px;font-weight:700;padding:5px 10px;border-radius:999px;background:var(--ink);color:#fff;white-space:nowrap}
.sample .top{box-shadow:inset 0 -3px 0 var(--accent)}
.icon-btn{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;color:var(--ink);flex-shrink:0}
.icon-btn:hover{background:var(--sand)}
.pill-btn{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 16px;border:1px solid var(--line-2);border-radius:999px;background:var(--white);color:var(--slate);font-size:15px;font-weight:600;white-space:nowrap}
.pill-btn:hover{background:var(--sand)}

.conv{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:28px 32px 12px;scroll-behavior:smooth;display:flex;flex-direction:column}
/* An empty chat sits in the middle of the screen, not at the top of a blank page. */
.hero-visible .conv>.col{margin:auto}
.col{width:100%;max-width:760px;margin:0 auto}
.log{display:flex;flex-direction:column;gap:16px}

/* hero (an empty chat) */
.hero{display:flex;flex-direction:column;align-items:center;gap:18px;padding:12px 0 6px;animation:pop .3s ease-out}
.hero h2{font-size:28px;line-height:1.2;font-weight:700;text-align:center;max-width:620px}
.choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%}
.choice{display:flex;align-items:center;gap:14px;min-height:72px;padding:12px 16px;border:1px solid var(--line);border-radius:18px;background:var(--white);text-align:left;transition:border-color .15s,box-shadow .15s,transform .1s}
.choice:hover{border-color:var(--orange);box-shadow:0 10px 30px -22px rgba(34,38,79,.5)}
.choice:active{transform:scale(.99)}
.choice .ic{width:42px;height:42px;border-radius:12px;background:var(--peach);color:var(--orange-ink);display:grid;place-items:center;flex-shrink:0}
.choice .ic svg{width:22px;height:22px}
.choice b{display:block;font-size:16.5px;font-weight:600}
.choice small{display:block;font-size:14px;color:var(--muted);line-height:1.35;margin-top:2px}
.hint{font-size:14px;color:var(--muted);text-align:center}

/* messages */
.msg{font-size:16.5px;line-height:1.6;overflow-wrap:anywhere;animation:pop .22s ease-out}
.msg.me{align-self:flex-end;max-width:78%;padding:12px 16px;border-radius:20px 20px 6px 20px;background:var(--ink);color:#fff;line-height:1.5;font-size:16px}
.turn{display:flex;gap:14px;align-items:flex-start;animation:pop .22s ease-out}
.turn .face{width:34px;height:34px;border-radius:11px;object-fit:cover;flex-shrink:0;background:var(--sand)}
.turn .body{flex:1;min-width:0;display:flex;flex-direction:column;gap:12px}
.turn .from{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--accent-ink)}
.msg.bot b{font-weight:700}
.msg.bot a{font-weight:600}
.note{align-self:center;max-width:92%;color:var(--muted);font-size:13.5px;text-align:center;padding:2px 8px}
.typing{display:flex;gap:5px;align-items:center;height:28px}
.typing i{width:7px;height:7px;border-radius:50%;background:#b9ae9f;animation:blink 1.2s infinite}
.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes blink{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@keyframes pop{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* the status line: simple, steps when opened, sources */
.status{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:4px 12px;border:1px solid var(--line);border-radius:999px;background:var(--white);color:var(--muted);font-size:13.5px;font-weight:500}
.status svg{width:15px;height:15px}
.status .ok{color:var(--green);stroke-width:2.4}
.status .chev{width:14px;height:14px;transition:transform .15s}
.status[aria-expanded="true"] .chev{transform:rotate(180deg)}
.status .spin{width:14px;height:14px;border-radius:50%;border:2px solid var(--line-2);border-top-color:var(--orange);animation:spin .8s linear infinite}
.status.failed{color:var(--red)}
@keyframes spin{to{transform:rotate(360deg)}}
.steps{display:flex;flex-direction:column;gap:6px;padding:4px 0 4px 16px;border-left:2px solid var(--line);font-size:14px;color:var(--muted)}
.steps a{font-weight:600}

/* chips */
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chips.col{flex-direction:column;align-items:flex-start}
.log>.chips{padding-left:48px}
/* Suggested replies: quiet by default, one soft accent for the main step. Once
   the visitor moves on, a row shrinks to the one they picked, greyed. */
.chip{min-height:40px;padding:7px 14px;border-radius:999px;border:1px solid var(--line-2);background:var(--white);color:var(--slate);font-size:14.5px;font-weight:500;line-height:1.2;text-align:left;transition:background .15s,border-color .15s,transform .1s}
.chip:hover{border-color:#C9B596;background:var(--paper)}
.chip:active{transform:scale(.97)}
.chip.primary{background:var(--peach);border-color:var(--peach-2);color:var(--orange-ink);font-weight:600}
.chip.quiet{border-style:dashed;color:var(--muted)}
.chips.used{gap:6px}
.chips.used .chip{display:none;pointer-events:none}
.chips.used .chip.picked{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:3px 10px;border:0;background:var(--sand);color:var(--muted);font-size:13px;font-weight:500}
.chips.used .chip.picked::before{content:'';width:10px;height:6px;border:solid currentColor;border-width:0 0 1.6px 1.6px;transform:translateY(-2px) rotate(-45deg)}
.chips.used:not(:has(.picked)){display:none}
/* Under each of Beto's lines: listen to it. */
.acts{display:flex;gap:4px;margin-top:-6px}
.act{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 10px 0 8px;border-radius:999px;color:var(--muted);font-size:13px;font-weight:500;transition:background .15s,color .15s}
.act:hover{background:var(--sand);color:var(--ink)}
.act svg{width:16px;height:16px}
.act[aria-pressed="true"]{background:var(--peach);color:var(--orange-ink)}
.act[aria-pressed="true"] svg{animation:beat .9s ease-in-out infinite}
@keyframes beat{50%{transform:scale(1.15)}}
@media (hover:hover){.chip:hover{background:var(--peach)}.chip.primary:hover{background:var(--orange-2)}}

/* cards in the conversation */
.product,.task{display:flex;flex-direction:column;gap:14px;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--white);box-shadow:0 18px 40px -30px rgba(34,38,79,.35)}
.product .ph{display:flex;gap:14px;align-items:center}
.product .pi{width:48px;height:48px;border-radius:14px;background:var(--peach);display:grid;place-items:center;color:var(--orange-ink);flex-shrink:0}
.product .pi svg{width:26px;height:26px}
.product h3,.task h3{font-size:18px;font-weight:700;line-height:1.3}
.product .sub{font-size:14.5px;color:var(--muted)}
.product .facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.product .facts p{padding:12px;border-radius:12px;background:var(--paper);font-size:14.5px;line-height:1.45}
.product .pf{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.product .where{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--muted);margin-right:auto}
.product .where svg{width:16px;height:16px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:999px;font-size:15px;font-weight:700;background:var(--orange);color:var(--ink);text-decoration:none;border:0}
.btn:hover{background:var(--orange-2);color:var(--ink)}
.btn.ghost{background:var(--white);border:1.5px solid var(--orange);color:var(--orange-ink);font-weight:600}
.btn.ghost:hover{background:var(--peach)}
.btn.block{width:100%;min-height:54px;font-size:17px;border-radius:16px}
.task p{font-size:15px;color:var(--slate);line-height:1.5}
.task .cap{font-size:14px;color:var(--muted)}
.task-img{width:100%;max-height:220px;object-fit:cover;border-radius:12px}
.task-acts{display:flex;gap:8px;flex-wrap:wrap}
.pill{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border-radius:999px;border:1.5px solid var(--orange);color:var(--orange-ink);font-weight:600;text-decoration:none}
.kv{display:grid;gap:8px}
.kv div{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:10px;background:var(--paper);font-size:14.5px}
.kv dt{color:var(--muted)}
.kv dd{font-weight:600;text-align:right}
.tbl{overflow-x:auto}
.tbl table{width:100%;border-collapse:collapse;font-size:14px}
.tbl th,.tbl td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:left}
.tbl th{color:var(--muted);font-weight:600}
.track{display:flex;flex-direction:column;gap:8px;font-size:14.5px}
.track li{display:flex;gap:10px;align-items:center;color:var(--muted)}
.track li::before{content:'';width:10px;height:10px;border-radius:50%;border:2px solid var(--line-2);flex-shrink:0}
.track li.done{color:var(--ink)}.track li.done::before{background:var(--green);border-color:var(--green)}
.track li.now{color:var(--ink);font-weight:600}.track li.now::before{border-color:var(--orange);background:var(--peach)}
.divider{border:0;border-top:1px solid var(--line)}
.code{align-self:flex-start;display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px 26px;border:2px dashed var(--orange);border-radius:16px;background:var(--peach)}
.code b{font-size:28px;letter-spacing:.06em;color:var(--orange-ink)}
.code small{font-size:12.5px;color:var(--muted)}
.score{align-self:flex-start;display:flex;flex-direction:column;align-items:center;gap:2px;padding:16px 30px;border-radius:18px;background:var(--ink);color:#fff}
/* The T-shirt win (winCard, public/js/prize.js) */
.win{align-self:stretch;display:grid;gap:12px;padding:20px;border-radius:20px;background:var(--white);border:2px solid var(--gold);box-shadow:0 18px 40px -28px rgba(34,38,79,.45)}
.win h3{margin:0;font-size:22px;line-height:1.2;color:var(--ink);text-wrap:balance}
.win h3 .nb{white-space:nowrap}
.win>p{margin:0;color:var(--slate)}
.win-row{display:flex;flex-wrap:wrap;gap:16px;align-items:center}
.win .code{align-self:center}
.win .qr{margin:0;display:flex;gap:12px;align-items:center;flex:1 1 220px}
.win .qr svg{width:120px;height:120px;flex-shrink:0;border-radius:10px;border:1px solid var(--line)}
.win .qr figcaption{font-size:14px;color:var(--muted)}
.claim{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.claim .f{display:grid;gap:6px;flex:1 1 220px;font-size:14px;font-weight:600;color:var(--ink)}
.claim input{min-height:48px;padding:10px 14px;border-radius:12px;border:1px solid var(--line-2);background:#fff;color:var(--ink);font-size:17px;line-height:1.3;font-family:inherit}
.claim input:focus{outline:0;border-color:var(--ink);box-shadow:0 0 0 3px rgba(34,38,79,.15)}
.claim .hint{font-size:13.5px;font-weight:400;color:var(--terra)}
.claim .hint:empty{display:none}
.claim .btn{min-height:48px}
.queue{display:grid;justify-items:center;gap:4px;padding:16px;border-radius:16px;background:var(--ink);color:#fff;text-align:center}
.queue small{font-size:14px;color:#F4C76A}
.queue b{font-size:56px;line-height:1;font-weight:800}
.queue p{margin:4px 0 0;font-size:15px;color:#D6D9EC}
.given{margin:0;color:var(--river);font-weight:600}
.score b{font-size:40px;line-height:1;color:var(--orange)}
.score span{font-size:14px}

/* ---------- dock ---------- */
.dock{padding:12px 32px calc(18px + env(safe-area-inset-bottom));position:relative;z-index:4}
.dock .col{display:flex;flex-direction:column;gap:10px;position:relative}
/* Ideas: behind the sparkle button, a small card above the composer. */
.ideas{position:absolute;right:0;bottom:calc(100% + 8px);z-index:6;display:flex;flex-direction:column;gap:2px;min-width:260px;max-width:min(360px,100%);padding:6px;border:1px solid var(--line);border-radius:16px;background:var(--white);box-shadow:0 18px 40px -20px rgba(34,38,79,.45);animation:pop .16s ease-out}
.ideas[hidden]{display:none}
.idea{display:flex;align-items:center;gap:10px;min-height:42px;padding:0 12px;border-radius:10px;color:var(--slate);font-size:15px;font-weight:500;text-align:left}
.idea:hover,.idea:focus-visible{background:var(--sand);color:var(--ink)}
.idea svg{width:18px;height:18px;color:var(--orange-ink);flex-shrink:0}
.composer{display:flex;flex-direction:column;gap:10px;padding:12px 12px 10px 18px;border:1px solid var(--line-2);border-radius:22px;background:var(--white);box-shadow:0 10px 30px -24px rgba(34,38,79,.5)}
.composer:focus-within{border-color:#C9B596}
.composer input{border:0;outline:none;font-size:16.5px;background:transparent;padding:6px 0;min-width:0;width:100%}
.composer input::placeholder{color:#6E7190}
.composer-row{display:flex;align-items:center;gap:8px}
.round{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;flex-shrink:0}
.round.mic{border:1px solid var(--line-2);background:var(--white)}
.round.mic[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink);animation:pulse 1.2s infinite}
.round.soft{color:var(--muted);transition:background .15s,color .15s}
.round.soft:hover{background:var(--sand);color:var(--ink)}
.round.soft[aria-pressed="true"],.round.soft[aria-expanded="true"]{background:var(--peach);color:var(--orange-ink)}
.round.send{background:var(--orange);color:var(--ink)}
.round.send:disabled{opacity:.5;cursor:default}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(247,149,73,.6)}100%{box-shadow:0 0 0 14px rgba(247,149,73,0)}}
.bar{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.bar button{min-height:40px;padding:0 12px;border:1px solid var(--line-2);border-radius:999px;background:var(--white);color:var(--slate);font-size:13.5px;white-space:nowrap}
.bar .round.soft{flex-shrink:0;padding:0;border-color:var(--line-2)}
.bar #ideasBtn{margin-left:auto}

/* ---------- panel ---------- */
.panel,.transcript{width:var(--panel);flex-shrink:0;display:flex;flex-direction:column;border-left:1px solid var(--line);background:var(--white);min-height:0;z-index:6}
.transcript{width:340px}
.handle{display:none}
.panel-head{display:flex;align-items:center;gap:10px;min-height:var(--top);padding:8px 12px 8px 20px;border-bottom:1px solid var(--line)}
.panel-icon{color:var(--orange-ink);display:grid}
.panel-head h2{font-size:16px;font-weight:700;flex:1;min-width:0}
.panel-head .icon-btn{color:var(--muted)}
.panel-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:22px;display:flex;flex-direction:column;gap:18px}
.panel-body.flush{padding:0}
.panel-body iframe{flex:1;width:100%;border:0;min-height:560px;background:var(--paper)}
.progress-row{display:flex;justify-content:space-between;font-size:13.5px;font-weight:600;color:var(--muted)}
.progress{height:6px;border-radius:6px;background:var(--sand);overflow:hidden}
.progress i{display:block;height:100%;background:var(--orange);transition:width .3s}
.q{font-size:22px;line-height:1.3;font-weight:700}
.opts{display:flex;flex-direction:column;gap:10px}
.opt{display:flex;align-items:center;gap:14px;min-height:54px;padding:8px 16px;border:1.5px solid var(--line-2);border-radius:14px;background:var(--white);font-size:16.5px;text-align:left;transition:border-color .15s,background .15s}
.opt:hover{border-color:var(--orange)}
.opt b{width:28px;height:28px;border-radius:8px;background:var(--sand);display:grid;place-items:center;font-size:14px;color:var(--muted);flex-shrink:0}
.opt.right{border-color:var(--green);background:#ecfdf3}.opt.right b{background:var(--green);color:#fff}
.opt.wrong{border-color:var(--red);background:#fef3f2}.opt.wrong b{background:var(--red);color:#fff}
.opts.used .opt{pointer-events:none}
.why{padding:14px 16px;border-radius:14px;background:var(--paper);font-size:15.5px;line-height:1.5}
.prize{margin-top:auto;display:flex;gap:12px;align-items:center;padding:16px;border-radius:16px;background:var(--ink);color:#fff}
.prize svg{width:28px;height:28px;color:var(--orange);stroke-width:1.8}
.prize p{font-size:15px;line-height:1.45}
.riddle-q{font-size:20px;line-height:1.4;font-weight:600}
.answer{display:flex;gap:8px}
.answer input{flex:1;min-width:0;min-height:48px;padding:0 16px;border:1px solid var(--line-2);border-radius:999px;background:var(--paper);font-size:16px}
.feedback{font-size:15.5px;line-height:1.5}
.guide h3{font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.guide p{font-size:15.5px;line-height:1.5}
.demos{display:flex;flex-direction:column;gap:10px}
.demos li{padding:12px 14px;border-radius:12px;background:var(--paper);font-size:15px;line-height:1.45}
.demos b{display:block;font-size:15.5px}
.samples{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sample-card{display:flex;flex-direction:column;gap:6px;padding:14px;border-radius:16px;color:#fff;text-align:left;min-height:120px;background:var(--c);background:color-mix(in srgb,var(--c) 60%,#000);position:relative;overflow:hidden}
.sample-card svg{width:28px;height:28px;stroke-width:1.8}
.sample-card b{font-size:17px;margin-top:auto}
.sample-card small{font-size:13px;opacity:.95}
/* a sample company's home screen */
.home{position:relative;display:flex;flex-direction:column;min-height:100%;background:#14161c;color:#fff;--accent:#E8552D}
.home .pattern{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,1fr);opacity:.16;pointer-events:none}
.home .pattern span{display:grid;place-items:center;border:1px solid rgba(255,255,255,.08)}
.home .pattern svg{width:46px;height:46px;stroke-width:1.4}
.home .h-body{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding:56px 22px 22px;flex:1}
.home .h-tag{position:absolute;top:14px;right:14px;padding:5px 10px;border-radius:999px;background:#fff;color:var(--ink);font-size:12px;font-weight:700}
.home .h-icon{width:64px;height:64px;border-radius:18px;background:var(--accent);display:grid;place-items:center}
.home .h-icon svg{width:34px;height:34px;stroke:#fff}
.home small{font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;opacity:.85}
.home h3{font-size:26px;line-height:1.15;font-weight:800;text-transform:uppercase;letter-spacing:.01em}
.home p{font-size:15px;line-height:1.5;opacity:.92}
.home .h-go{width:100%;min-height:52px;border-radius:14px;background:var(--accent);background:color-mix(in srgb,var(--accent) 60%,#000);color:#fff;font-size:16.5px;font-weight:700}
.home .h-link{min-height:44px;color:#fff;font-weight:600;text-decoration:underline;text-underline-offset:3px}
.home .h-foot{position:relative;padding:14px 18px 18px;border-top:1px solid rgba(255,255,255,.12);display:flex;flex-direction:column;gap:6px;text-align:center}
.home .h-foot b{font-size:12.5px;letter-spacing:.12em;text-transform:uppercase}
.home .h-foot span{font-size:12.5px;opacity:.8}
.home .h-tabs{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin-top:4px}
.home .h-tabs button{min-height:40px;padding:0 12px;border-radius:999px;border:1px solid rgba(255,255,255,.3);color:#fff;font-size:13.5px}
.home .h-back{position:absolute;top:8px;left:8px;width:44px;height:44px;border-radius:12px;display:grid;place-items:center;color:#fff;z-index:1}

/* ---------- 3D avatar mode ---------- */
.stage-wrap{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;padding:12px 24px 18px;gap:12px;position:relative}
.stage{position:relative;flex:1;min-height:220px;width:100%;max-width:760px}
.stage .ring{position:absolute;left:50%;top:48%;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}
.stage .r1{width:min(470px,70vw,62vh);aspect-ratio:1;border:2px solid #f7c39a}
.stage .r2{width:min(540px,82vw,72vh);aspect-ratio:1;border:1.5px solid #f6dcc4}
.stage-fallback{display:none;position:absolute;left:50%;bottom:0;height:90%;transform:translateX(-50%)}
.stage.fallback .stage-fallback{display:block}
.stage-ui{width:100%;max-width:760px;display:flex;flex-direction:column;align-items:center;gap:12px;position:relative;z-index:4}
.status-pill{display:flex;align-items:center;gap:8px;min-height:34px;padding:4px 14px;border:1px solid var(--line);border-radius:999px;background:var(--white);color:var(--muted);font-size:13.5px;font-weight:500}
.status-pill .dot{background:var(--orange)}
.status-pill.listening .dot{background:var(--red);animation:blink 1s infinite}
.caption{max-width:640px;min-height:1.35em;text-align:center;font-size:24px;line-height:1.35;font-weight:500}
.caption .rest{color:#6E7190}
.stage-ctl{display:flex;align-items:center;gap:18px}
.talk{width:84px;height:84px;border-radius:50%;background:var(--orange);color:var(--ink);display:grid;place-items:center;box-shadow:0 0 0 10px var(--peach-2);touch-action:none;user-select:none;-webkit-user-select:none;transition:transform .1s}
.talk svg{width:34px;height:34px;stroke-width:2}
.talk[aria-pressed="true"]{background:var(--ink);color:#fff;box-shadow:0 0 0 10px rgba(34,38,79,.15);transform:scale(1.06)}
.talk:disabled{opacity:.6}
.stage-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:640px}
.stage-chips:empty{display:none}
/* The journey's own buttons stand in for the side cards while they show. */
.stage-ui:has(.stage-chips:not(:empty)) .stage-ctl .pill-btn{visibility:hidden}
.stage-hint{font-size:14px;color:var(--muted);text-align:center}
.stage-hint .link-btn{padding:0;min-height:0;display:inline}
.stage-tools{position:absolute;right:0;bottom:0;display:flex;gap:4px}
.stage-tools .icon-btn{color:var(--muted)}
.stage-tools [aria-pressed="true"]{color:var(--red)}
.lines{flex:1;overflow-y:auto;padding:18px 20px;display:flex;flex-direction:column;gap:14px}
.lines li{display:flex;flex-direction:column;gap:4px}
.lines span{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.lines li.bot span{color:var(--orange-ink)}
.lines p{font-size:15px;line-height:1.5;color:var(--ink-2)}
.avatar-mode .dock .ideas,.avatar-mode .dock .bar{display:none}

.toast{position:fixed;left:50%;bottom:calc(110px + env(safe-area-inset-bottom));transform:translateX(-50%);padding:12px 18px;border-radius:12px;background:var(--ink);color:#fff;font-size:15px;z-index:60;max-width:90vw;animation:pop .2s ease-out}

@media (min-width:1024px) and (orientation:landscape),(min-width:1024px) and (max-height:999px){.only-phone,.rail .rail-close{display:none!important}}

/* ---------- tablets and phones, and any upright big screen (a kiosk) ---------- */
@media (max-width:1023px),(orientation:portrait) and (min-height:1000px){
  .rail{position:fixed;left:0;top:0;bottom:0;width:min(320px,86vw);z-index:40;transform:translateX(-102%);transition:transform .22s ease-out;box-shadow:20px 0 40px -20px rgba(34,38,79,.35)}
  .rail.open{transform:none}
  .rail:not(.open){box-shadow:none}
  .only-wide{display:none!important}
  .top{padding:calc(8px + env(safe-area-inset-top)) 8px 8px 8px;gap:6px}
  .top .pill-btn{min-height:40px;padding:0 12px;font-size:14px}
  .conv{padding:20px 16px 8px}
  .dock{padding:8px 12px calc(12px + env(safe-area-inset-bottom));background:var(--white);border-top:1px solid var(--line)}
  .ideas{left:0;right:0;max-width:none}
  .round.soft{width:40px;height:40px}
  .idea{white-space:nowrap}
  .composer{flex-direction:row;align-items:center;padding:0;border:0;box-shadow:none;background:none;gap:8px}
  .composer input{min-height:48px;padding:0 16px;border:1px solid var(--line-2);border-radius:999px;background:var(--paper);font-size:16px}
  .composer-row{gap:8px}
  .composer-row .grow{display:none}
  .round{width:48px;height:48px}
  .choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .choice{min-height:104px;padding:12px 14px;gap:8px;flex-direction:column;align-items:flex-start;border-radius:16px}
  .choice .ic{width:36px;height:36px;border-radius:10px}
  .choice b{font-size:16px;line-height:1.2}
  .choice small{font-size:13.5px}
  .hero{gap:14px}
  .hero h2{font-size:21px}
  .hero .hint{display:none}
  .hero-beto{width:170px;height:130px}
  .recent{flex-shrink:0}
  .msg.me{max-width:86%}
  .turn{gap:10px}
  .turn .face{width:28px;height:28px;border-radius:9px}
  .log>.chips{padding-left:38px}
  .product .facts{grid-template-columns:1fr}
  /* the panel becomes a bottom sheet */
  .panel{position:fixed;left:0;right:0;bottom:0;width:auto;max-height:88vh;max-height:88dvh;border-left:0;border-radius:26px 26px 0 0;box-shadow:0 -20px 40px -20px rgba(34,38,79,.4);z-index:35;animation:rise .24s ease-out}
  .panel .handle{display:block;align-self:center;width:44px;height:5px;border-radius:5px;background:var(--line-2);margin-top:10px}
  .panel-head{min-height:56px;border-bottom:0}
  .panel-body{padding:6px 18px calc(22px + env(safe-area-inset-bottom))}
  .panel-body.flush{padding:0 0 env(safe-area-inset-bottom)}
  .panel-body iframe{min-height:70vh;min-height:70dvh}
  .transcript{position:fixed;left:0;right:0;bottom:0;width:auto;max-height:70vh;max-height:70dvh;border-left:0;border-radius:26px 26px 0 0;box-shadow:0 -20px 40px -20px rgba(34,38,79,.4);z-index:35}
  .stage-wrap{padding:8px 12px 12px}
  .caption{font-size:19px}
  .talk{width:76px;height:76px}
  .stage-ctl{gap:10px}
  .stage-ctl .pill-btn{min-height:44px;padding:0 12px;font-size:14px}
  .stage-tools{position:static}
  .avatar-mode .dock{display:none}
}
/* ---------- an upright big screen: a 1080x1920 kiosk, a tablet held upright ----------
   Read at arm's length and used by touch: the empty chat centres a large Beto
   and big choices in the screen, and everything is sized for a finger. */
@media (orientation:portrait) and (min-width:700px) and (min-height:1000px){
  .win .qr svg{width:200px;height:200px}
  .win h3{font-size:30px}
  .queue b{font-size:80px}
  :root{--top:84px}
  .top{padding:calc(12px + env(safe-area-inset-top)) 20px 12px}
  .who h1{font-size:21px}
  .online{font-size:15px}
  .top .pill-btn{min-height:52px;padding:0 20px;font-size:16px}
  .icon-btn{width:56px;height:56px}
  .conv{padding:32px 48px 16px}
  .col{max-width:900px}
  .hero{gap:28px}
  .hero-beto{width:min(480px,56vw);height:min(440px,26vh)}
  .hero h2{font-size:clamp(28px,3.6vw,40px);line-height:1.2;max-width:820px}
  .choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
  .choice{min-height:128px;padding:22px 24px;gap:18px;border-radius:24px;align-items:flex-start;flex-direction:column}
  .choice .ic{width:60px;height:60px;border-radius:16px}
  .choice .ic svg{width:30px;height:30px}
  .choice b{font-size:22px}
  .choice small{font-size:17px;margin-top:4px}
  .hint{font-size:17px}
  .msg{font-size:21px}
  .msg.me{font-size:20px;padding:16px 22px}
  .turn .face{width:44px;height:44px;border-radius:13px}
  .turn .from{font-size:14px}
  .log{gap:22px}
  .log>.chips{padding-left:54px}
  .chip{min-height:56px;padding:12px 22px;font-size:18px}
  .dock{padding:14px 48px calc(22px + env(safe-area-inset-bottom))}
  .dock .col{gap:14px}
  .bar{gap:10px}
  .bar button{min-height:52px;padding:0 20px;font-size:16.5px}
  .round.soft{width:52px;height:52px}
  .composer input{min-height:72px;padding:0 26px;font-size:21px}
  .round{width:72px;height:72px}
  .round svg{width:28px;height:28px}
  .live-betos:not(.hero-visible):not(.sample):not(.avatar-mode) .buddy{display:none}
  .live-betos:not(.hero-visible):not(.sample):not(.avatar-mode) .top-beto{display:block;width:56px;height:56px}
  .live-betos:not(.hero-visible):not(.sample):not(.avatar-mode) #topAv{display:none}
  .caption{font-size:28px}
  .talk{width:120px;height:120px}
  .stage-ctl .pill-btn{min-height:56px;padding:0 20px;font-size:17px}
}
@media (max-width:420px){
  /* Sora runs wider: the shortcut bar keeps all five on a 360 px phone. */
  .bar{gap:4px}
  .bar button{padding:0 10px;font-size:13px}
  .bar .round.soft{width:38px;height:38px}
  /* Sample mode needs the header room for its tag and Back to Beto. */
  .sample .top #modeBtn{display:none}
  .stage-ctl .pill-btn{display:none}
  .online{font-size:12.5px}
}
@media (max-width:359px){
  .who .online,#modeBtnLabel{display:none}
}
@keyframes rise{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
