/* Два листа на столе; бумага остаётся светлой ночью. */
.game-intro { text-align: center; padding-bottom: 36px; }
.game-intro h1 { margin-top: 20px; }
.game-intro .lead { margin-inline: auto; max-width: 48ch; }
.game-disclosure { display: grid; gap: 6px; max-width: 700px; margin: 26px auto 0; text-align: left; }
.game-disclosure p { color: var(--muted); }
.game-section { padding-bottom: clamp(56px, 7vw, 100px); }
.game-desk { padding: clamp(22px, 4vw, 44px); border: 1px solid var(--line); border-radius: var(--r-l); background: repeating-linear-gradient(96deg, transparent 0 39px, color-mix(in srgb, var(--desk-2) 35%, transparent) 40px 41px), var(--desk); }
.game-topline { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.game-kicker { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.game-topline h2 { margin-top: 8px; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.game-score { font-size: 14px; text-align: right; flex: none; }
.game-score b { font: 700 2.3rem/1 var(--hand); color: var(--accent); }
.game-score small { display: block; color: var(--muted); font-size: 12px; }
.game-instruction { color: var(--muted); font-size: 15px; margin-top: 18px; }
.game-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 46px); margin: 32px 8px 0; }
.game-card { min-width: 0; padding: 0; border: 0; background: none; perspective: 1500px; border-radius: 5px; text-align: left; color: var(--on-sheet); transform: rotate(-1.1deg); transition: transform .35s var(--spring); }
.game-card-b { transform: rotate(1deg); }
.game-card:not(:disabled):not([aria-disabled="true"]):hover { transform: translateY(-6px) rotate(0); }
.game-card:focus-visible { outline-color: var(--pen-ink); outline-offset: 8px; }
.game-card-inner { position: relative; display: grid; transform-style: preserve-3d; transition: transform .85s var(--ease-io); }
.game-card.is-flipped .game-card-inner { transform: rotateY(180deg); }
.game-face { grid-area: 1 / 1; display: flex; flex-direction: column; min-height: 350px; padding: 24px clamp(18px, 3vw, 34px); border: 1px solid var(--sheet-edge); border-radius: 4px 4px 9px 5px; background-color: var(--sheet); color: var(--on-sheet); box-shadow: var(--shadow-2), 2px 4px 0 var(--sheet-edge); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.game-front { background-image: linear-gradient(90deg, transparent 18px, var(--margin-red) 18px 19px, transparent 19px), repeating-linear-gradient(transparent 0 31px, var(--rule) 31px 32px); background-position: 0 0, 0 68px; }
.game-sheet-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font: 700 12px/1.4 var(--font); color: var(--on-sheet-muted); }
.game-sheet-label b { color: var(--on-sheet); font-size: 13px; }
.game-sheet-label > span { text-align: right; }
.game-writing { display: block; margin: 30px 0 16px 10px; color: var(--pen-ink); font: 600 clamp(22px, 2.3vw, 29px)/32px var(--hand); }
.game-writing > span { display: block; }
.game-card-b .game-writing { font: 400 clamp(20px, 2.1vw, 26px)/32px var(--script); }
.game-placeholder { display: block; margin-top: auto; color: var(--on-sheet-muted); font-size: 12px; padding-top: 12px; }
.game-pick { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; font-size: 14px; font-weight: 800; color: var(--pen-ink); }
.game-pick svg { width: 20px; height: 20px; flex: none; }
.game-back { transform: rotateY(180deg); text-align: center; }
.game-back-mark { font: 600 4rem/1 var(--hand); color: var(--pen-ink); margin: 25px 0 12px; }
.game-answer-name { font-size: clamp(18px, 2vw, 23px); }
.game-answer-note { font-size: 14px; color: var(--on-sheet-muted); margin-top: 12px; }
.game-choice-mark { margin-top: auto; padding-top: 18px; font: 600 1.5rem/1.1 var(--hand); color: var(--pen-ink); }
.game-card.is-chosen .game-back { outline: 2px solid var(--pen-ink); outline-offset: -7px; }
.game-response { margin-top: 30px; min-height: 78px; }
#game-feedback { font-weight: 700; }
.game-response-note { color: var(--muted); font-size: 14px; margin-top: 6px; }
.game-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin-top: 18px; }
.game-rounds { display: flex; gap: 12px; list-style: none; padding: 0; margin: 28px 0 0; justify-content: center; }
.game-rounds li { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font: 600 1.35rem/1 var(--hand); }
.game-rounds li[aria-current] { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.game-rounds li.is-done { background: var(--accent-soft); color: var(--accent); }
.game-result { max-width: 820px; margin: 20px auto 0; padding: clamp(28px, 5vw, 56px); }
.game-result .game-kicker { color: var(--pen-ink); }
.game-result h2 { margin-top: 14px; }
.game-result-number { font: 600 clamp(3rem, 6vw, 4.6rem)/1.1 var(--hand); color: var(--pen-ink); margin: 20px 0; }
.game-result-caption { color: var(--on-sheet-muted); font-size: 14px; margin: -12px 0 20px; }
.game-result .joke { color: var(--pen-ink); }
.game-result :focus-visible { outline-color: var(--pen-ink); }
.game-result .btn { max-width: 100%; }
.game-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 42px; }
.game-purpose { max-width: 80ch; margin-top: 40px; color: var(--muted); }
.game-nojs { margin-top: 20px; color: var(--muted); }
.game-js { display: none; }
.game-ready .game-js { display: inline-flex; }
[data-page="game"] [hidden] { display: none !important; }
html:not(.js) .game-instruction, html:not(.js) .game-pick, html:not(.js) .game-response, html:not(.js) .game-score, html:not(.js) .game-rounds { display: none; }
@media (max-width: 650px) {
  .game-intro { padding-top: 36px; padding-bottom: 28px; }
  .game-intro h1 { max-width: 12ch; margin-inline: auto; }
  .game-intro .ink-word { white-space: normal; }
  .game-pair { grid-template-columns: 1fr; margin-inline: 3px; gap: 24px; }
  .game-face { min-height: 300px; padding: 20px 24px; }
  .game-writing { margin-top: 24px; }
  .game-links { grid-template-columns: 1fr; gap: 30px; }
  .game-score small { max-width: 10ch; margin-left: auto; }
  .game-response { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .game-card, .game-card-inner { transition: none; } }

/* Подлинные листы показываются без фильтра и декоративного перекрашивания. */
.game-three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.game-single { grid-template-columns: minmax(0, 1fr); max-width: 900px; margin-inline: auto; }
.game-card-1 { transform: rotate(1deg); }
.game-card-2 { transform: rotate(-.5deg); }
.game-slot { position: relative; min-width: 0; display: grid; }
.game-face { height: 100%; gap: 14px; min-height: 0; padding: 16px; background-image: none; }
.game-face img { display: block; width: 100%; height: auto; max-height: 530px; object-fit: contain; filter: none; }
.game-writing { white-space: pre-line; min-height: 180px; margin: 22px 4px; }
.game-card-1 .game-writing { font-family: var(--script); }
.game-answer-name { display: block; border-top: 1px solid var(--sheet-edge); padding-top: 10px; font-weight: 800; color: var(--pen-ink); }
.game-card.is-chosen .game-front { outline: 2px solid var(--pen-ink); outline-offset: -5px; }
.game-rounds { flex-wrap: wrap; }
.game-rounds li { font-size: 1rem; }
.game-topline h2 { max-width: 30ch; }
.game-score { min-width: 155px; }
.game-image-error { font: 600 14px/1.5 var(--font); }
@media (max-width: 650px) {
  .game-three { grid-template-columns: 1fr; }
  .game-topline { align-items: flex-start; gap: 12px; }
  .game-score { min-width: 105px; font-size: 12px; }
  .game-score small { max-width: 16ch; }
  .game-face img { max-height: 430px; }
  .game-rounds { gap: 7px; }
  .game-rounds li { width: 29px; height: 29px; }
}

/* Лупа: увеличение не выбирает ответ. */
.game-zoom-open { position: absolute; top: 12px; right: 12px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--sheet-edge); background: var(--sheet); color: var(--pen-ink); box-shadow: var(--shadow-1); cursor: zoom-in; transition: transform .2s var(--spring); }
.game-zoom-open:hover { transform: scale(1.08); }
.game-zoom-open:focus-visible { outline: 2px solid var(--pen-ink); outline-offset: 3px; }
.game-zoom { width: min(1100px, 96vw); height: min(92vh, 1400px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 14px; background: var(--sheet); color: var(--on-sheet); box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; }
.game-zoom[open] { display: grid; grid-template-rows: auto 1fr; }
.game-zoom::backdrop { background: rgba(10, 14, 30, .72); backdrop-filter: blur(3px); }
.game-zoom-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--sheet-edge); }
.game-zoom-hint { flex: 1; font-size: .9rem; opacity: .7; }
.game-zoom-stage { overflow: auto; background: #fbfaf7; }
.game-zoom-stage img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.game-zoom.is-close .game-zoom-stage img { width: 200%; max-width: none; cursor: zoom-out; }
@media (max-width: 650px) { .game-zoom { width: 100vw; height: 100dvh; border-radius: 0; } .game-zoom-hint { display: none; } .game-zoom-open { top: 8px; right: 8px; } }
@media (prefers-reduced-motion: reduce) { .game-zoom-open { transition: none; } }
