/* ─────────────────────────────────────────────────────────────
   player.css — Game Boy player, in the michell.info visual style.
   Clean screen + quiet control strip (no plastic device shell).
   ───────────────────────────────────────────────────────────── */

/* ── Page header (matches the rest of the site) ── */
.page-head {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(110px, 14vw, 170px) var(--pad-x) clamp(36px, 5vw, 64px);
}
.crumbs {
  font-family: "Geist Mono", monospace; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.crumbs a { color: var(--ink-2); transition: color .2s; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: 0.5; }

h1.page-title {
  font-family: "Instrument Serif", serif; font-weight: 400;
  font-size: clamp(64px, 10vw, 160px);
  line-height: 0.92; letter-spacing: -0.02em;
  margin: 0 0 18px 0;
}
h1.page-title .it { color: var(--ink-2); }
.page-lede {
  font-family: "Instrument Serif", serif;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.25; color: var(--ink-2);
  max-width: 42ch; margin: 0;
}

.play-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(60px, 9vw, 110px);
}

/* ── Outer console card ── */
.gb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
@media (max-width: 860px) {
  .gb { grid-template-columns: 1fr; }
}

/* ── Screen column ── */
.gb-screen-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 2.4vw, 26px);
  position: relative;
  overflow: hidden;
}
.gb-screen-card::before {
  /* faint top label row */
  content: "DOT MATRIX WITH STEREO SOUND";
  position: absolute; top: 14px; left: 0; right: 0;
  text-align: center;
  font-family: "Geist Mono", monospace; font-size: 9px;
  letter-spacing: 0.34em; color: var(--ink-3); opacity: 0.5;
  pointer-events: none;
}

.gb-bezel {
  margin-top: 26px;
  background: oklch(0.22 0.012 60);
  border-radius: 12px;
  padding: clamp(14px, 2.2vw, 22px);
  position: relative;
  box-shadow: inset 0 2px 10px rgba(0,0,0,.4);
}
.gb-bezel::after {
  /* power LED */
  content: "";
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.gb-canvas-hold {
  position: relative;
  width: 100%;
  aspect-ratio: 160 / 144;
  background: #0b0f08;
  border-radius: 4px;
  overflow: hidden;
}
#gb-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  image-rendering: pixelated;
  display: block;
}

/* Boot / idle overlay */
.gb-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
  background: linear-gradient(160deg, oklch(0.86 0.07 130), oklch(0.74 0.09 135));
  color: oklch(0.26 0.05 140);
  font-family: "Geist Mono", monospace;
  transition: opacity .5s ease;
  z-index: 3;
  gap: 10px;
}
.gb-overlay.hidden { opacity: 0; pointer-events: none; }
.gb-overlay .ov-inner { display: grid; gap: 14px; justify-items: center; padding: 20px; }
.gb-overlay .ov-mark {
  font-family: "Instrument Serif", serif; font-style: italic;
  font-size: clamp(28px, 5vw, 44px); line-height: 1;
}
.gb-overlay .ov-press {
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  animation: blink 1.3s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.gb-overlay .ov-btn {
  font-family: "Geist Mono", monospace; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 11px 22px; border-radius: 999px;
  background: oklch(0.26 0.05 140); color: oklch(0.88 0.07 130);
  border: none; cursor: none;
  transition: transform .2s ease, background .2s ease;
}
.gb-overlay .ov-btn:hover { transform: translateY(-2px); }
.gb-overlay .ov-note { font-size: 9px; letter-spacing: 0.12em; opacity: 0.7; max-width: 30ch; line-height: 1.5; }

/* No-ROM state */
.gb-overlay.is-empty {
  background: var(--bg-3);
  color: var(--ink-2);
}
.gb-overlay.is-empty .ov-mark { color: var(--ink); }

/* ── Control strip under the screen ── */
.gb-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 18px;
}
.gb-btn {
  font-family: "Geist Mono", monospace; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2);
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg);
  cursor: none; display: inline-flex; align-items: center; gap: 7px;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.gb-btn:hover { background: var(--bg-3); border-color: var(--line-strong); color: var(--ink); }
.gb-btn.is-active { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.gb-btn svg { width: 13px; height: 13px; }
.gb-strip .spacer { flex: 1 1 auto; }
.gb-fps {
  font-family: "Geist Mono", monospace; font-size: 10px;
  letter-spacing: 0.06em; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ── Side column ── */
.gb-aside { display: grid; gap: 16px; }
.gb-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 20px;
}
.gb-card h3 {
  font-family: "Geist Mono", monospace; font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 14px 0; font-weight: 500;
}

/* keymap rows */
.keymap { display: grid; gap: 9px; }
.keymap .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.keymap .lbl { font-size: 13px; color: var(--ink-2); }
.keymap .keys { display: flex; gap: 5px; }
.kbd {
  font-family: "Geist Mono", monospace; font-size: 10px;
  min-width: 22px; padding: 4px 7px; text-align: center;
  border-radius: 6px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--ink);
  box-shadow: 0 1.5px 0 var(--line-strong);
}

/* meta list */
.gb-meta { display: grid; gap: 10px; }
.gb-meta .m {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.gb-meta .m:last-child { border-bottom: none; padding-bottom: 0; }
.gb-meta .m .k { color: var(--ink-3); font-family: "Geist Mono", monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.gb-meta .m .v { color: var(--ink); text-align: right; }

/* gamepad hint */
.pad-hint { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--ink-2); }
.pad-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; transition: background .3s; }
.pad-hint.connected .pad-dot { background: var(--good); box-shadow: 0 0 8px var(--good); }

/* ── On-screen D-pad for touch (mobile only) ── */
.gb-touch { display: none; }
@media (max-width: 860px), (pointer: coarse) {
  .gb-touch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px; margin-top: 18px; align-items: center;
  }
  .dpad {
    width: 132px; height: 132px; position: relative; justify-self: center;
  }
  .dpad button {
    position: absolute; width: 44px; height: 44px;
    background: var(--bg-3); border: 1px solid var(--line-strong);
    color: var(--ink-2); border-radius: 8px; cursor: none;
    display: grid; place-items: center;
  }
  .dpad .up { top: 0; left: 44px; } .dpad .down { bottom: 0; left: 44px; }
  .dpad .left { left: 0; top: 44px; } .dpad .right { right: 0; top: 44px; }
  .dpad button:active { background: var(--accent); color: var(--bg); }
  .ab { display: flex; gap: 14px; justify-self: center; align-items: center; }
  .ab button {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--accent); color: var(--bg); border: none;
    font-family: "Geist Mono", monospace; font-weight: 600; cursor: none;
  }
  .ab button:active { transform: scale(0.93); }
  .startsel { grid-column: 1 / -1; display: flex; gap: 12px; justify-content: center; }
  .startsel button {
    font-family: "Geist Mono", monospace; font-size: 9px; letter-spacing: 0.1em;
    text-transform: uppercase; padding: 8px 16px; border-radius: 999px;
    background: var(--bg-3); border: 1px solid var(--line-strong); color: var(--ink-2); cursor: none;
  }
  .startsel button:active { background: var(--accent); color: var(--bg); }
}

/* toast */
.gb-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg);
  font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: 0.06em;
  padding: 11px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 80;
}
.gb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* fullscreen */
.gb-screen-card:fullscreen {
  display: grid; place-items: center;
  background: #000; padding: 4vh 4vw;
}
.gb-screen-card:fullscreen::before { display: none; }
.gb-screen-card:fullscreen .gb-bezel { margin-top: 0; width: min(92vw, 160vh); }
.gb-screen-card:fullscreen .gb-strip { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); }

/* ═══════════════════════════════════════════════════════════════
   Extended project sections — Status · Workshop · Gallery
   Built on the site's .rubric frame; only section-specific styles here.
   ═══════════════════════════════════════════════════════════════ */

.mono { font-family: "Geist Mono", monospace; }

/* ── 01 / Status ── */
.stand-body { display: grid; gap: clamp(26px, 4vw, 40px); }
.stand-lede {
  font-family: "Instrument Serif", serif;
  font-size: clamp(20px, 2.1vw, 28px); line-height: 1.35;
  color: var(--ink); margin: 0; max-width: 48ch;
}
.stand-lede .it { color: var(--ink-2); }

.prog { max-width: 520px; }
.prog-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.prog-label { font-size: 13px; color: var(--ink-2); }
.prog-val { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.prog-track {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--line);
}
.prog-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 60%, var(--good)));
  transition: width 1.1s cubic-bezier(.2,.7,.2,1);
}
.prog-stage {
  margin-top: 11px; font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3);
  display: flex; align-items: center;
}

/* milestones */
.miles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 520px; }
.mile {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
  font-size: 15px; color: var(--ink-2);
}
.miles .mile:last-child { border-bottom: none; }
.mile-dot {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--line-strong); background: var(--bg);
  position: relative; transition: all .3s;
}
.mile.done { color: var(--ink); }
.mile.done .mile-dot { background: var(--good); border-color: var(--good); }
.mile.done .mile-dot::after {
  content: "✓"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 8px; color: var(--bg); font-weight: 700;
}
.mile.now { color: var(--ink); }
.mile.now .mile-dot {
  border-color: var(--accent); background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.mile.now .mile-txt { font-weight: 500; }

/* ── 02 / Workshop ── */
.shop-body { display: grid; gap: clamp(34px, 5vw, 52px); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.flow-step {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start;
  padding: 18px 0; border-top: 1px solid var(--line);
}
.flow-step:first-child { border-top: none; }
.flow-no {
  font-size: 13px; color: var(--ink-3); padding-top: 3px;
  font-variant-numeric: tabular-nums; letter-spacing: 0.05em;
}
.flow-txt h3 {
  font-family: "Instrument Serif", serif; font-weight: 400;
  font-size: clamp(20px, 2vw, 26px); margin: 0 0 6px 0; color: var(--ink);
}
.flow-txt p { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 52ch; line-height: 1.55; }

/* toolbox */
.tools-head {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 16px 0; font-weight: 500;
}
.tool-grid {
  margin: 0; display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
@media (max-width: 560px) { .tool-grid { grid-template-columns: 1fr; } }
.tool { background: var(--bg-2); padding: 16px 18px; display: grid; gap: 5px; }
.tool dt {
  font-family: "Geist Mono", monospace; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.tool dd { margin: 0; font-size: 15px; color: var(--ink); }
.tool dd:empty::after,
.tool dd[data-empty]::after {
  content: attr(data-placeholder);
  color: var(--ink-3); font-style: italic; font-family: "Instrument Serif", serif; font-size: 16px;
}

/* ── 03 / Gallery ── */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.shot {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-2);
  cursor: none; aspect-ratio: 4 / 3;
}
.shot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .4s;
}
.shot:hover img { transform: scale(1.04); }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 14px 12px; font-family: "Geist Mono", monospace;
  font-size: 11px; letter-spacing: 0.03em; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
}
.shot:hover figcaption { opacity: 1; transform: translateY(0); }

/* empty state */
.gallery.is-empty {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.shot-empty {
  aspect-ratio: 4 / 3; border-radius: var(--radius);
  border: 1.5px dashed var(--line-strong); background: var(--bg-2);
  display: grid; place-items: center; text-align: center; padding: 20px;
}
.shot-empty span {
  font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: 0.04em;
  color: var(--ink-3); line-height: 1.6; max-width: 24ch;
}
.shot-empty .ico { font-size: 22px; opacity: 0.4; margin-bottom: 8px; display: block; }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  display: none; place-items: center; padding: 5vh 5vw;
  background: rgba(10, 12, 9, 0.92); backdrop-filter: blur(4px);
}
.lightbox.open { display: grid; }
.lb-fig { margin: 0; display: grid; gap: 12px; justify-items: center; max-width: 100%; }
.lb-fig img {
  max-width: 100%; max-height: 80vh; border-radius: 8px;
  image-rendering: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lb-fig figcaption { color: #d9e6cf; font-size: 12px; letter-spacing: 0.04em; text-align: center; }
.lb-close {
  position: fixed; top: 20px; right: 24px; z-index: 121;
  width: 42px; height: 42px; border-radius: 50%; cursor: none;
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2);
  font-size: 16px; transition: background .2s;
}
.lb-close:hover { background: rgba(255,255,255,.2); }
