/* taymcquaya.com
   Bright flat colours with dark outlines, the way the pixel art is drawn.
   A fixed 3D layer of cubes sits behind everything (#world); sections are see-through, cards are solid. */

/* headings and labels: Jersey 20 for the regular weight, Jersey 25 for the bold one (both SIL Open Font License) */
@font-face { font-family: 'Jersey Pixel'; font-weight: 500; font-display: swap; size-adjust: 118%; src: url('../assets/fonts/jersey-20-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Jersey Pixel'; font-weight: 500; font-display: swap; size-adjust: 118%; src: url('../assets/fonts/jersey-20-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0; }
@font-face { font-family: 'Jersey Pixel'; font-weight: 700; font-display: swap; size-adjust: 118%; src: url('../assets/fonts/jersey-25-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Jersey Pixel'; font-weight: 700; font-display: swap; size-adjust: 118%; src: url('../assets/fonts/jersey-25-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0; }
@font-face { font-family: 'Figtree'; font-weight: 400; font-display: swap; src: url('../assets/fonts/figtree-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-weight: 400; font-display: swap; src: url('../assets/fonts/figtree-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0; }
@font-face { font-family: 'Figtree'; font-weight: 600; font-display: swap; src: url('../assets/fonts/figtree-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-weight: 600; font-display: swap; src: url('../assets/fonts/figtree-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0; }

:root {
  --ink: #210b1b;
  --ink-2: #4a2f45;
  --bone: #f7ead9;
  --paper: #fffaf1;
  --sand: #efdcc0;
  --gold: #f7c948;
  --lav: #b9a9f0;
  --pink: #ff9fb5;
  --green: #6fdd6a;
  --coral: #d95763;
  --shadow: rgba(33, 11, 27, .9);
  --pixel: 'Jersey Pixel', 'Courier New', monospace;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --page: 1180px;
  --pad: clamp(18px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bone); color: var(--ink); font: 400 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--pixel); font-weight: 700; line-height: 1; }
h1 { font-size: clamp(42px, 7vw, 108px); letter-spacing: -0.01em; max-width: 11ch; }
h2 { font-size: clamp(34px, 4.6vw, 64px); }
h3 { font-size: 28px; }
/* anything with digits uses the body face: in the pixel face a 5 reads like an S */
.meta { font-weight: 600; font-size: 15.5px; color: var(--ink-2); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bone); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- the 3D layer and what floats above it ---------- */
#world { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#world canvas { display: block; }
#overlay { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
main, .foot { position: relative; z-index: 1; }
.stage { pointer-events: none; }

/* ---------- buttons ---------- */
.btn { display: inline-block; font-family: var(--pixel); font-weight: 500; font-size: 18px; line-height: 1; text-decoration: none; color: var(--ink);
  background: var(--paper); padding: 11px 16px; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--shadow); transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }
.btn-main { background: var(--ink); color: var(--bone); box-shadow: 4px 4px 0 rgba(33, 11, 27, .35); }
.btn-main:hover { box-shadow: 2px 2px 0 rgba(33, 11, 27, .35); }
.btn-small { font-size: 16px; padding: 8px 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 9px var(--pad); background: var(--paper); border-bottom: 3px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--pixel); font-weight: 700; font-size: 20px; text-decoration: none; }
.brand img { width: 36px; height: 36px; image-rendering: pixelated; border: 2px solid var(--ink); }
.top nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 26px); font-family: var(--pixel); font-weight: 500; font-size: 17px; }
.top nav a { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: clamp(10px, 2vw, 26px); }
.nav-links a { position: relative; }
/* where you are: a green block standing on the header's bottom line, under the link of the current section */
.nav-links a[aria-current]::after { content: ''; position: absolute; left: 50%; bottom: -21px; width: 12px; height: 12px; margin-left: -6px; background: #2fc13a; border: 3px solid var(--ink); }
.nav-toggle { display: none; font-family: var(--pixel); font-weight: 500; font-size: 17px; line-height: 1; padding: 6px 10px; border: 3px solid var(--ink); background: var(--paper); }
.top nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.top nav .nav-cta { color: var(--bone); background: var(--ink); padding: 6px 10px; }

/* ---------- hero ---------- */
.hero { position: relative; display: flex; flex-direction: column; min-height: max(660px, calc(100svh - 60px)); padding-top: clamp(28px, 6vh, 72px); }
.hero h1 { max-width: none; font-size: clamp(38px, 6.1vw, 92px); }
.hero-text { position: relative; width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--pad); transition: opacity .25s; }
.lead { font-size: clamp(19px, 1.9vw, 24px); max-width: 30ch; margin-top: 20px; font-weight: 600; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 22px; }
.facts div { display: flex; flex-direction: column-reverse; }
.facts dd { font-weight: 600; font-size: clamp(30px, 3.2vw, 44px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.facts dt { font-size: 15px; margin-top: 4px; }
.stage-sky { position: absolute; left: 44%; right: 0; top: 16%; bottom: 10%; }
.sky-foot { position: relative; width: 100%; max-width: var(--page); margin: auto auto 0; padding: 28px var(--pad) 26px; display: flex; justify-content: flex-end; transition: opacity .25s; }
.sky-note { max-width: 400px; text-align: center; font-size: 15px; line-height: 1.45; background: var(--paper); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--shadow); padding: 12px 14px; }
.sky-play { display: flex; justify-content: center; margin-top: 10px; }
.is-playing .hero-text, .is-playing .sky-foot { opacity: 0; visibility: hidden; }

.sky-label { position: absolute; left: 0; top: 0; margin: -64px 0 0; pointer-events: auto; white-space: nowrap; text-decoration: none;
  font-family: var(--pixel); font-weight: 500; font-size: 15px; line-height: 1; color: var(--bone); background: var(--ink); padding: 4px 7px; }
.sky-label span { display: block; margin-top: 4px; font-family: var(--body); font-weight: 600; font-size: 11px; line-height: 1; opacity: .75; }
.sky-label::after { content: ''; position: absolute; left: 7px; top: 100%; width: 2px; height: 26px; background: var(--ink); }
.sky-label.flip::after { left: auto; right: 7px; }
.sky-label:hover { background: var(--gold); color: var(--ink); }
.sky-tip { position: absolute; left: 0; top: 0; transform: translate(-50%, -150%); white-space: nowrap; font-size: 14px; line-height: 1.2; font-weight: 600; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); padding: 5px 8px; }
.stack-label { position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap; font-family: var(--pixel); font-weight: 700; font-size: 17px; line-height: 1.05; margin: -6px 0 0 -70px; width: 140px; }
.stack-label b { font-weight: 700; }
.stack-label .long { display: block; white-space: pre-line; }
.stack-label .short { display: none; }
.stack-label span { display: block; font-family: var(--body); font-weight: 400; font-size: 13.5px; margin-top: 2px; }

.sky-game { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 76px 14px 18px; }
.sky-score { font-family: var(--pixel); font-weight: 500; font-size: 20px; background: var(--paper); padding: 6px 12px; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--shadow); }
.sky-score b { font-family: var(--body); font-weight: 600; }
.sky-score span { font-size: 15px; margin-left: 8px; }
.sky-count { font-weight: 600; font-size: clamp(90px, 16vw, 180px); line-height: 1; color: var(--paper); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; margin: 4vh 0 auto; }
.sky-keys { font-size: 14px; background: var(--paper); border: 2px solid var(--ink); padding: 4px 10px; }
.sky-over { pointer-events: auto; text-align: center; background: var(--paper); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--shadow); padding: 22px 26px; max-width: 420px; }
.sky-over p:first-child { font-weight: 600; font-size: 19px; line-height: 1.35; margin-bottom: 16px; }
.sky-over p:last-child { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.sky-quit { pointer-events: auto; }
.sky-flat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 2px; height: 120px; position: absolute; left: var(--pad); right: var(--pad); bottom: 120px; }
.sky-flat i { background: #d9c3a0; }
.sky-flat i[data-l="1"] { background: #1f7a34; } .sky-flat i[data-l="2"] { background: #27a03f; } .sky-flat i[data-l="3"] { background: #35c93c; } .sky-flat i[data-l="4"] { background: #e9ff7a; }
.no-3d .stage:not(.stage-sky) { display: none; }

/* ---------- sections ---------- */
.band { max-width: var(--page); margin: 0 auto; padding: clamp(72px, 13vh, 140px) var(--pad) 0; }
.band-lead { max-width: 56ch; margin-top: 14px; font-size: 19px; }
.card { background: var(--paper); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--shadow); }

/* right now */
.now { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; margin-top: 34px; align-items: start; }
.now-lead { overflow: hidden; }
.now-shot { display: block; aspect-ratio: 16 / 9; border-bottom: 3px solid var(--ink); background: #f9eacd; }
.now-shot img { width: 100%; height: 100%; object-fit: contain; }
.now-text { padding: 22px 26px 26px; }
.media-sprite img, .tile-pic.is-sprite img { image-rendering: pixelated; }
.now-lead h3 { font-size: 38px; }
/* the four-panel comic that explains Panel Haus */
.strip { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.strip li { min-width: 0; }
.strip span { display: block; margin-top: 7px; font-family: var(--pixel); font-weight: 500; font-size: 16px; line-height: 1.05; }
.strip span b { display: inline-block; min-width: 18px; margin-right: 5px; padding: 1px 4px; text-align: center; color: var(--bone); background: var(--ink); font-weight: 500; }
.strip .cell { position: relative; aspect-ratio: 1; border: 3px solid var(--ink); overflow: hidden; background-color: var(--gold);
  background-image: radial-gradient(rgba(33, 11, 27, .16) 1.4px, transparent 1.6px); background-size: 8px 8px; }
.strip .c2 { background-color: var(--lav); } .strip .c3 { background-color: var(--pink); } .strip .c4 { background-color: var(--green); }
.strip .cell i { display: block; }
.strip .ln { height: 9%; margin: 12% 0 0 12%; background: var(--ink); }
.strip .cur { position: absolute; left: 74%; top: 54%; width: 6%; height: 14%; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.strip .pg { position: absolute; inset: 12% 20%; background: var(--paper); border: 3px solid var(--ink); display: grid !important; grid-template: 1fr 1fr 1fr / 1fr 1fr; gap: 4px; padding: 5px; }
.strip .pg i { border: 2px solid var(--ink); }
.strip .pg .hot { background: var(--gold); }
.strip .who { position: absolute; left: 6%; bottom: 0; width: 46%; image-rendering: pixelated; }
.strip .who.two { left: auto; right: 6%; transform: scaleX(-1); }
.strip .say { position: absolute; left: 30%; top: 9%; padding: 2px 8px; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; font-family: var(--pixel); font-style: normal; font-size: 17px; line-height: 1.1; }
.strip .out { position: absolute; border: 3px solid var(--ink); background: var(--paper); }
.strip .pgo { left: 12%; top: 16%; width: 34%; height: 46%; }
.strip .bk { left: 34%; top: 34%; width: 34%; height: 46%; border-left-width: 8px; }
.strip .clip { right: 10%; top: 14%; width: 34%; height: 28%; background: var(--ink); }
.strip .clip::after { content: ''; position: absolute; left: 38%; top: 24%; border-left: 10px solid var(--paper); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.now-lead .actions { margin-top: 18px; justify-content: center; }
.now-lead .meta { margin: 6px 0 10px; }
.now-dev { padding: 22px 24px; }
.now-dev h3 { font-size: 24px; }
.now-dev ul { margin-top: 14px; display: grid; gap: 14px; }
.dev { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: start; width: 100%; text-align: left; }
.mini { display: block; aspect-ratio: 16 / 10; border: 2px solid var(--ink); overflow: hidden; background: #000; }
.mini img { width: 100%; height: 100%; object-fit: cover; }
.dev:hover .mini, .dev:focus-visible .mini { outline: 3px solid var(--ink); }
.now-dev b { display: block; font-family: var(--pixel); font-weight: 700; font-size: 21px; }
.dev-text { display: block; font-size: 15.5px; line-height: 1.45; margin-top: 2px; }

/* selected work */
.rows { margin-top: 44px; display: grid; gap: clamp(36px, 6vh, 60px); }
.row { display: grid; grid-template-columns: 7fr 5fr; align-items: stretch; }
.row:nth-child(even) { grid-template-columns: 5fr 7fr; }
.row:nth-child(even) .media { order: 2; border-right: 0; border-left: 3px solid var(--ink); }
.row-text { padding: clamp(20px, 3vw, 36px); align-self: center; }
.row-text h3 { font-size: clamp(30px, 3.4vw, 46px); }
.row-text .meta { margin: 8px 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tags li { font-size: 14px; padding: 2px 9px; border: 2px solid var(--ink); background: var(--bone); }
.media { position: relative; min-width: 0; background: #000; border-right: 3px solid var(--ink); overflow: hidden; }
.media::before { content: ''; display: block; padding-top: 62.5%; }
.media video, .media-shot img, .media-clip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.media video { opacity: 0; transition: opacity .35s; }
.media video.on { opacity: 1; }
/* pictures fade in over their own average colour instead of popping in */
.pic { opacity: 0; transition: opacity .3s; }
.pic.in { opacity: 1; }
.px { image-rendering: pixelated; }
.media-sprite img { position: absolute; top: 11%; left: 50%; height: 78%; width: auto; aspect-ratio: 1; transform: translateX(-50%); }
.row-text { min-width: 0; }

/* everything */
.stage-stacks { height: clamp(300px, 56vh, 500px); margin-top: 18px; }
.h-second { margin-top: clamp(56px, 9vh, 96px); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip { font-family: var(--pixel); font-weight: 500; font-size: 17px; line-height: 1; padding: 9px 12px; border: 3px solid var(--ink); background: var(--paper); display: inline-flex; gap: 8px; align-items: baseline; }
.chip span { font-family: var(--body); font-size: 14px; }
.chip:hover { background: var(--gold); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bone); }
/* four across on a desktop: big enough to read a screenshot, small enough to still take in the whole wall */
.wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 26px; margin-top: 30px; }
.tile { display: block; width: 100%; min-width: 0; text-align: left; }
.wall li { min-width: 0; }
.tile-pic { display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--shadow); transition: transform .1s, box-shadow .1s; background: #000; }
.tile-pic img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.tile-pic.is-sprite img { display: block; width: auto; height: 100%; aspect-ratio: 1; margin: 0 auto; }
.tile:hover .tile-pic, .tile:focus-visible .tile-pic { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--shadow); }
.tile-name { display: block; font-family: var(--pixel); font-weight: 700; font-size: 22px; line-height: 1.1; margin-top: 14px; }
.tile-meta { display: block; font-size: 15px; margin-top: 3px; }
.tile-more { aspect-ratio: 16 / 10; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 18px; border: 3px dashed var(--ink); font-size: 15.5px; line-height: 1.35; }
.tile-more b { font-weight: 600; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }

/* pixel art */
.art-head { display: grid; grid-template-columns: 1fr minmax(240px, 380px); gap: 30px; align-items: center; }
.stage-art { height: clamp(400px, 72vh, 640px); }
.art { columns: 4 220px; column-gap: 16px; margin-top: 34px; }
.art li { break-inside: avoid; margin-bottom: 16px; }
.art button { position: relative; display: block; width: 100%; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--shadow); transition: transform .1s, box-shadow .1s; }
.art button:hover, .art button:focus-visible { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--shadow); }
.art img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.art-note { max-width: 56ch; margin-top: 12px; font-size: 15.5px; }
.art-more { break-inside: avoid; display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; border: 3px dashed var(--ink); font-size: 14.5px; line-height: 1.35; }
.art-more b { font-family: var(--pixel); font-weight: 700; font-size: 34px; line-height: 1; }
.gif-tag { position: absolute; right: 6px; bottom: 6px; font-family: var(--pixel); font-size: 13px; line-height: 1; color: var(--bone); background: var(--ink); padding: 3px 6px; }
.art button:hover .gif-tag { display: none; }

/* about and contact */
.about-card { display: grid; grid-template-columns: 220px 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; padding: clamp(22px, 4vw, 44px); }
.about-pic { width: 220px; height: 220px; image-rendering: pixelated; border: 3px solid var(--ink); }
.about-card p { max-width: 60ch; margin-top: 16px; }
.stage-hi { height: clamp(300px, 56vh, 520px); }
.links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 30px; }
.links .wide { grid-column: 1 / -1; }
.links a { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 18px 20px; text-decoration: none; background: var(--paper); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--shadow); transition: transform .08s, box-shadow .08s; }
.links a:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--shadow); background: var(--gold); }
.links b { font-family: var(--pixel); font-size: 24px; }
.links span { overflow-wrap: anywhere; text-align: right; }

.foot { max-width: var(--page); margin: clamp(64px, 10vh, 110px) auto 0; padding: 22px var(--pad) 36px; border-top: 3px solid var(--ink); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 14.5px; }
.foot a { margin-left: 4px; }

/* ---------- dialogs ---------- */
dialog { color: var(--ink); background: var(--paper); border: 3px solid var(--ink); padding: 0; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
/* privacy policy and terms */
.legal-page { background: var(--bone); }
.legal { max-width: 880px; margin: 0 auto; padding: clamp(28px, 6vh, 64px) var(--pad) 0; }
.legal-card { padding: clamp(22px, 4.5vw, 52px); }
.legal h1 { font-size: clamp(40px, 6vw, 64px); max-width: none; }
.legal h2 { font-size: 27px; margin-top: 34px; }
.legal p, .legal ul { margin-top: 12px; max-width: 68ch; }
.legal .meta { margin-top: 8px; }
.legal-lead { font-size: 19px; margin-top: 22px; }
.legal ul { padding-left: 22px; list-style: square; }
.legal li { margin-top: 8px; }
.legal code { font-size: .92em; background: var(--bone); padding: 1px 5px; overflow-wrap: anywhere; }
.legal a:not(.btn) { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal-back { margin-top: 38px; }

dialog::backdrop { background: rgba(33, 11, 27, .72); }
.x { position: absolute; right: 8px; top: 8px; z-index: 2; width: 36px; height: 36px; background: var(--paper); border: 3px solid var(--ink); font-size: 16px; line-height: 1; }
.x:hover { background: var(--gold); }
.sheet { width: 760px; box-shadow: 12px 12px 0 var(--shadow); }
.sheet .media { border: 0; border-bottom: 3px solid var(--ink); }
.sheet-body { padding: 22px 26px 28px; }
.sheet-body h3 { font-size: 34px; }
.sheet-body .meta { margin: 6px 0 12px; display: block; }
.player { width: min(1280px, calc(100vw - 24px)); height: min(820px, calc(100dvh - 24px)); }
.player[open] { display: flex; flex-direction: column; }
.player-bar { display: flex; align-items: center; gap: 18px; padding: 10px 56px 10px 16px; border-bottom: 3px solid var(--ink); font-family: var(--pixel); font-size: 18px; }
.player-bar a { font-size: 15px; margin-left: auto; }
.player-frame { flex: 1; background: #000; }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.viewer { background: transparent; border: 0; overflow: visible; text-align: center; }
.viewer img { max-width: min(92vw, 1100px); max-height: 78dvh; height: auto; margin: 0 auto; image-rendering: pixelated; border: 3px solid var(--bone); background: var(--ink); }
.viewer .x { right: 0; top: -46px; }
.viewer-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; font-family: var(--pixel); color: var(--bone); }

/* ---------- small screens ---------- */
@media (max-width: 1080px) {
  .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row, .row:nth-child(even) { grid-template-columns: 1fr; }
  .row .media, .row:nth-child(even) .media { order: 0; border: 0; border-bottom: 3px solid var(--ink); }
}
@media (max-width: 900px) {
  .now { grid-template-columns: 1fr; }
  .art-head { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .top { gap: 8px; padding: 8px 14px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .top nav { gap: 7px; font-size: 16px; }
  .nav-toggle { font-size: 16px; padding: 6px 8px; white-space: nowrap; }
  .top nav .nav-cta { padding: 9px 9px; white-space: nowrap; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
  .top.open .nav-links { display: flex; }
  .nav-links a { padding: 14px var(--pad); font-size: 22px; border-bottom: 2px solid var(--bone); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a[aria-current]::after { left: auto; right: var(--pad); bottom: 50%; margin: 0 0 -9px; }
  /* On a phone the whole hero fits the first screen: the text is set tighter, the three numbers share one row,
     and the skyline takes whatever height is left. */
  .hero { min-height: calc(100svh - 62px); padding-top: 16px; }
  .hero h1 { font-size: clamp(30px, 9.4vw, 40px); }
  .lead { font-size: 17px; line-height: 1.4; margin-top: 10px; max-width: none; }
  .facts { display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; gap: 10px; margin-top: 14px; }
  .facts dd { font-size: 27px; }
  .facts dt { font-size: 12.5px; line-height: 1.25; margin-top: 3px; }
  .hero .actions { margin-top: 14px; gap: 10px; }
  .hero .actions .btn { font-size: 17px; padding: 11px 14px; }
  .stage-sky { position: relative; left: auto; right: auto; top: auto; bottom: auto; flex: 1 1 0; min-height: 190px; height: auto; margin-top: 4px; }
  .sky-foot { margin: 0 auto; padding: 0 var(--pad) 12px; justify-content: stretch; }
  .sky-note { max-width: none; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; font-size: 13px; line-height: 1.3; background: none; border: 0; box-shadow: none; padding: 0; }
  .sky-note .more { display: none; }
  .sky-note .sky-play { margin: 0; flex: none; }
  .sky-game { padding-top: 70px; }
  .sky-over { padding: 16px 18px; }
  .sky-over p:first-child { font-size: 17px; margin-bottom: 12px; }
  .stack-label { font-size: 12.5px; width: 52px; margin: -6px 0 0 -26px; }
  .stack-label:nth-child(even) { margin-top: -32px; }
  .stack-label .long { display: none; }
  .stack-label .short { display: block; }
  .stack-label span { font-size: 11px; margin-top: 0; }
  .now-text { padding: 16px 18px 20px; }
  .now-lead h3 { font-size: 30px; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .dev { grid-template-columns: 96px 1fr; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .tile-name { font-size: 19px; }
  .tile-meta { font-size: 14px; }
  .tile-more { padding: 12px; font-size: 13.5px; }
  .art { columns: 2; column-gap: 12px; }
  .art li { margin-bottom: 12px; }
  .about-card { grid-template-columns: 1fr; }
  .about-pic { width: 150px; height: 150px; }
  .links { grid-template-columns: 1fr; }
  .links a { flex-direction: column; gap: 2px; }
  .links span { text-align: left; }
  .card { box-shadow: 5px 5px 0 var(--shadow); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tile-pic, .links a, .art button { transition: none; }
}
