:root {
  color-scheme: dark;
  --u: calc(min(100vw, 500px) / 750);
  --cab: calc(var(--u) * 680);
  --deck-w: calc(var(--u) * 640);
  --game-h: 100dvh;
  --gold: #f6d784;
  --gold-deep: #c8933a;
  --cream: #fff0d4;
  --lacquer: #14090c;
  --vermilion: #d8321e;
  --sakura: #f7b6c8;
  --font: "Baloo 2", "Changa", "Baloo Da 2", system-ui, -apple-system, sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: var(--font);
  color: var(--cream);
  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: 3px;
}
button:disabled {
  cursor: default;
}
img {
  -webkit-user-drag: none;
  user-select: none;
}
[hidden] {
  display: none !important;
}
#game {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 500px);
  height: var(--game-h);
  min-height: 0;
  padding: max(4px, env(safe-area-inset-top)) calc(var(--u) * 20) max(4px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  background: #12080d;
  isolation: isolate;
}
.backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(#0d05088c, #0d050800 30%, #0d050800 60%, #0d0508b0),
    url(assets/art/bg.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/cover no-repeat;
}
.petals {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.petals i {
  position: absolute;
  top: -8%;
  left: var(--x);
  width: calc(var(--u) * var(--s));
  aspect-ratio: 1;
  background: var(--img) center/contain no-repeat;
  opacity: 0.75;
  animation: drift var(--d) linear var(--delay) infinite;
}
@keyframes drift {
  0% {
    transform: translate(0, 0) rotate(0);
  }
  100% {
    transform: translate(calc(var(--u) * 120), 115vh) rotate(380deg);
  }
}
/* ---------- HUD ---------- */
.hud {
  flex: none;
  width: 100%;
  height: calc(var(--u) * 92);
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 10);
  z-index: 5;
}
.grow {
  flex: 1;
}
.icon-button {
  flex: none;
  width: calc(var(--u) * 72);
  height: calc(var(--u) * 72);
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: url(assets/art/disc.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
  color: var(--gold);
  filter: drop-shadow(0 2px 3px #0009);
}
.icon-button svg {
  width: 52%;
  height: 52%;
}
.icon-button:active {
  transform: scale(0.94);
}
[dir="rtl"] #exit svg {
  transform: scaleX(-1);
}
.wallet {
  flex: none;
  min-width: 0;
  max-width: 44%;
  height: calc(var(--u) * 68);
  min-height: 34px;
  padding: 0 calc(var(--u) * 40);
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 8);
  border: 0;
  background: url(assets/art/pill.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
  filter: drop-shadow(0 2px 3px #0009);
}
.wallet b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
  font-size: calc(var(--u) * 32);
  color: var(--gold);
  direction: ltr;
  unicode-bidi: isolate;
}
.coin-symbol {
  flex: none;
  width: calc(var(--u) * 36);
  height: calc(var(--u) * 36);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1a8, #d89a2f 70%);
  color: #5a2a08;
  font-weight: 800;
  font-size: calc(var(--u) * 24);
  line-height: 1;
}
.plus {
  color: var(--gold);
  font-weight: 800;
  font-size: calc(var(--u) * 32);
  line-height: 1;
}
/* ---------- cabinet ---------- */
.stage {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.cabinet {
  position: relative;
  flex: none;
  width: var(--cab);
  height: calc(var(--cab) * 821 / 760);
}
.cabinet-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px #0009);
}
.window {
  position: absolute;
  z-index: 1;
  left: 18.95%;
  top: 23.63%;
  width: 62.11%;
  height: 59.93%;
  overflow: hidden;
  direction: ltr;
  background: linear-gradient(#0a0406, #1a0b0f 50%, #0a0406);
  box-shadow: inset 0 0 calc(var(--cab) * 0.04) #000;
}
.reels {
  position: absolute;
  inset: 0;
  display: flex;
}
.reel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}
.reel + .reel {
  border-inline-start: 1px solid #f6d78428;
}
.reel.landed {
  animation: landed 0.22s ease-out;
}
@keyframes landed {
  50% {
    transform: translateY(calc(var(--cab) * 0.006));
  }
}
.strip {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: calc(var(--n) * 100% / 3);
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.strip.loop {
  animation: reel-loop var(--loop, 0.5s) linear infinite;
}
.strip.loop .cell img {
  filter: blur(1.2px) brightness(0.92);
}
.strip.stop {
  animation: reel-stop var(--stop, 430ms) cubic-bezier(0.18, 0.72, 0.28, 1) forwards;
}
@keyframes reel-loop {
  from {
    transform: translateY(-50%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes reel-stop {
  0% {
    transform: translateY(var(--from));
  }
  82% {
    transform: translateY(0.5%);
  }
  100% {
    transform: translateY(0);
  }
}
.cell {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  place-items: center;
}
.cell img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  transition: opacity 0.2s, filter 0.2s;
}
.seven {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: calc(var(--cab) * 0.115);
  line-height: 1;
  color: #fff3b0;
  text-shadow: 0 0 6px #ff7a2a, 0 2px 0 #8a1c0c, 0 -1px 0 #fff;
  pointer-events: none;
}
.cell.unknown .qmark {
  font-weight: 800;
  font-size: calc(var(--cab) * 0.12);
  color: #f6d78499;
}
.reels.has-lit .cell:not(.lit) img,
.reels.has-lit .cell:not(.lit) .seven {
  opacity: 0.38;
}
.cell.lit::before {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 14%;
  background: radial-gradient(circle, #ffe08acc, #ffb03a55 55%, transparent 75%);
}
.cell.lit img {
  filter: drop-shadow(0 0 calc(var(--cab) * 0.016) #ffd36a) brightness(1.12);
}
.cell.lit:not(.weak) img {
  animation: lit 0.7s ease-in-out infinite alternate;
}
.cell.lit.weak::before {
  background: radial-gradient(circle, #ffd8a066, transparent 70%);
}
.cell.lit.weak img {
  filter: drop-shadow(0 0 calc(var(--cab) * 0.008) #ffe7b8aa);
}
@keyframes lit {
  to {
    transform: scale(1.07);
  }
}
.paylines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.pl {
  fill: none;
  stroke: #ffe39a;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  filter: drop-shadow(0 0 4px #ff9f3a);
}
.pl.on {
  opacity: 0.95;
}
.pl.weak {
  stroke: #ffe9c4;
  stroke-width: 2;
  stroke-dasharray: 6 6;
  opacity: 0.7;
}
.callout {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 90.5%;
  translate: -50% -50%;
  width: 52%;
  display: grid;
  place-items: center;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  unicode-bidi: plaintext;
  font-weight: 800;
  font-size: calc(var(--cab) * 0.062);
  line-height: 1.15;
  color: #fff1b8;
  text-shadow: 0 2px 0 #7a2208, 0 0 12px #ff9f3a, 0 0 2px #000;
  animation: pop 0.28s ease-out;
  pointer-events: none;
}
.callout.total {
  font-size: calc(var(--cab) * 0.072);
}
.callout.big {
  font-size: calc(var(--cab) * 0.078);
  color: #fff;
  text-shadow: 0 2px 0 #b4261a, 0 0 18px #ffb347, 0 0 4px #000;
}
.callout.weak {
  font-size: calc(var(--cab) * 0.05);
  color: #ffe9d2;
  text-shadow: 0 1px 0 #3a1a10, 0 0 3px #000;
  opacity: 0.9;
  animation: none;
}
@keyframes pop {
  from {
    scale: 0.7;
    opacity: 0;
  }
}
.marquee {
  position: absolute;
  z-index: 3;
  left: 25%;
  right: 25%;
  top: 9.6%;
  height: 10.5%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.18em;
  direction: ltr;
  font-size: calc(var(--cab) * 0.068);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  pointer-events: none;
}
.marquee span {
  color: #fff3d0;
  text-shadow: 0 2px 0 #7a1b10, 0 0 8px #e0482e99;
}
.marquee b {
  font-size: 1.28em;
  color: #ffe58a;
  text-shadow: 0 2px 0 #9a3a10, 0 0 12px #ffb347;
}
.bulbs {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.bulbs i {
  position: absolute;
  width: 3%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ffe9a8 45%, #f0b04a);
  box-shadow: 0 0 calc(var(--cab) * 0.02) #ffd36a;
  animation: bulb 1.6s ease-in-out infinite alternate;
}
.bulbs i:nth-child(even) {
  animation-delay: 0.8s;
}
@keyframes bulb {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}
/* ---------- deck: REWARD / TODAY ---------- */
.deck {
  flex: none;
  position: relative;
  width: var(--deck-w);
  aspect-ratio: 900 / 326;
  margin-top: calc(var(--u) * 6);
  padding: 6.5% 20% 6%;
  display: flex;
  align-items: stretch;
  background: url(assets/art/console.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
  filter: drop-shadow(0 4px 6px #0009);
  z-index: 2;
}
.slot {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.slot.reward {
  flex: 1.35 1 0;
}
.slot.today {
  flex: 1 1 0;
  border-inline-start: 1px solid #f6d78455;
}
.slot span {
  font-weight: 700;
  font-size: calc(var(--u) * 24);
  letter-spacing: 0.12em;
  color: var(--sakura);
  line-height: 1.1;
}
.slot b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 800;
  line-height: 1.1;
  color: #ffe9a0;
  text-shadow: 0 0 10px #ffa63a88, 0 2px 0 #7a3a10;
}
.slot.reward b {
  font-size: calc(var(--u) * 58);
}
.slot.today b {
  font-size: calc(var(--u) * 38);
  color: var(--cream);
}
.slot b.long {
  font-size: calc(var(--u) * 36);
}
.slot b.pulse {
  animation: pop 0.3s ease-out;
}
/* ---------- controls ---------- */
.controls {
  flex: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 8);
  padding-top: calc(var(--u) * 6);
  z-index: 3;
}
.stakes {
  display: flex;
  justify-content: center;
  gap: calc(var(--u) * 22);
}
.stakes button {
  position: relative;
  width: calc(var(--u) * 108);
  height: calc(var(--u) * 110);
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--coin) center/100% 100% no-repeat;
  font-weight: 800;
  font-size: calc(var(--u) * 31);
  color: #fff;
  text-shadow: 0 1px 0 #000a, 0 0 3px #000, 1px 1px 2px #000;
  opacity: 0.8;
  transition: transform 0.15s, opacity 0.15s;
}
.stakes button[aria-pressed="true"] {
  opacity: 1;
  transform: scale(1.14);
  filter: drop-shadow(0 0 calc(var(--u) * 12) #ffd36a);
}
.stakes button:disabled {
  opacity: 0.45;
}
.spinrow {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: calc(var(--u) * 126) minmax(0, 1fr) calc(var(--u) * 126);
  align-items: center;
  gap: calc(var(--u) * 14);
  padding: 0 calc(var(--u) * 6);
}
.spin {
  position: relative;
  width: 100%;
  aspect-ratio: 620 / 150;
  padding: 0;
  border: 0;
  background: url(assets/art/spin.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
  filter: drop-shadow(0 4px 6px #0009);
  transition: transform 0.1s;
}
.spin span {
  font-weight: 800;
  font-size: calc(var(--u) * 54);
  letter-spacing: 0.08em;
  color: #fff6dc;
  text-shadow: 0 2px 0 #6b1208, 0 0 10px #ffb06a88;
}
.spin:active:not(:disabled),
.spin.down {
  background-image: url(assets/art/spin-down.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d);
  transform: scale(0.98);
}
.spin:disabled {
  background-image: url(assets/art/spin-down.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d);
  filter: grayscale(0.35) brightness(0.8) drop-shadow(0 4px 6px #0009);
}
.round {
  position: relative;
  width: calc(var(--u) * 126);
  height: calc(var(--u) * 124);
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  direction: ltr;
  padding: 0 calc(var(--u) * 14) calc(var(--u) * 16) 0;
  background: url(assets/art/btn-round.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
  color: var(--gold);
  font-weight: 800;
  font-size: calc(var(--u) * 22);
  line-height: 1.05;
  filter: drop-shadow(0 3px 4px #0009);
}
.round svg {
  width: calc(var(--u) * 38);
  height: calc(var(--u) * 38);
}
.round i {
  font-style: normal;
  font-size: calc(var(--u) * 28);
  color: #fff;
  direction: ltr;
}
.round i:empty {
  display: none;
}
.round[aria-pressed="true"] {
  color: #fff;
  box-shadow: 0 0 calc(var(--u) * 20) #ffb347aa;
  border-radius: 50%;
}
.round:disabled {
  opacity: 0.55;
}
.auto-menu {
  position: absolute;
  inset-inline-start: 0;
  bottom: calc(100% + var(--u) * 8);
  display: flex;
  gap: calc(var(--u) * 10);
  padding: calc(var(--u) * 12);
  border: 2px solid #c8933a;
  border-radius: calc(var(--u) * 22);
  background: #14090cf2;
  z-index: 6;
}
.auto-menu button {
  min-width: calc(var(--u) * 92);
  min-height: 44px;
  padding: 0 calc(var(--u) * 10);
  border: 1px solid #f6d784aa;
  border-radius: calc(var(--u) * 16);
  background: linear-gradient(#b52a18, #7e1a10);
  font-weight: 800;
  font-size: calc(var(--u) * 32);
  color: #fff3d0;
}
/* ---------- feedback ---------- */
.feedback {
  position: absolute;
  top: calc(var(--u) * 100);
  left: calc(var(--u) * 24);
  right: calc(var(--u) * 24);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 20;
  pointer-events: none;
}
.feedback > * {
  pointer-events: auto;
}
.notice,
.connection {
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 2px solid #c8933a;
  border-radius: 14px;
  background: #14090cf0;
  box-shadow: 0 4px 12px #000a;
  font-size: calc(var(--u) * 28);
  line-height: 1.3;
}
.notice p,
.connection {
  margin: 0;
}
.notice button {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #f6d784aa;
  border-radius: 10px;
  background: #b52a18;
  color: #fff3d0;
}
.connection {
  border-color: #7d6a4a;
  font-size: calc(var(--u) * 24);
}
/* ---------- loading ---------- */
.loading {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  text-align: center;
  background: linear-gradient(#0d0508c8, #0d0508e0), url(assets/art/bg.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/cover;
}
.loading > img {
  width: min(52%, 230px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px #000a);
}
.title {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.2em;
  direction: ltr;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.title span {
  color: #fff3d0;
  text-shadow: 0 2px 0 #7a1b10;
}
.title b {
  font-size: 1.3em;
  color: #ffe58a;
  text-shadow: 0 2px 0 #9a3a10, 0 0 12px #ffb347;
}
.loading small {
  margin-top: 12px;
  font-size: 12px;
  color: #fff3dcb0;
}
.loading p {
  margin: 0;
  font-size: 15px;
}
.loading progress {
  width: 62%;
  height: 12px;
  accent-color: #e0482e;
}
.loading button {
  min-height: 44px;
  padding: 8px 24px;
  border: 1px solid #f6d784;
  border-radius: 12px;
  background: #b52a18;
  color: #fff3d0;
}
/* ---------- panels ---------- */
#panel-mask {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: #0a0306c0;
}
dialog {
  position: absolute;
  inset: 12px;
  margin: auto;
  width: calc(100% - 24px);
  max-width: 450px;
  max-height: calc(100% - 24px);
  height: fit-content;
  padding: 0;
  border: 2px solid #c8933a;
  border-radius: 16px;
  background: #1a0c10;
  color: var(--cream);
  box-shadow: 0 6px 24px #000c;
  overflow: hidden;
  z-index: 41;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog::backdrop {
  background: transparent;
}
dialog header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid #c8933a66;
  background: linear-gradient(#3a1016, #22090d);
}
[dir="rtl"] dialog header {
  padding: 8px 16px 8px 8px;
}
dialog h2 {
  margin: 0;
  font-size: 19px;
  color: var(--gold);
}
dialog header button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: none;
  font-size: 28px;
  color: var(--gold);
}
#panel-body {
  min-height: 0;
  padding: 14px 16px 18px;
  overflow: auto;
  overscroll-behavior: contain;
}
#panel-body p {
  font-size: 14px;
  line-height: 1.6;
}
#panel-body label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  font-size: 14px;
}
#panel-body input[type="range"] {
  width: 42%;
  min-width: 0;
  min-height: 44px;
  accent-color: #e0482e;
}
#panel-body select {
  max-width: 58%;
  min-height: 44px;
  border: 1px solid #c8933a88;
  border-radius: 8px;
  background: #2a1217;
  color: var(--cream);
}
#panel-body input[type="checkbox"] {
  appearance: none;
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  margin: 0;
  cursor: pointer;
}
#panel-body input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 10px;
  inset-inline-start: 0;
  width: 44px;
  height: 24px;
  border: 1px solid #7d6a4a;
  border-radius: 16px;
  background: #3a2a2d;
}
#panel-body input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 14px;
  inset-inline-start: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff6da;
}
#panel-body input[type="checkbox"]:checked::before {
  background: #b52a18;
}
#panel-body input[type="checkbox"]:checked::after {
  inset-inline-start: 24px;
}
#panel-body output {
  min-width: 40px;
  text-align: end;
}
#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;
  padding: 8px 0;
  border-bottom: 1px solid #c8933a33;
  font-size: 14px;
}
#panel-body .row > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
#panel-body .row img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.row b,
.record-values b {
  direction: ltr;
  unicode-bidi: isolate;
  color: var(--gold);
}
#panel-body .record {
  padding: 10px 0;
  border-bottom: 1px solid #c8933a33;
}
.record > strong {
  display: block;
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 13px;
  color: var(--sakura);
}
.record-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.record-values span {
  display: block;
  font-size: 11px;
  opacity: 0.8;
}
.record-values b {
  display: block;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.list-caption {
  color: var(--sakura);
}
.my-ranking {
  padding: 8px;
  border-radius: 8px;
  background: #3a1016;
}
#panel-body .row .icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
}
#panel-body .icon .seven {
  font-size: 14px;
  text-shadow: 0 1px 0 #8a1c0c;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.tabs .panel-retry[aria-pressed="false"] {
  background: #2a1214;
  color: #f6d784;
}
.panel-retry {
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid #f6d784aa;
  border-radius: 10px;
  background: #b52a18;
  color: #fff3d0;
}
#exited {
  z-index: 50;
}
/* ---------- half screen ---------- */
.is-half .hud {
  height: calc(var(--u) * 80);
}
.is-half .icon-button {
  width: calc(var(--u) * 64);
  height: calc(var(--u) * 64);
}
.is-half .deck {
  width: calc(var(--u) * 660);
  aspect-ratio: auto;
  height: calc(var(--u) * 78);
  margin-top: calc(var(--u) * 4);
  padding: 0;
  gap: calc(var(--u) * 14);
  background: none;
  filter: none;
}
.is-half .slot {
  flex: 1 1 0;
  flex-direction: row;
  justify-content: space-between;
  gap: calc(var(--u) * 10);
  padding: 0 calc(var(--u) * 78) 0 calc(var(--u) * 40);
  border: 0;
  background: url(assets/art/panel.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center/100% 100% no-repeat;
}
.is-half .slot.reward b,
.is-half .slot.today b {
  font-size: calc(var(--u) * 36);
}
.is-half .slot span {
  font-size: calc(var(--u) * 22);
}
.is-half .stakes button {
  width: calc(var(--u) * 84);
  height: calc(var(--u) * 86);
  font-size: calc(var(--u) * 26);
}
.is-half .stakes {
  gap: calc(var(--u) * 28);
}
.is-half .spinrow {
  grid-template-columns: calc(var(--u) * 104) minmax(0, 1fr) calc(var(--u) * 104);
}
.is-half .spin {
  max-width: calc(var(--u) * 400);
  justify-self: center;
}
.is-half .spin span {
  font-size: calc(var(--u) * 46);
}
.is-half .round {
  width: calc(var(--u) * 104);
  height: calc(var(--u) * 102);
  font-size: calc(var(--u) * 19);
}
.is-half .round svg {
  width: calc(var(--u) * 30);
  height: calc(var(--u) * 30);
}
.is-half .controls {
  gap: calc(var(--u) * 4);
}
/* ---------- RTL: the HUD mirrors, the reel window does not ---------- */
[dir="rtl"] .window,
[dir="rtl"] .marquee,
[dir="rtl"] .bulbs {
  direction: ltr;
}
/* ---------- reduced effects ---------- */
.low-motion .petals,
.low-motion .bulbs i,
.low-motion .cell.lit:not(.weak) img {
  animation: none;
}
.low-motion .petals {
  display: none;
}
.low-motion .callout {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 350px) {
  .hud {
    gap: 4px;
  }
  .wallet {
    padding: 0 8px;
  }
}

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

.hud .wallet {
  flex: 1;
  padding-inline: 6px;
  max-width: none;
}
.hud .grow {
  flex: 0;
}

.hud .wallet b {
  font-size: max(12px, calc(var(--u) * 26));
}

@media (max-width: 350px) {
  .hud {
    gap: 2px;
  }
  .hud .wallet {
    padding-inline: 2px;
  }
  .hud .wallet b {
    font-size: 12px;
  }
  .hud .coin-symbol,
  .hud .plus {
    display: none;
  }
}
