:root{--bg:#f1f2f4;--card:#fff;--ink:#0e1014;--muted:#646a76;--line:#e1e3e8;--pill:#0e1014;--pillink:#fff;--soft:#eceef1;--me:#0e1014;--meink:#fff;--warn:#b45309;--bad:#c62828;--good:#15803d;--lamp:#ffa62b;--plate1:#fff;--plate2:#d6d9e1;--r:18px;--tab:64px}
@media (prefers-color-scheme:dark){:root{--bg:#090a0d;--card:#121419;--ink:#f1f2f4;--muted:#8c93a0;--line:#22252d;--pill:#f1f2f4;--pillink:#090a0d;--soft:#1b1e25;--me:#f1f2f4;--meink:#090a0d;--warn:#f0a85a;--bad:#ff6b6b;--good:#5fd08a;--plate1:#2d313c;--plate2:#0f1115}}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.45 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}
.wrap{max-width:640px;margin:0 auto;padding:calc(env(safe-area-inset-top) + 14px) 16px calc(var(--tab) + env(safe-area-inset-bottom) + 28px)}
body.plain .wrap{padding-bottom:40px}
a{color:inherit}
h1{font-size:28px;line-height:1.15;letter-spacing:-.02em;margin:0 0 6px;font-weight:700}
h2{font-size:13px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin:26px 6px 8px}
p{margin:0 0 10px}
.muted{color:var(--muted)}.small{font-size:13.500px}.center{text-align:center}.block{display:block}.pad{padding:4px 6px}.grow{flex:1;min-width:0}.wrapany{overflow-wrap:anywhere}
.danger{color:var(--bad)}
[hidden]{display:none!important}
.hello{margin:10px 4px 16px}.hello p{margin-top:6px}
.back{display:inline-block;color:var(--muted);text-decoration:none;font-size:15px;padding:6px 4px}

.card{background:var(--card);border-radius:var(--r);padding:16px 18px;margin:0 0 12px;position:relative;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.card.link{display:block;text-decoration:none}
.card.warn{border:1px solid var(--warn)}
.card>p:last-child,.card .md>:last-child{margin-bottom:0}
.eyebrow{font-size:12.500px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px}
.today{padding:18px 20px}
.nudge b{display:block;margin-bottom:2px}.nudge .btn{margin-top:6px}
.cardx{position:absolute;top:8px;right:8px}

.btn{appearance:none;border:0;background:var(--pill);color:var(--pillink);font:600 16px/1 inherit;font-family:inherit;padding:14px 20px;border-radius:999px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:46px}
.btn.ghost{background:var(--soft);color:var(--ink)}
.btn.sm{padding:9px 14px;min-height:36px;font-size:14px}
.btn.dangerbtn{background:var(--bad);color:#fff}
.btn:active{opacity:.7}
.linkbtn{appearance:none;border:0;background:none;color:inherit;font:inherit;padding:0;cursor:pointer;text-align:left}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.stack{display:flex;flex-direction:column;gap:12px}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600}
label small{font-weight:400}
input,textarea,select{font:inherit;font-size:16px;color:var(--ink);background:var(--soft);border:1px solid transparent;border-radius:14px;padding:13px 14px;width:100%;outline:0;appearance:none}
input:focus,textarea:focus,select:focus{border-color:var(--ink)}
textarea{resize:none}
.check{flex-direction:row;align-items:center;font-weight:400;font-size:13.500px;color:var(--muted);width:100%}
.check input{width:auto;appearance:auto}

.flashes{position:sticky;top:calc(env(safe-area-inset-top) + 8px);z-index:20;margin-bottom:10px}
.flash{background:var(--pill);color:var(--pillink);padding:12px 16px;border-radius:16px;font-size:15px;margin-bottom:6px}

.auth{max-width:420px;margin:8vh auto 0;display:flex;flex-direction:column;gap:14px}
.auth .logo{width:64px;height:64px;border-radius:18px}
.bigmoji{font-size:52px;line-height:1}

.ask,.composer{display:flex;align-items:flex-end;gap:8px;background:var(--card);border-radius:28px;padding:6px 6px 6px 18px;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.ask{margin-bottom:16px;align-items:center}
.ask input,.composer textarea{background:none;border:0;padding:11px 0;border-radius:0;max-height:140px}
.send{flex:none;width:42px;height:42px;border-radius:50%;border:0;background:var(--pill);color:var(--pillink);display:grid;place-items:center;cursor:pointer}
.send svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.200;stroke-linecap:round;stroke-linejoin:round}
.send:disabled{opacity:.35}

.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:2px 0}
.chips::-webkit-scrollbar{display:none}
.chips.wrap{flex-wrap:wrap;margin-top:12px;padding:0;max-width:none}
.chip{flex:none;display:inline-flex;gap:6px;align-items:center;background:var(--soft);border-radius:999px;padding:9px 14px;font-size:14.500px;font-weight:500;text-decoration:none;white-space:nowrap}
.chip.on{background:var(--pill);color:var(--pillink)}

.apps{display:flex;gap:14px;overflow-x:auto;padding:6px 4px 2px;margin:4px 0 2px;scrollbar-width:none}
.apps::-webkit-scrollbar{display:none}
.app{flex:none;width:68px;text-decoration:none;display:flex;flex-direction:column;align-items:center;gap:6px}
.appicon{width:60px;height:60px;border-radius:18px;background:var(--card);display:grid;place-items:center;font-size:30px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.appicon.add{background:var(--soft);color:var(--muted);font-size:28px;font-weight:300;box-shadow:none}
.appicon.sm{width:40px;height:40px;border-radius:12px;font-size:20px;background:var(--soft);box-shadow:none;flex:none}
.appname{font-size:12px;color:var(--muted);max-width:68px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.list{padding:4px 0}
.item{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);margin:0;text-decoration:none;min-height:52px}
.item:last-child{border-bottom:0}
.item.add input{background:none;border:0;padding:6px 0;border-radius:0}
.tick{flex:none;width:24px;height:24px;border-radius:50%;border:2px solid var(--muted);background:none;padding:0;cursor:pointer;display:grid;place-items:center;color:var(--muted);font-size:16px;line-height:1}
.tick.plus{border-style:dashed}
.x{flex:none;appearance:none;border:0;background:none;color:var(--muted);font-size:22px;line-height:1;padding:4px 8px;cursor:pointer}
.chev{color:var(--muted);font-size:22px}
.bell{flex:none;width:24px;text-align:center}
.dot{flex:none;display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--muted)}
.dot.ok{background:var(--good)}.dot.error,.dot.blocked{background:var(--bad)}.dot.waiting{background:var(--warn)}.dot.off,.dot.declined{background:var(--line)}
.more{position:relative}.more summary{list-style:none;cursor:pointer;font-size:22px;padding:2px 8px;color:var(--muted)}.more summary::-webkit-details-marker{display:none}
.menu{position:absolute;right:0;top:34px;z-index:5;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:6px 14px;min-width:210px;box-shadow:0 8px 30px rgba(0,0,0,.14)}
.menu form{padding:9px 0;border-bottom:1px solid var(--line)}.menu form:last-child{border:0}
.fold{display:block}.fold summary{cursor:pointer;list-style:none;padding:4px 0}.fold summary::-webkit-details-marker{display:none}.fold form{margin-top:12px}

.ok-card{border:1.500px solid var(--ink)}
.ok-card.done,.ok-card.declined,.ok-card.failed,.ok-card.expired,.ok-card.running{border-color:var(--line);box-shadow:none}
.ok-title{font-weight:600;font-size:17px;margin-bottom:8px}
.ok-detail{white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.45 inherit;font-family:inherit;background:var(--soft);border-radius:14px;padding:12px 14px;margin:0 0 12px;max-height:260px;overflow:auto}
.hostbox{background:var(--soft);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:2px}.hostbox b{font-size:18px;overflow-wrap:anywhere}
.copyrow{display:flex;gap:8px;align-items:center;margin-top:6px}.copyrow input{font-size:13px;padding:10px 12px}
.steps{padding-left:20px;margin:0}.steps li{margin-bottom:12px}
.emojis{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:8px}.emojis legend{font-size:14px;font-weight:600;margin-bottom:6px}
.emojis label{display:block}.emojis input{position:absolute;opacity:0;width:0}.emojis span{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:var(--soft);font-size:24px;border:2px solid transparent}
.emojis input:checked+span{border-color:var(--ink)}

.md p{margin:0 0 8px}.md ul,.md ol{margin:0 0 8px;padding-left:22px}.md li{margin-bottom:3px}.md .h{font-weight:700}
.md pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--soft);border-radius:12px;padding:10px 12px;font:13px/1.45 ui-monospace,Menlo,monospace;margin:0 0 8px}
.md code{background:var(--soft);border-radius:6px;padding:1px 5px;font:.9em ui-monospace,Menlo,monospace}
.md a{text-decoration:underline;text-underline-offset:2px}.md .host{color:var(--muted);font-size:.85em}

body.chatpage .wrap{padding-bottom:calc(var(--tab) + env(safe-area-inset-bottom) + 96px)}
.chathead{position:sticky;top:0;z-index:10;background:var(--bg);margin:-14px -16px 8px;padding:calc(env(safe-area-inset-top) + 12px) 16px 10px}
.who{display:flex;align-items:center;gap:10px;font-size:18px}.avatar{width:36px;height:36px;border-radius:12px;background:var(--card);display:grid;place-items:center;font-size:20px}
.thread{display:flex;flex-direction:column;gap:8px}
.msg{display:flex}.msg.me{justify-content:flex-end}
.bubble{max-width:86%;padding:11px 15px;border-radius:22px;overflow-wrap:anywhere}
.msg.me .bubble{background:var(--me);color:var(--meink);border-bottom-right-radius:8px;white-space:pre-wrap}
.msg.them .bubble{background:var(--card);border-bottom-left-radius:8px}
.msg.wide{display:block}.msg.wide .card{margin:4px 0}
.msg.note{justify-content:center;text-align:center;color:var(--muted);font-size:13px;padding:2px 20px;overflow-wrap:anywhere}
.typing{margin-top:8px}.typing .bubble{display:flex;gap:5px;padding:15px}
.typing i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:blink 1.2s infinite both}.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
@media (prefers-reduced-motion:reduce){.typing i{animation:none}}
.composer{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--tab) + env(safe-area-inset-bottom) + 10px);width:min(608px,calc(100% - 24px));z-index:15;box-shadow:0 4px 24px rgba(0,0,0,.12)}

.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:16;height:calc(var(--tab) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-top:1px solid var(--line);display:flex;justify-content:center;gap:min(64px,12vw)}
.tabbar a{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:72px;text-decoration:none;color:var(--muted);font-size:11px;font-weight:600}
.tabbar a.on{color:var(--ink)}
.tabbar svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.800;stroke-linecap:round;stroke-linejoin:round}
.tabbar a.on svg{fill:currentColor}
.badge{position:absolute;top:8px;right:14px;min-width:18px;height:18px;border-radius:9px;background:var(--bad);color:#fff;font-size:11px;display:grid;place-items:center;padding:0 5px}

.tag{flex:none;display:inline-flex;align-items:center;gap:4px;background:var(--soft);border-radius:999px;padding:3px 9px;font-size:12px;font-weight:500;color:var(--muted);white-space:nowrap;text-transform:none;letter-spacing:0}
.plain{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.mini{width:auto;flex:none;padding:7px 10px;font-size:13px;border-radius:10px;max-width:110px}
.app{position:relative}.badge.on-icon{top:-4px;right:0}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0 10px}.stats div{background:var(--soft);border-radius:14px;padding:10px 6px;text-align:center}.stats b{display:block;font-size:20px}.stats span{font-size:11.500px;color:var(--muted)}
.spec{font-size:13px;line-height:1.4;margin-bottom:10px}
.badge.inline{position:static;flex:none}
.three{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.clip{flex:none;width:40px;height:42px;display:grid;place-items:center;color:var(--muted);cursor:pointer;margin-left:-10px}.clip input{position:absolute;opacity:0;width:0;height:0}
.clip svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.800;stroke-linecap:round;stroke-linejoin:round}
.composer .grow{display:flex;flex-direction:column}.picked{display:flex;flex-wrap:wrap;gap:6px;padding:8px 0 0}
.filechip{display:inline-flex;gap:6px;align-items:center;background:var(--soft);color:var(--ink);border-radius:12px;padding:7px 10px;font-size:13.500px;text-decoration:none;margin:0 6px 6px 0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pic{display:block;margin:0 0 8px}.pic img{display:block;max-width:100%;max-height:340px;border-radius:14px}.md .pic{margin:8px 0 0}
.linkrow{text-decoration:none}
.item.setup{align-items:stretch}
.setupitem summary{display:block;padding:2px 0}.setupitem .steps{margin-top:10px}.setupitem .copyrow .lbl{flex:none;width:92px}
.ticks{list-style:none;padding:0;margin:0}.ticks li{padding:3px 0 3px 22px;position:relative}.ticks li:before{content:"✓";position:absolute;left:0;color:var(--good);font-weight:700}

/* ===== 2.0: Material icons, characters, dashboard, messages ===== */
.ic{width:24px;height:24px;flex:none;fill:currentColor;stroke:none;vertical-align:-6px}
.tabbar svg,.send svg,.clip svg{fill:currentColor;stroke:none}.tabbar a.on svg{fill:currentColor}
.tabbar svg{width:26px;height:26px}.send .ic{width:22px;height:22px}
.chev{color:var(--muted)}.x .ic{width:20px;height:20px}.more summary .ic{vertical-align:middle}
.back{display:inline-flex;align-items:center;gap:6px}.back .ic{width:20px;height:20px}
.tick.plus .ic{width:16px;height:16px}.tag .ic{width:14px;height:14px;vertical-align:-3px}.lead{color:var(--muted)}
.appicon .ic{width:22px;height:22px;color:var(--ink)}.appicon{color:var(--ink)}
.pinmark{width:15px;height:15px;color:var(--muted);vertical-align:-3px}
.filechip .ic{width:16px;height:16px}.filechip.loc{background:var(--pill);color:var(--pillink)}
.plain.feat li{display:flex;gap:10px;align-items:flex-start}.plain.feat .ic{color:var(--muted)}
.emojis span .ic{width:24px;height:24px}.faces-pick span{overflow:hidden;padding:0}.faces-pick span .av{width:100%;height:100%;border-radius:12px}

.face{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:50%;background:var(--card);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.06)}
.face.sm{width:38px;height:38px}.face.md{width:52px;height:52px}.face.lg{width:62px;height:62px;border-radius:22px}.face.lg .ic{width:30px;height:30px}.face.add{background:var(--soft);color:var(--muted);box-shadow:none}


.more-link{justify-content:center;width:100%}
.appgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px 8px;padding:8px 2px}.appgrid .app{width:auto}
.app .av,.app .face{margin:0 auto}
.famrow,.addrow{display:flex;align-items:center;gap:12px}.addrow>.ic{color:var(--muted)}.faces{display:flex}.faces .av{margin-left:-10px;border:2px solid var(--card)}.faces .av:first-child{margin-left:0}

.convos{padding:0}.convo{gap:14px;padding:13px 16px;min-height:76px}
.convo-top{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.convo-top b{font-size:17px}
.convo-last{display:block;color:var(--muted);font-size:14.500px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:62vw}.convo-last.unread{color:var(--ink);font-weight:600}

body.chatpage .tabbar{display:none}
body.chatpage .wrap{padding-bottom:calc(env(safe-area-inset-bottom) + 96px)}
.chathead{display:flex;align-items:center;gap:10px;margin:-14px -16px 10px;padding:calc(env(safe-area-inset-top) + 10px) 12px 10px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.chathead b{font-size:17px}.backbtn{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;color:var(--ink)}
.composer{bottom:calc(env(safe-area-inset-bottom) + 12px)}
.locbtn{appearance:none;border:0;background:none;margin-left:-8px;padding:0}.locbtn.on{color:var(--good)}.locbtn.busy{opacity:.4}
.confetti{position:fixed;pointer-events:none;z-index:50;width:8px;height:8px;border-radius:2px;animation:pop .8s ease-out forwards}
@keyframes pop{to{transform:translate(var(--dx),var(--dy)) rotate(220deg);opacity:0}}
@media (prefers-reduced-motion:reduce){.confetti{display:none}}
.card.addrow,.card.famrow{display:flex;align-items:center;gap:12px;text-decoration:none}
.face{background:var(--soft);box-shadow:none}

/* ===== 2.1: brand type, rendered characters, the stage ===== */
@font-face{font-family:"Instrument Sans";src:url(/static/fonts/InstrumentSans.woff2) format("woff2");font-weight:400 700;font-stretch:75% 100%;font-display:swap}
body{font-family:"Instrument Sans",-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:16.500px;letter-spacing:-.005em}
h1{font-size:31px;line-height:1.06;letter-spacing:-.026em;word-spacing:.04em;font-weight:650;font-stretch:89%}
h2{font-size:15px;font-weight:600;color:var(--ink);text-transform:none;letter-spacing:-.005em;margin:28px 4px 10px}
.eyebrow{font-size:13px;font-weight:500;text-transform:none;letter-spacing:0}
.card,.appicon,.face{box-shadow:none}.card{border:1px solid var(--line)}
.card.warn{border-color:var(--line)}.card.warn>b:first-child::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--lamp);margin-right:8px;vertical-align:1px}
.btn{border-radius:14px;letter-spacing:-.005em}.btn.sm{border-radius:10px}
input,textarea,select{border-radius:12px}.flash{border-radius:12px}
.ask,.composer{border:1px solid var(--line);box-shadow:none}.composer{box-shadow:0 10px 30px rgba(0,0,0,.10)}
.composer textarea,.ask input,.item.add input{border-radius:0}
.chip{background:var(--card);border:1px solid var(--line)}.chip.on{border-color:var(--pill)}
.ok-card{border:1px solid var(--ink)}
.msg.them .bubble{border:1px solid var(--line)}
.badge{background:var(--lamp);color:#221500;font-weight:700}
.tabbar a{font-weight:500;letter-spacing:0}.tabbar a.on{font-weight:600}
.menu{border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.12)}

.av{display:block;flex:none;width:44px;height:44px;border-radius:50%;object-fit:cover;background:radial-gradient(circle at 50% 24%,var(--plate1),var(--plate2));border:1px solid var(--line)}
.av.sm{width:38px;height:38px}.av.md{width:54px;height:54px}.av.lg{width:64px;height:64px;border-radius:20px}.av.xl{width:104px;height:104px;border-radius:30px}
.faces-pick span .av{border:0}

.stage{position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;min-height:244px;margin:4px 0 14px;padding:22px 22px 18px;border-radius:28px;color:#f4f5f7;background:radial-gradient(70% 75% at 86% 36%,rgba(255,166,43,.22),rgba(255,166,43,0) 62%),linear-gradient(160deg,#1b1f29 0%,#0b0d12 72%)}
@media (prefers-color-scheme:dark){.stage{box-shadow:inset 0 0 0 1px #242833}}
.stage-hi{font-size:14.500px;font-weight:500;color:#a6adba}
.stage-say{position:relative;z-index:1;max-width:57%;margin-top:8px;font-size:26px;line-height:1.1;font-weight:600;letter-spacing:-.022em;word-spacing:.06em;font-stretch:90%;text-wrap:balance}
.where{display:flex;align-items:center;gap:4px;margin-top:8px;color:var(--muted)}.where .ic{width:15px;height:15px}.stage .where{color:#a6adba;position:relative;z-index:1;max-width:57%}.stage .where{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stage .where .ic{vertical-align:-3px}
.stage-cta{position:relative;z-index:1;display:inline-flex;align-items:center;margin:16px 0 18px;padding:10px 15px;border-radius:12px;background:#f4f5f7;color:#0e1014;font-size:14.500px;font-weight:600;text-decoration:none}
.stage-cta:active{opacity:.75}
.stage-bot{position:absolute;right:-22px;top:-4px;width:216px;height:216px;appearance:none;border:0;padding:0;background:none;cursor:pointer;-webkit-touch-callout:none;touch-action:manipulation}
.stage-foot{position:relative;z-index:1;display:flex;align-items:center;gap:12px;width:100%;margin-top:auto;font-size:13.500px;color:#a6adba}
.stage-foot b{color:#f4f5f7;font-weight:600}
.meter{flex:1;min-width:40px;height:4px;appearance:none;-webkit-appearance:none;border:0;border-radius:2px;overflow:hidden;background:rgba(255,255,255,.16)}
.meter::-webkit-progress-bar{background:rgba(255,255,255,.16)}.meter::-webkit-progress-value{background:var(--lamp);border-radius:2px}.meter::-moz-progress-bar{background:var(--lamp);border-radius:2px}
.streak{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.streak .ic{width:16px;height:16px;color:var(--lamp)}

.tiles{display:flex;gap:22px;margin:22px -16px 16px;padding:0 20px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}.tiles::-webkit-scrollbar{display:none}
.tile{position:relative;flex:none;appearance:none;border:0;background:none;padding:10px 0 12px;font:inherit;font-size:15.500px;color:var(--muted);cursor:pointer;white-space:nowrap}
.tile b{font-weight:600}.tile.on{color:var(--ink)}.tile.on::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;border-radius:2px 2px 0 0;background:var(--ink)}
.tile i{font-style:normal;font-size:12.500px;font-weight:600;margin-left:5px;color:var(--muted)}
.auth .av.xl{margin-bottom:4px}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

/* ===== 2.2: the live character, the Add screen, feel ===== */
.auth-stage{position:relative}[data-bot] canvas{display:block;width:100%;height:100%}
[data-bot] canvas{position:absolute;inset:0;opacity:0;transition:opacity .25s ease}[data-bot].live canvas{opacity:1}[data-bot].live .pal{visibility:hidden}
.stage-bot:focus-visible{outline:2px solid #f4f5f7;outline-offset:-6px;border-radius:28px}
.stage-link{appearance:none;border:0;background:none;padding:0;font:inherit;font-size:13.500px;font-weight:600;color:#f4f5f7;display:inline-flex;align-items:center;gap:4px;cursor:pointer}.stage-link .ic{width:17px;height:17px;color:var(--lamp)}
.auth-stage{width:100%;height:210px;border-radius:28px;margin-bottom:6px;overflow:hidden;background:radial-gradient(60% 80% at 50% 42%,rgba(255,166,43,.22),rgba(255,166,43,0) 64%),linear-gradient(160deg,#1b1f29 0%,#0b0d12 72%)}
.auth-stage .pal.full,.auth-stage canvas{width:210px;height:210px;margin:0 auto}.auth-stage canvas{left:50%;right:auto;transform:translateX(-50%)}
.famfaces{display:flex;margin:2px 4px 16px}.famfaces .av{margin-left:-12px;box-shadow:0 0 0 3px var(--bg)}.famfaces .av:first-child{margin-left:0}
.plain.feat li{align-items:center}.plain.feat .ic{color:var(--good);width:20px;height:20px}
.fold summary b{display:block}.fold[open] summary{margin-bottom:6px}.fold>summary{position:relative;padding-right:28px}
.fold>summary::after{content:"";position:absolute;right:6px;top:12px;width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .15s ease}.fold[open]>summary::after{transform:rotate(-135deg);top:16px}
label small{line-height:1.35}
.btn,.card.link,.item.link,.chip,.tile,.convo,.app,.stage-cta,.send{transition:transform .12s ease,opacity .12s ease}
.btn:active,.card.link:active,.chip:active,.stage-cta:active,.send:active,.app:active{transform:scale(.97);opacity:.85}.item.link:active,.convo:active{background:var(--soft)}
.convos{overflow:hidden}
@media (prefers-reduced-motion:reduce){.btn,.card.link,.chip,.app{transition:none}}

/* ===== 2.3: the companion, and making it yours ===== */
.pal{position:relative;display:block;flex:none;overflow:hidden}.pal img{position:absolute;inset:0;display:block;width:100%;height:100%;border:0;border-radius:0;background:none}
.pal.av img{transform:scale(1.36);transform-origin:50% 71%}.pal.full{width:100%;height:100%}
.av.xl{width:96px;height:96px}
.stage-bot{right:-14px;top:14px;width:208px;height:208px}
.stage-edit{position:absolute;right:12px;top:12px;z-index:2;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.1);color:#f4f5f7;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.stage-edit .ic{width:19px;height:19px}.stage-edit:active{background:rgba(255,255,255,.22)}
.stage.studio{position:sticky;top:8px;z-index:6;min-height:0;height:216px;padding:0;margin:0 0 16px;align-items:center;justify-content:center;background:radial-gradient(60% 80% at 50% 46%,rgba(255,166,43,.22),rgba(255,166,43,0) 64%),linear-gradient(160deg,#1b1f29 0%,#0b0d12 72%)}
.stage.studio .stage-bot{position:relative;right:auto;top:auto;width:216px;height:216px}
.auth-stage.studio{position:sticky;top:8px;z-index:6}
.palrow{display:flex;align-items:center;gap:14px;margin-bottom:8px}
.pick{border:0;padding:0;margin:0;min-width:0}.pick legend{font-size:14px;font-weight:600;margin-bottom:8px;padding:0}
.pick input{position:absolute;opacity:0;width:0;height:0}
.swatches{display:flex;flex-wrap:wrap;gap:10px}.sw{display:block;width:40px;height:40px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1),inset 0 -6px 10px rgba(0,0,0,.08);cursor:pointer}
.pick input:checked+.sw{outline:2.500px solid var(--ink);outline-offset:3px}.pick input:focus-visible+.sw,.pick input:focus-visible+span{outline:2.500px solid var(--ink);outline-offset:3px}
.sw-cloud{background:#f3ede2}.sw-honey{background:#f4b54a}.sw-peach{background:#f5a587}.sw-rose{background:#f093ac}.sw-lilac{background:#b5a0ea}.sw-sky{background:#86bff0}.sw-mint{background:#86d9bb}.sw-sage{background:#a4c193}.sw-cocoa{background:#a27759}.sw-ink{background:#454b5a}
.opts{display:flex;flex-wrap:wrap;gap:8px}.opts label>span{display:inline-flex;align-items:center;gap:6px;padding:10px 15px;border-radius:12px;border:1px solid var(--line);background:var(--card);font-size:15px;font-weight:500;cursor:pointer}
.opts input:checked+span{background:var(--pill);color:var(--pillink);border-color:var(--pill)}
.opts .locked>span{color:var(--muted);background:var(--soft);cursor:default}.opts .locked .ic{width:15px;height:15px}.opts small{font-size:12px;font-weight:500;color:var(--muted)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ===== 2.4: two-tap connections, names, room for the companion to jump ===== */
.btn.big{min-height:56px;font-size:17px;border-radius:16px}
.whoami{display:flex;align-items:center;gap:12px}.whoami b{word-break:break-word}
.stepbtn{display:flex;align-items:center;gap:14px;width:100%;padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:var(--soft);color:var(--ink);font:inherit;text-align:left;text-decoration:none;cursor:pointer;transition:transform .12s ease,opacity .12s ease}
.stepbtn:active{transform:scale(.98);opacity:.85}.stepbtn>i{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--pill);color:var(--pillink);font-style:normal;font-weight:700;font-size:15px}.stepbtn>i .ic{width:18px;height:18px}.stepbtn>.ic{flex:none;width:20px;height:20px;color:var(--muted)}
label.quiet{font-size:13px;font-weight:500;color:var(--muted)}
.fold.inner{border:0;padding:0;background:none}.how{border-top:1px solid var(--line);padding:10px 0}.how summary{font-size:15px;font-weight:500;cursor:pointer}.how p{margin:8px 0 0}
.namechips{display:flex;flex-wrap:wrap;gap:8px;margin-top:-4px}.namechips .chip{font:inherit;font-size:14px;cursor:pointer}
.row.gap{display:flex;gap:18px;margin-top:10px}
.stage,.auth-stage{overflow:visible}.stage-bot{right:-4px;top:4px}.stage-foot{z-index:3}
[data-bot] canvas{pointer-events:none}[data-bot] canvas.tall{inset:auto 0 0 0;height:130%}
.auth-stage canvas.tall{inset:auto auto 0 50%;height:273px}
[data-bot]{touch-action:pan-y;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}

/* ===== 2.5: sheets. Actions slide up over the tab you're on ===== */
html.sheet-lock,html.sheet-lock body{overflow:hidden}
.sheet-back{position:fixed;inset:0;z-index:60;background:rgba(8,10,14,.5);opacity:0;transition:opacity .25s ease}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:61;display:flex;flex-direction:column;height:calc(100% - env(safe-area-inset-top) - 26px);max-width:640px;margin:0 auto;background:var(--bg);border-radius:24px 24px 0 0;box-shadow:0 -12px 44px rgba(0,0,0,.28);transform:translateY(102%);transition:transform .32s cubic-bezier(.2,.85,.25,1);outline:0}
.sheet.drag{transition:none}
html.sheet-open .sheet{transform:none}html.sheet-open .sheet-back{opacity:1}
.sheet-top{flex:none;position:relative;display:flex;align-items:center;justify-content:space-between;height:52px;padding:0 10px;touch-action:none}
.grab{position:absolute;left:50%;top:8px;width:40px;height:5px;margin-left:-20px;border-radius:3px;background:var(--line)}
.sheet-nav{appearance:none;display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:50%;background:var(--soft);color:var(--ink);cursor:pointer}.sheet-nav .ic{width:20px;height:20px}.sheet-nav[hidden]{display:grid;visibility:hidden}.sheet-nav:active{opacity:.7}
.sheet-body{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:2px 16px calc(env(safe-area-inset-bottom) + 32px);transition:opacity .15s ease}
.sheet-body>.back{display:none}.sheet-body>.hello:first-of-type,.sheet-body>.back+.hello{margin-top:0}
.sheet-body .flashes{top:4px}
.sheet.busy .sheet-body{opacity:.5;pointer-events:none}
.sheet.busy .sheet-top::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:linear-gradient(90deg,transparent,var(--lamp),transparent);background-size:40% 100%;background-repeat:no-repeat;animation:sheetload 1s linear infinite}
@keyframes sheetload{from{background-position:-40% 0}to{background-position:140% 0}}
.sheet .stage.studio{top:0}
@media (prefers-reduced-motion:reduce){.sheet,.sheet-back{transition:none}.sheet.busy .sheet-top::after{animation:none}}
