:root{--amber:#f0b34a;--hot:#f6c163;--bg:#050806;--muted:#c4b48a;--bad:#e07070;--ok:#7dce7d}*{box-sizing:border-box;min-width:0}html,body{margin:0;width:400px;height:412px;overflow:hidden;background:#000;color:var(--amber);font:11px/1.35 "Segoe UI",system-ui,sans-serif}#stage{width:400px;height:412px;display:flex;flex-direction:column;overflow:hidden;background:#0a0a0b}
/* The CRT case, ported from the desktop (crt.is-pvm): dark PVM shell, recessed
   well, amber lip, glass tube. Geometry is chosen so the tube is exactly 330x318
   inside the 400x412 frame: 400-2*15-2*12-2*8 = 330 and 412-14-8-32(deck)-2*12-2*8 = 318. */
.crt-defs{width:0;height:0;position:absolute}
.crt-shell{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;padding:14px 15px 8px;background:linear-gradient(#3c3c3f 0%,#2a2a2d 42%,#1a1a1c 100%);border-radius:2px;box-shadow:inset 0 1px #ffffff29,inset 0 0 0 1px #0e0e10}
.crt-well{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;padding:12px;background:#101012;border-radius:2px;box-shadow:inset 0 0 0 1px #050505}
.crt-lip{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;padding:8px;background:#050505;border-radius:1px;box-shadow:inset 0 0 0 1px #ffffff0d}
.crt-tube{flex:1 1 auto;min-height:0;position:relative;overflow:hidden;border-radius:1px;background:#060908;box-shadow:inset 0 0 0 1px #000c}
.crt-raster{position:relative;z-index:0;height:100%;display:flex;flex-direction:column;filter:url(#tellr-phosphor)}
.crt-glass{position:absolute;inset:0;z-index:2;pointer-events:none;border-radius:inherit}
.crt-scan{position:absolute;inset:0;opacity:.85;mix-blend-mode:multiply;background:repeating-linear-gradient(#0000001f 0,#0000 2px 5px)}
.crt-vignette{position:absolute;inset:0;pointer-events:none;background:radial-gradient(120% 100% at 50% 45%,#0000 55%,#00000047 78%,#0000009e 100%);box-shadow:inset 0 0 48px 10px #00000061}
.crt-sheen{position:absolute;inset:0;background:radial-gradient(90% 55% at 22% 0,#fff8e638,#0000 46%),linear-gradient(118deg,#0000 36%,#ffffff12 48%,#0000 58%),radial-gradient(40% 22% at 78% 108%,#f0b34a29,#0000 70%)}
.crt-deck{flex:0 0 auto;height:32px;display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:12px 6px 0}
.crt-slot{flex:1;max-width:62%;display:flex;flex-direction:column}
.crt-slot-mouth{height:9px;border-radius:1px 1px 0 0;background:linear-gradient(#161618,#000 70%);box-shadow:inset 0 4px 5px #000,0 0 0 1px #000}
.crt-slot-tray{height:6px;border-radius:0 0 1px 1px;margin:0 8px;background:linear-gradient(#8d8d92,#4a4a4e);box-shadow:0 2px #00000059}header{height:20px;flex:none;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #f0b34a33;padding-bottom:4px}.brand{font-size:8px;font-weight:700;letter-spacing:.18em;color:var(--hot)}#screen{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:7px 3px 4px;scrollbar-width:thin;scrollbar-color:#f0b34a66 transparent}#screen::-webkit-scrollbar{width:7px}#screen::-webkit-scrollbar-thumb{background:#f0b34a66;border-radius:4px}footer{flex:none;padding-top:5px;border-top:1px solid #f0b34a33;text-align:center;color:#8f8663;font-size:7px;letter-spacing:.12em}h1{font-size:12px;letter-spacing:.12em;text-align:center;margin:3px 0 7px}h2{font-size:10px;letter-spacing:.1em;margin:4px 0 6px}p{color:var(--muted);font-size:9px;margin:4px 0 7px;overflow-wrap:anywhere}.tm-herowrap{aspect-ratio:1;width:84px;position:relative;margin:6px auto 2px;transform:translate(-29.64%)}.tm-hero{object-fit:contain;filter:drop-shadow(0 0 14px #f0b34a47);width:100%;height:100%;animation:2s linear infinite tm-flip}.tm-tm{object-fit:contain;pointer-events:none;width:57.39%;height:27.46%;position:absolute;top:1.89%;left:80.68%}@keyframes tm-flip{0%{transform:scaleX(1)}6.25%{transform:scaleX(.924)}12.5%{transform:scaleX(.707)}18.75%{transform:scaleX(.383)}25%{transform:scaleX(0)}31.25%{transform:scaleX(-.383)}37.5%{transform:scaleX(-.707)}43.75%{transform:scaleX(-.924)}50%{transform:scaleX(-1)}56.25%{transform:scaleX(-.924)}62.5%{transform:scaleX(-.707)}68.75%{transform:scaleX(-.383)}75%{transform:scaleX(0)}81.25%{transform:scaleX(.383)}87.5%{transform:scaleX(.707)}93.75%{transform:scaleX(.924)}to{transform:scaleX(1)}}@media(prefers-reduced-motion:reduce){.tm-hero{animation:none}}button{appearance:none;display:block;width:100%;border:1px solid var(--amber);background:transparent;color:var(--amber);font:700 9px/1.2 "Segoe UI",system-ui,sans-serif;letter-spacing:.08em;padding:7px;margin:4px 0;text-align:center;cursor:pointer}button.primary{background:var(--amber);color:#1a1204}button.inline{display:inline-block;width:auto;padding:5px 7px;margin:3px 3px 3px 0}button.small{width:auto;padding:3px 6px;margin:0;font-size:7px}button:disabled{opacity:.42;cursor:not-allowed}input,textarea,select{display:block;width:100%;max-width:100%;min-width:0;background:#0a0e0a;border:1px solid #f0b34a55;color:var(--hot);font:10px ui-monospace,Consolas,monospace;padding:6px;margin:3px 0 6px}label{display:block;color:var(--muted);font-size:8px;margin-top:5px}.muted{color:var(--muted);font-size:8px}.error{color:var(--bad);border-left:2px solid var(--bad);padding:3px 6px;font-size:8px;overflow-wrap:anywhere}.success{color:var(--ok);font-weight:700}.warning{color:var(--hot);border:1px solid var(--amber);padding:5px;font-size:8px}.card{border:1px solid #f0b34a44;padding:6px 7px;margin:4px 0;overflow-wrap:anywhere}.row{display:flex;gap:4px;align-items:center}.row>*{min-width:0}.row button{flex:none;width:auto}.row input{flex:1}.tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}.tabs button{font-size:7px;padding:5px 2px}.allow{display:flex;gap:4px;align-items:center;margin:2px 0}.allow span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:8px ui-monospace,monospace}.disabled-note{font-size:7px;color:var(--muted);margin:-2px 0 4px 5px}pre{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;font:8px/1.35 ui-monospace,monospace;color:var(--hot)}

/* The hidden attribute must win. `button{display:block}` above is author CSS and
   beats the browser's [hidden] rule, so BACK (hidden on the lobby) was drawn
   anyway. This one line is the whole fix; nothing else about the header changes. */
[hidden]{display:none!important}

/* Embed mode (?embed=1) only: a compact layout for a 400x412 frame. Every rule is
   scoped to html.embed, so the standalone widget keeps its pinned layout. */
html.embed,html.embed body{width:100%;height:100%}
html.embed body{font:11px/1.3 "Segoe UI",system-ui,sans-serif}
html.embed #stage{width:100%;height:100%;border-radius:0;padding:5px 6px;box-shadow:none}
html.embed header{height:18px;padding-bottom:3px}
html.embed #screen{padding:6px 2px 3px}
html.embed footer{display:none}
html.embed .tm-herowrap{width:56px;margin:4px auto 0}
html.embed h1{font-size:11px;margin:2px 0 5px}
html.embed h2{font-size:10px;margin:3px 0 5px}
html.embed p{font-size:9px;margin:3px 0 5px}
html.embed button{font-size:9px;padding:6px}
html.embed .tabs button{font-size:7px;padding:5px 2px}

/* Centre short screen stacks inside the tube. Overflowing content keeps top-starting
   and scrollable, because auto margins resolve to zero when there is no free space.
   The card slot is centred in the deck padding box rather than pinned to its left. */
#screen{display:flex;flex-direction:column}
#screen>*{flex:0 0 auto}
#screen>:first-child{margin-block-start:auto}
#screen>:last-child{margin-block-end:auto}
.crt-deck{justify-content:space-between}

/* --- the case control strip: three knobs beside the card slot ----------------
   Ported from the desktop's built stylesheet (widget/assets/index-CMKsJFHt.css),
   values copied verbatim: 16px knobs, 10px gap, an amber ring when pressed, and a
   28px-wide rocker for the third control. Absolutely placed so the card slot keeps
   the horizontal centring WB4 pins, which is the one deliberate difference from the
   desktop's space-between deck. */
.crt-knobs{display:flex;flex:none;align-items:center;gap:10px;margin-bottom:2px}
.crt-knob,.crt-rocker{appearance:none;cursor:pointer;background:radial-gradient(circle at 35% 30%,#4a433c,#1a1613 70%);border:0;border-radius:50%;width:16px;height:16px;padding:0;margin:0;box-shadow:0 1px #ffffff59,inset 0 -2px 3px #0000008c}
.crt-knob[aria-pressed="true"]{box-shadow:0 0 0 1px #ffb000,0 0 8px #ffb000d9,inset 0 -2px 3px #0000008c}
.crt-rocker{border-radius:8px;width:28px}
.crt-rocker[aria-pressed="true"]{box-shadow:0 0 0 1px #ffb000,0 0 8px #ffb000b3}
.crt-knob:focus-visible,.crt-rocker:focus-visible{outline:1px solid var(--hot);outline-offset:2px}
/* The PVM (dark) finish of the controls, exactly as the desktop's is-pvm override. */
#stage.is-pvm .crt-knob,#stage.is-pvm .crt-rocker{background:linear-gradient(#5a5a5e,#2c2c2f);border-radius:2px;box-shadow:inset 0 1px #fff3,0 1px #000}
#stage.is-pvm .crt-knob[aria-pressed="true"]{box-shadow:0 0 0 1px #ffb000,0 0 8px #ffb000b3,inset 0 1px #fff3}
#stage.is-pvm .crt-rocker{border-radius:8px;width:28px}

/* The CREAM case. On the desktop cream is the BASE rule set and PVM is the override,
   so these are the desktop's own case values, not an invented palette: rounded 26px
   shell, cream gradient, cream well and lip with the amber glow inside. The tube stays
   a dark CRT and nothing inside it changes - not the text, the buttons or the coin. */
#stage.is-cream .crt-shell{background:linear-gradient(#efeae1 0%,#d9d2c5 38%,#c3b9a8 100%);border-radius:26px;padding:16px 16px 12px;box-shadow:0 28px 60px #0000008c,inset 0 1px #ffffffb8,inset 0 -10px 18px #46341c29}
#stage.is-cream .crt-well{background:#1a140e;border-radius:18px;padding:8px;box-shadow:inset 0 2px 6px #000000a6,0 0 0 1px #281c1073}
#stage.is-cream .crt-lip{background:#070604;border-radius:14px;padding:7px;box-shadow:inset 0 0 0 1px #ffc46e47,inset 0 0 22px #f0b34a6b,0 0 18px #f08c2838}
#stage.is-cream .crt-tube{background:#060908;border-radius:10px;box-shadow:inset 0 0 0 1px #000c}
#stage.is-cream .crt-slot-mouth{background:linear-gradient(#2a2118 0%,#070503 72%);border-radius:2px 2px 0 0;height:9px;box-shadow:inset 0 4px 4px #000000d9,inset 0 -1px #ffc46e59,0 0 0 1px #281c10d9}
#stage.is-cream .crt-slot-tray{background:linear-gradient(#b7aea0,#6e675d);border-radius:0 0 2px 2px;height:6px;margin:0 8px;box-shadow:0 2px #00000059}
#stage.is-cream .crt-knob,#stage.is-cream .crt-rocker{background:radial-gradient(circle at 35% 30%,#4a433c,#1a1613 70%);border-radius:50%;box-shadow:0 1px #ffffff59,inset 0 -2px 3px #0000008c}
#stage.is-cream .crt-rocker{border-radius:8px;width:28px}

/* Full screen: the case scales as ONE unit, centred, keeping 400x412. */
#stage.is-fullscreen{display:grid;place-items:center;width:100vw;height:100vh;overflow:hidden}
#stage.is-fullscreen .crt-shell{flex:none;width:400px;height:412px;transform:scale(var(--bezel-scale,1));transform-origin:center center}
