.sar-game-page { padding-top: 34px; }
.game-introduction { margin-bottom: 30px; }
.game-introduction h1 { font-size: clamp(2.3rem, 6vw, 4.5rem); }
.sar-game-ad-separation { margin-block: 90px; }
.game-shell { position: relative; border: 1px solid var(--sar-line); border-radius: 22px; background: #0a1720; overflow: hidden; }
.game-shell.is-embedded { border-radius: 16px; }
.game-hud { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; padding: 12px; background: #0b1925; border-bottom: 1px solid var(--sar-line); }
.hud-item { min-width: 0; padding: 9px 10px; border-radius: 11px; background: #132636; text-align: center; }
.hud-label { display: block; color: var(--sar-muted); font-size: .74rem; }
.hud-value { display: block; margin-top: 2px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.canvas-wrap { position: relative; background: #182d3d; }
#game { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; touch-action: none; user-select: none; }
.game-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(5,13,18,.82); }
.game-overlay[hidden] { display: none; }
.game-dialog { width: min(590px,100%); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: #122633; padding: 24px; text-align: center; }
.game-dialog-kicker { color: var(--sar-accent); font-size: .75rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.game-dialog h2 { margin: 7px 0 9px; font-size: clamp(1.4rem,3vw,2.1rem); }
.game-dialog p { margin: 8px 0; color: var(--sar-muted); line-height: 1.5; }
.game-dialog-actions { justify-content: center; }
.game-keyboard-help { font-size: .9rem; }
.reward-note { font-size: .82rem; }
.performance-badge { position: absolute; right: 10px; bottom: 9px; padding: 5px 8px; border-radius: 999px; background: rgba(4,13,18,.76); color: #d8e7df; font-size: .68rem; letter-spacing: .03em; pointer-events: none; }
.performance-badge span { color: var(--sar-accent); }
.game-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border-top: 1px solid var(--sar-line); background: #0b1925; }
.control-button { min-height: 56px; font-size: 1rem; }
.game-runtime-note { min-height: 1.4em; margin: 0; padding: 0 14px 12px; color: var(--sar-muted); background: #0b1925; font-size: .78rem; text-align: center; }
.game-guide { padding-top: 48px; }
.editorial-copy { max-width: 850px; margin: 42px auto 0; }
.editorial-copy h2 { margin-top: 2.1em; line-height: 1.2; }
.editorial-copy p { color: var(--sar-muted); }
.page-extra-content { margin-top: 40px; }
@media (max-width: 720px) {
  .game-hud { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .game-overlay { padding: 9px; }
  .game-dialog { padding: 16px; }
  .game-dialog .game-keyboard-help { display: none; }
  .performance-badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .game-shell *, .game-shell *::before, .game-shell *::after { scroll-behavior: auto !important; }
}

.game-mode-bar { display: flex; align-items: center; gap: 8px 12px; padding: 9px 14px; border-bottom: 1px solid var(--sar-line); background: #091622; font-size: .76rem; }
.game-mode-bar span:last-child { color: var(--sar-muted); }
.game-mode-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--sar-accent-2); box-shadow: 0 0 0 4px rgba(255,215,106,.1); }
.game-shell.is-verified .game-mode-dot { background: var(--sar-accent); box-shadow: 0 0 0 4px rgba(97,230,168,.1); }
.game-shell.is-sample { border-color: rgba(255,215,106,.25); }
.game-shell.is-verified { border-color: rgba(97,230,168,.34); }
@media (max-width: 620px) { .game-mode-bar { align-items: flex-start; flex-wrap: wrap; }.game-mode-bar span:last-child { width: 100%; padding-left: 20px; } }

/* Version 5.2 colorful game chrome. */
.game-shell {
  border-color: rgba(255,255,255,.22);
  background: #101337;
  box-shadow: 0 28px 70px rgba(3,6,26,.3);
}
.game-hud {
  background: linear-gradient(90deg,#1b2255,#29245e 48%,#173b5d);
}
.hud-item {
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(145deg,rgba(54,61,139,.74),rgba(30,37,90,.8));
}
.hud-item:nth-child(2) { background: linear-gradient(145deg,rgba(97,58,128,.78),rgba(53,35,91,.84)); }
.hud-item:nth-child(3) { background: linear-gradient(145deg,rgba(25,92,109,.78),rgba(24,53,91,.84)); }
.hud-item:nth-child(4) { background: linear-gradient(145deg,rgba(101,73,33,.78),rgba(66,47,63,.84)); }
.hud-item:nth-child(5) { background: linear-gradient(145deg,rgba(41,86,77,.78),rgba(36,53,89,.84)); }
.hud-label { color: #d9dcf5; }
.canvas-wrap { background: linear-gradient(145deg,#2f3475,#1d5170); }
.game-overlay { background: rgba(8,10,35,.84); }
.game-dialog {
  background: linear-gradient(145deg,#272d68,#3d285e 58%,#1b5060);
  box-shadow: 0 24px 64px rgba(3,6,26,.36);
}
.game-dialog-kicker { color: #8ff5ff; }
.game-controls, .game-runtime-note { background: linear-gradient(90deg,#171e4b,#252052 55%,#153c57); }
.game-mode-bar { background: linear-gradient(90deg,#24295f,#382451 52%,#174a59); }
.game-mode-dot { background: #ffd166; box-shadow: 0 0 0 4px rgba(255,209,102,.16); }
.game-shell.is-verified .game-mode-dot { background: #78f4ca; box-shadow: 0 0 0 4px rgba(120,244,202,.15); }
.game-shell.is-sample { border-color: rgba(255,209,102,.35); }
.game-shell.is-verified { border-color: rgba(120,244,202,.4); }

/* Version 5.4 sample sponsor message. */
.game-shell .sar-sponsor-card { margin: 14px 0 0; }
.game-shell.is-verified .sar-sponsor-card { display: none !important; }

/* Version 5.4 original engine-style loading and depth presentation. */
.canvas-wrap {
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 18%, rgba(121, 232, 255, .24), transparent 25%),
    linear-gradient(145deg, #2e3475, #1b4f73 52%, #2a1a58);
}
.canvas-wrap::before,
.canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.canvas-wrap::before {
  background:
    linear-gradient(90deg, rgba(107, 241, 255, .06), transparent 15%, transparent 85%, rgba(255, 118, 196, .07)),
    repeating-linear-gradient(90deg, transparent 0 12%, rgba(255,255,255,.022) 12.15% 12.3%, transparent 12.45% 24%);
  mix-blend-mode: screen;
}
.canvas-wrap::after {
  box-shadow: inset 0 0 90px rgba(3, 6, 32, .62), inset 0 -54px 70px rgba(2, 8, 22, .3);
}
#game { position: relative; z-index: 1; }
.game-overlay { z-index: 5; }
.performance-badge { z-index: 6; }
.engine-loading { z-index: 8; }
.direct-interstitial { z-index: 9; }

.engine-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(125, 94, 255, .28), transparent 32%),
    radial-gradient(circle at 18% 18%, rgba(0, 237, 255, .16), transparent 25%),
    linear-gradient(145deg, rgba(8, 8, 36, .98), rgba(42, 17, 69, .98) 58%, rgba(6, 31, 50, .98));
  transition: opacity .42s ease, visibility .42s ease;
}
.engine-loading.is-ready { opacity: 0; visibility: hidden; }
.engine-loading-inner { width: min(420px, 88%); text-align: center; }
.engine-mark { width: 92px; height: 92px; color: #82f7ff; filter: drop-shadow(0 0 20px rgba(80, 227, 255, .35)); }
.engine-brand { margin: 14px 0 18px; color: #fff; font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 900; letter-spacing: .18em; }
.engine-progress { height: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; background: rgba(0,0,0,.52); box-shadow: inset 0 1px 7px rgba(0,0,0,.55); }
.engine-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22f3ff, #8e6fff 52%, #ff5fd2); box-shadow: 0 0 18px rgba(89, 236, 255, .65); transition: width .24s ease; }
.engine-status { margin: 12px 0 0; color: #d9ddff; font-size: .88rem; letter-spacing: .04em; }

.direct-interstitial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 30px);
  background: linear-gradient(145deg, rgba(21, 25, 65, .98), rgba(91, 42, 96, .97) 52%, rgba(21, 80, 101, .98));
}
.direct-interstitial[hidden] { display: none !important; }
.direct-interstitial-panel {
  width: min(760px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 24px;
  background: rgba(9, 13, 40, .88);
  box-shadow: 0 30px 80px rgba(3, 5, 28, .48);
}
.direct-interstitial-topline { display: flex; justify-content: space-between; gap: 20px; padding: 12px 16px; color: #e7e9ff; background: rgba(255,255,255,.08); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.direct-interstitial-media { min-height: 210px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 50%, rgba(108, 82, 220, .46), transparent 44%), linear-gradient(130deg, #0d173f, #2c1954 55%, #0d4a62); }
.direct-interstitial-media img { width: 100%; max-height: 330px; object-fit: cover; }
.direct-interstitial-media::before { content: "LEAP"; color: rgba(255,255,255,.12); font-size: clamp(4rem, 12vw, 9rem); font-weight: 950; letter-spacing: .1em; }
.direct-interstitial-media:has(img)::before { display: none; }
.direct-interstitial-copy { padding: 20px; text-align: center; }
.direct-interstitial-kicker { color: #ffd76a; font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.direct-interstitial-copy h2 { margin: 7px 0 8px; font-size: clamp(1.45rem, 3vw, 2.2rem); }
.direct-interstitial-copy p { margin: 0 auto 16px; max-width: 58ch; color: #d7dbf2; }
.direct-interstitial-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 560px; margin: 0 auto 12px; }
.direct-interstitial-actions .button { justify-content: center; }
.direct-interstitial-actions button:disabled { opacity: .52; cursor: wait; }
.direct-interstitial-copy small { display: block; color: #b7bedf; }

.game-shell {
  border-radius: 28px;
  background: linear-gradient(145deg, #171a46, #0e3350);
  box-shadow: 0 35px 90px rgba(4, 8, 32, .38), inset 0 1px 0 rgba(255,255,255,.12);
}
.game-hud { backdrop-filter: blur(12px); }
.hud-item { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 24px rgba(4,7,29,.18); }
.game-dialog { border-color: rgba(132, 242, 255, .23); box-shadow: 0 28px 90px rgba(2,4,26,.52), inset 0 1px 0 rgba(255,255,255,.1); }
.performance-badge { border: 1px solid rgba(130,247,255,.22); background: rgba(8,12,37,.72); color: #e9efff; }

@media (max-width: 720px) {
  .engine-mark { width: 70px; height: 70px; }
  .engine-brand { letter-spacing: .12em; }
  .direct-interstitial-media { min-height: 150px; }
  .direct-interstitial-actions { grid-template-columns: 1fr; }
}
