/* DIGZ landing · direction B «16-bit». Tokens and .win come from brand.css; this file is layout. */

html, body { overflow: visible; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { min-width: 320px; overflow-x: clip; background: var(--night); font-size: 17px; line-height: 1.5; }
a { color: inherit; }
img, canvas, svg { max-width: 100%; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
[data-sprite] svg { width: 100%; height: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--cream); color: var(--ink); padding: 8px 14px; font-family: var(--f-display); font-size: 20px; text-transform: uppercase; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--ore); outline-offset: 3px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 28px;
       padding: 0 32px; background: var(--void); border-bottom: 4px solid var(--shade-3); }
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-mark { display: block; width: 48px; }
.nav-word { display: block; width: 111px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a, .nav-x, .foot-x { font-family: var(--f-display); font-size: 24px; line-height: 1; text-transform: uppercase;
       letter-spacing: .04em; color: var(--cream-dim); text-decoration: none; }
.nav-links a:hover, .nav-x:hover, .foot-x:hover { color: var(--cream); }
.nav-x { color: var(--cream); padding: 6px 14px 7px; border: 3px solid var(--cream-dim); }
.nav-x:hover { border-color: var(--cream); }

/* ---------- hero ---------- */
.hero { position: relative; height: max(780px, calc(100svh - 64px)); max-height: 960px; overflow: hidden; background: var(--void); }
.hero-scene { position: absolute; inset: 0; }
.hero-scene canvas { width: 100%; height: 100%; object-fit: cover; object-position: 78% 100%; }

.hero .win { position: absolute; }
.hud { top: 22px; }
.hud .in { display: flex; gap: 28px; padding: 13px 22px 15px; }
.cell { display: flex; flex-direction: column; gap: 8px; }
.cell .label { font-size: 17px; }
.hud .num { font-size: 36px; }
.hud-l { left: 28px; }
.hud-r { right: 28px; }

.dlg { left: 56px; top: 132px; width: min(660px, 52vw); }
.dlg .in { padding: 30px 36px 28px; }
.dlg h1 { font-size: clamp(52px, 5.4vw, 80px); line-height: .9; }
.sub { margin-top: 16px; font-size: 19px; line-height: 1.5; color: #d9d3e6; max-width: 31em; text-wrap: pretty; }

.rig { margin-top: 22px; }
.field-label { display: block; font-size: 17px; margin-bottom: 8px; }
.field { width: 100%; font-family: var(--f-num); font-size: 26px; line-height: 1; color: var(--cream);
         background: var(--ink); border: 3px solid var(--win-line); padding: 10px 14px 9px; border-radius: 0; }
.field::placeholder { color: #7c7a92; }
.field:focus-visible { outline: none; border-color: var(--cream); }
.field[aria-invalid="true"] { border-color: var(--lamp-deep); }
.field-err { margin-top: 6px; font-size: 15px; color: var(--lamp); }

.cta { margin-top: 18px; display: flex; align-items: center; gap: 16px; }
.hand { width: 56px; flex: none; }
.start { position: relative; flex: none; cursor: pointer; font-family: var(--f-display); font-size: 36px; line-height: 1;
         text-transform: uppercase; letter-spacing: .04em; color: var(--ink); background: var(--lamp);
         border: 4px solid var(--ink); border-bottom: 10px solid var(--lamp-deep); padding: 9px 34px 8px;
         clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
.start:hover { background: #ffad52; }
.start:active { transform: translateY(4px); border-bottom-width: 6px; }
.start[aria-pressed="true"] { background: var(--cream); border-bottom-color: var(--cream-dim); }
.start:focus-visible { outline: none; background: var(--ore-hi); }
.hint { font-size: 15px; line-height: 1.45; color: var(--cream-dim); max-width: 20em; }

.ctl { margin-top: 18px; padding-top: 16px; border-top: 2px solid var(--win-line); display: grid;
       grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; }
.ctl-cap { display: flex; align-items: center; gap: 12px; }
.ctl-cap .label { font-size: 17px; white-space: nowrap; }
.ctl-cap output { font-size: 28px; min-width: 2.4em; color: var(--cream); }
.meter.load { gap: 3px; }
.meter.load i { height: 18px; background: var(--ink); outline: 2px solid var(--win-3); outline-offset: -2px; }
.meter.load i.on { background: var(--ore); outline: 0; }
.meter.load i.cap { background: transparent; outline: 2px solid var(--win-2); outline-offset: -2px; }
.meter.load i.on.dim { background: var(--lamp-deep); }
.snd { cursor: pointer; font-family: var(--f-display); font-size: 20px; line-height: 1; text-transform: uppercase; letter-spacing: .05em;
       color: var(--cream-dim); background: transparent; border: 3px solid var(--win-line); padding: 6px 10px 7px; white-space: nowrap; }
.snd[aria-pressed="true"] { color: var(--ink); background: var(--cream); border-color: var(--cream); }

/* pixel range slider */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 120px; height: 24px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; background: var(--ink); border: 2px solid var(--win-line); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 22px; margin-top: -9px; background: var(--cream); border: 3px solid var(--ink); border-radius: 0; }
input[type="range"]::-moz-range-track { height: 8px; background: var(--ink); border: 2px solid var(--win-line); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 22px; background: var(--cream); border: 3px solid var(--ink); border-radius: 0; }

.how { left: 28px; right: 28px; bottom: 22px; }
.how ol { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 8px; min-height: 88px; }
.how li { display: flex; align-items: center; padding: 14px 22px; font-size: 18px; line-height: 1.35; }
.how li + li { border-left: 2px solid var(--win-line); }

/* ---------- strata between sections (pixel rock band drawn by site.js) ---------- */
.strata { height: 40px; background-color: var(--shade-1); background-repeat: repeat-x; background-size: auto 100%;
          image-rendering: pixelated; border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }

/* ---------- sections ---------- */
.sec { padding: 88px 0 96px; }
.sec:nth-of-type(odd) { background: var(--night); }
#mine, #honest { background: var(--void); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow .faq { max-width: 880px; }
.sec-h { font-size: clamp(48px, 5vw, 72px); margin-bottom: 32px; }
.cap, .note { margin-top: 18px; font-size: 16px; color: var(--cream-dim); max-width: 46em; }

/* live round */
.live .in { display: grid; grid-template-columns: repeat(5, 1fr); }
.live .cell { padding: 24px 26px 26px; gap: 14px; }
.live .cell + .cell { border-left: 2px solid var(--win-line); }
.live .num { font-size: 64px; }

/* game panel */
.mine-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.map .in { display: flex; flex-direction: column; }
.map-hud { display: flex; align-items: center; gap: 30px; padding: 16px 22px 14px; border-bottom: 2px solid var(--win-line); }
.map-hud .num { font-size: 36px; }
.map-hud .cell { min-width: 4.2em; }
.start-sm { margin-left: auto; font-size: 26px; padding: 6px 22px 5px; border-bottom-width: 8px; }
.map-view { position: relative; margin: 12px; background: var(--void); }
.map-view canvas { width: 100%; height: auto; aspect-ratio: 320 / 140; }
.tag { position: absolute; font-size: 24px; color: var(--cream); background: var(--ink); padding: 1px 6px 2px; line-height: 1; white-space: nowrap; }
.tag small { font-size: .6em; }
.tag-top { left: calc(11.5% + 6px); top: 4%; }
.tag-drift { left: calc(11.5% + 6px); top: 62%; color: var(--ore-hi); }
.tag-drift::before { content: ""; position: absolute; left: -14px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-right: 7px solid var(--ink); border-left: 0; }

.shift .in { padding: 14px 22px 18px; display: flex; }
.shift .tbl { height: 100%; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-family: var(--f-display); font-weight: 400; font-size: 18px; text-transform: uppercase; letter-spacing: .08em;
          color: var(--cream-dim); text-align: left; padding: 8px 0 12px; border-bottom: 2px solid var(--win-line); }
.tbl th:not(:first-child), .tbl td:not(:first-child) { text-align: right; }
.tbl td { font-family: var(--f-num); font-size: 26px; line-height: 1; padding: 13px 0 11px; border-bottom: 2px dashed var(--win-3); white-space: nowrap; }
.tbl td small { font-family: var(--f-body); font-size: 14px; color: var(--cream-dim); margin-left: 4px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { color: var(--cream); }

/* scheme */
.scheme { margin: 0; }
.flow { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; padding: 8px 0 0; }
.flow::before { content: ""; position: absolute; left: 10%; right: 10%; top: 120px; height: 6px;
                background: repeating-linear-gradient(90deg, var(--rock-4) 0 12px, transparent 12px 28px), var(--shade-3);
                border-top: 4px solid #838da5; }
.flow li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 30px; }
.flow li + li::before { content: ""; position: absolute; left: -18px; top: 100px; width: 0; height: 0;
                        border-top: 14px solid transparent; border-bottom: 14px solid transparent; border-left: 18px solid var(--ore); }
.ico { display: block; width: 112px; height: 112px; position: relative; z-index: 1; }
.ico svg { width: 100%; height: 100%; }
.node { font-size: 40px; color: var(--cream); }
.flow li:nth-child(2) .node { color: var(--ore); }
.scheme .cap { margin-top: 36px; }

/* honest */
.honest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 4px solid var(--cream); }
.honest p { padding: 24px 28px 0 0; font-size: 18px; line-height: 1.6; }
.honest p + p { padding-left: 28px; border-left: 2px solid var(--shade-3); }

/* faq */
.faq { border-top: 4px solid var(--shade-3); }
.faq details { border-bottom: 4px solid var(--shade-3); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 20px 0 20px;
               font-size: 21px; line-height: 1.35; color: var(--cream); }
.faq summary::-webkit-details-marker { display: none; }
.hand-s { flex: none; width: 32px; visibility: hidden; }
.faq summary:hover .hand-s, .faq summary:focus-visible .hand-s, .faq details[open] .hand-s { visibility: visible; }
.faq summary:focus-visible { outline-offset: -3px; }
.faq details p { padding: 0 0 24px 46px; font-size: 17px; line-height: 1.65; color: #d9d3e6; max-width: 44em; }

/* footer */
.foot { background: var(--void); padding-bottom: 36px; }
.rails { height: 14px; background:
  linear-gradient(var(--ink) 0 0) 0 0 / 100% 2px no-repeat,
  linear-gradient(#b2bbcd 0 0) 0 2px / 100% 2px no-repeat,
  linear-gradient(#838da5 0 0) 0 4px / 100% 2px no-repeat,
  repeating-linear-gradient(90deg, #5e3a21 0 12px, transparent 12px 28px) 0 6px / 100% 8px no-repeat; background-color: var(--void); }
.foot-in { display: flex; align-items: center; gap: 32px; padding-top: 30px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-x { color: var(--cream); }
.foot-ca { display: flex; align-items: baseline; gap: 10px; }
.foot-ca .label { font-size: 18px; }
.foot-ca code { font-size: 26px; }
.foot-chain { margin-left: auto; font-size: 16px; color: var(--cream-dim); }

/* ---------- 1024 ---------- */
@media (max-width: 1180px) {
  .hud .num { font-size: 30px; }
  .hud .in { gap: 20px; padding: 11px 16px 13px; }
  .dlg { left: 32px; width: min(600px, 60vw); }
  .how li { font-size: 16px; padding: 12px 16px; }
  .live .num { font-size: 48px; }
  .live .cell { padding: 20px 18px 22px; }
  .mine-grid { grid-template-columns: 1fr; }
  .ico { width: 88px; height: 88px; }
  .flow::before { top: 96px; }
  .flow li + li::before { top: 78px; }
  .node { font-size: 34px; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { padding: 0 16px; gap: 16px; height: 56px; }
  .nav-links { display: none; }
  .nav-x { margin-left: auto; }
  .nav-mark { width: 40px; }
  .nav-word { width: 84px; }
  html { scroll-padding-top: 64px; }

  .hero { height: auto; max-height: none; display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 16px; }
  .hero .win { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: auto; }
  .dlg { order: 1; }
  .hero-scene { position: relative; order: 2; height: 300px; margin: 0 -12px; }
  .hero-scene canvas { object-position: 86% 100%; }
  .hud-l { order: 3; }
  .hud-r { order: 4; }
  .how { order: 5; }
  .hud .in { justify-content: space-between; }
  .dlg .in { padding: 22px 18px 20px; }
  .dlg h1 { font-size: 46px; }
  .sub { font-size: 16px; }
  .field { font-size: 22px; }
  .cta { flex-wrap: wrap; gap: 12px; }
  .hand { width: 40px; }
  .hint { flex-basis: 100%; }
  .ctl { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .ctl-cap { min-width: 0; }
  .ctl-cap { grid-column: 1 / -1; }
  .ctl .meter { grid-column: 1; grid-row: 2; }
  .snd { grid-column: 2; grid-row: 2; }
  input[type="range"] { width: 100%; min-width: 0; flex: 1; }
  .ctl-cap { flex: 1; }
  .how ol { grid-template-columns: 1fr; padding: 4px 0; }
  .how li { padding: 12px 16px; }
  .how li + li { border-left: 0; border-top: 2px solid var(--win-line); }

  .strata { height: 28px; }
  .sec { padding: 56px 0 64px; }
  .wrap { padding: 0 16px; }
  .sec-h { font-size: 44px; margin-bottom: 22px; }
  .live .in { grid-template-columns: 1fr 1fr; }
  .live .cell { padding: 16px; }
  .live .cell + .cell { border-left: 0; }
  .live .cell:nth-child(even) { border-left: 2px solid var(--win-line); }
  .live .cell:nth-child(n+3) { border-top: 2px solid var(--win-line); }
  .live .cell:last-child { grid-column: 1 / -1; border-left: 0; }
  .live .num { font-size: 44px; }
  .cell .label { font-size: 15px; }

  .map-hud { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; padding: 14px 16px; }
  .map-hud .cell { min-width: 0; }
  .map-hud .num { font-size: 30px; }
  .start-sm { margin-left: 0; width: 100%; grid-column: 1 / -1; }
  .map-view { margin: 8px; }
  .tag { font-size: 18px; }
  .shift .in { padding: 8px 14px 12px; }
  .tbl td { font-size: 22px; }

  .flow { grid-template-columns: 1fr; gap: 26px; padding: 0; }
  .flow::before { left: 52px; right: auto; top: 30px; bottom: 30px; width: 6px; height: auto;
                  background: repeating-linear-gradient(180deg, var(--rock-4) 0 12px, transparent 12px 28px), var(--shade-3);
                  border-top: 0; border-left: 4px solid #838da5; }
  .flow li { flex-direction: row; gap: 24px; }
  .flow li + li::before { left: 40px; top: -22px; border-left: 14px solid transparent; border-right: 14px solid transparent;
                          border-top: 16px solid var(--ore); border-bottom: 0; }
  .ico { width: 112px; height: 112px; }
  .node { font-size: 36px; }

  .honest { grid-template-columns: 1fr; }
  .honest p { padding: 20px 0 0; font-size: 16px; }
  .honest p + p { padding-left: 0; border-left: 0; border-top: 2px solid var(--shade-3); margin-top: 20px; }

  .faq summary { font-size: 18px; gap: 10px; }
  .hand-s { width: 24px; }
  .faq details p { padding-left: 34px; font-size: 16px; }

  .foot-in { gap: 18px 24px; }
  .foot-chain { margin-left: 0; flex-basis: 100%; }
}

/* round table: empty state until the first round closes */
.tbl tr.empty td { text-align: center; color: var(--cream-dim); padding: 28px 12px; white-space: normal; font-family: var(--f-body); font-size: 18px; line-height: 1.4; }
