/* ===== The Mary game: discount code on the end screens, and the full-width section for the main page (2026-11-27) =====
   Loaded after style.css on game.html, and on index.html once the game section goes in.
   The section markup for index.template.html is in docs/game-section.snippet.html. */

/* ---------- discount code (end and rest screens) ---------- */
.gcode { display: grid; justify-items: center; gap: 8px; margin-top: 4px; }
.gcode p { margin: 0; }
.gcode__lead { font: 600 clamp(17px, 1.6vw, 20px)/1.3 var(--display); color: #fff; text-wrap: balance; }
.gcode__row { display: inline-flex; align-items: center; gap: 10px; padding: 5px 5px 5px 20px; border: 2px dashed rgba(242, 179, 61, .85); border-radius: 999px; background: rgba(8, 12, 36, .78); text-shadow: none; }
.gcode__code { font: 600 clamp(22px, 2.4vw, 28px)/1 var(--display); letter-spacing: .14em; color: var(--gold); user-select: all; -webkit-user-select: all; }
.gcode__copy { min-width: 92px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 999px; background: #fff; color: var(--night-deep); font: 600 15px/1 var(--display); cursor: pointer; transition: background-color .18s ease; }
.gcode__copy:hover { background: #fff4d8; }
.gcode__copy:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.gcode__note { font: 400 14px/1.4 var(--display); color: #f3e2c4; }
.gcode + .game__actions { margin-top: 6px; }
.game__screen .game__actions .btn { margin-top: 0; }
.game__screen .game__actions a.btn { text-shadow: none; }
.game__screen--rest .game__actions .btn, .game__screen--end .game__actions .btn { width: auto; min-width: 0; min-height: 52px; padding: 13px 26px; font-size: 17px; }
@media (max-width: 600px) {
  .game__screen--rest .game__actions, .game__screen--end .game__actions { flex-direction: column; align-items: center; gap: 10px; }
  .game__screen--rest .game__actions .btn, .game__screen--end .game__actions .btn { width: min(100%, 300px); }
}
/* short screens: the verse gives way so the code and buttons fit */
@media (max-height: 700px) { .game--section .game__screen--end .game__how { display: none; } }

/* ---------- the game as a full-width section on the main page ---------- */
.game.game--section { overflow: hidden; z-index: auto; padding: clamp(112px, 11vw, 160px) 0 0; color: var(--on-night);
  background: linear-gradient(180deg, var(--plaster) 0, var(--night) clamp(72px, 7vw, 110px), var(--night) 100%); }
.game--section .game__head { margin-bottom: clamp(28px, 3.5vw, 44px); }
.game--section .game__head h2 { color: #fff; }
.game--section .game__head p { margin: 0; color: var(--on-night); text-wrap: balance; }
/* the first screen's sky starts in the night of the heading band, with no seam */
.game--section .game__screen--start { background: linear-gradient(180deg, var(--night) 0%, rgba(8, 12, 36, .6) 16%, rgba(8, 12, 36, .3) 42%, rgba(8, 12, 36, 0) 64%); }
/* the stage runs edge to edge, like the sky at the top of the page */
.game--section .game__frame, .game--section .game__frame:focus { width: 100%; max-width: none; margin: 0; aspect-ratio: auto; border-radius: 0; box-shadow: none; outline: none;
  height: max(min(56.25vw, 86vh), 49vw, 460px); height: max(min(56.25vw, 86svh), 49vw, 460px); }
/* phones: a tall stage that still leaves part of the page on screen to scroll by */
@media (max-width: 600px) {
  .game.game--section { padding-top: 104px; }
  .game--section .game__frame, .game--section .game__frame:focus { aspect-ratio: auto; border-radius: 0; height: max(min(76vh, 640px), 480px); height: max(min(76svh, 640px), 480px); }
}

/* round 34 (Josh): a hard-edged section. The game fills it edge to edge with no fade, frame or heading band;
   the title, the line under it and Play sit in the middle; simpler end screens. */
.game.game--section { padding: 0; background: var(--night); }
.game--section .game__screen--start { background: radial-gradient(60% 60% at 50% 50%, rgba(8, 12, 36, .45), rgba(8, 12, 36, 0)); place-content: center; }
.game--section .game__title { margin: 0; }
.game--section .game__sub { max-width: 34em; color: #fff4d8; text-wrap: balance; }
@media (max-width: 600px) { .game.game--section { padding-top: 0; } }
