/* The Play tab's scene and HUD. Classes are santa-play-*; colours are the --santa-* tokens of public/theme.css. The board's layout
   (the screen, the landing, the zone buttons, the cards) is public/game/game.css. */

/* The stage: the canvas fills it, the header and the field sit over it. The sky runs up under the status bar. */
.santa-play-stage { position: relative; flex: 1 1 auto; min-height: 220px; display: flex; flex-direction: column; padding-top: var(--santa-top, 0px); }
.santa-play-sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: linear-gradient(180deg, #050a1a, var(--santa-navy, #101d3c) 55%, #27427a); pointer-events: none; }

/* The field is the flight area (the painter reads its box). Each band is named inside itself, at its top-left corner: the rooftops'
   name under the top of their band, the streets' name under the dividing line; the pill takes its band's colour. */
.santa-play-field { position: relative; flex: 1 1 auto; min-height: 0; pointer-events: none; }
.santa-play-tag {
  position: absolute; left: 12px; margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--santa-ivory, #f7e9c9); background: rgba(10, 19, 41, 0.62); border: 1px solid transparent; transition: border-color .3s, background-color .3s;
}
.santa-play-tag--upper { border-color: rgba(134, 170, 232, 0.55); }
.santa-play-tag--lower { border-color: rgba(70, 190, 140, 0.55); }
.santa-play-tag--upper .santa-play-glyph { color: #a9c4f2; }
.santa-play-tag--lower .santa-play-glyph { color: #7fdcb4; }
.santa-play-tag[data-picked="true"] { border-color: var(--santa-gold, #ffd16b); background: rgba(10, 19, 41, 0.78); }
.santa-play-glyph { display: inline-block; width: 1em; font-size: 0.8em; line-height: 1; text-align: center; }
img.santa-play-glyph { width: 20px; height: 20px; }
.gm-zone .santa-play-glyph { font-size: 12px; opacity: .85; }

/* "Delivered!" / "Missed": it waits for the gift to land (the painter's landing takes about 0.7 s), unless the round is shown already settled. */
.santa-play-banner {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); white-space: nowrap; font-size: 30px; font-weight: 800; letter-spacing: -0.01em;
  color: var(--santa-ivory, #f7e9c9); text-shadow: 0 2px 18px rgba(5, 10, 26, 0.75); animation: santa-play-banner-in 0.5s 0.6s both cubic-bezier(0.2, 0.8, 0.2, 1);
}
.santa-play-banner[data-outcome="win"] { color: var(--santa-gold, #ffd16b); }
.santa-play-banner[data-still="true"] { animation: none; }
@keyframes santa-play-banner-in { from { opacity: 0; transform: translate(-50%, -30%) scale(0.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

.santa-play-starting { position: absolute; left: 0; right: 0; top: 45%; }

/* The controls: the words, the count and the bar, then the two zones. The top edge fades into the picture. */
.santa-play-controls {
  position: relative; z-index: 1; flex: 0 0 auto; display: flex; flex-direction: column; gap: 10px; margin-top: -18px;
  padding: 22px 16px calc(var(--santa-nav-space, 0px) + 12px);
  background: linear-gradient(180deg, rgba(10, 19, 41, 0) 0, rgba(10, 19, 41, 0.94) 20px, var(--santa-navy-deep, #0a1329) 100%);
}
.santa-play-controls[hidden] { display: none; }
.santa-play-stats { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.santa-play-delivered { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.santa-play-delivered-n { font-size: 24px; font-weight: 800; line-height: 1; color: var(--santa-gold, #ffd16b); font-variant-numeric: tabular-nums; }
.santa-play-delivered-l { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--santa-dim, #9aa6c2); text-transform: uppercase; }
.santa-play-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* The bar to the next Santa Reward. */
.santa-play-reward { flex: 1 1 46%; min-width: 0; max-width: 62%; display: flex; flex-direction: column; gap: 5px; }
.santa-play-reward-text { font-size: 12px; color: var(--santa-dim, #9aa6c2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.santa-play-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.santa-play-bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e9b94f, var(--santa-gold, #ffd16b)); transition: width 0.5s ease; }

/* The end of the flight. */
.santa-play-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.santa-play-hero-n { font-size: 46px; font-weight: 800; line-height: 1.05; color: var(--santa-gold, #ffd16b); font-variant-numeric: tabular-nums; }
.santa-play-hero-l { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--santa-dim, #9aa6c2); }
.gm-card .santa-play-reward { max-width: none; }

/* The setup's block (setup.extra): the SDK's panel, with the bar under it. */
.santa-play-setup { display: flex; flex-direction: column; gap: 8px; }
.santa-play-setup .santa-play-reward { max-width: none; text-align: left; margin-top: 6px; }
.santa-play-setup .pg-panel-v { color: var(--santa-gold, #ffd16b); }
.santa-play-setup .pg-panel-v.none { color: var(--pg-dim); }
.santa-play-setup .pg-panel-meta { margin-top: 0; }

@media (max-height: 640px) {
  .santa-play-stage { min-height: 200px; }
  .santa-play-banner { font-size: 24px; }
  .santa-play-controls { gap: 8px; padding-top: 18px; }
}
@media (max-width: 340px) {
  .gm-title { font-size: 32px; }
  .santa-play-stats { flex-wrap: wrap; row-gap: 8px; }
  .santa-play-reward { max-width: none; flex-basis: 100%; }
  .gm-zone-name { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .santa-play-tag { transition: none; }
  .santa-play-banner { animation-delay: 0s; animation-duration: 0.01s; }
  .santa-play-bar-fill { transition: none; }
}
