.leisure-section { padding-block: 72px 32px; }
.leisure-section h2 { font-size: 34px; }
.leisure-entries { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.leisure-entry { display: grid; grid-template-columns: 44% 1fr; align-items: center; gap: 24px; border-block: 1px solid var(--line); padding-block: 24px; min-width: 0; }
.leisure-entry > img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.leisure-entry h3 { font-size: 26px; margin: 6px 0; }
.leisure-entry p:not(.small-label) { font-size: 13px; color: var(--muted); }
.leisure-entry .text-link { margin-top: 12px; color: var(--red); }
.game-preview { display: inline-block; position: relative; width: 92px; aspect-ratio: 100/64; flex: 0 0 auto; vertical-align: middle; }
.game-preview > svg { display: block; width: 100%; height: 100%; }
.preview-turn { position: absolute; left: 40%; top: 66%; width: 20%; height: 31%; color: #497b63; }
.preview-turn > svg { display: block; width: 100%; height: 100%; }
.game-title-line { display: flex; align-items: center; gap: 14px; }
.game-title-line h2 { white-space: nowrap; }
#gameTitlePreview .game-preview { width: 72px; }
.entry-game-previews { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-block: 10px 2px; }
.entry-game-preview { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; }
.entry-game-preview .game-preview { width: 62px; }
.play-dialog { width: 700px; background: #fcfcf9; }
.quiz-dialog { width: 1040px; }
.play-dialog .dialog-heading, .quiz-dialog .dialog-heading { position: sticky; top: -1px; z-index: 5; background: #fcfcf9; padding-block: 8px 16px; box-shadow: 0 -36px 0 #fcfcf9; }
.pair-mode-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid #cbd6ce; border-radius: 5px; overflow: hidden; margin: 0 0 24px; background: #f2f6f3; box-shadow: 0 6px 18px #243d360c; }
.pair-mode-tabs button { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 10px 8px; min-height: 88px; font-size: 14px; min-width: 0; border-right: 1px solid #cbd6ce; transition: background .2s, color .2s, box-shadow .2s; }
.pair-mode-tabs button:last-child { border-right: 0; }
.pair-mode-tabs button:hover { background: #e7efe9; }
.pair-mode-tabs button[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--red); }
.mode-tab-label { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.mode-tab-label strong { font: 16px/1.35 var(--serif); white-space: nowrap; }
.mode-tab-label small { color: #74837a; font-size: 10px; white-space: nowrap; }
.pair-mode-tabs .game-preview { width: 60px; }
.entry-game-preview { min-height: 44px; padding: 2px 0; text-align: left; }
.entry-game-preview:hover { color: var(--red); }
.pair-mode-tabs button > span:last-child { white-space: nowrap; }
.pair-mode-tabs button[aria-pressed="true"] .preview-turn { color: #d4e7da; }
.pair-mode-tabs button[aria-pressed="true"], .difficulty-tabs button[aria-pressed="true"] { background: var(--green); color: white; }
.pair-mode-tabs button[aria-pressed="true"] .mode-tab-label small { color: #d6e5dc; }
.difficulty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.game-progress { display: grid; grid-template-columns: 1fr 150px; align-items: center; gap: 14px; border-block: 1px solid #d9e2db; padding-block: 12px; margin: -6px 0 22px; }
.game-progress > div { display: flex; align-items: baseline; gap: 12px; }
.game-progress span { color: #53685b; font-size: 13px; }
.game-progress strong { font: 25px/1 var(--serif); color: var(--red); font-variant-numeric: tabular-nums; }
.game-progress small { color: var(--muted); font: 12px/1 var(--sans); }
.game-progress progress, .journey-progress progress { width: 100%; height: 7px; border: 0; border-radius: 0; overflow: hidden; background: #dfe8e1; accent-color: var(--green); }
.game-progress progress::-webkit-progress-bar, .journey-progress progress::-webkit-progress-bar { background: #dfe8e1; }
.game-progress progress::-webkit-progress-value, .journey-progress progress::-webkit-progress-value { background: var(--green); }
.game-progress progress::-moz-progress-bar, .journey-progress progress::-moz-progress-bar { background: var(--green); }
.difficulty-tabs { display: flex; gap: 8px; }
.difficulty-tabs button { border: 1px solid var(--line); border-radius: 4px; min-height: 44px; padding: 8px 18px; font-size: 14px; }
.timed-switch { display: flex; gap: 8px; align-items: center; font-size: 13px; min-height: 44px; }
.timed-switch input { accent-color: var(--red); width: 18px; height: 18px; }
.level-list { display: grid; gap: 12px; }
.level-card { display: flex; align-items: center; gap: 22px; text-align: left; border: 1px solid var(--line); border-radius: 4px; padding: 22px; min-height: 100px; }
.level-card:not(:disabled):hover { border-color: var(--red); background: #faf5f5; }
.level-card:disabled { opacity: .55; }
.level-card .level-number { font: 32px/1 var(--serif); color: var(--red); }
.level-card strong { font-size: 19px; font-family: var(--serif); font-weight: 500; }
.level-card small { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.level-card em { display: block; margin-top: 6px; color: #426c53; font-size: 12px; font-style: normal; }
.level-card > svg { margin-left: auto; width: 22px; }
.play-note { color: var(--muted); line-height: 1.9; font-size: 13px; margin-top: 20px; }
.pair-stage { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 12px; }
.pair-stage strong { font: 18px/1.5 var(--serif); }
.pair-stage > div { display: flex; gap: 4px; }
.pair-game-lead { color: #67776d; font: 13px/1.8 var(--serif); letter-spacing: .02em; margin: -2px 0 10px; }
.pair-game-lead[data-type="stack"] { color: var(--red); }
.pair-metrics { display: grid; grid-template-columns: 1.2fr 1fr 1fr; border-block: 1px solid var(--line); padding-block: 14px; gap: 16px; margin: 12px 0 6px; }
.pair-metrics span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.pair-metrics strong { font: 23px/1.2 var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pair-board-wrap { position: relative; padding: 16px; border: 1px solid #e0e6e1; background: #f4f7f4; box-shadow: inset 0 1px white, 0 7px 18px #243d3608; }
@media(min-width: 761px) { .pair-board-wrap[data-dense="true"] { width: 100%; max-width: clamp(360px, calc(100svh - 540px), 100%); margin-inline: auto; } }
.pair-board { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.pair-board[data-cols="6"] { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px; }
.pair-tile { --tile-accent: #8fa399; position: relative; display: block; padding: 0; aspect-ratio: 1; min-width: 0; border: 1px solid #c8d3ca; border-radius: 5px; background: white; overflow: hidden; isolation: isolate; box-shadow: 0 3px 0 #d6dfd8, 0 7px 12px #243d3610; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.pair-tile::after { content: ""; position: absolute; z-index: 4; left: 5px; right: 5px; top: 4px; height: 2px; background: var(--tile-accent); opacity: .9; }
.pair-tile[data-kind="qiaofu"] { --tile-accent: #a32d37; }.pair-tile[data-kind="huitong"] { --tile-accent: #9a7652; }.pair-tile[data-kind="kangjia"] { --tile-accent: #497b63; }.pair-tile[data-kind="yindonggua"] { --tile-accent: #725b47; }.pair-tile[data-kind="shaomei"] { --tile-accent: #ba8d62; }
.pair-tile:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 5px 0 #c8d5cb, 0 10px 16px #243d3618; }
.pair-tile:focus-visible { outline-offset: 1px; z-index: 2; }
.pair-tile .tile-front { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 5px; gap: 3px; background: #fff; }
.tile-photo { display: block; flex: 1; min-height: 0; overflow: hidden; background: #e7ece8; }
.tile-photo > img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.pair-tile:not(:disabled):hover .tile-photo > img { transform: scale(1.04); }
.tile-name { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 14px; overflow: hidden; font-size: 10px; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.tile-name small { color: var(--muted); font-size: 8px; }
.pair-tile.is-selected { outline: 2px solid var(--red); outline-offset: 2px; transform: translateY(-3px); box-shadow: 0 5px 0 #a32d3726, 0 10px 16px #243d361c; }
.pair-tile.is-hint { outline: 3px solid #508a69; outline-offset: 1px; }
.pair-board .pair-tile.is-matched { visibility: hidden; pointer-events: none; }
.pair-tile:disabled { opacity: 1; }
.tile-back { display: grid; place-items: center; position: absolute; inset: 0; background: #e8efea; border: 5px solid white; box-shadow: inset 0 0 0 1px #b9cabe; }
.tile-back::before { content: ""; position: absolute; inset: 8px; border: 1px solid #a5bba9; }
.tile-back-seal { position: relative; display: grid; place-items: center; width: 76%; height: 76%; color: #496456; }
.tile-back-seal img { width: 70%; height: 70%; object-fit: contain; opacity: .82; }
.tile-back-seal small { position: absolute; bottom: -2px; font: 9px/1 var(--serif); letter-spacing: .12em; }
.memory-board .tile-front { visibility: hidden; }
.memory-board .pair-tile:not(.is-revealed)::after { background: #8fa399; }
.memory-board .is-revealed .tile-front { visibility: visible; animation: turn-face .25s ease-out; }
.memory-board .is-revealed .tile-back { visibility: hidden; }
@keyframes turn-face { from { transform: rotateY(85deg); opacity: .6; } to { transform: rotateY(0); opacity: 1; } }
#connectionLine { pointer-events: none; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#connectionLine polyline { fill: none; stroke: var(--red); stroke-width: 3px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.is-paused .pair-board { visibility: hidden; }
.pair-overlay { position: absolute; inset: 0; background: #f4f7f4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 18px; }
.pair-overlay h3 { font-size: 24px; }
.pair-overlay > svg { width: 32px; height: 32px; color: var(--green); }
#pairFeedback { min-height: 46px; font-size: 13px; color: var(--muted); line-height: 1.8; margin: 8px 16px; }
.pair-actions { display: flex; justify-content: space-around; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; position: sticky; bottom: -1px; background: white; z-index: 4; box-shadow: 0 36px 0 white; }
.pair-actions button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; font-size: 13px; padding: 8px 12px; }
.pair-actions button:disabled { opacity: .35; }
.pair-actions svg { width: 20px; height: 20px; }
.pair-result { padding: 30px 0; text-align: center; min-height: 280px; }
.pair-result h3 { font-size: 27px; margin-bottom: 16px; }
.pair-result p { font-size: 14px; color: var(--muted); }
.game-record { display: inline-flex; align-items: center; gap: 9px; padding: 10px 15px; border-block: 1px solid #d2dcd4; margin-top: 8px; color: #365945; font-size: 13px; }
.game-record svg { width: 20px; height: 20px; color: var(--red); }
.game-record strong { color: var(--red); font-variant-numeric: tabular-nums; }
.pair-board-wrap.stack-wrap { max-width: 350px; margin-inline: auto; padding: 12px 6px 8px; width: 100%; }
.stack-board { grid-template-columns: repeat(9,minmax(0,1fr)); grid-template-rows: repeat(9,minmax(0,1fr)); gap: 0; aspect-ratio: 1; isolation: isolate; background: #f2f6f3; border: 1px solid #d2ded5; border-radius: 5px; }
.stack-tile { --tile-accent: #8fa399; position: relative; display: block; min-width: 0; min-height: 0; padding: 3px; margin: 1px; background: white; border: 1px solid #9eb3a4; border-radius: 5px; box-shadow: 0 3px 0 #bdcdc2, 0 5px 9px #17281f26; overflow: hidden; cursor: pointer; touch-action: manipulation; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.stack-tile::after { content: ""; position: absolute; z-index: 3; left: 5px; right: 5px; top: 4px; height: 2px; background: var(--tile-accent); }
.stack-tile[data-kind="qiaofu"] { --tile-accent: #a32d37; }.stack-tile[data-kind="huitong"] { --tile-accent: #9a7652; }.stack-tile[data-kind="kangjia"] { --tile-accent: #497b63; }.stack-tile[data-kind="yindonggua"] { --tile-accent: #725b47; }.stack-tile[data-kind="shaomei"] { --tile-accent: #ba8d62; }
.stack-tile-face { position: absolute; inset: 3px; display: block; overflow: hidden; background: #e7ece8; }
.stack-tile-photo, .stack-tile-photo > img { display: block; width: 100%; height: 100%; }
.stack-tile-photo > img { object-fit: cover; pointer-events: none; transition: transform .35s ease, filter .2s ease; }
.stack-tile-name { position: absolute; left: 3px; right: 3px; bottom: 3px; display: flex; align-items: center; justify-content: center; gap: 2px; overflow: hidden; padding: 2px 3px; background: #fffffff0; color: var(--ink); font-size: 9px; line-height: 1.15; white-space: nowrap; text-overflow: ellipsis; }
.stack-tile-name small { color: var(--muted); font-size: 7px; }
.stack-tile-state { position: absolute; z-index: 4; top: 6px; right: 6px; display: grid; place-items: center; width: 15px; height: 15px; color: white; background: #243d36bf; border-radius: 50%; }
.stack-tile-state svg { width: 10px; height: 10px; stroke-width: 2; }
.stack-tile.is-covered { filter: saturate(.45); cursor: default; }
.stack-tile.is-covered .stack-tile-face { filter: brightness(.7); }
.stack-tile.is-covered .stack-tile-state { background: #243d369c; }
.stack-tile.is-concealed { filter: none; border-color: #a8b4a8; }
.stack-tile.is-concealed .stack-tile-face { filter: none; background: #dfe7de; }
.stack-tile-back { position: absolute; inset: 0; display: grid; place-content: center; gap: 0; color: #52675a; text-align: center; background: repeating-linear-gradient(135deg, #e7ede5 0 8px, #dce5dc 8px 9px); }
.stack-tile-back > span { font: 24px/1 var(--serif); color: #9a7357; }
.stack-tile-back small { font: 8px/1.3 var(--serif); }
.stack-tile:disabled { opacity: 1; }
.stack-tile:not(:disabled):hover { border-color: var(--red); box-shadow: 0 4px 0 #a4383e, 0 8px 12px #17281f26; transform: translateY(-2px); }
.stack-tile:not(:disabled):hover .stack-tile-photo > img { transform: scale(1.05); }
.stack-tile:not(:disabled):active { transform: translateY(2px); }
.stack-tile:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.stack-x-0 { grid-column: 1/span 2; }.stack-x-1 { grid-column: 2/span 2; }.stack-x-2 { grid-column: 3/span 2; }.stack-x-3 { grid-column: 4/span 2; }.stack-x-4 { grid-column: 5/span 2; }.stack-x-5 { grid-column: 6/span 2; }.stack-x-6 { grid-column: 7/span 2; }.stack-x-7 { grid-column: 8/span 2; }
.stack-y-0 { grid-row: 1/span 2; }.stack-y-1 { grid-row: 2/span 2; }.stack-y-2 { grid-row: 3/span 2; }.stack-y-3 { grid-row: 4/span 2; }.stack-y-4 { grid-row: 5/span 2; }.stack-y-5 { grid-row: 6/span 2; }.stack-y-6 { grid-row: 7/span 2; }.stack-y-7 { grid-row: 8/span 2; }
.stack-z-0 { z-index: 0; }.stack-z-1 { z-index: 1; }.stack-z-2 { z-index: 2; }.stack-z-3 { z-index: 3; }.stack-z-4 { z-index: 4; }
.stack-tray { max-width: 390px; margin: 10px auto 0; padding: 11px; border: 1px solid #c4d1c9; border-radius: 5px; background: #f5f8f6; box-shadow: 0 5px 14px #243d360b; }
.stack-tray-heading { display: flex; justify-content: space-between; align-items: baseline; font: 13px/1.5 var(--serif); color: #4b6254; margin-bottom: 8px; }
.stack-tray-heading strong { font-variant-numeric: tabular-nums; }
.stack-slots { display: grid; grid-template-columns: repeat(var(--slot-count,7),minmax(0,1fr)); gap: 5px; list-style: none; margin: 0; padding: 0; }
.stack-slots li { position: relative; display: grid; place-items: center; aspect-ratio: 1; min-width: 0; border: 1px solid #c4d1c9; border-radius: 4px; background: white; font-size: 11px; color: #7a8e81; overflow: hidden; }
.stack-slots li.is-extra { border-color: #ad3640; background: #fff8f8; }
.stack-slots li.is-filled { border-color: #aebfb3; box-shadow: inset 0 2px 0 var(--tile-accent, #8fa399); }
.stack-slots li[data-kind="qiaofu"] { --tile-accent: #a32d37; }.stack-slots li[data-kind="huitong"] { --tile-accent: #9a7652; }.stack-slots li[data-kind="kangjia"] { --tile-accent: #497b63; }.stack-slots li[data-kind="yindonggua"] { --tile-accent: #725b47; }.stack-slots li[data-kind="shaomei"] { --tile-accent: #ba8d62; }
.stack-slot-photo, .stack-slot-photo img { display: block; width: 100%; height: 100%; }.stack-slot-photo img { object-fit: cover; }
.stack-slot-label { position: absolute; left: 2px; right: 2px; bottom: 2px; overflow: hidden; padding: 1px 2px; background: #ffffffe8; font-size: 8px; line-height: 1.15; white-space: nowrap; text-overflow: ellipsis; text-align: center; }
.stack-slot-number { font: 12px/1 var(--serif); color: #98a69d; }
.stack-tray.is-warning { border-color: var(--red); background: #fcf3f3; }.stack-tray.is-warning .stack-tray-heading { color: var(--red); }
.stack-tray.is-paused .stack-slots { visibility: hidden; }
.stack-slots.just-cleared { animation: stack-clear .35s ease-out; }
@keyframes stack-clear { 50% { background: #cce3d4; box-shadow: 0 0 0 4px #cce3d4; } }
.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.result-seal { color: var(--red); margin: 8px auto 24px; }.result-seal svg { width: 46px; height: 46px; }
.journey-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.journey-map { position: relative; aspect-ratio: 3/4; max-height: 540px; }
.journey-map > img { position: absolute; width: 100%; height: 100%; object-fit: cover; inset: 0; }
.journey-route { position: absolute; width: 100%; height: 100%; inset: 0; }
.journey-segment { fill: none; stroke: #c6d2cb; stroke-width: 5; stroke-linecap: round; }.journey-segment.is-passed { stroke: #497b63; }
.journey-station { position: absolute; transform: translate(-50%,-50%); width: 48px; height: 48px; padding: 0; overflow: visible; }
.station-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #8fa399; background: white; font: 22px/1 var(--serif); color: #50675a; }
.station-mark svg { width: 18px; height: 18px; }
.station-label { position: absolute; top: 50%; transform: translateY(-50%); left: 56px; white-space: nowrap; color: #354c3f; font: 14px/1.6 var(--serif); background: #ffffffdd; padding: 3px 4px; }
.journey-station:disabled { opacity: .65; }
.journey-station.is-current .station-mark { background: var(--red); border-color: var(--red); color: white; box-shadow: 0 0 0 5px #8f323212; }
.journey-station.is-passed .station-mark { background: var(--green); border-color: var(--green); color: white; }
.journey-station.is-current .station-label { color: var(--red); }
.station-flag { position: absolute; left: 32px; top: -23px; color: var(--red); }.station-flag svg { width: 23px; height: 23px; }
.journey-station[data-station="0"] { left: 24%; top: 88%; }
.journey-station[data-station="1"] { left: 47%; top: 72%; }
.journey-station[data-station="2"] { left: 30%; top: 55%; }
.journey-station[data-station="3"] { left: 56%; top: 39%; }
.journey-station[data-station="4"] { left: 33%; top: 23%; }
.journey-station[data-station="5"] { left: 51%; top: 9%; }
.map-caption { font-size: 11px; line-height: 1.7; color: var(--muted); margin-top: 12px; }
.journey-heading-count { font-size: 13px; font-family: var(--sans); color: var(--muted); margin-top: 7px; }
.journey-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; padding-bottom: 18px; margin-top: -8px; }
.journey-progress span { color: #526b5c; font-size: 12px; white-space: nowrap; }
#quizContent { scroll-margin-top: 110px; }
#quizContent > .small-label { color: var(--red); margin-bottom: 9px; }
.journey-intro { position: relative; padding-right: 72px; }
.journey-intro .small-label { color: var(--red); font-size: 13px; margin-bottom: 3px; }
.journey-step { position: absolute; right: 0; top: -2px; color: #7c8a7f; font: 13px/1.5 var(--serif); font-variant-numeric: tabular-nums; }
.journey-note { border-left: 2px solid var(--green); background: #f3f7f3; padding: 13px 16px; margin: 12px 0 24px; }
.journey-note > span { display: inline-flex; align-items: center; gap: 8px; color: #3c6250; font-size: 12px; font-weight: 600; }
.journey-note svg { width: 15px; height: 15px; }
.journey-note p { margin: 7px 0 0; color: #506458; font-size: 13px; line-height: 1.8; }
.station-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
#quizQuestion { font-size: 24px; line-height: 1.65; outline: none; }
.quiz-options { display: grid; gap: 12px; margin-block: 24px; }
.quiz-options button { display: flex; align-items: center; gap: 14px; min-height: 55px; text-align: left; border: 1px solid var(--line); border-radius: 4px; padding: 12px 16px; font-size: 16px; }
.quiz-options button > span { font-family: var(--serif); color: var(--muted); min-width: 18px; }
.quiz-options button > svg { margin-left: auto; width: 19px; flex-shrink: 0; }
.quiz-options button:hover:not(:disabled) { border-color: var(--red); }
.quiz-options button:disabled { opacity: 1; }.quiz-options .correct { background: #eaf2ed; color: #245743; border-color: #89af9a; }.quiz-options .incorrect { background: #f8eded; border-color: #cc9da3; }
.quiz-options .tried { color: #929a93; background: #f5f5f3; text-decoration: line-through; }
.journey-clue { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: -9px; color: var(--muted); font-size: 12px; }
.journey-clue button, .journey-clue p { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #37664b; margin: 0; }
.journey-clue button:hover { color: var(--red); }
.journey-clue svg { width: 17px; height: 17px; }
.quiz-explanation { border-left: 2px solid var(--green); padding: 2px 0 2px 14px; margin-block: 18px 22px; }
.quiz-explanation.is-clue { border-color: var(--red); }
.quiz-explanation strong { font-size: 14px; }.quiz-explanation p { font-size: 13px; line-height: 1.9; margin-block: 9px; color: var(--muted); }
.quiz-explanation a { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--red); min-height: 44px; overflow-wrap: anywhere; }.quiz-explanation a svg { width: 16px; flex-shrink: 0; }
.journey-result { padding: 38px 0; }.journey-result h3 { font-size: 32px; line-height: 1.6; }.journey-result p { font-size: 14px; }.journey-result .result-seal { margin-inline: 0; }.journey-result .result-actions { justify-content: flex-start; }
.journey-result small { display: block; color: var(--muted); margin-top: 24px; }
.privacy-actions { display: flex; flex-wrap: wrap; gap: 10px; }
[hidden] { display: none !important; }
@media(max-width: 1020px) { .leisure-entry { grid-template-columns: 1fr; gap: 16px; }.leisure-entry > img { aspect-ratio: 16/9; } }
@media(max-width: 760px) {
  .game-title-line { gap: 8px; } #gameTitlePreview .game-preview { width: 56px; }
  .pair-mode-tabs button { gap: 8px; padding: 8px 6px; min-height: 74px; font-size: 14px; }
  .pair-mode-tabs .game-preview { width: 64px; }
  .pair-mode-tabs { grid-template-columns: 1fr 1fr; }.pair-mode-tabs button:last-child { grid-column: 1/-1; border-top: 1px solid var(--line); }
  .leisure-section { padding-block: 44px 12px; }.leisure-section h2 { font-size: 29px; }
  .leisure-entries { grid-template-columns: 1fr; gap: 16px; }.leisure-entry { grid-template-columns: 36% 1fr; padding-block: 18px; }.leisure-entry > img { aspect-ratio: 3/4; }.leisure-entry h3 { font-size: 24px; }
  .play-dialog,.quiz-dialog { padding: 20px; }.play-dialog .dialog-heading,.quiz-dialog .dialog-heading { margin-bottom: 12px; }
  .journey-layout { display: flex; flex-direction: column; gap: 24px; }
  #quizContent { order: 0; }
  .journey-layout > div:first-child { order: 1; width: 100%; border-top: 1px solid var(--line); padding-top: 20px; }
  .journey-map { width: min(100%, 245px); margin-inline: auto; max-height: none; }.station-label { font-size: 13px; }
  .pair-board { gap: 6px; }.pair-board-wrap { padding: 10px; }.pair-metrics { gap: 8px; padding-block: 12px; }.pair-metrics strong { font-size: 21px; }
  .game-progress { grid-template-columns: 1fr 92px; }
  .tile-name { font-size: 10px; }.tile-back { border-width: 3px; }
  .pair-actions button { padding-inline: 4px; gap: 5px; font-size: 12px; }.pair-actions svg { width: 18px; }
  .difficulty-tabs button { padding-inline: 14px; }.level-card { padding: 18px; min-height: 86px; }
  #quizQuestion { font-size: 23px; }.journey-result { padding-block: 14px; }
  .journey-note { margin-bottom: 18px; }.journey-progress { margin-top: -2px; }
}
@media(max-width: 360px) {
  .game-title-line h2 { font-size: 23px; } #gameTitlePreview .game-preview { width: 44px; }
  .stack-tile { padding: 2px; }.stack-tile-name { font-size: 8px; }.stack-tile-name small { display: none; }.stack-tile-state { top: 4px; right: 4px; width: 13px; height: 13px; }.stack-tile-state svg { width: 9px; height: 9px; }.stack-slots { gap: 3px; }.stack-tray { padding: 8px; }
  .pair-mode-tabs button { gap: 6px; padding-inline: 4px; font-size: 13px; }.pair-mode-tabs .game-preview { width: 56px; }
  .play-dialog,.quiz-dialog { padding: 14px; }.difficulty-row { gap: 6px; }.difficulty-tabs button { padding-inline: 12px; }
  .pair-board-wrap { padding: 6px; }.pair-board { gap: 4px; }.pair-tile { aspect-ratio: .92; }.pair-tile .tile-front { padding: 3px; gap: 2px; }.tile-name { font-size: 9px; }.tile-name small { display: none; }
  .pair-metrics strong { font-size: 19px; }.pair-overlay h3 { font-size: 21px; }.pair-result h3 { font-size: 24px; }
  .journey-map { width: min(100%, 220px); }.station-label { font-size: 11px; left: 44px; }.journey-station,.station-mark { width: 44px; height: 44px; }
  .journey-progress { grid-template-columns: 1fr; gap: 6px; }.journey-progress span { white-space: normal; }
}
@media(prefers-reduced-motion: reduce) { .memory-board .is-revealed .tile-front, .stack-slots.just-cleared { animation: none; } }

/* The play surface borrows the site's ink, cinnabar and warm paper, with the food itself as the card face. */
.play-dialog, .quiz-dialog { background: #faf9f5; }
.play-dialog .dialog-heading, .quiz-dialog .dialog-heading { background: #faf9f5; box-shadow: 0 -36px 0 #faf9f5; border-bottom: 1px solid #e1d8cb; }
.pair-mode-tabs { border-color: #d7cec0; background: #f3f0e9; box-shadow: none; }
.pair-mode-tabs button { border-color: #d7cec0; }
.pair-mode-tabs button:hover { background: #ece4d7; }
.pair-mode-tabs button[aria-pressed="true"] { background: #30362f; box-shadow: inset 0 -3px 0 #be965f; }
.difficulty-tabs button { border-color: #d7cec0; background: #fff; }
.difficulty-tabs button[aria-pressed="true"] { background: #a32d37; border-color: #a32d37; }
.game-progress { border-color: #e2d9ce; }
.game-progress progress, .journey-progress progress { background: #e9e1d5; accent-color: #a32d37; }
.game-progress progress::-webkit-progress-bar, .journey-progress progress::-webkit-progress-bar { background: #e9e1d5; }
.game-progress progress::-webkit-progress-value, .journey-progress progress::-webkit-progress-value { background: #a32d37; }
.game-progress progress::-moz-progress-bar, .journey-progress progress::-moz-progress-bar { background: #a32d37; }
.level-card { background: #fff; border-color: #e0d8cb; border-left: 3px solid #b99a72; box-shadow: 0 5px 18px #332c2010; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.level-card:not(:disabled):hover { transform: translateY(-2px); background: #fff; box-shadow: 0 11px 22px #332c2018; }
.level-copy { flex: 1; min-width: 0; }
.level-art { display: flex; flex: 0 0 auto; align-items: center; padding-left: 10px; }
.level-art img { width: 43px; height: 43px; object-fit: cover; border: 2px solid white; border-radius: 50%; box-shadow: 0 2px 6px #29241e26; }
.level-art img + img { margin-left: -13px; }
.level-card > svg { margin-left: 0; }
.pair-game-lead { color: #655e50; }
.pair-board-wrap { background: #2c352e; border: 5px solid #d3c3a7; padding: 12px; box-shadow: inset 0 0 0 1px #546354, 0 9px 22px #29241e17; }
.pair-tile { border: 2px solid #eee9df; border-radius: 3px; background: #eee8dc; box-shadow: 0 3px 0 #a9a292, 0 8px 12px #17211d2d; }
.pair-tile .tile-front { position: absolute; inset: 0; display: block; padding: 0; background: #efede5; }
.tile-photo { width: 100%; height: 100%; }
.tile-photo > img { object-fit: cover; }
.tile-name { position: absolute; left: 0; right: 0; bottom: 0; min-height: 28px; padding: 4px 2px 3px; overflow: visible; color: white; font-size: 11px; font-weight: 600; text-shadow: 0 1px 3px #000b; background: linear-gradient(transparent, #171b19e8); }
.pair-tile::after, .stack-tile::after { left: 4px; right: 4px; top: 3px; height: 2px; }
.pair-tile.is-selected { outline-color: #caad7c; box-shadow: 0 3px 0 #b78a61, 0 0 0 4px #caad7c77; }
.tile-back { border: 4px solid #fffaf2; background: #e7ddcc; box-shadow: inset 0 0 0 1px #b99a72; }
.tile-back::before { border-color: #baa481; }
.memory-board .is-revealed .tile-front { animation: card-reveal .4s cubic-bezier(.2,.7,.2,1) both; }
.memory-board .is-revealed .tile-back { visibility: hidden; }
@keyframes card-reveal { from { transform: perspective(500px) rotateY(86deg) scale(.95); opacity: .6; } to { transform: perspective(500px) rotateY(0) scale(1); opacity: 1; } }
.pair-board-wrap.stack-wrap { background: #2c352e; border-color: #d3c3a7; }
.stack-board { background: #28322b; border-color: #435447; }
.stack-tile { border-color: #eee9df; border-radius: 3px; box-shadow: 0 3px 0 #958f81, 0 6px 10px #101b1666; }
.stack-tile-face { inset: 1px; }
.stack-tile-name { left: 1px; right: 1px; bottom: 1px; padding: 3px 1px; color: white; background: linear-gradient(transparent, #172019ed); text-shadow: 0 1px 3px #000c; font-size: 9px; }
.stack-tile.is-covered .stack-tile-face { filter: brightness(.59) saturate(.45); }
.stack-tile:not(:disabled):hover { border-color: #d1b98c; box-shadow: 0 3px 0 #b99465, 0 8px 13px #101b1680; }
.stack-tray { border-color: #d3c3a7; background: #f1ede3; }
.stack-slots li { background: #fffdf8; border-color: #c9bda9; }
.stack-group-status { margin: 8px 1px 0; color: #6e604f; font-size: 11px; line-height: 1.5; min-height: 17px; }
.pair-actions { background: #faf9f5; box-shadow: 0 36px 0 #faf9f5; border-color: #e1d8cb; }
.pair-actions button:not(:disabled):hover { color: #a32d37; }
.pair-celebration { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 10px 18px; color: #fff; background: #243d36ed; border: 1px solid #d5b680; box-shadow: 0 10px 22px #15231a77; white-space: nowrap; max-width: calc(100% - 18px); overflow: hidden; text-overflow: ellipsis; pointer-events: none; font: 17px/1.5 var(--serif); }
.pair-celebration.is-showing { animation: pair-toast .9s ease-out both; }
@keyframes pair-toast { 0% { opacity: 0; transform: translate(-50%,-42%) scale(.93); } 18%,75% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-55%) scale(1.02); } }
.journey-note { border-color: #b99567; background: #f4f0e8; }
.journey-note > span { color: #725b39; }
.quiz-options button { background: #fff; border-color: #dfd8cc; box-shadow: 0 2px 0 #e7dfd2; transition: border-color .18s ease, transform .18s ease; }
.quiz-options button:not(:disabled):hover { transform: translateY(-2px); }
.quiz-options .correct { background: #eaf2ed; border-color: #89af9a; }
.quiz-options .incorrect { background: #f8eded; border-color: #cc9da3; }
.lesson-film { margin: 26px 0 22px; border-top: 1px solid #ded4c6; padding-top: 20px; scroll-margin-top: 125px; }
.lesson-film-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; margin-bottom: 13px; }
.lesson-film-heading span { font-size: 11px; color: #a32d37; font-weight: 600; }
.lesson-film-heading h4 { margin: 0; font: 21px/1.5 var(--serif); }
.lesson-cinematic-wrap { position: relative; background: #16201c; border: 1px solid #2e3730; border-radius: 3px; overflow: hidden; }
.lesson-cinematic { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.lesson-cinematic-caption { position: absolute; left: 8%; right: 8%; bottom: 56px; width: fit-content; max-width: 84%; margin: auto; padding: 5px 9px; color: #fff; background: #15221bd9; font-size: 13px; line-height: 1.45; text-align: center; pointer-events: none; }
.lesson-cinematic-caption[hidden] { display: none; }
.lesson-cinematic-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 8px; }
.lesson-cinematic-meta p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.lesson-cinematic-meta button { flex: none; display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: #a32d37; font-size: 11px; cursor: pointer; padding: 2px 0; }
.lesson-cinematic-meta button svg { width: 15px; height: 15px; }
.lesson-video-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 13px 15px; color: inherit; text-decoration: none; border: 1px solid #d7d0c3; border-radius: 4px; background: #fff; }
.lesson-video-link:hover, .lesson-video-link:focus-visible { border-color: #a32d37; color: #a32d37; }
.lesson-video-link > span { display: grid; gap: 3px; min-width: 0; }
.lesson-video-link small { color: #a32d37; font-size: 11px; }
.lesson-video-link strong { font: 15px/1.5 var(--serif); overflow-wrap: anywhere; }
.lesson-video-link > svg { width: 17px; height: 17px; flex: none; }
.lesson-film > p { color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 9px; }
.lesson-music-credit { overflow-wrap: anywhere; }
.lesson-music-credit a { color: inherit; text-underline-offset: 3px; }
.lesson-film details { border-bottom: 1px solid #e2d9ce; font-size: 12px; }
.lesson-film summary { cursor: pointer; padding: 10px 0; }
.lesson-film ol { margin: 0 0 14px; padding-left: 21px; color: #58635a; line-height: 1.8; }
@media(max-width: 480px) { .lesson-video-link { padding: 12px; } .lesson-cinematic-caption { bottom: 44px; font-size: 11px; padding: 4px 6px; } }
@media(min-width: 761px) { .journey-layout > div:first-child { position: sticky; top: 128px; } }
@media(max-width: 760px) {
  .level-art img { width: 31px; height: 31px; }
  .level-art img + img { margin-left: -10px; }
  .pair-board-wrap { padding: 7px; border-width: 4px; }
  .tile-name { font-size: 10px; min-height: 23px; }
  .stack-tile-name { font-size: 8px; }
}
@media(max-width: 360px) {
  .level-art { display: none; }
  .tile-name { font-size: 9px; min-height: 20px; }
  .stack-tile-name { font-size: 7px; }
}
@media(prefers-reduced-motion: reduce) { .memory-board .is-revealed .tile-front, .pair-celebration.is-showing { animation: none; } }
