:root {
  color-scheme: dark;
  --ink: #f7f1de;
  --muted: #a9b8aa;
  --dim: #6f8477;
  --felt: #0a4b3f;
  --felt-deep: #052f2a;
  --felt-dark: #041f1d;
  --glass: rgba(7, 29, 31, .8);
  --brass: #edbd5f;
  --brass-soft: #f4d994;
  --teal: #38d3bb;
  --red: #e96d5c;
  --line: rgba(215, 226, 192, .16);
  --shadow: 0 20px 60px rgba(0, 0, 0, .42);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #031311; }
body { overflow-x: hidden; color: var(--ink); background:
  radial-gradient(circle at 50% -15%, rgba(38, 150, 124, .28), transparent 40rem),
  linear-gradient(155deg, #061f1d 0%, #031311 46%, #020b0a 100%); }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 3px solid var(--brass-soft); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .4; }
.app-shell { width: min(100%, 1000px); min-height: 100dvh; height: 100dvh; margin: 0 auto; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; position: relative; isolation: isolate; }
.app-shell > * { min-width: 0; }
.app-shell::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .16; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.2) .6px, transparent .6px); background-size: 5px 5px; mix-blend-mode: soft-light; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 18px 10px; }
.brand-lockup, .top-actions, .meter, .table-heading-row, .receipt-heading, .drawer-heading { display: flex; align-items: center; }
.brand-lockup { gap: 9px; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(237,189,95,.6); border-radius: 50%; color: var(--brass); font-size: 16px; box-shadow: 0 0 16px rgba(237,189,95,.18); }
.eyebrow, .meter-label, .rail-label, .table-status, .button-kicker, .panel-label span, .number-rail-head span, .receipt-heading span, .session-chip, .drawer-heading .icon-button { margin: 0; color: var(--brass); font-size: 9px; font-weight: 800; letter-spacing: .16em; line-height: 1.1; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 20px; letter-spacing: .18em; line-height: 1; }
h2 { font-size: 19px; letter-spacing: .02em; line-height: 1.1; }
h3 { font-size: 11px; letter-spacing: .13em; }
.top-actions { gap: 7px; }
.session-chip { display: inline-flex; align-items: center; gap: 5px; padding: 7px 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 100px; letter-spacing: .08em; white-space: nowrap; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 9px var(--teal); }
.icon-button, .dock-action { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(7, 34, 31, .7); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; cursor: pointer; }
.icon-button:hover, .dock-action:hover { color: var(--ink); border-color: rgba(237,189,95,.7); }
.meter-strip { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 14px 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.meter, .meter strong { min-width: 0; max-width: 100%; }
.meter strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { min-height: 46px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 7px 11px; background: rgba(2, 22, 20, .72); }
.meter strong { color: var(--ink); font-size: 15px; letter-spacing: .02em; }
.meter:first-child strong { color: var(--brass-soft); }
.point-meter strong { color: var(--teal); font-size: 12px; }
.main-stage { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.dice-dome { flex: 0 0 clamp(152px, 24dvh, 210px); position: relative; padding: 0 14px 9px; }
.dome-surface { height: 100%; min-height: 132px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(117, 208, 179, .28); border-radius: 26px 26px 46% 46% / 22px 22px 30px 30px; background:
  radial-gradient(ellipse at 50% 115%, rgba(45, 205, 165, .24), transparent 49%),
  radial-gradient(ellipse at 50% 0%, rgba(28, 121, 118, .35), transparent 64%),
  linear-gradient(170deg, rgba(14, 68, 64, .94), rgba(3, 27, 28, .98)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 -26px 55px rgba(0,0,0,.45), 0 18px 36px rgba(0,0,0,.3); }
.dome-surface::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(180, 245, 214, .08); border-radius: 22px 22px 45% 45% / 19px 19px 30px 30px; pointer-events: none; }
.dome-lights { position: absolute; inset: 7px 35px auto; z-index: 2; display: flex; justify-content: space-between; pointer-events: none; }
.dome-lights i { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.dome-copy { position: absolute; top: 17px; left: 22px; right: 22px; z-index: 1; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dome-copy .eyebrow { color: var(--muted); }
.dome-message { max-width: 58%; overflow: hidden; color: var(--muted); font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.dice-pair { display: flex; align-items: center; gap: 10px; transform: translateY(5px); z-index: 1; }
.app-shell.is-rolling .die:first-child { animation: dice-tumble-left .62s cubic-bezier(.2,.75,.25,1) both; }
.app-shell.is-rolling .die:last-child { animation: dice-tumble-right .62s cubic-bezier(.2,.75,.25,1) both; }
.app-shell.is-rolling .total-orb { animation: orb-pulse .62s ease-in-out both; }
@keyframes dice-tumble-left {
  0% { transform: translate3d(0, 0, 0) rotate(0); }
  35% { transform: translate3d(-8px, -24px, 0) rotate(-135deg) scale(1.06); }
  72% { transform: translate3d(5px, 3px, 0) rotate(-285deg) scale(.96); }
  100% { transform: translate3d(0, 0, 0) rotate(-360deg); }
}
@keyframes dice-tumble-right {
  0% { transform: translate3d(0, 0, 0) rotate(0); }
  32% { transform: translate3d(9px, -20px, 0) rotate(145deg) scale(1.05); }
  74% { transform: translate3d(-4px, 4px, 0) rotate(300deg) scale(.97); }
  100% { transform: translate3d(0, 0, 0) rotate(360deg); }
}
@keyframes orb-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  45% { transform: scale(.82); opacity: .42; }
}
.die { width: clamp(58px, 15vw, 75px); aspect-ratio: 1; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 9px; border: 1px solid rgba(255,255,255,.45); border-radius: 14px; background: linear-gradient(140deg, #fbf7e8, #d5d5bc); box-shadow: 0 8px 18px rgba(0,0,0,.38), inset 0 2px 3px rgba(255,255,255,.9); transform: rotate(-7deg); }
.die:nth-child(3) { transform: rotate(8deg); }
.pip { width: 10px; height: 10px; align-self: center; justify-self: center; border-radius: 50%; background: #334d4a; box-shadow: inset 0 1px 1px rgba(255,255,255,.15); opacity: 0; }
.die[data-value="1"] .p5, .die[data-value="2"] .p1, .die[data-value="2"] .p9, .die[data-value="3"] .p1, .die[data-value="3"] .p5, .die[data-value="3"] .p9, .die[data-value="4"] .p1, .die[data-value="4"] .p3, .die[data-value="4"] .p7, .die[data-value="4"] .p9, .die[data-value="5"] .p1, .die[data-value="5"] .p3, .die[data-value="5"] .p5, .die[data-value="5"] .p7, .die[data-value="5"] .p9, .die[data-value="6"] .p1, .die[data-value="6"] .p3, .die[data-value="6"] .p4, .die[data-value="6"] .p6, .die[data-value="6"] .p7, .die[data-value="6"] .p9 { opacity: 1; }
.total-orb { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid rgba(237,189,95,.55); border-radius: 50%; background: rgba(2, 18, 18, .75); color: var(--brass-soft); font-size: 19px; font-weight: 800; box-shadow: 0 0 20px rgba(237,189,95,.14); }
.point-puck { position: absolute; right: clamp(16px, 8vw, 64px); bottom: 13px; z-index: 2; display: flex; align-items: baseline; gap: 5px; padding: 5px 9px; border: 1px solid rgba(237,189,95,.5); border-radius: 100px; background: rgba(0, 13, 13, .72); box-shadow: 0 5px 12px rgba(0,0,0,.3); }
.point-puck span { color: var(--brass); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.point-puck strong { color: var(--brass-soft); font-size: 15px; }
.dome-arc { position: absolute; left: 8%; right: 8%; bottom: -55%; height: 75%; border: 1px solid rgba(103, 232, 187, .22); border-radius: 50%; box-shadow: 0 -4px 18px rgba(35,199,157,.16); }
.result-line { height: 20px; overflow: hidden; padding: 5px 8px 0; color: var(--muted); font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.result-line.is-win { color: var(--teal); }
.result-line.is-loss { color: var(--red); }
.table-zone { min-height: 240px; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 7px 14px 10px; scrollbar-color: rgba(237,189,95,.45) transparent; }
.table-heading-row { justify-content: space-between; gap: 10px; padding: 0 4px 9px; }
.table-heading-row h2 { margin-top: 4px; }
.table-status { color: var(--dim); }
.felt-panel { position: relative; padding: 10px; border: 1px solid rgba(100, 197, 160, .28); border-radius: var(--radius); background: linear-gradient(145deg, rgba(11, 82, 66, .95), rgba(4, 49, 43, .98)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), var(--shadow); }
.felt-panel::before { content: ""; position: absolute; inset: 6px; pointer-events: none; border: 1px solid rgba(226, 214, 151, .1); border-radius: 11px; }
.contract-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.felt-button, .mini-felt-button, .prop-button { position: relative; min-height: 44px; border: 1px solid rgba(210, 224, 178, .23); cursor: pointer; background: linear-gradient(160deg, rgba(13, 107, 83, .94), rgba(5, 64, 54, .92)); box-shadow: inset 0 1px 0 rgba(255,255,255,.09); transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.felt-button:hover, .mini-felt-button:hover, .prop-button:hover { border-color: rgba(237,189,95,.68); background: linear-gradient(160deg, rgba(19, 122, 94, .96), rgba(7, 74, 61, .96)); }
.felt-button:active, .mini-felt-button:active, .prop-button:active { transform: translateY(1px) scale(.99); }
.felt-button.is-active, .mini-felt-button.is-active, .prop-button.is-active { border-color: var(--brass); box-shadow: inset 0 0 0 1px rgba(237,189,95,.3), 0 0 14px rgba(237,189,95,.12); }
.contract-button { min-height: 76px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 9px 11px; border-radius: 10px; text-align: left; }
.contract-button strong { font-size: 15px; letter-spacing: .05em; }
.contract-button small, .felt-button small { color: var(--muted); font-size: 9px; }
.bet-amount { position: absolute; top: 7px; right: 8px; color: var(--brass-soft); font-size: 10px; }
.odds-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px; margin-top: 7px; }
.mini-felt-button { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 8px; border-radius: 8px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.mini-felt-button b, .mini-felt-button em { color: var(--brass-soft); font-size: 13px; font-style: normal; }
.come-odds-slot { display: flex; gap: 4px; min-width: 0; }
.come-odds-slot:empty::after { content: "COME ODDS · TRAVEL FIRST"; display: grid; place-items: center; width: 100%; border: 1px dashed rgba(210,224,178,.2); border-radius: 8px; color: var(--dim); font-size: 8px; letter-spacing: .1em; }
.come-odds-slot .mini-felt-button { flex: 1; min-width: 0; }
.come-odds-group { display: flex; min-width: 0; flex: 1; gap: 3px; }
.come-odds-group .mini-felt-button { min-width: 0; }
.odds-remove { flex: 0 0 44px; min-height: 44px; border: 1px solid rgba(233,109,92,.4); border-radius: 7px; background: rgba(80, 26, 28, .7); color: #ffd5c9; cursor: pointer; }
.number-rail { position: relative; margin-top: 9px; padding: 8px; border: 1px solid rgba(237, 214, 137, .27); border-radius: 10px; background: rgba(2, 39, 34, .55); }
.number-rail-head, .panel-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px 7px; }
.number-rail-head span, .panel-label span { color: var(--brass-soft); }
.number-rail-head small, .panel-label small { color: var(--dim); font-size: 9px; }
.number-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.number-cell { min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 3px; border: 1px solid rgba(188, 220, 180, .18); border-radius: 6px; background: rgba(9, 74, 59, .82); cursor: pointer; }
.number-cell:nth-child(1), .number-cell:nth-child(5), .number-cell:nth-child(7), .number-cell:nth-child(11) { border-color: rgba(237,189,95,.4); }
.number-cell strong { font-size: 16px; }
.number-cell span { color: var(--muted); font-size: 8px; letter-spacing: .05em; }
.number-cell em { min-height: 11px; color: var(--brass-soft); font-size: 9px; font-style: normal; }
.number-cell.is-active { box-shadow: inset 0 0 0 1px var(--brass); background: rgba(28, 111, 80, .95); }
.side-bet-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 7px; margin-top: 9px; }
.field-button { min-height: 70px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 8px 10px; border-radius: 9px; text-align: left; }
.field-button strong { font-size: 15px; }
.hardway-panel { padding: 7px; border: 1px solid rgba(210,224,178,.2); border-radius: 9px; background: rgba(2,39,34,.4); }
.hardway-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; }
.hardway-grid .mini-felt-button { min-height: 47px; flex-direction: column; gap: 1px; padding: 4px; font-size: 8px; }
.hardway-grid .mini-felt-button b { font-size: 15px; }
.hardway-grid .mini-felt-button em { font-size: 8px; }
.props-tray { margin-top: 9px; padding: 7px; border: 1px solid rgba(210,224,178,.18); border-radius: 9px; background: rgba(2,39,34,.4); }
.props-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; }
.prop-button { min-height: 53px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 3px; border-radius: 6px; }
.prop-button strong { font-size: 12px; letter-spacing: .04em; }
.prop-button span { color: var(--brass); font-size: 8px; }
.prop-button em { min-height: 10px; color: var(--brass-soft); font-size: 8px; font-style: normal; }
.wide-prop { grid-column: span 2; flex-direction: row; gap: 7px; }
.receipt-panel, .history-panel { margin: 9px 2px 0; padding: 9px 3px 2px; border-top: 1px solid var(--line); }
.receipt-heading { justify-content: space-between; gap: 8px; color: var(--dim); }
.receipt-heading h3 { color: var(--muted); }
.receipt-panel > p { margin-top: 5px; color: var(--ink); font-size: 12px; line-height: 1.35; }
#receipt-delta { color: var(--muted); }
#receipt-delta.is-win { color: var(--teal); }
#receipt-delta.is-loss { color: var(--red); }
.receipt-list { display: grid; gap: 3px; margin-top: 6px; }
.active-bets { display: grid; gap: 4px; margin-top: 8px; padding-bottom: 6px; }
.active-empty { color: var(--dim); font-size: 10px; }
.active-bet-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 6px; border: 1px solid rgba(210,224,178,.12); border-radius: 6px; background: rgba(2, 34, 30, .45); }
.active-bet-row > span:first-child { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.active-bet-row b { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.active-bet-row small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.active-bet-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.active-bet-actions button { min-width: 44px; min-height: 44px; padding: 0 5px; border: 1px solid rgba(188,220,180,.2); border-radius: 5px; background: transparent; color: var(--brass-soft); font-size: 8px; font-weight: 800; cursor: pointer; }
.active-bet-actions button:hover { border-color: var(--brass); }
.active-bet-actions .locked { color: var(--dim); font-size: 8px; letter-spacing: .08em; }
.receipt-item { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.receipt-item b { color: var(--ink); font-weight: 600; }
.receipt-item .win { color: var(--teal); }
.receipt-item .loss { color: var(--red); }
.history-panel ol { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px 11px; margin: 6px 0 0; padding: 0; list-style: none; }
.history-panel li { display: flex; justify-content: space-between; gap: 5px; color: var(--muted); font-size: 10px; }
.history-panel li strong { color: var(--brass-soft); }
.control-dock { position: relative; z-index: 8; padding: 0 14px max(10px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(3, 17, 15, .35), rgba(3, 17, 15, .98) 22%); }
.chip-rail { min-height: 54px; display: flex; align-items: center; gap: 7px; padding: 7px 4px; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: none; }
.chip-rail::-webkit-scrollbar { display: none; }
.rail-label { color: var(--muted); margin-right: 1px; }
.chip { flex: 0 0 auto; width: 44px; height: 44px; border: 3px dashed rgba(255,255,255,.75); border-radius: 50%; color: #132c27; font-size: 10px; font-weight: 900; cursor: pointer; box-shadow: 0 3px 7px rgba(0,0,0,.35), inset 0 0 0 2px rgba(0,0,0,.18); }
.chip-5 { background: #e4e0c4; }
.chip-25 { background: #55c6a7; }
.chip-100 { background: #dc775f; color: #411b1b; }
.chip-500 { background: #8d75cb; color: #211a40; }
.chip.is-selected { transform: translateY(-3px); box-shadow: 0 6px 13px rgba(0,0,0,.4), 0 0 0 2px var(--brass); }
.dock-action { min-height: 44px; padding: 0 9px; font-size: 8px; white-space: nowrap; }
.wrist-bumper { min-height: 106px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(168px, 45%); align-items: center; gap: 9px; padding: 9px 5px 4px; border: 1px solid rgba(128, 223, 188, .22); border-bottom: 0; border-radius: 44px 44px 13px 13px; background: radial-gradient(ellipse at 20% 0%, rgba(36,130,109,.4), transparent 52%), linear-gradient(180deg, #0b4c42, #06312e 86%); box-shadow: inset 0 2px 0 rgba(255,255,255,.1), 0 -8px 25px rgba(0,0,0,.28); }
.bumper-pad { height: 43px; position: relative; margin-left: 5px; border-bottom: 8px solid rgba(0, 18, 17, .7); border-radius: 0 0 70% 30%; transform: rotate(-4deg); }
.bumper-pad i { position: absolute; bottom: -4px; width: 12px; height: 12px; border-radius: 50%; background: #d8a44d; box-shadow: 0 0 8px rgba(237,189,95,.5); }
.bumper-pad i:nth-child(1) { left: 23%; }
.bumper-pad i:nth-child(2) { left: 44%; }
.bumper-pad i:nth-child(3) { left: 65%; }
.smash-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.smash-button { width: min(100%, 192px); min-height: 78px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; overflow: hidden; border: 2px solid #f1c761; border-radius: 24px 24px 30px 30px; background: radial-gradient(circle at 50% 18%, #f17a62, #a93234 70%); color: #fff3dc; box-shadow: inset 0 2px 0 rgba(255,255,255,.3), inset 0 -8px 0 rgba(69, 15, 27, .35), 0 7px 0 #471d2a, 0 10px 20px rgba(0,0,0,.35); cursor: pointer; transition: transform .14s ease, filter .14s ease; }
.smash-button:hover:not(:disabled) { filter: brightness(1.12); }
.smash-button:active:not(:disabled) { transform: translateY(5px); box-shadow: inset 0 2px 0 rgba(255,255,255,.3), inset 0 -4px 0 rgba(69, 15, 27, .35), 0 2px 0 #471d2a; }
.smash-button strong { position: relative; z-index: 1; font-size: 25px; letter-spacing: .08em; line-height: 1; }
.smash-button small { position: relative; z-index: 1; font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.smash-ring { position: absolute; inset: 9px; border: 1px solid rgba(255,239,183,.5); border-radius: 17px 17px 24px 24px; }
.smash-help { max-width: 100%; min-height: 12px; position: relative; top: -3px; overflow: hidden; color: var(--muted); font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.inline-alert { position: fixed; left: 50%; bottom: calc(155px + env(safe-area-inset-bottom)); z-index: 20; width: min(calc(100% - 28px), 500px); padding: 10px 13px; transform: translateX(-50%); border: 1px solid rgba(233,109,92,.6); border-radius: 9px; background: rgba(70, 21, 25, .96); color: #ffe7dc; font-size: 12px; box-shadow: var(--shadow); }
.inline-alert[data-kind="info"] { border-color: rgba(56,211,187,.55); background: rgba(6, 56, 49, .96); color: #dffbf0; }
.rules-drawer { width: min(100% - 22px, 850px); max-height: min(88dvh, 700px); margin: auto auto 0; padding: 15px 17px max(18px, env(safe-area-inset-bottom)); overflow-y: auto; border: 1px solid rgba(237,189,95,.45); border-bottom: 0; border-radius: 22px 22px 0 0; background: linear-gradient(150deg, #092b27, #041614); color: var(--ink); box-shadow: 0 -20px 60px rgba(0,0,0,.6); }
.rules-drawer::backdrop { background: rgba(0, 8, 7, .73); backdrop-filter: blur(4px); }
.drawer-grip { width: 44px; height: 4px; margin: -3px auto 14px; border-radius: 100px; background: rgba(215,226,192,.4); }
.drawer-heading { justify-content: space-between; gap: 10px; }
.drawer-heading h2 { margin-top: 4px; }
.drawer-intro { max-width: 650px; margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.paytable-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 11px; margin-top: 15px; }
.paytable-grid > div { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(10, 74, 62, .46); }
.paytable-grid h3 { color: var(--brass); }
.paytable-grid p { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.paytable-grid b { color: var(--ink); }
.excluded-bets { margin-top: 12px; color: var(--dim); font-size: 10px; }
.excluded-bets b { color: var(--red); }

@media (min-width: 720px) {
  .app-shell { border-right: 1px solid rgba(255,255,255,.04); border-left: 1px solid rgba(255,255,255,.04); }
  .dice-dome { flex-basis: clamp(180px, 25dvh, 250px); }
  .felt-panel { padding: 13px; }
  .contract-button { min-height: 82px; }
  .table-zone { padding-left: 22px; padding-right: 22px; }
  .control-dock { padding-left: 22px; padding-right: 22px; }
  .wrist-bumper { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 480px) {
  .session-chip { display: none; }
  .topbar { gap: 8px; padding-right: 14px; padding-left: 14px; }
  .brand-lockup { min-width: 0; }
  h1 { font-size: 18px; }
  .meter { padding-right: 7px; padding-left: 7px; }
  .meter strong { font-size: 13px; }
  .hardway-grid { grid-template-columns: repeat(2, minmax(44px, 1fr)); }
}

@media (min-width: 1020px) {
  body { padding: 14px 0; }
  .app-shell { height: calc(100dvh - 28px); min-height: 720px; border: 1px solid rgba(137, 223, 188, .2); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
  .control-dock { padding-bottom: 14px; }
}

@media (max-height: 760px) and (max-width: 600px) {
  .topbar { padding-top: max(7px, env(safe-area-inset-top)); padding-bottom: 5px; }
  .meter-strip { margin-bottom: 3px; }
  .meter { min-height: 38px; }
  .dice-dome { flex-basis: 145px; padding-bottom: 2px; }
  .dome-message { display: none; }
  .result-line { height: 17px; padding-top: 2px; }
  .table-zone { padding-top: 3px; }
  .table-heading-row { padding-bottom: 4px; }
  .wrist-bumper { min-height: 98px; }
  .smash-button { min-height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Casino-terminal interaction pass: direct felt targets, physical chip stacks,
   and a presentation-only bubble tumble that always lands on server dice. */
.app-shell { grid-template-rows: max(58px, calc(env(safe-area-inset-top) + 48px)) minmax(0, 1fr) auto; }
.topbar { grid-row: 1; position: relative; z-index: 12; padding: max(6px, env(safe-area-inset-top)) 14px 6px; background: linear-gradient(180deg, rgba(2,24,22,.98), rgba(2,24,22,.82)); }
.meter-strip { position: absolute; top: max(6px, env(safe-area-inset-top)); right: 206px; left: 180px; z-index: 13; height: 44px; margin: 0; background: rgba(215,226,192,.13); backdrop-filter: blur(7px); }
.meter { min-height: 42px; padding: 5px 9px; }
.main-stage { grid-row: 2; }
.control-dock { grid-row: 3; }
.dice-dome { flex-basis: clamp(180px, 24dvh, 210px); padding-top: 0; }
.dome-lights { top: 7px; }
.dome-copy { top: 17px; }
.dome-surface {
  border-radius: 42% 42% 48% 48% / 18% 18% 30% 30%;
  background:
    linear-gradient(112deg, rgba(255,255,255,.09), transparent 22%, transparent 69%, rgba(171,255,235,.08)),
    radial-gradient(ellipse at 50% 112%, rgba(44, 219, 167, .34), transparent 48%),
    radial-gradient(ellipse at 50% -10%, rgba(31, 150, 148, .44), transparent 62%),
    linear-gradient(170deg, rgba(11, 67, 64, .96), rgba(2, 22, 25, .99));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.13), inset 0 -38px 65px rgba(0,0,0,.55), 0 18px 40px rgba(0,0,0,.36);
}
.dome-surface::before {
  content: "";
  position: absolute;
  left: 10%; right: 10%; bottom: 17px;
  height: 27px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(63,228,181,.23), rgba(0,0,0,.38) 68%, transparent 70%);
  filter: blur(1px);
}
.dice-pair { gap: clamp(44px, 16vw, 94px); transform: translateY(10px); }
.die { width: clamp(62px, 16vw, 82px); border-radius: 13px; }
.app-shell.is-rolling .die:first-child { animation: bubble-tumble-a .82s linear infinite; }
.app-shell.is-rolling .die:last-child { animation: bubble-tumble-b .76s linear infinite; }
.app-shell.is-rolling .total-orb { animation: orb-pulse .5s ease-in-out infinite; }
.result-line { display: flex; align-items: center; justify-content: center; gap: 7px; }
.result-line > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.win-counter { flex: 0 0 auto; color: #baffd9; font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: .04em; text-shadow: 0 0 10px rgba(56,211,187,.62); }
.win-counter.is-counting { animation: win-counter-pop .82s cubic-bezier(.15,.8,.2,1) both; }
@keyframes win-counter-pop {
  0% { opacity: 0; transform: translateY(6px) scale(.72); filter: brightness(1.8); }
  45% { opacity: 1; transform: translateY(-2px) scale(1.16); filter: brightness(1.35); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1); }
}
@keyframes bubble-tumble-a {
  0% { transform: translate3d(-2px, 8px, 0) rotate(-8deg) scale(1); }
  18% { transform: translate3d(64px, -43px, 0) rotate(128deg) scale(.94); }
  38% { transform: translate3d(18px, -69px, 0) rotate(278deg) scale(1.08); }
  57% { transform: translate3d(-72px, -32px, 0) rotate(448deg) scale(.96); }
  76% { transform: translate3d(-38px, 12px, 0) rotate(610deg) scale(1.05); }
  100% { transform: translate3d(-2px, 8px, 0) rotate(712deg) scale(1); }
}
@keyframes bubble-tumble-b {
  0% { transform: translate3d(2px, 8px, 0) rotate(8deg) scale(1); }
  20% { transform: translate3d(-60px, -48px, 0) rotate(-142deg) scale(1.07); }
  42% { transform: translate3d(-10px, -72px, 0) rotate(-306deg) scale(.95); }
  61% { transform: translate3d(76px, -29px, 0) rotate(-476deg) scale(1.04); }
  80% { transform: translate3d(34px, 13px, 0) rotate(-635deg) scale(.97); }
  100% { transform: translate3d(2px, 8px, 0) rotate(-728deg) scale(1); }
}

.felt-panel { padding: 8px; border-radius: 8px; background: linear-gradient(145deg, rgba(14, 113, 72, .98), rgba(5, 70, 51, .99)); }
.felt-panel::before { inset: 4px; border-radius: 5px; }
.felt-instruction { min-height: 28px; display: flex; align-items: center; justify-content: center; gap: 7px; color: rgba(244,240,210,.75); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.felt-instruction span { color: var(--brass-soft); }
.felt-instruction b { color: rgba(255,255,255,.42); }
.felt-instruction small { margin-left: auto; color: rgba(214,232,194,.52); font-size: 7px; }
.terminal-hardways { margin: 6px 0 0; padding: 6px; border-radius: 4px; background: rgba(2, 45, 31, .5); }
.terminal-hardways .hardway-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.terminal-hardways .mini-felt-button { min-height: 52px; border-radius: 3px; flex-direction: row; }

.number-rail { margin-top: 6px; padding: 6px; border-radius: 4px; background: rgba(2, 50, 32, .55); }
.number-rail-head { padding-bottom: 5px; }
.number-grid { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; }
.number-column { min-width: 0; position: relative; display: grid; grid-template-rows: 46px 54px 46px; border: 1px solid rgba(237,229,177,.38); background: rgba(5,75,46,.58); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.number-column.is-point { border-color: var(--brass-soft); box-shadow: 0 0 0 2px rgba(237,189,95,.25), inset 0 0 18px rgba(237,189,95,.13); }
.number-bet { min-width: 0; min-height: 44px; position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr; place-items: center; padding: 2px; border: 0; background: rgba(10,108,67,.45); cursor: pointer; }
.number-bet:hover { background: rgba(23,139,87,.58); }
.number-bet:active { background: rgba(237,189,95,.2); transform: scale(.97); }
.number-bet span:first-child { color: rgba(244,240,210,.92); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.number-bet small { color: rgba(226,230,192,.58); font-size: 7px; }
.buy-zone { border-bottom: 1px solid rgba(237,229,177,.24); }
.place-zone { border-top: 1px solid rgba(237,229,177,.24); }
.number-bet.is-active { background: rgba(15,133,79,.8); box-shadow: inset 0 0 0 1px rgba(244,217,148,.55); }
.number-face { min-width: 0; position: relative; display: grid; place-items: center; background: linear-gradient(160deg, rgba(5,91,53,.78), rgba(4,58,39,.85)); }
.number-face strong { color: #f5f0d7; font-size: clamp(19px, 6vw, 27px); font-weight: 650; text-shadow: 0 2px 2px rgba(0,0,0,.35); }
.number-point { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #f0e8cc; color: #b3312e; font-size: 7px; font-weight: 1000; box-shadow: 0 2px 5px rgba(0,0,0,.4); }
.come-stack { position: absolute; left: 2px; bottom: 2px; transform: scale(.72); transform-origin: left bottom; }

.casino-lines { display: grid; gap: 5px; margin-top: 6px; }
.casino-lines .felt-button { min-height: 60px; border-radius: 3px; }
.casino-lines .field-button { min-height: 63px; align-items: center; text-align: center; }
.casino-lines .field-button strong { font-size: clamp(12px, 3.5vw, 17px); }
.casino-lines .field-button strong i { color: var(--brass-soft); font-style: normal; }
.casino-lines .contract-button { padding: 8px 12px; }
.come-line { align-items: center; text-align: center; }
.pass-line { border-color: rgba(86,170,255,.42); }
.pass-line strong { color: #72bdff; }
.odds-row { margin-top: 5px; }
.props-tray { border-radius: 4px; }
.prop-button { border-radius: 3px; }

.wager-stack { width: 34px; height: 34px; position: relative; z-index: 3; display: inline-grid; place-items: center; flex: 0 0 auto; border: 4px dashed rgba(255,255,255,.82); border-radius: 50%; color: #fff; font-size: 8px; font-weight: 1000; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.75); box-shadow: 0 3px 0 rgba(0,0,0,.42), 0 5px 8px rgba(0,0,0,.35), inset 0 0 0 2px rgba(0,0,0,.22); }
.wager-stack::before, .wager-stack::after, .wager-stack i { content: ""; position: absolute; inset: -4px; z-index: -1; border: inherit; border-radius: inherit; background: inherit; }
.wager-stack::before { transform: translateY(4px); filter: brightness(.78); }
.wager-stack::after { transform: translateY(2px); filter: brightness(.9); }
.wager-stack i { display: none; }
.number-bet .wager-stack { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.84); }
.number-bet.is-active > span:first-child, .number-bet.is-active > small { opacity: .13; }
.bet-amount .wager-stack, .mini-felt-button .wager-stack, .prop-button .wager-stack { transform: scale(.88); }
.tone-white { background: #e9e7dc; color: #17312b; text-shadow: none; }
.tone-red { background: #c94d43; }
.tone-blue { background: #3e6cc9; }
.tone-green { background: #2e9c61; }
.tone-black { background: #30353a; }

.chip-1 { background: #e9e7dc; }
.chip-5 { background: #c94d43; color: #fff; }
.chip-10 { background: #3e6cc9; color: #fff; }
.chip-25 { background: #2e9c61; color: #fff; }
.chip-100 { background: #30353a; color: #fff; }
.chip { position: relative; border-style: dashed; }
.chip::before { content: "$"; margin-right: 1px; font-size: 7px; opacity: .68; }
.chip.is-selected { animation: selected-chip-pulse 1.8s ease-in-out infinite; }
@keyframes selected-chip-pulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.2); } }

.flying-chip { width: 36px; height: 36px; position: fixed; top: 0; left: 0; z-index: 100; display: grid; place-items: center; pointer-events: none; border: 4px dashed rgba(255,255,255,.88); border-radius: 50%; color: #fff; font-size: 8px; font-weight: 1000; box-shadow: 0 7px 15px rgba(0,0,0,.48), inset 0 0 0 2px rgba(0,0,0,.2); animation: chip-flight .38s cubic-bezier(.2,.75,.2,1) both; }
.flying-chip.tone-white { color: #17312b; }
@keyframes chip-flight {
  0% { transform: translate3d(var(--chip-from-x), var(--chip-from-y), 0) rotate(0) scale(1); }
  55% { transform: translate3d(var(--chip-mid-x), var(--chip-mid-y), 0) rotate(210deg) scale(1.15); }
  100% { transform: translate3d(var(--chip-to-x), var(--chip-to-y), 0) rotate(360deg) scale(.88); }
}

.wrist-bumper { min-height: 102px; grid-template-columns: minmax(0,1fr) minmax(168px,45%); border-radius: 48% 48% 12px 12px / 38px 38px 12px 12px; background: radial-gradient(ellipse at 18% 0%, rgba(50,154,128,.5), transparent 50%), linear-gradient(180deg,#0e5a4d,#06312e 86%); }
.bumper-pad::before { content: none; }
.bumper-pad { height: 51px; border-bottom-width: 10px; opacity: .9; }
.bumper-pad i { width: 9px; height: 9px; background: var(--brass-soft); }
.smash-button { border-radius: 50%; width: 94px; min-height: 94px; }
.smash-ring { border-radius: 50%; }
.smash-button strong { font-size: 22px; }

@media (max-width: 480px) {
  .brand-lockup { display: none; }
  .topbar { justify-content: flex-end; }
  .meter-strip { right: 80px; left: 10px; }
  .meter { padding-right: 4px; padding-left: 4px; }
  .meter-label { font-size: 7px; }
  .meter strong { font-size: 11px; }
  .table-zone { padding-right: 9px; padding-left: 9px; }
  .felt-panel { padding: 6px; }
  .number-grid { gap: 3px; }
  .number-column { grid-template-rows: 44px 42px 44px; }
  .number-bet span:first-child { font-size: 7px; }
  .number-bet small { font-size: 6px; }
  .terminal-hardways .mini-felt-button { min-height: 48px; }
  .chip-rail { gap: 5px; }
  .chip { width: 44px; height: 44px; }
  .dock-action { padding-right: 7px; padding-left: 7px; }
}

@media (max-width: 360px) {
  .topbar { padding-right: 10px; padding-left: 10px; }
  .meter-strip { right: 80px; left: 8px; }
  .meter strong { font-size: 10px; }
  .table-heading-row, .felt-instruction { display: none; }
  .number-rail { margin-top: 0; }
}

@media (max-height: 760px) and (max-width: 600px) {
  .dice-dome { flex-basis: 150px; }
  .table-heading-row, .felt-instruction { display: none; }
  .number-rail { margin-top: 0; }
  .number-column { grid-template-rows: 44px 38px 44px; }
  .result-line { height: 20px; padding-top: 3px; }
  .wrist-bumper { min-height: 96px; }
  .smash-button { width: 82px; min-height: 82px; }
}
