/* Build the Burj: the game frame in the middle (9:16), the prize on the left, how to play on the right. Phone: the game fills the screen. */
body.play { overflow-x: hidden; background: radial-gradient(80% 60% at 50% 0%, #1a130899, transparent 70%), var(--bg); }
.play .nav { position: sticky; top: 0; background: #050505e6; padding: 10px 0; }
.play .nav::before { display: none; }
.snd svg { width: 20px; height: 20px; }
.snd[aria-pressed=false] .w1, .snd[aria-pressed=false] .w2 { opacity: 0; }
.snd[aria-pressed=false] { color: var(--dim); }

.arena { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 28px; align-items: center; width: min(1240px, 100% - 32px); margin: 0 auto; padding: 18px 0 30px; min-height: calc(100svh - 64px); }
.stage { position: relative; height: min(calc(100svh - 110px), 860px); aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; background: #08070a; border: 1px solid var(--line2);
  box-shadow: 0 50px 100px -40px #000, 0 0 90px -30px #f0c76655; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.hud { position: absolute; top: 18px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; text-shadow: 0 2px 16px #000; direction: ltr; }
.hud b { font: 600 54px/1 var(--disp); color: var(--gold); font-variant-numeric: tabular-nums; }
.hud > span { font: 700 14px/1 var(--text); color: var(--sand); margin-top: -2px; }
.hud small { margin-top: 6px; font: 700 11px/1 var(--text); color: var(--mut); letter-spacing: .14em; text-transform: uppercase; }
.toast { position: absolute; left: 50%; top: 34%; transform: translate(-50%, 0); font: italic 600 34px/1 var(--disp); color: #fff3c9; text-shadow: 0 0 24px #f0c766; pointer-events: none; opacity: 0; white-space: nowrap; }
html[dir=rtl] .toast { font-style: normal; font-weight: 700; }
.toast.go { animation: toast .9s var(--ease) forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -30px) scale(1); } }

/* overlays */
.ov { position: absolute; inset: 0; display: grid; place-items: center; padding: 22px; background: linear-gradient(180deg, #050505b3, #050505e6); animation: ovin .4s ease both; }
@keyframes ovin { from { opacity: 0; } }
.ov-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 320px; animation: cardup .6s var(--spring) both; }
@keyframes cardup { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.ov-key { width: 110px; height: 110px; border-radius: 22px; box-shadow: 0 0 60px -6px #f0c76699; animation: keyfloat 4s ease-in-out infinite; }
@keyframes keyfloat { 50% { transform: translateY(-8px) rotate(3deg); } }
.ov h1, .ov h2 { font: 500 44px/1 var(--disp); letter-spacing: -.02em; }
html[dir=rtl] .ov h1, html[dir=rtl] .ov h2 { font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.ov h2 { font-size: 36px; }
.ov p { color: var(--mut); font-size: 15px; }
.ov .btn { width: 100%; }
.ov .best { font-size: 14px; color: var(--sand); } .ov .best b { color: var(--gold); }
.ov .row { display: flex; gap: 8px; width: 100%; } .ov .row .btn { flex: 1; min-width: 0; padding: 0 12px; font-size: 14px; }
.ov .big-m { font: 600 64px/1 var(--disp); color: var(--gold); direction: ltr; }
.ov .big-m small { font: 700 18px/1 var(--text); color: var(--sand); }
.won-key { width: 150px; height: 150px; border-radius: 26px; box-shadow: 0 0 80px #f0c766aa; animation: wonkey 1.2s var(--spring) both; }
@keyframes wonkey { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
.spin-dot { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #f0c76633; border-top-color: var(--gold); animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* side panels */
.side { align-self: center; }
.prize, .howto { padding: 24px; border-radius: 24px; background: linear-gradient(160deg, #1b150c, #0d0a06); border: 1px solid var(--line); }
.prize img { width: 100%; height: auto; border-radius: 18px; margin: 14px 0; }
.prize ul, .howto ol { display: grid; gap: 10px; }
.prize ul { list-style: none; } .prize li { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--sand); font-size: 15px; }
.prize li i { font-style: normal; color: var(--gold); }
.wins { margin-top: 16px; color: var(--mut); font-size: 14px; } .wins b { font: 600 26px/1 var(--disp); color: var(--gold); }
.howto ol { margin-top: 14px; padding-inline-start: 20px; color: #d8cfbf; font-size: 15px; }
.howto li::marker { color: var(--emer); font-weight: 800; }
.side-l { justify-self: end; max-width: 300px; } .side-r { justify-self: start; max-width: 300px; }

@media (max-width: 1080px) {
  .arena { grid-template-columns: 1fr; gap: 18px; padding-top: 10px; }
  .stage { justify-self: center; height: auto; width: min(100%, (100svh - 100px) * 9 / 16); }
  .side { justify-self: center !important; max-width: 520px; width: 100%; }
  .side-l { order: 2; } .side-r { order: 3; }
  .prize { display: grid; grid-template-columns: 120px 1fr; gap: 6px 18px; align-items: center; }
  .prize .eyebrow { grid-column: 1 / -1; }
  .prize img { margin: 0; grid-row: span 2; }
}
@media (max-width: 560px) {
  .play .nav .btn.small { display: none; }
  .arena { width: 100%; padding: 0 0 24px; gap: 16px; }
  .stage { width: 100%; height: calc(100svh - 58px); aspect-ratio: auto; border-radius: 0; border-inline: 0; border-top: 0; }
  .side { width: calc(100% - 32px); }
  .hud b { font-size: 46px; }
}
