/* KONGŌ GATE — live slot preview. Stage is a fixed 2752×1536 box scaled to the window. */
:root {
  --metal: #1E1E22; --bronze: #7A5230; --copper: #B0643C; --gold: #D4A63C;
  --gold2: #F6DC8A; --sakura: #F2B8C0; --ivory: #F1E6CF;
  --serif: 'Cinzel', Georgia, 'Times New Roman', serif;
  --heavy: cubic-bezier(.55, .05, .35, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; touch-action: manipulation; }
body { font-family: var(--serif); color: var(--ivory); -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
img { display: block; -webkit-user-drag: none; user-select: none; }

/* fixed clipping wrapper: keeps the 2752px stage from widening the layout viewport on phones */
#viewport { position: fixed; inset: 0; overflow: hidden; }
#stage { position: absolute; left: 0; top: 0; width: 2752px; height: 1536px; transform-origin: 0 0; overflow: hidden; background: #000; }
#game, .layer { position: absolute; inset: 0; }
#core { position: absolute; left: 0; top: 0; width: 2752px; height: 1536px; transform-origin: 0 0; }   /* reel block */
.abs { position: absolute; }
.ctr { position: absolute; transform: translate(-50%, -50%); }
.noptr { pointer-events: none; }

/* ---------- backdrop ---------- */
.bgimg { position: absolute; left: 0; top: 0; width: 2752px; height: 1536px; }
#bgfs { opacity: 0; transition: opacity 1.6s ease; }
#game.fs #bgfs { opacity: 1; }
#sunWrap { position: absolute; inset: 0; transition: opacity 1.4s ease; pointer-events: none; }
#game.fs #sunWrap { opacity: 0; }
#sun { position: absolute; left: 826px; top: -70px; width: 1100px; height: 760px; mix-blend-mode: screen;
  background: radial-gradient(ellipse at 50% 52%, rgba(246,220,138,.6) 0%, rgba(212,166,60,.22) 36%, rgba(212,166,60,0) 68%);
  animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .15; } 50% { opacity: .8; } }

/* ---------- reels ---------- */
/* vignette centred on the reel frame (frame centre ≈ 1376,802 → 50%, 52%) */
#vignette { background:
  radial-gradient(ellipse 62% 70% at 50% 52%, rgba(0,0,0,0) 44%, rgba(0,0,0,.36) 68%, rgba(0,0,0,.72) 100%),
  linear-gradient(to bottom, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 76%, rgba(0,0,0,.42) 100%); }
/* frame shadow: tight contact shadow below + wide soft halo; the frame sprite covers the inside */
#frameShadow { position: absolute; border-radius: 70px;
  box-shadow: 0 40px 50px 14px rgba(0,0,0,.85), 0 0 90px 60px rgba(0,0,0,.7), 0 0 220px 110px rgba(0,0,0,.3); }
#frame { position: absolute; pointer-events: none; }   /* position from layout (game.js L.frame) */
#reels { position: absolute; }                          /* position from layout (game.js L.reel) */
.col { position: absolute; top: 0; width: 255px; height: 803px; }
.col.clip { overflow: hidden; }
.strip { position: absolute; left: 0; top: 0; width: 100%; will-change: transform; }
.strip.blur { filter: url(#vblur); }
.cell { position: absolute; left: 0; width: 255px; height: 268px; }
.coin { position: absolute; left: 5.5px; top: 12px; width: 244px; height: 244px; transition: filter .35s ease; isolation: isolate; }
.coin > img { width: 100%; height: 100%; }
/* gold rim for high coins: masked to the rim band (≈78–96% of the radius, where the sprites
   have a dark shakudō ring with a sakura vine); warm overlay ×2 + faint screen lift */
.gild { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  --gild-mask: radial-gradient(circle closest-side, transparent 76.5%, #000 79%, #000 95%, transparent 97.5%);
  -webkit-mask-image: var(--gild-mask); mask-image: var(--gild-mask);
  background: linear-gradient(135deg, #FCE7A8 0%, #E2B656 24%, #A8742A 46%, #F2CF78 64%, #8C5E22 84%, #D9AA50 100%); }
.gild.lift { background: #D4A63C; mix-blend-mode: screen; opacity: .16; }
.gild.ov { mix-blend-mode: overlay; }
.gild.ov2 { mix-blend-mode: overlay; opacity: .8; }
#reels.hl .cell:not(.win) .coin { filter: brightness(.55) saturate(.85); }
.cell.win .coin { animation: pulse 1.15s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(246,220,138,.95)) drop-shadow(0 0 20px rgba(212,166,60,.75)) brightness(1.12); }
@keyframes pulse { 0%, 100% { transform: scale(1.06); } 50% { transform: scale(1.015); } }
.cell.thud .coin { animation: thud .28s ease-out; }
@keyframes thud {
  0% { filter: none; transform: translateY(0); }
  35% { filter: drop-shadow(0 2px 1px rgba(0,0,0,.9)) brightness(1.1); transform: translateY(2px); }
  100% { filter: none; transform: translateY(0); }
}
.cell.bell .coin { animation: bell .13s ease-in-out 6 alternate; filter: drop-shadow(0 0 10px rgba(246,220,138,.8)); }
.cell.ring .coin { animation: bell .15s ease-in-out 10 alternate; filter: drop-shadow(0 0 8px var(--gold2)) drop-shadow(0 0 26px var(--gold)) brightness(1.2); }
@keyframes bell { from { transform: rotate(-7deg) scale(1.04); } to { transform: rotate(7deg) scale(1.04); } }
.col.antic::after { content: ''; position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
  box-shadow: inset 0 0 50px rgba(246,220,138,.55), inset 0 0 0 4px rgba(246,220,138,.75);
  animation: antic .45s ease-in-out infinite alternate; }
@keyframes antic { from { opacity: .45; } to { opacity: 1; } }

#wilds { position: absolute; inset: 0; pointer-events: none; }
.wildpanel { position: absolute; transition: filter .35s ease; }
#wilds.hl .wildpanel:not(.win) { filter: brightness(.6); }
.wildpanel.win { filter: drop-shadow(0 0 8px var(--gold2)) drop-shadow(0 0 26px rgba(212,166,60,.75)) brightness(1.08); }
.flamefx { position: absolute; height: 980px; transform: translateX(-50%); opacity: 0; }
.colflash { position: absolute; mix-blend-mode: screen; opacity: 0; border-radius: 10px;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,250,225,.95), rgba(246,220,138,.5) 45%, rgba(212,166,60,0) 80%); }

/* ---------- fx ---------- */
#fx { position: absolute; inset: 0; pointer-events: none; }
#lines { position: absolute; left: 0; top: 0; width: 2752px; height: 1536px; overflow: visible; }
.bolt { position: absolute; filter: drop-shadow(0 0 10px rgba(246,220,138,.9)) drop-shadow(0 0 30px rgba(212,166,60,.6)); }
.ripple { position: absolute; width: 250px; height: 250px; border-radius: 50%; border: 7px solid var(--gold2);
  box-shadow: 0 0 26px var(--gold), inset 0 0 26px rgba(212,166,60,.6);
  animation: ripple 1.3s cubic-bezier(.2,.6,.3,1) both; }
@keyframes ripple { from { transform: translate(-50%,-50%) scale(.85); opacity: 1; } to { transform: translate(-50%,-50%) scale(2.6); opacity: 0; } }

/* ---------- text ---------- */
.goldtext { background: linear-gradient(180deg, #FFF6D2 0%, #F6DC8A 32%, #D4A63C 62%, #8a5c2a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #2a190b) drop-shadow(0 0 22px rgba(212,166,60,.55)); }
.ivory { color: var(--ivory); text-shadow: 0 0 10px rgba(212,166,60,.6), 0 2px 2px rgba(0,0,0,.85); }

/* ---------- UI ---------- */
/* #logo position from layout (game.js L.logo) */
#logo img { width: 100%; filter: drop-shadow(0 0 1px #000); }
#logoShine { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; pointer-events: none; }

#winPanel { opacity: 0; transform: translate(-50%, -50%) translateY(-90px);
  transition: transform .6s cubic-bezier(.3, 1.35, .45, 1), opacity .35s ease; pointer-events: none; }
#winPanel.show { opacity: 1; transform: translate(-50%, -50%); }
#winPanel img { width: 100%; }
#winPanel .val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 50px; font-weight: 700; letter-spacing: .04em; padding-top: 4px; }
#stamp { font-size: 120px; font-weight: 900; opacity: 0; pointer-events: none; }
#stamp.show { animation: stamp .55s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes stamp {
  from { opacity: 0; transform: translate(-50%, -50%) scale(2.6) rotate(-16deg); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-8deg); }
}

.btn { position: absolute; transform: translate(-50%, -50%); cursor: pointer; transition: filter .25s ease; }
.btn .press { width: 100%; height: 100%; transition: transform .12s ease, filter .12s ease; }
.btn:hover .press { filter: brightness(1.12); }
.btn.down .press { transform: scale(.94); filter: brightness(1.35) saturate(1.1); }
.btn img { width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.55)); }
.btn.off { filter: grayscale(.55) brightness(.55); pointer-events: none; }
/* spin = static base (static shadow allowed) + rotor (rotates, never any shadow/filter) */
#spinBtn .press { position: relative; }
#spinBtn .rotorWrap { position: absolute; left: 50%; top: 50%; translate: -50% -50%; isolation: isolate; border-radius: 50%; will-change: transform; }
#spinBtn .rotorWrap img.rotor { width: 100%; height: 100%; filter: none; }
/* Light-flattening layer for btn_spin_rotor (art untouched). The sprite is lit from the top
   (measured: ±9% centre, ±23% tomoe, ±49% outer gold ring, ±29% rim). An overlay-blend
   vertical gradient (dark top → neutral → light bottom) cancels it; the radial mask sets the
   per-ring strength. Simulated residual: 5% / 1% / 8% / 8%. */
#spinBtn .rotorFlat { position: absolute; inset: .75%; border-radius: 50%; mix-blend-mode: overlay; pointer-events: none;
  background: linear-gradient(to bottom, #000 17.1%, #808080 50%, #fff 82.9%);
  --flat-mask: radial-gradient(circle closest-side, rgba(0,0,0,0) 0%, rgba(0,0,0,.15) 19%, rgba(0,0,0,.9) 26%, #000 34%,
    rgba(0,0,0,.85) 41%, rgba(0,0,0,.4) 49%, rgba(0,0,0,.35) 56%, rgba(0,0,0,.7) 64%, #000 71%, rgba(0,0,0,.31) 79%,
    rgba(0,0,0,.29) 86%, rgba(0,0,0,.17) 94%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: var(--flat-mask); mask-image: var(--flat-mask); }
#autoBtn.on .press { filter: drop-shadow(0 0 16px var(--gold2)) brightness(1.2); }
#autoBtn.on img { animation: rot 2.4s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.panel { position: absolute; transform: translate(-50%, -50%); }
.panel img { width: 100%; }
.panel .txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.panel .lab { font-size: 19px; letter-spacing: .3em; color: var(--gold); font-weight: 700; margin: 2px 0 7px .3em; }
.panel .val { font-size: 40px; font-weight: 700; letter-spacing: .04em; }
.val.bad { color: #e9a19a; }
#fsHud .panel { opacity: 0; transition: opacity .8s ease, transform .8s ease; transform: translate(-50%, -80%); }
#game.fs #fsHud .panel { opacity: 1; transform: translate(-50%, -50%); }

/* ---------- overlays ---------- */
.overlay { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s linear .7s; }
.overlay.show { opacity: 1; visibility: visible; transition: opacity .7s ease; }
.hint { font-size: 30px; letter-spacing: .35em; color: var(--ivory); opacity: .75; white-space: nowrap; }
.pulseText { animation: tapPulse 1.8s ease-in-out infinite; }
@keyframes tapPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.spinc { animation: rotc var(--dur, 3s) linear infinite; }
@keyframes rotc { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
.vajra { filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 30px rgba(246,220,138,.55)); }

#bigwin { background: rgba(8, 6, 4, .74); cursor: pointer; }
.pcanvas { position: absolute; left: 0; top: 0; width: 2752px; height: 1536px; pointer-events: none; }
/* fixed box = tallest dragon (epic 1800×1045 at 1450 wide), so tier swaps never move anything */
#bwPanel { left: 1376px; top: 760px; width: 1450px; height: 842px; }
.bwLayer { position: absolute; left: 0; top: 50%; width: 100%; transform: translateY(-50%); opacity: 0; }
.bwLayer .dragon { width: 100%; filter: drop-shadow(0 30px 60px rgba(0,0,0,.8)); }
.bwPlaque { position: absolute; left: 50%; width: 56%; transform: translate(-50%, -50%); filter: drop-shadow(0 12px 18px rgba(0,0,0,.7)); }
#bwVajra { left: 1376px; top: 215px; width: 310px; }
#bwAmount { left: 1376px; top: 1320px; font-size: 140px; font-weight: 900; white-space: nowrap; letter-spacing: .03em; }
.flame { position: absolute; height: 1000px; top: 760px; transform: translate(-50%, -50%); opacity: 0; transition: opacity .5s ease; }
#bigwin.epic .flame { opacity: 1; }
#bwHint { left: 1376px; top: 1480px; font-size: 22px; }

#fsIntro { background: #000; cursor: pointer; }
#fsFlash { mix-blend-mode: screen; }
.fsFlashBurst { opacity: 0; }
#fsNum { left: 1340px; top: 830px; font-size: 330px; font-weight: 900; line-height: 1; }
#fsPlaque { left: 1324px; top: 1238px; width: 960px; opacity: 0; }
#fsTap { left: 1376px; top: 1462px; font-size: 34px; font-weight: 700; text-shadow: 0 2px 3px #000, 0 0 16px #000, 0 0 30px rgba(0,0,0,.9);
  animation: tapPulseHi 1.8s ease-in-out infinite; }
@keyframes tapPulseHi { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
.punch { animation: punch .6s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes punch {
  from { opacity: 0; transform: translate(-50%, -50%) scale(2.1); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

#fsEnd { background: rgba(8, 6, 4, .8); cursor: pointer; }
#feVajra { left: 1376px; top: 270px; width: 300px; }
#fePlaque { left: 1376px; top: 610px; width: 1000px; }
#feLabel { left: 1376px; top: 900px; font-size: 56px; letter-spacing: .3em; font-weight: 700; color: var(--gold); white-space: nowrap; }
#feAmount { left: 1376px; top: 1060px; font-size: 170px; font-weight: 900; white-space: nowrap; }
#feTap { left: 1376px; top: 1340px; }

/* ---------- preloader (full window, outside the stage) ---------- */
#pre { position: fixed; inset: 0; z-index: 10; background: #000; overflow: hidden; cursor: pointer; transition: opacity 1s ease; }
#pre.out { opacity: 0; pointer-events: none; }
#preFill { position: absolute; inset: -80px; background-size: cover; background-position: center; filter: blur(40px) brightness(.3); opacity: 0; transition: opacity 1.4s ease; }
#pre.art #preFill { opacity: 1; }
#preBox { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
#preArt { position: absolute; left: 0; top: 0; opacity: 0; transform: scale(1.09); transform-origin: 50% 32%;
  transition: opacity 1.4s ease, transform 10s cubic-bezier(.2, .6, .3, 1); }
#pre.art #preArt { opacity: 1; transform: scale(1); }
#pre.out #preArt { transform: scale(1.06); transition: opacity 1s ease, transform 1.2s cubic-bezier(.5, 0, .75, 0); }
#preSun { visibility: hidden; mix-blend-mode: screen; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(246,220,138,.6) 0%, rgba(212,166,60,.2) 38%, rgba(212,166,60,0) 70%);
  animation: breathe 6s ease-in-out infinite; }
#pre.art #preSun { visibility: visible; }
#preVignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%), linear-gradient(to bottom, rgba(0,0,0,0) 55%, rgba(0,0,0,.45)); }
#prePetals { position: absolute; left: 0; top: 0; pointer-events: none; }
/* soft pulsing light behind the logo (loading screen + game) */
.logoGlow { pointer-events: none; mix-blend-mode: overlay;
  background: radial-gradient(ellipse closest-side, rgba(255,236,170,.98) 0%, rgba(246,220,138,.59) 32%, rgba(212,166,60,.21) 64%, rgba(212,166,60,0) 100%);
  animation: logoGlowBreath 3.6s ease-in-out infinite; }
@keyframes logoGlowBreath { 0%, 100% { transform: translate(-50%, -50%) scale(.94); opacity: .55; } 50% { transform: translate(-50%, -50%) scale(1.04); opacity: 1; } }
#preGlow { visibility: hidden; }
#pre.logo #preGlow { visibility: visible; }
#pre.ready #preGlow { animation-duration: 2.4s; }
#preLogo { opacity: 0; transform: translate(-50%, -50%) translateY(36px) scale(1.04); filter: drop-shadow(0 24px 40px rgba(0,0,0,.75));
  transition: opacity 1.1s ease .25s, transform 1.5s cubic-bezier(.22, 1, .36, 1) .25s; }
#pre.logo #preLogo { opacity: 1; transform: translate(-50%, -50%); }
#preLogo img { width: 100%; }
#preLogo canvas { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; pointer-events: none; }
#prePlate { opacity: 0; transition: opacity .8s ease; }
#pre.plate #prePlate { opacity: 1; }
#prePlate > img:first-child { width: 100%; filter: drop-shadow(0 12px 20px rgba(0,0,0,.7)); }
.preTomoe { position: absolute; top: 50%; width: 150px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.7)); }
.preInner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; transition: opacity .5s ease; }
.prePct { font-size: 24px; letter-spacing: .32em; padding-left: .32em; color: var(--gold2); font-weight: 700; white-space: nowrap; }
.preTrack { width: 64%; height: 12px; border-radius: 6px; background: rgba(0,0,0,.6); overflow: hidden;
  box-shadow: inset 0 2px 4px #000, 0 0 0 1px rgba(212,166,60,.45); }
.preBar { position: relative; height: 100%; width: 0; border-radius: 6px; overflow: hidden; transition: width .35s ease-out;
  background: linear-gradient(90deg, #7A5230, #D4A63C 60%, #F6DC8A); box-shadow: 0 0 12px rgba(246,220,138,.7); }
.preBar::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 35%; animation: glint 1.5s linear infinite;
  background: linear-gradient(90deg, rgba(255,250,225,0), rgba(255,250,225,.85), rgba(255,250,225,0)); }
@keyframes glint { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
.preTap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; white-space: nowrap;
  font-size: 44px; letter-spacing: .3em; padding-left: .3em; font-weight: 700; opacity: 0; transition: opacity .8s ease; }
#pre.ready .preInner { opacity: 0; }
#pre.ready .preTap { opacity: 1; animation: tapPulse 1.8s ease-in-out .8s infinite; }
#preDemo { font-size: 22px; letter-spacing: .3em; color: var(--gold); opacity: .7; white-space: nowrap; }

/* paytable */
#pay { background: rgba(5, 4, 3, .82); }
#paySheet { left: 1376px; top: 768px; width: 2080px; padding: 46px 70px 50px; border-radius: 22px;
  background: radial-gradient(ellipse at 50% 0%, #2c2722 0%, #1E1E22 60%, #141316 100%);
  border: 5px solid var(--bronze); box-shadow: inset 0 0 0 2px rgba(212,166,60,.35), inset 0 0 60px rgba(0,0,0,.6), 0 40px 100px #000; }
#paySheet h2 { margin: 0 0 30px; text-align: center; font-size: 58px; letter-spacing: .3em; font-weight: 900; }
#payGrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px 18px; }
.pitem { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pitem .coin { position: relative; left: auto; top: auto; width: 150px; height: 150px; }
.pitem .nm { font-size: 24px; letter-spacing: .14em; color: var(--gold2); font-weight: 700; margin: 8px 0 6px; }
.pitem .py { font-size: 23px; line-height: 1.35; color: var(--ivory); opacity: .92; }
.pitem .py b { color: var(--gold); font-weight: 700; margin-right: 10px; }
#payRules { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 26px; margin-top: 34px; }
.rule { border-top: 2px solid rgba(212,166,60,.45); padding-top: 18px; font-size: 23px; line-height: 1.45; color: var(--ivory); opacity: .92; font-family: Georgia, serif; }
.rule h3 { font-family: var(--serif); margin: 0 0 8px; font-size: 27px; letter-spacing: .18em; color: var(--gold2); }
#payClose { position: absolute; right: 26px; top: 20px; width: 70px; height: 70px; border-radius: 50%; cursor: pointer;
  border: 3px solid var(--gold); color: var(--gold2); font-size: 40px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); }
#payClose:hover { background: rgba(212,166,60,.15); }
#payFoot { text-align: center; margin-top: 26px; font-size: 21px; letter-spacing: .3em; color: var(--gold); opacity: .7; }

/* sound toggle (code-drawn: no sprite exists for it) */
#sndBtn .press { border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 38% 30%, #3b342d 0%, #1E1E22 62%, #121214 100%);
  box-shadow: inset 0 0 0 3px #7A5230, inset 0 0 0 6px #1a1614, inset 0 0 0 8px rgba(212,166,60,.9), inset 0 2px 6px rgba(246,220,138,.25), 0 6px 12px rgba(0,0,0,.6); }
#sndBtn svg { width: 56%; height: 56%; overflow: visible; filter: drop-shadow(0 0 4px rgba(212,166,60,.45)); }
#sndBtn .sp { fill: #D4A63C; }
#sndBtn .wv, #sndBtn .x { fill: none; stroke: #D4A63C; stroke-width: 4.5; stroke-linecap: round; }
#sndBtn .x { display: none; }
#sndBtn.muted .wv { display: none; }
#sndBtn.muted .x { display: inline; }
#sndBtn.muted svg { opacity: .6; }

/* subtle glint across the logo letters only (mask built in game.js letterShine) */
.letterShine { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; overflow: hidden; }
.letterShine .sweep { animation: letterSweep 7s cubic-bezier(.45,.05,.55,.95) infinite; animation-delay: 1.5s; }
#preLogo .letterShine .sweep { animation-duration: 5s; animation-delay: .8s; }
@keyframes letterSweep { 0% { transform: skewX(-18deg) translateX(0); } 28%, 100% { transform: skewX(-18deg) translateX(3300px); } }


/* =====================================================================
   PORTRAIT (phone held upright): 1536×2752 stage. #core (reel block) is moved + scaled in game.js;
   everything below only re-places what lives directly on the stage.
   ===================================================================== */
#vpFill { position: absolute; inset: -80px; background: center / cover no-repeat; filter: blur(40px) brightness(.32); display: none; }
#viewport.port #vpFill { display: block; }
#stage.port .bgimg { width: 1536px; height: 2752px; object-fit: cover; }
#stage.port #bgfs { filter: brightness(.72) saturate(.7) contrast(1.08); }
#stage.port #game.fs #vignette { background-color: rgba(20,32,48,.22); }   /* cool storm tint over the darkened backdrop */
#stage.port #sun { left: 408px; top: 80px; width: 720px; height: 500px; }
#stage.port #vignette { background:
  radial-gradient(ellipse 120% 46% at 50% 63%, rgba(0,0,0,0) 60%, rgba(0,0,0,.22) 88%, rgba(0,0,0,.35) 100%); }
#stage.port .pcanvas { width: 1536px; height: 2752px; }
#stage.port .panel .lab { font-size: 25px; margin-bottom: 9px; }
#stage.port .panel .val { font-size: 52px; }
#stage.port #winPanel .val { font-size: 64px; }
#stage.port #game.fs #logo, #stage.port #game.fs #logoGlow { opacity: 0; }
#stage.port #logo, #stage.port #logoGlow { transition: opacity .8s ease; }

#stage.port #bwPanel { left: 768px; top: 1300px; width: 1480px; height: 859px; }
#stage.port #bwVajra { left: 768px; top: 690px; width: 340px; }
#stage.port #bwAmount { left: 768px; top: 1900px; font-size: 150px; }
#stage.port #bwHint { left: 768px; top: 2130px; font-size: 26px; }
#stage.port .flame { top: 1300px; height: 1150px; }

#stage.port #fsNum { left: 724px; top: 1660px; font-size: 300px; }
#stage.port #fsPlaque { left: 812px; top: 2064px; width: 820px; }
#stage.port #fsTap { left: 768px; top: 2290px; font-size: 40px; }

#stage.port #feVajra { left: 768px; top: 900px; width: 320px; }
#stage.port #fePlaque { left: 768px; top: 1230px; width: 1100px; }
#stage.port #feLabel { left: 768px; top: 1500px; }
#stage.port #feAmount { left: 768px; top: 1680px; }
#stage.port #feTap { left: 768px; top: 1960px; font-size: 34px; }

#stage.port #paySheet { left: 768px; top: 1376px; width: 1440px; padding: 46px 54px 50px; }
#stage.port #payGrid { grid-template-columns: repeat(4, 1fr); gap: 26px 18px; }
#stage.port #payRules { grid-template-columns: 1fr; gap: 22px; }
#stage.port .pitem .nm { font-size: 26px; }
#stage.port .pitem .py, #stage.port .rule { font-size: 26px; }
