:root {
  --sky: #ffe14a;
  --yellow: #ffe14a;
  --yellow-deep: #f0c400;
  --red: #d01222;
  --red-deep: #b10e1c;
  --blue: #1f78d6;
  --blue-deep: #1868c4;
  --ink: #3b1208;
  --pay: #e11d2e;
  --gold: #f6c445;
  --stage: 430px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  min-height: 100dvh;
  font-family: Outfit, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #1a0608;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow: hidden;
}

button, p { margin: 0; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

button:disabled {
  cursor: default;
  opacity: 0.48;
}

.hall {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.stage {
  position: relative;
  width: min(100vw, var(--stage));
  min-width: 0;
  max-width: 100%;
  height: min(100dvh, 680px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto auto auto;
  background: var(--sky);
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

.stage > * { min-width: 0; }

.board {
  position: relative;
  z-index: 2;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.clouds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.clouds i {
  position: absolute;
  background: #fff;
  border-radius: 40px;
  opacity: 0.95;
}

.clouds i::before,
.clouds i::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.clouds i:nth-child(1) { width: 64px; height: 16px; top: 7%; left: 16%; }
.clouds i:nth-child(1)::before { width: 22px; height: 22px; left: 10px; top: -12px; }
.clouds i:nth-child(1)::after { width: 28px; height: 28px; left: 26px; top: -16px; }
.clouds i:nth-child(2) { width: 40px; height: 12px; top: 5%; left: 34%; }
.clouds i:nth-child(2)::before { width: 16px; height: 16px; left: 8px; top: -9px; }
.clouds i:nth-child(2)::after { width: 18px; height: 18px; left: 18px; top: -10px; }
.clouds i:nth-child(3) { width: 52px; height: 14px; top: 24%; right: 4%; }
.clouds i:nth-child(3)::before { width: 18px; height: 18px; left: 8px; top: -10px; }
.clouds i:nth-child(3)::after { width: 22px; height: 22px; left: 20px; top: -13px; }
.clouds i:nth-child(4) { width: 36px; height: 12px; top: 48%; left: 2%; }
.clouds i:nth-child(4)::before { width: 14px; height: 14px; left: 6px; top: -8px; }
.clouds i:nth-child(4)::after { width: 16px; height: 16px; left: 14px; top: -9px; }

.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 6px 0;
  gap: 6px;
}

.top-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.top-side-right { align-items: flex-end; }

.round,
.ping {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.round { color: #c45a48; gap: 0; }
.round b { font-weight: 800; }

.ping { color: #1ea34a; }
.ping b { font-family: Fredoka, Outfit, sans-serif; font-weight: 700; }

.wifi {
  width: 16px;
  height: 14px;
  display: block;
}

.tools-left,
.tools-right {
  display: flex;
  gap: 6px;
  align-items: center;
  z-index: 4;
}

.tools-left { flex-direction: column; }
.tools-right { flex-direction: row; }

.tools button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(#fff, #f3f3f3);
  box-shadow: 0 2px 0 rgba(120, 80, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06);
  display: grid;
  place-items: center;
  padding: 0;
}

.tools button:active { transform: translateY(1px); }

.tools svg { width: 18px; height: 18px; }

.wheel-col {
  container-type: size;
  position: relative;
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}

.wheel {
  position: relative;
  z-index: 1;
  width: min(92cqi, 92cqb);
  aspect-ratio: 1;
  container-type: inline-size;
  flex: none;
}

.spokes {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pod {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24cqi;
  height: 24cqi;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 45deg)) translateY(-36cqi) rotate(calc(var(--i) * -45deg));
  z-index: 1;
}

.pod-face {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(#fff 0 49%, #1258a8 49% 100%);
  border: 5px solid #8f1024;
  box-shadow: 0 3px 0 rgba(150, 20, 30, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.pod-face::before {
  content: "";
  position: absolute;
  left: 16%;
  top: 5%;
  width: 68%;
  height: 22%;
  border-radius: 50%;
  background: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.pod-food {
  position: relative;
  z-index: 1;
  height: 50%;
  display: grid;
  place-items: center;
  line-height: 1;
}

.pod-emoji {
  font-size: 7.2cqi;
  line-height: 1;
  transform: translateY(-10%);
}

.pod-meta {
  position: relative;
  z-index: 5;
  height: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  line-height: 1;
  padding: 0 2% 0;
}

.pod-pay {
  position: absolute;
  left: auto;
  right: 5%;
  bottom: 10%;
  transform: none;
  color: #ffe14a;
  background: none;
  border-radius: 0;
  padding: 0;
  font-family: Fredoka, Outfit, sans-serif;
  font-weight: 300;
  font-size: clamp(12px, 3.6cqi, 15px);
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: none;
  -webkit-text-stroke: 1px #1a1208;
  paint-order: stroke fill;
}

.hot {
  position: absolute;
  z-index: 2;
  font-family: Fredoka, Outfit, sans-serif;
  font-weight: 700;
  line-height: 1;
}

.pod-total,
.pod-mine {
  color: #fff;
  font-family: Fredoka, Outfit, sans-serif;
  font-weight: 300;
  font-size: clamp(11px, 3.25cqi, 13px);
  letter-spacing: -0.02em;
  white-space: nowrap;
  /* text-shadow: 0 1px 0 #0a3266; */
}

.pod-mine {
  color: #ffe56a;
}

.pod-total.is-long,
.pod-mine.is-long {
  font-size: clamp(9px, 2.55cqi, 11px);
  letter-spacing: -0.04em;
}

.pod:has(.hot:not([hidden])) {
  z-index: 4;
}

.hot {
  top: 1%;
  left: 9%;
  z-index: 8;
  background: linear-gradient(#ffb03a, #ff7a12);
  color: #fff;
  font-size: 2.3cqi;
  padding: 2px 4px;
  border-radius: 4px;
  transform: rotate(-12deg);
  box-shadow: 0 1px 0 rgba(140, 40, 0, 0.35);
}

.stage[data-phase="spin"] .pod,
.stage[data-phase="result"] .pod,
.stage[data-phase="spin"] .pod-face,
.stage[data-phase="result"] .pod-face {
  opacity: 1;
}

.stage[data-phase="spin"] .pod:not(.is-lit)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.76);
  z-index: 6;
  pointer-events: none;
}

.stage[data-phase="spin"] .pod.is-lit {
  z-index: 5;
}

.stage[data-phase="spin"] .pod.is-lit .pod-face {
  transform: none;
  border-color: #8f1024;
  box-shadow: 0 3px 0 rgba(150, 20, 30, 0.16);
}

.pod.is-turn {
  z-index: 6;
}

.pod.is-turn .pod-face::after,
.pod.is-win .pod-face::after {
  content: "👆";
  position: absolute;
  left: 62%;
  top: 60%;
  z-index: 6;
  transform: translate(-50%, -42%);
  font-size: 6cqi;
  line-height: 1;
  pointer-events: none;
  filter:
    drop-shadow(0 0 1px #fff)
    drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55));
}

.pod.is-lit .pod-face {
  transform: scale(1.06);
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px #ffd15a,
    0 0 16px rgba(255, 70, 20, 0.4);
}

.stage[data-phase="bet"] .pod.is-turn .pod-face,
.pod.is-win .pod-face {
  border-color: #ff2436;
  border-width: 5px;
  box-shadow: 0 3px 0 rgba(150, 20, 30, 0.16);
}

.pod.is-win {
  z-index: 5;
}

.pod.is-win .pod-face {
  transform: none;
  animation: pop 0.55s ease;
}

.lamp {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24cqi;
  height: 24cqi;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #ffc83d;
  transform: translate(-50%, -50%) rotate(calc(var(--i, 0) * 45deg)) translateY(-36cqi);
  pointer-events: none;
  z-index: 0;
}

.hub::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 2px dotted rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36cqi;
  height: 36cqi;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 36%, #ff5d78, #ee2d4e 58%, #d4143a);
  border: 3px solid #ffd0d8;
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.16),
    inset 0 -8px 0 rgba(160, 0, 30, 0.18),
    0 6px 14px rgba(140, 0, 20, 0.22);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 8px 8px;
  text-align: center;
  overflow: hidden;
}

.plate {
  position: absolute;
  top: 5%;
  width: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 46%, #f7f1e6 62%, #e7dfd2 100%);
  box-shadow:
    inset 0 0 0 2px #fff,
    inset 0 0 0 4px #f0c14d,
    0 3px 0 rgba(120, 16, 36, 0.2);
}

.stage[data-phase="bet"] .plate {
  animation: sway 3.4s ease-in-out infinite;
}

.plate-food {
  position: relative;
  z-index: 1;
  font-size: 5.4cqi;
  letter-spacing: -0.12em;
  line-height: 1;
  filter: drop-shadow(0 1px 0 rgba(80, 40, 10, 0.18));
}

.utensils {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.plate .fork,
.plate .knife {
  position: absolute;
  left: 18%;
  top: 6%;
  width: 64%;
  height: 88%;
}

.plate .fork { transform: rotate(-38deg); }
.plate .knife { transform: rotate(36deg); }

.hub p {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #fff;
  line-height: 1.05;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

#hubKicker {
  font-size: clamp(10px, 3.2cqi, 14px);
  font-weight: 800;
  letter-spacing: 0.01em;
}

#hubTime {
  font-family: Fredoka, Outfit, sans-serif;
  font-size: clamp(18px, 7cqi, 30px);
  font-weight: 700;
  margin-top: 1px;
}

#hubSub {
  font-size: clamp(9px, 2.5cqi, 12px);
  font-weight: 700;
}

#hubSub:empty { display: none; }

.hub.is-urgent #hubTime {
  color: #ffe56a;
  animation: tick 0.55s ease-in-out infinite;
}

.hub.is-urgent {
  border-color: #ffe56a;
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.16),
    inset 0 -8px 0 rgba(160, 0, 30, 0.18),
    0 0 0 3px rgba(255, 229, 106, 0.85),
    0 6px 14px rgba(140, 0, 20, 0.22);
}

.dots {
  display: none;
  gap: 5px;
  height: 22px;
  align-items: center;
  justify-content: center;
}

.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: dot 0.9s ease-in-out infinite;
}

.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }

.stage[data-phase="spin"] #hubTime { display: none; }
.stage[data-phase="spin"] .dots { display: flex; }

.stage[data-phase="spin"] .hub {
  box-shadow:
    inset 0 0 0 3px #ff6a72,
    0 0 0 6px rgba(255, 210, 80, 0.35),
    0 8px 16px rgba(140, 0, 20, 0.28);
}

.stand {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.leg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12cqi;
  height: 72cqi;
  margin-left: -6cqi;
  border-radius: 999px;
  transform-origin: top center;
  border: 1.5px solid #6d1220;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 42px,
      #fff3c4 43px,
      #e2b44a 45px,
      #8d5a10 48px,
      #fff6d2 50px,
      transparent 52px
    ),
    linear-gradient(
      90deg,
      rgba(48, 0, 10, 0.62) 0%,
      rgba(255, 220, 180, 0.12) 14%,
      rgba(255, 255, 255, 0.62) 32%,
      rgba(255, 255, 255, 0.04) 50%,
      rgba(40, 0, 8, 0.28) 76%,
      rgba(24, 0, 6, 0.62) 100%
    ),
    repeating-linear-gradient(
      112deg,
      #e21830 0 18px,
      #fff7ee 18px 32px,
      #f0c14d 32px 36px
    );
  box-shadow:
    inset 2px 0 2px rgba(255, 255, 255, 0.75),
    inset -6px 0 8px rgba(70, 0, 14, 0.45),
    6px 10px 14px rgba(70, 28, 0, 0.3);
}

.leg::after {
  content: "";
  position: absolute;
  top: 6%;
  bottom: 6%;
  left: 22%;
  width: 22%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.72),
    rgba(255, 255, 255, 0.08)
  );
  pointer-events: none;
}

.leg-a { transform: rotate(26deg); }
.leg-b { transform: rotate(-26deg); }

.base {
  position: relative;
  z-index: 4;
  margin-top: -28px;
  background: transparent;
  padding: 0;
}

.specials {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 6px;
  position: relative;
  z-index: 2;
}

.dock {
  position: relative;
  z-index: 1;
  margin-top: -16px;
  background: linear-gradient(#4aa4ef, var(--blue) 42%, var(--blue-deep));
  border-radius: 16px 16px 0 0;
  padding: 18px 6px 4px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.chips {
  display: flex;
  flex-direction: row;
  gap: 4px;
  align-items: stretch;
}

.chip {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255, 255, 255, 0.72) 0%, transparent 36%),
    radial-gradient(circle at 50% 46%, #ffe9a0 0 48%, #f0b429 72%, #c47a0a 100%);
  box-shadow:
    inset 0 0 0 2px #fff6d2,
    inset 0 0 0 4px #a15c09,
    inset 0 0 0 6px #f6c445,
    0 3px 0 #8a5a08;
  color: #7a1d12;
  font-family: Fredoka, Outfit, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 0;
}

.chip::before {
  content: "";
  position: absolute;
  inset: 8px 9px;
  border-radius: 999px;
  border: 1px dashed rgba(122, 29, 18, 0.45);
  pointer-events: none;
}

.chip:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 0 0 2px #fff6d2,
    inset 0 0 0 4px #a15c09,
    inset 0 0 0 6px #f6c445,
    0 1px 0 #8a5a08;
}

.chip.is-on {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255, 255, 255, 0.55) 0%, transparent 34%),
    linear-gradient(#ff5d74, #d01222);
  color: #fff;
  box-shadow:
    inset 0 0 0 2px #fff,
    inset 0 0 0 4px #f6c445,
    inset 0 0 0 6px #ff4b66,
    0 3px 0 #7a1020;
}

.chip.is-on::before {
  border-color: rgba(255, 244, 190, 0.85);
}

.chip.is-on:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 0 0 2px #fff,
    inset 0 0 0 4px #f6c445,
    inset 0 0 0 6px #ff4b66,
    0 1px 0 #7a1020;
}

.chip:disabled,
.stage:not([data-phase="bet"]) .recommend {
  opacity: 0.45;
  filter: saturate(0.35);
}

.chip:disabled:active { transform: none; }

.special {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 0;
}

.special-pay {
  background: transparent;
  color: var(--pay);
  border-radius: 0;
  padding: 0;
  font-family: Fredoka, Outfit, sans-serif;
  font-weight: 700;
  font-size: 9px;
  line-height: 1;
  text-shadow: none;
  box-shadow: none;
}

.dish {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 36%, #fff 0 38%, #f7f1e6 58%, #e4d9c8 100%);
  box-shadow:
    inset 0 0 0 2px #fff,
    inset 0 0 0 6px #e6b325,
    inset 0 0 0 8px #fff6dc,
    0 0 0 1px #c9842a,
    0 3px 0 rgba(12, 40, 90, 0.2);
  line-height: 1;
}

.dish b {
  font-size: 28px;
  line-height: 1;
  transform: translateY(-7px);
  filter: drop-shadow(0 1px 0 rgba(80, 40, 10, 0.18));
}

.dish b.tokari {
  position: relative;
  display: block;
  width: 34px;
  height: 28px;
  transform: translateY(-8px);
  filter: none;
}

.tokari::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 3px;
  right: 3px;
  bottom: 1px;
  height: 13px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(#fff, #f4e2c4);
  border: 1.5px solid #c4923a;
  box-shadow: inset 0 -2px 0 rgba(170, 110, 30, 0.16);
}

.tokari::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 7px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(#fffef8, #f7e6cc);
  border: 1.5px solid #c4923a;
  border-top: 0;
  box-shadow: inset 0 1px 0 #fff;
}

.tokari i {
  position: absolute;
  z-index: 1;
  font-style: normal;
  font-size: 13px;
  line-height: 1;
}

.tokari i:nth-child(1) { left: 9px; top: 0; }
.tokari i:nth-child(2) { left: 0; top: 7px; }
.tokari i:nth-child(3) { right: 0; top: 6px; }
.tokari i:nth-child(4) { left: 10px; top: 10px; z-index: 2; }

.dish-stake {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 0;
  transform: translate(-50%, -40%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1px 5px 2px;
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.96);
  box-shadow: 0 1px 0 rgba(120, 70, 10, 0.16);
  pointer-events: none;
  line-height: 1.05;
}

.dish-total,
.dish-mine {
  font-family: Fredoka, Outfit, sans-serif;
  font-weight: 700;
  font-size: 8px;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: #1258a8;
}

.dish-mine {
  color: #c45c00;
}

.dish-tag {
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 34px;
  padding: 1px 5px 2px;
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.94);
  box-shadow: 0 1px 0 rgba(120, 70, 10, 0.16);
}

.dish small {
  font-size: 8px;
  font-weight: 800;
  color: #5c4030;
  margin: 0;
  letter-spacing: 0.02em;
}

.betbar {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  gap: 6px;
  align-items: end;
  margin-top: 4px;
}

.pill {
  background: linear-gradient(#fff, #f6f7f9);
  border-radius: 12px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 rgba(8, 40, 100, 0.22);
}

.pill span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a6a12;
}

.pill b {
  font-family: Fredoka, Outfit, sans-serif;
  font-size: 16px;
  line-height: 1.05;
  color: #1a1208;
}

.recommend {
  position: relative;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(#ffe08a, #f0b429 58%, #e09a14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 3px 0 #c4840a;
  min-height: 44px;
  padding: 14px 8px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #7a1d12;
}

.recommend i {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(#ff4b66, #d01222);
  color: #fff;
  font-family: Fredoka, Outfit, sans-serif;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 3px 10px 2px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 0 #9a1020;
}

.recommend span { font-size: 12px; font-weight: 800; }
.recommend em { font-style: normal; font-weight: 800; }

.recommend:active { transform: translateY(2px); }

.wallet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  background: linear-gradient(#e42338, #c01022);
}

.stat {
  height: 36px;
  max-height: 36px;
  overflow: hidden;
  background: #fff;
  border-radius: 999px;
  text-align: center;
  padding: 4px 8px 5px;
  min-width: 0;
  box-shadow: 0 2px 0 rgba(90, 0, 10, 0.18);
}

.stat.has-profile {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  padding: 3px 10px 3px 4px;
}

.stat .profile-face {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 0;
  max-height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff6d8, #f0c14b 55%, #d3920d);
  color: #6a3b00;
  font-family: Fredoka, Outfit, sans-serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(122, 74, 0, 0.25);
}

.stat .profile-face img {
  width: 28px;
  height: 28px;
  min-width: 0;
  min-height: 0;
  max-width: 28px;
  max-height: 28px;
  object-fit: cover;
  display: block;
}

.stat .stat-copy {
  display: block;
  min-width: 0;
  flex: 1;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}

.stat span {
  display: block;
  font-size: 10px;
  color: #9a6a12;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.stat b {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: Fredoka, Outfit, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1a1208;
}

.stat.has-profile b { justify-content: flex-start; }
.stat b.is-up { color: #15803d; }
.stat b.is-down { color: #be123c; }

.coin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff4c2, #f5c431 55%, #d3920d);
  box-shadow: inset 0 0 0 1px #b7791f;
  flex: none;
}

#repeat {
  border: 0;
  border-radius: 12px;
  min-width: 72px;
  min-height: 40px;
  background: linear-gradient(#fff, #f7f7f8);
  color: #9f1239;
  font-family: Fredoka, Outfit, sans-serif;
  font-weight: 700;
  box-shadow: 0 3px 0 rgba(90, 0, 10, 0.2);
}

#repeat:disabled {
  opacity: 1;
  background: #f6d5d8;
  color: #9a4a52;
  box-shadow: none;
}

#repeat:active:not(:disabled) { transform: translateY(2px); }

.history {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 7px 8px 6px;
  background: #fff;
  border-top: 1px solid #ffe4e6;
  min-height: 52px;
  overflow: hidden;
}

.result-label {
  flex: none;
  color: #1f9d55;
  font-size: 12px;
  font-weight: 800;
  text-transform: lowercase;
}

.result-label i {
  display: inline-block;
  margin-left: 2px;
  background: #ffe14a;
  color: #c45c00;
  font-style: normal;
  font-size: 9px;
  border-radius: 4px;
  padding: 1px 3px;
  vertical-align: 1px;
}

.history-row {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  padding: 2px 2px 2px 0;
}

.history-row::-webkit-scrollbar { display: none; }

.hist {
  position: relative;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  border: 2px solid #8f1024;
  background: radial-gradient(circle at 50% 32%, #fff, #f4f4f5);
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  box-shadow: 0 2px 0 rgba(120, 20, 30, 0.12);
}

.hist.is-new {
  border-color: #e21830;
  box-shadow: 0 0 0 2px #ffe14a, 0 2px 0 rgba(120, 20, 30, 0.12);
}

.ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  background: linear-gradient(#c41224, #9d0e1c);
  border-radius: 0;
  min-height: 26px;
  padding: 0 10px;
  overflow: hidden;
  color: #fff;
}

.ticker.is-idle .ticker-track { animation: none; }

.crown { color: #ffd15a; font-size: 16px; }

.ticker-label {
  flex: none;
  color: #ffe14a;
  font-family: Fredoka, Outfit, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.ticker-gap {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.45);
  flex: none;
}

.ticker-window { overflow: hidden; min-width: 0; flex: 1; }

.ticker-track {
  display: flex;
  gap: 28px;
  width: max-content;
  animation: marquee 16s linear infinite;
  font-size: 12px;
  font-weight: 650;
}

.ticker-track b { font-family: Fredoka, Outfit, sans-serif; }

.ticker-more { color: #fff; font-weight: 800; }

.toast {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  z-index: 8;
  background: rgba(40, 8, 8, 0.88);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.flyer {
  position: fixed;
  z-index: 20;
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 38%, #fff4c8, #f6c441);
  color: #9f1239;
  font-family: Fredoka, Outfit, sans-serif;
  font-size: 11px;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px #c2410c;
  pointer-events: none;
}

dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: calc(100vw - 24px);
}

dialog::backdrop { background: rgba(40, 0, 8, 0.5); }

.sheet {
  width: min(380px, 86vw);
  background: #fffaf0;
  border-radius: 22px;
  padding: 16px 16px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sheet h2 {
  margin: 0;
  font-size: 18px;
}

.sheet header button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #f3e6c8;
  font-size: 20px;
  line-height: 1;
}

.sheet p { font-size: 14px; line-height: 1.45; margin: 0 0 8px; }

.sheet ol { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.45; }

.sheet li + li { margin-top: 6px; }

.row-btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 8px;
  font-weight: 700;
  box-shadow: 0 2px 0 #f0e0c0;
}

.log {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f3e6c8;
  font-size: 14px;
}

@keyframes pop {
  40% { transform: scale(1.14); }
}

@keyframes tick {
  50% { transform: scale(1.12); }
}

@keyframes dot {
  0%, 70%, 100% { transform: translateY(0); opacity: 0.35; }
  35% { transform: translateY(-4px); opacity: 1; }
}

@keyframes sway {
  50% { transform: rotate(7deg); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.is-shake { animation: shake 0.28s linear; }

.reveal {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: linear-gradient(#9ad8ff, #62b7f4 36%, #4aa6ea);
  box-shadow: 0 -10px 24px rgba(20, 70, 130, 0.16);
}

.stage[data-phase="result"] .reveal { display: flex; }

.reveal-banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  min-height: 78px;
  padding: 0 36px 2px;
}

.reveal-prize {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 6px 0 rgba(20, 80, 140, 0.12));
  transform: translateY(6px);
}

.fork,
.knife {
  width: 28px;
  height: 56px;
  margin-bottom: 6px;
}

.reveal-count {
  position: absolute;
  right: 8px;
  top: 8px;
  color: #fff;
  font-family: Fredoka, Outfit, sans-serif;
  font-size: 26px;
  font-weight: 700;
  text-shadow: 0 2px 0 rgba(20, 80, 150, 0.25);
}

.bits {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bits i {
  position: absolute;
  width: 8px;
  height: 12px;
  border-radius: 2px;
}

.bits i:nth-child(1) { left: 12%; top: 18%; background: #ff4f86; transform: rotate(24deg); }
.bits i:nth-child(2) { left: 22%; top: 58%; background: #7cff6b; transform: rotate(-18deg); width: 6px; }
.bits i:nth-child(3) { left: 68%; top: 12%; background: #ffe14a; transform: rotate(40deg); }
.bits i:nth-child(4) { left: 76%; top: 48%; background: #ff5aa8; transform: rotate(-30deg); height: 14px; }
.bits i:nth-child(5) { left: 30%; top: 8%; background: #4aa6ff; width: 7px; height: 7px; border-radius: 50%; }
.bits i:nth-child(6) { right: 18%; top: 70%; background: #c6ff4a; transform: rotate(12deg); }
.bits i:nth-child(7) { left: 58%; top: 62%; background: #ff8a3d; width: 6px; height: 10px; transform: rotate(50deg); }
.bits i:nth-child(8) { left: 84%; top: 8%; background: #fff; width: 5px; height: 9px; transform: rotate(-12deg); }

.reveal-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px 12px 14px;
  box-shadow: 0 8px 0 rgba(30, 110, 180, 0.12);
}

.reveal-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 10px;
  color: #1a1a1a;
  font-family: Fredoka, Outfit, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.reveal-row .coin { width: 16px; height: 16px; }

.reveal-result { gap: 5px; }

.reveal-result .bar {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: #2f9bff;
}

.reveal-result span {
  display: inline-flex;
  gap: 2px;
  font-size: 20px;
  line-height: 1;
}

.reveal-rankline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  color: #1a1a1a;
  font-family: Fredoka, Outfit, sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.reveal-rankline span { flex: none; }

.reveal-rankline i {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #d5e8f6, #ffd0dc 70%, transparent);
}

.reveal-who {
  display: grid;
  grid-template-columns: 46px auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  justify-content: start;
  margin-top: 12px;
  text-align: left;
}

.reveal-avatar {
  grid-row: 1 / 3;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #eef1f4 0 7px, transparent 8px),
    radial-gradient(circle at 50% 78%, #eef1f4 0 12px, transparent 13px),
    #c5c9d1;
}

.reveal-avatar b {
  position: absolute;
  left: -4px;
  top: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe38a, #f0b429);
  color: #7a4b00;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.reveal-avatar b::before {
  content: "♛";
  position: absolute;
  left: 3px;
  top: -9px;
  color: #f0b429;
  font-size: 11px;
  line-height: 1;
}

.reveal-name {
  align-self: end;
  color: #222;
  font-size: 14px;
  font-weight: 700;
}

.reveal-pay {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #222;
  font-family: Fredoka, Outfit, sans-serif;
  font-weight: 700;
}

.reveal-pay .coin { width: 14px; height: 14px; }

@media (min-width: 860px) and (min-height: 760px) {
  .stage {
    height: min(720px, 100dvh);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  }
}

@media (max-width: 360px) {
  .chip { height: 42px; font-size: 13px; }
  .tools button { width: 32px; height: 32px; }
  .dish { width: 56px; height: 56px; }
  .dish b { font-size: 24px; }
  .betbar { grid-template-columns: 58px minmax(0, 1fr) 58px; gap: 6px; }
  .recommend span { font-size: 10px; }
  .wallet { gap: 6px; padding: 6px; }
  #repeat { min-width: 64px; }
}

@media (max-height: 700px) and (orientation: portrait) {
  .ticker { display: none; }
  .history { padding-bottom: 6px; }
  .dish { width: 54px; height: 54px; }
  .dish b { font-size: 22px; transform: translateY(-5px); }
}

@media (orientation: landscape) and (max-height: 560px) {
  .hall { display: block; }
  .stage {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 34vw);
    grid-template-rows: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "board side"
      "base side"
      "history side";
  }

  .board { grid-area: board; }
  .base { grid-area: base; margin-top: 0; }
  .wallet { grid-area: side; align-content: center; grid-template-columns: 1fr; }
  .history { grid-area: history; }
  .ticker { display: none; }
  .tools-left,
  .tools-right { gap: 4px; }
  .tools button { width: 28px; height: 28px; }
  .chip { height: 36px; font-size: 12px; }
  .dock { padding-top: 22px; border-radius: 0; }
  #hubKicker { white-space: nowrap; }
  .recommend i { font-size: 9px; }
  .stand { display: none; }
}

body:not(.is-playing) .hall {
  visibility: hidden;
}

#gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 196, 61, 0.28), transparent 36%),
    radial-gradient(circle at 50% 80%, rgba(208, 18, 34, 0.35), transparent 42%),
    #1a0608;
  transition: opacity 0.45s ease;
}

body.is-playing #gate {
  opacity: 0;
  pointer-events: none;
}

#gate.is-gone {
  display: none;
}

.gate-card {
  width: min(100%, 340px);
  text-align: center;
  color: #fff8ef;
}

.gate-stage {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto 8px;
}

.gate-ring {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 68%, #ffe14a 86%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 58px, #000 61px);
  mask: radial-gradient(circle, transparent 58px, #000 61px);
  animation: gate-spin 1.15s linear infinite;
}

.gate-foods span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-size: 18px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.16);
  transform: translate(-50%, -50%) rotate(calc(var(--a) * 45deg)) translateY(-64px) rotate(calc(var(--a) * -45deg));
}

.gate-crown {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #ffe14a;
  font-size: 42px;
  line-height: 1;
  text-shadow: 0 8px 18px rgba(255, 196, 40, 0.35);
}

.gate-brand {
  margin: 0 0 16px;
  font-family: Fredoka, Outfit, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

#gateStatus {
  margin: 0;
  min-height: 20px;
  font-size: 14px;
  font-weight: 650;
  color: rgba(255, 248, 239, 0.88);
}

#gateRetry {
  margin-top: 16px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(#ffe56a, #f0b429);
  color: #6a3a08;
  font-family: Fredoka, Outfit, sans-serif;
  font-weight: 700;
  box-shadow: 0 3px 0 #a15c09;
}

#gate.is-fail #gateStatus {
  color: #ffd0d6;
}

@keyframes gate-spin {
  to { transform: rotate(1turn); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
