/* THE SAFE · web version. Tokens from apps/the-safe/src/theme.ts (design lab); brass is the only accent. */
:root{--bg:#F8F7F5;--card:#FFFFFF;--text:#262629;--muted:#64666B;--line:#E5E5E8;--chip:#F1F0EE;--brass:#C9A043;--brass-ink:#7D5E16;--on-brass:#1B1A17;--danger:#B3261E;color-scheme:light dark}
@media (prefers-color-scheme:dark){:root{--bg:#121318;--card:#1E2026;--text:#F8F7F5;--muted:#B3B4BA;--line:#34363C;--chip:#26282F;--brass-ink:#DDB860;--danger:#F2B8B5}}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font:16px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;-webkit-text-size-adjust:100%}
button{font:inherit;color:inherit}
a{color:inherit}
[hidden]{display:none!important}
.sp{max-width:440px;margin:0 auto;padding:12px 16px calc(16px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px;min-height:100vh;min-height:100dvh}
.sp-head{display:flex;align-items:center;justify-content:space-between}
.brand{margin:0;font-size:20px;font-weight:900;letter-spacing:3px}
.head-btns{display:flex;align-items:center;gap:10px}
.round{width:36px;height:36px;border-radius:18px;border:0;background:var(--chip);font-weight:800;cursor:pointer}
.alias{font-size:13px;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums}
.gold{color:var(--brass)}
.eyebrow{font-size:12px;font-weight:800;letter-spacing:1.5px;color:var(--brass-ink);text-transform:uppercase}
.small{font-size:13px;color:var(--muted)}
.center{text-align:center;color:var(--muted)}
.body{margin:0;font-size:15px}
.error{color:var(--danger)}
.offline{margin:0;padding:8px 12px;border-radius:10px;background:var(--chip);font-size:13px;display:flex;justify-content:space-between}
.link{background:none;border:0;padding:0;font-weight:800;cursor:pointer;text-decoration:underline}
.meta{display:flex;flex-direction:column;gap:8px}
.meta-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.stat{display:flex;flex-direction:column;align-items:flex-start}
.stat b{font-size:24px;font-weight:900;font-variant-numeric:tabular-nums;line-height:1.1}
.stat:first-child b{color:var(--brass-ink)}
.stat span{font-size:12px;color:var(--muted)}
.bar{height:4px;border-radius:2px;background:var(--line);overflow:hidden}
.bar-fill{height:100%;background:var(--brass);width:.6%}
.stage{position:relative;height:min(42vh,340px);min-height:220px}
.stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0;background:transparent;opacity:0;transition:opacity .4s}
.stage.live iframe{opacity:1}
.still{position:absolute;left:50%;top:50%;height:64%;transform:translate(-50%,-52%);opacity:1;transition:opacity .4s;pointer-events:none}
.stage.live .still{opacity:0}
.nowebgl{position:absolute;left:0;right:0;bottom:8px;text-align:center}
.bottom{display:flex;flex-direction:column;gap:10px;min-height:330px}
.bottom>div{display:flex;flex-direction:column;gap:9px}
.hints{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px 10px;border-radius:12px;background:var(--chip)}
.hint-k{font-size:12px;font-weight:900;color:var(--brass-ink);margin-right:2px}
.token{font-size:13px;font-weight:700;padding:3px 8px;border-radius:8px;background:var(--card)}
.token.new{outline:1.5px solid var(--brass)}
.token.lock{color:var(--muted);font-weight:600}
.status{min-height:38px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}
.toast{font-weight:800;font-size:14px}
.dot{color:var(--brass)}
.code{display:flex;justify-content:center;gap:8px;font:800 22px/1 ui-monospace,Menlo,monospace}
.slot{width:34px;text-align:center;color:var(--muted)}
.slot.on{color:var(--text)}
.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.keypad button{height:48px;border:0;border-radius:12px;background:var(--chip);font-size:22px;font-weight:700;cursor:pointer;touch-action:manipulation}
.keypad button.soft{font-size:17px;color:var(--muted)}
.keypad button:disabled{opacity:.45;cursor:default}
.keypad button:not(:disabled):active{background:var(--line)}
.try{position:relative;overflow:hidden;height:54px;border:0;border-radius:14px;background:var(--brass);color:var(--on-brass);font-weight:900;letter-spacing:1px;cursor:pointer;touch-action:none;-webkit-user-select:none;user-select:none}
.try:disabled{background:var(--chip);color:var(--muted);cursor:default}
.try span:last-child{position:relative}
.try-fill{position:absolute;inset:0;width:0;background:rgba(0,0,0,.18)}
.try.holding .try-fill{width:100%;transition:width 1s linear}
.keys-hint{margin:0;text-align:center}
@media (hover:none){.keys-hint{display:none}}
.result-h{margin:0;font-size:26px;font-weight:900}
.cd{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;background:var(--chip)}
.cd>div{flex:1;display:flex;flex-direction:column}
.cd-label{font-size:12px;font-weight:800;letter-spacing:1px}
.cd-time{font:900 24px/1 ui-monospace,Menlo,monospace}
.btn{height:48px;padding:0 18px;border:0;border-radius:14px;background:var(--chip);font-weight:800;cursor:pointer}
.btn.primary{background:var(--brass);color:var(--on-brass)}
.row{display:flex;gap:10px;align-items:center}
.row>.btn.primary{flex:1}
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.cell{padding:10px 12px;border-radius:12px;background:var(--chip);display:flex;flex-direction:column}
.cell b{font-size:20px;font-weight:900}
.mono{font-family:ui-monospace,Menlo,monospace}
.next{display:flex;flex-direction:column;align-items:flex-end}
.next b{font:900 18px/1.2 ui-monospace,Menlo,monospace}
.sign{display:flex;flex-direction:column;gap:6px}
.sign input{flex:1;height:48px;padding:0 12px;border-radius:12px;border:1.5px solid var(--line);background:var(--card);color:var(--text);font:inherit}
.get{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:16px;border:1.5px solid var(--line)}
.get p{margin:0}
.stores{display:flex;gap:8px;flex-wrap:wrap}
.store{flex:1;min-width:130px;text-align:center;padding:11px 12px;border-radius:12px;background:var(--text);color:var(--bg);font-weight:800;text-decoration:none}
.sp-foot{display:flex;flex-wrap:wrap;gap:6px 14px;justify-content:center;padding-top:6px;font-size:13px;color:var(--muted)}
.sp-foot a{color:var(--muted);text-decoration:none}
.sp-foot a:first-child{font-weight:800;color:var(--text)}
.howto{max-width:400px;width:calc(100% - 32px);border:0;border-radius:20px;padding:20px;background:var(--bg);color:var(--text)}
.howto::backdrop{background:rgba(0,0,0,.55)}
.howto-h{margin:0 0 8px;font-size:20px}
.tut{margin:0 0 16px;padding-left:20px;display:flex;flex-direction:column;gap:12px}
.tut b{display:block}
.tut span{color:var(--muted);font-size:14px}
.howto .btn{width:100%}
