:root {
  color: #f6f1e4;
  background: #140c08;
  font-family: "Segoe UI", sans-serif;
}
body { margin: 0; min-height: 100vh; }
.banner {
  margin: 0;
  padding: 8px 16px;
  background: #3f2e12;
  color: #f6e2b8;
  font-size: 13px;
}
.cabinet {
  width: min(980px, calc(100% - 24px));
  margin: 16px auto 24px;
  padding: 16px;
  background: radial-gradient(circle at 50% 0%, #4a2a12, #1a100c 55%);
  border: 1px solid #8a6230;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.hud, .console, .free-meter {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.hud { justify-content: space-between; }
.mark {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #e6b35a;
  border-radius: 999px;
  color: #e6b35a;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.hud p, .bet { margin: 0; }
.hud span, .bet span, .free-meter { color: #d9c7a2; font-size: 12px; letter-spacing: 0.06em; }
.hud strong, .bet strong { display: block; font-size: 28px; }
.free-meter {
  justify-content: center;
  margin: 12px 0 0;
  font-weight: 800;
}
.free-meter strong { color: #fff; font-size: 22px; margin-left: 8px; }
.stage { position: relative; margin: 14px 0; }
.board {
  display: grid;
  position: relative;
  background: #07080c;
  border-radius: 12px;
  overflow: hidden;
}
.cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: linear-gradient(#242018, #100e0c);
  border: 3px solid #3a3128;
  font-size: clamp(18px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}
.cell.spinning { color: #8d8376; }
.cell.win { border-color: #f2c14e; box-shadow: inset 0 0 18px rgba(242, 193, 78, 0.45); }
.cell img { width: 78%; height: 78%; object-fit: contain; pointer-events: none; }
.cell.wild { box-shadow: inset 0 0 12px rgba(212, 240, 122, 0.35); }
.cell.wild-win { animation: wild-pulse 0.6s ease-in-out 2; box-shadow: 0 0 16px rgba(212, 240, 122, 0.85); }
.cell.scatter { box-shadow: inset 0 0 10px rgba(215, 180, 255, 0.45); }
.cell.scatter-win, body.scatter-hot .cell.scatter { animation: scatter-pop 0.45s ease-in-out 2; border-color: #d7b4ff; }
.logo { margin: 0; min-height: 28px; font-weight: 900; letter-spacing: 0.04em; }
.logo img { display: block; max-height: 52px; width: auto; max-width: 220px; object-fit: contain; }
.volume { display: grid; font-size: 10px; color: #d9c7a2; }
.volume input { width: 72px; }
.stage.framed { padding: 3.2% 2.4%; background-repeat: no-repeat; background-size: 100% 100%; }
body.has-skin { background-color: var(--cabinet, #140c08); background-image: var(--bg-desktop, none); background-size: cover; background-position: center; }
body.has-skin .cabinet { background: color-mix(in srgb, var(--cabinet) 88%, transparent); border-color: var(--frame); }
body.has-skin .board { background: var(--reel); }
body.has-skin .hud p:nth-of-type(2) strong { color: var(--balance-color); }
body.has-skin .bet strong { color: var(--bet-color); }
body.has-skin #total { color: var(--win-color); }
body.has-skin .free-meter { color: var(--free-color); }
body.has-skin #spin { background-color: var(--spin); background-size: cover; }
body.has-skin #auto { background: var(--auto); }
body.has-skin.in-free { background-image: var(--bg-free, var(--bg-desktop)); }
body.preset-smooth .cell.win { transition: box-shadow 0.25s ease; }
body.preset-arcade .cell.spinning { transform: translateY(1px); }
body.preset-arcade #spin[data-state="spinning"] { transform: scale(0.98); }
#spin[data-state="ready"] { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
#spin[data-state="spinning"] { filter: brightness(1.08); }
#spin[data-state="skip"] { filter: brightness(1.2); }
#spin[data-state="disabled"] { opacity: 0.45; }
.s-10 { color: #d5d8df; }
.s-J { color: #8eb6ff; }
.s-Q { color: #c9a0ff; }
.s-K { color: #7dcea0; }
.s-A { color: #ff8d8d; }
.s-BAR { color: #f2c14e; }
.s-BELL { color: #ffb347; }
.s-DIAMOND { color: #8ef6ff; }
.s-WILD { color: #d4f07a; }
.s-SCATTER { color: #e7b6ff; }
.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.overlay {
  position: absolute;
  inset: 18% 12%;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  background: rgba(8, 6, 4, 0.78);
  border: 2px solid #f2c14e;
  border-radius: 16px;
  text-align: center;
}
.overlay strong { font-size: clamp(32px, 6vw, 64px); color: #f2c14e; }
.overlay b { font-size: clamp(28px, 5vw, 52px); }
.overlay.big { border-color: #ffcf70; }
.overlay.mega { border-color: #ff7ad9; }
.overlay.mega strong { color: #ff7ad9; }
.overlay.free { border-color: #fff4d2; }
.overlay.free strong { color: #fff4d2; }
.console { justify-content: center; }
button {
  font: inherit;
  color: #1c140c;
  background: #f4f0e6;
  border: 0;
  border-radius: 10px;
  min-width: 52px;
  min-height: 48px;
  padding: 10px 14px;
  font-weight: 800;
}
#spin { min-width: 140px; background: #e6b35a; font-size: 22px; }
#auto { background: #d7c4a3; }
button:disabled { opacity: 0.45; }
.auto-menu { display: flex; gap: 8px; }
.bet { min-width: 88px; text-align: center; }
.dev {
  width: min(980px, calc(100% - 24px));
  margin: 0 auto 32px;
  color: #c9bba6;
}
.meta, .message { margin: 8px 0; }
.stats-link { color: #e6b35a; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #3a3128; }
@keyframes wild-pulse {
  50% { transform: scale(1.06); }
}
@keyframes scatter-pop {
  50% { transform: scale(1.08); }
}
@media (max-width: 800px) {
  body.has-skin { background-image: var(--bg-mobile, var(--bg-desktop)); }
  .hud strong, .bet strong { font-size: 22px; }
  #spin { min-width: 96px; font-size: 18px; }
  .volume { display: none; }
}
@media (max-height: 820px) {
  .banner, .dev { display: none; }
  body { height: 100vh; overflow: hidden; }
  .cabinet {
    height: calc(100vh - 12px);
    margin: 6px auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }
  .hud, .console, .free-meter { flex: 0 0 auto; }
  .stage { flex: 1 1 auto; min-height: 0; display: flex; }
  .board { flex: 1; min-height: 0; }
  .cell { aspect-ratio: auto; min-height: 0; }
  .hud strong, .bet strong { font-size: 18px; }
}
