* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  --ivory: #efe6d0;
  --brass: #b08d57;
  --felt: #103e2e;
  --red: #9e2a2b;
  --ink: #16181a;
}
body {
  margin: 0;
  background: #101b17;
  color: var(--ivory);
  font:
    13px Manrope,
    system-ui,
    sans-serif;
  font-variant-numeric: tabular-nums;
  min-width: 320px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid #7f765c;
  background: #1b2d24;
  border-radius: 5px;
  min-height: 42px;
  padding: 9px 15px;
}
button:hover:not(:disabled),
a:hover {
  color: #fff7df;
  border-color: var(--brass);
}
button:disabled {
  opacity: 0.36;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
svg:focus-visible {
  outline: 2px solid #d7b77c;
  outline-offset: 4px;
}
header {
  max-width: 1360px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 36px;
  border-bottom: 1px solid #b08d5733;
}
.back {
  color: var(--ivory);
  padding: 10px;
}
.brand {
  flex: 1;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 2.1px;
  font-weight: 600;
  color: #c0b59c;
}
h1,
h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  margin: 3px 0;
}
h1 {
  font-size: 27px;
  letter-spacing: 0.3px;
}
.bank {
  text-align: right;
  margin-right: 10px;
}
.bank strong {
  display: block;
  font-size: 22px;
  font-weight: 500;
  margin-top: 3px;
}
.icon-button {
  border-color: #b08d5738;
  width: 42px;
  padding: 10px;
  background: transparent;
}
.icon {
  width: 19px;
  height: 19px;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
main {
  max-width: 1280px;
  margin: auto;
  padding: 14px 36px 30px;
}
.salon {
  display: grid;
  grid-template-columns: 46% 54%;
  align-items: center;
  max-width: 1050px;
  margin: 0 auto 12px;
}
.wheel-wrap {
  position: relative;
  text-align: center;
  min-width: 0;
}
#wheel {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  display: block;
  margin: auto;
}
.wheel-label {
  display: block;
  font-size: 10px;
  letter-spacing: 2.5px;
  color: #bdb098;
  margin-top: -2px;
}
.round-panel {
  padding: 20px 20px 10px 30px;
}
.round-panel h2 {
  font-size: 38px;
  line-height: 1.1;
  margin: 12px 0 8px;
}
#result-detail {
  color: #c0bdad;
  font-size: 13px;
  min-height: 18px;
}
.round-stats {
  display: flex;
  gap: 46px;
  border-top: 1px solid #b08d5733;
  margin-top: 21px;
  padding-top: 16px;
}
.round-stats strong {
  display: block;
  font-size: 22px;
  font-weight: 500;
  margin-top: 6px;
}
.history-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
#stats {
  font-size: 11px;
  color: #a9ae9f;
}
#history {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0;
  min-height: 29px;
  margin: 9px 0;
}
#history li {
  display: grid;
  place-items: center;
  width: 25px;
  height: 28px;
  border: 1px solid #efe6d023;
  border-radius: 3px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  background: #16181a;
}
#history li.red {
  background: var(--red);
}
#history li.green {
  background: #20573d;
}
#history li:first-child {
  outline: 1px solid var(--brass);
  outline-offset: 2px;
  margin-right: 4px;
}
.table-rail {
  border-radius: 24px;
  padding: 12px;
  background: linear-gradient(120deg, #4b281a, #26120c 40%, #3a1a10 80%, #1f0d08);
  border: 1px solid #5c3826;
  box-shadow:
    0 12px 22px #0004,
    inset 0 1px #795139;
}
.felt {
  border: 1px solid var(--brass);
  border-radius: 14px;
  padding: 14px 20px 5px;
  background-color: var(--felt);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' opacity='.035' filter='url(%23n)' d='M0 0h90v90H0z'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 45px #001c1360;
}
.table-heading {
  display: flex;
  justify-content: space-between;
  color: #c8c3a4;
  font-size: 10px;
  letter-spacing: 2px;
  margin: 0 7px 9px;
}
#felt {
  display: block;
  width: 100%;
  touch-action: pan-y;
  user-select: none;
  overflow: visible;
}
.cell {
  stroke: var(--ivory);
  stroke-width: 1.5;
  fill: transparent;
}
.number-cell.red {
  fill: var(--red);
}
.number-cell.black {
  fill: var(--ink);
}
.number-text {
  font:
    600 27px 'Cormorant Garamond',
    Georgia,
    serif;
  fill: var(--ivory);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.outside-text {
  font:
    500 12px Manrope,
    system-ui,
    sans-serif;
  letter-spacing: 1px;
  fill: var(--ivory);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.preview-cell {
  fill: #d6bd7950;
  pointer-events: none;
}
.cursor {
  stroke: #d9b774;
  stroke-width: 2.5;
  fill: none;
  pointer-events: none;
}
.ghost {
  opacity: 0.55;
  pointer-events: none;
}
.bet-chip {
  pointer-events: none;
  filter: drop-shadow(0 2px 1px #0007);
}
.dolly {
  fill: #b08d57;
  stroke: #f5dca5;
  stroke-width: 1.5;
  pointer-events: none;
}
.winning {
  stroke: #e3bd72;
  stroke-width: 3;
}
.stake-winner {
  animation: collect 1.5s ease-in forwards;
  transform-box: fill-box;
  transform-origin: center;
}
.stake-loser {
  animation: sweep 1.3s ease-in forwards;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes collect {
  0%,
  40% {
    opacity: 1;
    transform: translateY(0) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translate(var(--travel-x), var(--travel-y)) scale(0.4);
  }
}
@keyframes sweep {
  0%,
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--travel-x), var(--travel-y)) scale(0.4);
  }
}
#caption {
  min-height: 17px;
  text-align: center;
  font-size: 12px;
  color: #d4cfb9;
  margin: 6px 0 5px;
}
.controls {
  display: grid;
  grid-template-columns: auto 1fr 155px;
  align-items: center;
  gap: 22px;
  padding: 20px 8px 0;
}
#chips {
  display: flex;
  gap: 10px;
}
.chip {
  --chip: #9e2a2b;
  border: 0;
  width: 49px;
  height: 49px;
  min-height: 0;
  border-radius: 50%;
  position: relative;
  isolation: isolate;
  background: repeating-conic-gradient(var(--ivory) 0deg 12deg, var(--chip) 12deg 45deg);
  padding: 0;
  color: var(--ivory);
  box-shadow:
    0 3px 0 #0008,
    0 5px 7px #0005;
  transition: transform 0.15s;
  outline: none;
}
.chip:before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--chip);
  border: 1px solid #efe6d0aa;
  z-index: -1;
}
.chip span {
  font-weight: 700;
  font-size: 14px;
}
.chip[aria-pressed='true'] {
  transform: translateY(-6px);
  outline: 2px solid var(--brass);
  outline-offset: 4px;
}
.chip[data-value='10'] {
  --chip: #456476;
}
.chip[data-value='25'] {
  --chip: #21523e;
}
.chip[data-value='50'] {
  --chip: #a24f2c;
}
.chip[data-value='100'] {
  --chip: #292b2a;
  background: repeating-conic-gradient(var(--brass) 0deg 12deg, var(--chip) 12deg 45deg);
}
.actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.actions button {
  font-size: 11px;
  padding: 8px 11px;
  border-color: #b08d573a;
  background: transparent;
}
.actions .icon {
  display: block;
  margin: 0 auto 4px;
  width: 17px;
  height: 17px;
}
.spin {
  background: #c3a268;
  border: 1px solid #e2c58b;
  color: #171f18;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  min-height: 55px;
}
#action-hint {
  grid-column: 1/-1;
  text-align: center;
  font-size: 11px;
  color: #adaf9e;
  margin: -10px 0 0;
  min-height: 16px;
}
#bankrupt {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--brass);
  border-radius: 10px;
  text-align: center;
}
#bankrupt h2 {
  font-size: 30px;
}
#bankrupt a {
  display: inline-block;
  color: var(--ivory);
  padding: 10px;
}
dialog {
  background: #152c21;
  color: var(--ivory);
  border: 1px solid var(--brass);
  border-radius: 12px;
  max-width: 650px;
  width: calc(100% - 30px);
  max-height: 85vh;
  padding: 28px;
  line-height: 1.7;
}
dialog::backdrop {
  background: #050c09cf;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
dialog h2 {
  font-size: 34px;
}
dialog h3 {
  font-size: 13px;
  color: #c9ad79;
  margin-bottom: 5px;
}
.guide-row {
  display: grid;
  grid-template-columns: 75px 1fr 50px;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #b08d5728;
  padding: 8px 0;
  font-size: 12px;
}
.guide-row svg {
  width: 72px;
  height: 42px;
}
.guide-row b {
  font-weight: 500;
}
.fairness {
  border-top: 1px solid #b08d5750;
  padding-top: 15px;
  font-size: 11px;
  color: #c1bda9;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1400px) {
  main {
    padding-top: 20px;
  }
  .salon {
    margin-bottom: 22px;
  }
  #wheel {
    max-width: 340px;
  }
}
@media (max-width: 1100px) and (min-width: 681px) {
  header {
    padding: 15px 24px;
  }
  main {
    padding: 8px 24px 25px;
  }
  #wheel {
    max-width: 285px;
  }
  .round-panel {
    padding: 10px 20px;
  }
  .round-panel h2 {
    font-size: 32px;
  }
  .round-stats {
    margin-top: 12px;
    padding-top: 10px;
  }
  .history-heading {
    margin-top: 16px;
  }
  .controls {
    gap: 12px;
    grid-template-columns: auto 1fr 135px;
  }
  .chip {
    width: 43px;
    height: 43px;
  }
  #chips {
    gap: 9px;
  }
  .actions button {
    padding: 7px 9px;
  }
}
@media (max-width: 680px) {
  header {
    padding: 12px 14px;
    gap: 8px;
  }
  h1 {
    font-size: 21px;
  }
  .brand .eyebrow {
    font-size: 9px;
    letter-spacing: 1.5px;
  }
  .bank {
    margin: 0 4px 0 0;
  }
  .bank strong {
    font-size: 17px;
  }
  .bank .eyebrow {
    font-size: 9px;
  }
  .back {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }
  .icon-button {
    width: 44px;
    min-height: 44px;
    padding: 10px;
  }
  main {
    padding: 8px 10px calc(215px + env(safe-area-inset-bottom));
  }
  .salon {
    display: block;
    margin-bottom: 14px;
  }
  .wheel-wrap {
    width: 238px;
    margin: auto;
  }
  #wheel {
    width: 230px;
  }
  .wheel-label {
    font-size: 9px;
    letter-spacing: 2px;
  }
  .round-panel {
    padding: 14px 8px 0;
    text-align: center;
  }
  .round-panel > .eyebrow {
    display: none;
  }
  .round-panel h2 {
    font-size: 28px;
    margin: 3px 0;
  }
  .round-panel #result-detail {
    font-size: 12px;
    margin: 5px 0;
  }
  .round-stats {
    justify-content: center;
    gap: 75px;
    margin-top: 10px;
    padding-top: 10px;
  }
  .round-stats strong {
    font-size: 18px;
    margin: 4px;
  }
  .round-stats .eyebrow {
    font-size: 9px;
  }
  .history-heading {
    justify-content: center;
    margin-top: 12px;
  }
  #history {
    justify-content: center;
    gap: 4px;
    max-height: 63px;
    overflow: hidden;
  }
  #history li {
    width: 22px;
    height: 25px;
    font-size: 16px;
  }
  .table-rail {
    padding: 7px;
    border-radius: 17px;
  }
  .felt {
    padding: 12px 8px 4px;
    border-radius: 11px;
  }
  .table-heading {
    font-size: 9px;
    letter-spacing: 1px;
    margin-bottom: 9px;
  }
  #caption {
    font-size: 11px;
    min-height: 28px;
    padding: 3px;
  }
  .controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #14251d;
    border-top: 1px solid #b08d5770;
    z-index: 5;
    padding: 15px 13px calc(9px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr 100px;
    gap: 10px;
    box-shadow: 0 -6px 22px #0004;
  }
  #chips {
    grid-column: 1;
    gap: 6px;
    justify-content: center;
  }
  .chip {
    width: 42px;
    height: 42px;
  }
  .chip span {
    font-size: 12px;
  }
  .chip:before {
    inset: 5px;
  }
  .actions {
    grid-column: 1;
    grid-row: 2;
    gap: 4px;
  }
  .actions button {
    padding: 4px 10px;
    min-height: 44px;
    font-size: 11px;
  }
  .actions .icon {
    display: inline-block;
    width: 13px;
    height: 13px;
    margin: 0 4px 0 0;
  }
  .spin {
    grid-column: 2;
    grid-row: 1/3;
    height: 100px;
    min-width: 0;
    padding: 10px;
    letter-spacing: 1px;
  }
  #action-hint {
    font-size: 10px;
    margin: 0;
    line-height: 1.3;
  }
  dialog {
    padding: 20px;
  }
  .guide-row {
    grid-template-columns: 65px 1fr 45px;
    gap: 8px;
  }
}
.dolly-drop {
  animation: dolly-drop 450ms ease-out both;
}
@keyframes dolly-drop {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 380px) {
  .controls {
    grid-template-columns: 1fr 88px;
  }
  .chip {
    width: 40px;
    height: 40px;
  }
  #chips {
    gap: 4px;
  }
  .actions button {
    padding: 4px 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dolly-drop {
    animation: none;
  }
}
