@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap");

body.dice-route {
  --dice-navy: #042732;
  --dice-text: #1d4757;
  --dice-secondary: #3b6373;
  --dice-hint: #538ca2;
  --dice-divider: #e4eef1;
  --dice-border: #d0e1e7;
  --dice-turquoise: #27e2cc;
  --dice-link: #147166;
  --dice-pale: #e5fcf9;
  --dice-page: #f2f6f7;
  --dice-white: #fff;
  --dice-lime: #c4f600;
  --dice-red: #ff3b30;
  --dice-shadow: 0 2px 8px #04273214;
  --dice-safe: env(safe-area-inset-bottom, 0px);
  --dice-safe-top: env(safe-area-inset-top, 0px);
  --dice-width: 680px;
  --dice-gutter: 16px;
  margin: 0;
  padding: 0;
  height: 100dvh;
  overflow: hidden;
  background: var(--dice-page);
}

.dice-route .masthead, .dice-route .site-footer, .dice-route .bottom-nav { display: none; }
.dice-route .container { width: min(100%, var(--dice-width)); height: 100%; margin: 0 auto; padding: 0; color: var(--dice-navy); }
.dice-route .container:focus { outline: none; }
.dice-route .toast { bottom: calc(98px + var(--dice-safe)); background: var(--dice-navy); }
.dice-app { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden auto; isolation: isolate; background: var(--dice-white); font-family: Outfit, var(--font-ui); font-variant-numeric: tabular-nums; }
.dice-app :focus-visible { outline-color: var(--dice-link); outline-offset: 2px; }
.dice-app button, .dice-app a { touch-action: manipulation; }

.dice-header { flex: 0 0 auto; min-width: 0; background: var(--dice-pale); padding-top: var(--dice-safe-top); }
.dice-topbar { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 6px var(--dice-gutter); }
.dice-topbar h1 { flex: 1; min-width: 0; font-size: clamp(18px, 4.65vw, 22px); line-height: 1.3; font-weight: 800; }
.dice-back { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; color: var(--dice-navy); background: var(--dice-turquoise); }
.dice-back .icon { width: 20px; height: 20px; rotate: 180deg; }

.dice-caret { flex: 0 0 auto; width: 0; height: 0; border: 4px solid transparent; border-bottom: 0; border-top: 6px solid var(--dice-link); }
.dice-issue { white-space: nowrap; color: var(--dice-secondary); font-size: 13px; line-height: 1.35; max-width: 100%; }
.dice-issue strong { color: var(--dice-navy); font-weight: 800; }
.dice-balance { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 47%; min-height: 36px; padding: 4px 9px; border: 1px solid #d5edeb; border-radius: 10px; background: var(--dice-white); font-size: 13px; font-weight: 750; white-space: nowrap; }
.dice-balance > span { overflow: hidden; text-overflow: ellipsis; }
.dice-balance .icon { flex: 0 0 16px; color: var(--dice-link); width: 16px; height: 16px; }
.dice-draw-stats { font-size: 12px; font-weight: 650; color: var(--dice-text); line-height: 1.4; }
.dice-draw-toggle { display: flex; align-items: center; gap: 6px; max-width: 100%; padding: 0; border-radius: 8px; }
.dice-draw-toggle[aria-expanded="true"] .dice-caret { rotate: 180deg; }
.dice-faces { display: flex; align-items: center; gap: 5px; }
.dice-face { display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); width: 33px; height: 33px; padding: 5px; place-items: center; background: var(--dice-page); color: var(--dice-navy); border: 1px solid var(--dice-divider); border-radius: 8px; }
.dice-pip { display: block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.dice-pip-1 { grid-area: 1/1; } .dice-pip-3 { grid-area: 1/3; } .dice-pip-4 { grid-area: 2/1; }
.dice-pip-5 { grid-area: 2/2; } .dice-pip-6 { grid-area: 2/3; } .dice-pip-7 { grid-area: 3/1; } .dice-pip-9 { grid-area: 3/3; }
.dice-countdown { display: flex; align-items: center; min-height: 33px; }
.dice-closed-chip { min-height: 30px; display: inline-grid; place-items: center; padding: 3px 13px; border-radius: 20px; color: var(--dice-secondary); background: #e4eaed; font-size: 13px; font-weight: 700; }
.dice-history { max-height: min(29dvh, 266px); margin: 0 var(--dice-gutter) 10px; padding: 9px 10px; overflow: auto; scrollbar-width: thin; border: 1px solid #d5edeb; border-radius: 12px; background: var(--dice-white); }
.dice-history h2 { font-size: 14px; }
.dice-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.dice-history-list { margin: 3px 0 0; padding: 0; list-style: none; }
.dice-history-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  grid-template-areas: "issue sum size parity" "numbers numbers numbers numbers";
  align-items: center; gap: 4px 7px; padding-block: 7px; border-bottom: 1px solid var(--dice-divider);
  text-align: center; font-size: .8125rem;
}
.dice-history-issue { grid-area: issue; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dice-history-list li > strong { grid-area: sum; }
.dice-history-list .dice-history-tag { grid-area: size; padding-inline: 6px; }
.dice-history-list .dice-history-tag:last-child { grid-area: parity; }
.dice-history-list :is(.dice-faces, .number-results, .race-cars) { grid-area: numbers; justify-self: start; }
.dice-history-list li:last-child { border-bottom: 0; }
.dice-history-issue { text-align: left; color: var(--dice-secondary); }
.dice-history .dice-faces { gap: 4px; }
.dice-history .dice-face { width: 24px; height: 24px; padding: 4px; border: 1px solid var(--dice-divider); border-radius: 6px; box-shadow: none; }
.dice-history .dice-pip { width: 3px; height: 3px; }
.dice-history-tag { background: var(--dice-pale); border-radius: 5px; color: var(--dice-link); font-size: 11px; padding-block: 2px; }


.dice-body { display: flex; flex: 1 1 auto; min-height: min(175px,40dvh); }
.dice-sidebar { flex: 0 0 clamp(76px, 20vw, 100px); overflow: auto; scrollbar-width: none; padding: 7px 4px; border-right: 1px solid var(--dice-divider); background: #f8fbfa; }
.dice-sidebar > * { position: relative; display: grid; place-content: center; justify-items: center; width: 100%; min-height: 53px; gap: 2px; padding: 4px 0; border-radius: 8px; color: var(--dice-secondary); font-size: 13px; font-weight: 650; white-space: nowrap; }
.dice-sidebar > * + * { margin-top: 3px; }
.dice-sidebar > *:focus-visible { outline-offset: -2px; }
.dice-sidebar .icon { width: 20px; height: 20px; color: var(--dice-link); }
.dice-sidebar button[aria-pressed="true"] { color: var(--dice-navy); background: var(--dice-pale); font-weight: 700; }
.dice-sidebar button[aria-pressed="true"]::before { content: ""; position: absolute; inset: 8px auto 8px 0; width: 3px; border-radius: 3px; background: var(--dice-turquoise); }
.dice-badge { display: inline-grid; place-items: center; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--dice-red); color: var(--dice-white); font-size: 10px; font-weight: 700; line-height: 1; white-space: nowrap; }
.dice-side-badge { position: absolute; top: 2px; right: 3px; height: 13px; font-size: 9px; }
.dice-odds { flex: 1; min-width: 0; overflow: auto; scrollbar-width: thin; padding: 12px var(--dice-gutter) 18px; }
.dice-odds-section + .dice-odds-section { margin-top: 16px; }
.dice-section-title { display: flex; align-items: start; gap: 5px; margin-bottom: 9px; }
.dice-section-title h2 { display: grid; gap: 4px; font-size: 16px; line-height: 21px; font-weight: 700; }
.dice-section-title h2::after { content: ""; width: 24px; height: 3px; border-radius: 2px; background: var(--dice-turquoise); }
.dice-section-title button { display: grid; place-items: center; width: 22px; height: 20px; padding: 0; color: var(--dice-hint); }
.dice-section-title .icon { width: 16px; height: 16px; }
.dice-odds-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dice-odds-card { display: grid; align-content: center; justify-items: center; position: relative; min-height: 62px; gap: 4px; border: 1px solid var(--dice-divider); border-radius: 10px; padding: 5px; background: var(--dice-page); color: var(--dice-navy); }
.dice-odds-card > strong { font-size: 17px; font-weight: 700; line-height: 1.1; }
.dice-odds-value { color: var(--dice-secondary); font-size: 13px; font-weight: 500; line-height: 1.1; }
.dice-odds-card[aria-pressed="true"] { border-color: var(--dice-turquoise); background: var(--dice-turquoise); }
.dice-odds-card[aria-pressed="true"] .dice-odds-value { color: var(--dice-navy); }
.dice-odds-card:active:not(:disabled) { transform: scale(.98); }
.dice-odds-card:disabled { opacity: .5; }
.dice-odds-badge { position: absolute; top: 2px; right: 3px; height: 14px; }


.dice-orders { width: 100%; overflow: auto; padding: 12px var(--dice-gutter) calc(18px + var(--dice-safe)); background: var(--dice-page); }
.dice-orders-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 11px 0; margin-bottom: 12px; border: 1px solid #d5edeb; border-radius: 12px; background: var(--dice-pale); color: var(--dice-text); font-size: 13px; }
.dice-orders-summary > span { display: grid; gap: 3px; min-width: 0; padding: 0 12px; }
.dice-orders-summary > span + span { border-inline-start: 1px solid #c9e8e4; }
.dice-orders-summary strong { color: var(--dice-navy); font-size: clamp(16px, 4vw, 20px); overflow-wrap: anywhere; }
.dice-orders-list { display: grid; gap: 8px; }
.dice-order { padding: 11px 12px; border: 1px solid var(--dice-divider); background: var(--dice-white); border-radius: 12px; }
a.dice-order:hover { border-color: var(--dice-turquoise); }
.dice-order > div { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.dice-order > div + div { align-items: start; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--dice-divider); }
.dice-order > div > strong { font-size: 14px; white-space: nowrap; }
.dice-order-tags { display: flex; min-width: 0; flex-wrap: wrap; gap: 4px; }
.dice-order-tags > span { max-width: 100%; padding: 3px 7px; border-radius: 6px; background: var(--dice-page); color: var(--dice-text); font-size: 12px; overflow-wrap: anywhere; }
.dice-order-state { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dice-order-state .icon { width: 13px; height: 13px; }
.dice-order-state.won { background: var(--dice-lime); }
.dice-order-state.lost { background: #e4eaed; color: var(--dice-secondary); }
.dice-order-state.pending { border: 1px solid var(--dice-turquoise); color: var(--dice-link); }
.dice-orders-empty { text-align: center; color: var(--dice-secondary); margin-top: 35px; font-size: 14px; }
.dice-all-orders { margin-top: 12px; }

.dice-road-header { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--dice-safe-top)) var(--dice-gutter) 12px; border-bottom: 1px solid var(--dice-divider); background: var(--dice-pale); }
.dice-road-header h1 { font-size: 21px; }
.dice-road-header p { color: var(--dice-secondary); font-size: 13px; margin-top: 3px; }
.dice-road-content { padding: 12px var(--dice-gutter); }
.dice-road-legend { display: flex; gap: 16px; margin-bottom: 12px; font-size: 14px; }
.dice-road-legend span { display: flex; align-items: center; gap: 6px; }
.dice-road-legend i { width: 14px; height: 14px; border-radius: 50%; }
.dice-road-scroll { overflow: auto; padding: 8px; border: 1px solid var(--dice-divider); border-radius: 10px; background: var(--dice-page); }
.dice-road-grid { display: grid; grid-auto-flow: column; grid-template: repeat(6, 14px) / repeat(20, 14px); gap: 3px; width: max-content; }
.dice-road-dot { display: grid; place-items: center; border-radius: 50%; font-size: 9px; font-weight: 700; }
.dice-road-content .big { background: var(--dice-turquoise); color: var(--dice-navy); }
.dice-road-content .small { background: var(--dice-navy); color: var(--dice-white); }

.race-cars { display: grid; grid-template-columns: repeat(5, 22px); gap: 3px; }
.race-car { display: grid; place-items: center; min-width: 0; height: 21px; border: 1px solid var(--dice-border); border-radius: 5px; color: var(--dice-navy); background: var(--dice-page); font-size: 12px; font-weight: 700; }
.race-car:nth-child(-n+2) { border-color: var(--dice-turquoise); background: var(--dice-turquoise); box-shadow: none; }
.race-app .dice-history .race-cars { width: min(100%, 274px); grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.race-app .dice-history .race-car { height: 19px; border-radius: 4px; box-shadow: none; font-size: 10px; }
.bet-choices { display: grid; grid-template-columns: repeat(var(--choice-cols), minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; }
.bet-choices button { min-height: 31px; padding: 3px 0; border: 1px solid var(--dice-border); border-radius: 8px; color: var(--dice-secondary); background: var(--dice-white); font-size: 12px; font-weight: 600; white-space: nowrap; }
.bet-choices button[aria-pressed="true"] { border-color: var(--dice-turquoise); color: var(--dice-navy); background: var(--dice-turquoise); }

.number-results { display: grid; grid-template-columns: repeat(5, 24px); gap: 3px; }
.number-results > span { display: grid; place-items: center; height: 33px; border: 1px solid var(--dice-divider); border-radius: 7px; background: var(--dice-page); color: var(--dice-navy); font-size: 17px; font-weight: 750; }
.dice-history .number-results { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dice-history .number-results > span { height: 21px; border-radius: 4px; box-shadow: none; font-size: 12px; }
.number-play-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 10px; padding: 10px 12px; margin-bottom: 16px; border-radius: 10px; background: var(--dice-pale); color: var(--dice-text); font-size: 13px; }
.number-play-status { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.number-play-meta [data-number-count] { font-weight: 700; white-space: nowrap; }
.number-pick-group { margin: 0 0 12px; padding: 0; min-width: 0; border: 0; }
.number-pick-group legend { margin-bottom: 5px; padding: 0; font-size: 14px; font-weight: 700; }
.number-pick-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.number-pick-grid button { min-width: 0; min-height: 44px; padding: 0; border: 1px solid var(--dice-border); border-radius: 10px; background: var(--dice-page); color: var(--dice-navy); font-size: 18px; font-weight: 700; }
.number-pick-grid button[aria-pressed="true"] { border-color: var(--dice-turquoise); background: var(--dice-turquoise); }
.number-pick-grid button:active:not(:disabled) { transform: scale(.98); }
.number-clear-group { padding: 0; color: var(--dice-link); font-size: 12px; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.eleven-app .number-results > span { font-size: 16px; }
.eleven-app .dice-history .number-results > span { font-size: 11px; }
.eleven-app .number-pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.eleven-app .number-pick-grid button { min-height: 44px; font-size: 18px; }
.top3-app .number-results { grid-template-columns: repeat(3, 24px); }
.top3-app .dice-history .number-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dice-source-timing { padding: 0 var(--dice-gutter) 10px; color: var(--dice-secondary); font-size: 11px; }
.dice-source-timing p { margin-top: 5px; }

@media (max-width: 365px) {
  body.dice-route { --dice-gutter: 11px; }
  .dice-draw-toggle { gap: 3px; }
  .dice-draw-toggle .dice-face { width: 30px; height: 30px; }
  .bet-choices button { font-size: 11px; }
  .race-app .dice-history { padding-inline: 10px; }
}
@media (min-width: 600px) {
  body.dice-route { --dice-gutter: 20px; }
  .dice-app { box-shadow: 0 0 0 1px var(--dice-divider); }
  .dice-odds-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  body.dice-route {
    --dice-gutter: 20px;
    --dice-divider: #dce5df;
    --dice-page: #f5f7f4;
    --dice-pale: #e9f1ec;
    --dice-turquoise: #bee9dc;
    --dice-lime: var(--lime);
    height: auto;
    overflow: visible;
    background: var(--bg);
  }
  .dice-route .masthead { display: block; }
  .dice-route .container {
    width: min(var(--wrap), calc(100% - 56px));
    height: max(590px, calc(100dvh - var(--desktop-header-height) - 36px));
    flex: 0 0 auto;
    margin: 18px auto;
  }
  .dice-route .toast { bottom: 20px; }
  .dice-app { border: 1px solid var(--dice-divider); border-radius: var(--panel-radius); }
  .dice-header { background: #fff; }
  .dice-topbar { min-height: 54px; }
  .dice-topbar .dice-balance { display: none; }
  .dice-sidebar { flex-basis: 148px; padding-inline: 9px; background: #f5f7f4; }
  .dice-sidebar > * { grid-auto-flow: column; align-items: center; gap: 7px; min-height: 45px; }
  .dice-odds { padding-top: 16px; }
  .dice-context.desktop-only { display: grid; align-content: start; gap: 10px; flex: 0 0 clamp(268px, 24%, 295px); min-width: 0; overflow: auto; padding: 10px; border-left: 1px solid var(--dice-divider); background: #f5f7f4; }
  .dice-context-card { min-width: 0; padding: 10px; border: 1px solid var(--dice-divider); border-radius: 6px; background: var(--dice-white); }
  .dice-context-card .dice-history-heading { min-height: 21px; margin-bottom: 5px; }
  .dice-context-card h2 { font-size: 14px; }
  .dice-context-card .text-link { font-size: 11px; }
  .dice-context-card .dice-history-list li { gap: 4px 5px; padding-block: 6px; font-size: .75rem; }
  .dice-context-card .number-results, .dice-context-card .race-cars { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
  .race-app .dice-context-card .race-cars { grid-template-columns: repeat(10, minmax(0, 1fr)); width: min(100%, 245px); }
  .dice-context-card .number-results > span { min-width: 22px; }
  .dice-context-card .number-results > span, .dice-context-card .race-car { height: 21px; font-size: .6875rem; }
  .top3-app .dice-context-card .number-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dice-context-card .dice-history-tag { font-size: 10px; }
  .dice-context-card .dice-face { width: 23px; height: 23px; padding: 3px; }
  .dice-context-card .dice-pip { width: 3px; height: 3px; }
  .dice-context-card .dice-order { padding: 8px; }
  .dice-context-empty { padding: 9px 3px 3px; color: var(--dice-secondary); font-size: 12px; }
  .dice-odds-card:hover:not(:disabled), .number-pick-grid button:hover:not(:disabled) { border-color: var(--dice-link); }
  .dice-odds-card, .number-pick-grid button { border-radius: 5px; }
  .number-pick-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .eleven-app .number-pick-grid { grid-template-columns: repeat(11, minmax(0, 1fr)); }
}

.dice-odds-card[aria-pressed="true"], .number-pick-grid button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--dice-link); }
.dice-order { overflow-wrap: anywhere; }
.dice-order-tags { min-width: 0; flex-wrap: wrap; }
.number-clear-group { min-height: 32px; }
@media (max-width: 1023px) {
  .dice-topbar { min-height: 54px; }
  .dice-topbar h1 { font-size: clamp(18px, 4.8vw, 22px); }
  .dice-sidebar { flex-basis: 82px; }
  .dice-sidebar > * { min-height: 58px; font-size: 13px; }
  .dice-odds { padding: 16px 12px 24px; }
  .dice-odds-section + .dice-odds-section { margin-top: 20px; }
  .dice-odds-card { min-height: 64px; }
  .dice-odds-value { font-size: 13px; }
}

.chase-control { display: inline-flex; align-items: center; gap: .4em; font-size: .875rem; }
.chase-control select { font: inherit; padding: .25em; }
.period-cap { color: var(--dice-muted, #52636a); margin-inline: .4em; }

body:has(.bet-game-select) .game-menu { display: none; }
.bet-game-select { position: relative; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 40px; border-radius: 7px; color: #103f3b; vertical-align: middle; }
.bet-game-select > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bet-game-select > .icon { flex: 0 0 15px; height: 15px; transform: rotate(90deg); color: #25746c; }
.bet-game-select select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.bet-game-select:focus-within { outline: 2px solid #15786c; outline-offset: 3px; }

.bet-round-strip { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr); padding: 12px 0; border: 1px solid #cde2dc; border-radius: 14px; background: linear-gradient(105deg, #fff 30%, #edf8f3); color: #103a37; font-variant-numeric: tabular-nums; }
.dice-header > .bet-round-strip { margin: 0 var(--dice-gutter) 9px; }
.bet-round-part { display: grid; align-content: start; justify-items: start; gap: 5px; min-width: 0; padding-inline: clamp(9px, 2.7vw, 20px); }
.bet-round-part + .bet-round-part { border-inline-start: 1px solid #ccded7; }
.bet-round-part h2 { margin: 0; color: #45645c; font-size: .79rem; font-weight: 650; line-height: 1.3; }
.bet-round-foot { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 9px; min-width: 0; }
.bet-round-foot .dice-issue { color: #536b66; font-size: .73rem; white-space: normal; overflow-wrap: anywhere; }
.bet-round-foot .dice-draw-stats { color: #26635a; font-size: .73rem; }
.bet-round-part .dice-draw-toggle,.bet-round-part .dice-countdown { min-height: 30px; }
.bet-round-part .dice-face { width: 29px; height: 29px; padding: 5px; border: 1px solid #cbdfd8; border-radius: 7px; background: #f1f7f4; }
.dice-clock { align-self: center; color: #12584d; font-family: var(--font-ui); font-size: clamp(1.35rem, 5.7vw, 1.9rem); font-weight: 750; line-height: 1.14; letter-spacing: .015em; font-variant-numeric: tabular-nums; }
.bet-round-part .number-results,.bet-round-part .race-cars { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; }
.bet-round-part .number-results > span,.bet-round-part .race-car { min-width: 0; padding-inline: 2px; }
.top3-app .bet-round-part .number-results { grid-template-columns: repeat(3,minmax(0,1fr)); }
.picker-round-strip { margin-bottom: 12px; }
.picker-round-strip .bet-round-part { gap: 7px; }
.picker-round-strip .bet-round-balls,.bet-round-balls .detail-ball-group { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; min-width: 0; max-width: 100%; }
.bet-round-balls .detail-ball-group:first-child { display: contents; }
.bet-round-balls .detail-ball-group-extra { flex-wrap: nowrap; }
.bet-round-balls .detail-glossy-ball { width: clamp(21px,4vw,32px); font-size: .88rem; }
.bet-round-info { min-width: 0; font-size: .79rem; }
.bet-round-info summary { cursor: pointer; color: #176659; }
.bet-round-info > div { display: flex; flex-wrap: wrap; gap: 6px 12px; padding-top: 8px; }
.picker-round-strip p:empty { display: none; }

.bet-tab-row { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 var(--dice-gutter) 8px; border-bottom: 1px solid var(--dice-divider); background: var(--dice-pale); }
.dice-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); flex: 1; max-width: 320px; gap: 3px; padding: 3px; border: 1px solid #cde2dc; border-radius: 10px; background: #f2f7f4; }
.dice-tabs button { min-height: 34px; padding: 3px 6px; border-radius: 7px; color: #47665e; font-size: .87rem; font-weight: 650; line-height: 1.2; }
.dice-tabs button[aria-pressed="true"] { color: white; background: #145c51; }
.bet-pick-tools { display: flex; align-items: center; gap: 2px; }
.bet-pick-tools button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 34px; min-height: 38px; padding: 3px 6px; border-radius: 7px; color: #27685d; font-size: .84rem; font-weight: 650; }
.bet-pick-tools .icon { width: 16px; height: 16px; }
.bet-pick-tools button:hover { background: #e0eee8; }
.bet-pick-tools button:disabled { opacity: .55; }
@media (max-width: 540px) {
  .bet-pick-tools [data-dice-random] span { display: none; }
  .bet-round-part .number-results > span { height: 26px; font-size: .86rem; }
}
@media (min-width: 1024px) {
  .bet-tab-row { background: white; }
  .dice-header .bet-round-strip { margin-bottom: 12px; }
  .bet-round-part { gap: 7px; }
  .bet-round-part .dice-draw-toggle, .bet-round-part .dice-countdown { min-height: 36px; }
  .race-app .bet-round-part .race-cars { grid-template-columns: repeat(10,minmax(0,1fr)); }
}

.bet-round-part .draw-period { color: #214a40; font-weight: 750; overflow-wrap: anywhere; }
.bet-round-part > .dice-draw-stats, .draw-running small { color: #26635a; font: 650 .73rem/1.4 var(--font-ui); }
.draw-running { display: inline-grid; justify-items: start; min-width: 0; max-width: 100%; gap: 5px; }
.draw-motion { --piece: clamp(21px, 5vw, 28px); display: grid; grid-template-columns: repeat(var(--draw-columns), minmax(0,var(--piece))); gap: 4px; max-width: 100%; }
.draw-motion.rolling-dice { --piece: 29px; gap: 5px; }
.draw-motion i { display: block; position: relative; width: 100%; height: var(--piece); box-sizing: border-box; }
.draw-die { border-radius: 7px; color: #164e44; background: linear-gradient(145deg,#fff,#e3f2e8); border: 1px solid #a9cfc1; box-shadow: inset 0 -2px 1px #bbd9c9; }
.draw-die::before { content: ""; position: absolute; inset: 50% auto auto 50%; margin: -2px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; box-shadow: -6px -6px, 6px 6px; }
.draw-ball { overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 32% 20%, #f4fff1, #c0e9d6 55%, #87c5af); color: #134c40; box-shadow: inset 0 0 0 1px #2c725331; }
.draw-ball::before { content: "·"; display: block; text-align: center; white-space: pre; font: 750 .78rem/var(--piece) var(--font-ui); font-variant-numeric: tabular-nums; }
.dice-draw-toggle:has(.draw-running) { align-items: flex-start; }
.dice-draw-toggle:has(.draw-running) > .dice-caret { margin-top: 12px; }
[data-bet-result]:has(> .draw-reveal-roll) > :not(.draw-reveal-roll,.dice-caret) { display: none; }
.draw-reveal-roll { order: -1; display: inline-flex; max-width: 100%; pointer-events: none; }
.draw-reveal-roll small { display: none; }
.bet-round-part:has(.draw-reveal-roll) .dice-draw-stats { visibility: hidden; }
@media (min-width: 1024px) {
  .draw-motion { grid-template-columns: repeat(var(--draw-count),var(--piece)); }
}
@media (prefers-reduced-motion: no-preference) {
  .draw-motion i { animation: bet-draw-shake 580ms ease-in-out var(--roll-delay) infinite; }
  .draw-die::before { animation: bet-die-faces 720ms step-end var(--roll-delay) infinite; }
  .draw-ball::before { content: attr(data-reel); animation: bet-number-roll 560ms steps(4,jump-none) var(--roll-delay) infinite; }
}
@keyframes bet-draw-shake {
  0%, 100% { transform: translate(0,0) rotate(-9deg); }
  30% { transform: translate(1px,-3px) rotate(16deg); }
  65% { transform: translate(-1px,1px) rotate(-16deg); }
}
@keyframes bet-die-faces {
  0%, 100% { box-shadow: -6px -6px, 6px 6px; }
  33% { box-shadow: 0 0; }
  66% { box-shadow: -6px -6px, -6px 6px, 6px -6px, 6px 6px; }
}
@keyframes bet-number-roll { to { transform: translateY(-75%); } }

/* Bet slip */
.slip-launch { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px var(--dice-gutter) calc(7px + var(--dice-safe)); border-top: 1px solid #d6e4de; background: #fff; }
.slip-launch[hidden] { display: none; }
.slip-launch > span { display: inline-flex; align-items: center; gap: 9px; color: #28564d; font-size: .9rem; }
.slip-launch .icon { width: 18px; height: 18px; }
.slip-open, .slip-confirm { display: inline-flex; align-items: center; justify-content: center; border: 0; font: 700 .96rem/1.25 var(--font-ui); }
.slip-open { gap: 6px; min-height: 42px; min-width: 96px; padding: 6px 16px; border-radius: 9px; background: #145c51; color: #fff; }
.slip-open .icon { width: 15px; height: 15px; }
.slip-open:hover:enabled { background: #104c44; }
.bet-slip { --slip-pad: 24px; position: fixed; inset: 0; width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid #ccddd6; border-radius: 18px; background: #fff; color: #123e38; font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.bet-slip::backdrop { background: rgb(7 32 30 / 48%); backdrop-filter: none; }
.slip-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px var(--slip-pad); border-bottom: 1px solid #dce8e2; background: #f4f9f6; }
.slip-head h2 { margin: 0; font-size: 1.25rem; line-height: 1.35; }
.slip-head p { margin: 3px 0 0; color: #516d64; font-size: .82rem; overflow-wrap: anywhere; }
.slip-close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid #d3e3db; border-radius: 50%; color: #305e54; background: #fff; }
.slip-close .icon { width: 17px; height: 17px; }
.slip-content { display: grid; gap: 12px; padding: 18px var(--slip-pad) 20px; }
.slip-numbers { display: grid; gap: 3px; min-width: 0; }
.slip-numbers span, .slip-fields > * > span { font-size: .82rem; font-weight: 600; line-height: 1.4; color: #46665d; }
.slip-numbers strong { max-height: 6em; overflow: auto; overflow-wrap: anywhere; font-size: .96rem; }
.slip-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: end; gap: 12px; }
.slip-fields > * { display: grid; align-content: end; gap: 6px; min-width: 0; }
.slip-fields :is(input, select, .slip-fixed) { box-sizing: border-box; width: 100%; min-width: 0; height: 44px; padding: 0 11px; border: 1px solid #bbd2c8; border-radius: 8px; background: #fff; color: #163c35; font: 650 1rem/1.3 var(--font-ui); }
.slip-fields .slip-fixed { display: flex; align-items: center; background: #f4f7f5; }
.slip-quick { min-width: 0; margin: 0; padding: 0; border: 0; }
.slip-quick legend { padding: 0; margin-bottom: 6px; color: #46665d; font-size: .82rem; font-weight: 600; }
.slip-presets { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; }
.slip-presets button { min-width: 0; min-height: 38px; padding: 3px; border: 1px solid #d5e2db; border-radius: 8px; background: #f4f8f6; color: #24554c; font-weight: 650; }
.slip-presets button[aria-pressed="true"] { background: #d5eee3; border-color: #39806c; color: #124b3e; }
.slip-content .period-cap { margin: 0; color: #577068; font-size: .78rem; }
.slip-total { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-top: 13px; border-top: 1px solid #dce6e0; }
.slip-total span { font-weight: 600; font-size: .88rem; color: #436158; }
.slip-total strong { font-size: 1.35rem; line-height: 1.2; overflow-wrap: anywhere; }
.slip-content .form-error { margin: 0; }
.slip-content .form-error:empty { display: none; }
.slip-confirm { width: 100%; min-height: 45px; padding: 9px; border-radius: 9px; background: var(--lime, #c4f600); color: #18352d; }
.slip-open:disabled, .slip-confirm:disabled { background: #e4ebe7; color: #567068; }
@media (max-width: 600px) {
  .bet-slip { --slip-pad: 18px; width: 100%; max-width: 100%; max-height: calc(100dvh - 8px); margin: auto auto 0; border-radius: 18px 18px 0 0; }
  .slip-head { padding-block: 14px; }
  .slip-content { padding-bottom: calc(16px + env(safe-area-inset-bottom,0px)); }
}
