/* "Table order" game, then "shake the palm" for the prize. Same night-green and gold as the home scene. */
.game { --g: #E2C28A; --c: #F6EEDD; --n: #07140F; position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: radial-gradient(120% 80% at 50% 110%, #1C4632 0%, #0E2219 45%, #07140F 80%); color: var(--c); overflow: hidden; font-family: var(--ar); }
.game[open] { animation: g-in .35s ease; }
@keyframes g-in { from { opacity: 0; transform: scale(1.02); } }
.game::backdrop { background: #07140F; }
.g-wrap { position: relative; height: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; padding: calc(14px + env(safe-area-inset-top, 0px)) 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
.g-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; }
.g-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(246, 238, 221, .22); background: rgba(7, 20, 15, .5); color: var(--c); font-size: 17px; }
.g-lv { display: flex; gap: 6px; }
.g-lv i { width: 26px; height: 5px; border-radius: 3px; background: rgba(246, 238, 221, .18); }
.g-lv i.on { background: var(--g); }
.g-hearts { font-size: 17px; letter-spacing: 2px; color: #C8553D; min-width: 64px; text-align: end; }
.g-hearts s { color: rgba(246, 238, 221, .2); text-decoration: none; }
.g-body { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.g-title { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 7.4vw, 34px); line-height: 1.4; margin: 0; text-align: center; }
.g-sub { margin: 8px 0 0; text-align: center; color: rgba(246, 238, 221, .72); line-height: 1.8; font-size: 15px; }
.g-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: 17px; background: linear-gradient(180deg, #F3D28E, #D9AE62); color: #2A2216; box-shadow: 0 14px 34px -12px rgba(243, 196, 111, .7); transition: transform .15s, opacity .2s; }
.g-btn:active { transform: scale(.97); }
.g-btn[disabled] { opacity: .4; box-shadow: none; }
.g-btn.ghost { background: transparent; color: var(--c); border: 1px solid rgba(246, 238, 221, .28); box-shadow: none; }
.g-foot { display: grid; gap: 10px; margin-top: 16px; }
.g-note { text-align: center; font-size: 12.5px; color: rgba(246, 238, 221, .55); margin: 10px 0 0; }

/* Intro */
.g-hero { display: grid; place-items: center; margin-bottom: 18px; }
.g-hero svg { width: 110px; height: auto; overflow: visible; }
.g-steps { display: grid; gap: 10px; margin: 22px 0 6px; }
.g-step { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 18px; background: rgba(246, 238, 221, .06); border: 1px solid rgba(246, 238, 221, .1); animation: g-up .5s backwards; }
.g-step:nth-child(2) { animation-delay: .08s; } .g-step:nth-child(3) { animation-delay: .16s; }
.g-step b { display: block; font-weight: 600; }
.g-step small { color: rgba(246, 238, 221, .6); }
.g-step .e { font-size: 26px; }
@keyframes g-up { from { opacity: 0; transform: translateY(12px); } }
.g-chips { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.g-chips span { padding: 5px 12px; border-radius: 999px; background: rgba(226, 194, 138, .14); color: var(--g); font-size: 12.5px; }

/* The order (receipt) */
.g-label { text-align: center; font-family: var(--display); font-weight: 600; font-size: 19px; margin: 0 0 12px; }
.g-label small { display: block; font-family: var(--ar); font-weight: 400; font-size: 13px; color: rgba(246, 238, 221, .6); margin-top: 2px; }
.receipt { position: relative; background: #FBF8F2; color: #1F2A24; border-radius: 6px; padding: 18px 16px 22px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .7); animation: r-in .5s cubic-bezier(.2, .9, .3, 1.2); }
.receipt::before, .receipt::after { content: ''; position: absolute; left: 0; right: 0; height: 10px; background: radial-gradient(circle at 6px -2px, transparent 6px, #FBF8F2 6.5px) 0 0 / 12px 10px repeat-x; }
.receipt::before { top: -9px; transform: scaleY(-1); } .receipt::after { bottom: -9px; }
@keyframes r-in { from { transform: translateY(-30px) rotate(-3deg); opacity: 0; } }
.receipt h4 { margin: 0; text-align: center; font-family: var(--display); font-size: 15px; color: #3B674E; }
.receipt .r-line { border-top: 1.5px dashed #D9CDB6; margin: 10px 0; }
.r-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.r-item { text-align: center; animation: g-up .4s backwards; }
.r-item img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .25)); }
.r-item span { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.4; margin-top: 2px; }
.g-count { height: 6px; border-radius: 3px; background: rgba(246, 238, 221, .14); overflow: hidden; margin-top: 18px; }
.g-count i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #E2C28A, #F3D28E); transform-origin: left; }
html[dir="rtl"] .g-count i { transform-origin: right; }
.g-count.run i { animation: drain var(--ms) linear forwards; }
.g-count.hot i { background: linear-gradient(90deg, #C8553D, #E2C28A); }
@keyframes drain { to { transform: scaleX(0); } }

/* The board */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 18px; background: rgba(246, 238, 221, .06); border: 1.5px solid rgba(246, 238, 221, .1); display: grid; place-items: center; padding: 6px; transition: transform .15s, border-color .2s, background .2s; animation: g-up .35s backwards; }
.tile img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .4)); }
.tile:active { transform: scale(.95); }
.tile.on { border-color: var(--g); background: rgba(226, 194, 138, .16); }
.tile.on::after { content: '✓'; position: absolute; top: 6px; inset-inline-end: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--g); color: #2A2216; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.tile.good { border-color: #6FCF97; background: rgba(111, 207, 151, .18); }
.tile.bad { border-color: #C8553D; background: rgba(200, 85, 61, .2); animation: shake .4s; }
.tile.missed { border-color: var(--g); border-style: dashed; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.g-picked { text-align: center; margin-top: 10px; font-size: 13.5px; color: rgba(246, 238, 221, .7); }
.g-msg { text-align: center; font-family: var(--display); font-size: 22px; font-weight: 700; margin: 14px 0 0; animation: g-up .4s; }
.g-msg.ok { color: #8FE0AE; } .g-msg.no { color: #F0A08C; }

/* Shake the palm */
.palm-stage { position: relative; height: min(58vh, 460px); }
.palm-stage svg.tree { position: absolute; left: 50%; bottom: 14%; width: 74%; height: auto; transform: translateX(-50%); transform-origin: 50% 100%; overflow: visible; cursor: pointer; }
.palm-stage .crown { transform-box: fill-box; transform-origin: 50% 90%; }
.palm-stage.sway .crown { animation: sway-hard .7s ease; }
.palm-stage.sway svg.tree { animation: trunk .7s ease; }
@keyframes sway-hard { 20% { transform: rotate(-9deg); } 45% { transform: rotate(8deg); } 70% { transform: rotate(-4deg); } }
@keyframes trunk { 25% { transform: translateX(-50%) rotate(-2deg); } 55% { transform: translateX(-50%) rotate(2deg); } }
.tray-g { position: absolute; left: 50%; bottom: 2%; width: 62%; height: 16%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, #E8D3A6, #C9A86A 70%, #9C7F49 72%, transparent 74%); box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .6); }
.date { position: absolute; width: 22px; height: 30px; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 35% 30%, #B8733B, #7A3E1A 60%, #4C2410); box-shadow: inset -3px -4px 6px rgba(0, 0, 0, .35); }
.date.fall { animation: fall var(--t, .9s) cubic-bezier(.5, 0, .7, 1) forwards; }
@keyframes fall { 80% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } 90% { transform: translate(var(--dx), calc(var(--dy) - 10px)) rotate(var(--r)); } to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } }
.date.gold { width: 30px; height: 40px; background: radial-gradient(circle at 35% 30%, #FFF1C2, #F3C66B 45%, #B8862E); box-shadow: 0 0 0 0 rgba(243, 198, 107, .6), 0 0 26px 8px rgba(243, 198, 107, .55); cursor: pointer; z-index: 3; }
.date.gold.landed { animation: glow 1.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 10px rgba(243, 198, 107, 0), 0 0 40px 14px rgba(243, 198, 107, .75); } }
.shakes { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.shakes i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--g); }
.shakes i.on { background: var(--g); }

/* Prize reveal */
.prize { position: relative; text-align: center; padding: 30px 22px; border-radius: 28px; background: linear-gradient(160deg, #FBF3DF, #F1DDB2); color: #2A2216; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .8); animation: flip .8s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes flip { from { transform: perspective(800px) rotateY(90deg) scale(.8); opacity: 0; } }
.prize .p-kick { font-size: 13px; color: #8A6A2F; letter-spacing: .04em; }
.prize h3 { margin: 6px 0 4px; font-family: var(--display); font-size: clamp(26px, 7.5vw, 32px); line-height: 1.4; color: #2C4F3B; }
.prize p { margin: 0; color: #6E5A33; font-size: 14px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: conf var(--t) linear var(--d) forwards; }
@keyframes conf { to { transform: translate(var(--x), 110vh) rotate(var(--r)); } }

/* Claim form */
.g-form { display: grid; gap: 12px; margin-top: 18px; }
.g-field label { display: block; font-size: 13px; color: rgba(246, 238, 221, .75); margin: 0 4px 6px; }
.g-field input, .g-field select { width: 100%; height: 52px; border-radius: 16px; border: 1.5px solid rgba(246, 238, 221, .18); background: rgba(246, 238, 221, .07); color: var(--c); font: 500 16px var(--ar); padding: 0 16px; outline: none; }
.g-field input:focus, .g-field select:focus { border-color: var(--g); }
.g-field select option { color: #1F2A24; }
.g-field input[type="tel"] { direction: ltr; text-align: start; letter-spacing: .04em; }
html[dir="rtl"] .g-field input[type="tel"] { text-align: right; }
.g-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.7; color: rgba(246, 238, 221, .85); }
.g-check input { width: 20px; height: 20px; margin-top: 3px; accent-color: #D9AE62; flex: none; }
.g-err { color: #F0A08C; font-size: 13.5px; text-align: center; min-height: 20px; margin: 0; }
.g-privacy { font-size: 12px; color: rgba(246, 238, 221, .5); line-height: 1.8; }

/* The ticket with the code */
.ticket { position: relative; margin-top: 20px; border-radius: 22px; background: #FBF8F2; color: #1F2A24; text-align: center; padding: 22px 18px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .8); animation: r-in .6s; }
.ticket::before, .ticket::after { content: ''; position: absolute; top: 58%; width: 26px; height: 26px; border-radius: 50%; background: #0E2219; }
.ticket::before { left: -13px; } .ticket::after { right: -13px; }
.ticket .t-prize { font-family: var(--display); font-weight: 700; font-size: 22px; color: #2C4F3B; margin: 4px 0 14px; }
.ticket .t-cut { border-top: 2px dashed #D9CDB6; margin: 0 -18px 16px; }
.ticket .t-code { font: 600 34px/1 var(--latin); letter-spacing: .14em; color: #1F2A24; direction: ltr; }
.ticket .t-meta { margin-top: 12px; font-size: 13px; color: #6E756F; }

/* Entry point on the home page */
.play-chip { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); inset-inline-start: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(243, 210, 142, .95), rgba(217, 174, 98, .95)); color: #2A2216; font-family: var(--display); font-weight: 600; font-size: 13.5px; box-shadow: 0 10px 24px -10px rgba(243, 196, 111, .8); opacity: 0; }
.go .play-chip { animation: rise .7s 3.6s forwards, nudge-chip 3s 5s ease-in-out infinite; }
@keyframes nudge-chip { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-4deg); } 90% { transform: rotate(4deg); } 95% { transform: rotate(-2deg); } }
.feed-end .play { margin-top: 18px; width: min(320px, 100%); }

@media (prefers-reduced-motion: reduce) {
  .game *, .game *::before { animation-duration: .01ms !important; animation-delay: 0s !important; }
  .play-chip { opacity: 1; }
}

/* Keep the 3×4 board inside the screen: tiles never grow past their column, and the board shrinks on short phones. */
.board { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: min(100%, calc((100dvh - 300px) * .75)); margin: 0 auto; }
.tile, .r-item { min-width: 0; }
.tile img, .r-item img { min-width: 0; max-width: 100%; }
.r-items { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); max-width: 420px; margin: 0 auto; }
.r-item img { max-height: 22vh; }
.tile { min-height: 0; overflow: hidden; padding: 0; }
.tile img { position: absolute; inset: 7%; width: 86%; height: 86%; }
.g-label { margin-bottom: 10px; }
.g-picked { margin-top: 8px; }
.g-count { margin-top: 12px; }

/* "Playing as …" line on the intro, with a link-style change button */
.game .g-who { margin: 2px 0 0; }
.game .g-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
