/* Release identity: a printed game wall, never a dashboard around the games.
   Existing stock, ink and prop images remain the material source of truth. */
:root { --release-ink: #221f25; --release-paper: #efe7d2; --release-lime: #dbef65; }
#zineGameMenu.game-gallery {
  position: fixed; inset: 0!important; z-index: 100; width: auto; max-width: none;
  max-height: none; padding: 0; gap: 0; overflow: auto; overscroll-behavior: contain;
  border: 0; box-shadow: none; color: var(--release-paper);
  background: var(--release-ink) var(--xerox) 0 0 / 780px; background-blend-mode: multiply;
  font-family: "Nachtzine Print", "Londrina Solid", "Nachtzine Word", sans-serif;
}
.gallery-inner { width: min(100%, 1720px); min-height: 100svh; margin: auto; padding: clamp(22px, 3vh, 36px) clamp(24px, 4.3vw, 80px) 62px; display: grid; grid-template-rows: auto 1fr auto; gap: clamp(22px, 3vh, 36px); }
.gallery-heading { display: flex; align-items: center; gap: clamp(24px, 4vw, 72px); position: relative; padding-right: 62px; }
.gallery-brand { width: clamp(220px, 18vw, 290px); aspect-ratio: 2.1; flex-shrink: 0; background: url("assets/branding/wordplace/production/wordplace-logo-light-v1.svg") center / contain no-repeat; transform: none; }
.gallery-brand::after { content: "WordPlace"; display: none; }
.gallery-intro h2 { font-size: clamp(42px, 4.8vw, 76px); line-height: .95; margin: 0 0 12px; font-weight: 900; text-transform: uppercase; }
.gallery-intro p { margin: 0; color: var(--release-lime); font-size: clamp(23px, 2vw, 32px); line-height: 1.15; }
.game-gallery .gallery-close { position: absolute; right: 0; top: 12px; min-height: 52px; width: 52px; padding: 0 0 5px; background: var(--release-paper) var(--stock) 70px 30px / 460px; color: var(--release-ink); font-size: 45px; line-height: 1; border: 0; transform: rotate(4deg); clip-path: polygon(2% 4%, 98% 0, 100% 95%, 5% 100%); }
.gallery-close > span { font-size: 0; }
.gallery-close::before, .gallery-close::after { content: ""; position: absolute; left: 27%; right: 27%; height: 4px; top: 47%; background: currentColor; transform: rotate(45deg); }
.gallery-close::after { transform: rotate(-45deg); }
.gallery-games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(15px, 2vw, 32px); align-content: center; padding: 8px 0; }
.game-gallery .game-poster {
  --poster-field: #7952b3; --poster-accent: #dbef65; --poster-angle: -1.6deg;
  position: relative; isolation: isolate; display: grid; grid-template-rows: clamp(120px, 18vh, 205px) auto 1fr auto auto;
  gap: 12px; align-content: start; width: 100%; min-height: 440px; padding: 17px 20px 20px; margin: 0;
  background: none; border: 0; color: var(--release-paper); text-align: left;
  transform: rotate(var(--poster-angle)); filter: drop-shadow(2px 4px 1px #0008) drop-shadow(8px 14px 7px #0005);
  font: inherit; text-transform: none; transition: translate 140ms steps(2,end);
}
.game-poster::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--poster-field) var(--stock) 20px 40px / 560px; background-blend-mode: multiply; clip-path: polygon(1% 0, 35% 1%, 66% 0, 98% 1%, 100% 28%, 98% 64%, 100% 98%, 64% 100%, 31% 99%, 0 100%, 1% 51%); }
.game-gallery .game-poster-royale { --poster-field: #d33d70; --poster-accent: #96d9af; --poster-angle: 1.3deg; }
.game-gallery .game-poster-story { --poster-field: #187e86; --poster-accent: #f0ab75; --poster-angle: -1deg; }
.game-gallery .game-poster-case { --poster-field: #3058c4; --poster-accent: #eccb52; --poster-angle: 1.8deg; }
.game-gallery .game-poster:not(:disabled):is(:hover,:focus-visible) { translate: 0 -9px; background: none; color: var(--release-paper); }
.game-gallery .game-poster:focus-visible { outline: 3px dashed var(--release-paper); outline-offset: 7px; }
.game-gallery .game-poster[aria-pressed="true"] { background: none; color: var(--release-paper); text-decoration: none; }
.game-poster[aria-pressed="true"] .poster-select { box-shadow: inset 0 -3px var(--release-ink); }
.game-poster:disabled { opacity: .52; filter: saturate(.4); }
.poster-art { display: block; position: relative; min-height: 0; align-self: stretch; margin: 0 -7px 5px; pointer-events: none; }
.poster-name { display: block; font-size: clamp(37px, 3.25vw, 58px); font-weight: 900; line-height: .95; letter-spacing: -.025em; text-transform: uppercase; min-height: 1.9em; mask: var(--ink-grain-mask,none) 0 0 / 192px 160px; }
.game-poster-words .poster-name { font-size: clamp(29px, 2.35vw, 43px); min-height: calc(clamp(37px, 3.25vw, 58px) * 1.9); display: flex; align-items: end; padding-bottom: .07em; }
.poster-description { display: block; font-size: clamp(19px, 1.7vw, 27px); font-weight: 400; line-height: 1.15; max-width: 20ch; }
.poster-format { display: block; padding-top: 12px; font-size: 18px; line-height: 1.2; font-weight: 400; }
.poster-select { display: flex; align-items: center; justify-content: space-between; color: var(--release-ink); background: var(--poster-accent) var(--stock) 80px 25px / 460px; background-blend-mode: multiply; padding: 9px 13px 12px; font-size: 24px; font-weight: 900; text-transform: uppercase; clip-path: polygon(1% 4%, 30% 0, 67% 3%, 99% 0, 100% 94%, 61% 100%, 0 95%); }
.poster-select i { width: 19px; height: 13px; background: currentColor; clip-path: polygon(0 36%, 58% 36%, 58% 0, 100% 50%, 58% 100%, 58% 64%, 0 64%); }
.poster-word-strip { position: absolute; left: 4%; top: 16%; width: 91%; transform: rotate(-6deg); padding: 6px 4px; font-size: clamp(24px, 2.7vw, 45px); line-height: 1; font-weight: 900; text-align: center; color: var(--release-ink); background: var(--release-paper) var(--stock) 12px 39px / 460px; clip-path: polygon(1% 3%, 98% 0, 100% 97%, 0 100%); }
.poster-word-strip + .poster-word-strip { top: 44%; transform: rotate(3deg); font-size: clamp(22px, 2.35vw, 40px); }
.poster-wheel { position: absolute; width: 35%; aspect-ratio: 1; bottom: -13%; right: -6%; background: url("assets/nachtzine/press/wheel-v1.webp") center / contain no-repeat; rotate: 14deg; }
.poster-bomb { position: absolute; width: 79%; height: 95%; left: 11%; bottom: -3%; background: url("assets/nachtzine/bomtafel/bomb-body-v1.webp") center / contain no-repeat; rotate: -9deg; }
.poster-fuse { position: absolute; width: 26%; height: 15%; right: 15%; top: 11%; background: url("assets/nachtzine/release/fuse-paper-v1.webp") center / 100% 100% no-repeat; rotate: -38deg; filter: drop-shadow(1px 2px 1px #0005); }
.poster-spark { position: absolute; width: 30%; aspect-ratio: 1; right: 1%; top: -15%; background: url("assets/nachtzine/bomtafel/spark-a-v1.webp") center / contain no-repeat; }
.poster-script { position: absolute; inset: 8% 4% 0; background: var(--release-paper) var(--stock) 50px 70px / 460px; color: var(--release-ink); transform: rotate(-7deg); clip-path: polygon(0 2%, 97% 0, 100% 98%, 2% 100%); display: flex; align-items: center; padding: 18px; gap: 3px; }
.poster-script > span { font-size: clamp(24px, 2.3vw, 39px); font-weight: 900; line-height: 1; }
.poster-script b { color: #d95331; font-size: clamp(90px, 10vw, 154px); line-height: 1; transform: rotate(9deg); }
.poster-folder { position: absolute; inset: 4% -1% -3%; background: url("assets/nachtzine/case-closed/folder-cover.webp") center / 100% 100% no-repeat; display: grid; place-content: center; rotate: -8deg; }
.poster-folder b { font-size: clamp(26px, 2.7vw, 44px); color: #30323a; text-align: center; line-height: .95; transform: rotate(-4deg); border: 3px solid currentColor; padding: 7px 13px; mask: var(--stamp-wear-mask,none) 0 0 / 280px 72px; }
.gallery-footer { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-top: 12px; }
.gallery-footer p { margin: 0; font-size: clamp(23px, 2.3vw, 35px); line-height: 1.1; }
.gallery-edition { font-size: 17px; color: #c2b6c5; }
.zine-utilities { position: fixed; z-index: 110; left: max(14px, calc((100vw - 1840px) / 2 + 14px)); bottom: 10px; }
.sound-toggle { display: flex; align-items: center; gap: 8px; padding: 7px 12px; min-height: 44px; color: var(--release-paper); border: 0; background: var(--release-ink) var(--xerox) 20px 70px / 410px; font: 400 18px/1 "Nachtzine Print", "Nachtzine Word", sans-serif; clip-path: polygon(0 7%, 99% 0, 100% 96%, 2% 100%); }
.sound-toggle:focus-visible { clip-path: none; outline: 3px dashed var(--release-paper); outline-offset: 3px; }
.sound-icon { position: relative; width: 16px; height: 17px; background: currentColor; clip-path: polygon(0 32%, 35% 32%, 80% 0, 80% 100%, 35% 68%, 0 68%); }
.sound-toggle[aria-pressed="false"] .sound-icon { opacity: .55; }
.game-gallery .sound-toggle { color: var(--release-paper); background: var(--release-ink) var(--xerox) 20px 70px / 410px; font: 400 18px/1 var(--print-face); text-transform: none; }
html[data-game-menu="open"] { overflow: hidden; }
.press-pause-slip { position: absolute; z-index: 8; left: -23%; top: 15%; margin: 0; padding: 10px 21px 14px; color: var(--ink); background: var(--accent) var(--stock) 52px 70px / 420px; font: 900 clamp(27px, 3vw, 44px)/1 "Nachtzine Print", "Nachtzine Word", sans-serif; text-transform: uppercase; rotate: -7deg; box-shadow: 2px 3px 1px #21152c40, 4px 8px 7px #21152c30; }
#zineApp .time-paper > span { border: 0; background: #211d2433; clip-path: polygon(4% 5%, 95% 0, 100% 91%, 7% 100%, 0 44%); mask: var(--ink-grain-mask,none) 0 0 / 192px 160px; }
#zineApp .time-paper > span::before { content: ""; position: absolute; inset: 2px; background: var(--action) var(--stock) 80px 20px / 560px; background-blend-mode: multiply; }
#zineApp .time-paper > span::after { z-index: 1; }
#zineApp .time-paper > span:nth-child(3n) { clip-path: polygon(0 0, 96% 6%, 91% 100%, 2% 93%); }
#zineApp:is([data-phase="ending"],[data-phase="ended"]) .scene-content { position: relative; align-content: center; gap: clamp(8px, 1.8vh, 20px); padding-block: 24px; }
#zineApp:is([data-phase="ending"],[data-phase="ended"]) .scene-content::before,
#zineApp:is([data-phase="ending"],[data-phase="ended"]) .scene-content::after { content: ""; position: absolute; height: 3px; left: 12%; right: 12%; background: repeating-linear-gradient(90deg, var(--ink) 0 9px, transparent 9px 16px); opacity: .5; }
#zineApp:is([data-phase="ending"],[data-phase="ended"]) .scene-content::before { top: 13px; }
#zineApp:is([data-phase="ending"],[data-phase="ended"]) .scene-content::after { bottom: 13px; }
#zineApp:is([data-phase="ending"],[data-phase="ended"]) .scene-title { font-size: clamp(37px, 4.5vw, 66px); }
#zineApp:is([data-phase="ending"],[data-phase="ended"]) .scene-score strong { font-size: clamp(82px, 14vh, 148px); line-height: .85; }
#zineApp:is([data-phase="ending"],[data-phase="ended"]) .scene-best { font-size: clamp(21px, 1.8vw, 28px); }
@media (max-width: 1100px) and (min-width: 701px) {
  .gallery-inner { gap: 25px; padding-inline: 28px; }
  .game-gallery .game-poster { padding: 14px; min-height: 395px; grid-template-rows: minmax(120px, 20vh) auto 1fr auto auto; }
  .poster-name { font-size: 35px; } .poster-description { font-size: 21px; }
  .game-poster-words .poster-name { font-size: clamp(23px, 2.55vw, 28px); min-height: 66.5px; }
  .gallery-brand { width: 220px; }
  .gallery-intro h2 { font-size: 48px; }
}
@media (max-width: 700px) {
  .gallery-inner { padding: 22px 24px 78px; gap: 25px; }
  .gallery-heading { gap: 16px; align-items: flex-start; flex-wrap: wrap; padding-right: 44px; }
  .gallery-brand { width: 174px; margin-top: 0; }
  .gallery-intro { flex-basis: 100%; }
  .gallery-intro h2 { font-size: 34px; } .gallery-intro p { font-size: 21px; }
  .game-gallery .gallery-close { right: -9px; top: 0; width: 40px; min-height: 44px; font-size: 36px; }
  .gallery-games { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 25px 17px; }
  .game-gallery .game-poster { padding: 12px; min-height: 335px; gap: 9px; grid-template-rows: 108px auto 1fr auto auto; }
  .poster-name { font-size: 31px; } .poster-description { font-size: 19px; }
  .game-poster-words .poster-name { font-size: clamp(20px, 4.8vw, 29px); min-height: 59px; letter-spacing: -.04em; }
  .poster-format { font-size: 16px; padding-top: 3px; } .poster-select { font-size: 20px; }
  .poster-word-strip { font-size: 24px; } .poster-word-strip + .poster-word-strip { font-size: 21px; }
  .poster-script { padding: 8px; } .poster-script > span { font-size: 20px; } .poster-script b { font-size: 75px; }
  .poster-folder b { font-size: 25px; padding: 5px; }
  .gallery-footer { display: grid; gap: 12px; } .gallery-footer p { font-size: 25px; }
  .zine-utilities { bottom: 7px; left: 9px; } .sound-toggle { font-size: 16px; }
  .press-pause-slip { left: 0; top: 28%; font-size: 27px; padding: 6px 13px 10px; }
}
/* A landscape phone has room for the broad mark beside the intro. Keep the
   stacked header for narrow portrait screens only. */
@media (min-width: 560px) and (max-width: 700px) {
  .gallery-heading { flex-wrap: nowrap; align-items: center; gap: 24px; }
  .gallery-intro { flex-basis: auto; }
}
@media (max-height: 760px) and (min-width: 1101px) {
  .gallery-inner { gap: 20px; padding-top: 20px; }
  .gallery-brand { width: 220px; } .gallery-intro h2 { font-size: 52px; }
  .game-gallery .game-poster { min-height: 370px; grid-template-rows: 135px auto 1fr auto auto; gap: 8px; }
  .poster-name { font-size: 39px; } .poster-description { font-size: 22px; }
  .game-poster-words .poster-name { min-height: 74.1px; }
  .gallery-footer { padding-top: 0; } .gallery-footer p { font-size: 28px; }
}
@media (min-width: 901px) and (max-width: 1320px) and (min-height: 561px) { #caseBackAction { margin-left: 18px; } }
/* Small playfields reserve the footer for the game. Sound remains available
   inside the same game gallery, where it cannot cover a primary action. */
@media (max-width: 900px), (max-height: 560px) {
  html:not([data-game-menu="open"]) .zine-utilities { display: none; }
}
@media (prefers-reduced-motion: reduce) { .game-gallery .game-poster { transition: none; } .game-gallery .game-poster:not(:disabled):is(:hover,:focus-visible) { translate: none; } }
@media (forced-colors: active) {
  #zineGameMenu .gallery-brand { background: none; aspect-ratio: auto; width: auto; }
  .gallery-brand::after { display: block; color: CanvasText; font: 900 32px/1.1 var(--print-face); }
  #zineGameMenu.game-gallery { background: Canvas; color: CanvasText; }
  .gallery-intro p,.gallery-edition { color: CanvasText; }
  .game-gallery .game-poster { color: ButtonText; background: ButtonFace; border: 2px solid ButtonText; filter: none; transform: none; }
  .game-poster::before,.poster-art { display: none; } .game-gallery .game-poster { grid-template-rows: auto 1fr auto auto; min-height: 220px; }
  .poster-name { mask: none; } .poster-select { background: Highlight; color: HighlightText; }
  .game-gallery .gallery-close,.sound-toggle,.press-pause-slip { background: ButtonFace; color: ButtonText; border: 2px solid ButtonText; clip-path: none; }
  #zineApp .time-paper > span { mask: none; clip-path: none; border: 1px solid CanvasText; }
}
