:root {
  --case: #2a2520;
  --case2: #1c1815;
  --cream: #d9cbb0;
  --amber: #f59e0b;
  --red: #dc2626;
  --green: #8cff8c;
  --panel: #201c18;
  --border: #4a4038;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 30% 10%, #33291f 0%, #16110d 60%, #0d0906 100%);
  color: var(--cream);
  font-family: 'IBM Plex Mono', monospace;
  min-height: 100vh;
}
.app-root { max-width: 1400px; margin: 0 auto; padding: 12px; }

/* header */
.atom-header {
  background: linear-gradient(180deg, #3a3128, #221c16);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  box-shadow: inset 0 1px 0 #57493a, 0 4px 16px rgba(0,0,0,.5);
}
.atom-header h1 {
  font-family: 'VT323', monospace;
  font-size: 2.4rem; margin: 0; letter-spacing: 2px;
  color: var(--amber); text-shadow: 0 0 10px rgba(245,158,11,.4);
}
.subtitle { font-size: .65rem; color: #a89878; letter-spacing: 1px; align-self: flex-end; padding-bottom: 6px; }
.status-line { color: var(--green); font-family: 'VT323', monospace; font-size: 1rem; }
.power-led {
  width: 12px; height: 12px; border-radius: 50%;
  background: #401010; border: 1px solid #601818;
  transition: .3s;
}
.power-led.live {
  background: #ff2020; box-shadow: 0 0 12px #ff3030, 0 0 4px #ff6060;
}

/* layout */
.main-grid {
  display: grid; gap: 12px; margin-top: 12px;
  grid-template-columns: 300px 1fr 300px;
}
@media (max-width: 1050px) {
  .main-grid { grid-template-columns: 1fr; }
  .atom-header h1 { font-size: 2rem; }
}
.panel {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  box-shadow: inset 0 1px 0 #3a322a;
}
.panel-title {
  font-size: .7rem; letter-spacing: 1.5px; color: var(--amber);
  border-bottom: 1px solid var(--border); padding-bottom: 5px; margin-bottom: 10px;
  font-weight: 700;
}

/* rom slots */
.rom-slot {
  border: 1px dashed #5a4e40; border-radius: 8px;
  padding: 10px; margin-bottom: 10px; background: #171310;
  transition: .2s;
}
.rom-slot.drag { border-color: var(--amber); background: #2a2114; }
.rom-slot.loaded { border-style: solid; border-color: #2d6b3d; }
.led {
  width: 9px; height: 9px; border-radius: 50%;
  background: #333; border: 1px solid #444; display: inline-block;
}
.led.on { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.up-btn {
  background: #3a3128; color: var(--cream); border: 1px solid var(--border);
  border-radius: 5px; padding: 5px 12px; font-size: .75rem; cursor: pointer;
  font-family: inherit; width: 100%;
}
.up-btn:hover { background: #4a3f32; }
.clr-btn {
  background: #3a1c1c; color: #f88; border: 1px solid #5a2626;
  border-radius: 4px; padding: 2px 10px; font-size: .7rem; cursor: pointer;
  font-family: inherit;
}
.boot-btn {
  width: 100%; margin-top: 6px; padding: 12px;
  font-family: 'VT323', monospace; font-size: 1.3rem; letter-spacing: 1px;
  border-radius: 8px; cursor: pointer; border: 2px solid #333;
  background: #2a2520; color: #776a58;
  transition: .2s;
}
.boot-btn.ready {
  background: linear-gradient(180deg, #c0392b, #922016);
  color: #fff; border-color: #dc2626;
  box-shadow: 0 0 16px rgba(220,38,38,.4), inset 0 1px 0 rgba(255,255,255,.2);
}
.boot-btn.ready:hover { filter: brightness(1.15); }
.boot-btn.ready:active { transform: translateY(2px); }
.ghost-btn {
  width: 100%; margin-top: 8px; padding: 6px; font-size: .7rem;
  background: transparent; color: #a89878; border: 1px solid var(--border);
  border-radius: 5px; cursor: pointer; font-family: inherit;
}
.tip-box {
  margin-top: 12px; padding: 10px; font-size: .68rem; line-height: 1.5;
  color: #b8a888; background: #14100c; border-radius: 6px;
  border-left: 3px solid var(--amber);
}

/* screen */
.crt-wrap {
  background: #050805; border-radius: 8px; padding: 14px;
  border: 3px solid #0a0f0a; position: relative; overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,.9);
}
.atom-screen {
  width: 100%; image-rendering: pixelated; image-rendering: crisp-edges;
  display: block; aspect-ratio: 256 / 192;
}
.crt-wrap.crt::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0px, rgba(0,0,0,.18) 1px, transparent 2px, transparent 3px);
}
.crt-wrap.crt::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
}
.screen-off {
  position: absolute; inset: 14px; display: flex; align-items: center; justify-content: center;
  color: #1a3a1a; font-family: 'VT323', monospace; font-size: 1.4rem; letter-spacing: 3px;
}

/* controls */
.ctrl-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.mini-btn {
  background: #2a2520; color: var(--cream); border: 1px solid var(--border);
  border-radius: 5px; padding: 5px 10px; font-size: .72rem; cursor: pointer;
  font-family: inherit;
}
.mini-btn:hover:not(:disabled) { background: #3a3128; }
.mini-btn:disabled { opacity: .4; cursor: not-allowed; }
.mini-btn.sel { background: var(--amber); color: #1a1a1a; border-color: var(--amber); }

/* virtual keyboard */
.vkbd { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; justify-content: center; }
.vkbd-gap { flex-basis: 100%; height: 0; }
.vkey {
  background: #241f1a; color: var(--cream); border: 1px solid var(--border);
  border-radius: 5px; width: 30px; height: 34px; font-size: .8rem; cursor: pointer;
  font-family: inherit; box-shadow: 0 2px 0 #0a0806;
}
.vkey:active { transform: translateY(2px); box-shadow: none; }
.vkey.wide { width: 120px; }

/* memory map */
.memmap { }
.memmap-bar {
  display: flex; flex-direction: column-reverse;
  height: 480px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.memseg {
  position: relative; overflow: hidden; cursor: pointer;
  border-top: 1px solid rgba(0,0,0,.4); transition: .15s;
  display: flex; align-items: center;
}
.memseg:hover { filter: brightness(1.4); }
.memseg.active-rom { box-shadow: inset 0 0 0 2px #fff, 0 0 10px rgba(255,220,120,.6); }
.memseg-label {
  font-size: .55rem; padding-left: 4px; white-space: nowrap;
  color: rgba(255,255,255,.85); text-shadow: 0 1px 2px rgba(0,0,0,.9);
  overflow: hidden; text-overflow: ellipsis;
}
.memmap-tip {
  margin-top: 6px; font-size: .68rem; color: var(--amber);
  background: #14100c; padding: 6px; border-radius: 5px;
}

/* debug */
.debug-panel { margin-top: 12px; }
.reg-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  font-family: 'VT323', monospace; font-size: 1.1rem; color: var(--green);
}
.col-span-2 { grid-column: span 2; }
.hex-input {
  background: #0a0806; color: var(--green); border: 1px solid var(--border);
  border-radius: 4px; width: 60px; padding: 3px 5px; font-family: inherit; font-size: .75rem;
}
.hex-dump {
  background: #050805; color: var(--green); font-size: .62rem;
  padding: 8px; border-radius: 5px; overflow-x: auto; margin: 0;
  border: 1px solid var(--border); line-height: 1.4;
}

/* footer */
.atom-footer {
  margin-top: 16px; padding: 14px; text-align: center;
  border-top: 1px solid var(--border); font-size: .7rem; color: #8a7a68;
  display: flex; flex-direction: column; gap: 6px;
}
.atom-footer a {
  color: var(--amber); text-decoration: none; font-weight: 600;
}
.atom-footer a:hover { text-decoration: underline; }
</parameter>
</invoke>