:root { --bg:#0b0f0c; --panel:#111814; --line:#1f2e25; --g:#39ff88; --a:#ffb000; --ink:#cfe9d8; }
* { box-sizing:border-box; }
body { margin:0; background:
  radial-gradient(900px 500px at 30% -10%, rgba(57,255,136,.07), transparent 60%),
  repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.012) 3px 4px), var(--bg);
  color:var(--ink); font-family:"IBM Plex Mono", monospace; min-height:100vh; }
.wrap { max-width:1200px; margin:0 auto; padding:16px; }
.hdr { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; border-bottom:1px dashed var(--line); padding-bottom:12px; }
.logo { font-family:"VT323", monospace; font-size:44px; color:var(--g); margin:0; line-height:1; text-shadow:0 0 12px rgba(57,255,136,.5); }
.sub { font-size:11px; opacity:.5; letter-spacing:1px; }
.pill { font-size:11px; font-weight:700; padding:4px 10px; border:1px solid var(--g); color:var(--g); border-radius:999px; letter-spacing:1px; }
.pill.amber { border-color:var(--a); color:var(--a); }
.lnk, .foot a { color:var(--a); }
.main { display:flex; gap:20px; margin-top:18px; align-items:flex-start; }
.screen-col { flex:1; display:flex; flex-direction:column; align-items:center; min-width:0; }
.bezel { background:linear-gradient(160deg,#1a211c,#0d120f); padding:18px 18px 10px; border-radius:22px; border:1px solid #26352c; box-shadow:inset 0 2px 0 rgba(255,255,255,.04), 0 20px 50px rgba(0,0,0,.6); transition:box-shadow .3s; }
.bezel.glow { box-shadow:inset 0 2px 0 rgba(255,255,255,.04), 0 20px 50px rgba(0,0,0,.6), 0 0 60px rgba(57,255,136,.12); }
.screen-holder { position:relative; border-radius:10px; overflow:hidden; background:#000; line-height:0; }
.screen-holder.over { outline:2px dashed var(--a); }
#canvas { image-rendering:pixelated; image-rendering:crisp-edges; display:block; width:768px; height:768px; }
.crt { position:absolute; inset:0; pointer-events:none;
  background:repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 1px, transparent 1px 3px),
  radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.55)); }
.drop-hint { position:absolute; inset:0; display:none; align-items:center; justify-content:center; font-family:"VT323"; font-size:32px; color:var(--a); background:rgba(0,0,0,.7); line-height:1; }
.over .drop-hint { display:flex; }
.bezel-label { display:flex; justify-content:space-between; align-items:center; font-size:11px; opacity:.7; margin-top:8px; letter-spacing:1px; }
.led { width:8px; height:8px; border-radius:50%; background:#3a2a00; }
.led.on { background:var(--g); box-shadow:0 0 8px var(--g); }
.empty { font-size:12px; color:var(--a); opacity:.8; text-align:center; margin:10px 0 0; }
.controls { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-top:14px; align-items:center; }
.hw { font-family:inherit; font-size:12px; font-weight:700; color:var(--ink); background:linear-gradient(#1d2721,#141b17); border:1px solid #2b3b31; border-radius:10px; padding:9px 13px; cursor:pointer; box-shadow:0 3px 0 #070a08; transition:transform .06s, box-shadow .06s, border-color .2s; }
.hw:hover { border-color:var(--g); }
.hw:active, .hw.active { transform:translateY(2px); box-shadow:0 1px 0 #070a08; }
.hw.active { color:var(--g); border-color:var(--g); }
.hw.primary { color:#04140a; background:var(--g); border-color:var(--g); }
.sel { padding:8px; }
.vol { accent-color:var(--a); width:90px; }
.side { width:320px; flex-shrink:0; display:flex; flex-direction:column; gap:14px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:14px; }
.card-h { font-size:11px; letter-spacing:2px; color:var(--g); font-weight:700; margin-bottom:10px; display:flex; justify-content:space-between; cursor:default; }
summary.card-h { cursor:pointer; list-style:none; }
.tip { color:var(--a); cursor:help; }
.keypad { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.key { font-family:"VT323"; font-size:28px; aspect-ratio:1; border-radius:12px; border:1px solid #2b3b31; background:linear-gradient(#202b24,#121914); color:var(--ink); box-shadow:0 4px 0 #050806; cursor:pointer; touch-action:none; user-select:none; transition:transform .05s; }
.key.down { transform:translateY(3px); box-shadow:0 1px 0 #050806; background:var(--g); color:#04140a; box-shadow:0 0 16px rgba(57,255,136,.5); }
.kmap { font-size:10px; opacity:.45; text-align:center; margin-top:8px; }
.regs { display:grid; grid-template-columns:1fr 1fr; gap:4px 10px; font-size:11px; }
.regs b { color:var(--a); font-weight:700; margin-right:4px; }
.wave { width:100%; height:48px; margin-top:10px; border-radius:6px; border:1px solid var(--line); }
.addr { background:#060907; border:1px solid var(--line); color:var(--g); font-family:inherit; padding:5px 8px; border-radius:8px; width:90px; text-transform:uppercase; }
.hex { font-size:9.5px; line-height:1.5; margin:8px 0 0; color:#9fc7ad; overflow-x:auto; white-space:pre; }
.shelf { display:flex; flex-direction:column; gap:4px; font-size:12px; max-height:200px; overflow:auto; }
.shelf-item { display:flex; justify-content:space-between; gap:8px; text-align:left; background:none; border:1px solid transparent; color:var(--ink); padding:6px 8px; border-radius:8px; cursor:pointer; font-family:inherit; font-size:12px; }
.shelf-item:hover { border-color:var(--line); color:var(--g); }
.mini { background:none; border:none; color:var(--a); cursor:pointer; font-size:14px; }
.foot { text-align:center; font-size:11px; opacity:.6; margin-top:26px; padding:12px; border-top:1px dashed var(--line); }
.toast { position:fixed; bottom:20px; left:50%; transform:translate(-50%,40px); opacity:0; background:#14100a; border:1px solid var(--a); color:var(--a); padding:10px 16px; border-radius:10px; font-size:12px; transition:.25s; pointer-events:none; z-index:50; max-width:90vw; }
.toast.show { opacity:1; transform:translate(-50%,0); }
@media (max-width:1000px) { .main { flex-direction:column; } .side { width:100%; } }