/* THUNDER OF VALHALLA client. Stage = logical box scaled by JS. Height is a constant per orientation
   (720 landscape / 844 portrait); the width follows the window aspect exactly (--W/--H set by calcLayout),
   so there are no letterbox bands or crops on any aspect. Side chrome anchors to --W. */

* { margin:0; padding:0; box-sizing:border-box; touch-action:manipulation;
    -webkit-tap-highlight-color:transparent; user-select:none; -webkit-user-select:none; }
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
html, body { width:100%; height:100%; overflow:hidden; background:#06061c;
  font-family:var(--fd); }
/* Two self-hosted OFL faces (assets/fonts, tools/mk_fonts.py): --fd the display face (Spicy Rice as "Ravens Display", digits
   of one width) for titles, plates and big numbers; --fn the UI face (Baloo 2 as "Ravens UI", tabular digits) for labels,
   read-outs and running text. The canvas uses the same two (layout.js shared.FD / shared.FN). */
@font-face { font-family:RavensDisplay; src:url(assets/fonts/RavensDisplay.woff2?v=db34b7ea) format('woff2');
  font-weight:100 1000; font-style:normal; font-display:block; }
@font-face { font-family:RavensUI; src:url(assets/fonts/RavensUI-600.woff2?v=32df0a44) format('woff2');
  font-weight:100 650; font-style:normal; font-display:block; }
@font-face { font-family:RavensUI; src:url(assets/fonts/RavensUI-800.woff2?v=3a637328) format('woff2');
  font-weight:651 1000; font-style:normal; font-display:block; }
:root{ --fd:"RavensDisplay","RavensUI",sans-serif;
       --fn:"RavensUI",sans-serif; }
#bar span, #pWin, #pBal, #pBet, .bcell span { font-family:var(--fn); }

:root { --W:1280px; --H:720px; }
#stage { position:fixed; left:0; top:0; width:1280px; height:720px;
  transform-origin:0 0; }
#cv { position:absolute; left:0; top:0; width:100%; height:100%; display:block; }
.physics-ui { transform:scale(var(--spring-scale,1)) !important; transform-origin:center; }

/* SPLASH: hall art with a slow zoom, rotating light beams, spark canvas, logo, gold-red PLAY */
#splash { position:fixed; inset:0; z-index:40; display:flex; align-items:center;
  justify-content:center; background:#0a0820; overflow:hidden; }
#spBg { position:absolute; inset:-4%;
  /* The ?v= query must match the URL loadArt requests, or every cold boot downloads the image twice */
  background:url(assets/img/bg_land.webp?v=2d9cfa5f) center 38%/cover no-repeat;
  animation:spzoom 16s ease-in-out infinite alternate; }
@keyframes spzoom { from { transform:scale(1); } to { transform:scale(1.07); } }
#spBg::after { content:""; position:absolute; inset:0;
  background:radial-gradient(90% 72% at 50% 42%, rgba(10,8,34,.38) 0%,
    rgba(9,7,30,.62) 58%, rgba(6,5,22,.92) 100%); }
#spRays { position:absolute; left:50%; top:40%; width:300vmax; height:300vmax;
  margin:-150vmax 0 0 -150vmax; mix-blend-mode:screen; opacity:.5;
  background:conic-gradient(from 0deg,
    rgba(255,226,150,0) 0deg,  rgba(255,226,150,.10) 9deg,  rgba(255,226,150,0) 18deg,
    rgba(255,226,150,.06) 34deg, rgba(255,226,150,0) 52deg, rgba(255,226,150,.11) 66deg,
    rgba(255,226,150,0) 80deg,  rgba(255,226,150,.07) 108deg, rgba(255,226,150,0) 132deg,
    rgba(255,226,150,.10) 152deg, rgba(255,226,150,0) 176deg, rgba(255,226,150,.06) 208deg,
    rgba(255,226,150,0) 238deg, rgba(255,226,150,.11) 268deg, rgba(255,226,150,0) 292deg,
    rgba(255,226,150,.07) 330deg, rgba(255,226,150,0) 360deg);
  animation:spraysrot 90s linear infinite; }
@keyframes spraysrot { to { transform:rotate(360deg); } }
#spFx { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
#spInner { position:relative; text-align:center; padding:10px 16px;
  opacity:0; transform:scale(.86);
  transition:opacity .5s ease, transform .5s ease; }
#splash.in #spInner { opacity:1; transform:scale(1);
  transition:opacity .767s cubic-bezier(.34,1.56,.64,1), transform .767s cubic-bezier(.34,1.56,.64,1); }
#splash.out { opacity:0; transition:opacity .5s ease; pointer-events:none; }
/* Logo: art img injected by JS; text fallback below */
#spLogo { position:relative; display:inline-block; overflow:hidden; }
/* While the art wordmark loads, the slot shows a skeleton, not the fallback text.
   The text is unhidden only by the 4 s guard in boot, i.e. only if the art never lands. */
#spLogo.wait > b, #spLogo.wait > i { visibility:hidden; }
/* the three ribbon cells are painted in one pass when the art is in; until then
   they carry the same skeleton, so the strip reads as loading, not as broken */
.spCell:empty::before { content:''; position:absolute; inset:0; border-radius:12px;
  background:linear-gradient(100deg,rgba(255,214,128,.05) 0%,rgba(255,214,128,.14) 45%,
             rgba(255,214,128,.05) 90%);
  background-size:220% 100%; animation:spSkel 1.5s linear infinite; }
.spCell { position:relative; }
#spLogo.wait::before { content:''; position:absolute; inset:6% 4%; border-radius:12px;
  background:linear-gradient(100deg,rgba(255,214,128,.05) 0%,rgba(255,214,128,.16) 45%,
             rgba(255,214,128,.05) 90%);
  background-size:220% 100%; animation:spSkel 1.5s linear infinite; }
@keyframes spSkel { from{ background-position:120% 0; } to{ background-position:-120% 0; } }
/* Glint band disabled outright: parked off to the side it still showed as a static white stripe on the logo */
#spLogo::after { display:none; }
@keyframes spglint { 0% { left:-40%; } 12% { left:110%; } 100% { left:110%; } }
#spLogo b { display:block; font-size:52px; letter-spacing:.04em; font-weight:900;
  background:linear-gradient(180deg,#fff3c4 0%,#ffd45e 35%,#c8860d 70%,#ffe9a0 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 3px 0 #5b3405) drop-shadow(0 5px 12px rgba(0,0,0,.6)); }
#spLogo i { display:block; font-style:normal; font-size:18px; letter-spacing:.34em;
  color:#e8b64c; margin-top:4px; text-shadow:0 2px 6px rgba(0,0,0,.7); }
/* Thin gold divider lines above WIN-UP and below the caption */
.spDiv { width:min(600px,84vw); height:2px; margin:14px auto 0;
  background:linear-gradient(90deg, rgba(255,212,94,0), rgba(255,212,94,.85) 18%,
    rgba(255,212,94,.85) 82%, rgba(255,212,94,0)); }
#spWinUp { margin-top:16px; font-size:33px; font-weight:900; letter-spacing:.06em;
  background:linear-gradient(180deg,#fff7d8,#ffc63d 55%,#a86a08);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 2px 0 #4a2a04); }
/* Mini reel window with tall cells */
#spRibbon { margin:16px auto 0; width:400px; height:206px; display:flex; gap:7px;
  padding:8px; border-radius:12px;
  border:3px solid #e3b53c; background:linear-gradient(180deg,#3a2a08,#241704);
  box-shadow:0 0 30px rgba(255,198,61,.28), inset 0 0 18px rgba(0,0,0,.6); }
.spCell { flex:1; border-radius:8px; background:radial-gradient(circle at 50% 42%,#2c2c6e,#171740);
  border:1px solid rgba(227,181,60,.65); position:relative; overflow:hidden; }
.spCell canvas { position:absolute; inset:0; width:100%; height:100%; }
#spSub { margin-top:12px; font-size:17px; font-weight:700; letter-spacing:.06em; color:#ffd45e;
  text-shadow:0 2px 5px rgba(0,0,0,.7); }
/* Gold-red PLAY: bevelled gold rim, red core, pulse */
#spPlay { position:relative; margin-top:22px; width:216px; height:60px; cursor:pointer;
  border:3px solid #f4d06a; border-radius:14px; overflow:hidden;
  background:linear-gradient(180deg,#ff6a52 0%,#e02220 42%,#9c0d10 100%);
  box-shadow:0 0 0 2px #7a4a10, 0 6px 0 #64060a, 0 12px 26px rgba(0,0,0,.6),
    inset 0 2px 0 rgba(255,255,255,.4), inset 0 -6px 12px rgba(70,4,6,.6);
  color:#fff; font-size:26px; font-weight:900; letter-spacing:.24em;
  text-shadow:0 2px 0 #5c0608, 0 3px 8px rgba(0,0,0,.5);
  animation:spplay 2s ease-in-out infinite; }
#spPlay span { position:relative; z-index:1; }
#spPlay::after { content:""; position:absolute; top:0; bottom:0; left:-45%; width:36%;
  background:linear-gradient(105deg, rgba(255,255,255,0), rgba(255,255,235,.5) 50%,
    rgba(255,255,255,0)); animation:none; }
@keyframes spplay {
  0%,100% { transform:scale(1);    box-shadow:0 0 0 2px #7a4a10, 0 6px 0 #64060a,
            0 12px 26px rgba(0,0,0,.6), 0 0 0 0 rgba(255,150,80,0),
            inset 0 2px 0 rgba(255,255,255,.4), inset 0 -6px 12px rgba(70,4,6,.6); }
  50%     { transform:scale(1.045); box-shadow:0 0 0 2px #7a4a10, 0 6px 0 #64060a,
            0 12px 26px rgba(0,0,0,.6), 0 0 26px 6px rgba(255,150,80,.35),
            inset 0 2px 0 rgba(255,255,255,.4), inset 0 -6px 12px rgba(70,4,6,.6); } }
#spPlay:disabled { filter:grayscale(.7) brightness(.6); cursor:default; animation:none; }
#spPlay.pressed { transform:translateY(3px) !important; animation:none;
  box-shadow:0 0 0 2px #7a4a10, 0 2px 0 #64060a, 0 6px 14px rgba(0,0,0,.5); }
#spSkip { display:block; margin-top:18px; font-size:13px; letter-spacing:.1em; color:#cfd0e8;
  cursor:pointer; text-shadow:0 1px 4px rgba(0,0,0,.8); }
#spSkip input { vertical-align:-2px; margin-right:6px; }
#spPct { margin-top:10px; font-size:12px; color:#9aa0d0; min-height:15px; }
/* Short landscape phones: the splash compacts so PLAY always stays on screen */
@media (max-height: 560px) {
  #spInner { padding:2px 10px; max-height:100vh; }
  #spLogo img { width:min(170px,42vw) !important; max-height:92px; object-fit:contain; }
  #spLogo b { font-size:27px; }
  #spLogo i { font-size:10px; letter-spacing:.2em; margin-top:1px; }
  .spDiv { margin-top:4px; height:1px; }
  #spWinUp { font-size:17px; margin-top:4px; }
  #spRibbon { width:250px; height:86px; margin-top:4px; padding:4px; gap:4px; border-width:2px; }
  #spSub { font-size:11px; margin-top:3px; }
  #spPlay { margin-top:5px; width:156px; height:44px; font-size:18px; border-width:2px; }
  #spSkip { margin-top:13px; font-size:10px; }
  #spPct { margin-top:1px; min-height:11px; }
}

/* ====================== ONE CONTROL ROW UNDER THE REELS ====================== */
#ctrlrow { position:absolute; left:0; width:var(--W); top:var(--ctrlY, 548px);
  height:var(--ctrlH, 112px); display:flex; align-items:center; justify-content:center;
  gap:var(--ctrlGap, 12px); z-index:6; pointer-events:none; padding:0 9px; box-sizing:border-box; }
#ctrlrow button { pointer-events:auto; position:relative; left:auto; top:auto;
  flex:none; border:none; cursor:pointer; }
.rbtn, #btnSpin { color:#8a5c10; border-radius:50%;
  background:transparent url(assets/img/punch/btn_round.webp?v=e7383581) center/100% 100% no-repeat;
  box-shadow:0 5px 12px rgba(0,0,0,.46), 0 0 0 1px rgba(255,220,120,.18);
  transition:filter .12s ease, transform .08s ease; }
.rbtn { width:var(--btn, 96px); height:var(--btn, 96px); }
.rbtn svg { position:absolute; inset:18%; width:64%; height:64%;
  filter:drop-shadow(0 1px 1px rgba(255,240,200,.45)); }
.rbtn.pressed, #btnSpin.pressed { transform:scale(.93);
  background-image:url(assets/img/punch/btn_round_pressed.webp?v=05cbb9ce); }
#btnSound .sndMute { display:none; }
#btnSound.off .sndWave { display:none; }
#btnSound.off .sndMute { display:block; }
#btnAuto.on { filter:saturate(1.18) brightness(.9);
  box-shadow:0 0 16px 4px rgba(255,150,80,.55),0 3px 10px rgba(0,0,0,.5); }
#autoLeft { display:none !important; }
/* Speed button: normal = two empty triangles, fast = the first filled, turbo = both, in the cabinet gold */
#btnTurbo.on { filter:none;
  box-shadow:0 0 16px 4px rgba(255,212,94,.50),0 3px 10px rgba(0,0,0,.5); }

#btnSpin { width:var(--spin, 148px); height:var(--spin, 148px);
  background:transparent url(assets/img/punch/btn_round.webp?v=e7383581) center/100% 100% no-repeat; }
#spinArrows { position:absolute; inset:12%; width:76%; height:76%;
  animation:spinrot 2.9s linear infinite; }
@keyframes spinrot { to { transform:rotate(360deg); } }
#spinStop { position:absolute; left:50%; top:50%; width:34px; height:34px; margin:-17px 0 0 -17px;
  /* Stop pad: storm navy under a gold rim */
  border-radius:8px; border:3px solid #d9ab4e;
  background:linear-gradient(160deg,#2c3d72 0%,#16204a 60%,#0d1430 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 0 10px rgba(120,180,255,.45),0 3px 7px rgba(4,8,24,.5);
  opacity:0; transition:opacity .08s linear; }
#btnSpin.stop #spinArrows { opacity:0; transition:opacity .08s linear; }
#btnSpin.stop #spinStop { opacity:1; }
#spinN { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:22px; font-weight:900; letter-spacing:-.02em; color:#0c0a22;
  font-variant-numeric:tabular-nums; visibility:hidden; }
#btnSpin.counting #spinN, #btnSpin.respin #spinN { visibility:visible; }
#tapWave { position:absolute; left:50%; top:50%; width:72%; height:72%; border-radius:50%;
  border:4px solid rgba(255,247,211,.92); pointer-events:none; opacity:0;
  transform:translate(-50%,-50%) scale(.38); }
#tapWave.go { animation:tapwave39 .52s cubic-bezier(.2,.72,.3,1) both; }
@keyframes tapwave39 {
  0% { opacity:.84; transform:translate(-50%,-50%) scale(.38); border-width:5px; }
  100% { opacity:0; transform:translate(-50%,-50%) scale(1.58); border-width:1px; }
}
#btnSpin.counting #spinArrows, #btnSpin.counting #spinStop,
#btnSpin.respin #spinArrows, #btnSpin.respin #spinStop { opacity:0; }
#btnSpin.counting #spinN { color:#701014; font-size:28px;
  text-shadow:0 1px 0 rgba(255,245,195,.72); }
/* In the feature the button stays live: the first tap drops autoplay to manual, then each tap throws a respin.
   While it waits for the player it pulses. */
#btnSpin.respin { pointer-events:auto; }
/* Waiting for the tap: the count stays crisp and the disc pulses; arrows over a number read as a jumble, so they stay hidden */
#btnSpin.respin.waittap #spinArrows { opacity:0; }
#btnSpin.respin.waittap #spinN { opacity:1; }
#btnSpin.respin.waittap { animation:spinWait 1.1s ease-in-out infinite; }
@keyframes spinWait { 0%,100%{ transform:scale(1); filter:brightness(1);} 50%{ transform:scale(1.06); filter:brightness(1.25);} }
#btnSpin.respin #spinN { color:#701014; font-size:42px; font-family:var(--fn);
  text-shadow:0 1px 0 rgba(255,245,195,.82); padding:0; line-height:1;
  display:flex; align-items:center; justify-content:center; inset:0; position:absolute; }
/* No caption above the respin count: the number alone centres in the disc */
#btnSpin.respin::before { content:none; }
#btnSpin:disabled { cursor:default; }
body.inbonus #ctrlrow { visibility:visible; }
body.inbonus #btnSound, body.inbonus #btnAuto, body.inbonus #btnTurbo,
body.inbonus #btnMenu { visibility:hidden; pointer-events:none; }
body.inbonus #btnSpin { visibility:visible; }
body.inbonus #btnBuy { visibility:hidden; }
body.bigwin #ctrlrow, body.bigwin #btnBuy,
body.transitioning #ctrlrow, body.transitioning #btnBuy,
body.bonusintro #ctrlrow, body.bonusintro #btnBuy,
body.bonusending #ctrlrow, body.bonusending #btnBuy { visibility:hidden; }

#btnBuy { position:absolute; left:var(--buyX, 12px); top:var(--buyY, 12px);
  width:var(--buyW, 176px); height:var(--buyH, 72px); z-index:7; border:none;
  cursor:pointer; border-radius:14px; padding:6px 10px 8px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px;
  border:3px solid #e7b944;
  background:linear-gradient(180deg,#e0453e 0%,#a4141b 48%,#65080e 100%);
  box-shadow:inset 0 2px 0 rgba(255,244,198,.65),inset 0 -4px 0 rgba(74,4,8,.45),
    0 5px 13px rgba(0,0,0,.5),0 0 17px rgba(255,176,52,.34);
  overflow:hidden; animation:buypulse 3.667s ease-in-out infinite; }
#btnBuy::after { content:none;   
  position:absolute; inset:-20% auto -20% -42%; width:32%;
  transform:skewX(-18deg); background:linear-gradient(90deg,transparent,rgba(255,247,210,.42),transparent);
  animation:none; pointer-events:none; }
@keyframes buyshine { 0%,55%{left:-42%;opacity:0} 64%{opacity:1} 82%,100%{left:112%;opacity:0} }
#btnBuy em { font-style:normal; font-size:11px; font-weight:900; letter-spacing:.14em;
  color:#fff4c8; text-shadow:0 1px 2px #5a1010; line-height:1.1; }
#btnBuy b { font-size:20px; font-weight:900; color:#ffe9a0;
  text-shadow:0 1px 0 #4a2008, 0 2px 4px rgba(0,0,0,.5); line-height:1.05; }
#btnBuy.pressed { transform:translateY(2px) scale(.98); filter:brightness(1.08); }
@keyframes buypulse {
  0%,100% { box-shadow:0 3px 10px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.35),
            inset 0 0 0 1.5px rgba(255,212,94,.4), 0 0 0 0 rgba(255,120,90,.0); }
  50%     { box-shadow:0 3px 10px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.35),
            inset 0 0 0 1.5px rgba(255,212,94,.4), 0 0 16px 3px rgba(255,120,90,.45); } }

/* −/+ sit IN THE BAR, flanking Bet — not in the spin row */
/* The −/+ glyphs are text, so they use the plain heavy sans (--fn): in the engraved display face they read as = and _ */
#btnMinus, #btnPlus { font-family:var(--fn); font-weight:700;
  position:absolute; top:50%; width:var(--step, 48px); height:var(--step, 48px);
  margin-top:calc(var(--step, 48px) / -2); border:none; border-radius:50%;
  font-size:calc(var(--step, 48px) * .58); font-weight:800; line-height:1; z-index:6; cursor:pointer; }
#btnMinus { left:calc(50% - 126px); background:linear-gradient(180deg,#f3d576,#c08a1e); color:#3a2404;
  box-shadow:inset 0 0 0 2px rgba(90,58,10,.55), 0 2px 6px rgba(0,0,0,.45); }
#btnPlus  { left:calc(50% + 78px); background:linear-gradient(180deg,#f3d576,#c08a1e); color:#3a2404;
  box-shadow:inset 0 0 0 2px rgba(90,58,10,.55), 0 2px 6px rgba(0,0,0,.45); }
#btnMinus.pressed, #btnPlus.pressed { transform:scale(.9); filter:brightness(1.15); }
#btnMinus:disabled, #btnPlus:disabled { opacity:.35; cursor:default; }
#btnTurbo svg path { fill:none; stroke:#ffe0a0; }
#btnTurbo.fast .spd1,
#btnTurbo.on .spd1,
#btnTurbo.on .spd2 { fill:#ffd45e; stroke:#ffd45e; }
#btnTurbo.fast { filter:none;
  box-shadow:0 0 12px 3px rgba(255,212,94,.42),0 3px 10px rgba(0,0,0,.5); }

/* ============================ BOTTOM BAR ============================ */
#bar { position:absolute; left:0; top:var(--barY, 668px); width:var(--W); height:var(--barH, 52px);
  background:linear-gradient(180deg,rgba(9,8,27,.92),rgba(3,3,12,.96));
  border-top:1px solid rgba(255,212,94,.32); display:flex; align-items:center; color:#fff; }
.bcell { text-align:left; }
.bcell b { display:block; font-size:14px; font-weight:400; color:#cfd0e2; line-height:1.15; }
.bcell span { display:block; font-size:19px; font-weight:800; line-height:1.2; }
#bLastWin { position:absolute; left:calc(50% - 280px); }
#bBet { position:absolute; left:50%; transform:translateX(-50%); text-align:center; }
#bBal { position:absolute; left:calc(50% + 170px); }

/* ============================ PANELS ============================ */
#panelWrap, #popWrap { position:absolute; inset:0; z-index:20; display:flex;
  align-items:center; justify-content:center; background:rgba(3,3,10,.62); }
#panelWrap.hidden, #popWrap.hidden, .hidden { display:none !important; }
#panel { position:relative; min-width:430px; max-width:760px;
  background:radial-gradient(circle at 50% 0,#34346f 0%,#17173f 48%,#0b0a25 100%);
  border:3px solid #d5a936; border-radius:18px; padding:30px 34px; color:#fff2cf;
  box-shadow:0 0 0 2px #6f430b,0 18px 60px rgba(0,0,0,.7),inset 0 1px 0 rgba(255,240,190,.35); }
#pop.physics-ui { transform:scale(var(--spring-scale,1)) !important; transform-origin:center; }
#panelBody { text-align:center; }
#panel h2 { display:block; width:100%; font-family:var(--fd);
  box-sizing:border-box;
  font-size:22px; line-height:1.12; letter-spacing:.12em; text-align:center; margin-bottom:10px;
  color:transparent; background:linear-gradient(180deg,#fff8d5,#ffd45e 58%,#c47b12);
  -webkit-background-clip:text; background-clip:text; filter:drop-shadow(0 2px 0 #5a1607); }
#panel .psub { text-align:center; font-size:14px; color:#d4cae5; margin-bottom:18px; }
#panelX, #popX { position:absolute; right:12px; top:10px; width:var(--touch, 44px); height:var(--touch, 44px); border:none;
  background:none; font-size:30px; color:#ffe3a0; cursor:pointer; line-height:1; z-index:2; }
/* Pills shrink to fit the panel; a tight gap leaves room for the label, which steps down on narrow screens */
.pills { display:flex; gap:6px; justify-content:center; }
.pills button { font-family:var(--fn); min-width:0; height:52px; flex:1 1 0;
  padding:0 3px; overflow:hidden; white-space:nowrap;
  border:2px solid #d5a936; border-radius:28px;
  background:linear-gradient(180deg,#a61e25,#671015); color:#fff1c9;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 3px 7px rgba(0,0,0,.4);
  font-size:19px; font-weight:800; cursor:pointer; }
.pills button.pressed { transform:scale(.94); }
.prow { display:flex; align-items:center; justify-content:space-between; gap:16px;
  min-height:var(--touch, 44px); padding:11px 4px; border-bottom:1px solid rgba(255,220,150,.2); font-size:16px; }
.prow:last-child { border-bottom:none; }
.prow.speedrow { justify-content:center; }
.prow.speedrow .seg { width:100%; justify-content:center; }
.prow.speedrow .seg button { flex:1 1 0; max-width:150px; }
.prow .sw { width:max(66px,var(--touch, 44px)); height:var(--touch, 44px); border-radius:24px; background:#c9c4ba; position:relative;
  cursor:pointer; flex:none; transition:background .2s; }
.prow .sw::after { content:""; position:absolute; left:5px; top:5px; width:34px; height:34px;
  border-radius:50%; background:#fff; transition:left .2s; }
.prow .sw.on { background:linear-gradient(180deg,#ffd45e,#b97812); }
.prow .sw.on::after { left:27px; }
.seg { display:flex; gap:6px; }
/* The row shrinks into the panel's field instead of overflowing it */
.seg { justify-content:center; }
.seg button { flex:1 1 0; min-width:0; min-height:var(--touch, 44px); padding:7px 4px;
  border:1px solid rgba(226,181,60,.55); border-radius:22px; white-space:nowrap;
  background:rgba(0,0,0,.28); font-size:14px; font-weight:700; cursor:pointer; color:#eadfbf; }
@media (max-width:430px){ .seg button { font-size:13px; letter-spacing:0; } }
.seg button.on { background:linear-gradient(180deg,#f3d576,#c78a1d); color:#3d2605; }
/* Menu links look like destinations: a raised plate, a gold edge and a chevron */
.mrow { position:relative; display:flex; align-items:center; width:100%;
  min-height:max(58px, var(--touch, 44px)); text-align:left; padding:14px 44px 14px 18px;
  margin:10px 0; border:2px solid rgba(226,181,60,.55); border-radius:14px;
  background:linear-gradient(180deg, rgba(58,42,96,.85), rgba(26,16,48,.9));
  box-shadow:inset 0 1px 0 rgba(255,240,190,.20), 0 3px 10px rgba(0,0,0,.45);
  font-family:var(--fd); font-size:18px; font-weight:700; letter-spacing:.04em;
  color:#ffe9c0; cursor:pointer; }
.mrow::after { content:'\203A'; position:absolute; right:18px; top:50%;
  transform:translateY(-52%); font-size:28px; line-height:1; color:#ffd45e; opacity:.9; }
.mrow:active { transform:translateY(1px); filter:brightness(1.12); }

/* Buy panel */
/* No panel art here: applyPunchDom lays it over this painted plate from the file already fetched at boot,
   so the panel has a plate on its first frame and the image is not requested twice. */
#panel.velvet { width:min(560px,94%);
  border:30px solid transparent;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,214,128,.16), rgba(255,214,128,0) 62%),
    linear-gradient(180deg,#26183a 0%,#1a1030 46%,#120a24 100%);
  border-radius:22px; color:#ffe9c0;
  box-shadow:inset 0 0 0 2px rgba(226,181,60,.55), 0 18px 60px rgba(0,0,0,.72); }
/* Panel heading: centred on the ribbon by flex, not by padding; the ribbon is narrower than the panel
   so the close X keeps its own corner */
/* The word is bent to the ribbon's arc by rotating each letter about a shared centre (arcTitle in game.js) */
#panel h2.ribboned, #panel.velvet h2 { display:flex; align-items:center; justify-content:center;
  box-sizing:border-box; font-family:var(--fd); font-weight:900;
  /* Painted band until applyPunchDom lays the ribbon art over it from the already-fetched file */
  background:linear-gradient(180deg,#a8141c 0%,#7d0d14 52%,#59080e 100%);
  border-radius:9px; box-shadow:inset 0 1px 0 rgba(255,220,160,.35), 0 3px 10px rgba(0,0,0,.5);
  font-size:23px; letter-spacing:0; line-height:1;
  width:min(300px,76%); aspect-ratio:4.1/1; min-height:62px;
  margin:6px auto 12px; padding:0 52px 8px; }
/* arcTitle computes the bend per letter pair (a long word needs more); this only has to not clip */
#panel h2, #panel h2 i { overflow:visible; }
/* Letters: solid cream with a dark engraved edge (a gold gradient on small letters over the red ribbon had almost no contrast) */
#panel h2 i { font-style:normal; display:inline-block; transform-origin:50% 620%;
  color:#fff6d8; -webkit-text-fill-color:#fff6d8;
  -webkit-text-stroke:0.6px rgba(90,20,4,.55); paint-order:stroke fill; }
#panel h2 { filter:drop-shadow(0 2px 0 rgba(90,20,4,.9)) drop-shadow(0 1px 4px rgba(0,0,0,.5)); }
/* the X gets its own corner, clear of the ribbon's tail */
#panel #panelX { right:4px; top:4px; font-size:26px; }
#panel.velvet #panelX { color:#ffd9a0; }
#buyCard { text-align:center; position:relative; width:min(430px,100%); margin:0 auto; }
#buyCard h2 { position:relative; z-index:1; white-space:nowrap; }
/* Buy card: the variable-height lines (tier guarantee, need-more warning) sit in fixed boxes and are clipped
   rather than pushing, so the card never changes size on a tier tap */
.buyOffer { height:58px; min-height:58px; overflow:hidden; justify-content:center;
  display:flex; flex-direction:column; align-items:center; gap:3px;
  margin:0 auto 12px; color:#ffe9b0; text-transform:uppercase; font-family:var(--fd); }
.buyOffer b { font-size:23px; letter-spacing:.08em; color:#ffd45e; line-height:1;
  text-shadow:0 2px 4px rgba(0,0,0,.72); }
.buyOffer span { font-size:11px; letter-spacing:.16em; opacity:.8; line-height:1.15;
  max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#buyCard .blab { font-family:var(--fd); font-size:13px; font-weight:900; letter-spacing:.18em; color:#ffe6a4;
  margin:8px 0 4px; text-shadow:0 1px 3px rgba(0,0,0,.72); }
#buyCard .plaque { width:230px; min-height:56px; margin:0 auto; padding:7px 0; border-radius:14px;
  background:linear-gradient(180deg,#5c0a0c,#3c0508);
  border:2px solid #d4a431; box-shadow:inset 0 2px 6px rgba(0,0,0,.6),0 5px 14px rgba(0,0,0,.24);
  font-size:31px; font-weight:900; color:transparent;
  background-clip:padding-box; position:relative; }
#buyCard .buyCost { width:280px; min-height:66px; padding:7px 0; font-size:39px;
  box-shadow:inset 0 2px 8px rgba(0,0,0,.68),0 0 22px rgba(255,187,48,.16); }
#buyCard .plaque em { font-style:normal;
  background:linear-gradient(180deg,#fff3c4,#ffd45e 55%,#e08a1c);
  -webkit-background-clip:text; background-clip:text; color:transparent; }
#buyCard .note { font-size:12px; color:#ffc9a0; margin-top:10px; opacity:.85; }
#buyBetRow { display:flex; align-items:center; justify-content:center; gap:12px; margin:2px 0 0; }
#buyBetRow button { width:var(--touch,44px); height:var(--touch,44px); border-radius:10px; border:2px solid #b8912a;
  background:linear-gradient(180deg,#7a1014,#4c080a); color:#ffd45e; font-size:22px;
  font-weight:900; cursor:pointer; box-shadow:inset 0 1px 0 rgba(255,230,160,.3); }
#buyBetRow .plaque { width:170px; }
#buyBtns { display:flex; gap:18px; justify-content:center; margin-top:15px; }
#buyBtns button { width:max(92px,calc(var(--touch,44px) * 1.7));
  height:max(62px,calc(var(--touch,44px) * 1.14)); padding:0; border:0; cursor:pointer;
  background:transparent center/contain no-repeat; filter:drop-shadow(0 5px 5px rgba(0,0,0,.42)); }
#buyBtns button span { position:absolute; width:1px; height:1px; overflow:hidden;
  clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; }
/* Painted YES / NO until applyPunchDom lays the art over them (their labels are visually hidden) */
#buyBtns #buyNo { background:linear-gradient(180deg,#8e1620,#571018);
  border-radius:14px; box-shadow:inset 0 0 0 2px rgba(226,181,60,.6); }
#buyBtns #buyGo { background:linear-gradient(180deg,#2e8b3d,#14591f);
  border-radius:14px; box-shadow:inset 0 0 0 2px rgba(226,181,60,.6); }
#buyBtns #buyNo::after, #buyBtns #buyGo::after { content:'\2715'; font-size:26px;
  color:#ffe9c0; text-shadow:0 2px 3px rgba(0,0,0,.6); }
#buyBtns #buyGo::after { content:'\2713'; }
#buyBtns button.skinned::after { content:none; }
#buyBtns button:disabled { filter:grayscale(.7) brightness(.7); box-shadow:none; }
#buyBtns button.pressed { transform:translateY(2px) scale(.96); filter:brightness(1.08); }

/* Pop (paytable / rules / verify): fullscreen dark overlay, white text, gold section headers, round X top-right */
#popWrap { background:rgba(5,4,12,.88); }
#pop { position:relative; width:100%; height:100%; max-height:none; overflow:auto;
  background:none; border-radius:0; padding:34px min(9%,90px) 46px; color:#f2f0f6; }
#pop h2 { font-size:24px; letter-spacing:.08em; margin:26px 0 12px; text-align:center;
  color:transparent; background:linear-gradient(180deg,#fff3c4,#ffd45e 55%,#d89a1c);
  -webkit-background-clip:text; background-clip:text;
  filter:drop-shadow(0 2px 0 rgba(60,36,4,.8)); }
#pop h2:first-child { color:#fff; background:none; -webkit-text-fill-color:#fff;
  filter:drop-shadow(0 2px 0 #5a1607); font-family:var(--fd);
  font-size:28px; text-align:center; }
#pop p { text-align:center; line-height:1.55; margin:8px auto; max-width:820px; }
#pop table { width:100%; max-width:560px; margin:0 auto; border-collapse:collapse; font-size:15px; }
#pop td, #pop th { padding:6px 8px; border-bottom:1px solid rgba(255,255,255,.16); text-align:left; }
#pop table.rtp td + td { text-align:right; white-space:nowrap; }
#pop p.legal { font-size:13px; opacity:.85; }
#pop code { font-size:12px; word-break:break-all; background:rgba(255,255,255,.1);
  padding:2px 4px; border-radius:4px; }
#pop .vbtn { display:block; margin:14px auto; padding:10px 18px; border:2px solid #e3b53c;
  border-radius:22px; background:linear-gradient(180deg,#7a1014,#4c080a);
  color:#ffd45e; font-size:14px; font-weight:700; cursor:pointer; }
#popX { right:16px; top:14px; color:#fff;
  border:2.5px solid #fff; border-radius:50%; font-size:26px; opacity:.9; }

#toast { position:absolute; left:50%; top:84px; transform:translateX(-50%); z-index:30;
  background:rgba(10,8,26,.92); color:#ffe9b0; font-size:16px; padding:10px 22px;
  border-radius:22px; border:1px solid rgba(255,198,61,.4); }
#build { position:absolute; right:6px; bottom:2px; font-size:10px; color:rgba(255,255,255,.28); z-index:5; }

/* PORTRAIT (fluid W, H = 844) */
body.portrait #spBg { background-image:url(assets/img/bg_port.webp?v=aecdfa85); }
body.portrait #spLogo img { width:min(250px,64vw) !important; }
body.portrait #spLogo b { font-size:36px; }
body.portrait #spWinUp { font-size:24px; }
body.portrait #spRibbon { width:min(340px,88vw); height:180px; }
body.portrait #spPlay { width:196px; height:56px; font-size:24px; }
body.portrait #ctrlrow { padding:0 6px; }
body.portrait #btnMinus { left:calc(50% - 98px); }
body.portrait #btnPlus  { left:calc(50% + 58px); }
body.portrait #bLastWin { left:10px; } body.portrait #bLastWin b { font-size:11px; }
body.portrait #bBet b { font-size:11px; }
body.portrait #bBal { left:auto; right:10px; text-align:right; }
body.portrait #bBal b { font-size:11px; }
body.portrait .bcell span { font-size:15px; }
body.portrait #panel { min-width:min(340px, 92vw); max-width:94%; padding:22px 20px; }
body.portrait #panel.velvet { padding:18px 14px; }
body.portrait #buyCard { min-width:0; }
body.portrait #buyBtns button { min-width:92px; }


/* BONUS BUY: a gift parcel (art) flush to the right wall between the board and the control row, breathing slowly.
   No text: the price lives in the panel it opens. */
#btnBuy{
  left:auto; right:2px; top:calc(var(--ctrlY, 640px) - 62px);
  transform:none; transform-origin:50% 80%;
  width:58px; height:66px; padding:0; border:0; border-radius:0;
  overflow:visible; font-size:0; line-height:0;
  background:url(assets/img/punch/ic_gift.webp?v=fb9a5376) center/contain no-repeat;
  box-shadow:none;
  filter:drop-shadow(0 3px 6px rgba(0,0,0,.6)) drop-shadow(0 0 10px rgba(255,180,60,.35));
  animation:giftBreathe 2.8s ease-in-out infinite; }
#btnBuy::before, #btnBuy::after{ content:none; }
@keyframes giftBreathe{
  0%,66%,100%{ transform:rotate(0deg) scale(1); }
  72%{ transform:rotate(-8deg) scale(1.09); }
  79%{ transform:rotate(7deg) scale(1.09); }
  86%{ transform:rotate(-3deg) scale(1.04); }
  93%{ transform:rotate(0deg) scale(1); } }
#btnBuy:active{ animation:none; transform:scale(.92);
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.6)) brightness(1.12); }
#btnBuy em, #btnBuy b{ display:none; }   /* The parcel carries no text */
#btnBuy b{ font-size:19px; font-weight:900; line-height:1;
  background:linear-gradient(180deg,#fffbe4 0%,#ffd971 46%,#f0a91d 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 1px 0 rgba(90,30,5,.85)); }
#btnBuy em{ font-style:normal; font-weight:900; }

/* Baked-title ribbon: the title is part of the art, no text painted */
#panel h2.baked { color:transparent !important; -webkit-text-fill-color:transparent !important;
  text-shadow:none !important; filter:none !important;
  background-repeat:no-repeat; background-position:center; background-size:100% 100%;
  width:min(320px,86%); aspect-ratio:2.7/1; min-height:0; margin:2px auto 14px; padding:0; }
#panel h2.baked i { display:none; }

/* Menu controls are grid rows, so they centre on the card at any width */
#panel .prow { display:flex; align-items:center; justify-content:space-between;
  gap:14px; width:100%; padding:4px 2px; box-sizing:border-box; }
#panel .prow > span:first-child { font-family:var(--fd); letter-spacing:.10em; font-size:15px; }
#panel .prow.speedrow { padding:10px 0 2px; }
#panel .seg { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; width:100%; }
#panel .seg button { font-family:var(--fn); font-weight:800; font-size:14px;
  letter-spacing:.03em; height:46px; border-radius:23px; white-space:nowrap;
  padding:0; min-width:0; }
#panel button.mrow { font-family:var(--fd); letter-spacing:.06em; text-align:left; }

/* HUD money must not run off its cell at high bets */
#bar span { display:inline-block; max-width:46vw; white-space:nowrap; }
#bar span.longnum { font-size:.82em; letter-spacing:-.01em; }
#bar span.vlongnum { font-size:.68em; letter-spacing:-.02em; }

/* Feature AUTO toggle: a small gold plaque at the right wall of the control band, clear of SPIN */
#btnHwAuto { display:none; position:absolute; right:8px;
  top:calc(var(--ctrlY,640px) + var(--ctrlH,110px)/2 - 30px); height:60px; width:78px; padding:0;
  border:0; border-radius:14px; cursor:pointer; z-index:6;
  font-family:var(--fd); letter-spacing:.08em; color:#5a0a0f;
  background:linear-gradient(180deg,#ffe9a8 0%,#f2c14e 40%,#c98a12 100%);
  box-shadow:0 0 0 2px #7a4e06, inset 0 2px 0 rgba(255,252,225,.85), inset 0 -6px 10px rgba(120,74,4,.45), 0 4px 10px rgba(0,0,0,.5);
  display:none; flex-direction:column; align-items:center; justify-content:center; gap:3px; }
#btnHwAuto span { font-size:10px; font-weight:900; line-height:1; }
#btnHwAuto b { font-size:9px; font-weight:900; line-height:1; letter-spacing:.14em; opacity:.85; }
#btnHwAuto .knob { position:relative; display:block; width:46px; height:22px; border-radius:12px;
  background:#c9c4ba; box-shadow:inset 0 2px 4px rgba(0,0,0,.35); transition:background .18s; }
#btnHwAuto .knob::after { content:""; position:absolute; left:3px; top:3px; width:16px; height:16px; border-radius:50%;
  background:linear-gradient(180deg,#fff,#d8d3c8); box-shadow:0 1px 3px rgba(0,0,0,.4); transition:left .18s; }
#btnHwAuto.on .knob { background:linear-gradient(180deg,#8dff9a,#1f8f3a); }
#btnHwAuto.on .knob::after { left:27px; }
#btnHwAuto.on b { color:#0b3a14; opacity:1; }
body.inbonus #btnHwAuto { display:flex; }
body.bonusintro #btnHwAuto, body.bonusending #btnHwAuto, body.transitioning #btnHwAuto { display:none; }

/* Three buy tiers */
#buyTiers{margin:0 auto 10px;width:min(430px,100%);}
#buyTiers button{font-size:14px;line-height:1.05;padding:6px 4px;height:auto;min-height:52px;}
#buyTiers button small{display:block;font-size:11px;opacity:.85;font-weight:700;}
#buyTiers button.on{background:linear-gradient(180deg,#f3d576,#c78a1d);color:#3d2605;}

/* Glyphs read on any face: gold with a dark edge */
#ctrlrow .rbtn svg, #btnSpin svg{ filter:drop-shadow(0 1px 1px rgba(30,14,2,.9)) drop-shadow(0 -1px 1px rgba(30,14,2,.7)); }

/* Landscape side rail */
body.sidectrl #ctrlrow{ left:auto !important; right:22px !important; width:auto !important;
  top:50% !important; height:auto !important; transform:translateY(-50%);
  flex-direction:column; gap:14px; }
body.sidectrl #btnBuy{ right:auto !important;
  left:calc(var(--buyX, 26px) + var(--buyW, 176px) - var(--buyH, 72px)*1.34) !important;
  top:auto !important; bottom:calc(var(--barH, 92px) + 14px) !important; z-index:9; }
body.sidectrl #btnHwAuto{ right:auto !important; left:26px !important; top:auto !important; bottom:200px !important; }

/* Buy chest: bigger and animated; the feature AUTO plaque is hidden */
#btnBuy{ /* Square, sized to the art, hugging the screen edge */
  width:calc(var(--buyH,72px)*1.218); height:calc(var(--buyH,72px)*1.218);
  left:auto !important; right:2px !important;
  filter:drop-shadow(0 0 12px rgba(120,190,255,.5)) drop-shadow(0 3px 8px rgba(0,0,0,.6));
  /* Anchored above the control row by its own height, so the hitbox never takes taps meant for SPIN / TURBO / MENU */
  /* Short phones keep this seat; tall portrait screens get a lower one (media query below) */
  top:calc(var(--ctrlY, 640px) - var(--buyH, 72px)*1.1 - 10px) !important;
  /* Clipped to its circle: the art's transparent corners would otherwise take taps meant for MENU / TURBO */
  clip-path:circle(50% at 50% 50%);
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.6));   /* static: set once, never re-rasterised */
  animation:buyCharge 4.2s ease-in-out infinite; }
/* Halo: a pseudo-element with a static gradient; only opacity and transform animate (GPU-composited, no repaint).
   Animating drop-shadow would re-rasterise the element every frame. */
#btnBuy::before{
  /* A ring: transparent across the medallion, the light starts at its edge and falls off outward */
  content:''; position:absolute; inset:-45%; border-radius:50%; z-index:-1;
  background:radial-gradient(circle at 50% 50%,
    rgba(120,190,255,0)   0%,
    rgba(120,190,255,0)   33%,          /* The chest itself stays untouched */
    rgba(150,205,255,.42) 40%,
    rgba(120,180,255,.20) 52%,
    rgba(90,150,255,0)    68%);
  opacity:.55; will-change:opacity,transform; pointer-events:none;
  animation:buyHalo 4.6s ease-in-out infinite; }
@keyframes buyHalo{
  0%,52%,100%{ opacity:.42; transform:scale(1); }
  70%        { opacity:.90; transform:scale(1.09); }
  84%        { opacity:.58; transform:scale(1.03); } }
@keyframes buyCharge{
  /* Transform only: a filter keyframe would re-rasterise every frame; the halo (::before) carries the light */
  0%      { transform:translateY(0) rotate(0deg) scale(1); }
  22%     { transform:translateY(-3px) rotate(1.6deg) scale(1.01); }
  46%     { transform:translateY(0) rotate(-1.6deg) scale(1); }
  62%     { transform:translateY(-2px) rotate(-7deg) scale(1.10); }
  70%     { transform:translateY(0) rotate(6deg) scale(1.06); }
  78%     { transform:translateY(0) rotate(-2.5deg) scale(1.03); }
  88%,100%{ transform:translateY(0) rotate(0deg) scale(1); } }
#btnHwAuto{ display:none !important; }

/* Stepper glyphs are SVG, centred like every other button */
#btnMinus svg, #btnPlus svg { position:absolute; inset:22%; width:56%; height:56%; color:#ffdf9e; }
#btnMinus, #btnPlus { display:flex; align-items:center; justify-content:center; }

/* Selected buy tier: lit plate, gold ring, a tick */
#buyTiers button{ position:relative; transition:transform .12s ease, box-shadow .12s ease; }
#buyTiers button.on{ background:linear-gradient(180deg,#ffe9a8,#d9a52e) !important; color:#2c1a02 !important;
  box-shadow:0 0 0 3px #ffe9a8, 0 0 18px 4px rgba(255,200,90,.55), inset 0 1px 0 rgba(255,255,255,.5);
  transform:translateY(-2px) scale(1.04); }
#buyTiers button.on::after{ content:"\2713"; position:absolute; top:-9px; right:-9px;
  width:22px; height:22px; line-height:22px; border-radius:50%; font-size:13px; font-weight:900;
  background:linear-gradient(180deg,#7ad06a,#2f8f28); color:#fff; box-shadow:0 2px 6px rgba(0,0,0,.5); }
#buyTiers button:not(.on){ opacity:1; filter:none;
  background:linear-gradient(180deg,#33477f,#182451) !important; color:#ffe6ad !important;
  border:2px solid #e0b34a !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 2px 6px rgba(0,0,0,.45); }

/* Buy card: a visible close button, and a bet row that hugs its field */
#panel.velvet #panelX, #panel #panelX{
  right:10px; top:10px; width:40px; height:40px; border-radius:50%;
  background:radial-gradient(circle at 50% 34%,#7a1b22,#3d070c);
  border:2px solid #e0b34a; color:#ffe6ad !important; font-size:24px; line-height:34px;
  box-shadow:0 2px 8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.25); z-index:20; }
#panel #panelX:hover{ filter:brightness(1.15); }
#buyBetRow{ display:flex; align-items:center; justify-content:center; gap:10px; }
#buyBetRow .plaque{ min-width:150px; }
#buyTiers{ margin-bottom:22px; }

/* The stepper row shrink-wraps its field, so − and + stay beside the amount on a wide panel */
#buyBetRow{ width:max-content !important; max-width:100%; margin:2px auto 0 !important;
  justify-content:center !important; gap:14px !important; }
#buyBetRow .plaque{ width:190px !important; min-width:0 !important; }

/* Tall portrait screens: the chest sits lower, still clear of MENU / TURBO */
@media (min-height: 800px) and (orientation: portrait) {
  #btnBuy { top:calc(var(--ctrlY, 640px) - var(--buyH, 72px)*0.95 - 2px) !important; }
}

/* Tier labels fit their plates at any panel width. Scoped with two ids: applyPunchDom injects
   `#panel .pills button {...}` into <head> after this sheet, and a class selector cannot outrank it. */
#panel #buyTiers button { font-size:14px; letter-spacing:0; }
#panel #buyTiers button small { font-size:.78em; letter-spacing:0; }
@media (max-width:430px){ #panel #buyTiers button { font-size:13px; } }
@media (max-width:370px){ #panel #buyTiers button { font-size:12px; } }

/* SKIN2: the cabinet is one painted plate drawn by the canvas; every control sits in the socket or plaque
   painted for it. Positions come from calcLayout -> sk2Layout() as --k2-* stage-px variables measured on the plate. */

/* the control row stops being a flex row: every button is placed on its socket */
body.skin2 #ctrlrow { display:block; top:0; left:0; width:var(--W); height:var(--H); padding:0; }
body.skin2 #ctrlrow button { position:absolute; }
body.skin2 .rbtn, body.skin2 #btnSpin { background:none; box-shadow:none; border-radius:50%; }
body.skin2 .rbtn.pressed, body.skin2 #btnSpin.pressed { background:none; transform:scale(.92); filter:brightness(1.25); }
body.skin2 .rbtn svg { inset:20%; width:60%; height:60%;
  filter:drop-shadow(0 1px 0 rgba(20,8,0,.9)) drop-shadow(0 0 3px rgba(0,0,0,.6)); }
body.skin2 #btnSound { left:var(--k2-sound-x); top:var(--k2-sound-y); width:var(--k2-sound-d); height:var(--k2-sound-d); }
body.skin2 #btnAuto  { left:var(--k2-auto-x);  top:var(--k2-auto-y);  width:var(--k2-auto-d);  height:var(--k2-auto-d); }
body.skin2 #btnTurbo { left:var(--k2-speed-x); top:var(--k2-speed-y); width:var(--k2-speed-d); height:var(--k2-speed-d); }
body.skin2 #btnMenu  { left:var(--k2-menu-x);  top:var(--k2-menu-y);  width:var(--k2-menu-d);  height:var(--k2-menu-d); }
body.skin2 #btnAuto.on, body.skin2 #btnTurbo.on, body.skin2 #btnTurbo.fast {
  box-shadow:0 0 0 2px rgba(255,214,110,.75), 0 0 14px 3px rgba(255,200,90,.45); }
/* SPIN: the gold disc is painted; the arrows are dark bronze ON it */
body.skin2 #btnSpin { left:var(--k2-spin-x); top:var(--k2-spin-y); width:var(--k2-spin-d); height:var(--k2-spin-d); }
body.skin2 #spinArrows { inset:20%; width:60%; height:60%; }
body.skin2 #spinHalf { fill:#5b3510; }
body.skin2 #btnSpin.respin #spinN, body.skin2 #btnSpin.counting #spinN { color:#5b1a08; font-family:var(--fn);
  text-shadow:0 1px 0 rgba(255,240,190,.8); }
/* the bar dissolves into the three painted plaques */
body.skin2 #bar { top:0; height:var(--H); background:none; border:0; pointer-events:none; }
body.skin2 #bar > * { pointer-events:auto; }
body.skin2 .bcell { position:absolute; display:flex; flex-direction:column; align-items:center;
  justify-content:center; text-align:center; transform:none; right:auto; }
body.skin2 .bcell b { font-family:var(--fd); font-weight:400; text-transform:uppercase; letter-spacing:.06em;
  color:#ffd66e; line-height:1; text-shadow:0 1px 0 #1a0c02, 0 0 3px rgba(0,0,0,.8); }
body.skin2 .bcell span { font-family:var(--fn); font-weight:900; color:#fff1c8; line-height:1.05;
  font-variant-numeric:tabular-nums; text-shadow:0 1px 0 #1a0c02, 0 0 3px rgba(0,0,0,.8); }
/* ID rules elsewhere translate #bBet by -50% and pin #bBal to the right edge — neutralised explicitly */
body.skin2 #bBal { left:var(--k2-balance-x); right:auto; top:var(--k2-balance-y); width:var(--k2-balance-w); height:var(--k2-balance-h);
  text-align:center; transform:none; }
body.skin2 #bBet { left:var(--k2-bet-x); top:var(--k2-bet-y); width:var(--k2-bet-w); height:var(--k2-bet-h); transform:none; }
body.skin2 #bBal b, body.skin2 #bBet b { font-size:calc(var(--k2-bet-h) * .27); }
body.skin2 #bBal span, body.skin2 #bBet span { font-size:calc(var(--k2-bet-h) * .40); }
/* WIN reads on one line in the plaque under SPIN */
body.skin2 #bLastWin { left:var(--k2-win-x); top:var(--k2-win-y); width:var(--k2-win-w); height:var(--k2-win-h);
  flex-direction:row; gap:.35em; }
body.skin2 #bLastWin b { font-size:calc(var(--k2-win-h) * .34); }
body.skin2 #bLastWin span { font-size:calc(var(--k2-win-h) * .44); }
/* − and + live inside the bet plaque, at its two ends */
body.skin2 #btnMinus, body.skin2 #btnPlus { top:calc(var(--k2-bet-y) + var(--k2-bet-h) / 2);
  width:calc(var(--k2-bet-h) * .62); height:calc(var(--k2-bet-h) * .62); margin-top:calc(var(--k2-bet-h) * -.31);
  background:none; box-shadow:none; border:0; color:#ffd66e; filter:drop-shadow(0 1px 0 #1a0c02); }
body.skin2 #btnMinus { left:calc(var(--k2-bet-x) + var(--k2-bet-h) * .10); }
body.skin2 #btnPlus  { left:calc(var(--k2-bet-x) + var(--k2-bet-w) - var(--k2-bet-h) * .72); }
body.skin2 #btnMinus svg, body.skin2 #btnPlus svg { width:100%; height:100%; }
/* BUY BONUS: the gold plate over the sky, never over the board */
/* the old gift-chest rules pin #btnBuy with !important and clip it to a circle — all of that is undone here */
body.skin2 #btnBuy { left:var(--k2-buy-x) !important; right:auto !important; top:var(--k2-buy-y) !important;
  bottom:auto !important; width:var(--k2-buy-w) !important; height:calc(var(--k2-buy-w) * .247) !important;
  padding:0; border:0; border-radius:0; box-shadow:none; animation:none; transform:none; clip-path:none;
  font-size:0; line-height:1; display:flex; align-items:center; justify-content:center;
  filter:drop-shadow(0 3px 6px rgba(0,0,0,.55));
  background:url(assets/skin3/cta_button.webp?v=c495f720) center/100% 100% no-repeat; }
body.skin2 #btnBuy::before, body.skin2 #btnBuy::after { content:none; }
body.skin2 #btnBuy:active, body.skin2 #btnBuy.pressed { transform:scale(.96); filter:brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,.55)); }
body.skin2 #btnBuy em { display:block; font-style:normal; font-family:var(--fn); font-weight:900; letter-spacing:.04em;
  color:#4a2406; font-size:calc(var(--k2-buy-w) * .092); text-shadow:0 1px 0 rgba(255,240,190,.7); }
body.skin2 #btnBuy b { display:none; }
/* in the feature the bonus AUTO toggle takes the right-hand sockets */
body.skin2 #btnHwAuto { right:auto; left:calc(var(--k2-speed-x) + var(--k2-speed-d) * .1);
  top:calc(var(--k2-speed-y) + var(--k2-speed-d) / 2 - 30px); }

/* ---------- SKIN2 splash (body.k2kit is set in index.html, so the first paint is already new) ---------- */
body.k2kit #spBg { inset:0; animation:k2splashIn 12s cubic-bezier(.2,.7,.2,1) 1 both;
  background:url(assets/skin3/splash_port.webp?v=ed4ddea8) center top/cover no-repeat;
  background-image:image-set(url(assets/skin3/splash_port.avif?v=ef68188b) type("image/avif"),
                             url(assets/skin3/splash_port.webp?v=ed4ddea8) type("image/webp")); }
/* landscape keeps the same storm sky — the landscape plate carries empty plaques and sockets,
   which behind the card read as a half-built game */
@media (orientation:landscape) { body.k2kit #spBg { background-position:center 30%; } }
/* One slow push-in, then still: nothing on this screen loops forever */
@keyframes k2splashIn { from { transform:scale(1.035); } to { transform:scale(1); } }
body.k2kit #spBg::after { background:linear-gradient(180deg, rgba(5,9,26,.10) 0%, rgba(5,9,26,.35) 38%,
  rgba(5,9,26,.82) 70%, rgba(5,9,26,.95) 100%); }
body.k2kit #spRays, body.k2kit #spFx { display:none; }
body.k2kit #splash { background:#05091a; font-family:var(--fd); }
body.k2kit #spInner { width:min(420px,94vw); padding:0; }
body.k2kit #spLogo img { width:min(360px,88vw) !important; filter:drop-shadow(0 8px 18px rgba(0,0,0,.6)) !important; }
body.k2kit .spDiv { display:none; }
/* the card: the same carved frame as every panel of the new cabinet */
body.k2kit #spCard { position:relative; margin:6px auto 0; padding:24px 18px 26px;
  border:34px solid transparent; border-image:url(assets/skin3/panel_frame.webp?v=9cc69f3f) 120 fill / 34px / 0 stretch;
  filter:drop-shadow(0 16px 30px rgba(0,0,0,.6)); }
body.k2kit #spWinUp { margin:0; white-space:nowrap; font-family:var(--fd); font-weight:400; font-size:clamp(17px,5.1vw,26px);
  letter-spacing:.05em; background:none; color:#ffd66e; -webkit-text-fill-color:#ffd66e; filter:none;
  text-shadow:0 2px 0 #3a2008, 0 4px 10px rgba(0,0,0,.6); }
body.k2kit #spRibbon { width:auto; height:auto; margin:14px auto 0; padding:0; gap:10px; border:0;
  background:none; box-shadow:none; justify-content:center; }
body.k2kit .spCell { width:calc((min(420px,94vw) - 110px) / 3); display:flex; flex-direction:column; align-items:center;
  gap:6px; opacity:0; transform:translateY(14px); animation:k2cellIn .6s cubic-bezier(.16,.8,.23,1) forwards; }
body.k2kit #spC2 { animation-delay:.12s; } body.k2kit #spC3 { animation-delay:.24s; }
@keyframes k2cellIn { to { opacity:1; transform:none; } }
body.k2kit .spCell .k2face { position:relative; width:100%; aspect-ratio:1; }
body.k2kit .spCell .k2face img { width:100%; height:100%; display:block; filter:drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
body.k2kit .spCell .k2face b { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:var(--fn); font-weight:900; font-size:clamp(14px,4.4vw,20px); color:#fff1c8;
  -webkit-text-stroke:0; text-shadow:0 2px 0 #3a2008, 0 0 4px #000; }
body.k2kit .spCell i { font-style:normal; font-family:var(--fd); font-size:clamp(10px,2.9vw,13px);
  letter-spacing:.06em; color:#ffd66e; text-shadow:0 1px 0 #1a0c02; }
body.k2kit #spSub { margin-top:12px; font-family:var(--fn); font-weight:900; font-size:clamp(11px,3.3vw,14px);
  color:#e9ddc2; letter-spacing:.02em; line-height:1.35; text-shadow:0 1px 0 #000; }
body.k2kit #spPlay { display:flex; align-items:center; justify-content:center; margin:16px auto 0;
  width:min(300px,76vw); height:calc(min(300px,76vw) * .247); padding:0; border:0; border-radius:0; box-shadow:none;
  background:url(assets/skin3/cta_button.webp?v=c495f720) center/100% 100% no-repeat; animation:none;
  filter:drop-shadow(0 4px 8px rgba(0,0,0,.55)); }
body.k2kit #spPlay span { font-family:var(--fn); font-weight:900; font-size:clamp(20px,6.2vw,28px);
  letter-spacing:.08em; color:#4a2406; -webkit-text-fill-color:#4a2406; text-shadow:0 1px 0 rgba(255,240,190,.7); background:none; }
body.k2kit #spPlay:disabled { filter:grayscale(.65) brightness(.75) drop-shadow(0 4px 8px rgba(0,0,0,.55)); }
body.k2kit #spPlay:active { transform:scale(.96); }
body.k2kit #spSkip { margin-top:10px; font-family:var(--fn); font-size:11px; color:#b8ad96; }
body.k2kit #spPct { font-family:var(--fn); color:#d9c89c; }

/* K2 CINEMA: the hall's doors + entry/result panels. Everything here lives inside #stage,
   so it is sized in the stage's logical px and scales with it. */
#k2cine { position:absolute; inset:0; z-index:34; display:none; overflow:hidden; pointer-events:auto;
  -webkit-tap-highlight-color:transparent; touch-action:none; user-select:none; -webkit-user-select:none; }
#k2cine.on { display:block; }
#k2back { position:absolute; inset:0; background:rgba(2,6,16,0); }
#k2pwrap { position:absolute; inset:0; display:none; align-items:center; justify-content:center; }
#k2cine.panel #k2pwrap { display:flex; }
#k2panel { position:relative; width:min(calc(var(--W) * .92), 372px); box-sizing:border-box; opacity:0;
  border:44px solid transparent; border-width:44px 38px 50px 38px;
  border-image:url(assets/skin3/panel_frame.webp?v=9cc69f3f) 182 158 208 165 fill / 44px 38px 50px 38px / 0 stretch;
  padding:0 2px 4px; text-align:center; }
#k2art { margin:-18px auto 0; width:72%; aspect-ratio:1; }
#k2art img { width:100%; height:100%; display:block; }
#k2copy { display:flex; flex-direction:column; align-items:center; gap:3px; margin-top:-8px; }
#k2eyebrow { font:400 11px/1.2 var(--fd); letter-spacing:.14em; color:#a9ccff; text-shadow:0 1px 0 #06101f; }
#k2title { font:400 27px/1.05 var(--fd); color:#ffd66e; letter-spacing:.03em; white-space:nowrap;
  text-shadow:2px 3px 0 #5a2c06, 4px 5px 0 #140803; }
#k2panel[data-kind="entry"] #k2title { font-size:25px; }
#k2line { margin:3px 6px 0; font:900 13px/1.3 var(--fn); color:#e9ddc2; text-shadow:0 1px 0 #000; }
#k2value { margin-top:6px; font:400 34px/1 var(--fd); color:#fff1c8; font-variant-numeric:tabular-nums;
  text-shadow:2px 3px 0 #5a2c06, 4px 5px 0 #140803; }
#k2detail { font:900 10.5px/1.3 var(--fn); letter-spacing:.08em; color:#ffd66e; }
#k2cta { display:flex; align-items:center; justify-content:center; margin:14px auto 2px; width:84%;
  height:0; padding:0 0 calc(84% * .247); position:relative; border:0; border-radius:0; box-shadow:none;
  background:url(assets/skin3/cta_button.webp?v=c495f720) center/100% 100% no-repeat; transition:filter .35s ease; cursor:pointer; }
#k2cta span { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font:900 16px/1 var(--fn); letter-spacing:.08em; color:#4a2406; text-shadow:0 1px 0 rgba(255,240,190,.7); }
#k2cta:disabled { filter:grayscale(.85) brightness(.62); cursor:default; }
#k2cta:not(:disabled):active { transform:scale(.96); }
#k2fx { position:absolute; left:-38px; top:-44px; width:calc(100% + 76px); height:calc(100% + 94px); pointer-events:none; }
/* the doors: one painting, split on the lock; hinged in 3D; the lock turns between them */
#k2vault { position:absolute; inset:0; perspective:1400px; pointer-events:none; visibility:hidden; }
.k2door { position:absolute; top:0; height:100%; width:50%; background-color:#1b110a; background-repeat:no-repeat;
  backface-visibility:hidden; -webkit-backface-visibility:hidden; will-change:transform; }
.k2door.l { left:0; transform-origin:0 50%; transform:translateX(-103%); box-shadow:inset -2px 0 5px rgba(0,0,0,.6); }
.k2door.r { left:50%; transform-origin:100% 50%; transform:translateX(103%); box-shadow:inset 2px 0 5px rgba(0,0,0,.6); }
#k2seam { position:absolute; top:0; height:100%; left:calc(50% - 1.5px); width:3px; background:#fff8d0; opacity:0;
  box-shadow:0 0 26px 12px rgba(255,219,129,.6); }
#k2halo { position:absolute; inset:-15%; opacity:0;
  background:radial-gradient(ellipse at 50% 46%, rgba(255,242,186,.5), rgba(255,178,59,.13) 40%, transparent 65%); }
#k2wheel { position:absolute; opacity:0; transform:translate(-50%,-50%); }
#k2rotor { position:absolute; inset:0; border-radius:50%; box-shadow:0 6px 18px rgba(0,0,0,.55);
  background:url(assets/skin3/lock_wheel.webp?v=a7d20e31) center/100% 100% no-repeat; }
/* the name plaque and the bank plaque are BOARD-local (placed on L.grid by k2PlaceOnBoard) */
#k2call, #k2bank { position:absolute; z-index:33; pointer-events:none; text-align:center; transform:translate(-50%,-50%); }
#k2call > span { display:block; margin-bottom:2px; font:400 calc(var(--bw) * .046)/1.2 var(--fd); letter-spacing:.16em;
  color:#bfe0ff; text-shadow:0 2px 0 #06101f, 0 0 8px rgba(0,0,0,.9); }
.k2band { position:relative; width:100%; aspect-ratio:2686/969; display:flex; align-items:center; justify-content:center;
  background:url(assets/skin3/bigwin_band.webp?v=8e2f784e) center/100% 100% no-repeat; }
.k2band strong { margin-top:1%; font:400 calc(var(--bw) * .088)/1 var(--fd); color:#ffe08a; letter-spacing:.04em;
  white-space:nowrap; text-shadow:2px 3px 0 #5a1406, 4px 5px 0 #1c0603; }
#k2call > b, #k2bank > b { display:block; margin-top:1px; font:900 calc(var(--bw) * .046)/1.2 var(--fn); letter-spacing:.1em;
  color:#fff1c8; text-shadow:0 2px 0 #1a0c02, 0 0 6px rgba(0,0,0,.9); }
#k2bank .k2band strong { font-family:var(--fd); font-weight:400; font-size:calc(var(--bw) * .07); font-variant-numeric:tabular-nums; }
body.skin2 #bBal.k2glow span { color:#fff6d6; text-shadow:0 0 10px rgba(255,214,110,.9), 0 1px 0 #1a0c02; }
/* measuring pass: the panel is laid out (invisible) so the title can be fitted before it shows */
#k2cine.measure { display:block; visibility:hidden; }
#k2cine.measure #k2pwrap { display:flex; }
body:not(.portrait) #k2panel { width:min(calc(var(--W) * .9), 430px); }
body:not(.portrait) #k2title { font-size:30px; }
body:not(.portrait) #k2panel[data-kind="entry"] #k2title { font-size:28px; }
/* Big-win band: board-local, the tier word above, the count inside */
#k2big { position:absolute; z-index:33; pointer-events:none; text-align:center; transform:translate(-50%,-50%); }
#k2big .k2tier { display:block; margin-bottom:-3%; font:400 calc(var(--bw) * .13)/1 var(--fd); color:#ffe08a;
  letter-spacing:.05em; white-space:nowrap; text-shadow:2px 3px 0 #5a2c06, 4px 5px 0 #140803; }
#k2big .k2band strong { font-family:var(--fd); font-weight:400; font-size:calc(var(--bw) * .10); color:#fff6d6;
  font-variant-numeric:tabular-nums; }
/* Live 3D hammer: a transparent WebGL canvas over the plate, under every control */
#k2gl { position:absolute; left:0; top:0; z-index:2; pointer-events:none; display:none; }
/* The feature keeps sound, speed, menu and (as AUTO RESPINS) the auto socket */
body.skin2.inbonus #btnSound, body.skin2.inbonus #btnAuto, body.skin2.inbonus #btnTurbo,
body.skin2.inbonus #btnMenu { visibility:visible; pointer-events:auto; }
body.skin2.inbonus #btnHwAuto { display:none; }
/* SPIN never swaps its glyph: while the reels turn the arrows turn with them */
body.skin2 #btnSpin.stop #spinStop { opacity:0; }
body.skin2 #btnSpin.stop #spinArrows { opacity:1; animation:spinrot .7s linear infinite; }
/* BUY BONUS: the Mjölnir plaque (3.13:1), top-right; the words sit in its red field */
body.skin2 #btnBuy { height:calc(var(--k2-buy-w) * .3194) !important; justify-content:center;
  padding:0 calc(var(--k2-buy-w) * .12) 0 calc(var(--k2-buy-w) * .37) !important;
  background:url(assets/skin3/buy_plaque.webp?v=18ad0537) center/100% 100% no-repeat; }
body.skin2 #btnBuy em { width:100%; text-align:center; white-space:normal; line-height:1.04;
  font-size:calc(var(--k2-buy-w) * .082); letter-spacing:.06em; color:#ffeebb;
  text-shadow:0 2px 0 #3a0806, 0 0 6px rgba(0,0,0,.7); }
/* The static plate canvas sits under the live one */
#bgcv { position:absolute; left:0; top:0; width:100%; height:100%; display:none; }
/* BUY BONUS: the round Mjölnir medallion in the top-right corner, its words on a ribbon across its foot */
body.skin2 #btnBuy { width:var(--k2-buy-w) !important; height:calc(var(--k2-buy-w) * 1.12) !important; padding:0 !important;
  display:block; background:url(assets/skin3/buy_medal.webp?v=7c21b966) center top/100% auto no-repeat;
  filter:drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
body.skin2 #btnBuy em { position:absolute; left:50%; bottom:0; transform:translateX(-50%); width:auto; white-space:nowrap;
  padding:.3em .75em .34em; border-radius:999px; border:2px solid #e6bb5a;
  background:linear-gradient(180deg,#a61e25,#5c0b10); font-size:calc(var(--k2-buy-w) * .14); line-height:1;
  letter-spacing:.05em; color:#ffeebb; text-shadow:0 2px 0 #2a0404; box-shadow:0 3px 8px rgba(0,0,0,.55); }
/* SPLASH as one sequence (all one-shot) */
body.k2kit #spSkip { display:none !important; }
body.k2kit #spInner { opacity:1 !important; transform:scale(var(--spfit, 1)) !important; transform-origin:50% 50%; transition:none !important; }
.k2sheen { position:absolute; inset:0; pointer-events:none; opacity:0; mix-blend-mode:screen;
  background:linear-gradient(105deg, rgba(255,255,255,0) 38%, rgba(255,250,225,.9) 50%, rgba(255,255,255,0) 62%) 150% 0/250% 100% no-repeat;
  -webkit-mask-size:100% 100%; mask-size:100% 100%; -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; }
@keyframes k2sheen { 0% { opacity:1; background-position:150% 0; } 100% { opacity:1; background-position:-60% 0; } }
@keyframes k2rise { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
body.k2kit #spLogo { overflow:visible; animation:k2logoIn .95s cubic-bezier(.2,.9,.25,1.12) .15s both; }
@keyframes k2logoIn { 0% { opacity:0; transform:translateY(-26px) scale(.88); }
  70% { opacity:1; transform:translateY(0) scale(1.03); } 100% { opacity:1; transform:none; } }
body.k2kit #spLogo .k2sheen { animation:k2sheen 1.15s ease-in-out 1.2s 1 both; }
body.k2kit #spCard { animation:k2cardIn .85s cubic-bezier(.16,.8,.23,1) .5s both; }
@keyframes k2cardIn { from { opacity:0; transform:translateY(46px) scale(.95); } to { opacity:1; transform:none; } }
body.k2kit #spWinUp { animation:k2rise .6s ease-out .9s both; }
/* the three coins: centred on the card, flipped in one after another */
body.k2kit #spRibbon { display:grid !important; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; width:100%; }
body.k2kit .spCell { width:auto !important; min-width:0; opacity:1 !important; transform:none !important; animation:none !important; }
body.k2kit .spCell .k2face { perspective:520px; }
body.k2kit .spCell .k2face img { animation:k2flip .85s cubic-bezier(.2,.9,.3,1.18) both; backface-visibility:hidden; }
body.k2kit .spCell .k2face b, body.k2kit .spCell i { animation:k2rise .35s ease-out both; }
body.k2kit .spCell .k2face .k2sheen { animation:k2sheen .9s ease-in-out both; }
body.k2kit #spC1 .k2face img { animation-delay:1.05s; } body.k2kit #spC2 .k2face img { animation-delay:1.25s; } body.k2kit #spC3 .k2face img { animation-delay:1.45s; }
body.k2kit #spC1 .k2face b, body.k2kit #spC1 i { animation-delay:1.55s; } body.k2kit #spC2 i { animation-delay:1.75s; } body.k2kit #spC3 i { animation-delay:1.95s; }
body.k2kit #spC1 .k2sheen { animation-delay:2.1s; } body.k2kit #spC2 .k2sheen { animation-delay:2.3s; } body.k2kit #spC3 .k2sheen { animation-delay:2.5s; }
@keyframes k2flip { 0% { opacity:0; transform:rotateY(95deg) scale(.7); } 60% { opacity:1; transform:rotateY(-14deg) scale(1.05); }
  100% { opacity:1; transform:none; } }
body.k2kit #spSub { animation:k2rise .6s ease-out 1.8s both; }
/* PLAY: dimmed while the game loads, then it wakes with a pop and one sheen */
body.k2kit #spPlay { position:relative; opacity:.5; transform:scale(.96); transition:opacity .35s ease, transform .35s ease; }
body.k2kit #spPlay.ready { opacity:1; transform:none; animation:k2playIn .65s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes k2playIn { 0% { transform:scale(.92); } 60% { transform:scale(1.05); } 100% { transform:scale(1); } }
body.k2kit #spPlay.ready .k2sheen { animation:k2sheen 1s ease-in-out .4s 1 both; }
/* the storm strikes twice behind the card, with the clouds lit round the bolt */
body.k2kit .k2sbolt { position:absolute; top:-3%; height:58vh; width:auto; opacity:0; z-index:1; pointer-events:none; mix-blend-mode:screen; }
body.k2kit .k2sbolt.b1 { left:4%; animation:k2strike .62s linear 1.75s 1 both; }
body.k2kit .k2sbolt.b2 { right:3%; transform:scaleX(-1); animation:k2strike .62s linear 4.2s 1 both; }
@keyframes k2strike { 0% { opacity:0; } 8% { opacity:1; } 16% { opacity:.25; } 26% { opacity:1; } 100% { opacity:0; } }
body.k2kit #spBg::before { content:''; position:absolute; inset:0; z-index:1; opacity:0; pointer-events:none;
  background:radial-gradient(55% 42% at 16% 8%, rgba(190,220,255,.4), transparent 70%),
             radial-gradient(55% 42% at 86% 8%, rgba(190,220,255,.4), transparent 70%);
  animation:k2flash 3.1s linear 1.75s 1 both; }
@keyframes k2flash { 0% { opacity:0; } 2% { opacity:.9; } 4% { opacity:.2; } 7% { opacity:.7; } 18% { opacity:0; }
  80% { opacity:0; } 82% { opacity:.8; } 84% { opacity:.2; } 87% { opacity:.6; } 100% { opacity:0; } }
body.k2kit #spInner { z-index:2; }
/* the way out: the card lifts a little as the screen fades */
body.k2kit #splash.out #spCard, body.k2kit #splash.out #spLogo { animation:none; opacity:1; transition:transform .5s ease; transform:translateY(-12px) scale(1.03); }
/* K2 PANELS: menu, autoplay, buy, rules, provably fair */
body.skin2 #panelWrap, body.skin2 #popWrap { background:rgba(2,10,20,.76); }
body.skin2 #panel.k2p, body.skin2 #pop.k2p {
  position:relative; box-sizing:border-box; width:min(calc(var(--W) * .92), 380px); min-width:0; max-width:none;
  height:auto; max-height:calc(var(--H) * .92); margin:0; border-radius:0; box-shadow:none; background:none; color:#e9ddc2;
  overflow:visible; padding:2px 4px 6px; text-align:center;
  border:44px solid transparent; border-width:44px 38px 50px 38px;
  border-image:url(assets/skin3/panel_frame.webp?v=9cc69f3f) 182 158 208 165 fill / 44px 38px 50px 38px / 0 stretch; }
body.skin2:not(.portrait) #panel.k2p, body.skin2:not(.portrait) #pop.k2p { width:min(calc(var(--W) * .5), 440px); }
body.skin2 #pop.k2p { display:flex; flex-direction:column; }
body.skin2 #pop.k2p #popBody { overflow-y:auto; max-height:calc(var(--H) * .92 - 110px); -webkit-overflow-scrolling:touch;
  padding:0 4px; scrollbar-width:thin; scrollbar-color:#bd8a40 transparent; }
body.skin2 #panel.k2p #panelX, body.skin2 #pop.k2p #popX {
  position:absolute; right:-26px; top:-30px; width:38px; height:38px; border-radius:50%; padding:0 0 2px; margin:0;
  display:flex; align-items:center; justify-content:center; opacity:1; z-index:5;
  border:2px solid #e6bb5a; background:radial-gradient(circle at 50% 34%, #243a58, #071925); color:#ffe9b0 !important;
  font:900 22px/1 var(--fn); box-shadow:0 3px 8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,236,180,.25); }
body.skin2 #panel.k2p h2.k2h, body.skin2 #pop.k2p h2.k2h { display:block; margin:-4px 0 12px; padding:0; width:auto; background:none; filter:none;
  font:400 26px/1.1 var(--fd); letter-spacing:.06em; text-align:center; color:#ffd66e; -webkit-text-fill-color:#ffd66e; max-width:none; box-sizing:border-box; aspect-ratio:auto; min-height:0;
  text-shadow:2px 3px 0 #5a2c06, 4px 5px 0 #140803; }
body.skin2 .k2p .k2h3 { margin:16px 0 8px; font:400 17px/1.1 var(--fd); letter-spacing:.08em; color:#ffd66e;
  text-shadow:1px 2px 0 #5a2c06; }
body.skin2 .k2p .k2sub, body.skin2 .k2p .k2lab { margin:10px 0 5px; font:400 11px/1.2 var(--fd); letter-spacing:.16em; color:#a9ccff; }
body.skin2 .k2p .k2sub { margin-top:0; }
body.skin2 .k2p .k2note { margin:12px 4px 0; font:900 11.5px/1.45 var(--fn); color:#c9bb9a; }
body.skin2 .k2p .k2line { margin:10px 0 0; font:900 13px/1.3 var(--fn); color:#f1e4c6; }
body.skin2 .k2p .k2p1 { margin:6px 2px; font:700 13px/1.5 var(--fn); color:#e3d6b8; text-align:center; }
body.skin2 .k2p .k2p1 b { color:#ffd66e; font-weight:900; }
/* rows (menu) */
body.skin2 .k2p .k2row { display:flex; align-items:center; gap:12px; width:100%; height:54px; margin:10px 0 0; padding:0 14px;
  border:1.5px solid #bd8a40; border-radius:10px; background:linear-gradient(180deg,#132b44,#071925); color:#f4e6c4;
  font:400 17px/1 var(--fd); letter-spacing:.04em; text-align:left; cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,236,180,.14), 0 3px 8px rgba(0,0,0,.45); transition:transform .12s, border-color .12s; }
body.skin2 .k2p .k2row:active { transform:translateY(1px) scale(.99); border-color:#ffdf87; }
body.skin2 .k2p .k2row i { width:26px; height:26px; flex:none; color:#ffd66e; }
body.skin2 .k2p .k2row i svg { width:100%; height:100%; display:block; }
body.skin2 .k2p .k2row span { flex:1; }
body.skin2 .k2p .k2row b { color:#ffd66e; font:900 26px/1 var(--fn); }
/* tiles (autoplay) */
body.skin2 .k2p .k2tiles { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:9px; }
body.skin2 .k2p .k2tile { height:58px; min-width:0; border:1.5px solid #bd8a40; border-radius:10px; cursor:pointer;
  background:linear-gradient(180deg,#132b44,#071925); color:#ffe9b0; font:900 24px/1 var(--fn); font-variant-numeric:tabular-nums;
  box-shadow:inset 0 1px 0 rgba(255,236,180,.14), 0 3px 8px rgba(0,0,0,.45); transition:transform .12s; }
body.skin2 .k2p .k2tile:active { transform:scale(.95); background:linear-gradient(#f2d084,#c58a37 70%,#895016); color:#38230d; border-color:#ffdf94; }
/* buy: three tier cards with their collectors */
body.skin2 .k2p .k2tiers { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; margin:0 auto 2px; max-width:72%; }   /* two buy tiers, centred */
body.skin2 .k2p #buyTiers .k2tier, body.skin2 .k2p #buyTiers .k2tier:not(.on) {
  display:flex; flex-direction:column; align-items:center; gap:3px; min-width:0; height:auto; padding:8px 2px 9px; margin:0;
  border:1.5px solid #6e5428 !important; border-radius:12px; cursor:pointer; opacity:1; filter:none;
  background:linear-gradient(180deg,#132b44,#071925) !important; color:#e9ddc2 !important;
  box-shadow:0 3px 8px rgba(0,0,0,.45) !important; transition:transform .18s, border-color .18s, box-shadow .18s; }
body.skin2 .k2p #buyTiers .k2tier.on { border-color:#ffdf87 !important; transform:translateY(-3px);
  box-shadow:0 0 0 2px rgba(255,214,110,.35), 0 0 18px rgba(255,200,90,.35), 0 6px 12px rgba(0,0,0,.5) !important; }
body.skin2 .k2p .k2tier .ti { position:relative; display:block; width:62px; height:50px; }
body.skin2 .k2p .k2tier .ti img { position:absolute; top:0; left:50%; width:50px; height:50px; margin-left:-25px; }
body.skin2 .k2p .k2tier .ti.two img:first-child { margin-left:-33px; } body.skin2 .k2p .k2tier .ti.two img:last-child { margin-left:-17px; }
body.skin2 .k2p .k2tier b { font:400 15px/1.1 var(--fd); letter-spacing:.06em; color:#ffd66e; }
body.skin2 .k2p .k2tier small { font:900 12px/1 var(--fn); color:#fff1c8; opacity:1; }
body.skin2 .k2p .k2plaque { display:inline-block; min-width:140px; margin:0 auto; padding:8px 14px; border:1.5px solid #d8b25a;
  border-radius:10px; background:linear-gradient(180deg,#3d0b10,#1f0507); box-shadow:inset 0 1px 0 rgba(255,220,160,.18); }
body.skin2 .k2p .k2plaque em { font:900 20px/1 var(--fn); font-style:normal; color:#fff1c8; font-variant-numeric:tabular-nums;
  text-shadow:0 2px 0 #140803; }
body.skin2 .k2p .k2plaque.big { min-width:200px; } body.skin2 .k2p .k2plaque.big em { font-size:28px; color:#ffe39a; }
body.skin2 .k2p .k2betrow { display:flex; align-items:center; justify-content:center; gap:12px; }
body.skin2 .k2p .k2round { width:42px; height:42px; border-radius:50%; padding:0 0 3px; flex:none; cursor:pointer;
  border:2px solid #ffdf94; background:linear-gradient(#f2d084,#c58a37 70%,#895016); color:#38230d; font:900 26px/1 var(--fn);
  box-shadow:inset 0 0 0 2px #936024, 0 4px 8px rgba(0,0,0,.5); }
body.skin2 .k2p .k2round:active { transform:scale(.93); }
body.skin2 .k2p .k2btns { display:grid; grid-template-columns:1fr 1.45fr; gap:10px; align-items:center; margin-top:16px; }
body.skin2 .k2p .k2btns.one { grid-template-columns:1fr; width:84%; margin-left:auto; margin-right:auto; }
body.skin2 .k2p .k2ghost { height:48px; border:1.5px solid #bd8a40; border-radius:10px; cursor:pointer;
  background:linear-gradient(180deg,#132b44,#071925); color:#e9ddc2; font:900 14px/1 var(--fn); letter-spacing:.1em; }
body.skin2 .k2p .k2go { position:relative; width:100%; aspect-ratio:4.054; height:auto; border:0; padding:0; cursor:pointer;
  background:url(assets/skin3/cta_button.webp?v=c495f720) center/100% 100% no-repeat; filter:drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
body.skin2 .k2p .k2go span { font:900 17px/1 var(--fn); letter-spacing:.08em; color:#4a2406; text-shadow:0 1px 0 rgba(255,240,190,.7); }
body.skin2 .k2p .k2go:disabled { filter:grayscale(.85) brightness(.6); cursor:default; }
body.skin2 .k2p .k2go:not(:disabled):active, body.skin2 .k2p .k2ghost:active { transform:scale(.96); }
/* rules */
body.skin2 .k2p .k2paygrid { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; margin:8px 0 2px; }
body.skin2 .k2p .k2pay { display:flex; flex-direction:column; align-items:center; gap:2px; padding:7px 2px 8px;
  border:1px solid rgba(189,138,64,.7); border-radius:10px; background:linear-gradient(180deg,#132b44,#071925); }
body.skin2 .k2p .k2pay img { width:52px; height:52px; }
body.skin2 .k2p .k2pay b { font:900 16px/1 var(--fn); color:#ffe39a; font-variant-numeric:tabular-nums; }
body.skin2 .k2p .k2pay small { font:400 9.5px/1.1 var(--fd); letter-spacing:.08em; color:#a9ccff; }
body.skin2 .k2p .k2feat { display:flex; align-items:center; gap:10px; margin:6px 0; text-align:left; }
body.skin2 .k2p .k2feat img { width:52px; height:52px; flex:none; }
body.skin2 .k2p .k2feat p { margin:0; font:700 13px/1.45 var(--fn); color:#e3d6b8; }
body.skin2 .k2p .k2feat p b { color:#ffd66e; font-weight:900; }
body.skin2 .k2p .k2jps { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:6px; }
body.skin2 .k2p .k2jps div { display:flex; flex-direction:column; align-items:center; gap:2px; }
body.skin2 .k2p .k2jps img { width:58px; height:58px; }
body.skin2 .k2p .k2jps b { font:900 14px/1 var(--fn); color:#ffe39a; }
/* the RTP of every way to play: the name on the left, the certified figure on the right */
body.skin2 .k2p table.rtp { width:100%; margin:2px 0 6px; border-collapse:collapse; font:700 13px/1.4 var(--fn); color:#e3d6b8; }
body.skin2 .k2p table.rtp td { padding:6px 4px; border-bottom:1px solid rgba(189,138,64,.45); text-align:left; }
body.skin2 .k2p table.rtp td + td { text-align:right; white-space:nowrap; font-weight:900; color:#ffd66e; font-variant-numeric:tabular-nums; }
body.skin2 .k2p .k2p1.legal { margin-top:10px; font-size:12px; color:#c9bb9a; }
body.skin2 .k2p .k2code { margin:0 auto 2px; padding:7px 10px; border:1px solid rgba(189,138,64,.7); border-radius:8px;
  background:#050f1a; font:600 11px/1.4 ui-monospace, Menlo, monospace; color:#e9ddc2; word-break:break-all; text-align:left; }
body.skin2 .k2p .k2out:empty { display:none; }
body.skin2 .k2p .k2out { margin-top:12px; font:600 11px/1.45 ui-monospace, Menlo, monospace; color:#e9ddc2; word-break:break-all; text-align:left; }
body.skin2 .k2p .k2out code { background:none; padding:0; color:#ffe39a; }
/* Frames, bands and gold buttons are drawn into a canvas by k2PaintArt; once painted, the CSS art is switched off */
canvas.k2art { position:absolute; pointer-events:none; z-index:0; }
#k2panel.k2painted, #panel.k2p.k2painted, #pop.k2p.k2painted, body.k2kit #spCard.k2painted { border-image:none !important; border-color:transparent !important; }
.k2band.k2painted, #k2cta.k2painted, .k2go.k2painted, .k2ghost.k2painted { background:none !important; }
#k2panel > *:not(canvas), #panel.k2p > *:not(canvas), #pop.k2p > *:not(canvas), #spCard > *:not(canvas), .k2band > strong, .k2go > span, .k2ghost > span { position:relative; z-index:1; }
#k2cta > span { z-index:1; }
#panel.k2p > #panelX, #pop.k2p > #popX { position:absolute; z-index:5; }
/* the name plaque carries its own dusk, so its words never float over the reels */
#k2call { padding:14px 0 12px; }
#k2call::before { content:''; position:absolute; left:-8%; right:-8%; top:-18%; bottom:-22%; z-index:-1; border-radius:40%;
  background:radial-gradient(ellipse at center, rgba(3,8,20,.86) 0%, rgba(3,8,20,.62) 45%, rgba(3,8,20,0) 72%); }

/* BRIGHT ASGARD skin: a light sky, the navy dock, white frosted glass. The plate paints the glass;
   these rules only place the live parts on it. body.asg is set by sk2Boot when the kit's geometry carries a capsule. */
/* SPIN: the orange jewel is a DOM disc; its two arrows turn on their own (slowly at rest, fast while the reels run) */
body.skin2.asg #btnSpin { background:url(assets/skin3/spin_disc.webp?v=0c1049f6) center/100% auto no-repeat; box-shadow:none; }
body.skin2.asg #spinHalf { display:none; }
body.skin2.asg #spinArrows { inset:8.3%; width:83.4%; height:83.4%;
  background:url(assets/skin3/spin_arrows.webp?v=1f67935a) center/100% 100% no-repeat; animation:spinrot 9s linear infinite; }
body.skin2.asg #btnSpin.stop #spinArrows { animation:spinrot .8s linear infinite; }
body.skin2.asg #spinTxt { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:none;
  font:900 calc(var(--k2-spin-d) * .22)/1 var(--fn); letter-spacing:.02em; color:#fff;
  -webkit-text-stroke:calc(var(--k2-spin-d) * .04) #a3400a; paint-order:stroke fill; }
#spinTxt { display:none; }
body.skin2.asg #spinTxt { display:flex; }
body.skin2.asg #btnSpin.counting #spinTxt, body.skin2.asg #btnSpin.respin #spinTxt { display:none; }
body.skin2.asg #btnSpin.counting #spinArrows, body.skin2.asg #btnSpin.respin #spinArrows { opacity:.55; }
body.skin2.asg #btnSpin.respin #spinN, body.skin2.asg #btnSpin.counting #spinN { color:#fff; font-family:var(--fn);
  -webkit-text-stroke:calc(var(--k2-spin-d) * .05) #a3400a; paint-order:stroke fill; text-shadow:none; }
body.skin2.asg #btnSpin.respin #spinN { font-size:calc(var(--k2-spin-d) * .40); }
body.skin2.asg #btnSpin.counting #spinN { font-size:calc(var(--k2-spin-d) * .30); }
/* the four glass buttons: white glyphs on painted glass */
body.skin2.asg .rbtn svg { inset:26%; width:48%; height:48%; filter:drop-shadow(0 1px 1px rgba(10,30,80,.6)); }
body.skin2.asg .rbtn svg g { stroke:#fff; }
body.skin2.asg .rbtn svg [fill="#ffe0a0"] { fill:#fff; }
/* No ring on active speed / auto: the glyph itself shows the state */
body.skin2.asg #btnAuto.on, body.skin2.asg #btnTurbo.on, body.skin2.asg #btnTurbo.fast { box-shadow:none; filter:none; }
body.skin2.asg #btnTurbo.fast .spd1, body.skin2.asg #btnTurbo.on .spd1, body.skin2.asg #btnTurbo.on .spd2 { fill:#fff; stroke:#fff; }
/* − and + in the capsule's wings, level with SPIN */
body.skin2.asg #btnMinus, body.skin2.asg #btnPlus { position:absolute; margin:0; padding:0; border:0; background:none; box-shadow:none;
  top:var(--k2-minus-y); width:var(--k2-minus-d); height:var(--k2-minus-d); color:#fff;
  filter:drop-shadow(0 1px 2px rgba(20,40,90,.7)); }
body.skin2.asg #btnMinus { left:var(--k2-minus-x); }
body.skin2.asg #btnPlus { left:var(--k2-plus-x); top:var(--k2-plus-y); }
body.skin2.asg #btnMinus svg, body.skin2.asg #btnPlus svg { width:62%; height:62%; margin:19%; }
body.skin2.asg #btnMinus svg g, body.skin2.asg #btnPlus svg g { stroke-width:7; }
body.skin2.asg #btnMinus:disabled, body.skin2.asg #btnPlus:disabled { opacity:.35; }
/* BALANCE | BET on the glass bar */
body.skin2.asg .bcell b { font-family:var(--fn); font-weight:900; color:#a9c3f0; text-shadow:none; letter-spacing:.08em; }
body.skin2.asg .bcell span { color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.4); }
body.skin2.asg #bBal b, body.skin2.asg #bBet b { font-size:calc(var(--k2-bet-h) * .215); }
body.skin2.asg #bBal span, body.skin2.asg #bBet span { font-size:calc(var(--k2-bet-h) * .39); }
/* the message pill: WIN 12.50 — or, idle, the game's promise */
body.skin2.asg #bLastWin { gap:.4em; }
body.skin2.asg #bLastWin b { font-size:calc(var(--k2-win-h) * .48); color:#e6eeff; letter-spacing:.06em; }
body.skin2.asg #bLastWin span { font-size:calc(var(--k2-win-h) * .62); color:#ffc94a; }
#lwIdle { display:none; }
body.skin2.asg #bLastWin.idle b, body.skin2.asg #bLastWin.idle span { display:none; }
body.skin2.asg #bLastWin.idle #lwIdle { display:block; font:900 calc(var(--k2-win-h) * .48)/1 var(--fn); font-style:normal;
  letter-spacing:.06em; color:#e6eeff; white-space:nowrap; }
body.skin2.asg #lwIdle em { font-style:normal; color:#ffc94a; }
/* BUY BONUS: the gold cart plaque in the top-right corner, words in its right-hand field */
body.skin2.asg #btnBuy { width:var(--k2-buy-w) !important; height:calc(var(--k2-buy-w) * .397) !important; padding:0 !important;
  display:block; background:url(assets/skin3/buy_asg.webp?v=d92bd4b4) center/100% 100% no-repeat !important;
  filter:drop-shadow(0 6px 10px rgba(80,50,0,.35)); }
body.skin2.asg #btnBuy em { position:absolute; left:34%; right:6%; top:0; bottom:0; transform:none; width:auto; display:flex;
  align-items:center; justify-content:center; text-align:center; white-space:normal; padding:0; border:0; border-radius:0;
  background:none; box-shadow:none; font:900 calc(var(--k2-buy-w) * .109)/1.02 var(--fn); letter-spacing:.03em;
  color:#5a2a05; text-shadow:0 1px 0 rgba(255,245,210,.8); }
/* ODIN'S RAVENS: BUY sits under SPIN in the order of attention (a muted, darker gold; slot-visual-hierarchy G4) */
/* ODIN'S RAVENS: the SPIN arrows stand still at rest (an endless idle turn keeps the phone busy); they turn while spinning */
body.skin2.asg.odin #spinArrows { animation:none; }
/* ODIN'S RAVENS: every panel control at least 44 screen px whatever the stage scale (--touch = 44 / stage scale) */
body.skin2.odin .k2p .k2round { width:max(42px, var(--touch, 44px)); height:max(42px, var(--touch, 44px)); }
body.skin2.odin #panel.k2p #panelX, body.skin2.odin #pop.k2p #popX { width:max(38px, var(--touch, 44px)); height:max(38px, var(--touch, 44px));
  right:calc(-1 * max(26px, var(--touch, 44px) * .68)); top:calc(-1 * max(30px, var(--touch, 44px) * .78)); }
body.skin2.odin .k2p .k2go { min-height:var(--touch, 44px); }
body.skin2.odin .k2p .k2ghost { height:max(48px, var(--touch, 44px)); }
body.skin2.asg.odin #btnBuy { filter:saturate(.55) brightness(.8) drop-shadow(0 4px 8px rgba(40,20,0,.35)); }
body.skin2.asg.odin #btnBuy:active, body.skin2.asg.odin #btnBuy.pressed { filter:saturate(.7) brightness(.95) drop-shadow(0 2px 4px rgba(0,0,0,.45)); }
body.portrait.skin2.asg.odin #btnBuy { filter:saturate(.5) brightness(.72) drop-shadow(0 3px 6px rgba(20,10,0,.4)); }   /* over the dark room top */
/* SPIN keeps one warm glow of its own at rest (static: no infinite animation heating the phone) */
body.skin2.asg.odin #btnSpin { filter:drop-shadow(0 0 10px rgba(255,170,50,.6)); }
body.skin2.asg #btnMinus svg, body.skin2.asg #btnPlus svg { display:block; }

/* BRIGHT ASGARD: panels, gates, plaques */
body.asg #k2panel, body.skin2.asg #panel.k2p, body.skin2.asg #pop.k2p { border-width:58px 29px 32px 29px; }
body.skin2.asg #panel.k2p h2.k2h, body.skin2.asg #pop.k2p h2.k2h, body.asg #k2title {
  font-family:var(--fd); font-weight:400; letter-spacing:.03em; color:#ffd66e; -webkit-text-fill-color:#ffd66e;
  -webkit-text-stroke:0; text-shadow:0 2px 0 #10265e, 0 3px 0 #0a1a45, 0 0 12px rgba(80,150,255,.35); }
body.asg #k2eyebrow, body.skin2.asg .k2p .k2sub, body.skin2.asg .k2p .k2lab { font-family:var(--fn); font-weight:900; color:#9fd0ff; letter-spacing:.14em; }
body.asg #k2value { text-shadow:0 2px 0 #10265e, 0 3px 0 #0a1a45; }
body.asg #k2detail { color:#ffd66e; }
body.asg .k2band strong, body.asg #k2big .k2tier { font-family:var(--fd); font-weight:400; letter-spacing:.04em; color:#fff3c4;
  text-shadow:0 2px 0 #0b2a74, 0 3px 0 #061a4a; }
body.asg #k2big .k2tier { color:#ffd66e; text-shadow:0 3px 0 #0b2a74, 0 5px 0 #061a4a, 0 0 18px rgba(255,210,110,.5); }
body.asg .k2band { aspect-ratio:3.92; }
body.asg #k2cta span, body.skin2.asg .k2p .k2go span { color:#fff; text-shadow:0 2px 0 #8a3208, 0 0 6px rgba(120,40,0,.5); }
body.asg #k2rotor { box-shadow:none; }
body.asg .k2door { background-color:#e8c877; }
body.skin2.asg .k2p .k2row, body.skin2.asg .k2p .k2tile, body.skin2.asg .k2p .k2ghost, body.skin2.asg .k2p .k2pay,
body.skin2.asg .k2p #buyTiers .k2tier, body.skin2.asg .k2p #buyTiers .k2tier:not(.on) {
  background:linear-gradient(180deg,#2c55a8,#16306f) !important; border-color:rgba(255,214,120,.75) !important; }
body.skin2.asg .k2p .k2plaque { background:linear-gradient(180deg,#0c1e4d,#081536); border-color:#e6bb5a; }
body.skin2.asg #panelWrap, body.skin2.asg #popWrap { background:rgba(8,20,52,.62); }
body.skin2.asg #panel.k2p #panelX, body.skin2.asg #pop.k2p #popX { top:-6px; right:-12px;
  background:radial-gradient(circle at 50% 34%, #3a6fd0, #10265e); }
body.k2kit #spCard { border-width:58px 29px 32px 29px; }
body.k2kit #spCard, body.k2kit #spWinUp, body.k2kit .spCell i { font-family:var(--fn); font-weight:900; }
body.asg #k2art { width:62%; margin-top:-10px; }
body.asg #k2copy { margin-top:4px; }

/* iOS Safari centres a button's content and also applies the child's margin, which shifted the glyph right;
   placed absolutely it cannot */
body.skin2.asg #btnMinus svg, body.skin2.asg #btnPlus svg { position:absolute; left:16%; top:16%; width:68%; height:68%; margin:0; }
/* PLAY: the word is white on the jewel, like SPIN */
body.k2kit #spPlay span { color:#fff; -webkit-text-fill-color:#fff; -webkit-text-stroke:3px #a3400a; paint-order:stroke fill;
  text-shadow:0 2px 6px rgba(120,40,0,.45); letter-spacing:.1em; }
body.k2kit #spPlay:not(.ready) { opacity:.72; }
body.k2kit #spPlay:not(.ready) span { opacity:.8; }

/* The 3D Mjölnir sits between the painted plate and the live canvas: negative z-index inside #stage's own
   stacking context (it is transformed), so every control keeps its place and its taps */
body.asg #bgcv { z-index:-2; }
#k3gl { position:absolute; left:0; top:0; z-index:-1; pointer-events:none; display:none; }
/* the shake uncovers the page for a moment: sky above, the dock's navy below — never a black bar */
body.asg { background:linear-gradient(#cfe3f7 0 50%, #0c1c42 50% 100%); }

/* PLAY while loading: in colour, saying LOADING with a slow breath — never the grey of a dead button */
body.k2kit #spPlay:disabled { filter:drop-shadow(0 4px 8px rgba(0,0,0,.35)); opacity:.92 !important; }
body.k2kit #spPlay:disabled span { animation:k2loadBreath 1.3s ease-in-out infinite; letter-spacing:.14em; }
@keyframes k2loadBreath { 0%,100% { opacity:.55; } 50% { opacity:1; } }
body.k2kit #spPlay.ready span { animation:none; }
/* BONUS GAME, BIG WIN and the bank never float over the reels: they sit on their own glass plate */
body.asg #k2call, body.asg #k2big, body.asg #k2bank { padding:12px 12px 10px; border-radius:22px;
  background:linear-gradient(180deg, rgba(16,38,98,.93), rgba(8,18,58,.95));
  box-shadow:0 12px 34px rgba(4,10,34,.6), inset 0 0 0 1.5px rgba(255,214,120,.6), inset 0 2px 0 rgba(255,255,255,.22); }
body.asg #k2call::before { display:none; }
body.asg #k2call > span { font-size:calc(var(--bw) * .052); color:#bfe0ff; text-shadow:0 2px 0 #06101f; margin-bottom:6px; }
body.asg #k2call > b, body.asg #k2bank > b { font-size:calc(var(--bw) * .05); color:#ffe39a; margin-top:6px; text-shadow:0 2px 0 #06101f; }

/* Portrait dock: WIN is the middle cell of the bar */
body.skin2.asg.portrait #bLastWin { flex-direction:column; gap:0; }
body.skin2.asg.portrait #bLastWin b { font-size:calc(var(--k2-win-h) * .205); color:#a9c3f0; letter-spacing:.08em; }
body.skin2.asg.portrait #bLastWin span { font-size:calc(var(--k2-win-h) * .36); color:#ffc94a; }
body.skin2.asg.portrait #bLastWin.idle #lwIdle { display:flex; flex-direction:column; align-items:center; gap:1px;
  font-size:calc(var(--k2-win-h) * .19); letter-spacing:.07em; color:#a9c3f0; white-space:nowrap; }
body.skin2.asg.portrait #lwIdle em { font-size:calc(var(--k2-win-h) * .34); color:#ffc94a; }
body.skin2.asg.portrait #lwIdle .yb { display:none; }
body.skin2.asg #bBal b, body.skin2.asg #bBet b { font-size:calc(var(--k2-bet-h) * .205); }
body.skin2.asg #bBal span, body.skin2.asg #bBet span { font-size:calc(var(--k2-bet-h) * .36); }
/* The painted glass disc sits 6 px of 200 (3 %) below the centre of its 200x209 tile, which the button box
   is centred on: the glyphs move down onto the glass */
body.skin2.asg .rbtn svg { inset:28% 25% 22%; width:50%; height:50%; }
body.skin2.asg.portrait #bLastWin.idle #lwIdle span:not(.yb) { display:block !important; }
body.asg .k2band { aspect-ratio:3.91; }
body.asg .k2band strong { white-space:nowrap; margin-top:0; }
body.asg #k2call > b { white-space:nowrap; font-size:calc(var(--bw) * .042); }
body.skin2.asg:not(.portrait) #bLastWin.idle #lwIdle span:not(.yb) { display:inline !important; }

/* The band's enamel is centred at 57.5 % of its height (the ornaments reach higher than lower): the words move down onto it */
body.asg .k2band strong { margin-top:calc(var(--bw) * .04); }

/* 4th speed, LIGHTNING: a bolt in place of the chevrons */
#btnTurbo .spdF { display:none; }
#btnTurbo.flash .spd1, #btnTurbo.flash .spd2 { display:none; }
#btnTurbo.flash .spdF { display:inline; fill:#ffd84a; stroke:#ffd84a; stroke-width:1.6; }

/* ===== ODIN'S RAVENS cabinet (layout/ravcab.js, concept C): the controls wear the cabinet's own parts ===== */
/* SPIN: the gold raven coin (its word and arrows are part of the art), one warm glow of its own */
body.skin2.asg.odin #btnSpin { background:url(assets/skin3/cab/spin.webp?v=b7bd2e74) center/100% 100% no-repeat !important;
  filter:drop-shadow(0 0 10px rgba(255,176,60,.55)) drop-shadow(0 3px 6px rgba(20,8,0,.45)); }
body.skin2.asg.odin #btnSpin:active, body.skin2.asg.odin #btnSpin.pressed { background-image:url(assets/skin3/cab/spin_down.webp?v=b4911747) !important; }
body.skin2.asg.odin #spinArrows, body.skin2.asg.odin #spinTxt { display:none !important; }
/* spinning: the coin dims a little under the stop mark; respins and counts: a dark disc over the coin's word */
body.skin2.asg.odin #btnSpin.stop { filter:brightness(.82) drop-shadow(0 3px 6px rgba(20,8,0,.45)); }
body.skin2.asg.odin #btnSpin.stop #spinStop { opacity:1; width:30%; height:30%; margin:0; left:35%; top:35%; border-radius:6px;
  background:rgba(30,14,40,.86); box-shadow:0 0 0 2px rgba(255,214,140,.7); }
body.skin2.asg.odin #btnSpin.respin, body.skin2.asg.odin #btnSpin.counting {
  background:radial-gradient(circle, rgba(32,14,44,.94) 0 50%, rgba(32,14,44,0) 51%), url(assets/skin3/cab/spin_down.webp?v=b4911747) center/100% 100% no-repeat !important; }
/* the small discs: one family, their icons are part of the art */
body.skin2.asg.odin .rbtn { background:center/100% 100% no-repeat !important; border:0 !important; box-shadow:none !important; }
body.skin2.asg.odin .rbtn svg { display:none !important; }
body.skin2.asg.odin #btnMenu { background-image:url(assets/skin3/cab/btn_menu.webp?v=9aaf7f03) !important; }
body.skin2.asg.odin #btnSound { background-image:url(assets/skin3/cab/btn_sound.webp?v=8dea3c9f) !important; }
body.skin2.asg.odin #btnSound.off { background-image:url(assets/skin3/cab/btn_mute.webp?v=d6f0d44a) !important; }
body.skin2.asg.odin #btnAuto { background-image:url(assets/skin3/cab/btn_auto.webp?v=d155dac8) !important; }
/* the speed reads on the disc: three triangles, as many lit as the speed (x3 in gold); no pill, no halo */
body.skin2.asg.odin #btnTurbo { background-image:url(assets/skin3/cab/speed_1.webp?v=98bc6633) !important; }
body.skin2.asg.odin #btnTurbo.fast { background-image:url(assets/skin3/cab/speed_2.webp?v=6a397e9d) !important; }
body.skin2.asg.odin #btnTurbo.on { background-image:url(assets/skin3/cab/speed_3.webp?v=58f67eca) !important; }
body.skin2.asg.odin #btnAuto.on {
  filter:brightness(1.25) drop-shadow(0 0 5px rgba(255,200,110,.85)) !important; }
body.skin2.asg.odin #btnTurbo.fast, body.skin2.asg.odin #btnTurbo.on { filter:none !important; box-shadow:none !important; }
body.skin2.asg.odin #btnTurbo::after { content:none; display:none; }
/* minus and plus are drawn on the bet plate: the buttons are its two touch areas */
body.skin2.asg.odin #btnMinus svg, body.skin2.asg.odin #btnPlus svg { display:none !important; }
body.skin2.asg.odin #btnMinus:disabled, body.skin2.asg.odin #btnPlus:disabled { opacity:1; }
/* BUY: a small dark plate with the loot sack; its words are part of the art */
body.skin2.asg.odin #btnBuy { background:url(assets/skin3/cab/buy.webp?v=87bea53a) center/100% 100% no-repeat !important;
  height:calc(var(--k2-buy-w) * .432) !important; filter:drop-shadow(0 3px 6px rgba(20,8,0,.4)) !important; }
body.skin2.asg.odin #btnBuy em { display:none !important; }
/* the read-outs: flat labels, bright numbers */
body.skin2.asg.odin .bcell b { color:#d9c7ef; letter-spacing:.1em; }
body.skin2.asg.odin .bcell span { color:#ffd86b; }
/* desktop: WIN is a plate the size of BALANCE; its idle line and its figures fit it */
body.skin2.asg.odin:not(.portrait) #bLastWin b { font-size:calc(var(--k2-win-h) * .22); color:#d9c7ef; }
body.skin2.asg.odin:not(.portrait) #bLastWin span { font-size:calc(var(--k2-win-h) * .40); color:#ffd86b; }
body.skin2.asg.odin:not(.portrait) #bLastWin.idle #lwIdle { font-size:calc(var(--k2-win-h) * .30); }
body.skin2.asg.odin:not(.portrait) #bLastWin.idle #lwIdle em { color:#ffd86b; }
/* modals and cards: the cabinet's dark-wood panel (one crest), plum choice cards, a quiet and a gold button */
body.skin2.asg.odin #panel.k2p, body.skin2.asg.odin #pop.k2p, body.asg.odin #k2panel {
  border-width:44px 20px 22px 20px !important;
  border-image:url(assets/skin3/cab/modal.webp?v=d7d7e027) 208 92 100 92 fill / 44px 20px 22px 20px / 0 stretch !important; }
body.skin2.asg.odin #panelWrap, body.skin2.asg.odin #popWrap { background:rgba(14,8,22,.66); }
body.skin2.asg.odin .k2p #buyTiers .k2tier, body.skin2.asg.odin .k2p #buyTiers .k2tier:not(.on) {
  background:url(assets/skin3/cab/card.webp?v=a11b60eb) center/100% 100% no-repeat !important; border:0 !important; box-shadow:none !important; }
body.skin2.asg.odin .k2p #buyTiers .k2tier.on { background-image:url(assets/skin3/cab/card_on.webp?v=9eeee91d) !important; }
/* the chosen card's tick sits inside its top-right corner: over the corner it went under the title ribbon's knot */
body.skin2.asg.odin .k2p #buyTiers .k2tier.on::after { top:6px; right:6px; z-index:2; }
body.skin2.asg.odin .k2p .k2go, body.asg.odin #k2cta {
  background:url(assets/skin3/cab/btn_gold.webp?v=a46ec631) center/100% 100% no-repeat !important; border:0 !important; }
body.skin2.asg.odin .k2p .k2go span, body.asg.odin #k2cta span { color:#3a1a04 !important; text-shadow:0 1px 0 rgba(255,240,190,.6) !important; }
body.skin2.asg.odin .k2p .k2ghost { position:relative;
  background:url(assets/skin3/cab/btn_quiet.webp?v=431a813a) center/100% 100% no-repeat !important; border:0 !important; }
body.skin2.asg.odin .k2p .k2ghost span { color:#e9dcf7 !important; }
body.skin2.asg.odin #panel.k2p #panelX, body.skin2.asg.odin #pop.k2p #popX {
  background:url(assets/skin3/cab/btn_close.webp?v=17382675) center/100% 100% no-repeat !important; border:0 !important;
  box-shadow:none !important; color:transparent !important; font-size:0 !important; }
body.skin2.asg.odin .k2p .k2plaque { background:linear-gradient(180deg,#26142f,#160b1d) !important; border-color:#b9874a !important; }
body.skin2.asg.odin .k2p h2.k2h, body.asg.odin #k2title { color:#ffd86b !important; }
body.asg.odin #k2eyebrow, body.skin2.asg.odin .k2p .k2lab { color:#d9c7ef !important; }
body.skin2.asg.odin .k2p .k2round { background:radial-gradient(circle at 50% 38%, #3a2246, #1c0f24) !important; border:1.5px solid #b9874a !important;
  box-shadow:none !important; color:#f4e6c8 !important; }
body.skin2 .k2p .k2round.end { opacity:.4; }
body.skin2.asg.odin .k2p .k2round.end { opacity:1; color:rgba(244,230,200,.26) !important; }
/* big-win titles: the tier word is the cabinet's title badge (BIG / MEGA / EPIC WIN), the figure sits on a dark plate */
body.asg.odin #k2big .k2tier { color:transparent !important; text-shadow:none !important; background:center/contain no-repeat;
  height:calc(var(--bw) * .34); margin-bottom:0; }
body.asg.odin #k2big .k2tier[data-t="1"] { background-image:url(assets/skin3/cab/t_big.webp?v=98b429bd); }
body.asg.odin #k2big .k2tier[data-t="2"] { background-image:url(assets/skin3/cab/t_mega.webp?v=5cdc5a9e); }
body.asg.odin #k2big .k2tier[data-t="3"] { background-image:url(assets/skin3/cab/t_epic.webp?v=92d62585); }
body.asg.odin .k2band strong { color:#ffd86b !important; }
body.asg.odin .k2door { background-color:#160b1f; box-shadow:none; }
body.asg.odin #k2seam { background:#ffe2a0; box-shadow:0 0 22px 10px rgba(190,120,255,.45); }

/* ===== ODIN'S RAVENS: Spine overlays (cinema/spxov.js) stand in for the CSS pictures while they play ===== */
body.asg.odin #k2big .k2tier.spxOn { background-image:none !important; }
.k2band.spxOn { background:none !important; }
.k2band.spxOn > strong, .k2band.spxOn > canvas:not(.spxCv) { visibility:hidden; }
#k2call.spxBrow > span { visibility:hidden; }
#k2eyebrow.spxOn { visibility:hidden; }
#k2eyebrow.spxOn > .spxCv { visibility:visible; }
/* SPIN: the coin is its rig at rest and on a press; respins and counts keep the painted coin under their dark disc */
body.skin2.asg.odin #btnSpin.spx:not(.respin):not(.counting) { background-image:none !important; }
#btnSpin.respin > .spxSpin, #btnSpin.counting > .spxSpin { visibility:hidden !important; }
body.skin2.asg.odin #btnSpin.spx.pressed, body.skin2.asg.odin #btnSpin.spx:active { transform:none; }


/* ===== ODIN'S RAVENS v557: the splash (body.odin is set in index.html, so these hold from the first painted frame) ===== */
body.k2kit.odin #splash { background:#120818; }
body.k2kit.odin #spBg::after { background:linear-gradient(180deg, rgba(14,6,22,.10) 0%, rgba(14,6,22,.38) 38%,
  rgba(14,6,22,.84) 70%, rgba(14,6,22,.95) 100%); }
body.k2kit.odin #spBg::before, body.k2kit.odin .k2sbolt, body.odin .k2sheen { display:none !important; }
/* the card: the cabinet's modal frame (cab/modal.webp, one crest), the same slice as panels.js K2ART_ODIN.frame */
body.k2kit.odin #spCard { border-width:44px 20px 22px 20px;
  border-image:url(assets/skin3/cab/modal.webp?v=d7d7e027) 208 92 100 92 fill / 44px 20px 22px 20px / 0 stretch; padding:6px 14px 16px; }
body.k2kit.odin #spWinUp { color:#ffd86b; -webkit-text-fill-color:#ffd86b; text-shadow:0 2px 0 #2a0f22, 0 4px 10px rgba(0,0,0,.6); }
body.k2kit.odin .spCell i { color:#e9d6ff; text-shadow:0 1px 0 #1a0a1c; }
body.k2kit.odin #spSub { color:#eadcf5; }
/* PLAY: the cabinet's gold button (cab/btn_gold.webp, 1020 x 272), dark words like every gold button of the game */
body.k2kit.odin #spPlay { background:url(assets/skin3/cab/btn_gold.webp?v=a46ec631) center/100% 100% no-repeat;
  width:min(300px,76vw); height:calc(min(300px,76vw) * .267); }
body.k2kit.odin #spPlay span { color:#3a1a04; -webkit-text-fill-color:#3a1a04; -webkit-text-stroke:0; text-shadow:0 1px 0 rgba(255,240,190,.65); }
/* a landscape phone: the logo on the left, the card on the right, PLAY on screen (splash.js splashFit scales any rest) */
@media (orientation:landscape) and (max-height:560px) {
  body.k2kit.odin #spInner { width:min(900px,96vw); display:flex; flex-direction:row; align-items:center; justify-content:center; gap:3vw; }
  body.k2kit.odin #spLogo { flex:0 0 auto; }
  body.k2kit.odin #spLogo img { width:min(330px,38vw,70vh) !important; max-height:none; }
  body.k2kit.odin #spCard { flex:0 1 auto; width:min(430px,52vw); box-sizing:border-box; margin:0; padding:2px 10px 8px; }
  body.k2kit.odin #spWinUp { font-size:clamp(14px,5.2vh,22px); }
  body.k2kit.odin #spRibbon { margin-top:6px; gap:8px; }
  body.k2kit.odin .spCell { gap:2px; }
  body.k2kit.odin .spCell .k2face { width:min(100%, 24vh); margin:0 auto; }
  body.k2kit.odin .spCell i { font-size:clamp(9px,3vh,12px); }
  body.k2kit.odin #spSub { margin-top:4px; font-size:clamp(10px,3.3vh,13px); line-height:1.25; }
  body.k2kit.odin #spPlay { margin-top:8px; width:min(260px,30vw,62vh); height:calc(min(260px,30vw,62vh) * .267); }
  body.k2kit.odin #spPlay span { font-size:clamp(16px,6vh,24px); }
  body.k2kit.odin #spPct { margin-top:2px; min-height:0; }
}
body.k2kit.odin .spCell { background:radial-gradient(circle at 50% 42%, #4a2153, #22102b); border-color:rgba(214,160,84,.7); }

/* ===== ODIN'S RAVENS v557: plates, rows and tiles in the cabinet's own materials (never VALHALLA's blue glass) ===== */
/* the page behind a stage shake */
body.asg.odin { background:#120818; }
/* BIG / MEGA / EPIC, THE RAVENS STRIKE / PILE OF GOLD and the BONUS WIN bank: the plum choice card's field and copper rim
   (cab/card.webp as a nine-slice), a soft dark shadow */
body.asg.odin #k2call, body.asg.odin #k2big, body.asg.odin #k2bank {
  background:none; border:14px solid transparent; border-radius:0; padding:2px 4px 0;
  border-image:url(assets/skin3/cab/card.webp?v=a11b60eb) 44 fill / 14px / 0 stretch;
  box-shadow:none; filter:drop-shadow(0 10px 22px rgba(10,2,16,.6)); }
body.asg.odin #k2call > span { color:#e9d6ff; text-shadow:0 2px 0 #1a0820; }
body.asg.odin #k2call > b, body.asg.odin #k2bank > b { color:#ffd86b; text-shadow:0 2px 0 #1a0820; }
body.asg.odin .k2band strong, body.asg.odin #k2big .k2tier { text-shadow:0 2px 0 #3a1606, 0 3px 0 #1a0820; }
body.asg.odin .k2band { background-image:none; }
body.asg.odin #k2value { text-shadow:0 2px 0 #3a1606, 0 3px 0 #1a0820; }
body.skin2.asg.odin #panel.k2p h2.k2h, body.skin2.asg.odin #pop.k2p h2.k2h, body.asg.odin #k2title {
  text-shadow:0 2px 0 #3a1606, 0 3px 0 #1a0820; }
body.asg.odin #k2seam { display:none; }
/* menu rows, autoplay tiles and paytable tiles: the same plum card as the buy tiers */
body.skin2.asg.odin .k2p .k2row, body.skin2.asg.odin .k2p .k2tile, body.skin2.asg.odin .k2p .k2pay {
  background:none !important; box-sizing:border-box; border:12px solid transparent !important; border-radius:0 !important;
  border-image:url(assets/skin3/cab/card.webp?v=a11b60eb) 44 fill / 12px / 0 stretch !important; box-shadow:none !important; }
body.skin2.asg.odin .k2p .k2row { padding:0 4px; }
body.skin2.asg.odin .k2p .k2pay { padding:0 0 1px; }
body.skin2.asg.odin .k2p .k2tile:active { border-image-source:url(assets/skin3/cab/card_on.webp?v=9eeee91d) !important; color:#ffe9b0 !important; }
body.skin2.asg.odin .k2p .k2sub, body.skin2.asg.odin .k2p .k2pay small { color:#d9c7ef !important; }
body.skin2.asg.odin .k2p .k2code { background:#170b1f; border-color:rgba(185,135,74,.7); }
/* respins and counts on SPIN: the cabinet's opaque counter disc (cab/counter.webp) over the pressed coin, so neither the
   coin's word nor its raven shows through the number */
body.skin2.asg.odin #btnSpin.respin, body.skin2.asg.odin #btnSpin.counting {
  background:url(assets/skin3/cab/counter.webp?v=3dd56732) center/76% 78% no-repeat,
             url(assets/skin3/cab/spin_down.webp?v=b4911747) center/100% 100% no-repeat !important; }

/* ===== ODIN'S RAVENS v557: every panel control at least 44 screen px (--touch = 44 / stage scale, layout.js), and no
   text under the close button ===== */
body.skin2.odin .k2p .k2row { height:max(54px, var(--touch, 44px)); }
body.skin2.odin .k2p .k2tile { height:max(58px, var(--touch, 44px)); }
body.skin2.odin .k2p .k2ghost { height:max(48px, var(--touch, 44px)); min-width:max(44px, var(--touch, 44px)); }
/* the gold button keeps its height without forcing its width from its aspect: the two buttons share the row */
body.skin2.odin .k2p .k2go { aspect-ratio:auto; height:max(56px, var(--touch, 44px)); min-width:0; }
body.skin2.odin .k2p .k2btns { grid-template-columns:minmax(0, 1fr) minmax(0, 1.45fr); }
body.skin2.odin .k2p .k2btns.one { grid-template-columns:minmax(0, 1fr); }
/* the close button sits on the frame's top edge, wholly above the content, so no title or scrolled line runs under it */
body.skin2.odin #panel.k2p #panelX, body.skin2.odin #pop.k2p #popX {
  top:calc(-1 * max(38px, var(--touch, 44px)) - 2px) !important; right:calc(-1 * max(26px, var(--touch, 44px) * .62)) !important; }

/* ===== ODIN'S RAVENS v557: desktop read-outs (the right column, layout/ravcab.js ravLandGeom) — labels readable ===== */
body.skin2.asg.odin:not(.portrait) #bBal b, body.skin2.asg.odin:not(.portrait) #bBet b { font-size:calc(var(--k2-bet-h) * .28); letter-spacing:.12em; }
body.skin2.asg.odin:not(.portrait) #bBal span, body.skin2.asg.odin:not(.portrait) #bBet span { font-size:calc(var(--k2-bet-h) * .38); }
body.skin2.asg.odin:not(.portrait) #bLastWin b { font-size:calc(var(--k2-win-h) * .28); }
body.skin2.asg.odin:not(.portrait) #bLastWin span { font-size:calc(var(--k2-win-h) * .40); }
body.skin2.asg.odin:not(.portrait) #bLastWin.idle #lwIdle { font-size:calc(var(--k2-win-h) * .32); }
/* the phone's WIN cell and its idle promise: the cabinet's lilac labels and gold figures, never the Asgard blue */
body.skin2.asg.odin.portrait #bLastWin b, body.skin2.asg.odin.portrait #bLastWin.idle #lwIdle { color:#d9c7ef; }
body.skin2.asg.odin.portrait #bLastWin span, body.skin2.asg.odin.portrait #lwIdle em { color:#ffd86b; }
body.skin2.asg.odin:not(.portrait) #bLastWin.idle #lwIdle { color:#d9c7ef; }
/* the light behind the parting wings: a soft warm plum glow, never a bright line */
body.asg.odin #k2halo { background:radial-gradient(ellipse at 50% 46%, rgba(255,214,150,.22), rgba(150,80,190,.12) 40%, transparent 65%); }
/* the classic cabinet's punch-kit buttons are never this game's: no request for them before the cabinet parts apply */
body.odin .rbtn, body.odin #btnSpin, body.odin .rbtn.pressed, body.odin #btnSpin.pressed, body.odin #btnBuy { background-image:none; }

/* ===== ODIN'S RAVENS v558 ===== */
/* SPIN while the reels run: no stop mark; the rig dims the face and turns its arrow ring (cinema/spxov.js). Without the
   rig the coin only dims. */
body.skin2.asg.odin #btnSpin.stop #spinStop { opacity:0 !important; }
body.skin2.asg.odin #btnSpin.stop.spx { filter:drop-shadow(0 0 7px rgba(255,176,60,.32)) drop-shadow(0 3px 6px rgba(20,8,0,.45)); }
body.skin2.asg.odin #btnSpin.spx { filter:drop-shadow(0 3px 6px rgba(20,8,0,.45)); }
/* the buy choice cards: the selected card keeps the same plate (cab/card.webp), lifts a little larger and brighter and
   wears the gold rim (cab/card_sel.webp, its rim laid exactly over the plate's rim); the other card stays calm */
body.skin2.asg.odin .k2p #buyTiers .k2tier { position:relative; isolation:isolate;
  transition:transform .22s cubic-bezier(.2,.8,.25,1.25), filter .22s ease !important; }
body.skin2.asg.odin .k2p #buyTiers .k2tier.on { background-image:url(assets/skin3/cab/card.webp?v=a11b60eb) !important;
  transform:translateY(-2px) scale(1.06) !important; filter:brightness(1.1) saturate(1.08) !important; z-index:1; }
body.skin2.asg.odin .k2p #buyTiers .k2tier.on::before { content:""; position:absolute; z-index:-1; pointer-events:none;
  left:-0.96%; right:-1.36%; top:-3.32%; bottom:-3.25%;
  background:url(assets/skin3/cab/card_sel.webp?v=80eb0602) center/100% 100% no-repeat; }
body.skin2.asg.odin .k2p #buyTiers .k2tier:not(.on) { transform:none !important; filter:brightness(.88) saturate(.85) !important; }
/* the bonus key: the trigger with the real symbols (coin, raven coin, coin = BONUS), small and quiet on the cabinet */
#bonusKey { display:none; }
body.skin2.asg.odin.haskey:not(.inbonus) #bonusKey { display:flex; position:absolute; z-index:4; pointer-events:none;
  left:var(--k2-key-x); top:var(--k2-key-y); width:var(--k2-key-w); height:var(--k2-key-h); box-sizing:border-box;
  align-items:center; justify-content:center; gap:calc(var(--k2-key-h) * .1); padding:0 calc(var(--k2-key-h) * .38);
  border-radius:999px; background:rgba(24,9,32,.8); border:1px solid rgba(214,160,84,.55);
  box-shadow:0 2px 6px rgba(10,2,16,.45); }
body.skin2.asg.odin.haskey #bonusKey img { height:92%; width:auto; flex:0 0 auto; filter:drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
body.skin2.asg.odin.haskey #bonusKey b { flex:0 0 auto; margin-left:calc(var(--k2-key-h) * .16); white-space:nowrap;
  font:900 calc(var(--k2-key-h) * .5)/1 var(--fn); letter-spacing:.04em; color:#ffd86b; text-shadow:0 1px 0 #2a0f22; }
/* the bonus result card (cinema/transitions.js k2Finale): THE HEIST IS OVER badge over the frame's top, the title, the
   total on a big gold-rimmed plate, the loot with the BIG / MEGA / EPIC badge springing onto it, the respins, the gold
   TAKE THE LOOT */
body.asg.odin #k2panel[data-kind="result"] { width:min(calc(var(--W) * .9), 372px); padding:0 6px 6px; }
body.asg.odin:not(.portrait) #k2panel[data-kind="result"] { width:min(calc(var(--W) * .9), 400px); }
/* landscape (720 stage px tall): a compact card set low, so the ravens perched on its sign stay on screen */
body.asg.odin:not(.portrait) #k2pwrap.res { align-items:flex-end; padding-bottom:14px; box-sizing:border-box; }
body.asg.odin:not(.portrait) #k2panel[data-kind="result"] #k2eyebrow.heist { width:78%; }
body.asg.odin:not(.portrait) #k2panel[data-kind="result"] #k2art { width:46%; }
body.asg.odin #k2panel[data-kind="result"] #k2copy { margin-top:0; gap:2px; }
body.asg.odin #k2panel[data-kind="result"] #k2eyebrow.heist { display:block; width:84%; aspect-ratio:562/277; margin:-42px auto -8px;
  font-size:0; color:transparent; text-shadow:none; background:url(assets/skin3/cab/t_over.webp?v=39842148) center/contain no-repeat; }
body.asg.odin #k2panel[data-kind="result"] #k2title { font-size:20px; margin-top:2px; }
body.asg.odin #k2panel[data-kind="result"] #k2line { margin:4px 0 0; font:900 10.5px/1.2 var(--fn); letter-spacing:.16em;
  text-transform:uppercase; color:#d9c7ef; }
body.asg.odin #k2panel[data-kind="result"] #k2value { display:flex; align-items:center; justify-content:center; box-sizing:border-box;
  width:94%; height:84px; margin:3px auto 0; padding:0 4px; white-space:nowrap;
  border:24px solid transparent; border-image:url(assets/skin3/cab/card_sel.webp?v=80eb0602) 64 fill / 24px / 0 stretch;
  font:900 44px/1 var(--fn); color:#ffe27a; -webkit-text-fill-color:#ffe27a; font-variant-numeric:tabular-nums;
  text-shadow:0 2px 0 #7a3a06, 0 4px 0 #2a0f22; }
body.asg.odin:not(.portrait) #k2panel[data-kind="result"] #k2value { height:82px; font-size:46px; }
body.asg.odin #k2panel[data-kind="result"] #k2art { position:relative; width:64%; aspect-ratio:1; margin:-7% auto -5%; }
#k2tierRes { display:none; }
body.asg.odin #k2panel[data-kind="result"] #k2tierRes:not([data-t="0"]) { display:block; position:absolute; left:-16%; right:-16%;
  top:47%; aspect-ratio:591/198; pointer-events:none; background:center/contain no-repeat; }
body.asg.odin #k2tierRes[data-t="1"] { background-image:url(assets/skin3/cab/t_big.webp?v=98b429bd); }
body.asg.odin #k2tierRes[data-t="2"] { background-image:url(assets/skin3/cab/t_mega.webp?v=5cdc5a9e); }
body.asg.odin #k2tierRes[data-t="3"] { background-image:url(assets/skin3/cab/t_epic.webp?v=92d62585); }
body.asg.odin #k2tierRes.spxOn { background-image:none !important; }
body.asg.odin #k2panel[data-kind="result"] #k2detail { position:relative; z-index:4; margin-top:10px; }
body.asg.odin #k2panel[data-kind="result"] #k2cta { margin-top:8px; }
/* the result card's TAKE THE LOOT stays gold while the count runs (a tap lands the count), lit once it can be pressed */
body.asg.odin #k2panel[data-kind="result"] #k2cta:disabled { filter:saturate(.8) brightness(.8); }
/* Hold & Win: the board leads; Odin's armchair and the nest (the hammer layer) step back with the room, the ravens act */
body.asg.odin.inbonus #odgl, body.asg.odin.inbonus #odvid, body.asg.odin.inbonus #k3fx { filter:brightness(.7) saturate(.78); transition:filter .5s ease; }
/* his own beats (the multiplier, a GRAND; cinema/odinvid.js body.odinbeat): Odin steps out of the dim while his clip plays,
   rig and clip alike, so the swap between them shows no step in light */
body.asg.odin.inbonus.odinbeat #odgl, body.asg.odin.inbonus.odinbeat #odvid { filter:none; }
/* his reactions and his awake loop in Hold & Win (body.odinact): he steps most of the way out of the dim; the board still leads */
body.asg.odin.inbonus.odinact #odgl, body.asg.odin.inbonus.odinact #odvid { filter:brightness(.92) saturate(.94); }

/* v559 narrator ribbon (ui/narr.js): one caption under the reel window, centred on the frame's bottom rail */
#narr { position:absolute; z-index:8; pointer-events:none; display:none; transform:translate(-50%,-50%);
  align-items:center; justify-content:center; box-sizing:border-box; padding:0 14px; border-radius:999px;
  background:linear-gradient(180deg,#46195e 0%,#2a0d3b 62%,#1d0829 100%); border:1.5px solid #d9a54a;
  box-shadow:0 3px 0 #12061a, inset 0 1px 0 rgba(255,214,140,.28); }
#narr.on { display:flex; }
#narr span { display:block; white-space:nowrap; font-family:var(--fd); font-weight:400; letter-spacing:.05em; color:#ffe39a;
  text-shadow:0 2px 0 #2a0c06; line-height:1; }
/* v559 paytable: the 15 lines as little boards */
.k2p .k2lines { display:grid; grid-template-columns:repeat(5, 1fr); gap:8px 6px; margin:8px 2px 4px; }
.k2p .k2ln { display:flex; flex-direction:column; align-items:center; gap:2px; }
.k2p .k2ln b { font:400 14px/1 var(--fd); color:#ffd66e; text-shadow:0 2px 0 #2a0c06; }
.k2p .k2ln svg { width:100%; max-width:64px; height:auto; display:block; }
.k2p .k2ln rect { fill:#2a1238; stroke:rgba(214,170,110,.45); stroke-width:1; }
.k2p .k2ln rect.on { fill:#e9a93a; stroke:#ffe39a; }
.k2p .k2ln polyline { fill:none; stroke:#ffcf4d; stroke-width:3.5; stroke-linejoin:round; stroke-linecap:round; }

/* v559 loading screen: a living scene (ui/splashgl.js). The WebGL surface (.sgGl) draws every rig into its box below;
   the words are DOM text in the two faces. Portrait: logo, the room with Odin, the nest and the ravens, the card;
   landscape: logo and room on the left, the card on the right. Each box keeps its plain picture until its rig is in. */
#splash.gl #spInner, #splash.gl #spRays, #splash.gl #spFx { display:none; }
#splash.gl #spBg { inset:0; animation:none; background:url(assets/skin3/bg_port.webp?v=94930c65) center 30%/cover no-repeat; }
@media (orientation:landscape) { #splash.gl #spBg { background-image:url(assets/skin3/bg_land.webp?v=96d861ff); background-position:center 40%; } }
#splash.gl #spBg::after { background:radial-gradient(120% 80% at 50% 38%, rgba(16,7,22,.18) 0%, rgba(16,7,22,.55) 60%, rgba(10,4,16,.9) 100%); }
#spScene { position:absolute; inset:0; z-index:2; display:flex; flex-direction:column; align-items:center;
  padding:max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom)); box-sizing:border-box;
  --u:min(1vw, .47vh); font-family:var(--fn); opacity:0; transition:opacity .45s cubic-bezier(.2,.8,.2,1); }
#splash.in #spScene { opacity:1; }
#splash.in #spScene.sgWait { opacity:0; }   /* shown whole once its rigs, pictures and faces are in (ui/splashgl.js) */
.sgBox { position:relative; }
.sgBox > img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.sgBox.rig > img { visibility:hidden; }
#sgLogo { width:calc(var(--u) * 92); aspect-ratio:1250/597; margin-top:calc(var(--u) * 2); flex:0 0 auto; }
#sgWorld { position:relative; width:calc(var(--u) * 96); height:calc(var(--u) * 50); flex:0 0 auto; margin-top:calc(var(--u) * -2); }
#sgOdin { position:absolute; left:28%; bottom:0; width:44%; height:100%; }
#sgNest { position:absolute; left:2%; bottom:0; width:28%; height:44%; }
#sgRavens { position:absolute; right:0; bottom:0; width:27%; }
#sgRavens img { width:100%; height:auto; display:block; }
#sgCard { display:flex; flex-direction:column; align-items:center; width:calc(var(--u) * 92); margin-top:calc(var(--u) * 2);
  padding:calc(var(--u) * 3) calc(var(--u) * 3) calc(var(--u) * 2.5); box-sizing:border-box; border-radius:calc(var(--u) * 5);
  background:linear-gradient(180deg, rgba(42,14,58,.82), rgba(24,8,34,.9)); border:1.5px solid rgba(217,165,74,.7);
  box-shadow:0 10px 30px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,214,140,.2); }
#sgWin { font-family:var(--fd); font-size:calc(var(--u) * 6.4); line-height:1; color:#ffe39a; letter-spacing:.03em;
  text-shadow:0 3px 0 #3a1606, 0 5px 10px rgba(0,0,0,.5); white-space:nowrap; }
#sgWin b { font-weight:400; color:#fff4c8; }
/* four tiles since build 565 (coin, raven coin, Odin's raven, jackpot): each column as wide as its coin, a two-word caption may
   take two lines */
#sgTiles { display:flex; gap:calc(var(--u) * 2.4); margin-top:calc(var(--u) * 2.5); }
.sgTile { display:flex; flex-direction:column; align-items:center; width:calc(var(--u) * 19); }
.sgTile .sgBox { width:calc(var(--u) * 18); aspect-ratio:1; }
.sgTile i { font-style:normal; font-family:var(--fd); font-size:calc(var(--u) * 3.3); line-height:1.08; color:#ffd66e; letter-spacing:.05em;
  text-align:center; text-shadow:0 2px 0 #2a0c06; margin-top:calc(var(--u) * .6); }
#sgLine { margin-top:calc(var(--u) * 2); font-weight:600; font-size:calc(var(--u) * 3.7); line-height:1.3; color:#efe2c8;
  text-align:center; text-shadow:0 1px 0 #000; }
#sgLine b { font-weight:800; color:#ffd66e; }
#sgPlay { width:min(calc(var(--u) * 74), 100%); aspect-ratio:900/260; margin-top:calc(var(--u) * 3); }
#sgPlay #spPlay { position:absolute; inset:0; width:100%; height:100%; margin:0; }
#sgPlay.rig #spPlay { background:none !important; filter:none !important; }
#sgPlay.rig #spPlay span { visibility:hidden; }
#sgPct { min-height:1.2em; margin-top:calc(var(--u) * 1.4); font-weight:800; font-size:calc(var(--u) * 3.2); letter-spacing:.12em;
  color:#d9c3e8; text-shadow:0 1px 0 #000; }
@media (orientation:landscape) {
  #spScene { --u:min(.62vw, 1.05vh); display:grid; grid-template-columns:auto auto; grid-template-rows:auto 1fr;
    justify-content:center; align-content:center; column-gap:calc(var(--u) * 6); }
  #sgLogo { grid-column:1; grid-row:1; margin-top:0; width:calc(var(--u) * 78); }
  #sgWorld { grid-column:1; grid-row:2; width:calc(var(--u) * 82); height:calc(var(--u) * 42); margin-top:0; }
  #sgCard { grid-column:2; grid-row:1 / span 2; align-self:center; margin-top:0; width:calc(var(--u) * 70); }
  #sgTiles { gap:calc(var(--u) * 1.6); }
  .sgTile { width:calc(var(--u) * 14.6); }
  .sgTile .sgBox { width:calc(var(--u) * 14); }
  .sgTile i { font-size:calc(var(--u) * 2.9); }
}
/* v559 panel titles: the Spine ribbon badge plays over the title's line (cinema/spxov.js); the words stay for screen
   readers and as the fallback */
.k2p h2.k2h.spxOn { color:transparent !important; -webkit-text-fill-color:transparent !important; text-shadow:none !important; }
.k2p h2.k2h { position:relative; }
/* v559: the feature cards' titles carry their Spine ribbon badges */
#k2title { position:relative; display:block; }
#k2title.spxOn { color:transparent !important; -webkit-text-fill-color:transparent !important; text-shadow:none !important; }
/* the scrolling popup's badge needs room above its title line inside the scroll area */
#pop.k2p #popBody > h2.k2h:first-child { margin-top:16px; }

/* ODIN'S RAVENS: painted surfaces instead of CSS gradients (no flat gradient pills or rounded boxes): the buy panel's
   price and bet plaques and the narration ribbon wear the bar's readout plate, the bet -/+ the cabinet's counter disc;
   the provably-fair hashes use the game's UI face */
body.skin2.asg.odin .k2p .k2plaque { background:none !important; border:12px solid transparent !important; border-radius:0 !important;
  border-image:url(assets/skin3/cab/readout.webp?v=97fab984) 88 fill / 12px / 0 stretch !important; box-shadow:none !important; padding:0 6px; }
body.skin2.asg.odin .k2p .k2round { background:url(assets/skin3/cab/counter.webp?v=3dd56732) center/100% 100% no-repeat !important;
  border:none !important; border-radius:50%; }
body.odin #narr { background:none; border:6px solid transparent; border-width:6px 12px; border-radius:0; box-shadow:none;
  border-image:url(assets/skin3/cab/readout.webp?v=97fab984) 88 fill / 6px 12px / 0 stretch; }
body.skin2.asg.odin .k2p .k2code, body.skin2.asg.odin .k2p .k2out { font-family:var(--fn); font-weight:600; letter-spacing:.02em;
  font-variant-numeric:tabular-nums; }

/* ODIN'S RAVENS: while a clip whose raised hands reach the BUY BONUS corner is cued or shows, the button fades away
   (cinema/odinvid.js toggles body.odinup) so nothing is drawn over him */
body.odin #btnBuy { transition:opacity .3s ease, visibility 0s linear 0s; }
body.odin.odinup #btnBuy { opacity:0; visibility:hidden; pointer-events:none; transition:opacity .3s ease, visibility 0s linear .3s; }
/* while the card's button is disabled (a reveal or a count runs) a tap on it is a tap on the card: it finishes the step */
#k2cta:disabled { pointer-events:none; }
/* a plate painted as one picture (ui/plaque.js) keeps its pressed look without swapping its border-image */
body.odin .k2p .k2tile.plqd:active { filter:brightness(1.18); }
/* the rules scroll up and down only: the title badge's canvas (wider than its title, room for its bounce) let the page
   scroll sideways on a phone */
#popBody { overflow-x:hidden !important; touch-action:pan-y; overscroll-behavior:contain; }
/* the entry card's ribbon badge hangs its knotted ends below its line (about 0.65 of the line): the copy under it keeps
   clear of them */
body.asg.odin #k2panel[data-kind="entry"] #k2title { margin-bottom:16px; }
/* the ends of the bet ladder: the minus at the lowest bet and the plus at the highest look off (ui/hud.js .end); on
   this skin the signs are painted on the bet plate, so a veil in the plate's own colour, the size of the sign, fades it */
#btnMinus.end, #btnPlus.end { opacity:.4; }
body.skin2.asg.odin #btnMinus.end, body.skin2.asg.odin #btnPlus.end { opacity:1; }
body.skin2.asg.odin #btnMinus.end { background:radial-gradient(ellipse 22% 9% at 52% 50%, rgba(37,20,38,.74) 0 70%, rgba(37,20,38,0) 100%) !important; }
body.skin2.asg.odin #btnPlus.end { background:radial-gradient(ellipse 20% 19% at 49% 50%, rgba(34,17,35,.74) 0 70%, rgba(34,17,35,0) 100%) !important; }
/* A short landscape window (an operator's small frame such as 400x300 or 480x320): the column under SPIN is too narrow
   for four round buttons a touch target apart, so MENU and SOUND stand in the top-left corner (above the logo) and AUTO
   and TURBO under WIN, each pair a touch target apart and the discs a little larger; the bet plate, BALANCE and WIN stay.
   Stage px: the stage is 720 high in landscape, --k2-menu-d is a disc's diameter, --k2-win-* the WIN plate. */
@media (orientation: landscape) and (max-width: 540px) and (max-height: 340px) {
  body.skin2.asg.odin #btnMenu, body.skin2.asg.odin #btnSound, body.skin2.asg.odin #btnAuto, body.skin2.asg.odin #btnTurbo {
    width:calc(var(--k2-menu-d) * 1.4); height:calc(var(--k2-menu-d) * 1.4); }
  body.skin2.asg.odin #btnMenu { left:24px; top:20px; }
  body.skin2.asg.odin #btnSound { left:calc(24px + var(--k2-menu-d) * 2.45); top:20px; }
  body.skin2.asg.odin #btnAuto, body.skin2.asg.odin #btnTurbo { top:calc(var(--k2-win-y) + var(--k2-win-h) + 50px - var(--k2-menu-d) * 0.7); }
  body.skin2.asg.odin #btnAuto { left:calc(var(--k2-win-x) + var(--k2-win-w) / 2 - var(--k2-menu-d) * 1.925); }
  body.skin2.asg.odin #btnTurbo { left:calc(var(--k2-win-x) + var(--k2-win-w) / 2 + var(--k2-menu-d) * 0.525); }
}
