﻿:root {
  --navy: #080d18;
  --navy-2: #0d1727;
  --cream: #f2e5c9;
  --cream-2: #d8c39b;
  --red: #7c1622;
  --gold: #cda85d;
  --gold-2: #f1d38c;
  --text: #f7f1e4;
  --muted: #99a2b0;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--navy);
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

button,
input { font: inherit; }

.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -10%, #1b2d48 0, transparent 48%),
    linear-gradient(145deg, #070b13, #0a111e 52%, #070b13);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .15;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

.ambient i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 15px var(--gold);
  opacity: .25;
  animation: drift 12s infinite linear;
}

.ambient i:nth-child(1) { left: 15%; bottom: 3%; animation-duration: 17s; }
.ambient i:nth-child(2) { left: 71%; bottom: -5%; animation-delay: -5s; }
.ambient i:nth-child(3) { left: 88%; bottom: 20%; animation-delay: -9s; animation-duration: 21s; }

@keyframes drift {
  to { transform: translate3d(20px, -110vh, 0); opacity: 0; }
}

#confettiCanvas {
  position: fixed;
  z-index: 72;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity .55s ease, transform .8s var(--ease), visibility .55s;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.staff-screen {
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 52px);
  overflow: auto;
}

.staff-card {
  position: relative;
  width: min(100%, 420px);
  padding: 34px 38px 30px;
  border: 1px solid rgba(205, 168, 93, .22);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(22, 33, 51, .96), rgba(9, 15, 26, .98));
  box-shadow: 0 35px 90px rgba(0, 0, 0, .45), inset 0 1px rgba(255, 255, 255, .05);
}

.staff-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, .035);
  border-radius: 17px;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 30px;
}

.brand-logo {
  display: block;
  width: clamp(80px, 20vw, 92px);
  height: auto;
  max-height: 92px;
  object-fit: contain;
  filter: saturate(1.08) contrast(1.08) drop-shadow(0 7px 18px rgba(201, 154, 55, .2));
}

.brand.compact {
  justify-content: flex-start;
  margin-bottom: 20px;
}

.brand.compact .brand-logo {
  width: 82px;
  max-height: 82px;
}

.eyebrow {
  margin-bottom: 8px;
  text-align: center;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: .28em;
  font-weight: 700;
}

.staff-card h1 {
  text-align: center;
  font: 400 clamp(27px, 5vw, 34px)/1.1 Georgia, serif;
  margin: 0 0 8px;
}

.muted {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 24px;
}

.pin-dots {
  height: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 8px 0;
}

.pin-dots i {
  width: 10px;
  height: 10px;
  border: 1px solid #647085;
  border-radius: 50%;
  transition: .25s;
}

.pin-dots i.filled {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(205, 168, 93, .7);
  transform: scale(1.08);
}

.message {
  height: 25px;
  text-align: center;
  color: #e8a5aa;
  font-size: 12px;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.keypad button {
  height: 53px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  color: #eef1f4;
  font-size: 20px;
  cursor: pointer;
  transition: .16s;
}

.keypad button:hover {
  border-color: rgba(205, 168, 93, .5);
  background: rgba(205, 168, 93, .08);
}

.keypad button:active { transform: scale(.94); }

.keypad .key-confirm {
  background: linear-gradient(145deg, #b68b43, #e1c77f);
  color: #15100a;
  border: 0;
}

.privacy-note {
  text-align: center;
  font-size: 10px;
  color: #626d7d;
  margin: 22px 0 0;
}

.laptop-card { width: min(100%, 510px); padding: 38px 42px; }

.back-button {
  position: absolute;
  right: 25px;
  top: 23px;
  border: 0;
  background: none;
  color: #7e8998;
  font-size: 11px;
  cursor: pointer;
}

.staff-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: #9fa9b6;
  font-size: 11px;
  margin: 2px 0 23px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #74c69d;
  box-shadow: 0 0 9px #74c69d;
}

.input-label {
  display: block;
  font-size: 10px;
  color: var(--gold);
  letter-spacing: .2em;
  margin-bottom: 8px;
}

.input-wrap { display: flex; gap: 9px; }

.input-wrap input {
  min-width: 0;
  flex: 1;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  background: #080d16;
  color: white;
  padding: 0 16px;
  letter-spacing: .08em;
  outline: 0;
  user-select: text;
}

.input-wrap input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(205, 168, 93, .1);
}

.format-hint {
  margin: 7px 2px 0;
  color: #647082;
  font-size: 10px;
  letter-spacing: .04em;
}

.secondary-button,
.secondary-wide {
  border: 1px solid rgba(205, 168, 93, .55);
  background: transparent;
  color: var(--gold-2);
  border-radius: 12px;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  cursor: pointer;
}

.validation-card {
  margin-top: 13px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(116, 198, 157, .08);
  border: 1px solid rgba(116, 198, 157, .25);
  font-size: 12px;
  color: #aee2c7;
}

.validation-card.error {
  background: rgba(190, 70, 83, .08);
  border-color: rgba(190, 70, 83, .3);
  color: #eea8b0;
}

.primary-button {
  width: 100%;
  height: 60px;
  margin-top: 18px;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #d9b765, #a57936);
  color: #171107;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  cursor: pointer;
  box-shadow: 0 14px 35px rgba(170, 124, 50, .2);
  transition: .25s;
}

.primary-button:disabled { opacity: .3; cursor: not-allowed; box-shadow: none; }
.primary-button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 18px 45px rgba(196, 150, 68, .3); }
.button-arrow { font-size: 22px; }
.secondary-wide { width: 100%; height: 50px; margin-top: 10px; }

.icon-button {
  position: fixed;
  z-index: 100;
  right: 18px;
  top: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  background: rgba(8, 13, 24, .55);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.icon-button svg { width: 19px; fill: none; stroke: #aab1bc; stroke-width: 1.5; }
.sound-button { right: 68px; }

/* Customer game */

.game-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 3vw, 45px) max(14px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 42%, rgba(35, 55, 80, .48), transparent 57%);
  transition: background 1.2s ease;
}

.game-screen.reveal-complete {
  background: radial-gradient(ellipse at 50% 38%, rgba(78, 61, 27, .18), rgba(5, 8, 14, .88) 67%);
}

.game-screen.reveal-complete.jackpot-reveal {
  background: radial-gradient(ellipse at 50% 38%, rgba(178, 132, 36, .24), #050607 68%);
}

.game-header {
  text-align: center;
  z-index: 2;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.game-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
}

.game-logo img {
  display: block;
  width: clamp(54px, 6vw, 68px);
  height: auto;
  max-height: 68px;
  object-fit: contain;
  filter: saturate(1.1) contrast(1.1) drop-shadow(0 5px 16px rgba(211, 164, 65, .25));
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--gold);
  font-size: 8px;
  margin: 10px 0 5px;
}

.ornament i {
  display: block;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.ornament i:last-child { transform: rotate(180deg); }

.game-header h1 {
  margin: 0;
  font: 400 clamp(28px, 5vh, 49px)/1 Georgia, serif;
  letter-spacing: .11em;
  text-shadow: 0 4px 25px rgba(0, 0, 0, .4);
}

.game-header p {
  margin: 9px 0 0;
  color: #a3abba;
  font: 300 clamp(11px, 1.6vh, 14px)/1.4 "Segoe UI";
  letter-spacing: .05em;
}

.envelope-stage {
  position: relative;
  flex: 1;
  width: min(100%, 1120px);
  min-height: 0;
  display: grid;
  place-items: center;
  perspective: 1400px;
}

.envelope-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2.2vh, 24px) clamp(12px, 2.5vw, 32px);
  align-items: center;
}

/* The hit target itself has no visible canvas, card, border or hover box. */
.envelope-button {
  position: relative;
  aspect-ratio: 1.55;
  appearance: none;
  border: 0 !important;
  outline: 0;
  border-radius: 0;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  padding: 0;
  cursor: pointer;
  animation: envelopeFloat 4s ease-in-out infinite;
  transform-origin: center;
  will-change: transform, opacity, filter;
  transition: opacity .65s, filter .65s, transform .9s var(--ease);
}

.envelope-button:focus-visible {
  outline: 1px solid rgba(241, 211, 140, .7);
  outline-offset: 8px;
}

.envelope-button:nth-child(2n) { animation-delay: -1.7s; }
.envelope-button:nth-child(3n) { animation-delay: -2.8s; }

.envelope-button:hover {
  z-index: 2;
  animation-play-state: paused;
  background: transparent !important;
}

.envelope-button:hover .envelope {
  transform: translateY(-7px) rotate(-1deg) scale(1.045);
  filter: drop-shadow(0 18px 15px rgba(0, 0, 0, .34));
}

.envelope-button:active .envelope { transform: translateY(-2px) scale(.985); }

@keyframes envelopeFloat {
  0%, 100% { transform: translateY(1px) rotate(-.45deg); }
  50% { transform: translateY(-6px) rotate(.45deg); }
}

.envelope-shadow {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: -10%;
  height: 20%;
  border-radius: 50%;
  background: rgba(0, 0, 0, .48);
  filter: blur(11px);
  animation: shadowBreathe 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shadowBreathe {
  50% { transform: scale(.86); opacity: .68; }
}

.envelope {
  position: absolute;
  inset: 0;
  background: transparent;
  filter: drop-shadow(0 13px 12px rgba(0, 0, 0, .24));
  transform-style: preserve-3d;
  transition: transform .4s var(--ease), filter .4s;
}

.envelope-back {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: linear-gradient(135deg, #d8c69f, #f7edda 50%, #cdb68d);
  box-shadow: inset 0 0 0 1px rgba(102, 72, 27, .22);
}

.envelope-front {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  border-radius: 5px;
  background:
    linear-gradient(30deg, #d7c49e 49.5%, transparent 50%),
    linear-gradient(-30deg, #eadabd 49.5%, transparent 50%);
  clip-path: polygon(0 26%, 50% 68%, 100% 26%, 100% 100%, 0 100%);
  transition: opacity .8s, transform .8s var(--ease);
}

.envelope-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, transparent 50%, rgba(102, 74, 34, .1));
}

.envelope-flap {
  position: absolute;
  z-index: 5;
  inset: 0;
  background: linear-gradient(155deg, #f8eed9, #d9c49e);
  clip-path: polygon(0 0, 100% 0, 50% 67%);
  transform-origin: 50% 0;
  backface-visibility: hidden;
  transition: transform 1s var(--ease), opacity .8s;
}

.envelope-flap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, .23), transparent 48%, rgba(103, 68, 20, .12));
  clip-path: inherit;
}

.wax-seal {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 55%;
  width: clamp(27px, 3.2vw, 42px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 48% 52% 46% 54%;
  background: radial-gradient(circle at 35% 28%, #b9454d, #771521 52%, #480910);
  box-shadow: 0 3px 5px rgba(0, 0, 0, .36), inset 0 0 0 3px rgba(255, 184, 161, .09);
  transition: .45s;
}

.wax-seal::before {
  content: "";
  position: absolute;
  inset: 15%;
  border: 1px solid rgba(247, 190, 161, .25);
  border-radius: 50%;
}

.wax-seal i {
  font: 700 clamp(9px, 1.3vw, 14px) Georgia, serif;
  color: #d99c90;
  text-shadow: 0 1px #4d0d14;
}

.envelope-number {
  position: absolute;
  z-index: 8;
  right: 7%;
  bottom: 7%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(94, 70, 32, .32);
  border-radius: 50%;
  font: 600 9px Georgia;
  color: #715d3d;
}

/* The card stays completely invisible in every unopened floating envelope. */
.reward-card {
  position: absolute;
  z-index: 3;
  left: 4%;
  right: 4%;
  top: 2%;
  height: 106%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10%);
  transform-style: preserve-3d;
  transition:
    transform 1.2s var(--ease),
    opacity .35s ease,
    filter .8s ease;
}

.card-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 1.05s cubic-bezier(.45, .02, .18, 1);
}

.card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(151, 111, 44, .66);
  border-radius: 10px;
  color: #5d4b2f;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, .94), transparent 33%),
    repeating-linear-gradient(125deg, rgba(144, 110, 57, .018) 0 1px, transparent 1px 4px),
    linear-gradient(145deg, #fffdf5, #eee0c5);
  box-shadow:
    0 20px 34px rgba(0, 0, 0, .28),
    inset 0 0 0 6px rgba(255, 255, 255, .33),
    inset 0 0 0 7px rgba(159, 119, 49, .2);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-face::before,
.card-face::after {
  content: "✦";
  position: absolute;
  color: rgba(157, 119, 53, .28);
  font-size: 9px;
}

.card-face::before { left: 18px; top: 17px; }
.card-face::after { right: 18px; bottom: 17px; }

.card-reveal { transform: rotateY(180deg); }

.card-logo {
  display: grid;
  place-items: center;
  width: clamp(46px, 6.4vw, 76px);
  height: clamp(35px, 4.6vw, 55px);
  margin-bottom: 8px;
}

.card-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(1.15) contrast(1.28) drop-shadow(0 2px 3px rgba(94, 61, 12, .16));
}

.card-ornament {
  margin-bottom: 10px;
  color: #bb9148;
  font-size: 9px;
}

.card-intro {
  color: #9b7a45;
  font-size: clamp(7px, .78vw, 10px);
  font-weight: 600;
  letter-spacing: .24em;
}

.card-intro-main {
  margin-top: 5px;
  font: 600 clamp(16px, 2vw, 25px)/1 Georgia, serif;
  letter-spacing: .14em;
}

.card-rule {
  width: 58px;
  height: 1px;
  margin-top: 13px;
  background: linear-gradient(90deg, transparent, #a77e39, transparent);
}

.card-countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: #8e692f;
  font: 400 clamp(65px, 9vw, 105px)/1 Georgia, serif;
  text-shadow: 0 3px 20px rgba(150, 108, 40, .22);
  background: rgba(255, 250, 237, .88);
  transform: scale(.7);
}

.card-countdown.visible { animation: cardCountPulse .72s ease forwards; }

@keyframes cardCountPulse {
  0% { opacity: 0; transform: scale(.64); }
  28%, 68% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.18); }
}

.card-congratulations {
  color: #86672f;
  font-size: clamp(7px, .8vw, 10px);
  font-weight: 700;
  letter-spacing: .2em;
}

.card-you-won {
  margin-top: 7px;
  color: #9c835a;
  font-size: clamp(6px, .65vw, 8px);
  letter-spacing: .28em;
}

.card-amount {
  margin-top: 8px;
  color: #503c1d;
  font: 500 clamp(25px, 4.1vw, 48px)/.95 Georgia, serif;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.card-reward-type {
  margin-top: 10px;
  color: #8f713e;
  font-size: clamp(6px, .68vw, 9px);
  font-weight: 700;
  letter-spacing: .22em;
}

.reward-card.premium .card-face {
  border-color: #bd8e3d;
  box-shadow:
    0 22px 45px rgba(0, 0, 0, .34),
    0 0 32px rgba(218, 177, 92, .24),
    inset 0 0 0 6px rgba(255, 255, 255, .4),
    inset 0 0 0 7px rgba(159, 119, 49, .28);
}

.reward-card.jackpot {
  filter: drop-shadow(0 0 30px rgba(238, 192, 83, .62));
}

.reward-card.jackpot .card-face {
  border: 2px solid #f1cf73;
  color: #32220d;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 249, 199, .98), transparent 30%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .1) 0 2px, transparent 2px 8px),
    linear-gradient(135deg, #a87319, #f5dc84 38%, #c48a25 68%, #f4da79);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, .48),
    0 0 55px rgba(239, 191, 69, .58),
    inset 0 0 0 6px rgba(255, 245, 176, .23),
    inset 0 0 0 8px rgba(102, 62, 8, .25);
}

.reward-card.jackpot .card-congratulations,
.reward-card.jackpot .card-you-won,
.reward-card.jackpot .card-reward-type {
  color: #51320b;
}

.reward-card.jackpot .card-logo img {
  filter: saturate(1.18) contrast(1.35) drop-shadow(0 2px 4px rgba(74, 40, 2, .24));
}

.reward-card.jackpot .card-amount {
  color: #3a2306;
  text-shadow: 0 1px rgba(255, 248, 192, .55);
}

.reward-card.revealed .card-inner { transform: rotateY(180deg); }

.game-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #7f8998;
  font-size: 9px;
  letter-spacing: .3em;
  transition: opacity .5s;
}

.game-hint span {
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #626e7e);
}

.game-hint span:last-child { transform: rotate(180deg); }
.game-error { height: 18px; color: #ed9ea7; font-size: 11px; margin-top: 4px; }

/* Selection and same-card reveal sequence */

.game-screen.selecting .game-header {
  opacity: .14;
  transform: translateY(-15px);
}

.game-screen.selecting .game-hint { opacity: 0; }

.envelope-button.dismissed {
  opacity: 0;
  filter: blur(7px);
  transform: scale(.65) translateY(20px) !important;
  pointer-events: none;
}

.envelope-button.chosen {
  opacity: 0;
  pointer-events: none;
}

.focus-area {
  position: absolute;
  z-index: 25;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  perspective: 1400px;
}

.focus-clone {
  position: relative;
  z-index: 30;
  width: min(42vw, 370px);
  aspect-ratio: 1.55;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
  transform: scale(.8);
  opacity: 0;
  will-change: transform;
  transition: none;
}

.focus-clone.focused { animation: focusIn 1.25s var(--ease) forwards !important; }

@keyframes focusIn {
  to { opacity: 1; transform: scale(1.2); }
}

.focus-clone.suspense {
  animation: shake .8s ease-in-out !important;
  opacity: 1;
  transform: scale(1.2);
}

@keyframes shake {
  0%, 100% { transform: scale(1.2) rotate(0); }
  20% { transform: scale(1.2) rotate(-2deg); }
  40% { transform: scale(1.2) rotate(2deg); }
  60% { transform: scale(1.2) rotate(-1.2deg); }
  80% { transform: scale(1.2) rotate(1deg); }
}

.focus-clone.seal-break .wax-seal {
  filter: brightness(1.8);
  box-shadow: 0 0 28px var(--gold-2);
  transform: translate(-50%, -50%) scale(1.25) rotate(10deg);
  opacity: 0;
}

.focus-clone.opened .envelope-flap {
  transform: rotateX(180deg);
  z-index: 2;
}

.focus-clone.card-rise .reward-card {
  z-index: 6;
  opacity: 1;
  visibility: visible;
  transform: translateY(-66%);
}

.focus-clone.reveal-ready .reward-card {
  transform: translateY(-43%) scale(1.34);
}

.focus-clone.reveal-ready .envelope-front,
.focus-clone.reveal-ready .envelope-back,
.focus-clone.reveal-ready .envelope-flap {
  opacity: .26;
  transform: translateY(24%) scale(.9);
}

.focus-clone.reveal-ready .envelope-shadow { opacity: .18; }
.focus-clone.reveal-ready .envelope-number { opacity: 0; }

.reveal-actions {
  position: absolute;
  z-index: 82;
  left: 50%;
  bottom: clamp(2px, 1.5vh, 16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 15px);
  transition: opacity .7s .2s ease, transform .7s .2s var(--ease), visibility .7s;
  pointer-events: none;
}

.reveal-actions.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.result-laptop {
  color: #8c95a2;
  font-size: 9px;
  letter-spacing: .12em;
  white-space: nowrap;
}

.finish-button {
  margin-top: 13px;
  width: 180px;
  height: 46px;
  border: 1px solid var(--gold);
  border-radius: 24px;
  background: rgba(16, 17, 18, .72);
  color: var(--gold-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .25em;
  cursor: pointer;
  transition: .25s;
}

.finish-button:hover {
  background: var(--gold);
  color: #141009;
}

@media (orientation: portrait) {
  .envelope-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(8px, 1.7vh, 18px) clamp(9px, 2.2vw, 22px);
  }

  .game-header h1 { font-size: clamp(25px, 7vw, 44px); }
  .focus-clone { width: min(72vw, 390px); }
  .focus-clone.reveal-ready .reward-card { transform: translateY(-42%) scale(1.08); }
}

@media (max-height: 650px) and (orientation: landscape) {
  .game-header p { display: none; }
  .ornament { margin: 5px 0; }
  .envelope-grid { gap: 8px 22px; }
  .game-header h1 { font-size: 30px; }
  .game-screen { padding-top: 10px; }
  .focus-clone { width: min(37vw, 320px); }
  .focus-clone.reveal-ready .reward-card { transform: translateY(-37%) scale(1.15); }
  .reveal-actions { left: auto; right: 1%; bottom: 2%; transform: translateY(15px); }
  .reveal-actions.visible { transform: translateY(0); }
}

@media (max-width: 520px) {
  .staff-card { padding: 28px 24px 24px; }
  .laptop-card { padding: 32px 24px; }
  .input-wrap { flex-direction: column; }
  .secondary-button { height: 48px; }
  .brand { margin-bottom: 22px; }
  .focus-clone { width: 76vw; }
  .game-header p { font-size: 11px; }
  .envelope-number { display: none; }
  .card-face::before { left: 12px; top: 11px; }
  .card-face::after { right: 12px; bottom: 11px; }
  .reveal-actions { bottom: 1px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }

  .ambient { display: none; }
}






/* Staff-only sound preference control. It is hidden while the customer game is active. */
.sound-button.sound-off { opacity: .42; }
.sound-button.sound-off::after {
  content: '';
  position: absolute;
  width: 19px;
  height: 1px;
  background: currentColor;
  transform: rotate(-45deg);
}
body:has(#gameScreen.active) .sound-button { display: none; }
