/* Lucky Playland — mobile-first homepage. Pastel, soft and roomy. */
:root {
  --bg: #fff5fa;
  --bg-2: #f3ecff;
  --ink: #3a2448;
  --muted: #8a6a94;
  --card: #ffffff;
  --line: #f1dcea;
  --pink: #ff7ab0;
  --pink-2: #ff4f93;
  --peach: #ffb36b;
  --sun: #ffd25a;
  --sky: #6ec4ff;
  --violet: #9b7bff;
  --mint: #5ed8b0;
  --shadow: 0 6px 18px rgba(170, 70, 130, 0.14);
  --radius: 22px;
  --tab-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  font-family: Kanit, "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 180, 215, 0.6), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(190, 170, 255, 0.5), transparent 40%),
    #fde9f3;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 10px; }
/* SSR sets this before the application loads: disabled demo actions never flash on first paint. */
html[data-demo-enabled="false"] .actions .btn-demo,
html[data-demo-enabled="false"] .card-btns .mini.try,
html[data-demo-enabled="false"] .mb-demo { display: none !important; }

/* phone-width column, centred on larger screens */
.app {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
  box-shadow: 0 0 60px rgba(170, 70, 130, 0.15);
  overflow-x: clip;
}

/* sprites from the game sheets (4x4 cells) */
.spr {
  display: inline-block;
  background-image: var(--sheet);
  background-size: 400% 400%;
  background-position: calc(var(--c) * 100% / 3) calc(var(--r) * 100% / 3);
  image-rendering: pixelated;
}

/* ---------------------------------------------------------- install bar */
.install-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.install-bar[hidden] { display: none; }
.ib-close { width: 28px; height: 28px; border-radius: 50%; color: var(--muted); font-size: 16px; }
.ib-icon { width: 38px; height: 38px; border-radius: 10px; }
.ib-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ib-text b { font-size: 14px; letter-spacing: 0.3px; }
.ib-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-btn { padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--pink), var(--violet)); box-shadow: 0 3px 10px rgba(155, 123, 255, 0.4); white-space: nowrap; }

/* ---------------------------------------------------------- header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: 60px;
  padding: 0 10px;
  background: linear-gradient(135deg, #ff8fbe, #b48cff);
  color: #fff;
  box-shadow: 0 4px 14px rgba(180, 90, 160, 0.25);
}
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:active { background: rgba(255, 255, 255, 0.2); }
.logo { justify-self: center; display: flex; align-items: center; gap: 6px; }
.logo-cat { width: 40px; height: 40px; filter: drop-shadow(0 2px 0 rgba(90, 30, 80, 0.35)); }
.logo-text { display: flex; flex-direction: column; line-height: 0.95; }
.logo-text b { font-size: 21px; font-weight: 700; letter-spacing: 0.5px; text-shadow: 0 2px 0 rgba(120, 40, 110, 0.35); }
.logo-text i { font-style: normal; font-size: 13px; font-weight: 500; letter-spacing: 2px; opacity: 0.95; }
.lang { width: 44px; height: 32px; border-radius: 999px; background: rgba(255, 255, 255, 0.25); font-size: 13px; font-weight: 700; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }

/* ---------------------------------------------------------- marquee */
.marquee {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.mq-icon { flex: none; width: 20px; height: 20px; color: var(--pink-2); }
.mq-track { flex: 1; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.mq-track span { display: inline-block; padding-left: 100%; font-size: 14px; color: var(--ink); animation: marquee 22s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee[hidden] { display: none; }

/* ---------------------------------------------------------- hero */
.hero { position: relative; margin: 14px 14px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 16 / 9;
  scroll-snap-align: start;
  padding: 18px 18px 16px;
  color: #fff;
  overflow: hidden;
}
.slide h3 { position: relative; z-index: 2; font-size: clamp(20px, 6vw, 28px); line-height: 1.15; font-weight: 700; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.15); max-width: 62%; }
.slide p { position: relative; z-index: 2; margin-top: 6px; font-size: clamp(12px, 3.4vw, 15px); max-width: 58%; opacity: 0.95; }
.slide .tag { position: relative; z-index: 2; display: inline-block; margin-bottom: 6px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.3); font-size: 12px; font-weight: 600; }
.slide .cta { position: absolute; left: 18px; bottom: 14px; z-index: 2; padding: 7px 16px; border-radius: 999px; background: #fff; color: var(--pink-2); font-weight: 600; font-size: 14px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); }
.slide .art { position: absolute; right: -4px; bottom: -6px; z-index: 1; display: flex; align-items: flex-end; }
.slide .art .spr { width: clamp(84px, 26vw, 120px); height: clamp(84px, 26vw, 120px); animation: bob 1.6s ease-in-out infinite; }
.slide .art .spr:nth-child(2) { width: clamp(110px, 34vw, 156px); height: clamp(110px, 34vw, 156px); margin-left: -30px; animation-delay: -0.5s; }
.slide .art .spr:nth-child(3) { margin-left: -26px; animation-delay: -1s; }
.slide::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.45), transparent 45%), repeating-linear-gradient(-35deg, rgba(255, 255, 255, 0.08) 0 14px, transparent 14px 28px); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); transition: width 0.25s, background 0.25s; }
.dot.on { width: 22px; background: #fff; }

/* ---------------------------------------------------------- actions */
.actions { display: grid; gap: 10px; padding: 16px 22px 4px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.1), 0 8px 18px rgba(170, 70, 130, 0.16);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1); }
.btn svg { width: 22px; height: 22px; }
.btn-login { background: linear-gradient(135deg, #ff8a7a, var(--pink-2)); }
.btn-pattern { background: #fff; color: var(--ink); box-shadow: 0 5px 0 #f1dcea, 0 8px 18px rgba(170, 70, 130, 0.12); }
.btn-register { background: linear-gradient(135deg, var(--sun), var(--peach)); color: #5a2a00; }
.btn-demo { background: linear-gradient(135deg, #8ad8ff, var(--sky)); }
.btn-promo { background: linear-gradient(135deg, #b8a0ff, var(--violet)); }
.btn-a2hs { background: #fff; color: var(--ink); font-size: 16px; box-shadow: 0 5px 0 #f1dcea, 0 8px 18px rgba(170, 70, 130, 0.12); }
.btn-ghost { background: transparent; color: var(--muted); box-shadow: none; min-height: 44px; font-size: 16px; }

/* ---------------------------------------------------------- blocks */
.block { padding: 22px 14px 0; }
.block-title { display: flex; align-items: center; gap: 8px; margin: 0 4px 12px; font-size: 20px; font-weight: 700; }
.hot-badge { padding: 2px 10px; border-radius: 999px; background: linear-gradient(135deg, #ff7a5a, var(--pink-2)); color: #fff; font-size: 13px; letter-spacing: 1px; }
.hot-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 4px 10px; scrollbar-width: none; }
.hot-row::-webkit-scrollbar { display: none; }
.hot-card { flex: 0 0 72%; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.hot-card .thumb { aspect-ratio: 16 / 10; }
.hot-card .hc-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.hot-card .hc-body b { font-size: 16px; }
.hot-card .hc-body small { display: block; color: var(--muted); font-size: 12px; }

.filters { display: flex; gap: 8px; overflow-x: auto; padding: 0 4px 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 16px; border-radius: 999px; background: #fff; color: var(--muted); font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 2px var(--line); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card { position: relative; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.thumb { position: relative; aspect-ratio: 1 / 1; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.thumb::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 65%, rgba(255, 255, 255, 0.55), transparent 55%), repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 10px, transparent 10px 20px); }
.thumb .spr { position: relative; width: 46%; aspect-ratio: 1; margin: 0 -9% 4%; animation: bob 1.8s ease-in-out infinite; }
.thumb .spr.big { width: 62%; z-index: 1; animation-delay: -0.6s; }
.thumb .spr:last-child { animation-delay: -1.2s; }
.thumb .t-name { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); color: var(--ink); font-size: 12px; font-weight: 700; }
.badge { position: absolute; right: 8px; top: 8px; z-index: 2; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; color: #fff; }
.badge.new { background: var(--mint); }
.badge.hot { background: #ff6a5a; }
.card-body { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 15px; font-weight: 600; line-height: 1.2; }
.card-title small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.players { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.players i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(94, 216, 176, 0.25); }
.card-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mini { min-height: 36px; border-radius: 999px; font-size: 13px; font-weight: 600; display: grid; place-items: center; }
.mini.play { background: linear-gradient(135deg, var(--pink), var(--pink-2)); color: #fff; }
.mini.try { background: #fff; color: var(--pink-2); box-shadow: inset 0 0 0 2px #ffd0e3; }

/* themes per game */
.th-monsters { background: linear-gradient(160deg, #c7a6ff, #8a5ae8); }
.th-goal { background: linear-gradient(160deg, #8ee8a6, #2fae63); }
.th-paws { background: linear-gradient(160deg, #ffc6de, #ff7ab0); }
.th-kingdom { background: linear-gradient(160deg, #ffb07a, #d8402a); }
.th-critter { background: linear-gradient(160deg, #a8e0ff, #4a9ae8); }
.th-guard { background: linear-gradient(160deg, #7a5aff, #1a1050); }
.th-space { background: radial-gradient(circle at 75% 25%, #ff9ad0 0 8%, transparent 9%), linear-gradient(160deg, #3a3a9a, #080824); }
.th-fruit { background: linear-gradient(160deg, #fff09a, #ff9a3a); }
.th-cards { background: radial-gradient(ellipse at 50% 40%, #2a8a54, #0a3a24); }

/* ---------------------------------------------------------- promos */
.promo-list { display: grid; gap: 12px; }
.promo {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.promo .p-art { width: 70px; height: 70px; border-radius: 16px; display: grid; place-items: center; }
.promo .p-art .spr { width: 62px; height: 62px; }
.promo b { display: block; font-size: 15px; }
.promo small { color: var(--muted); font-size: 12px; line-height: 1.3; display: block; }
.promo .p-go { padding: 8px 12px; border-radius: 999px; background: var(--bg-2); color: var(--violet); font-size: 13px; font-weight: 600; }

/* ---------------------------------------------------------- footer */
.foot { margin-top: 28px; padding: 22px 18px 8px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.foot-logo { font-size: 20px; color: var(--ink); }
.foot-logo b { color: var(--pink-2); }
.age { display: inline-flex; gap: 6px; align-items: center; }
.copy { opacity: 0.7; }

/* ---------------------------------------------------------- tab bar */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 30;
  width: 100%;
  max-width: 480px;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -6px 20px rgba(170, 70, 130, 0.14);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; color: var(--muted); }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--pink-2); font-weight: 600; }
.tab-mid { position: relative; }
.mid-ball {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-top: -26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  box-shadow: 0 0 0 5px #fff, 0 8px 16px rgba(155, 123, 255, 0.45);
}
.mid-ball .spr { width: 46px; height: 46px; animation: bob 1.4s ease-in-out infinite; }

/* ---------------------------------------------------------- floating helpers */
.side-tab {
  position: fixed;
  right: max(0px, calc(50% - 240px));
  top: 38%;
  z-index: 25;
  writing-mode: vertical-rl;
  padding: 14px 8px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, var(--peach), var(--pink-2));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: -3px 4px 12px rgba(170, 70, 130, 0.25);
}
.float-badge { position: fixed; right: calc(max(0px, calc(50% - 240px)) + 46px); top: calc(38% + 4px); z-index: 25; }
.float-badge[hidden] { display: none; }
.fb-body { position: relative; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 22px; background: linear-gradient(135deg, #fff3a0, var(--peach)); box-shadow: 0 6px 16px rgba(255, 140, 60, 0.4); animation: wiggle 2.4s ease-in-out infinite; }
.fb-body .spr { width: 56px; height: 56px; }
.fb-body b { position: absolute; bottom: -6px; padding: 1px 8px; border-radius: 999px; background: var(--pink-2); color: #fff; font-size: 11px; }
.fb-close { position: absolute; right: -6px; top: -6px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: rgba(58, 36, 72, 0.6); color: #fff; font-size: 14px; line-height: 1; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-8deg); } 90% { transform: rotate(8deg); } 95% { transform: rotate(-4deg); } }
.support {
  position: fixed;
  right: calc(max(0px, calc(50% - 240px)) + 14px);
  bottom: calc(var(--tab-h) + var(--safe-b) + 14px);
  z-index: 25;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--peach), var(--pink-2));
  box-shadow: 0 6px 16px rgba(255, 80, 140, 0.45);
}
.support svg { width: 26px; height: 26px; }
.chat-pop {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + var(--safe-b) + 80px);
  transform: translateX(-50%);
  z-index: 26;
  width: min(92vw, 420px);
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(90, 30, 80, 0.25);
  animation: rise 0.25s ease-out;
}
.chat-pop[hidden] { display: none; }
.cp-x { position: absolute; right: 10px; top: 8px; font-size: 22px; color: var(--muted); }
.cp-row { display: flex; gap: 10px; align-items: flex-start; }
.cp-ava { flex: none; width: 46px; height: 46px; border-radius: 50%; background-color: #ffe3ef; }
.cp-row b { font-size: 15px; }
.cp-row p { font-size: 14px; color: var(--ink); margin-top: 2px; }
.cp-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.cp-ghost, .cp-main { min-height: 40px; border-radius: 12px; font-weight: 600; }
.cp-ghost { box-shadow: inset 0 0 0 2px var(--line); color: var(--muted); }
.cp-main { background: linear-gradient(135deg, var(--pink), var(--violet)); color: #fff; }

/* ---------------------------------------------------------- drawer */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(58, 36, 72, 0.4); }
.scrim[hidden] { display: none; }
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: max(0px, calc(50% - 240px));
  z-index: 41;
  width: min(80vw, 320px);
  background: #fff;
  transform: translateX(-110%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
  box-shadow: 10px 0 30px rgba(90, 30, 80, 0.2);
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); visibility: visible; transition: transform 0.25s ease; }
.dr-head { display: grid; grid-template-columns: 48px 1fr 44px; align-items: center; gap: 8px; padding: 16px 12px; background: linear-gradient(135deg, #ff8fbe, #b48cff); color: #fff; }
.dr-head .logo-cat { width: 48px; height: 48px; }
.dr-head b { display: block; font-size: 17px; }
.dr-head small { font-size: 12px; opacity: 0.9; }
.dr-links { display: flex; flex-direction: column; padding: 10px; }
.dr-links a, .dr-links button { text-align: left; padding: 14px 14px; border-radius: 14px; font-size: 16px; }
.dr-links a:active, .dr-links button:active { background: var(--bg); }

/* ---------------------------------------------------------- modals */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(58, 36, 72, 0.45); }
.modal[hidden] { display: none; }
.modal.center { align-items: center; padding: 16px; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 26px 22px calc(22px + var(--safe-b));
  border-radius: 28px 28px 0 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: rise 0.25s ease-out;
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet h3 { font-size: 22px; text-align: center; }
.sh-x { position: absolute; right: 14px; top: 10px; width: 40px; height: 40px; font-size: 26px; color: var(--muted); border-radius: 50%; }
.sh-mascot { width: 80px; height: 80px; align-self: center; margin-top: -8px; }
.sh-note { text-align: center; color: var(--muted); font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.field input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); font-size: 16px; outline: none; }
.field input:focus { border-color: var(--pink); background: #fff; }
.pw { position: relative; display: block; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; font-size: 18px; }
.sh-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.chk input { width: 18px; height: 18px; accent-color: var(--pink-2); }
.link { color: var(--pink-2); font-weight: 600; }
.sh-alt { text-align: center; font-size: 14px; color: var(--muted); }
.pattern { align-self: center; width: min(78vw, 300px); height: min(78vw, 300px); border-radius: 24px; background: var(--bg-2); touch-action: none; }
.contact-list { display: grid; gap: 10px; }
.contact { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--bg); font-size: 16px; font-weight: 600; }
.contact i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 13px; font-weight: 700; }
.contact small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.steps { padding-left: 22px; display: grid; gap: 8px; font-size: 15px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + var(--safe-b) + 20px);
  transform: translate(-50%, 20px);
  z-index: 60;
  max-width: 90vw;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* a little roomier on tablets / desktop, still the phone column */
@media (min-width: 481px) {
  body { padding: 0; }
  .grid { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* keep floating helpers out of the content: badge stacks above the support button, slim side tab */
.float-badge { top: auto; right: calc(max(0px, calc(50% - 240px)) + 12px); bottom: calc(var(--tab-h) + var(--safe-b) + 80px); }
.fb-body { width: 58px; height: 58px; border-radius: 18px; }
.fb-body .spr { width: 46px; height: 46px; }
.side-tab { top: 26%; padding: 10px 5px; font-size: 12px; opacity: 0.92; }

/* top banner image under the announcement bar */
.top-banner { position: relative; margin: 0; line-height: 0; background: linear-gradient(135deg, #ffc6de, #c7a6ff); }
.top-banner[hidden] { display: none; }
.top-banner img { width: 100%; height: auto; aspect-ratio: 2000 / 1125; object-fit: cover; display: block; }
.top-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: linear-gradient(180deg, rgba(255, 245, 250, 0), var(--bg)); }

/* brand logo image in the header and side menu */
.logo-img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; box-shadow: 0 2px 6px rgba(90, 30, 80, 0.35); }
.dr-head .logo-img { width: 48px; height: 48px; }

/* ---------------------------------------------------------- illustrated slide with animated cut-out characters */
.img-slide { padding: 0; background: #bfe6ff; }
.img-slide::before { display: none; }
.img-slide .img-base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cuts { position: absolute; inset: 0; }
.cut-group { position: absolute; inset: 0; animation-duration: 2.2s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
.cut {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%);
  height: calc(var(--h) * 1%);
  background-image: var(--img);
  background-repeat: no-repeat;
  background-size: calc(10000% / var(--w)) calc(10000% / var(--h));
  background-position: calc(var(--x) / (100 - var(--w)) * 100%) calc(var(--y) / (100 - var(--h)) * 100%);
  -webkit-mask-image: radial-gradient(ellipse closest-side, #000 66%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side, #000 66%, transparent 100%);
  transform-origin: 50% 90%;
  animation-duration: 2.2s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  will-change: transform;
}
@keyframes fox-jump {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  30% { transform: translate(0.6%, -3.5%) rotate(-1.6deg) scale(1.015); }
  55% { transform: translate(0.2%, -1%) rotate(0.8deg) scale(1.01, 0.995); }
  75% { transform: translate(0, 0.6%) rotate(0deg) scale(1.01, 0.985); }
}
@keyframes leaf-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-4%) rotate(2.2deg); }
  50% { transform: translateY(0) rotate(0deg) scale(1.015, 0.985); }
  75% { transform: translateY(-2.5%) rotate(-2deg); }
}
@keyframes pink-hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.6%); }
}
@keyframes wing-l { 0%, 100% { transform: rotate(0deg); } 25%, 75% { transform: rotate(-9deg); } 50% { transform: rotate(4deg); } }
@keyframes wing-r { 0%, 100% { transform: rotate(0deg); } 25%, 75% { transform: rotate(10deg); } 50% { transform: rotate(-4deg); } }
.cut[style*="wing-l"], .cut[style*="wing-r"] { animation-duration: 0.55s; }
@keyframes ball-glow {
  0%, 100% { transform: scale(1); filter: brightness(1) drop-shadow(0 0 0 rgba(255, 240, 150, 0)); }
  50% { transform: scale(1.03); filter: brightness(1.18) drop-shadow(0 0 10px rgba(255, 240, 150, 0.9)); }
}
.cut[style*="ball-glow"] { transform-origin: 50% 55%; animation-duration: 1.6s; }
.sparkles i {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  background: radial-gradient(circle, #fff 0 18%, transparent 20%), conic-gradient(from 45deg, transparent 0 10%, #fff 12% 13%, transparent 15% 35%, #fff 37% 38%, transparent 40% 60%, #fff 62% 63%, transparent 65% 85%, #fff 87% 88%, transparent 90%);
  border-radius: 50%;
  opacity: 0;
  animation: twinkle 2.6s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(255, 255, 210, 0.9));
}
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 50% { opacity: 1; transform: scale(1.2) rotate(45deg); } }
.img-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: sweep 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sweep { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.img-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 26px 16px 52px;
  background: linear-gradient(180deg, transparent, rgba(30, 20, 60, 0.55));
}
.img-cap h3 { max-width: none; font-size: clamp(20px, 6vw, 26px); }
.img-cap p { max-width: none; margin-top: 2px; }
.img-cap .tag { margin-bottom: 4px; }
.img-slide .cta { z-index: 3; }
/* lighter caption so the illustration stays visible */
.img-cap { padding: 0 14px 50px; background: linear-gradient(180deg, transparent 0%, rgba(30, 20, 60, 0.45) 100%); height: 46%; display: flex; flex-direction: column; justify-content: flex-end; }
.img-cap h3 { font-size: clamp(16px, 4.8vw, 21px); }
.img-cap p { display: none; }
.img-cap .tag { align-self: flex-start; font-size: 11px; }
.img-slide .cta { padding: 6px 14px; font-size: 13px; bottom: 12px; }

/* game card with the animated scene: a 16:9 box that covers the card, centred */
.thumb.has-scene { display: block; }
.thumb.has-scene::before { display: none; }
.scene-box { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 16 / 9; min-width: 100%; transform: translateX(-50%); overflow: hidden; }
.scene-box .img-base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb.has-scene .badge { z-index: 3; }
.scene-box .sparkles i { width: 10px; height: 10px; margin: -5px 0 0 -5px; }
/* square cards: show the middle-right of the scene so the fox, ball and leaf sprite all stay in view */
.grid .scene-box { left: 38%; }

/* Kingdom Ways scene motions */
@keyframes hero-breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-1.2%) scale(1.01, 1.015); } }
@keyframes blade-swing { 0%, 100% { transform: rotate(0deg); } 35% { transform: rotate(-6deg); } 55% { transform: rotate(3deg); } }
@keyframes sage-sway { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(0.8deg) translateY(-0.8%); } }
@keyframes fan-wave { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-10deg); } 60% { transform: rotate(6deg); } }
@keyframes general-sway { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(-0.9deg) translateY(-1%); } }
@keyframes reel-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.2) saturate(1.1); } }
.cut[style*="hero-breathe"] { animation-duration: 2.6s; }
.cut[style*="blade-swing"] { animation-duration: 2.6s; }
.cut[style*="sage-sway"], .cut[style*="general-sway"] { animation-duration: 3.2s; }
.cut[style*="fan-wave"] { animation-duration: 1.8s; }
.cut[style*="reel-glow"] { animation-duration: 1.4s; transform-origin: 50% 50%; }
.petals i {
  position: absolute;
  top: -6%;
  width: 10px;
  height: 7px;
  border-radius: 70% 0 70% 0;
  background: linear-gradient(135deg, #ffd6e6, #ff8ab8);
  opacity: 0.9;
  animation: petal-fall 6s linear infinite;
}
@keyframes petal-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.95; }
  100% { transform: translate(-40px, 260px) rotate(540deg); opacity: 0; }
}

@keyframes slime-wobble { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(1.05, 0.95); } 60% { transform: scale(0.96, 1.05) translateY(-2%); } }
.cut[style*="slime-wobble"] { animation-duration: 1.6s; }

/* Golden Goal: lion kicks, ball flies into the net (2.6s loop) */
@keyframes lion-kick {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  14% { transform: translate(-1.5%, 0.5%) rotate(-3deg); }
  24% { transform: translate(2.5%, -1.5%) rotate(3.5deg) scale(1.02); }
  40% { transform: translate(1%, -3%) rotate(1deg); }
  60% { transform: translate(0, -1.5%) rotate(-1deg); }
  80% { transform: translate(0, 0) rotate(0deg); }
}
.cut[style*="lion-kick"] { animation-duration: 2.6s; }
.goal-ball {
  -webkit-mask-image: radial-gradient(circle closest-side, #000 90%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, #000 90%, transparent 100%);
  transform-origin: 50% 50%;
  animation: goal-shot 2.6s cubic-bezier(.3, .6, .35, 1) infinite;
}
@keyframes goal-shot {
  0%, 22% { transform: translate(-150%, 82%) scale(0.42) rotate(0deg); opacity: 0; }
  24% { transform: translate(-150%, 82%) scale(0.42) rotate(0deg); opacity: 1; }
  42% { transform: translate(-72%, -12%) scale(0.72) rotate(320deg); opacity: 1; }
  58% { transform: translate(0, 0) scale(1) rotate(640deg); opacity: 1; }
  64% { transform: translate(2%, -1%) scale(0.96, 1.04) rotate(660deg); }
  72%, 100% { transform: translate(0, 0) scale(1) rotate(680deg); opacity: 1; }
}
.goal-flare {
  position: absolute;
  left: 63%;
  top: 14%;
  width: 35%;
  height: 56%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 252, 225, 1) 0 38%, rgba(255, 225, 120, 0.85) 55%, rgba(255, 210, 80, 0) 72%);
  animation: goal-flare 2.6s ease-in-out infinite;
}
@keyframes goal-flare { 0%, 18% { opacity: 0; } 24%, 54% { opacity: 1; } 66%, 100% { opacity: 0; } }
.goal-burst {
  position: absolute;
  left: 80.5%;
  top: 42%;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 6px solid rgba(255, 245, 190, 0.95);
  box-shadow: 0 0 24px rgba(255, 220, 90, 0.9);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  animation: goal-burst 2.6s ease-out infinite;
}
@keyframes goal-burst { 0%, 57% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); } 60% { opacity: 1; } 82%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } }
.grid .scene-box.scene-slot2 { left: 56%; }
.grid .scene-box.scene-slot3 { left: 50%; }

/* Lucky Monsters: lever pulled, wheel face spins two turns and rocks to a stop (3.2s loop) */
.cut.round { -webkit-mask-image: radial-gradient(circle closest-side, #000 94%, transparent 100%); mask-image: radial-gradient(circle closest-side, #000 94%, transparent 100%); transform-origin: 50% 50%; }
@keyframes wheel-spin {
  0%, 8% { transform: rotate(0deg); }
  58% { transform: rotate(735deg); }
  66% { transform: rotate(714deg); }
  74%, 100% { transform: rotate(720deg); }
}
.cut[style*="wheel-spin"] { animation-duration: 3.2s; animation-timing-function: cubic-bezier(.25, .7, .3, 1); }
@keyframes lever-pull { 0%, 100% { transform: rotate(0deg); } 4% { transform: rotate(0deg); } 10% { transform: rotate(28deg); } 20% { transform: rotate(-6deg); } 28% { transform: rotate(2deg); } 34% { transform: rotate(0deg); } }
.cut[style*="lever-pull"] { animation-duration: 3.2s; }
/* wheel: rock back and forth; the lower-right quarter (behind the slot machine) stays out of the moving layer */
.cut.round[style*="wheel-spin"] {
  -webkit-mask-image: radial-gradient(circle closest-side, #000 94%, transparent 100%), conic-gradient(#000 0 80deg, transparent 100deg 190deg, #000 210deg);
  -webkit-mask-composite: source-in;
  mask-image: radial-gradient(circle closest-side, #000 94%, transparent 100%), conic-gradient(#000 0 80deg, transparent 100deg 190deg, #000 210deg);
  mask-composite: intersect;
  animation-timing-function: ease-in-out;
}
@keyframes wheel-spin {
  0%, 8% { transform: rotate(0deg); }
  22% { transform: rotate(-20deg); }
  38% { transform: rotate(16deg); }
  52% { transform: rotate(-9deg); }
  64% { transform: rotate(4deg); }
  74%, 100% { transform: rotate(0deg); }
}
.grid .scene-box.scene-slot { left: 54%; }
.promo .p-art { overflow: hidden; }
.p-rig { width: 64px; height: 64px; image-rendering: pixelated; }

/* pattern lock inside the log-in / sign-up sheets */
.pt-head { display: flex; align-items: center; justify-content: space-between; }
.pt-clear { font-size: 14px; }
.sheet .pattern { width: min(70vw, 240px); height: min(70vw, 240px); margin: 4px auto 0; display: block; }
.pt-note { text-align: center; font-size: 13px; color: var(--muted); min-height: 18px; }
.pt-note.bad { color: #e8445a; }
.pt-note.ok { color: #1fa87a; }
.pt-steps { display: flex; justify-content: center; gap: 8px; margin: 2px 0; }
.pt-step { padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; }
.pt-step.on { background: var(--pink); color: #fff; }
.pt-step.done { background: var(--mint); color: #fff; }
.sh-note.small { font-size: 12px; }
.btn-login.member { background: linear-gradient(135deg, #8ad8c0, #3ab890); }
/* toast at the top so it never covers form fields or the pattern pad */
.toast { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 12px); transform: translate(-50%, -20px); z-index: 70; }
.toast.show { transform: translate(-50%, 0); }

/* pattern pad: compact soft card */
.sheet .pattern {
  width: min(56vw, 190px);
  height: min(56vw, 190px);
  margin: 6px auto 0;
  padding: 0;
  border-radius: 24px;
  background: linear-gradient(160deg, #fbf7ff, #f3ecff);
  box-shadow: inset 0 0 0 1.5px #ece2fa, 0 6px 16px rgba(155, 123, 255, 0.12);
  cursor: crosshair;
}
.pt-head { font-size: 14px; }
.pt-note { margin-top: 2px; font-size: 12.5px; }
.pt-steps { margin: 0 0 2px; }
.pt-step { font-size: 11.5px; padding: 2px 9px; }

/* header music button + volume popover */
.topbar { grid-template-columns: 44px 1fr auto; }
.top-right { display: flex; align-items: center; gap: 6px; }
.music-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55); }
.music-btn svg { width: 20px; height: 20px; }
.music-btn .ico-off { display: none; }
.music-btn.off .ico-on { display: none; }
.music-btn.off .ico-off { display: block; }
.eq { position: absolute; right: -2px; bottom: -2px; display: none; gap: 1.5px; align-items: flex-end; height: 12px; padding: 2px 3px; border-radius: 6px; background: #fff; }
.eq b { width: 2.5px; background: var(--pink-2); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.eq b:nth-child(2) { animation-delay: -0.3s; }
.eq b:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 8px; } }
.music-btn.playing .eq { display: flex; }
.music-pop {
  position: fixed;
  top: 66px;
  right: max(10px, calc(50% - 230px));
  z-index: 45;
  width: min(300px, calc(100vw - 20px));
  padding: 14px 16px 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(90, 30, 80, 0.22), 0 0 0 1.5px var(--line);
  animation: rise 0.2s ease-out;
}
.music-pop[hidden] { display: none; }
.mp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mp-head b { font-size: 16px; }
.mp-x { width: 32px; height: 32px; font-size: 22px; color: var(--muted); border-radius: 50%; }
.mp-row { display: grid; grid-template-columns: 34px 1fr 34px 34px; align-items: center; gap: 8px; }
.mp-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-2); color: var(--violet); font-size: 20px; font-weight: 700; line-height: 1; }
.mp-row output { font-size: 14px; font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
#music-vol { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--pink) var(--fill, 60%), #eadff5 var(--fill, 60%)); }
#music-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--pink), 0 3px 8px rgba(255, 79, 147, 0.35); cursor: pointer; }
#music-vol::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--pink); }
.mp-toggle { margin-top: 12px; width: 100%; min-height: 40px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--bg-2); color: var(--violet); }
.mp-toggle[aria-pressed="false"] { background: linear-gradient(135deg, var(--pink), var(--violet)); color: #fff; }
.music-pop::before { content: ""; position: absolute; top: -7px; right: 62px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); box-shadow: -1.5px -1.5px 0 var(--line); }

/* signed-in member strip + maintenance state */
.member-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); font-size: 14px; }
.member-bar b { color: var(--ink); }
.mb-credit b { color: var(--pink-2); font-size: 16px; }
.badge.off { background: #8a7a94; }
.mini.play.disabled { background: #d9cfe0; color: #fff; }
.btn[hidden], .member-bar[hidden] { display: none !important; }
.preview-banner { position: sticky; top: 60px; z-index: 19; padding: 5px 10px; text-align: center; background: #fff0a8; color: #6d4b00; font-size: 12px; font-weight: 600; box-shadow: 0 2px 8px rgba(80,50,0,.12); }
.preview-banner[hidden] { display: none; }
.member-bar { flex-wrap: wrap; justify-content: center; font-size: 12px; color: var(--muted); }
.member-bar > span { white-space: nowrap; }
.member-bar .mb-demo, .member-bar .mb-credit { padding: 4px 8px; border-radius: 999px; background: #fff0f7; color: var(--pink-2); font-weight: 600; }
.member-bar .mb-credit { background: #edf9f3; color: #168c68; }
.member-bar .mb-buy { padding: 4px 12px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #ff7eb3, #ff5a8a); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.member-bar .mb-buy:focus-visible { outline: 2px solid var(--pink-2); outline-offset: 2px; }
.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
/* The imported covers keep their original artwork; only cards currently in view move. */
.thumb.kit-motion .cover-art {
  transform: scale(1.045);
  animation: kit-cover-drift 12s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.thumb.kit-motion .kit-mascot {
  position: absolute;
  right: 3%;
  bottom: 2%;
  z-index: 1;
  width: 31%;
  max-height: 58%;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(0 5px 4px rgba(40, 15, 58, .48));
  animation: kit-mascot-float 4.4s ease-in-out infinite;
  animation-play-state: paused;
  pointer-events: none;
}
.thumb.kit-motion::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(106deg, transparent 35%, rgba(255, 255, 255, .16) 48%, transparent 60%);
  transform: translateX(-150%);
  animation: kit-cover-sheen 9s ease-in-out infinite;
  animation-play-state: paused;
  pointer-events: none;
}
.thumb.kit-motion.kit-playing .cover-art,
.thumb.kit-motion.kit-playing .kit-mascot,
.thumb.kit-motion.kit-playing::after { animation-play-state: running; }
.thumb.kit-motion.kit-playing .cover-art,
.thumb.kit-motion.kit-playing .kit-mascot { will-change: transform; }
@keyframes kit-cover-drift {
  from { transform: scale(1.045) translate3d(-1.2%, 0, 0); }
  to { transform: scale(1.11) translate3d(1.2%, -1.2%, 0); }
}
@keyframes kit-mascot-float {
  0%, 100% { transform: translate3d(0, 3px, 0) rotate(-2deg); }
  50% { transform: translate3d(0, -5px, 0) rotate(2deg); }
}
@keyframes kit-cover-sheen {
  0%, 62%, 100% { transform: translateX(-150%); }
  82% { transform: translateX(150%); }
}
@media (prefers-reduced-motion: reduce) {
  .thumb.kit-motion .cover-art,
  .thumb.kit-motion .kit-mascot,
  .thumb.kit-motion::after { animation: none; will-change: auto; }
  .thumb.kit-motion::after { display: none; }
}
.thumb-sprites { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; width: 100%; }
.custom-slide { background: linear-gradient(135deg, #ff9dc5, #9e87ef); padding: 0; }
.custom-slide-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.custom-slide-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(36,20,65,.64)); }
.custom-slide .img-cap { height: 56%; }
.foot-terms { font-size: inherit; }
.account-sheet { max-height: 94vh; }
.account-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px; border-radius: 16px; background: var(--bg-2); }
.account-tab { min-height: 40px; border-radius: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.account-tab.on { background: #fff; color: var(--pink-2); box-shadow: var(--shadow); }
.account-content { min-height: 260px; }
.account-content h4 { margin: 16px 0 8px; font-size: 16px; }
.account-cards, .account-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.account-stats { grid-template-columns: repeat(2, 1fr); }
.account-stat { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 14px; background: var(--bg); color: var(--muted); font-size: 12px; }
.account-stat b { color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; }
.account-loading, .account-error { padding: 30px 10px; text-align: center; color: var(--muted); }
.account-error { color: #d64b68; }
.periods, .ledger-filter { display: flex; gap: 6px; margin-bottom: 12px; }
.periods button, .ledger-filter button, .ledger-nav button { padding: 6px 12px; border-radius: 999px; background: #fff; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; }
.periods button.on, .ledger-filter button.on { background: var(--pink-2); color: #fff; box-shadow: none; }
.bar-chart { display: flex; align-items: end; gap: 4px; height: 150px; padding: 10px 2px 0; overflow-x: auto; border-bottom: 1px solid var(--line); }
.bar-group { flex: 1 0 20px; min-width: 20px; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 3px; }
.bars { display: flex; align-items: end; justify-content: center; gap: 2px; width: 100%; height: calc(100% - 18px); }
.bars i { display: block; width: 8px; min-height: 2px; border-radius: 4px 4px 0 0; }
.bet-bar { background: #b9a4e8; }.win-bar { background: var(--pink); }
.bar-group small { max-width: 42px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.top-games p { margin: 5px 0; padding: 7px 9px; border-radius: 10px; background: var(--bg); font-size: 13px; }
.ledger-list { display: grid; gap: 7px; }
.ledger-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 9px; border-radius: 12px; background: var(--bg); }
.ledger-item div { font-size: 13px; font-weight: 600; }.ledger-item small { color: var(--muted); font-size: 10px; }.ledger-item b { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: #168c68; font-size: 13px; }
.ledger-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); font-size: 12px; }
.ledger-nav button:disabled { opacity: .45; cursor: default; }
.promo-kind { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #ffe5f0; color: var(--pink-2); font-size: 11px; font-weight: 600; }
.promo-date, .promo-detail-dates { color: var(--muted); font-size: 11px; }
.promo-image { width: 70px; height: 70px; object-fit: cover; border-radius: 16px; }
.promo-fallback { font-size: 28px; color: var(--pink-2); }
.promo-detail { text-align: left; }.promo-detail h3 { text-align: left; margin-top: 4px; }.promo-detail-body, .terms-text { white-space: pre-line; color: var(--ink); line-height: 1.6; font-size: 14px; }.promo-cta { min-height: 44px; font-size: 15px; margin-top: 4px; }.terms-sheet { text-align: left; }.terms-sheet h3 { text-align: center; }

/* scenes for slot6–slot9 */
@keyframes ship-boost {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(1.2%, -1.5%) rotate(-1deg); }
  50% { transform: translate(2.4%, -0.6%) rotate(0deg); }
  75% { transform: translate(0.8%, 0.8%) rotate(0.8deg); }
}
.cut[style*="ship-boost"] { animation-duration: 1.8s; }
@keyframes enemy-hover {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-1.5%, 2%) rotate(-3deg); }
}
.cut[style*="enemy-hover"] { animation-duration: 2.4s; }
@keyframes star-float {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  30% { transform: translateY(-4%) rotate(-5deg) scale(1.03); }
  65% { transform: translateY(-1%) rotate(4deg) scale(1.01); }
}
.cut[style*="star-float"] { animation-duration: 2.8s; }
.grid .scene-box.scene-slot6 { left: 44%; }
.grid .scene-box.scene-slot7 { left: 40%; }
.grid .scene-box.scene-slot8 { left: 46%; }
.grid .scene-box.scene-slot9 { left: 48%; }


/* ---------------------------------------------------------- member profile + coin shop */
.member-profile { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, #fff5fb, #f4efff); }
.member-profile-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.member-number { color: var(--violet); font-size: 13px; }
.member-display-name { font-size: 18px; line-height: 1.2; }
.member-profile-info small { color: var(--muted); font-size: 12px; }
.member-edit { flex: none; font-size: 12px; }
.member-name-form { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; width: 100%; }
.member-name-form input { min-width: 0; min-height: 38px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.member-name-form .mini { padding: 0 10px; }
.shop-limit, .shop-notice { margin: 0 0 8px; padding: 9px 11px; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 13px; }
.shop-notice { color: #8b5c00; background: #fff8dc; line-height: 1.45; }
.shop-packages { display: grid; gap: 10px; margin-top: 12px; }
.shop-package { padding: 14px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.shop-package h4 { margin: 0; font-size: 16px; }
.shop-coins { display: block; margin-top: 4px; color: var(--pink-2); font-size: 22px; }
.shop-price { margin-top: 2px; color: var(--muted); font-size: 14px; }
.shop-methods { display: grid; gap: 7px; margin-top: 10px; }
.shop-method { min-height: 40px; padding: 7px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.shop-method.stripe { color: #fff; background: linear-gradient(135deg, var(--violet), #6f5ad9); }
.shop-method.transfer { color: #168c68; background: #eafaf3; }
.purchase-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 12px; }
.purchase-totals .account-stat b { font-size: 13px; }
.purchase-list { display: grid; gap: 8px; }
.purchase-item { display: grid; gap: 4px; padding: 11px; border-radius: 14px; background: var(--bg); }
.purchase-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.purchase-head b { min-width: 0; font-size: 14px; }
.purchase-item p, .purchase-item small { color: var(--muted); font-size: 11px; }
.status-chip { flex: none; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 600; }
.status-chip.paid { color: #168c68; background: #dff7ec; }
.status-chip.pending { color: #946100; background: #fff0bd; }
.status-chip.bad { color: #b23f58; background: #ffe1e8; }
.status-chip.muted { color: #71677a; background: #e9e4ec; }
.reject-reason { color: #b23f58 !important; }
.shop-payment-sheet { text-align: left; }
.shop-payment-sheet h3 { text-align: center; }
.shop-payment-lead { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.shop-payment-lead b { color: var(--ink); }
.payment-qr { display: block; width: min(76vw, 300px); height: min(76vw, 300px); margin: 2px auto 0; padding: 12px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); object-fit: contain; }
.payment-amount { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; }
.payment-amount strong { color: var(--pink-2); font-size: 30px; line-height: 1; }
.copy-btn { padding: 5px 10px; border-radius: 999px; background: var(--bg-2); color: var(--violet); font-size: 12px; font-weight: 600; }
.payment-warning { padding: 9px; border-radius: 12px; background: #fff4d6; color: #956000; font-size: 12px; line-height: 1.4; text-align: center; }
.payment-detail { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 12px; }
.payment-detail > span { color: var(--muted); }
.payment-detail b { min-width: 0; overflow-wrap: anywhere; }
.payment-note, .payment-expiry { color: var(--muted); font-size: 12px; line-height: 1.45; }
.payment-upload { display: grid; gap: 7px; padding-top: 4px; }
.upload-label { color: var(--ink); font-size: 14px; font-weight: 600; }
.slip-input { width: 100%; padding: 9px; border-radius: 12px; border: 2px dashed var(--line); background: var(--bg); font-size: 12px; }
.slip-preview { width: 100%; max-height: 220px; object-fit: contain; border-radius: 12px; background: #fafafa; }
.payment-success { padding: 10px; border-radius: 12px; background: #e5f8ef; color: #168c68; font-size: 13px; line-height: 1.4; }
.payment-cancel { color: #b23f58; }
.account-tabs:has(.shop-tab:not([hidden])) { grid-template-columns: repeat(5, 1fr); }

.shop-login-prompt { display: grid; gap: 10px; text-align: center; color: var(--muted); }

/* ---- UI pictures: coins, coin packs, payment methods, slip upload, empty states ---- */
.coin-ico { flex: none; width: 1.3em; height: 1.3em; margin-right: 0.3em; object-fit: contain; vertical-align: -0.3em; filter: drop-shadow(0 1px 1px rgba(90, 40, 80, 0.18)); }
.has-coin { display: inline-flex; align-items: center; }
.member-bar .has-coin { gap: 0; }
.coin-stat > span.has-coin { display: flex; }
.coin-stat.member b { color: #b07800; }
.coin-stat.demo b { color: var(--violet); }
.ledger-item b.has-coin { justify-content: flex-end; }
img.slot-ico { width: 28px; height: 28px; object-fit: contain; }
.shop-pack-top { display: flex; align-items: center; gap: 12px; }
.shop-pack-art { flex: none; width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(150, 70, 140, 0.18)); }
.shop-pack-info { min-width: 0; }
.shop-coins.has-coin { display: flex; }
.shop-method { display: flex; align-items: center; justify-content: center; gap: 8px; }
.shop-method .pay-ico { flex: none; width: 24px; height: 24px; object-fit: contain; }
.shop-login-art { display: block; width: 112px; height: 112px; margin: 0 auto; object-fit: contain; }
.purchase-head b { display: inline-flex; align-items: center; gap: 6px; }
.purchase-head .pay-ico { flex: none; width: 22px; height: 22px; object-fit: contain; }
.upload-head { display: flex; align-items: center; gap: 10px; }
.upload-art { flex: none; width: 48px; height: 48px; object-fit: contain; }
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 18px 8px; color: var(--muted); font-size: 13px; text-align: center; }
.empty-state .empty-art { width: 96px; height: 96px; object-fit: contain; }
.promo-image.promo-default { object-fit: contain; border-radius: 0; }

/* Game icon uploaded in admin, shown on the game card picture. */
.thumb .game-icon-badge {
  position: absolute; left: 8px; bottom: 8px; z-index: 3;
  width: 44px; height: 44px; border-radius: 12px; object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  background: #1b1430; pointer-events: none;
}
@media (max-width: 520px) { .thumb .game-icon-badge { width: 34px; height: 34px; border-radius: 9px; } }

/* ---- server unreachable notice (app.js loadServerConfig) ---- */
#offline-notice { position: sticky; top: 0; z-index: 1200; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 9px 14px; background: #4a2140; color: #fff; font-size: 14px; line-height: 1.4; text-align: center; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
#offline-notice button { min-height: 34px; padding: 4px 16px; border: 0; border-radius: 999px; background: #ff7ab0; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
