/* Catch the Snowflakes game page */
.game-page{max-width:760px;padding-top:44px;padding-bottom:70px;text-align:center}
.game-intro{max-width:560px;margin:0 auto 26px}
.game-intro h1{font-size:clamp(44px,6vw,68px);letter-spacing:-1.4px;margin:14px 0 14px}
.game-intro>p:not(.eyebrow){color:#c9cdbd;font-size:16px;line-height:1.7}
.game-intro strong{color:var(--pale);font-weight:500}

/* The play area: portrait, fits the screen height so the whole board is visible while playing. */
.game-stage{position:relative;margin:0 auto;width:min(100%,520px,calc((100svh - 96px) * .75));aspect-ratio:3/4;border:1px solid rgba(215,183,121,.45);outline:1px solid rgba(215,183,121,.16);outline-offset:6px;background:#071230;overflow:hidden;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;isolation:isolate}
.game-stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}

.game-hud{position:absolute;left:0;right:0;top:0;padding:0 16px;pointer-events:none;z-index:2}
.hud-time{height:4px;margin:0 -16px;background:rgba(255,255,255,.12)}
.hud-time-bar{display:block;height:100%;width:100%;background:var(--gold);transform-origin:left center;transition:background-color .3s}
.hud-time-bar.is-low{background:#e58a6b}
.hud-row{display:flex;justify-content:space-between;align-items:flex-start;padding-top:10px}
.hud-row p{display:flex;flex-direction:column;align-items:flex-start;line-height:1}
.hud-row small{font-size:10px;letter-spacing:.2em;color:var(--gold);margin-bottom:5px}
.hud-row strong{font-family:var(--serif);font-weight:500;font-size:38px;font-variant-numeric:tabular-nums;color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.45)}
.hud-score{flex-direction:row!important;flex-wrap:wrap;column-gap:6px;align-items:baseline!important}
.hud-score small{flex-basis:100%}
.hud-target{font-size:13px;color:#b6bea9}
.hud-score.is-won strong{color:var(--gold)}
.hud-seconds{align-items:flex-end!important;margin-right:52px}
.hud-seconds.is-low strong{color:#f0a58b}

.sound-toggle{position:absolute;top:14px;right:12px;z-index:4;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:rgba(7,16,40,.6);color:var(--gold);display:grid;place-items:center}
.sound-toggle:hover{background:#1a2c55}
.sound-toggle .sound-off{display:none}
.sound-toggle[aria-pressed="false"] .sound-wave{display:none}
.sound-toggle[aria-pressed="false"] .sound-off{display:inline}

.game-overlay{position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px 24px;background:rgba(7,16,40,.66);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);animation:overlay-in .35s ease both}
.game-overlay[hidden]{display:none}
.game-overlay h2{font-size:clamp(38px,9vw,52px);letter-spacing:-.8px;margin:6px 0 18px}
.overlay-star{font-size:40px;color:var(--gold);line-height:1}
.overlay-note{font-size:13px;color:#b6bea9;margin-top:16px}

.game-rules{list-style:none;margin:0 0 24px;padding:0;width:min(100%,290px);text-align:left}
.game-rules li{display:flex;align-items:center;gap:14px;padding:9px 2px;border-bottom:1px solid var(--line);font-size:15px}
.game-rules li:last-child{border-bottom:0}
.game-rules b{margin-left:auto;font-weight:500;color:var(--gold);font-variant-numeric:tabular-nums}
.game-rules b.minus{color:#f0a58b}
.rule-icon{width:28px;height:28px;display:grid;place-items:center;font-size:24px;line-height:1;flex-shrink:0}
.rule-flake{color:#f4f7ff;text-shadow:0 0 8px rgba(200,225,255,.8)}
.rule-gold{color:#efd08e;text-shadow:0 0 10px rgba(255,210,120,.9)}
.rule-coal::before{content:"";width:22px;height:19px;border-radius:46% 54% 42% 58%/55% 45% 55% 45%;background:radial-gradient(circle at 35% 30%,#4a413c,#121010 70%);box-shadow:0 0 8px rgba(255,120,40,.45),inset -3px -2px 0 rgba(255,120,40,.35)}
.game-play{min-width:170px;font-size:16px}

.game-countdown{background:rgba(7,16,40,.25);backdrop-filter:none;-webkit-backdrop-filter:none;pointer-events:none}
.game-countdown strong{font-family:var(--serif);font-weight:500;font-size:120px;color:var(--gold);line-height:1;text-shadow:0 4px 30px rgba(0,0,0,.5);animation:count-pop .8s ease both}

#screen-end{justify-content:center;overflow-y:auto}
#screen-end h2{margin-bottom:14px}
#screen-end h2 em{font-variant-numeric:tabular-nums}
.end-lose{font-size:16px;color:#d6d8c8;margin-bottom:8px}
.end-lose strong{color:var(--gold);font-weight:500}
.end-best{font-size:13px;color:#b6bea9;letter-spacing:.04em;min-height:1.4em}
.end-actions{display:flex;flex-direction:column;gap:10px;margin-top:18px;width:min(100%,280px)}
.end-actions .button{width:100%;gap:14px}
.share-button{border:1px solid var(--gold);color:var(--gold);background:transparent}
.share-button:hover{background:rgba(215,183,121,.12)}
.share-status{font-size:13px;color:var(--gold);min-height:1.5em;margin-top:10px}

.voucher-teaser{position:relative;width:min(100%,290px);margin:0 auto 12px;padding:20px 18px 18px;background:var(--paper);color:var(--ink);border:1px solid var(--gold);outline:1px dashed #a38f61;outline-offset:-8px;transform:rotate(-1.5deg);animation:voucher-in .6s cubic-bezier(.2,1.4,.4,1) both .15s}
.voucher-star{display:block;font-size:24px;color:#937342;line-height:1}
.voucher-amount{font-family:var(--serif);font-size:48px;font-weight:500;line-height:1;color:#223b2a;margin-top:4px}
.voucher-where{font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:#5c6150;margin-top:6px}

.game-visit{margin-top:26px;font-size:14px;color:#c1c6b6}
.game-visit .text-link{font-size:14px;gap:8px;padding:2px 0}

.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

@keyframes overlay-in{from{opacity:0}to{opacity:1}}
@keyframes count-pop{0%{transform:scale(.4);opacity:0}30%{transform:scale(1.08);opacity:1}100%{transform:scale(1);opacity:.9}}
@keyframes voucher-in{from{transform:rotate(-8deg) scale(.6);opacity:0}to{transform:rotate(-1.5deg) scale(1);opacity:1}}

@media(max-width:800px){
  .game-page{padding:26px 4% 56px}
  .game-intro{margin-bottom:20px}
  .game-intro h1{font-size:46px;margin:10px 0 10px}
  .game-intro>p:not(.eyebrow){font-size:15px}
}
@media(max-width:480px){
  .game-page{padding-left:12px;padding-right:12px}
  .game-intro h1{font-size:40px}
  .game-stage{outline-offset:4px}
  .hud-row strong{font-size:34px}
  .game-overlay{padding:22px 18px}
  .voucher-amount{font-size:42px}
}

/* Start screen: lighter, so the Christmas village shows through underneath. */
#screen-start{justify-content:flex-start;padding-top:clamp(28px,9%,64px);background:linear-gradient(180deg,rgba(7,16,40,.84) 0%,rgba(7,16,40,.74) 58%,rgba(7,16,40,.12) 88%);backdrop-filter:none;-webkit-backdrop-filter:none}
#screen-start h2{text-shadow:0 2px 14px rgba(0,0,0,.5)}
#screen-start .overlay-star{font-size:32px}
#screen-start .game-rules{margin-bottom:18px}
#screen-start .overlay-note{text-shadow:0 1px 6px rgba(0,0,0,.7);color:#e3e8f4}
@media(max-width:360px){#screen-start .overlay-star{display:none}#screen-start h2{margin-bottom:10px}#screen-start .game-rules li{padding:6px 2px}}

/* Share options: the "Challenge a friend" panel and the row under the game. */
.share-sheet{z-index:5;background:rgba(7,16,40,.9)}
.share-sheet h2{margin-bottom:8px}
.share-sheet-copy{font-size:15px;color:#d9deea;margin-bottom:20px;max-width:280px}
.share-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px;width:min(100%,300px)}
.share-option{display:flex;flex-direction:column;align-items:center;gap:7px;min-height:44px;padding:4px 0;background:transparent;color:var(--pale);font-size:12px;letter-spacing:.03em;line-height:1.2;text-decoration:none}
.share-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;border:1px solid rgba(215,183,121,.55);color:var(--gold);background:rgba(255,255,255,.04);transition:background .2s,color .2s,transform .2s}
.share-option:hover .share-icon,.share-option:focus-visible .share-icon{background:var(--gold);color:#14261d;transform:translateY(-2px)}
.share-option:focus-visible{outline:none}
.share-option:focus-visible .share-icon{outline:2px solid var(--gold);outline-offset:3px}
.share-facebook .share-icon{border-color:rgba(120,160,255,.6)}
.share-whatsapp .share-icon{border-color:rgba(110,220,140,.6)}
.share-back{margin-top:16px;gap:8px;color:#d9deea}
.share-sheet .share-status{margin-top:12px}

.game-share{margin:30px auto 0;max-width:520px;padding-top:24px;border-top:1px solid var(--line)}
.game-share h2{font-size:30px;margin-bottom:18px}
.share-options-row{display:flex;flex-wrap:wrap;justify-content:center;gap:14px 18px;width:100%}
.share-options-row .share-option{width:64px}
.game-share .share-status{margin-top:6px}

@media(max-width:360px){.share-icon{width:46px;height:46px}.share-options{gap:10px 6px}.share-options-row{gap:12px 10px}}
.share-options-row{max-width:300px;margin:0 auto}
@media(min-width:620px){.share-options-row{max-width:none}}

/* The won voucher on the end screen: QR on the left, details on the right. */
.end-win{width:min(100%,330px)}
.voucher-teaser{display:grid;grid-template-columns:112px 1fr;gap:14px;align-items:center;text-align:left;width:100%;padding:14px 14px 14px 12px;transform:rotate(-1deg)}
.voucher-qr{width:112px;height:112px;background:#fff;display:grid;place-items:center;border:1px solid #cec3a6}
.voucher-qr svg{width:100%;height:100%;display:block}
.voucher-qr-empty{font-size:34px;color:#b9a77d}
.voucher-spinner{width:26px;height:26px;border-radius:50%;border:3px solid #e6dcc4;border-top-color:#937342;animation:spin .8s linear infinite}
.voucher-details{min-width:0}
.voucher-teaser .voucher-amount{font-size:40px;margin-top:0}
.voucher-teaser .voucher-where{font-size:10px;letter-spacing:.12em;margin-top:4px}
.voucher-code{font-family:var(--sans);font-weight:600;font-size:15px;letter-spacing:.08em;color:#223b2a;margin-top:8px;font-variant-numeric:tabular-nums;min-height:0}
.voucher-code:empty{display:none}
.voucher-message{font-size:12px;line-height:1.45;color:#5c6150;margin-top:6px}
.voucher-open{display:inline-block;margin-top:8px;font-size:13px;font-weight:500;color:#223b2a;border-bottom:1px solid #937342}
.voucher-open:hover{color:#937342}
.my-voucher{margin-bottom:8px}
@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:360px){.voucher-teaser{grid-template-columns:92px 1fr;gap:10px}.voucher-qr{width:92px;height:92px}.voucher-teaser .voucher-amount{font-size:34px}}
#screen-start .overlay-note{margin:0 0 14px;max-width:280px}
/* Keep the start screen above Santa so he's visible, waiting with his sack. */
#screen-start{padding-top:clamp(18px,5%,40px)}
#screen-start .overlay-star{display:none}
#screen-start h2{margin:0 0 10px}
#screen-start .game-rules{margin-bottom:12px}
#screen-start .game-rules li{padding:6px 2px}
#screen-start .overlay-note{margin-bottom:12px;font-size:13px}
.game-hud{transition:opacity .3s}
.game-stage:has(#screen-start:not([hidden])) .game-hud{opacity:0}
