: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;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}
