/* HeapPlay. One stylesheet, no framework.
   The look: a tidy heap of game tiles. Cream paper, ink outlines, hard offset shadows that make
   every card and button read as a block you can pick up. Tomato marks "Play here". */

@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-grotesque-latin-ext.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken"; src: url("fonts/hanken-grotesk-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken"; src: url("fonts/hanken-grotesk-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Martian"; src: url("fonts/martian-mono-latin.woff2") format("woff2"); font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap;
  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; }

:root {
  --paper: #fff6e9;
  --tile: #ffffff;
  --ink: #1b1530;
  --ink-2: #5a5370;
  --line: #e4d9c8;
  --play: #ff5a36;          /* "Play here" and nothing else */
  --play-ink: #ffffff;
  --link: #3b2fd0;
  --sun: #ffd23f;
  --mint: #c9f2df;
  --ok: #146c47;
  --bad: #b3261e;
  --shadow: 4px 4px 0 var(--ink);
  --r: 14px;
  --head: "Bricolage", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Hanken", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Martian", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15111f; --tile: #211b31; --ink: #f6f0ff; --ink-2: #b3a9cc; --line: #3a3150; --link: #a99bff;
    --sun: #ffd23f; --mint: #1d4a39; --ok: #7be0b0; --bad: #ff8a80; --shadow: 4px 4px 0 #000;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--body); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px 56px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .5em; font-stretch: 88%; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
img, video { max-width: 100%; height: auto; display: block; }
code, pre { font-family: var(--mono); font-size: .86em; }
code { background: color-mix(in srgb, var(--ink) 8%, transparent); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
pre { background: var(--ink); color: var(--paper); padding: 14px 16px; border-radius: var(--r); overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; overflow-wrap: normal; }
small { font-size: .86em; color: var(--ink-2); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.hp-field { position: absolute; left: -5000px; height: 0; overflow: hidden; }
.unknown { color: var(--ink-2); font-style: italic; }
.lede { font-size: 1.14rem; color: var(--ink-2); max-width: 62ch; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* --- header and footer --- */
.site-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; max-width: 1180px; width: 100%; margin: 0 auto; padding: 16px 20px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 800 1.45rem/1 var(--head); color: var(--ink); text-decoration: none; letter-spacing: -.03em; }
.wordmark b { color: var(--play); font-weight: 800; }
.heap { display: inline-grid; grid-template-columns: 10px 10px; grid-template-rows: 10px 10px; gap: 2px; transform: rotate(-8deg); }
.heap i { border: 2px solid var(--ink); border-radius: 3px; background: var(--sun); }
.heap i:nth-child(1) { grid-column: 1 / 3; width: 12px; justify-self: center; background: var(--play); }
.heap i:nth-child(3) { background: var(--mint); }
.head-search { display: flex; flex: 1 1 260px; max-width: 460px; }
.head-search input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 2px solid var(--ink); border-right: 0; border-radius: 999px 0 0 999px; background: var(--tile); color: var(--ink); font: inherit; }
.head-search button { height: 42px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 0 999px 999px 0; background: var(--sun); color: #1b1530; font: 700 .95rem var(--head); cursor: pointer; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; font-weight: 600; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current] { border-bottom-color: var(--play); }
.site-foot { border-top: 2px solid var(--ink); background: var(--tile); margin-top: 24px; }
.foot-inner { max-width: 1180px; margin: 0 auto; padding: 26px 20px 34px; }
.foot-mark { font-family: var(--head); font-weight: 600; }
.foot-mark span { font-weight: 800; font-size: 1.15rem; }
.foot-mark b { color: var(--play); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { color: var(--ink); }
.foot-note { color: var(--ink-2); font-size: .92rem; max-width: 80ch; margin: 0; }

/* --- buttons, chips, notices --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 2px solid var(--ink); border-radius: 12px; background: var(--sun); color: #1b1530; font: 700 1rem/1.2 var(--head); text-decoration: none; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-big { min-height: 52px; padding: 10px 24px; font-size: 1.1rem; }
.btn-small { min-height: 34px; padding: 4px 12px; font-size: .88rem; border-radius: 9px; box-shadow: 2px 2px 0 var(--ink); }
.btn-quiet { background: var(--tile); color: var(--ink); }
.btn-here, .btn-play { background: var(--play); color: var(--play-ink); }
.btn-out { background: var(--tile); color: var(--ink); }
.btn-danger { color: var(--bad); border-color: var(--bad); box-shadow: 2px 2px 0 var(--bad); }
.btn-off { background: transparent; color: var(--ink-2); border-style: dashed; box-shadow: none; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.chip { display: inline-block; padding: 3px 9px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--tile); font: 500 .72rem/1.3 var(--mono); letter-spacing: .01em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.chip-here { background: var(--play); color: var(--play-ink); border-color: var(--ink); }
.chip-text { background: transparent; border-style: dashed; }
.notice { border: 2px solid var(--ink); border-radius: var(--r); padding: 12px 16px; background: var(--tile); margin: 0 0 16px; }
.notice p:last-child { margin-bottom: 0; }
.notice-ok { background: var(--mint); }
.notice-error { border-color: var(--bad); color: var(--bad); }
.notice-info { border-style: dashed; }
.dead-link { color: var(--ink-2); font-size: .9em; font-style: italic; }
.copy { width: 100%; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--tile); color: var(--ink); font: 500 .84rem var(--mono); }
.status { border-left: 6px solid var(--sun); padding: 6px 14px; background: var(--tile); border-radius: 0 10px 10px 0; }
.status-approved, .status-published { border-left-color: var(--ok); }
.status-rejected, .status-removed { border-left-color: var(--bad); }

/* --- home --- */
.hero { padding: 26px 0 8px; }
.hero h1 { max-width: 16ch; font-size: clamp(2.3rem, 6.4vw, 4.4rem); font-weight: 800; }
.hero h1 em { font-style: normal; background: var(--sun); color: #1b1530; padding: 0 .16em; border-radius: 10px; box-shadow: var(--shadow); display: inline-block; transform: rotate(-1.6deg); }
.finder { border: 2px solid var(--ink); border-radius: 20px; background: var(--tile); box-shadow: 6px 6px 0 var(--ink); padding: 16px; max-width: 860px; }
.finder-ask { display: flex; flex-wrap: wrap; gap: 10px; }
.finder-ask input { flex: 1 1 240px; min-width: 0; min-height: 52px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); font: 500 1.08rem var(--body); }
.finder-pick { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 14px; }
.finder-pick label, .pick { display: flex; align-items: center; gap: 8px; font-weight: 600; }
select { min-height: 40px; padding: 4px 30px 4px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--tile); color: var(--ink); font: inherit; max-width: 100%; }
.examples { margin: 16px 0 0; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.shelf { margin-top: 44px; }
.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 4px; }
.shelf-head h2 { margin: 0; }
.shelf-head h2 a { color: inherit; text-decoration: none; }
.more { font-weight: 600; white-space: nowrap; }
.shelf-note, .shelf-empty, .form-note, .count, .facet-note { color: var(--ink-2); font-size: .93rem; }
.shelf-note { margin-bottom: 14px; }
.collection-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.collection-list a { display: block; padding: 16px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--tile); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.collection-list b { display: block; font: 700 1.1rem var(--head); }
.collection-list span { color: var(--ink-2); font-size: .93rem; }
.pitch { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.pitch > div { border: 2px solid var(--ink); border-radius: 20px; background: var(--tile); padding: 22px; }
.pitch > div:first-child { background: var(--mint); }

/* --- cards --- */
.cards { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.card { position: relative; background: var(--tile); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 0 14px 14px; transition: transform .1s, box-shadow .1s; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.card-link { color: inherit; text-decoration: none; display: block; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.cover { position: relative; margin: 0 -14px 12px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px 12px 0 0; border-bottom: 2px solid var(--ink); background: var(--ink); }
.cover img, .cover video { width: 100%; height: 100%; object-fit: cover; }
.cover video { position: absolute; inset: 0; }
.here { position: absolute; left: 10px; bottom: 10px; background: var(--play); color: var(--play-ink); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 11px; font: 700 .78rem var(--head); box-shadow: 2px 2px 0 var(--ink); }
.preview-btn { position: absolute; right: 8px; top: 8px; z-index: 2; min-height: 34px; padding: 0 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--tile); color: var(--ink); font: 600 .75rem var(--mono); cursor: pointer; }
.no-cover { width: 100%; height: 100%; display: grid; place-items: center; font: 800 4rem var(--head); color: #1b1530; }
.tone-0 { background: #ffd23f; } .tone-1 { background: #c9f2df; } .tone-2 { background: #ffb8a8; } .tone-3 { background: #cfc8ff; } .tone-4 { background: #a8e0ff; } .tone-5 { background: #ffe1f0; }
.card-title { font-size: 1.14rem; margin: 0 0 2px; }
.card-by { color: var(--ink-2); font-size: .9rem; margin: 0 0 6px; }
.card-rating { margin: 0 0 10px; font-size: .95rem; }
.star { color: #e09b00; }
.votes, .unrated { color: var(--ink-2); font-size: .88rem; }
.card-launch { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.card-why { margin: 10px 0 0; padding-top: 8px; border-top: 1.5px dashed var(--line); font-size: .86rem; color: var(--ink-2); }

/* --- browse --- */
.browse { padding-top: 14px; }
.browse-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.browse-head h1 { margin-bottom: .2em; }
.filters { border: 2px solid var(--ink); border-radius: 18px; background: var(--tile); padding: 14px; margin: 10px 0 18px; }
.filters-top { display: flex; flex-wrap: wrap; gap: 10px; }
.filters-top input { flex: 1 1 240px; min-width: 0; min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; }
.filters-more { margin-top: 12px; }
.filters-more > summary { cursor: pointer; font: 700 1rem var(--head); padding: 6px 0; }
.facets { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 16px; margin-top: 8px; }
.facet { border-top: 1.5px solid var(--line); padding: 8px 0; }
.facet > summary { cursor: pointer; font-weight: 700; }
.facet > summary b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--play); color: var(--play-ink); font: 700 .72rem var(--mono); }
.facet-body { padding: 8px 0 2px; display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.check { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--play); flex: none; }
.check i { font: 500 .72rem var(--mono); color: var(--ink-2); font-style: normal; margin-left: auto; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 14px; }
.pick { flex-wrap: wrap; margin: 4px 0; }
.filters-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1.5px solid var(--line); }
.understood { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.results-title { margin-top: 28px; }
.empty { border: 2px dashed var(--ink-2); border-radius: var(--r); padding: 26px; text-align: center; margin-top: 16px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 30px; font-weight: 600; }

/* --- game page --- */
.game { padding-top: 12px; }
.game-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 14px; }
.game-head h1 { margin-bottom: .15em; }
.game-by { color: var(--ink-2); margin: 0 0 4px; }
.game-rating { margin: 0; font-size: 1.05rem; }
.game-actions { margin: 0; }
.stage { position: relative; border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; background: #000; box-shadow: 6px 6px 0 var(--ink); aspect-ratio: 16 / 9; }
.stage-cover { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; text-align: center; }
.stage-cover > img, .stage-cover > .no-cover, .stage-static > img, .stage-static > .no-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-cover > img { filter: brightness(.55); }
.stage-cover > .btn, .stage-note { position: relative; z-index: 1; }
.btn-play { min-height: 64px; padding: 12px 34px; font-size: 1.4rem; border-radius: 16px; box-shadow: 5px 5px 0 #000; border-color: #000; }
.stage-note { margin: 0; padding: 4px 12px; color: #fff; font-size: .9rem; background: rgba(0, 0, 0, .55); border-radius: 999px; max-width: 92%; }
.stage-note a { color: #fff; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.stage-tools { display: flex; justify-content: flex-end; gap: 8px; margin: 10px 0 0; }
.stage-x { display: none; position: absolute; z-index: 3; top: calc(6px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: 38px; height: 38px; border: 2px solid #fff; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font: 700 1rem var(--head); cursor: pointer; opacity: .8; }
/* On a phone the game takes the whole screen; the page comes back when it is closed. */
.stage.full { position: fixed; inset: 0; z-index: 100; border: 0; border-radius: 0; box-shadow: none; aspect-ratio: auto; width: 100vw; height: 100vh; height: 100dvh; }
.stage.full .stage-x { display: block; }
body.playing-full { overflow: hidden; }
.tagline { font-size: 1.2rem; margin: 18px 0 0; max-width: 70ch; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; margin-top: 26px; align-items: start; }
.game-main > section { margin-bottom: 34px; }
.game-side { border: 2px solid var(--ink); border-radius: 18px; background: var(--tile); padding: 18px; position: sticky; top: 14px; }
.facts { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: .95rem; }
.facts dt { color: var(--ink-2); font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts-tight { font-size: .92rem; margin: 10px 0 0; }
.options { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.option { border: 2px solid var(--ink); border-radius: var(--r); background: var(--tile); padding: 14px 16px; }
.option-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.option-head h3, .option-go { margin: 0; }
.leaves { color: var(--ink-2); font-size: .9rem; margin: 6px 0 0; }
.changes { margin-top: 10px; font-size: .92rem; }
.changes summary { cursor: pointer; font-weight: 600; }
.changes ul { margin: 8px 0 0; padding-left: 18px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.shot img, .clip { width: 100%; border: 2px solid var(--ink); border-radius: 12px; background: #000; aspect-ratio: 16 / 9; object-fit: cover; }
.report, .claim { margin-top: 14px; font-size: .93rem; }
.report summary { cursor: pointer; color: var(--link); text-decoration: underline; }
.report form { margin-top: 10px; display: grid; gap: 10px; }

/* --- rating and reviews --- */
.rate-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rate-form fieldset, .star-row { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.star-pick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--tile); cursor: pointer; font-weight: 600; }
.star-pick span { color: #e09b00; letter-spacing: 1px; }
.star-pick input { accent-color: var(--play); }
.star-pick:has(input:checked) { background: var(--sun); color: #1b1530; }
.star-pick:has(input:checked) span { color: #1b1530; }
.star-row legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.reviews .count { font: 500 .9rem var(--mono); }
.review-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 14px; }
.review { border: 2px solid var(--ink); border-radius: var(--r); background: var(--tile); padding: 14px 16px; }
.review-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 6px; }
.review-head time, .edited { color: var(--ink-2); font-size: .86rem; }
.review-stars { color: #e09b00; letter-spacing: 1px; }
.tag-mine { font: 600 .7rem var(--mono); background: var(--mint); border: 1.5px solid var(--ink); border-radius: 999px; padding: 1px 8px; }
.review-body p { margin: 0 0 .6em; overflow-wrap: anywhere; }
.review-meta { color: var(--ink-2); font-size: .85rem; margin: 6px 0 0; }
.reply { margin-top: 10px; padding: 10px 14px; border-left: 5px solid var(--play); background: var(--paper); border-radius: 0 10px 10px 0; }
.reply-head { font-weight: 700; font-size: .88rem; margin: 0 0 4px; }
.reply p:last-child { margin: 0; }
.review-report { margin-top: 8px; font-size: .86rem; }
.review-report summary { cursor: pointer; color: var(--ink-2); }
.review-report form { display: grid; gap: 8px; margin-top: 8px; max-width: 420px; }
.write > summary { list-style: none; cursor: pointer; display: inline-flex; }
.write > summary::-webkit-details-marker { display: none; }
.review-form { margin-top: 16px; display: grid; gap: 14px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--tile); padding: 16px; }
.mine-images { border: 1.5px dashed var(--line); border-radius: 10px; }

/* --- forms --- */
.stack { display: grid; gap: 14px; max-width: 760px; }
.field { display: grid; gap: 5px; font-weight: 600; }
.field input, .field textarea, .field select, .inline-form input, .inline input[type="text"] { width: 100%; min-height: 44px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--tile); color: var(--ink); font: 400 1rem var(--body); }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input[type="file"] { padding: 8px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; }
.group { border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0; }
.group legend, .group > summary { font-weight: 700; padding: 0 6px; cursor: default; }
details.group > summary { cursor: pointer; padding: 4px 0; overflow-wrap: anywhere; }
details.group[open] > summary { margin-bottom: 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.form-note { margin: 0; }
.points { padding-left: 20px; display: grid; gap: 8px; }
.plain { max-width: 640px; margin: 0 auto; padding-top: 30px; }
.plain.wide { max-width: 800px; }

/* --- prose: standing pages and articles --- */
.prose { max-width: 760px; margin: 0 auto; padding-top: 22px; font-size: 1.06rem; line-height: 1.65; }
.prose h2 { margin-top: 1.9em; scroll-margin-top: 16px; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.2em 0; padding: 4px 18px; border-left: 6px solid var(--sun); }
.prose figure { margin: 1.6em 0; }
.prose figure img { border: 2px solid var(--ink); border-radius: var(--r); width: 100%; }
.prose figcaption { color: var(--ink-2); font-size: .9rem; margin-top: 6px; }
.prose hr { border: 0; border-top: 2px solid var(--line); margin: 2em 0; }
.table-wrap { overflow-x: auto; margin: 1.2em 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1.5px solid var(--line); }
th { font-family: var(--head); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.post-meta { color: var(--ink-2); font: 500 .8rem var(--mono); margin-bottom: .8em; }
.post-meta a { color: inherit; }
.post-cover img { box-shadow: var(--shadow); aspect-ratio: 1200 / 630; object-fit: cover; }
.toc { border: 2px solid var(--ink); border-radius: var(--r); background: var(--tile); padding: 14px 18px; margin: 1.4em 0; }
.toc h2 { font-size: 1rem; margin: 0 0 .4em; }
.toc ol { margin: 0; }
.post-foot { margin-top: 2em; padding-top: 1em; border-top: 2px solid var(--line); font-size: .98rem; }
.post .cards { margin: 1.4em 0; }
.posts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.post-card { border: 2px solid var(--ink); border-radius: var(--r); background: var(--tile); box-shadow: var(--shadow); overflow: hidden; padding: 0 16px 14px; }
.post-card a { color: var(--ink); text-decoration: none; }
.post-card img { margin: 0 -16px 12px; width: calc(100% + 32px); max-width: none; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 2px solid var(--ink); }
.post-card h2 { font-size: 1.2rem; margin: 14px 0 .4em; }
.post-card p { color: var(--ink-2); font-size: .95rem; margin: 0 0 .6em; }

/* --- admin and developer dashboard --- */
body.admin-page main { max-width: 1400px; }
.admin { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; padding-top: 16px; }
.admin-nav { display: grid; gap: 2px; align-content: start; position: sticky; top: 12px; }
.admin-nav a { color: var(--ink); text-decoration: none; padding: 7px 10px; border-radius: 9px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.admin-nav a:hover, .admin-nav a[aria-current] { background: var(--tile); outline: 2px solid var(--ink); }
.admin-nav b { background: var(--play); color: var(--play-ink); border-radius: 999px; padding: 0 8px; font: 700 .76rem/1.7 var(--mono); }
.admin-nav form { padding: 10px; }
.admin-main h2 { margin-top: 1.7em; }
.admin-table td { font-size: .92rem; overflow-wrap: anywhere; }
.admin-table img { border: 2px solid var(--ink); border-radius: 8px; }
.inline { display: inline-block; margin: 0 6px 6px 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.inline-form input, .inline-form select { width: auto; flex: 0 1 220px; min-height: 36px; }
.inline input[type="text"] { width: 260px; min-height: 36px; margin-right: 6px; }
.actions { margin: 12px 0; }
.tiles { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tiles a { display: block; padding: 14px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--tile); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); text-decoration: none; }
.tiles b { display: block; font: 800 2rem/1 var(--head); }
.tiles span { color: var(--ink-2); font-size: .9rem; }

@media (max-width: 900px) {
  .game-grid { grid-template-columns: 1fr; }
  .game-side { position: static; }
  .admin { grid-template-columns: 1fr; }
  .admin-nav { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  main { padding: 0 14px 44px; }
  .site-head { padding: 12px 14px; gap: 10px 14px; }
  .site-nav { margin-left: 0; gap: 2px 14px; font-size: .95rem; }
  .head-search { order: 3; flex-basis: 100%; max-width: none; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .card { padding: 0 10px 10px; box-shadow: 3px 3px 0 var(--ink); }
  .cover { margin: 0 -10px 10px; }
  .card-title { font-size: 1rem; }
  .finder { padding: 12px; box-shadow: 4px 4px 0 var(--ink); }
  .finder-pick label { flex: 1 1 100%; justify-content: space-between; }
  .stage { border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); }
  .btn-play { min-height: 56px; font-size: 1.2rem; padding: 10px 24px; }
  .facts { grid-template-columns: 1fr; gap: 0 0; }
  .facts dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
