*{box-sizing:border-box}
html{scroll-behavior:smooth}
body {
  margin: 0;
  isolation: isolate;
  background: #101124;
  color: #f6f3ff;
  font: 16px/1.5 Barlow, Arial, sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  inset: -2vh 0 -21vh;
  z-index: -2;
  background: url('assets/scene.webp') center 42% / cover no-repeat;
}

body::after {
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(115deg, rgba(12, 13, 32, .87), rgba(24, 19, 61, .62)),
    linear-gradient(#ffffff0d 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0d 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}

@supports (animation-timeline: scroll(root block)) {
  @media (prefers-reduced-motion: no-preference) {
    body::before {
      animation: prism-parallax 1s linear both;
      animation-timeline: scroll(root block);
    }
  }
}

@keyframes prism-parallax {
  from { transform: translateY(0); }
  to { transform: translateY(-18vh); }
}

a{color:inherit;text-decoration:none}
button,summary{cursor:pointer}
button,a,summary{touch-action:manipulation}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #91fbd1;outline-offset:4px}
button,.btn{font:inherit;font-weight:700;border:0;border-radius:8px;padding:12px 18px;background:#91fbd1;color:#101124;display:inline-block;text-align:center}
img,amp-img{display:block;max-width:100%}
img{height:auto}
header,main,footer{max-width:1240px;margin:auto;padding:16px 24px}
header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.brand{font-family:'Archivo Black',Arial,sans-serif;font-size:21px;letter-spacing:-1px}
.brand b,.eyebrow{color:#91fbd1}
.eyebrow{font-weight:700;letter-spacing:.15em;font-size:12px;text-transform:uppercase}
/* prism:ticker:start */
.ticker {
  display: block;
  height: 40px;
  overflow: hidden;
  border-block: 1px solid #6d5b90;
  background: #221b3b;
  color: #c4fbe7;
  font-size: 13px;
  line-height: 38px;
}

.ticker-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
}

.ticker-track [aria-hidden="true"] { display: none; }
.ticker-track.is-running [aria-hidden="true"] { display: block; }
.ticker-track.is-running { animation: prism-ticker-loop 50s linear infinite; }

.ticker-track > span { flex: 0 0 auto; padding-right: .75em; }
.ticker:focus-within .ticker-track { animation-play-state: paused; }

@media (hover: hover) {
  .ticker:hover .ticker-track { animation-play-state: paused; }
}

@keyframes prism-ticker-loop {
  to { transform: translateX(calc(-100% / 3)); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker { overflow-x: auto; }
  .ticker-track.is-running { animation: none; }
  .ticker-track.is-running [aria-hidden="true"] { display: none; }
}
/* prism:ticker:end */
.hero{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:28px;align-items:center;padding:20px 0}
h1,h2{font-family:'Archivo Black',Arial,sans-serif;line-height:1.12;letter-spacing:-.035em;margin:8px 0 14px}
h1{font-size:clamp(36px,5vw,70px)}
h2{font-size:clamp(25px,3vw,36px)}
p{margin:8px 0 16px;color:#ded7ef}
.slider{min-width:0}
.slides{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:thin}
.slides a{flex:0 0 100%;scroll-snap-align:start}
.slides img,.hero amp-img{width:100%;border-radius:12px;object-fit:contain}
.controls{display:flex;justify-content:center;gap:8px;margin-top:8px}
.controls button{padding:6px 15px}
.nav{display:flex;gap:8px;overflow-x:auto;padding:10px 0}
.nav a{white-space:nowrap;border:1px solid #77649b;border-radius:8px;background:#221b3b;padding:10px 15px}
section{margin:24px 0;scroll-margin-top:16px}
.popular{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(140px,190px);gap:12px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x proximity}
.game{background:#221b3b;border:1px solid #61527e;border-radius:12px;overflow:hidden;scroll-snap-align:start}
.game img,.game amp-img{width:100%;aspect-ratio:1;object-fit:cover}
.game strong{display:block;padding:10px;font-size:14px}

/* prism:game-rtp:start */
#popular { margin-bottom: 20px; }
amp-script.rtp-shell { display: block; }
.popular.rtp-track {
  grid-auto-columns: 150px;
  padding: 2px 3px 9px;
  height: 259px;
}
.rtp-card { min-width: 0; }
.rtp-cover {
  display: block;
  aspect-ratio: 1;
  background: #362a51 center / cover no-repeat;
}
.game.rtp-card strong {
  display: -webkit-box;
  height: 43px;
  padding: 4px 8px 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 19px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.rtp-score {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: var(--rtp-color, #ddd3ef);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.rtp-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.rtp-card[data-rtp-band="green"] { --rtp-color: #a3ffa9; }
.rtp-card[data-rtp-band="yellow"] { --rtp-color: #ffe078; }
.rtp-card[data-rtp-band="red"] { --rtp-color: #ff9b9b; }
.rtp-state { display: block; padding: 2px 8px 6px; color: var(--rtp-color, #ddd3ef); font-size: 12px; }
.rtp-card[data-rtp-band="green"] .rtp-state { font-weight: 800; }
@keyframes rtp-green-pulse {
  0%, 100% { box-shadow: 0 0 0 0 #a3ffa900; }
  35% { box-shadow: 0 0 0 3px #a3ffa968; }
}
@media (prefers-reduced-motion: no-preference) {
  .rtp-card[data-rtp-band="green"] .rtp-dot { animation: rtp-green-pulse 1.4s ease-out infinite; }
}
/* prism:game-rtp:end */

#slot-machine[hidden], #slot-machine-launcher[hidden] { display: none; }
.floating-slot, .floating-slot-launcher { position: fixed; z-index: 60; }
.floating-slot {
  left: 12px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: min(238px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid #a883ee;
  border-radius: 14px;
  background: #18122c;
  color: #f7effe;
  box-shadow: 0 9px 32px #0b0614b8;
  font-size: 13px;
}
.floating-slot-head { display: flex; align-items: stretch; background: #332153; }
.floating-slot-handle, .floating-slot-close, .floating-slot-sound {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 0;
  background: transparent;
  color: inherit;
}
.floating-slot-handle {
  flex: 1;
  cursor: grab;
  text-align: start;
  touch-action: none;
  user-select: none;
}
.floating-slot-handle span { margin-right: 5px; color: #d3b8ff; letter-spacing: .05em; }
.floating-slot.is-dragging .floating-slot-handle { cursor: grabbing; }
.floating-slot-close { min-width: 44px; font-size: 22px; line-height: 1; }
.floating-slot-sound { min-width: 44px; font-size: 16px; }
.floating-slot-body { padding: 10px 10px 12px; }
.floating-slot-reels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
  border: 1px solid #e6bb73;
  border-radius: 9px;
  background: linear-gradient(#75533c, #3d2943 45%, #d6a559);
  box-shadow: inset 0 1px 0 #fff3c1a8;
}
.floating-slot-reel {
  position: relative;
  height: 108px;
  overflow: hidden;
  border: 1px solid #5e4554;
  border-radius: 4px;
  background: #fff5da;
  font: 700 28px/1 system-ui, sans-serif;
}
.floating-slot-reel::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(#2f194080, #2f194020 22%, transparent 34% 66%, #2f194020 78%, #2f194080),
              linear-gradient(transparent 30%, #7b53245c 30% 31%, transparent 31% 69%, #7b53245c 69% 70%, transparent 70%);
}
.floating-slot-reel-track { transform: translateY(-10px); }
.floating-slot-reel-track span { display: grid; place-items: center; height: 42px; }
.floating-slot-reel-track .floating-slot-seven {
  color: #b72339;
  font: italic 950 38px/.9 Georgia, serif;
  text-shadow: 1px 1px #ffe084, 2px 2px #6c1523;
}
.slot-action {
  --slot-pulse: 1.5s ease-in-out infinite;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.slot-action-arrow {
  --slot-arrow-travel: 4px;
  color: #ffdc7a;
  font: 700 24px/1 system-ui, sans-serif;
  text-shadow: 0 -1px #fff3b8, 0 1px #bc761c, 0 2px #945018, 0 3px #532610,
               0 5px 5px #110818e0, 0 0 8px #ffc45d70;
  pointer-events: none;
}
.slot-action-arrow:last-child {
  --slot-arrow-travel: -4px;
  scale: -1 1;
}
@keyframes prism-slot-arrow-nudge {
  0%, 100% { translate: 0; }
  50% {
    translate: var(--slot-arrow-travel);
    color: #fff4aa;
    text-shadow: 0 -1px #fffdf0, 0 1px #e29b37, 0 2px #ae621c, 0 3px #673014,
                 0 5px 6px #110818e0, 0 0 14px #ffd260, 0 0 20px #ff9f3db3;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .slot-action:has(.floating-slot-spin:enabled) .slot-action-arrow,
  #slot-match-dialog[open] .slot-action-arrow {
    animation: prism-slot-arrow-nudge var(--slot-pulse);
  }
}
.floating-slot-spin { width: 100%; min-height: 44px; padding: 8px 10px; }
.floating-slot-spin:disabled { cursor: wait; opacity: .65; }
.floating-slot-status { min-height: 18px; margin: 12px 0 0; color: #e3d7f5; font-size: 11px; }
.floating-slot-launcher {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #a883ee;
  border-radius: 999px;
  background: #332153;
  color: #fff0ff;
  box-shadow: 0 5px 18px #0b0614a6;
  font-size: 13px;
}
.slot-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 85; }
#slot-match-dialog {
  width: min(340px, calc(100% - 32px));
  padding: 30px 20px 22px;
  border: 1px solid #ffd77e;
  background: #201535;
  box-shadow: 0 12px 55px #0c0517b3;
  text-align: center;
}
#slot-match-dialog::backdrop { background: #0a0610a0; }
#slot-match-dialog.is-jackpot {
  width: min(430px, calc(100% - 32px));
  background: radial-gradient(ellipse at 50% 28%, #633055 0, #241535 58%, #181028 100%);
  box-shadow: 0 0 54px #ffc06368, 0 13px 36px #0b0715c7;
}
#slot-match-dialog.is-jackpot::backdrop { background: #0a061067; }
.is-jackpot .slot-match-symbols {
  font: italic 900 clamp(66px, 22vw, 112px)/.95 Georgia, serif;
  color: #ffdf87;
  letter-spacing: -.075em;
  text-shadow: 0 3px #9d4023, 0 7px #421627, 0 0 28px #ffbf4f8c;
}
.slot-match-dialog .slot-jackpot-label {
  margin: 0 24px 5px;
  color: #ffdf87;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
}
.is-jackpot .slot-match-cta,
.floating-slot-spin {
  background:
    linear-gradient(115deg, transparent 38%, #fff8dfdf 49%, transparent 60%) 100% 0 / 240% 100% no-repeat,
    linear-gradient(#fff1bb 0%, #ffdc7a 45%, #eaa23a 100%);
  color: #27121b;
  border: 1px solid #ffe4a1;
  text-shadow: 0 1px #fff0b078;
  --slot-button-depth:
    inset 0 2px 0 #fff8de,
    inset 0 -3px 0 #b97425a0,
    0 5px 0 #a55d1b,
    0 7px 0 #673216,
    0 12px 12px -3px #100812e0;
  box-shadow: var(--slot-button-depth), 0 0 14px #ffc45d70;
}
#slot-match-dialog.is-jackpot[open] .slot-match-cta:active,
.floating-slot-spin:enabled:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 0 #fff8de,
    inset 0 -3px 0 #b97425a0,
    0 2px 0 #673216,
    0 5px 7px -2px #100812e0;
  animation: none;
}
@keyframes prism-jackpot-cta-shine {
  0%, 12% { background-position: 100% 0, 0 0; }
  58%, 100% { background-position: 0 0, 0 0; }
}
@keyframes prism-jackpot-cta-pulse {
  0%, 100% { transform: scale(1); box-shadow: var(--slot-button-depth), 0 0 14px #ffc45d70; }
  50% { transform: scale(1.035); box-shadow: var(--slot-button-depth), 0 0 25px #ffc45da8; }
}
@keyframes prism-jackpot-pop {
  0% { opacity: .35; transform: scale(.74); }
  60% { opacity: 1; transform: scale(1.09); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
  #slot-match-dialog.is-jackpot[open] .slot-match-symbols { animation: prism-jackpot-pop .58s ease-out both; }
  #slot-match-dialog.is-jackpot[open] .slot-match-cta,
  .floating-slot-spin:enabled {
    animation: prism-jackpot-cta-shine 2.6s ease-in-out infinite,
               prism-jackpot-cta-pulse var(--slot-pulse);
  }
}
.slot-match-close {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  background: transparent;
  color: #fff2dc;
  font-size: 24px;
}
.slot-match-symbols { color: #ffd77e; font-size: clamp(29px, 10vw, 42px); }
.slot-match-dialog h2 { margin-bottom: 8px; font-size: clamp(22px, 7vw, 30px); }
.slot-match-dialog .slot-action { margin-top: 8px; }
.slot-match-cta { width: 100%; }
@media (max-width: 700px) {
  .floating-slot { bottom: calc(66px + env(safe-area-inset-bottom)); }
}
.catalog{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.logos{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.logo{background:#fff;border-radius:9px;min-width:0;height:70px;display:flex;align-items:center;justify-content:center;padding:10px}
.logo img,.logo amp-img{width:100%;height:50px;object-fit:contain}
.logo amp-img img{object-fit:contain}
.panel{background:#211a39;border:1px solid #6a588e;border-radius:14px;padding:20px}
.closing{display:flex;justify-content:space-between;align-items:center;gap:12px}
details.faq{border-bottom:1px solid #655780;padding:12px 0}
details.faq summary{font-weight:700}
.dock{display:none}
.modal-inner{background:#211a39;padding:16px;border-radius:14px;width:min(88vw,460px);margin:auto}
.modal-inner img,.modal-inner amp-img{width:100%;border-radius:8px;margin-bottom:12px}
dialog{border:1px solid #8075a3;background:#211a39;color:white;border-radius:14px;padding:0;max-width:90vw}
dialog::backdrop{background:#080817c9}
.lightbox{background:#080817e8;display:flex;align-items:center;justify-content:center;height:100%}
.close{float:right;margin-bottom:8px}
footer{color:#c4badb;font-size:13px}
@media(max-width:700px){header,main,footer{padding:12px 14px}
.hero{grid-template-columns:minmax(0,1fr);gap:12px;padding:8px 0}
.catalog{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.logos{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.closing{display:block}
.dock{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:4;background:#151329;border-top:1px solid #76629a;justify-content:space-around;padding:8px 8px calc(8px + env(safe-area-inset-bottom));gap:6px}
.dock a{flex:1;text-align:center;padding:8px 2px;font-size:13px}
.dock a:last-child{background:#91fbd1;color:#101124;border-radius:8px;font-weight:700}
footer{padding-bottom:85px}
.panel{padding:15px}
.brand{font-size:19px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}
}

header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px}

.brand::before{content:"✦";display:inline-grid;place-items:center;width:30px;height:30px;margin-right:8px;border:1px solid #92f3cd;border-radius:8px;color:#92f3cd;font-size:18px;vertical-align:middle}

.top-cta{font-size:14px;padding:8px 12px;white-space:nowrap}

.hero{border:1px solid #685c8d;border-radius:18px;padding:clamp(14px,3vw,30px);background:linear-gradient(145deg,#17182ce8,#211a39b0);box-shadow:0 24px 64px #080a17aa}

.hero-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}

.secondary{background:transparent;color:#e3dcfa;border:1px solid #8075a3}

.nav{scrollbar-width:thin}


.wa{position:fixed;right:16px;bottom:16px;z-index:6;background:#16664e;color:#fff;border:1px solid #91fbd1;border-radius:999px;padding:10px 16px;font-weight:700}

.logo{height:auto;min-height:68px}

.logo amp-img{height:auto}

#logos .logo {
  background: #251c37;
  border: 1px solid #655582;
  padding: 8px;
}

#logos .logo > :is(img, amp-img) {
  height: auto;
  max-width: 116px;
}

#logos .logo amp-img img {
  height: 100%;
  object-fit: contain;
}

#logos .logo--qris {
  background: #fff;
}


dialog{max-height:86vh;overflow:auto}

.modal-inner{width:min(88vw,440px)}

.modal-inner img{max-height:54vh;object-fit:contain}

.lightbox{overflow:auto;padding:12px}

@media(max-width:700px){header{gap:7px}
.brand{font-size:16px;line-height:1.1}
.brand::before{width:24px;height:24px;margin-right:4px}
.top-cta{padding:8px}
.hero{padding:14px}
.wa{bottom:calc(68px + env(safe-area-inset-bottom));right:12px}
}

@media(max-width:360px){.brand::before{display:none}
.top-cta{font-size:12px}
}


.feature-video {
  max-width: 880px;
  margin: 26px auto;
  padding: clamp(12px, 3vw, 22px);
  border: 1px solid #645582;
  border-radius: 16px;
  background: #1c172de8;
}

.feature-video h2 { margin: 0 0 12px; }

.feature-video video,
.feature-video amp-video {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #100e1c;
}

.feature-video video {
  height: auto;
  aspect-ratio: 16 / 9;
}

.site-footer {
  padding-top: 30px;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid #655582;
  border-radius: 16px 16px 0 0;
  background: #1b162de8;
}

.site-footer .footer-brand {
  display: inline-flex;
  align-items: center;
  font-size: clamp(16px, 2vw, 21px);
}

.site-footer h2 {
  margin: 0 0 8px;
  font: 700 16px/1.25 Barlow, Arial, sans-serif;
  letter-spacing: 0;
  color: #f6f3ff;
}

.site-footer p {
  margin: 8px 0 0;
  font-size: 14px;
}

.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer nav a,
.site-footer .footer-contact {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
}

.site-footer a:hover { color: #91fbd1; }
.site-footer .footer-contact { color: #91fbd1; }

.site-footer .footer-social {
  padding: 18px 0;
  border-top: 1px solid #554567;
}
.site-footer .footer-social ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 10px 0 0;
  list-style: none;
}
.site-footer .footer-social a,
.site-footer .footer-social .footer-social-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #554567;
  border-radius: 9px;
  background: #18122c;
}
.site-footer .footer-social a { border-color: #91fbd1; }
.site-footer .footer-social a:hover,
.site-footer .footer-social a:focus-visible { background: #2a2243; }

.site-footer .footer-license {
  padding: 18px 0;
  border-top: 1px solid #554567;
}
.site-footer .footer-license ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 10px 0;
  list-style: none;
}
.site-footer .footer-license a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid #554567;
  border-radius: 8px;
  background: #18122c;
}
.site-footer .footer-license a:focus-visible,
.site-footer .footer-license a:hover { border-color: #91fbd1; }
.site-footer .footer-license p { margin: 0; }

.site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 20px;
  padding: 9px clamp(16px, 3vw, 28px);
  border: 1px solid #655582;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: #151329;
}

.site-footer .footer-bottom p { margin: 0; }
.site-footer .footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

.site-footer .footer-age {
  display: inline-block;
  margin-right: 5px;
  padding: 1px 6px;
  border: 1px solid #a181d0;
  border-radius: 5px;
  color: #f6f3ff;
}

@media (max-width: 820px) {
  .site-footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }
}

@media (max-width: 700px) {
  .site-footer {
    padding-bottom: calc(98px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .site-footer .footer-identity,
  .site-footer .footer-support {
    grid-column: 1 / -1;
  }
}

.player-board {
  --board-line: #25241d;
  color-scheme: light;
  padding: clamp(10px, 2.8vw, 20px);
  border: 3px solid #1c1d19;
  border-radius: 6px;
  background: #fff6da;
  box-shadow: 6px 6px 0 #a7f73b;
  color: #1c1d19;
  font: 600 clamp(12px, 2vw, 16px)/1.4 ui-monospace, Menlo, Consolas, monospace;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  padding: clamp(8px, 2vw, 16px);
  border: 2px solid #1c1d19;
  border-left: 8px solid #a7f73b;
  background: #1c1d19;
  color: #baff60;
}

.board-head h2 {
  margin: 0;
  color: inherit;
  font: 900 clamp(17px, 3.4vw, 33px)/1.05 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: -.055em;
  text-transform: uppercase;
}

.board-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 7px;
  border-radius: 2px;
  background: #a1241c;
  color: #fff7ee;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.board-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff5e8;
}

/* prism:board-status:start */
.board-head { flex-wrap: wrap; }

.board-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
  white-space: nowrap;
}

.board-heartbeat {
  position: relative;
  width: clamp(62px, 12vw, 104px);
  height: 34px;
  border: 1px solid #567432;
  border-radius: 4px;
  background-color: #152019;
  background-image: linear-gradient(#baff601f 1px, transparent 1px),
                    linear-gradient(90deg, #baff601f 1px, transparent 1px);
  background-size: 8px 8px;
  background-position: center;
}

.board-heartbeat::before,
.board-heartbeat::after {
  content: "";
  position: absolute;
  inset: 3px 4px;
  clip-path: polygon(0 55%, 17% 55%, 24% 39%, 32% 55%, 38% 55%, 44% 68%,
    50% 0, 57% 89%, 65% 55%, 72% 55%, 79% 42%, 89% 55%, 100% 55%,
    100% 64%, 87% 64%, 79% 52%, 74% 64%, 68% 64%, 56% 100%, 50% 25%,
    45% 81%, 36% 64%, 30% 64%, 24% 50%, 19% 64%, 0 64%);
}

.board-heartbeat::before { background: #88bd50; }

.board-heartbeat::after {
  background-image: linear-gradient(90deg, transparent 24%, #99f84b 42%, #f8ffcf 49%,
                                    #fff 50%, transparent 53%);
  background-size: 200% 100%;
  background-position: 50% 0;
}

.board-clock, .board-clock-holder {
  display: inline-block;
  width: 110px;
  height: 24px;
  font: 800 13px/24px ui-monospace, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: #fff6da;
}

@keyframes board-heartbeat {
  from { background-position: 110% 0; }
  to { background-position: -55% 0; }
}

@keyframes board-live-pulse {
  0%, 27%, 70%, 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
  36% { transform: scale(1.28); box-shadow: 0 0 0 2px #fff5e8a8; }
  58% { transform: scale(1); box-shadow: 0 0 0 5px #fff5e800; }
}

@media (prefers-reduced-motion: no-preference) {
  .board-heartbeat::after { animation: board-heartbeat 1.5s linear infinite; }
  .board-status .board-live::before { animation: board-live-pulse 1.5s ease-out infinite; }
}

@media (max-width: 540px) {
  .board-status { margin-left: 0; }
}
/* prism:board-status:end */

.board-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(8px, 1.8vw, 16px);
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.podium-player {
  --rank-shade: #f0eee7;
  position: relative;
  display: grid;
  justify-items: center;
  min-width: 0;
  min-height: 150px;
  gap: 6px;
  padding: 13px 10px 10px;
  border: 2px solid #272720;
  border-radius: 3px;
  background: var(--rank-shade);
  text-align: center;
}

.podium-player:nth-child(1) {
  --rank-shade: #d4ff75;
  box-shadow: 3px 3px #2c351e;
}

.podium-player:nth-child(3) {
  --rank-shade: #ffdbbc;
}

.podium-rank {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 2px 6px;
  border-radius: 2px;
  background: #1c1d19;
  color: #fff6da;
  font-size: 12px;
  font-weight: 800;
}

.podium-player h3 {
  margin: 0;
  font-size: clamp(13px, 2.2vw, 18px);
  font-weight: 900;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}

.podium-player .player-avatar {
  width: 54px;
  border: 2px solid #272720;
}

.podium-player:nth-child(1) .player-avatar { width: 70px; }

.podium-player dl {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px 12px;
  width: 100%;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.podium-player dt {
  color: #42423a;
  font-size: 10px;
}
.podium-player dd {
  margin: 0;
  color: #171912;
  font-weight: 800;
  font-size: clamp(12px, 2vw, 17px);
}

.player-list {
  width: 100%;
  border: 2px solid var(--board-line);
  border-collapse: collapse;
  background: #fffaf0;
  color: #25241d;
  text-align: start;
  font-size: clamp(11px, 2.7vw, 15px);
  font-variant-numeric: tabular-nums;
}

.player-list :is(th, td) {
  padding: 8px clamp(3px, 1.4vw, 14px);
  border-bottom: 1px solid var(--board-line);
  text-align: start;
}

.player-list thead th {
  color: #fff6da;
  background: #1c1d19;
}
.player-list :is(th, td):nth-last-child(-n+2) { text-align: end; }
.player-list td:nth-last-child(-n+2) { white-space: nowrap; }
.player-list tbody td:first-child {
  color: #1c1d19;
  font-weight: 900;
}
.player-list tbody tr:nth-child(even) {
  background: #f4ecd4;
}

.player-name {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.5vw, 12px);
  overflow-wrap: anywhere;
}

.player-avatar {
  display: block;
  flex: 0 0 auto;
  width: clamp(25px, 6vw, 42px);
  aspect-ratio: 1;
  border-radius: 3px;
  background: #25241d url('assets/players/avatar-sheet.jpg') no-repeat;
  background-size: 500% 200%;
}

.player-board > p { color: #39392e; }

@media (min-width: 620px) {
  .podium-player { grid-row: 1; }
  .podium-player:nth-child(1) { grid-column: 2; min-height: 172px; }
  .podium-player:nth-child(2) { grid-column: 1; }
  .podium-player:nth-child(3) { grid-column: 3; }
}

@media (max-width: 520px) {
  .board-podium { grid-template-columns: minmax(0, 1fr); }
  .podium-player {
    grid-template-columns: 58px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    min-height: 78px;
    gap: 2px 8px;
    padding: 10px 9px 10px 41px;
    text-align: start;
  }
  .podium-player .player-avatar,
  .podium-player:nth-child(1) .player-avatar { width: 54px; }
  .podium-player dl { justify-content: start; }
}

.podium-avatar {
  position: relative;
  display: block;
}

.podium-crown {
  position: absolute;
  top: -14px;
  right: -14px;
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 1px #35200095);
  pointer-events: none;
}

.rank-move {
  display: inline-block;
  padding: 1px 3px;
  border-radius: 2px;
  font-size: .78em;
  font-weight: 800;
}

.rank-move--naik { background: #d8f2cc; color: #165a27; }
.rank-move--turun { background: #f9ded6; color: #841b16; }

.podium-player > .rank-move { position: absolute; top: 8px; right: 7px; }
.table-rank { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.board-metric {
  position: relative;
  display: inline-block;
  height: 1.4em;
  overflow: hidden;
  line-height: 1.4;
  vertical-align: bottom;
}

.board-roll {
  position: absolute;
  inset: 0 0 auto;
  display: block;
  white-space: pre;
  text-align: end;
  opacity: 0;
}

@keyframes board-arrive {
  from { opacity: .35; transform: translateY(19px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes podium-crown-float {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50% { transform: translateY(-6px) rotate(8deg); }
}

@media (prefers-reduced-motion: no-preference) {
  .podium-crown { animation: podium-crown-float 2.6s ease-in-out infinite; }

  .player-board.board-entered { animation: board-arrive 460ms ease-out both; }

  @supports (animation-timeline: view(block)) {
    .player-board {
      animation: board-arrive 1s ease-out both;
      animation-timeline: view(block);
      animation-range: entry 0% entry 45%;
    }
  }
}

@media (max-width: 520px) {
  .podium-avatar { grid-row: span 2; }
  .podium-player > .rank-move { top: 7px; right: 7px; }
}

@keyframes board-countup {
  from { transform: translateY(0); }
  to { transform: translateY(-96%); }
}

@media (prefers-reduced-motion: no-preference) {
  .board-counting .board-value { opacity: 0; }
  .board-counting .board-roll {
    animation: board-countup 1300ms steps(24, end) both,
               board-countup-visible 1300ms steps(1, end) both;
  }
}

/* prism:board-drift:start */
.board-presence-note {
  margin: -9px 0 12px;
  color: #4a4637;
  font-size: 11px;
}

.board-presence-badges {
  display: grid;
  width: max-content;
  margin-top: 2px;
}

.podium-player .board-presence-badges { margin-inline: auto; }

.board-presence-badge {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 4px;
  border: 1px solid;
  border-radius: 3px;
  font: 700 9px/1.35 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0;
}

.board-presence-badge::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.board-online {
  border-color: #9aba9f;
  background: #e2f4e4;
  color: #154b2a;
  visibility: var(--board-active, visible);
}

.board-online::before { background: #138747; }

.board-offline {
  border-color: #a9a9a9;
  background: #e7e7e7;
  color: #424242;
  visibility: var(--board-offline, hidden);
}

.board-offline::before { background: #777; }

@keyframes board-online-pulse {
  0%, 100% { box-shadow: 0 0 0 0 #13874700; }
  25% { box-shadow: 0 0 0 2px #13874766; }
  70% { box-shadow: 0 0 0 4px #13874700; }
}

@media (prefers-reduced-motion: no-preference) {
  .board-online::before { animation: board-online-pulse 1.7s ease-out infinite; }
}

.board-active-number { visibility: var(--board-active, visible); }
.board-fixed-number {
  position: absolute;
  inset: 0;
  text-align: end;
  visibility: var(--board-offline, hidden);
}

.board-drift {
  position: absolute;
  inset: 0 0 auto;
  display: block;
  white-space: pre;
  text-align: end;
  opacity: 0;
  transform: translateY(-40%);
}

@keyframes board-countup-visible { from { opacity: 1; } to { opacity: 0; } }
@keyframes board-drift-visible { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  :is(html[amp], html[⚡]) .board-value { opacity: 0; }
  :is(html[amp], html[⚡]) .board-drift {
    opacity: 1;
    animation: var(--board-motion) 90s steps(1, end) infinite;
  }

  .board-counting .board-drift {
    animation: var(--board-motion) 90s steps(1, end) var(--board-phase, 0s) infinite,
               board-drift-visible 1300ms steps(1, end) both;
  }
}
/* prism:board-drift:end */
