:root {
  --bg: #0b1026; --panel: #141a40; --raised: #1a2150; --art: #1f2552;
  --line: #2a3366; --line-2: #3a4482; --shadow: #070a1c;
  --text: #eef0fa; --soft: #c7cbe6; --muted: #a9aecb;
  --accent: #ff6fa3; --accent-ink: #1a0a12; --accent-drop: #7a2a4c;
  --live: #6ff0d6; --full: #ffd45c;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 16px/1.5 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
main { flex: 1; }
a { color: var(--accent); }
a:hover { color: #ffa3c4; }
:focus-visible { outline: 2px solid var(--full); outline-offset: 4px; }
.wrap { width: min(1280px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.pixel { font-family: var(--pixel); font-weight: 400; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; }
.brand { font-family: var(--pixel); font-size: 16px; line-height: 1.4; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.brand:hover { color: var(--text); }
.online { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); }

/* Status dot + chip */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: var(--live); box-shadow: 0 0 0 3px rgba(111, 240, 214, .18); }
.dot.full { background: var(--full); }
.dot.off { background: transparent; border: 2px solid var(--muted); }
.chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 500; color: var(--muted); }
.chip.on { color: var(--live); } .chip.full { color: var(--full); }
.featured-info .chip { background: #0e2e3a; }

/* Artwork: real thumbnail, or a generated pixel pattern if it fails to load */
.art { position: relative; overflow: hidden; background: var(--art); }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art .px { position: absolute; }
.art-wide { flex: none; aspect-ratio: 16 / 9; border: 2px solid var(--line); }

/* Featured */
#featured { padding-top: 16px; }
.featured { display: flex; flex-wrap: wrap; border: 2px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--panel); }
.featured .art { flex: 1 1 560px; min-height: 340px; }
.featured .badge { position: absolute; left: 20px; top: 20px; padding: 8px 12px; background: var(--accent); color: var(--accent-ink); font-family: var(--pixel); font-size: 10px; line-height: 1.4; }
.featured-info { flex: 1 1 380px; padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.featured-info h1 { margin: 0; font-family: var(--pixel); font-weight: 400; font-size: clamp(20px, 3vw, 30px); line-height: 1.35; overflow-wrap: anywhere; }
.lede { margin: 0; font-size: 17px; line-height: 1.6; color: var(--soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Buttons */
.btn-start { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-family: var(--pixel); font-size: 13px; box-shadow: 4px 4px 0 var(--accent-drop); transition: transform .08s, box-shadow .08s; }
.btn-start:hover { color: var(--accent-ink); background: #ff86b3; }
.btn-start:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--accent-drop); }
.btn-start[aria-disabled="true"] { background: var(--line); color: var(--muted); box-shadow: none; pointer-events: none; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border: 2px solid var(--line-2); background: transparent; color: var(--text); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); }

/* Shelves */
.shelf { padding-top: 48px; }
.shelf h2 { margin: 0 0 18px; font-family: var(--pixel); font-weight: 400; font-size: 14px; line-height: 1.5; }
.row { display: flex; gap: 20px; overflow-x: auto; padding: 4px 4px 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.card { flex: 0 0 228px; display: flex; flex-direction: column; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .15s; }
.card:hover { transform: translateY(-3px); }
.card .art { aspect-ratio: 4 / 3; border: 2px solid var(--line); }
.card:hover .art { border-color: var(--accent); }
.card-title { margin-top: 12px; font-weight: 700; font-size: 16px; }
.card-meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.card-meta.on { color: var(--live); } .card-meta.full { color: var(--full); }

footer { padding: 56px 0 28px; font-size: 13px; }

/* Side sheet */
.sheet { position: fixed; inset: 0 0 0 auto; width: min(500px, 100%); height: 100%; max-height: none; max-width: none; margin: 0; padding: 0; border: 0; border-left: 2px solid var(--line); background: var(--panel); color: var(--text); box-shadow: -8px 0 0 var(--shadow); }
.sheet[open] { display: flex; flex-direction: column; animation: slide-in .18s ease-out; }
.sheet::backdrop { background: rgba(4, 6, 18, .72); }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } .card, .btn-start { transition: none; } }
.sheet-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 24px; border-bottom: 2px solid var(--line); }
.sheet-kicker { font-family: var(--pixel); font-size: 10px; line-height: 1.4; color: var(--accent); }
.sheet-body { flex: 1; overflow: auto; padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.sheet-title { margin: 0; font-size: 22px; line-height: 1.45; overflow-wrap: anywhere; }
.sheet .lede { font-size: 16px; }
.label { margin: 0 0 12px; font-size: 10px; line-height: 1.4; color: var(--muted); }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { width: 36px; height: 36px; border: 2px dashed var(--line-2); }
.slot.taken { border: 0; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.facts div { padding: 14px 16px; background: var(--raised); min-width: 0; }
.facts .span2 { grid-column: 1 / -1; }
.facts dt { font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.sheet-foot { display: flex; gap: 12px; padding: 20px 24px 24px; border-top: 2px solid var(--line); }
.sheet-foot .btn-start { flex: 1; min-height: 56px; }
.sheet-foot .btn-ghost { min-height: 56px; padding: 0 18px; font-size: 15px; }

@media (max-width: 640px) {
  .featured .art { flex-basis: 100%; min-height: 220px; }
  .featured-info { padding: 24px; }
  .card { flex-basis: 180px; }
}
