:root {
  color-scheme: dark;
  --ink: #eaf6ff;
  --cyan: #27d6ff;
  --gold: #ffd45c;
  --deep: #06163f;
  --glass: #0a2c7acc;
  --game-h: 100dvh;
  --board: 340px;
  --timer-font: 28px;
  --hud-h: 46px;
  --pool-h: 66px;
  --slot-h: 42px;
  --chip: 58px;
  --money-h: 46px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: transparent;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #fff4be;
  outline-offset: 2px;
}
button:disabled {
  cursor: default;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
b,
strong {
  font-variant-numeric: tabular-nums;
}

#game {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 500px);
  height: var(--game-h);
  min-height: 0;
  padding: max(5px, env(safe-area-inset-top)) 8px
    max(6px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 6px;
  background:
    linear-gradient(#04123a40, #04123a80), url(assets/art/bg.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/cover;
  overflow: hidden;
}
.is-half #game {
  padding-top: 5px;
  border-top: 2px solid #3fa7ff;
  border-radius: 14px 14px 0 0;
}

/* ---- header ---- */
.hud {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: var(--hud-h);
}
.round-button {
  flex: none;
  width: calc(var(--hud-h) - 6px);
  height: calc(var(--hud-h) - 6px);
  padding: 0;
  border: 0;
  background: url(assets/art/rbtn.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.round-button:active {
  transform: scale(0.94);
}
.round-button svg {
  width: 56%;
  height: 56%;
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px #27d6ff);
}
.view-toggle .to-half {
  display: none;
}
.view-toggle[aria-pressed="true"] .to-full {
  display: none;
}
.view-toggle[aria-pressed="true"] .to-half {
  display: inline;
}
.brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  direction: ltr;
}
.brand img {
  width: calc(var(--hud-h) - 8px);
  height: calc(var(--hud-h) - 8px);
  object-fit: contain;
  flex: none;
}
.brand b {
  font-size: 21px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(#fff, #9fe6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 #0a3bb0) drop-shadow(0 0 5px #27d6ff80);
}

/* ---- pool and star slot ---- */
.rail {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  direction: ltr;
}
.pool,
.slot {
  position: relative;
  border-style: solid;
  border-color: transparent;
  border-width: 0 var(--cap, 28px);
}
.pool {
  --cap: calc(var(--pool-h) * 0.4478);
  height: var(--pool-h);
  border-image: url(assets/art/pool.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) 0 90 fill / 0 var(--cap) / 0 stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 0 4px;
}
.pool-main {
  flex: 1;
  min-width: 0;
  text-align: center;
  line-height: 1.05;
}
.pool-main small {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 800;
}
.pool-main strong {
  display: block;
  font-size: calc(var(--pool-h) * 0.42);
  font-weight: 900;
  font-style: italic;
  color: #ffd84a;
  text-shadow:
    0 2px 0 #b3590b,
    0 0 10px #ffb02e99;
  white-space: nowrap;
}
.pool::before,
.pool::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(var(--pool-h) * 0.5);
  height: calc(var(--pool-h) * 0.5);
  margin-top: calc(var(--pool-h) * -0.25);
  background: center/contain no-repeat;
  filter: drop-shadow(0 1px 2px #02103a);
}
.pool::before {
  left: calc(var(--pool-h) * -0.378);
  background-image: url(assets/art/cherry.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d);
}
.pool::after {
  right: calc(var(--pool-h) * -0.378);
  background-image: url(assets/art/grape.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d);
}
.meta {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 16px;
  padding: 0 6px;
  font-size: 11px;
  color: #bfe6ff;
}
.meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.meta b {
  color: #fff;
}
.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f2bd50;
  box-shadow: 0 0 5px currentColor;
}
.is-ready .connection-dot {
  background: #6dff9a;
}
.pool.flash {
  animation: flash 0.9s ease-out 2;
}
.slot {
  --cap: calc(var(--slot-h) * 0.588);
  height: var(--slot-h);
  border-image: url(assets/art/slotbar.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) 0 90 fill / 0 var(--cap) / 0 stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reels {
  display: flex;
  gap: 8px;
  align-items: center;
}
.reel {
  position: relative;
  width: calc(var(--slot-h) * 0.82);
  height: calc(var(--slot-h) * 0.82);
  background: url(assets/art/slotwin.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.reel i {
  display: block;
  font-style: normal;
  font-weight: 900;
  font-size: calc(var(--slot-h) * 0.38);
  color: #fff;
  text-shadow:
    0 0 6px #27d6ff,
    0 1px 0 #064;
  line-height: 1;
}
.reel.idle i {
  width: 70%;
  height: 70%;
  background: url(assets/art/star.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/contain no-repeat;
  opacity: 0.55;
  font-size: 0;
}
.reel.spinning {
  animation: shake 0.14s linear infinite;
}
.reel.spinning i {
  filter: blur(0.8px);
  opacity: 0.9;
}
.reel.stopped i {
  animation: stop 0.4s ease-out;
}
.reel.symbol-jp i {
  width: 82%;
  height: 82%;
  background: url(assets/art/star.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/contain no-repeat;
  font-size: 0;
}
.reel.symbol-extra1 i,
.reel.symbol-extra2 i,
.reel.symbol-extra3 i {
  color: #fff7a8;
}
.reel.symbol-rebate2 i,
.reel.symbol-rebate3 i {
  color: #ffb36b;
}
.reel.win {
  box-shadow: 0 0 14px 3px #ffd45c;
}
.slot-note {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: calc(100% - 2px);
  transform: translateX(-50%);
  margin: 0;
  padding: 3px 14px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
  color: #4a2200;
  background: linear-gradient(#fff3a0, #ffb42e);
  border: 2px solid #fff8cf;
  box-shadow: 0 2px 8px #0008;
  animation: pop 0.45s ease-out;
}

/* ---- board ---- */
.stage {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  place-items: center;
  direction: ltr;
}
.board {
  position: relative;
  width: var(--board);
  height: calc(var(--board) * 0.9817);
  background: url(assets/art/board.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
}
.grid {
  position: absolute;
  inset: 8.4%;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  gap: 3.4%;
}
.fruit {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: url(assets/art/plate.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
  transition: transform 0.12s;
}
.fruit:active:not(:disabled) {
  transform: scale(0.96);
}
.fruit-img {
  position: absolute;
  left: 9%;
  top: 4%;
  width: 82%;
  height: 72%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px #02103a99);
}
.fruit .mult {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  min-width: 44%;
  height: 24%;
  display: grid;
  place-items: center;
  background: url(assets/art/badge.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
  font-size: max(12px, calc(var(--board) * 0.04));
  font-weight: 900;
  font-style: italic;
  color: #fff;
  text-shadow: 0 1px 2px #02103a;
  padding-bottom: 1%;
}
.fruit .mine {
  position: absolute;
  left: 4%;
  top: 4%;
  max-width: 70%;
  padding: 1px 7px;
  border-radius: 999px;
  background: linear-gradient(#ffb03a, #e8661a);
  border: 1px solid #ffe2a6;
  font-size: max(12px, calc(var(--board) * 0.036));
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 1px #6a2a00;
  box-shadow: 0 1px 4px #0006;
}
.fruit.selected {
  filter: drop-shadow(0 0 5px #27d6ff);
}
.fruit.pending {
  outline: 2px dashed #fff4be;
  outline-offset: -3px;
}
.fruit.scan,
.fruit.hit {
  background-image: url(assets/art/plate-lit.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d);
  filter: drop-shadow(0 0 10px #ffb02e);
  z-index: 2;
}
.fruit.scan {
  transform: scale(1.05);
}
.fruit.hit {
  animation: pop 0.55s ease-out;
}
.fruit.hit .fruit-img {
  animation: bounce 0.9s ease-in-out 2;
}
.board.landed .fruit:not(.hit) {
  filter: saturate(0.55) brightness(0.72);
}
.hub {
  grid-area: 2 / 2;
  position: relative;
  display: grid;
  place-items: center;
}
.hub img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hub-info {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  text-align: center;
  max-width: 78%;
}
.hub-info b {
  font-size: var(--timer-font);
  font-weight: 900;
  font-style: italic;
  color: #fff;
  text-shadow:
    0 0 8px #27d6ff,
    0 0 16px #27d6ff80;
}
.hub-info small {
  margin-top: 2px;
  font-size: max(8px, calc(var(--board) * 0.024));
  font-weight: 800;
  color: #bfeaff;
  line-height: 1.05;
  max-width: 68%;
  text-wrap: balance;
}
.compact-hub .hub-info small {
  display: none;
}
.hub.urgent .hub-info b {
  color: #ffd45c;
  animation: pulse 0.5s ease-in-out infinite alternate;
}

/* ---- dock ---- */
.dock {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.history {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 2px solid #2f9bff;
  border-radius: 999px;
  background: linear-gradient(#0a2f86cc, #06205acc);
  box-shadow:
    inset 0 0 10px #27d6ff55,
    0 0 8px #1b6dff66;
  direction: ltr;
}
.recent {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}
.recent .item {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
}
.recent .item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.recent .item .unknown,
.record-icons .unknown {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #ffffff1f;
  color: #bfe0ff;
  font-size: 16px;
}
.recent .item i {
  position: absolute;
  right: -5px;
  bottom: -3px;
  padding: 0 3px;
  border-radius: 6px;
  background: #ffb02e;
  color: #3a1800;
  font-style: normal;
  font-size: 9px;
  font-weight: 900;
  line-height: 12px;
}
.more {
  font-size: 20px;
  line-height: 1;
  color: #8fd4ff;
}
.money {
  display: flex;
  gap: 8px;
  align-items: center;
  height: var(--money-h);
}
.wallet {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 6px;
  border: 2px solid #3aa6ff;
  border-radius: 999px;
  background: linear-gradient(#082a78, #05184f);
  box-shadow: inset 0 0 10px #27d6ff44;
}
.wallet img {
  width: 30px;
  height: 30px;
  flex: none;
}
.wallet b {
  flex: 1;
  text-align: start;
  font-size: clamp(14px, 4.7vw, 19px);
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wallet .plus {
  font-weight: 900;
  color: #7fdcff;
}
.auto {
  flex: 1;
  height: 100%;
  padding: 0 0 2px;
  border: 0;
  background: url(assets/art/auto.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
  font-size: 23px;
  font-weight: 900;
  font-style: italic;
  color: #fff;
  text-shadow:
    0 2px 0 #b34a00,
    0 0 6px #0004;
}
.auto[aria-pressed="true"] {
  background-image: url(assets/art/auto-on.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d);
  text-shadow:
    0 2px 0 #0a6a4a,
    0 0 8px #aaffd8;
}
.auto:active {
  transform: scale(0.97);
}
.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-items: center;
  align-items: end;
  height: calc(var(--chip) + 8px);
  direction: ltr;
}
.chips button {
  position: relative;
  width: var(--chip);
  height: var(--chip);
  padding: 0;
  border: 0;
  background-color: transparent;
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  font-size: calc(var(--chip) * 0.27);
  font-weight: 900;
  color: #fff;
  text-shadow:
    0 1px 2px #02103a,
    0 0 3px #02103a;
  transition: transform 0.14s;
}
.chips button[data-art="chip-100"] {
  background-image: url(assets/art/chip-100.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d);
}
.chips button[data-art="chip-1k"] {
  background-image: url(assets/art/chip-1k.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d);
}
.chips button[data-art="chip-10k"] {
  background-image: url(assets/art/chip-10k.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d);
}
.chips button[data-art="chip-100k"] {
  background-image: url(assets/art/chip-100k.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d);
}
.chips button[aria-pressed="true"] {
  transform: translateY(-7px) scale(1.12);
  filter: drop-shadow(0 0 7px #27d6ff) drop-shadow(0 0 2px #fff);
}

/* ---- feedback, result ---- */
.feedback {
  position: absolute;
  z-index: 8;
  top: 2px;
  left: 6px;
  right: 6px;
  display: grid;
  gap: 4px;
  pointer-events: none;
}
.feedback > * {
  pointer-events: auto;
}
.notice,
.connection {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 2px 8px;
  border: 2px solid #5fd8ff;
  border-radius: 14px;
  background: #061f66f2;
  box-shadow: 0 4px 14px #000a;
  font-size: 12px;
}
.connection {
  justify-content: center;
  text-align: center;
}
.notice img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.notice p {
  flex: 1;
  margin: 0;
  line-height: 1.3;
}
.notice button,
.result-card button,
.loading button,
.panel-retry {
  min-height: 44px;
  padding: 6px 14px;
  border: 2px solid #ffe9a8;
  border-radius: 12px;
  background: linear-gradient(#ffa63a, #e2601a);
  color: #fff;
  font-weight: 800;
  text-shadow: 0 1px 1px #6a2a00;
}
.result-card {
  position: absolute;
  z-index: 10;
  left: 8px;
  right: 8px;
  bottom: 6px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "fruits fruits" "main values" "foot foot";
  gap: 4px 12px;
  align-items: center;
  padding: 10px 12px 8px;
  border: 2px solid #7fe4ff;
  border-radius: 18px;
  background: linear-gradient(#0d44b6, #061f66);
  box-shadow:
    0 6px 22px #000b,
    inset 0 0 14px #27d6ff55;
  animation: rise 0.28s ease-out;
}
.result-fruits {
  grid-area: fruits;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.result-fruits img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.result-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.result-main strong {
  font-size: 12px;
  color: #bfeaff;
}
.result-main #result-reward {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 2px 0 #9a4a00;
}
.result-main small {
  font-size: 11px;
  color: #fff3a0;
}
.result-values {
  grid-area: values;
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 10px;
  font-size: 12px;
  color: #bfeaff;
}
.result-values b {
  text-align: end;
  color: #fff;
}
.result-card footer {
  grid-area: foot;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.result-card footer p {
  margin: 0;
  font-size: 11px;
  color: #9fd6ff;
}
.result-card .result-close {
  position: absolute;
  top: 2px;
  inset-inline-end: 4px;
  min-height: 36px;
  width: 36px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 24px;
  text-shadow: none;
}

/* ---- loading ---- */
.loading {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  text-align: center;
  background:
    linear-gradient(#04123ab0, #04123ad8), url(assets/art/bg.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/cover;
}
.loading-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
}
.loading-title {
  font-size: 34px;
  font-style: italic;
  font-weight: 900;
  background: linear-gradient(#fff, #9fe6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px #27d6ff);
}
.loading-fruits {
  display: flex;
  gap: 6px;
  direction: ltr;
}
.loading-fruits img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.loading p {
  margin: 0;
  font-size: 15px;
}
.loading progress {
  width: 70%;
  height: 12px;
  accent-color: #27d6ff;
}
.loading small {
  margin-top: 10px;
  color: #9fd6ff;
  font-size: 12px;
}
.loading.failed .loading-fruits,
.loading.failed progress {
  display: none;
}
.is-half .loading-logo {
  width: 70px;
  height: 70px;
}
.tier-tiny .loading-logo,
.tier-short .loading-logo {
  width: 70px;
  height: 70px;
}

/* ---- panels ---- */
#panel-mask {
  position: absolute;
  inset: 0;
  z-index: 40;
}
dialog {
  position: absolute;
  inset: 10px;
  margin: auto;
  width: calc(100% - 20px);
  max-width: 450px;
  max-height: calc(100% - 20px);
  height: fit-content;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 2px solid #5fd8ff;
  border-radius: 16px;
  background: linear-gradient(#0a3aa0, #061f66);
  color: var(--ink);
  box-shadow: 0 6px 24px #000c;
  overflow: hidden;
  z-index: 41;
}
dialog:not([open]) {
  display: none;
}
dialog::backdrop {
  background: transparent;
}
dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 16px;
  border-bottom: 1px solid #3a86e0;
  background: #082a78;
}
dialog h2 {
  margin: 0;
  font-size: 18px;
}
dialog header button {
  border: 0;
  background: none;
  font-size: 28px;
  min-width: 44px;
  min-height: 44px;
}
#panel-body {
  padding: 14px;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
#panel-body p {
  font-size: 14px;
  line-height: 1.6;
  margin: 6px 0;
}
#panel-body label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  margin: 14px 0;
}
#panel-body input[type="range"] {
  width: 55%;
  accent-color: var(--cyan);
}
#panel-body input[type="checkbox"] {
  width: 24px;
  height: 24px;
  accent-color: var(--cyan);
}
#panel-body select {
  max-width: 58%;
  min-height: 44px;
  background: #0b2f86;
  color: var(--ink);
  border: 1px solid #5fa8ff;
  border-radius: 8px;
}
#panel-body ol {
  padding-inline-start: 22px;
  font-size: 14px;
  line-height: 1.65;
}
#panel-body .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #2f6fc9;
  padding: 8px 0;
  font-size: 14px;
}
#panel-body .row > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#panel-body .record {
  padding: 8px 0;
  border-bottom: 1px solid #2f6fc9;
}
#panel-body img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.record-icons {
  display: flex;
  gap: 4px;
  margin: 4px 0;
  direction: ltr;
}
.record-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  font-size: 12px;
  color: #bfe0ff;
}
.record-values div {
  display: flex;
  flex-direction: column;
}
.record-values b {
  font-size: 14px;
  color: #fff;
}
.list-caption {
  color: #9fd6ff;
  font-size: 12px !important;
}
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.tabs button {
  flex: 1;
  min-height: 40px;
  border: 1px solid #5fa8ff;
  border-radius: 10px;
  background: #0b2f86;
  font-size: 13px;
  font-weight: 700;
}
.tabs button[aria-pressed="true"] {
  background: linear-gradient(#ffa63a, #e2601a);
  border-color: #ffe9a8;
}
.today-line {
  margin: 0 0 6px;
  font-size: 13px !important;
  color: #bfe0ff;
}

/* ---- compact tiers: by the height the game really has ---- */
.tier-short {
  --hud-h: 42px;
  --pool-h: 50px;
  --slot-h: 38px;
  --chip: 48px;
  --money-h: 42px;
}
.tier-tiny {
  --hud-h: 38px;
  --pool-h: 40px;
  --slot-h: 34px;
  --chip: 42px;
  --money-h: 38px;
}
.tier-short #game,
.tier-tiny #game {
  gap: 4px;
}
.tier-short .rail,
.tier-tiny .rail {
  flex-direction: row;
  align-items: center;
}
.tier-short .pool,
.tier-tiny .pool {
  flex: 1.25 1 0;
  min-width: 0;
}
.tier-short .slot,
.tier-tiny .slot {
  flex: 1 1 0;
  min-width: 0;
}
.tier-short .reels,
.tier-tiny .reels {
  gap: 5px;
}
.tier-short .meta,
.tier-tiny .meta {
  display: none;
}
.tier-short .history,
.tier-tiny .history {
  display: none;
}
.tier-short .slot-note,
.tier-tiny .slot-note {
  left: auto;
  inset-inline-end: 0;
  transform: none;
  top: 100%;
}
.tier-short .pool-main small,
.tier-tiny .pool-main small {
  font-size: 8px;
  letter-spacing: 1px;
}
.tier-tiny .brand b {
  font-size: 17px;
}
.tier-tiny .wallet b {
  font-size: 16px;
}
.tier-tiny .auto {
  font-size: 19px;
}
.tier-tiny .dock {
  gap: 4px;
}
.tier-tiny .result-fruits img {
  width: 28px;
  height: 28px;
}
.tier-tiny .result-card footer p,
.tier-tiny .result-main small {
  display: none;
}
.tier-tiny .result-main #result-reward {
  font-size: 22px;
}
.tier-tiny .notice img {
  display: none;
}
@media (max-width: 350px) {
  #game {
    padding-left: 5px;
    padding-right: 5px;
  }
  .hud {
    gap: 3px;
  }
  .brand img {
    display: none;
  }
  .brand b {
    font-size: 16px;
  }
}

/* ---- RTL: the interface mirrors, the stage and numbers do not ---- */
[dir="rtl"] .money,
[dir="rtl"] .hud {
  direction: rtl;
}
[dir="rtl"] .brand {
  direction: ltr;
}
[dir="rtl"] .view-toggle svg,
[dir="rtl"] .round-button svg {
  transform: none;
}
[dir="rtl"] #exit span {
  display: inline-block;
  transform: scaleX(-1);
}
[dir="rtl"] .notice,
[dir="rtl"] .connection,
[dir="rtl"] .result-card,
[dir="rtl"] dialog {
  direction: rtl;
}

/* ---- motion ---- */
@keyframes pop {
  0% {
    transform: scale(0.9);
  }
  55% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6%);
  }
}
@keyframes shake {
  0% {
    transform: translateY(-1px);
  }
  50% {
    transform: translateY(1px);
  }
  100% {
    transform: translateY(-1px);
  }
}
@keyframes stop {
  0% {
    transform: translateY(-40%);
    opacity: 0.4;
  }
  60% {
    transform: translateY(8%);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes flash {
  0%,
  100% {
    filter: none;
  }
  50% {
    filter: brightness(1.7) drop-shadow(0 0 10px #ffd45c);
  }
}
@keyframes pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.14);
  }
}
@keyframes rise {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.low-motion *,
.low-motion *::before,
.low-motion *::after {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* The server-stage wait hint never intercepts gameplay or panel actions. */
#next-open {
  pointer-events: none;
}

/* Reserve disjoint touch targets even when the artwork scales down. */
.hud {
  min-height: 44px;
}
.hud button {
  min-width: 44px;
  min-height: 44px;
}

.hud .brand {
  min-width: 0;
  overflow: hidden;
}

.fruit .mine {
  max-width: 92%;
  padding-inline: 3px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.pool-main strong {
  font-size: max(12px, calc(var(--pool-h) * 0.32));
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Long wallet values retain their complete formatter output. */
.wallet b {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.05;
}
