/* The game tickets use the same paper, type and inks as a Christmas card. */
.game-hall > .page-head { margin-bottom: clamp(1rem, 3vw, 1.8rem); }
.game-tickets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.game-ticket {
  display: grid; grid-template-columns: 43% minmax(0, 1fr); min-height: 10rem;
  padding: .38rem; border: 1px solid #c5b797; border-radius: .9rem;
  color: var(--pine); background: var(--paper-light); text-decoration: none;
  box-shadow: 0 3px 0 #d9c9a650;
}
.game-ticket:hover { border-color: var(--red); background: #fffbef; }
.game-ticket > img { width: 100%; height: 100%; object-fit: cover; border-radius: .5rem; }
.ticket-copy, .game-brief { display: grid; align-content: center; justify-items: start; }
.ticket-copy { padding: .8rem clamp(.75rem, 1.8vw, 1.3rem); }
.ticket-copy h2 { font-size: clamp(1.5rem, 2.3vw, 2.05rem); font-weight: 500; line-height: 1.08; letter-spacing: -.035em; }
.ticket-copy p { margin-top: .33rem; color: var(--pine-soft); font-size: 1.02rem; line-height: 1.32; }
.ticket-play { display: inline-flex; gap: .38rem; align-items: center; margin-top: .6rem; color: var(--red); font-weight: 650; font-size: 1rem; }
.ticket-play::before { content: ''; border-block: .25rem solid transparent; border-left: .38rem solid currentColor; }
.game-room { padding-block: clamp(1rem, 4vw, 2.4rem) clamp(2.2rem, 6vw, 4rem); }
.game-back { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--pine-soft); text-underline-offset: .2em; font-size: 1rem; }
.game-heading { margin: .15rem 0 1.1rem; }
.game-heading h1 { color: var(--pine); font: 400 clamp(2.05rem, 5.4vw, 3.6rem)/1.08 var(--display); letter-spacing: -.05em; }
.game-table { padding: 0; border-color: #bdae8f; overflow: clip; }
.game-welcome { display: grid; grid-template-columns: 45% minmax(0, 1fr); }
.game-poster { width: 100%; height: 100%; min-height: 15.5rem; object-fit: cover; }
.game-brief { padding: clamp(1.05rem, 3.2vw, 2.1rem); }
.game-brief > p:first-child { line-height: 1.45; }
.game-fine { color: var(--pine-soft); font-size: 1rem; }
.game-brief > :is(.game-fine, .game-challenge) { margin-top: .45rem; }
.game-brief .btn { margin-top: .9rem; min-width: 8rem; }
.game-challenge { color: var(--red-dark); font-weight: 600; }
.game-hud { display: flex; align-items: center; gap: .5rem 1.1rem; padding: .55rem clamp(.7rem, 3vw, 1.4rem); border-bottom: 1px solid var(--rule); font-weight: 650; font-variant-numeric: tabular-nums; }
#round-meter { color: var(--pine-soft); font-size: 1rem; }
.game-control, .lane-controls button {
  min-height: 2.75rem; padding: .4rem .8rem; border: 1px solid var(--rule-dark); border-radius: 4px;
  background: var(--paper-light); color: var(--pine); font-size: 1rem; font-weight: 600;
}
.game-control:hover, .lane-controls button:hover { background: var(--paper-deep); }
#game-pause { margin-left: auto; }
#game-stage { outline: none; }
#game-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.game-interlude { display: grid; justify-items: center; align-content: center; gap: .55rem; min-height: 17rem; padding: 1.5rem; text-align: center; background: radial-gradient(ellipse at 50% 20%, #fffdf7, #f6edd8); }
.game-interlude h2 { font-size: clamp(1.7rem, 4.6vw, 2.35rem); line-height: 1.15; font-weight: 500; }
.game-interlude > .btn, .result-actions { margin-top: .5rem; }
.result-mark { width: 2.7rem; height: 2.7rem; object-fit: contain; }
.result-score { color: var(--red-dark); font: 500 clamp(1.85rem, 5.2vw, 2.65rem)/1.05 var(--serif); }
.result-actions { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; }
#game-share-status:empty { display: none; }
#game-share-status { color: var(--pine); font-weight: 600; }
.play-hint { margin: 0; padding: .6rem .7rem .8rem; text-align: center; color: var(--pine-soft); font-size: 1rem; line-height: 1.3; }

/* Falling pieces have a generous hit area around their painted faces. */
.snow-field {
  position: relative; isolation: isolate; overflow: hidden; height: 18rem; height: clamp(15rem, 42svh, 22rem);
  touch-action: none; user-select: none; -webkit-user-select: none;
  background: linear-gradient(180deg, #122e36ed 0%, #234b52da 47%, #26423b80 100%), var(--snow-scene, url('/art/card-cottage-480.webp')) center 64% / cover;
}
@media (min-width: 761px) { .snow-field { --snow-scene: url('/art/card-cottage.webp'); } }
.snow-field::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .6; background-image: radial-gradient(1.2px 1.2px at 22% 17%, #fce6b4 99%, transparent), radial-gradient(1px 1px at 77% 69%, white 99%, transparent); background-size: 69px 83px, 99px 103px; }
.snow-floor { position: absolute; bottom: -1rem; left: -3%; width: 106%; height: 12%; border-radius: 48% 55% 0 0; background: #e4eeee; box-shadow: 0 -3px 0 #a5bfc3; }
.bauble-field { background-color: #203e35; }
.bauble-field::after { content: ''; position: absolute; inset: 0 33.333% 0; border-inline: 1px dashed #e2f2ea55; pointer-events: none; z-index: -1; }
.game-sleigh { position: absolute; z-index: 2; pointer-events: none; width: auto; height: auto; max-width: 23%; max-height: 27%; left: 50%; bottom: 2.1%; transform: translateX(-50%); }
.catch-delta { position: absolute; z-index: 3; transform: translate(-50%, -50%); pointer-events: none; padding: .04rem .4rem; border-radius: 3px; background: #fff7e5; color: var(--pine); font-size: 1rem; font-weight: 700; line-height: 1.2; }
.falling-piece { position: absolute; z-index: 1; display: grid; place-items: center; width: clamp(2.8rem, 9vw, 3.6rem); height: clamp(2.8rem, 9vw, 3.6rem); transform: translate(-50%, -50%); --ink: #c34c44; --shine: #f4a385; }
.falling-piece.tone-1 { --ink: #dba440; --shine: #ffe4a1; }
.falling-piece.tone-2 { --ink: #4e9b9a; --shine: #b5e5ca; }
.falling-piece i { position: relative; display: block; pointer-events: none; }
.bauble-piece { width: 72%; height: 72%; border-radius: 50%; border: 1px solid #e9ca87; box-shadow: inset -2px -3px 5px #3c291463, 0 2px 3px #10262875; background: radial-gradient(ellipse at 32% 26%, #ffffe5 0 5%, transparent 9%), linear-gradient(153deg, var(--shine) 0%, var(--ink) 43%, #ecd38c 45% 48%, var(--ink) 50% 59%, #f6d688 61% 64%, var(--ink) 66%); }
.bauble-piece::before { content: ''; position: absolute; top: -.31rem; left: 35%; width: 30%; height: .35rem; border-radius: 2px 2px 0 0; background: #e6c585; }
.bauble-piece::after { content: ''; position: absolute; top: -.61rem; left: 43%; width: 15%; height: .35rem; border: 1px solid #f4dca7; border-radius: 50%; }
.parcel-piece { width: 66%; height: 58%; border: 1px solid #efd08b; border-radius: 2px; transform: rotate(-6deg); box-shadow: 1px 2px 1px #14252380; background: linear-gradient(90deg, transparent 39%, #f5d28d 40% 54%, transparent 55%), linear-gradient(transparent 29%, #f5d28d 30% 44%, transparent 45%), linear-gradient(125deg, var(--shine), var(--ink) 70%); }
.parcel-piece::before, .parcel-piece::after { content: ''; position: absolute; top: -.42rem; width: .63rem; height: .44rem; border: 2px solid #f5d28d; border-radius: 65% 48%; }
.parcel-piece::before { left: 21%; transform: rotate(25deg); }
.parcel-piece::after { left: 46%; transform: rotate(-25deg); }
.coal-piece { width: 63%; height: 56%; background: linear-gradient(140deg, #677077 0 19%, #42474e 20% 43%, #23262a 44% 66%, #121920 67%); clip-path: polygon(18% 14%, 65% 0, 94% 31%, 100% 71%, 62% 97%, 20% 93%, 0 61%); }
.lane-controls { display: flex; gap: .45rem; margin: .75rem .75rem 0; }
.lane-controls button { flex: 1; min-width: 0; }
.lane-controls kbd { margin-left: .45rem; padding: .02rem .3rem; font-size: .82rem; font-family: inherit; border: 1px solid var(--rule-dark); border-radius: 3px; }
@media (pointer: coarse) { .lane-controls kbd { display: none; } }

.stamp-board { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(.38rem, 1.4vw, .7rem); max-width: 27rem; padding: clamp(.6rem, 2.5vw, 1.15rem); margin: auto; }
.match-stamp { display: grid; place-items: center; aspect-ratio: 1.13; min-width: 0; min-height: 2.75rem; padding: .28rem; border: 1px solid #6e7760; border-radius: 3px; background: repeating-linear-gradient(135deg,#254b40 0 5px,#2b5145 5px 6px); box-shadow: inset 0 0 0 3px #345c4d, inset 0 0 0 4px #b39b69; }
.match-stamp .stamp-back { width: 44%; height: 50%; object-fit: contain; filter: brightness(0) saturate(100%) invert(85%) sepia(24%) saturate(520%); }
.match-stamp.face-up { background: #fffaf0; box-shadow: inset 0 0 0 2px #dfd0ae; }
.match-stamp.face-up img { width: 88%; height: 88%; object-fit: contain; min-height: 0; }
.match-stamp.matched { position: relative; background: #f4f4df; border-color: #4a7054; }
.match-stamp.matched::after { content: '✓'; position: absolute; bottom: 2px; right: 2px; display: grid; place-content: center; width: 1.1rem; height: 1.1rem; font: 650 .8rem var(--sans); background: var(--pine); color: white; border-radius: 50%; }
.word-desk { padding: clamp(1rem, 3.6vw, 2rem) .7rem; text-align: center; background: radial-gradient(ellipse at 45% 10%, #fffdf4, #f6edda); }
.word-index { font-size: 1rem; color: var(--pine-soft); font-weight: 600; }
.word-clue { font: 500 clamp(1.35rem, 4vw, 1.95rem)/1.2 var(--serif); margin: .5rem auto .85rem; max-width: 29ch; }
.word-answer { color: var(--red-dark); font: 550 clamp(1.6rem, 5vw, 2.3rem)/1.25 var(--serif); min-height: 1.6em; }
.letter-rack { display: grid; grid-template-columns: repeat(3, minmax(2.75rem, 3.35rem)); justify-content: center; gap: .35rem; margin: .65rem auto .5rem; }
.letter-tile { min-height: 2.85rem; padding: 0; border: 1px solid #9c764e; border-bottom: 3px solid #9c764e; border-radius: 4px; font: 600 1.55rem/1 var(--serif); background: linear-gradient(#f5dfb2,#e4c38d); color: #442f21; }
.letter-tile[aria-disabled="true"] { color: #686257; border-color: #c7bca7; background: transparent; }
.word-feedback { min-height: 1.5em; color: var(--red-dark); font-size: 1rem; }
.word-tools { display: flex; gap: .55rem; justify-content: center; margin-top: .5rem; }
@media (min-width: 390px) { .letter-rack { display: flex; flex-wrap: wrap; } .letter-tile { min-width: 2.85rem; } }
@media (max-width: 720px) {
  .game-tickets { grid-template-columns: 1fr; gap: .7rem; }
  .game-ticket { grid-template-columns: 37% minmax(0,1fr); min-height: 7.1rem; }
  .ticket-copy { padding: .45rem .75rem; }
  .ticket-copy h2 { font-size: 1.5rem; }
  .ticket-play { margin-top: .32rem; }
}
@media (max-width: 540px) {
  .game-hall { padding-block: 1.35rem 2rem; }
  .game-hall > .page-head h1 { font-size: 2.15rem; }
  .game-hall > .page-head::after { width: 3.7rem; }
  .game-room { padding-top: .35rem; }
  .game-heading { margin: 0 0 .75rem; }
  .game-welcome { grid-template-columns: 1fr; }
  .game-poster { height: clamp(8.7rem, 39vw, 12rem); min-height: 0; object-position: center 53%; }
  .game-brief { padding: .9rem 1rem 1.15rem; }
  .game-brief .btn { width: 100%; }
  .result-actions .btn { flex: 1 0 auto; }
}
@media (max-width: 350px) {
  .ticket-copy p { font-size: 1rem; }
  .lane-controls { gap: .28rem; margin-inline: .45rem; }
  .lane-controls button { padding-inline: .25rem; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .snow-field { height: clamp(9rem, 47svh, 14rem); }
  .game-hud { padding-block: .25rem; }
}
