:root {
  color-scheme: light;
  --cream: #fff4d2;
  --ink: #5b2d06;
  --gold: #ffd35a;
  --teal: #0f7fa6;
  --game-h: 100dvh;
  --wheel: 300px;
  --hud-h: 44px;
  --top-h: 52px;
  --cards-h: 128px;
  --dock-h: 94px;
  --btn: clamp(32px, 9.6vw, 40px);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, -apple-system, sans-serif;
  color: #fff;
  background: #1b6f93;
  overflow: hidden;
}
html.is-half,
html.is-half body {
  background: transparent;
}
html.is-half body {
  pointer-events: none;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #fff4be;
  outline-offset: 2px;
}
button:disabled {
  cursor: default;
}
[hidden] {
  display: none !important;
}
img {
  -webkit-user-drag: none;
  user-select: none;
}
.ink {
  text-shadow: -1.5px 0 var(--ink), 1.5px 0 var(--ink), 0 -1.5px var(--ink), 0 1.5px var(--ink), 0 3px 0 #3c1900aa;
}

/* ---- frame ---- */
#game {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 500px);
  height: var(--game-h);
  padding: max(4px, env(safe-area-inset-top)) 8px max(5px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  background: url(assets/art/bg_scene.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center bottom / cover #2b9fd0;
  pointer-events: auto;
}
html.is-half #game {
  padding-top: 6px;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 40px #00000073;
}
.hud {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: var(--hud-h);
}
.round-btn {
  position: relative;
  flex: none;
  width: var(--btn);
  height: var(--btn);
  background: url(assets/art/round_btn.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center / 100% 100% no-repeat;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 2px #00000040);
}
.round-btn:active {
  transform: scale(0.94);
}
.round-btn svg {
  width: 56%;
  height: 56%;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 #04506b);
}
.round-btn svg circle {
  fill: #fff;
  stroke-width: 1;
}
.round-btn .ico-collapse,
.round-btn .ico-off {
  display: none;
}
#view[aria-pressed="true"] .ico-expand,
#sound[aria-pressed="true"] .ico-on {
  display: none;
}
#view[aria-pressed="true"] .ico-collapse,
#sound[aria-pressed="true"] .ico-off {
  display: block;
}
[dir="rtl"] #exit svg {
  transform: scaleX(-1);
}
.title {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: grid;
  place-items: center;
  max-width: 170px;
  margin-inline: auto;
}
.title img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.title strong {
  position: relative;
  font-size: clamp(18px, 6.2vw, 26px);
  line-height: 1;
  color: var(--gold);
  font-weight: 900;
  margin-top: -6px;
  text-shadow: -1.5px 0 var(--ink), 1.5px 0 var(--ink), 0 -1.5px var(--ink), 0 1.5px var(--ink), 0 3px 0 #3c1900aa;
  direction: ltr;
}
.title small {
  position: absolute;
  bottom: 12%;
  inset-inline: 0;
  text-align: center;
  font-size: 9px;
  line-height: 1;
  color: #fff0c4;
  direction: ltr;
  text-shadow: 0 1px 1px #3c1900;
}
.hud-actions {
  display: flex;
  gap: 4px;
  flex: none;
}

/* ---- pool and bonus reels ---- */
.top {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 6px;
  flex: none;
  height: var(--top-h);
}
.pool,
.bonus {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
}
.pool > img,
.bonus > img:first-child {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.pool {
  flex-direction: column;
  justify-content: center;
  padding-inline-start: 18%;
  padding-inline-end: 6%;
  direction: ltr;
}
.pool span {
  position: relative;
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: #c9f4ff;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 1px 1px #04506b;
}
.pool b {
  position: relative;
  font-size: clamp(18px, 6vw, 25px);
  line-height: 1.05;
  color: var(--gold);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: -1.2px 0 #6a3407, 1.2px 0 #6a3407, 0 -1.2px #6a3407, 0 1.2px #6a3407, 0 2px 0 #3c1900aa;
  white-space: nowrap;
}
.bonus {
  justify-content: space-evenly;
  padding: 0 4%;
  direction: ltr;
}
.reel {
  position: relative;
  width: 31%;
  aspect-ratio: 0.82;
  display: grid;
  place-items: center;
  max-height: 100%;
}
.reel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.reel b {
  position: relative;
  font-size: clamp(11px, 3.6vw, 15px);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 0 #04506b, 1px 0 0 #04506b, -1px 0 0 #04506b;
  opacity: 0.6;
}
.reel.spin b {
  opacity: 1;
  animation: reel-blur 0.14s linear infinite;
}
.reel.stop b {
  opacity: 1;
  animation: pop 0.3s ease-out;
}
.reel.hit {
  filter: drop-shadow(0 0 7px #ffe27a) drop-shadow(0 0 3px #fff);
}
.reel.hit b {
  color: var(--gold);
}
@keyframes reel-blur {
  50% {
    transform: translateY(-2px);
    opacity: 0.75;
  }
}
@keyframes pop {
  40% {
    transform: scale(1.4);
  }
}

/* ---- wheel ---- */
.stage {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  place-items: center;
}
.wheel {
  position: relative;
  width: var(--wheel);
  height: var(--wheel);
  direction: ltr;
}
.rotor {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  overflow: hidden;
  background: #6b3f17;
  will-change: transform;
}
.slot {
  position: absolute;
  inset: 0;
  transform: rotate(calc(var(--i) * 40deg));
}
.wedge {
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 50%, 32.3% 0, 67.7% 0);
  background: radial-gradient(circle at 50% 50%, var(--c2), var(--c) 78%);
}
.slot .fruit {
  position: absolute;
  top: 7%;
  left: 50%;
  width: 21%;
  transform: translateX(-50%) rotate(calc(-1 * (var(--i) * 40deg + var(--rot, 0deg))));
  filter: drop-shadow(0 2px 2px #00000059);
  pointer-events: none;
  transition: transform 0.25s, opacity 0.25s;
}
.rotor.revealed .slot:not(.lit) .wedge {
  filter: brightness(0.62) saturate(0.8);
}
.rotor.revealed .slot:not(.lit) .fruit {
  opacity: 0.55;
}
.slot.lit .wedge {
  filter: brightness(1.28) saturate(1.2);
  animation: lit-pulse 0.9s ease-in-out infinite alternate;
}
.slot.lit .fruit {
  transform: translateX(-50%) rotate(calc(-1 * (var(--i) * 40deg + var(--rot, 0deg)))) scale(1.22);
  filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 3px #ffe27a);
}
@keyframes lit-pulse {
  to {
    filter: brightness(1.5) saturate(1.3);
  }
}
.rim,
.pointer,
.hub {
  position: absolute;
  pointer-events: none;
}
.rim {
  inset: 0;
  width: 100%;
  height: 100%;
}
.wheel.spinning .rim {
  filter: drop-shadow(0 0 9px #ffe27a);
}
.pointer {
  left: 50%;
  top: -4%;
  width: 14%;
  transform: translateX(-50%);
  z-index: 3;
  filter: drop-shadow(0 3px 2px #00000059);
}
.hub {
  left: 50%;
  top: 50%;
  width: 32%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  place-items: center;
}
.hub img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hub b {
  position: relative;
  font-size: calc(var(--wheel) * 0.095);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  margin-top: -6%;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 #04506b, 1px 0 0 #04506b, -1px 0 0 #04506b;
}
.hub b.urgent {
  color: #ffe27a;
  animation: pop 1s ease-in-out infinite;
}
.hub small {
  position: absolute;
  bottom: 24%;
  max-width: 52%;
  font-size: clamp(7px, calc(var(--wheel) * 0.026), 10px);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #c9f4ff;
  text-shadow: 0 1px 1px #04506b;
}
.banner {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  z-index: 6;
  max-width: 92%;
  padding: 6px 16px;
  border-radius: 999px;
  border: 2px solid #fff3b0;
  background: linear-gradient(#ffb32e, #e8651a);
  color: #fff;
  font-weight: 900;
  font-size: clamp(13px, 4.2vw, 18px);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 #7a3207;
  box-shadow: 0 4px 12px #0000004d;
  animation: banner-in 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes banner-in {
  from {
    transform: translateX(-50%) scale(0.5);
    opacity: 0;
  }
}

/* ---- fruit cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  flex: none;
  height: var(--cards-h);
  direction: ltr;
}
.card {
  position: relative;
  min-width: 0;
  transition: transform 0.15s;
}
.card:not(:disabled):active {
  transform: scale(0.97);
}
.card .frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.card .fruit {
  position: absolute;
  left: 50%;
  top: 6%;
  width: 54%;
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 2px #00000059);
  pointer-events: none;
  transition: transform 0.2s;
}
.card .mult {
  position: absolute;
  top: -5px;
  right: -3px;
  width: 31%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.card .mult img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.card .mult b {
  position: relative;
  font-size: clamp(11px, 3.4vw, 15px);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 0 #8a3b05, 1px 0 0 #8a3b05, -1px 0 0 #8a3b05;
}
.card .total {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 7%;
  height: 22%;
  display: grid;
  place-items: center;
}
.card .total img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.card .total b {
  position: relative;
  font-size: clamp(11px, 3.6vw, 15px);
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 #04506b;
}
.card .mine {
  position: absolute;
  left: 5px;
  top: 6px;
  min-width: 34px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(#ffe27a, #f3a91d);
  border: 2px solid #fff6c9;
  color: #6a3407;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 2px 4px #0000004d;
}
.card.selected .frame {
  filter: drop-shadow(0 0 5px #ffe27a);
}
.card.hit .fruit {
  transform: translateX(-50%) scale(1.14);
  animation: card-hit 0.7s ease-in-out infinite alternate;
}
.card.hit .frame {
  filter: drop-shadow(0 0 9px #fff) drop-shadow(0 0 4px #ffd35a);
}
@keyframes card-hit {
  to {
    filter: drop-shadow(0 0 10px #fff) brightness(1.15);
  }
}
.card:disabled:not(.hit) .fruit {
  filter: drop-shadow(0 2px 2px #00000059) saturate(0.85);
}
.card.pending {
  outline: 3px dashed #ffeac0;
  outline-offset: -2px;
}

/* ---- recent strip ---- */
.strip {
  position: relative;
  flex: none;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-inline: 8px;
}
.strip .bar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.strip .new {
  position: relative;
  flex: none;
  padding: 1px 9px;
  border-radius: 6px;
  background: linear-gradient(#ffa526, #e8651a);
  border: 1.5px solid #fff0b0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.3;
  text-shadow: 0 1px 0 #7a3207;
}
.recent {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  direction: ltr;
}
.mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mini img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.mini:not(:last-child)::after {
  content: "›";
  color: #7ee08a;
  font-weight: 900;
  font-size: 14px;
}
.no-recent .strip {
  display: none;
}

/* ---- dock ---- */
.dock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 44px 44px;
  gap: 6px 8px;
  flex: none;
  height: var(--dock-h);
  align-content: space-between;
}
.wallet,
.repeat {
  position: relative;
  min-width: 0;
  height: 44px;
  display: flex;
  align-items: center;
}
.wallet .bar,
.repeat .bar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.wallet {
  gap: 4px;
  padding-inline: 6px 12px;
}
.wallet .coin {
  position: relative;
  width: 30px;
  height: 30px;
  flex: none;
}
.wallet b {
  position: relative;
  flex: 1;
  min-width: 0;
  text-align: center;
  direction: ltr;
  unicode-bidi: isolate;
  font-size: clamp(12px, 4vw, 17px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 #04506b, 1px 0 0 #04506b, -1px 0 0 #04506b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.repeat {
  justify-content: center;
}
.repeat span {
  position: relative;
  font-size: clamp(15px, 4.8vw, 20px);
  font-weight: 900;
  text-shadow: -1.2px 0 #8a3b05, 1.2px 0 #8a3b05, 0 -1.2px #8a3b05, 0 1.2px #8a3b05;
  white-space: nowrap;
}
.repeat.is-off {
  filter: grayscale(0.7) brightness(0.9);
}
.repeat:active:not(.is-off) {
  transform: scale(0.96);
}
.chips {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-around;
  align-items: center;
  direction: ltr;
}
.chip {
  position: relative;
  width: 44px;
  height: 44px;
  transition: transform 0.15s;
  filter: drop-shadow(0 2px 2px #00000059);
}
.chip img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.chip b {
  position: relative;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 0 #00000099, 1px 0 0 #00000099, -1px 0 0 #00000099;
}
.chip[aria-pressed="true"] {
  transform: translateY(-4px) scale(1.14);
  filter: drop-shadow(0 0 7px #fff7a0) drop-shadow(0 3px 2px #00000059);
}
.chip:nth-child(2) b {
  color: #5b2d06;
  text-shadow: 0 1px 0 #fff1a8;
}

/* ---- feedback, result ---- */
.feedback {
  position: absolute;
  z-index: 20;
  left: 10px;
  right: 10px;
  top: calc(var(--hud-h) + 12px);
  display: grid;
  gap: 4px;
  pointer-events: none;
}
.feedback > * {
  pointer-events: auto;
}
.connection,
.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 10px;
  border-radius: 12px;
  border: 2px solid #d6a04c;
  box-shadow: 0 4px 12px #00000040;
}
.connection {
  background: #4d211adf;
  justify-content: center;
  font-size: 12px;
  text-align: center;
}
.notice {
  background: var(--cream);
  color: #542413;
}
.notice p {
  flex: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.notice button,
.result-card button,
.loading button {
  min-height: 40px;
  padding: 4px 14px;
  border-radius: 10px;
  border: 1.5px solid #fff0b0;
  background: linear-gradient(#ffa526, #e8651a);
  color: #fff;
  font-weight: 800;
  text-shadow: 0 1px 0 #7a3207;
}
.result-card {
  position: absolute;
  z-index: 10;
  left: 10px;
  right: 10px;
  bottom: calc(var(--dock-h) + 12px);
  max-height: calc(100% - var(--hud-h) - var(--top-h) - 24px);
  overflow: auto;
  padding: 14px 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: linear-gradient(#fff6d8, #f1dba6);
  color: #572a15;
  border: 3px solid #e0a63c;
  border-radius: 16px;
  box-shadow: 0 6px 20px #3c19008c;
  animation: banner-in 0.3s ease-out;
}
#result-fruits {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}
#result-fruits img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
#result-title {
  text-align: center;
}
#result-reward {
  font-size: 30px;
  line-height: 1.1;
  color: #d4570f;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}
#result-bonus {
  margin: 0;
  padding: 2px 12px;
  border-radius: 999px;
  background: #ffb32e;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 0 #7a3207;
}
.result-values {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 20px;
  font-size: 13px;
}
.result-values b {
  text-align: end;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}
.result-card .result-close {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  min-width: 44px;
  font-size: 24px;
  background: transparent;
  color: #54291a;
  border: 0;
  text-shadow: none;
}
#result-actions {
  width: calc(100% + 24px);
  padding: 8px 14px 10px;
  border-top: 1px solid #b8915955;
  background: #f7dfb8;
  text-align: center;
  margin-top: 6px;
}
#result-actions button {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
}
#result-auto {
  font-size: 10px;
  margin: 6px 0 0;
}

/* ---- 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(#0a4f6b66, #0a4f6bcc), url(assets/art/bg_scene.webp?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d) center / cover;
}
.load-title {
  position: relative;
  width: 220px;
  height: 66px;
  display: grid;
  place-items: center;
}
.load-title img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.load-title strong {
  position: relative;
  margin-top: -8px;
  font-size: 34px;
  color: var(--gold);
  font-weight: 900;
  direction: ltr;
  text-shadow: -2px 0 var(--ink), 2px 0 var(--ink), 0 -2px var(--ink), 0 2px var(--ink), 0 4px 0 #3c1900aa;
}
.load-wheel {
  width: 130px;
  height: 130px;
  animation: spin 6s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading p {
  font-size: 15px;
  margin: 0;
}
.loading progress {
  width: 70%;
  height: 14px;
  accent-color: #ffb32e;
}
.loading small {
  color: #e6f7ff;
  font-size: 12px;
  margin-top: 8px;
}
.loading.failed .load-wheel {
  animation: none;
  filter: grayscale(1);
}
#exited {
  z-index: 50;
}

/* ---- panel ---- */
#panel-mask {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: #0a2a3a8c;
}
dialog {
  position: absolute;
  inset: 12px;
  margin: auto;
  width: calc(100% - 24px);
  max-width: 450px;
  max-height: calc(100% - 24px);
  padding: 0;
  border: 3px solid #e0a63c;
  border-radius: 16px;
  background: #fff4d2;
  color: #442717;
  box-shadow: 0 6px 22px #35140ca0;
  overflow: hidden;
  z-index: 41;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog::backdrop {
  background: transparent;
}
dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: none;
  padding: 8px 14px;
  background: linear-gradient(#25a7cf, #0f7fa6);
  color: #fff;
}
dialog h2 {
  margin: 0;
  font-size: 19px;
  text-shadow: 0 1px 0 #04506b;
}
dialog header button {
  min-width: 44px;
  min-height: 44px;
  font-size: 28px;
  color: #fff;
}
#panel-tabs {
  display: flex;
  flex: none;
  gap: 4px;
  padding: 6px 8px 0;
  background: #f2d79b;
  overflow-x: auto;
}
#panel-tabs button {
  flex: 1 0 auto;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px 10px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: #6a3a1a;
}
#panel-tabs button[aria-selected="true"] {
  background: #fff4d2;
  color: #0f7fa6;
}
#panel-body {
  padding: 14px;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
#panel-body p {
  font-size: 14px;
  line-height: 1.6;
}
#panel-body label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  margin: 12px 0;
}
#panel-body input[type="range"] {
  min-height: 44px;
  min-width: 0;
  width: 46%;
  accent-color: #e8651a;
}
#panel-body select {
  max-width: 58%;
  min-height: 44px;
  background: #fff9e6;
  color: #432718;
  border: 1px solid #b59969;
  border-radius: 6px;
}
#panel-body ol {
  padding-inline-start: 24px;
  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 #d4b990;
  padding: 8px 0;
  font-size: 14px;
}
#panel-body .row img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
#panel-body .record {
  padding: 8px 0;
  border-bottom: 1px solid #d4b990;
}
#panel-body .record img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
}
#panel-body .record .tag {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ffb32e;
  color: #fff;
  font-weight: 800;
}
#panel-body input[type="checkbox"] {
  appearance: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0;
  flex: none;
  cursor: pointer;
}
#panel-body input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 44px;
  height: 24px;
  background: #b49c77;
  border-radius: 16px;
}
#panel-body input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff6da;
}
#panel-body input[type="checkbox"]:checked::before {
  background: #0f9bc4;
}
#panel-body input[type="checkbox"]:checked::after {
  left: 24px;
}
#panel-body output {
  min-width: 40px;
  text-align: end;
  direction: ltr;
  unicode-bidi: isolate;
}
.panel-retry {
  min-height: 44px;
  padding: 8px 20px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(#ffa526, #e8651a);
}
.record-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.record-values span {
  font-size: 11px;
  display: block;
}
.record-values b {
  display: block;
  font-size: 16px;
  overflow-wrap: anywhere;
  direction: ltr;
  unicode-bidi: isolate;
}
.record > strong {
  display: block;
  direction: ltr;
  unicode-bidi: isolate;
}
.my-ranking {
  background: #f2d79b;
  border-radius: 8px;
  padding: 8px;
}

/* ---- height tiers (set by layoutFor from the height the game actually has) ---- */
.is-tiny {
  --btn: 32px;
}
.is-compact .cards {
  gap: 4px;
}
.is-compact .card .fruit {
  width: 42%;
  top: 3%;
}
.is-compact .card .mult {
  width: 30%;
  top: -4px;
}
.is-compact .card .mine {
  top: 4px;
  min-width: 28px;
  padding: 1px 6px;
  font-size: 10px;
}
.is-compact .card .total {
  height: 27%;
  bottom: 5%;
}
.is-compact .dock {
  grid-template-columns: 1.3fr 0.8fr 1.8fr;
  grid-template-rows: 44px;
  gap: 4px;
  align-content: center;
}
.is-compact .chips {
  grid-column: auto;
  gap: 0;
}
.is-compact .chip {
  width: 38px;
  height: 38px;
}
.is-compact .chip b {
  font-size: 11px;
}
.is-compact .wallet {
  padding-inline: 5px 8px;
  gap: 4px;
}
.is-compact .wallet .coin {
  width: 24px;
  height: 24px;
}
.is-compact .repeat span {
  font-size: 13px;
}
.is-tiny .title small {
  display: none;
}
.is-compact .result-card {
  bottom: calc(var(--dock-h) + 8px);
  padding-top: 8px;
}
.is-compact #result-fruits img {
  width: 28px;
  height: 28px;
}
.is-compact #result-reward {
  font-size: 24px;
}
.is-compact #result-actions {
  padding: 5px 14px 6px;
}
.is-compact #result-actions button {
  min-height: 40px;
}
.is-compact #result-auto {
  display: none;
}
.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;
  }
}

/* narrow phones in the one-row dock: shave chips and the wallet so a 7-digit balance still fits */
@media (max-width: 359px) {
  .is-compact .dock {
    grid-template-columns: 1fr auto auto;
  }
  .is-compact .chip {
    width: 34px;
    height: 34px;
  }
  .is-compact .chip b {
    font-size: 10px;
  }
  .is-compact .wallet .coin {
    width: 20px;
    height: 20px;
  }
  .is-compact .wallet b {
    font-size: 11px;
  }
  .is-compact .repeat {
    min-width: 58px;
  }
  .is-compact .repeat span {
    font-size: 12px;
  }
}

/* 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;
}
