:root {
  --ink: #14110e;
  --panel: #1d1914;
  --line: #3a3128;
  --bone: #f4efe6;
  --muted: #b4a89a;
  --ember: #e4572e;
  --tungsten: #e6c27a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--bone); font-family: Sora, sans-serif; }
body { display: grid; grid-template-rows: auto 1fr auto; }
header, footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 16px; border-color: var(--line); }
header { border-bottom: 1px solid var(--line); }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand img { width: 36px; height: 36px; }
.brand p { margin: 0; letter-spacing: 0.16em; text-transform: uppercase; font-size: 10px; color: var(--tungsten); }
.brand strong { font-family: Fraunces, serif; font-size: 22px; font-weight: 560; }
.account, .row { display: flex; gap: 8px; align-items: center; }
.pill { border: 1px solid var(--tungsten); color: var(--tungsten); padding: 6px 10px; font-size: 12px; }
button, select, input, textarea { font: inherit; color: var(--bone); background: transparent; border: 1px solid var(--line); }
button, .ember, .ghost { cursor: pointer; padding: 8px 12px; }
.ember { background: var(--ember); border-color: var(--ember); color: #1a0d08; font-weight: 600; }
.stage { display: grid; grid-template-columns: 320px 1fr; min-height: 0; }
aside { padding: 16px; border-right: 1px solid var(--line); overflow: auto; background: linear-gradient(180deg, #221c16, var(--panel)); }
.kicker { letter-spacing: 0.18em; text-transform: uppercase; color: var(--tungsten); font-size: 11px; }
h1, h2 { font-family: Fraunces, serif; font-weight: 560; }
h1 { font-size: 28px; line-height: 1.05; margin: 8px 0 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
textarea, select, input { padding: 8px; background: #100e0c; }
#result { white-space: pre-wrap; min-height: 120px; max-height: 240px; overflow: auto; background: #100e0c; padding: 10px; font-size: 12px; border: 1px dashed var(--line); }
.screen { min-height: 0; background: #0c0b0a; }
iframe { width: 100%; height: 100%; border: 0; }
.msg { min-height: 1.2em; color: var(--tungsten); font-size: 12px; }
dialog { border: 1px solid var(--line); background: var(--panel); color: var(--bone); padding: 18px; width: min(420px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.62); }
.packs { display: grid; gap: 8px; margin: 12px 0; }
.packs label { flex-direction: row; align-items: center; color: var(--bone); }
.fine { color: var(--muted); font-size: 12px; }
.reg-only { display: none; }
.mode-register .reg-only { display: flex; }
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
  .screen { height: 70vh; }
  header, footer { align-items: flex-start; flex-direction: column; }
}
