:root {
  --cyan: #8eb8d4;
  --magenta: #e8a07a;
  --pink: #f4b6c4;
  --lime: #e8c56a;
  --gold: #e8c56a;
  --gold-bright: #f6d56a;
  --gold-deep: #b8862a;
  --cream: #fff7ee;
  --cream-2: #f4e2cc;
  --sky: #c5dff0;
  --lotus: #f4b6c4;
  --text: #5c3d28;
  --ink: #5c3d28;
}

html.i18n-pending body {
  opacity: 0;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #f3e4d4;
  color: var(--text);
  font-family: "Noto Sans SC", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "PingFang SC", sans-serif;
  user-select: none;
  overflow: hidden;
  touch-action: manipulation;
}

button, input { font-family: inherit; }

.app {
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(90% 70% at 50% 0%, #fff1d8 0%, transparent 55%),
    radial-gradient(80% 50% at 0% 100%, #f8c9d4 0%, transparent 48%),
    radial-gradient(70% 40% at 100% 80%, #c5dff0 0%, transparent 42%),
    #f4ddd0;
}

.cabinet {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 430px;
  max-height: 920px;
  background:
    radial-gradient(90% 40% at 50% 0%, #fff8ee 0%, transparent 55%),
    radial-gradient(70% 35% at 100% 100%, #dcecf8 0%, transparent 50%),
    linear-gradient(180deg, #fff7ee 0%, #f6e2d0 48%, #efd0c2 100%);
  border: 3px solid #e2b85c;
  border-radius: 18px;
  box-shadow:
    0 0 0 5px #f3e6d4,
    0 0 36px #f5c6c655,
    inset 0 0 40px #fff8;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  padding: 20px 16px 12px;
  min-width: 0;
}

.cabinet.is-jackpot {
  animation: machineFlash 0.14s linear infinite;
}

@keyframes machineFlash {
  0% { filter: brightness(1) saturate(1.05); box-shadow: 0 0 0 5px #f3e6d4, 0 0 50px #ffe566cc; }
  50% { filter: brightness(1.28) saturate(1.2); box-shadow: 0 0 0 5px #fff, 0 0 70px #e8c56a; }
  100% { filter: brightness(1.08) saturate(1.1); box-shadow: 0 0 0 5px #f6d56a, 0 0 60px #fff; }
}

.cabinet.is-bigwin {
  animation: bigPulse 0.28s ease-in-out 6;
}

@keyframes bigPulse {
  50% { filter: brightness(1.25) saturate(1.3); }
}

.marquee {
  position: absolute;
  inset: 4px;
  z-index: 9;
  pointer-events: none;
}

.marquee::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid #e2b85c;
  border-radius: 14px;
  box-shadow:
    0 0 0 2px #fff8ee,
    inset 0 0 0 1px #fff6d2;
}

.bulb {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 32% 28%, #e8c56a, #8a5a18 72%);
  box-shadow:
    0 0 0 1px #f0d070,
    0 0 0 2px #fff8ee,
    inset 0 1px 1px #fff8;
  z-index: 1;
}

.bulb.on {
  background: radial-gradient(circle at 32% 26%, #fffef6 0%, #ffe566 48%, #e8c056 100%);
  box-shadow:
    0 0 0 1px #fff8dc,
    0 0 6px #ffe566,
    0 0 11px #ffb347,
    inset 0 1px 1px #fff;
}

.bulb.hot {
  background: radial-gradient(circle at 32% 26%, #fff 0%, #fff6c2 42%, #ffd24a 100%);
  box-shadow:
    0 0 0 1px #fff,
    0 0 8px #fff,
    0 0 14px #ffe566;
}

.bulb-pink.on,
.bulb-pink.hot {
  background: radial-gradient(circle at 32% 26%, #fff 0%, #ffd0dc 48%, #e8899a 100%);
  box-shadow:
    0 0 0 1px #fff,
    0 0 7px #ffc8d4,
    0 0 12px #f4b6c4;
}

.bulb-sky.on,
.bulb-sky.hot {
  background: radial-gradient(circle at 32% 26%, #fff 0%, #d8ecf8 48%, #8eb8d4 100%);
  box-shadow:
    0 0 0 1px #fff,
    0 0 7px #c5dff0,
    0 0 12px #8eb8d4;
}

.scanlines, .vignette, .fx-flash, .fx-coins {
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.scanlines {
  z-index: 8;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 248, 240, 0.12) 0 1px,
    transparent 2px 4px
  );
  mix-blend-mode: overlay;
  opacity: 0.22;
}

.vignette {
  z-index: 8;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(232, 180, 160, 0.18) 100%);
}

.fx-flash {
  z-index: 7;
  background: #fff;
  opacity: 0;
}

.fx-flash.burst {
  animation: whiteFlash 0.18s ease-out 8;
}

.fx-flash.gold {
  background: #ffe566;
  animation: whiteFlash 0.22s ease-out 6;
}

@keyframes whiteFlash {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.38; }
}

.fx-coins { z-index: 11; overflow: hidden; }

.coin {
  position: absolute;
  top: -8%;
  left: 50%;
  font-size: 22px;
  animation: coinFall 1.4s ease-in forwards;
}

@keyframes coinFall {
  to { transform: translate(var(--dx), 120vh) rotate(720deg); opacity: 0; }
}

.top-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-items: stretch;
  z-index: 2;
  padding: 2px 2px 8px;
  min-width: 0;
}

.meter {
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: linear-gradient(#fffaf4, #f3e4c8);
  border: 2px solid #e2b85c;
  border-radius: 8px;
  padding: 7px 8px;
  min-width: 0;
  box-shadow: inset 0 0 10px #fff8, 0 0 8px #e8c56a33;
}

.meter-credit {
  border-color: #d4a84a;
  justify-content: flex-end;
}

.meter-label {
  font-size: 9px;
  letter-spacing: 0.4px;
  color: #b8862a;
  font-weight: 800;
  white-space: nowrap;
}

.meter-credit .meter-label { color: #a06a20; }

.meter-value {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  color: #8a5a18;
  text-shadow: 0 0 6px #ffe7a888;
  white-space: nowrap;
}

.meter-credit .meter-value {
  color: #9a6a18;
  text-shadow: 0 0 6px #ffe56688;
}

.meter-unit { font-size: 9px; color: #b8862a; font-weight: 800; }

.tool-row {
  display: flex;
  gap: 4px;
  align-items: center;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e2b85c;
  background: linear-gradient(#fffaf4, #f3e4c8);
  color: #8a5a18;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.icon-btn.active { color: #666; }

.icon-btn.text-btn {
  width: max-content;
  height: auto;
  min-width: 0;
  padding: 4px 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.board-wrap {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  min-width: 0;
}

.board-grid {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.icon-sprite {
  position: absolute;
  left: -999px;
  top: 0;
  width: 64px;
  height: 64px;
  opacity: 0;
  pointer-events: none;
}

.cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 28%, rgba(255,255,255,.55), transparent 46%),
    linear-gradient(180deg, #f7ead8, #e8d0b0);
  border: 2px solid #e2b85c;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.55),
    0 2px 0 #d4b07a55;
  overflow: hidden;
  transition: transform 0.08s linear, box-shadow 0.08s linear, border-color 0.08s linear;
}

.cell::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 6%;
  height: 28%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.38), transparent);
  pointer-events: none;
  z-index: 1;
}

.cell[data-id="apple"] { background: linear-gradient(180deg, #ff9aab, #e04a62); border-color: #ffb6c2; }
.cell[data-id="orange"] { background: linear-gradient(180deg, #ffc078, #ef8a20); border-color: #ffb347; }
.cell[data-id="grape"] { background: linear-gradient(180deg, #d4a8f0, #9a5ad4); border-color: #c9a0e8; }
.cell[data-id="lemon"] { background: linear-gradient(180deg, #ffe98a, #e8c84a); border-color: #f3d56a; }
.cell[data-id="melon"] { background: linear-gradient(180deg, #8fe0c8, #3cb89a); border-color: #7ed9c4; }
.cell[data-id="bell"] { background: linear-gradient(180deg, #ffe7a0, #e8c05a); border-color: #f0d070; }
.cell[data-id="star"] { background: linear-gradient(180deg, #fff0b0, #f0c84a); border-color: #f6d56a; }
.cell[data-id="bar"] { background: linear-gradient(180deg, #d8ecf8, #8eb8d4); border-color: #b8d4e8; }
.cell[data-id="seven"] { background: linear-gradient(180deg, #ffe7a0, #e0b43a); border-color: #f0d070; }
.cell[data-id="wow"] { background: linear-gradient(180deg, #ffc8d4, #e88aa0); border-color: #f4b6c4; }
.cell[data-id="mary"] { background: linear-gradient(180deg, #ffd0dc, #f0a0b4); border-color: #f8c0cc; }
.cell[data-id="luck"] { background: linear-gradient(180deg, #c8f0d8, #6bc89a); border-color: #a0e0c0; }

.cell-art {
  width: 68%;
  height: 54%;
  z-index: 4;
  filter: drop-shadow(0 3px 3px #0006);
}

.cell-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cell-icon {
  font-size: clamp(16px, 5vw, 26px);
  line-height: 1;
  filter: drop-shadow(0 2px 2px #0008);
}

.cell-icon.word {
  font-family: Orbitron, sans-serif;
  font-weight: 800;
  font-size: clamp(9px, 2.7vw, 13px);
  letter-spacing: 0.4px;
}

.cell-mult {
  margin-top: 1px;
  font-size: 8px;
  color: #5c3d28;
  font-weight: 800;
  text-shadow: 0 1px 0 #fff8;
  z-index: 4;
  background: rgba(255,255,255,.48);
  border-radius: 6px;
  padding: 1px 5px;
}

.cell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 38%, rgba(255,255,255,.85), rgba(255,229,102,.28) 48%, transparent 72%);
  transition: opacity 0.06s linear;
  z-index: 3;
}

.cell.on {
  z-index: 4;
  transform: scale(1.14);
  border-color: #fff;
  border-width: 3px;
  filter: brightness(1.28) saturate(1.2);
  box-shadow:
    0 0 0 2px #ffe566,
    0 0 14px #fff,
    0 0 26px #ffb347,
    inset 0 0 16px #fff8;
}

.cell.on::after { opacity: 1; }

.cell.trail {
  z-index: 3;
  transform: scale(1.06);
  border-color: #ffe9a8;
  filter: brightness(1.12);
  box-shadow: 0 0 14px #e8c56a, inset 0 0 12px #fff6;
}

.cell.trail::after { opacity: 0.45; }

.cell.trail2 {
  z-index: 2;
  border-color: #f0d070;
  box-shadow: 0 0 10px #e8c56a88, inset 0 0 8px #fff4;
}

.cell.trail2::after { opacity: 0.22; }

.cell.win { animation: winpulse 0.4s ease-in-out 5; }

.cell.all-on {
  z-index: 3;
  transform: scale(1.04);
  border-color: #fff;
  box-shadow: 0 0 16px var(--gold), 0 0 28px #fff, inset 0 0 18px #ffe566aa;
  filter: brightness(1.35);
}

@keyframes winpulse {
  50% { transform: scale(1.14); box-shadow: 0 0 24px var(--gold), 0 0 40px var(--magenta); }
}

.center-stage {
  grid-column: 2 / 7;
  grid-row: 2 / 7;
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 6px;
  justify-self: stretch;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255, 236, 210, .06)),
    url("images/cs_bg.jpg") center 22% / cover no-repeat;
  border: 3px solid #e2b85c;
  border-radius: 16px;
  box-shadow: inset 0 0 18px #fff8, 0 0 18px #e8c56a66;
  overflow: hidden;
  z-index: 4;
}

.center-stage::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 230, 160, 0.5);
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}

.center-stage.jackpot-look {
  animation: centerHue 0.2s linear infinite;
}

@keyframes centerHue {
  50% { filter: brightness(1.18) saturate(1.15); }
}

.logo-splash {
  text-align: center;
  line-height: 0.86;
  z-index: 1;
  max-width: 100%;
  padding: 4px 8px 6px;
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.42), rgba(255, 248, 230, 0.08));
  border-radius: 12px;
}

.logo-splash[hidden] {
  display: none !important;
}

.logo-title, .logo-fruit {
  font-family: Bungee, sans-serif;
  color: #fff8e8;
  text-shadow: 0 2px 0 #c9a046, 0 0 10px #fff, 0 0 16px #e8c56a;
  white-space: nowrap;
}

.logo-title { font-size: clamp(14px, 4.4vw, 20px); }
.logo-fruit { font-size: clamp(16px, 5.2vw, 24px); }

.logo-cn {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 900;
  color: #5a3010;
  background: linear-gradient(#ffe7a8, #e8c36a);
  border-radius: 5px;
}

.mascot {
  display: none;
}

@keyframes bob { 50% { transform: translateY(-6px); } }

.luck-row {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 10px 6px;
  background: rgba(255, 248, 240, 0.55);
  border: 1px solid #e2b85c88;
  border-radius: 10px;
}

.luck-text {
  font-family: Orbitron, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #8a5a18;
  text-shadow: 0 0 8px #fff;
}

.luck-num {
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  color: #b8862a;
  text-shadow: 0 0 8px #ffe56688;
}

.mary-walk, .jp-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
  z-index: 2;
  padding: 8px 12px;
  background: rgba(255, 248, 240, 0.62);
  border-radius: 12px;
}

.mary-walk[hidden], .jp-center[hidden],
.chat-panel[hidden], .modal[hidden], .sheet[hidden], .toast[hidden] {
  display: none !important;
}

.mary-girl { font-size: 28px; animation: stroll 0.7s linear infinite; }
.mary-label { font-size: 11px; font-weight: 900; color: #b8862a; }

@keyframes stroll {
  0%, 100% { transform: translateX(-10px) scaleX(1); }
  49% { transform: translateX(10px) scaleX(1); }
  50% { transform: translateX(10px) scaleX(-1); }
  99% { transform: translateX(-10px) scaleX(-1); }
}

.jp-word {
  font-family: Bungee, sans-serif;
  font-size: clamp(18px, 7vw, 28px);
  color: #ffe566;
  text-shadow: 0 0 12px #fff, 0 0 24px #e8c36a;
  animation: jpPop 0.35s ease-in-out infinite alternate;
}

.jp-coin { font-size: 28px; animation: bob 0.6s ease-in-out infinite; }

@keyframes jpPop {
  to { transform: scale(1.08); filter: hue-rotate(30deg); }
}

.mid-tools {
  z-index: 2;
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: 6px;
  align-items: center;
  padding: 4px 2px 0;
}

.bet-total {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #8a5a18;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 6px;
  align-items: stretch;
  padding: 6px 2px 5px;
  z-index: 2;
  min-width: 0;
  height: 44px;
}

.btn {
  border: 0;
  border-radius: 12px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 3px 0 #0006, inset 0 1px 0 #fff7;
}

.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #0006; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-all { background: linear-gradient(#ffd0dc, #e8899a); color: #6a2a38; font-size: 16px; }
.btn-clr { background: linear-gradient(#d8ecf8, #9ebfd8); color: #2a4a62; font-size: 14px; }
.btn-go {
  background: linear-gradient(#ffe9a8, #e8c056);
  color: #6a4a10;
  font-size: 18px;
  letter-spacing: 1px;
  box-shadow: 0 3px 0 #c9a046, 0 0 14px #e8c56a88;
}

.btn-go.ready { animation: goPulse 1s ease-in-out infinite; }

@keyframes goPulse {
  50% { box-shadow: 0 3px 0 #c9a046, 0 0 22px #fff, 0 0 36px #e8c56a; transform: scale(1.04); }
}

.num-pad {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 3px;
  min-width: 0;
}

.num-btn {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(#f3b7c4, #d48a98);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  box-shadow: 0 2px 0 #8a2068, inset 0 1px 0 #fff6;
  cursor: pointer;
}

.num-btn.active {
  outline: 2px solid #fff;
  box-shadow: 0 0 12px #e8c36a;
}

.bet-row {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 3px;
  z-index: 2;
  min-width: 0;
}

.bet-cell {
  position: relative;
  border: 2px solid #e2b85c;
  border-radius: 11px;
  min-width: 0;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  color: #5c3d28;
  overflow: hidden;
  padding: 2px 0;
  background: linear-gradient(180deg, #fffaf4, #f0dcc4);
}

.bet-cell:active { transform: scale(0.96); }

.bet-art {
  width: 22px;
  height: 18px;
}
.bet-art svg { width: 100%; height: 100%; display: block; }
.bet-icon { font-size: 15px; font-weight: 900; font-family: Orbitron, sans-serif; position: relative; z-index: 2; }
.bet-name {
  font-size: 8px;
  color: #8a5a28;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 2;
}
.bet-amt {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: #c45a6a;
  position: relative;
  z-index: 2;
}

.win-bar {
  z-index: 2;
  margin-top: 2px;
  padding: 6px 10px;
  background: linear-gradient(#fffaf4, #f3e4c8);
  border: 2px solid #e2b85c;
  border-radius: 10px;
  box-shadow: inset 0 0 10px #fff8, 0 0 8px #e8c56a33;
}

.win-kicker {
  font-size: 10px;
  font-weight: 800;
  color: #b8862a;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.win-viewport {
  height: 66px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
}

.win-track {
  will-change: transform;
}

.win-track .row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 3px 0;
  font-size: 12px;
  color: #5c3d28;
  white-space: nowrap;
}

.win-track .row .who {
  font-weight: 800;
  color: #8a5a18;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-track .row .what {
  color: #8a6240;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-track .row strong { color: #b8862a; }
.win-track .row.me .who { color: #c45a6a; }
.win-track .row.btc strong { color: #b8862a; text-shadow: 0 0 8px #ffe56688; }

.chat-panel {
  position: fixed;
  right: 12px;
  bottom: 16px;
  width: min(360px, calc(100vw - 24px));
  height: min(400px, calc(100dvh - 130px));
  background: #fff7ee;
  border: 2px solid #e2b85c;
  border-radius: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 50px #8a624055, 0 0 20px #e8c56a55;
  overflow: hidden;
  color: #5c3d28;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(90deg, #ffe8dc, #dcecf8);
}

.chat-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #f4e2cc;
  border-radius: 50%;
}

.chat-title { font-weight: 900; }
.chat-sub { font-size: 11px; color: #8a5a18; }
.online {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #7ed9c4;
  border-radius: 50%;
  margin-right: 4px;
}

.chat-close {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: #5c3d28;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fffaf4;
}

.bubble {
  max-width: 86%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble.cs { align-self: flex-start; background: #fff; border: 1px solid #e2b85c; }
.bubble.me { align-self: flex-end; background: #ffe8dc; border: 1px solid #f4b6c4; }
.bubble .who { display: block; font-size: 10px; opacity: 0.7; margin-bottom: 2px; }

.chat-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #f4e2cc;
}

.chat-form input {
  flex: 1;
  border: 1px solid #e2b85c;
  background: #fffaf4;
  color: #5c3d28;
  border-radius: 10px;
  padding: 10px;
  outline: none;
}

.chat-form button {
  border: 0;
  background: linear-gradient(#ffe9a8, #e8c056);
  color: #6a4a10;
  font-weight: 900;
  border-radius: 10px;
  padding: 0 14px;
  cursor: pointer;
}

.modal, .sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(80, 48, 32, 0.42);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card, .sheet-card {
  position: relative;
  width: min(360px, 100%);
  background: linear-gradient(180deg, #fff7ee, #f4e2cc);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 24px 18px 18px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 0 40px #ffe56655;
}

.modal.jackpot-modal .modal-card {
  border-color: #f3b7c4;
  box-shadow: 0 0 50px #e8c36aaa, 0 0 80px #ffe56666;
  animation: jpPop 0.4s ease-in-out infinite alternate;
}

.modal-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, #e8c36a48, transparent 55%);
  animation: spinGlow 4s linear infinite;
}

@keyframes spinGlow { to { transform: rotate(360deg); } }

.modal-kicker, .modal-amount, .modal-desc, .btn-claim {
  position: relative;
}

.modal-kicker { color: #b8862a; font-weight: 800; letter-spacing: 2px; }
.modal-amount {
  font-family: Orbitron, sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: #b8862a;
  margin: 10px 0;
  text-shadow: 0 0 16px #ffe56688;
}
.modal-desc { color: #5c3d28; font-size: 14px; }

.btn-claim {
  width: 100%;
  border: 0;
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  color: #6a2a38;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(#ffd0dc, #e8899a);
}

.sheet-card { text-align: left; padding: 0; max-height: min(70vh, 520px); display: flex; flex-direction: column; }
.sheet-head {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e8c36a;
}
.sheet-body {
  overflow-y: auto;
  padding: 12px 14px 16px;
  font-size: 13px;
  line-height: 1.5;
}

.pay-row, .hist-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed #e8c36a66;
}

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: #fff7ee;
  border: 1px solid var(--gold);
  color: #5c3d28;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
}

@media (max-height: 720px) {
  .bet-cell { min-height: 50px; }
  .luck-num { font-size: 16px; }
  .cabinet { padding-top: 16px; }
}
