.dt-sic-bo-game,
.dt-sic-bo-game * {
  box-sizing: border-box;
}

.dt-sic-bo-game {
  --dt-green-bg: #0b3d1f;
  --dt-felt: #006b34;
  --dt-felt-dark: #005f28;
  --dt-gold: #d1aa42;
  --dt-gold-light: #f4dc90;
  --dt-cream: #f3c45c;
  width: 100%;
  min-height: 100vh;
  padding: 24px;
  background: #0b3d1f;
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dt-sic-bo-game button {
  font-family: inherit;
}

.dt-sb-shell {
  max-width: 1480px;
  margin: 0 auto;
}

.dt-sb-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.dt-sb-kicker {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .35em;
  color: rgba(236, 253, 245, .75);
}

.dt-sb-title {
  margin: 4px 0 0;
  color: #fff7c2;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.dt-sb-header-center {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.dt-sb-dice-tray {
  border: 2px solid var(--dt-gold);
  border-radius: 28px;
  padding: 12px 20px;
  background: linear-gradient(180deg, #0a5e2c 0%, #084b22 55%, #063817 100%);
  box-shadow: inset 0 2px 8px rgba(255,255,255,.06), inset 0 -8px 16px rgba(0,0,0,.28), 0 10px 20px rgba(0,0,0,.22);
}

.dt-sb-header-dice {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dt-sb-result-box {
  min-width: 112px;
  border: 1px solid var(--dt-gold);
  border-radius: 16px;
  padding: 8px 16px;
  text-align: center;
  background: linear-gradient(180deg, #f4dc90 0%, #d9b64a 46%, #b98d22 100%);
  box-shadow: inset 0 2px 2px rgba(255,255,255,.25), inset 0 -3px 6px rgba(86,57,5,.28), 0 6px 14px rgba(0,0,0,.25);
}

.dt-sb-result-label {
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: #4a3a0a;
  text-shadow: 0 1px 0 rgba(255,250,220,.65), 0 -1px 0 rgba(97,68,6,.28);
}

.dt-sb-result-total {
  color: #1a1403;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
  text-shadow: 0 1px 0 rgba(255,250,220,.7), 0 2px 2px rgba(72,49,4,.2);
}

.dt-sb-result-state {
  color: #3a2f06;
  font-size: 11px;
  font-weight: 950;
  text-shadow: 0 1px 0 rgba(255,248,210,.55);
}

.dt-sb-header-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dt-sb-stat-card {
  min-width: 116px;
  border: 1px solid rgba(253, 224, 71, .4);
  border-radius: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .86);
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.dt-sb-stat-label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .24em;
  color: #64748b;
}

.dt-sb-stat-value {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
}

.dt-sb-positive { color: #047857; }
.dt-sb-negative { color: #be123c; }

.dt-sb-table-frame {
  border-radius: 60px;
  padding: 22px;
  background: linear-gradient(180deg, #f0d37e 0%, #d9b64a 28%, #bc962b 58%, #f2d77c 100%);
  box-shadow: inset 0 10px 24px rgba(255,255,255,.22), 0 30px 55px rgba(0,0,0,.25);
}

.dt-sb-inner-frame {
  border-radius: 46px;
  padding: 18px;
  background: linear-gradient(180deg, #0a5a2b 0%, #0a4b25 28%, #073a1c 68%, #062f17 100%);
  box-shadow: inset 0 8px 18px rgba(0,0,0,.3);
}

.dt-sb-padding-frame {
  border-radius: 38px;
  padding: 14px;
  background: #005f28;
  box-shadow: inset 0 0 0 8px rgba(0,0,0,.12), inset 0 10px 26px rgba(255,255,255,.05);
}

.dt-sb-board {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--dt-gold);
  border-radius: 26px;
  background-color: var(--dt-felt);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.05) 0, transparent 28%),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,.04) 0, transparent 24%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(0,0,0,.05) 100%);
}

.dt-sb-board-row {
  border-bottom: 1px solid var(--dt-gold);
}

.dt-sb-top-row {
  display: grid;
  grid-template-columns: 1.18fr 2.1fr 1.18fr;
}

.dt-sb-triple-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-left: 1px solid var(--dt-gold);
  border-right: 1px solid var(--dt-gold);
}

.dt-sb-sum-row {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
}

.dt-sb-two-dice-row {
  display: grid;
  grid-template-columns: 1.08fr 4.12fr;
}

.dt-sb-pair-grid {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
}

.dt-sb-single-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dt-sb-footer-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #005924;
  color: #fff;
  font-weight: 950;
  font-size: 18px;
  text-align: center;
}

.dt-sb-footer-row > div {
  padding: 8px 12px;
  border-right: 1px solid var(--dt-gold);
}

.dt-sb-footer-row > div:last-child { border-right: 0; }

.dt-sb-cell {
  position: relative;
  border-right: 1px solid var(--dt-gold);
  background: rgba(0, 107, 52, .96);
  color: var(--dt-cream);
  border-top: 0;
  border-left: 0;
  border-bottom: 0;
  padding: 0;
  cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.dt-sb-cell:hover:not(:disabled) {
  background: #0a7b3d;
}

.dt-sb-cell:disabled {
  cursor: not-allowed;
}

.dt-sb-cell.dt-sb-winner {
  background: #0d7a39;
  box-shadow: inset 0 0 0 1px rgba(255,232,140,.85), 0 0 18px rgba(255,215,0,.55), inset 0 0 18px rgba(255,215,0,.18);
  animation: dtSbWinnerPulse .45s ease-in-out 4 alternate;
}

@keyframes dtSbWinnerPulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.23); }
}

.dt-sb-side-cell {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8px;
}

.dt-sb-side-title {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
  font-weight: 950;
}

.dt-sb-side-text { font-size: 16px; font-weight: 700; }
.dt-sb-side-range { font-size: 30px; font-weight: 950; }
.dt-sb-side-payout { margin-top: 8px; font-size: 18px; font-weight: 850; }
.dt-sb-side-note { font-size: 12px; font-weight: 700; }

.dt-sb-triple-cell {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 8px 6px;
  text-align: center;
}

.dt-sb-small-title {
  font-size: 12px;
  line-height: 1.15;
  font-weight: 800;
}

.dt-sb-small-footer {
  padding-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: lowercase;
}

.dt-sb-sum-cell {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6px 2px;
}

.dt-sb-sum-label {
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1;
  font-weight: 950;
}

.dt-sb-payout-small {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
}

.dt-sb-two-title-cell {
  min-height: 174px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8px;
}

.dt-sb-two-title {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  font-weight: 950;
}

.dt-sb-two-payout {
  margin-top: 12px;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 950;
}

.dt-sb-pair-cell {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6px 2px;
}

.dt-sb-pair-dice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.dt-sb-pair-label {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
}

.dt-sb-single-cell {
  min-height: 84px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 16px;
}

.dt-sb-single-label {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 950;
}

.dt-sb-dice-icons {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.dt-sb-die {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  background: #fff;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,.18);
  padding: 4px;
}

.dt-sb-die-sm { width: 36px; height: 36px; }
.dt-sb-die-md { width: 44px; height: 44px; }
.dt-sb-die-lg { width: 56px; height: 56px; border-radius: 9px; padding: 6px; box-shadow: 0 8px 14px rgba(0,0,0,.35); }

.dt-sb-dot-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dt-sb-dot {
  width: 8px;
  height: 8px;
  background: #000;
  border-radius: 50%;
}

.dt-sb-die-sm .dt-sb-dot { width: 6px; height: 6px; }

.dt-sb-header-die.dt-sb-rolling {
  animation: dtSbDiceTumble .48s ease-in-out 2;
}

@keyframes dtSbDiceTumble {
  0% { transform: rotate(0deg) translateY(0) scale(1); filter: blur(0); }
  25% { transform: rotate(120deg) translateY(-6px) scale(1.06); filter: blur(1.5px); }
  60% { transform: rotate(240deg) translateY(0) scale(.98); filter: blur(1px); }
  100% { transform: rotate(360deg) translateY(0) scale(1); filter: blur(0); }
}

.dt-sb-chip-button {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--chip-border);
  color: var(--chip-text);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.35) 0%, var(--chip-base) 38%, var(--chip-base) 100%);
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 8px 14px rgba(0,0,0,.3);
}

.dt-sb-chip-button:hover { transform: scale(1.05); }
.dt-sb-chip-button.dt-sb-selected { transform: scale(1.1); box-shadow: 0 0 0 3px rgba(255,248,210,.35), 0 10px 18px rgba(0,0,0,.35); }

.dt-sb-chip-button::before,
.dt-sb-chip::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
}

.dt-sb-chip-button::after,
.dt-sb-chip::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: repeating-conic-gradient(var(--chip-stripe) 0deg 12deg, transparent 12deg 45deg);
  opacity: .9;
}

.dt-sb-chip-button span,
.dt-sb-chip span {
  position: relative;
  z-index: 2;
}

.dt-sb-chip-stack {
  pointer-events: none;
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 48px;
  height: 64px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  animation: dtSbChipDrop .28s cubic-bezier(.2, .7, .2, 1.2);
}

@keyframes dtSbChipDrop {
  from { opacity: 0; transform: translateY(-10px) scale(.88); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dt-sb-chip {
  position: absolute;
  left: 50%;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--chip-border);
  color: var(--chip-text);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.35) 0%, var(--chip-base) 38%, var(--chip-base) 100%);
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 950;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0,0,0,.35);
}

.dt-sb-controls-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
  margin-top: 20px;
}

.dt-sb-panel {
  border: 1px solid rgba(253, 224, 71, .35);
  border-radius: 30px;
  background: rgba(255,255,255,.86);
  color: #0f172a;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.dt-sb-controls-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.dt-sb-control-label-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dt-sb-control-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .28em;
}

.dt-sb-sound-toggle {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .22em;
  cursor: pointer;
}

.dt-sb-sound-toggle.dt-sb-on {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.dt-sb-chip-picker {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dt-sb-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dt-sb-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.dt-sb-action:hover:not(:disabled) { transform: scale(1.02); background: #f8fafc; }
.dt-sb-action:disabled { cursor: not-allowed; opacity: .5; }
.dt-sb-action-primary { border-color: #fcd34d; background: #fbbf24; color: #0f172a; }
.dt-sb-action-primary:hover:not(:disabled) { background: #f59e0b; }

.dt-sb-message {
  margin-top: 20px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: rgba(248,250,252,.85);
  color: #334155;
  padding: 16px;
  font-size: 14px;
  font-weight: 700;
}

.dt-sb-panel-title {
  margin: 0 0 16px;
  color: #334155;
  font-size: 18px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .24em;
}

.dt-sb-history-list {
  display: grid;
  gap: 12px;
}

.dt-sb-history-empty,
.dt-sb-history-item,
.dt-sb-note {
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: rgba(248,250,252,.85);
  color: #64748b;
  padding: 14px 16px;
  font-size: 14px;
}

.dt-sb-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #0f172a;
}

.dt-sb-history-dice { font-size: 18px; font-weight: 900; }
.dt-sb-history-total { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: .2em; }
.dt-sb-note { margin-top: 20px; line-height: 1.5; }

@media (max-width: 1200px) {
  .dt-sb-header { grid-template-columns: 1fr; }
  .dt-sb-header-stats { justify-content: flex-start; }
  .dt-sb-top-row { grid-template-columns: 1fr; }
  .dt-sb-triple-grid { border-left: 0; border-right: 0; }
  .dt-sb-sum-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .dt-sb-pair-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .dt-sb-controls-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .dt-sic-bo-game { padding: 12px; }
  .dt-sb-header-center { flex-direction: column; }
  .dt-sb-sum-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dt-sb-two-dice-row { grid-template-columns: 1fr; }
  .dt-sb-pair-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dt-sb-single-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dt-sb-footer-row { grid-template-columns: 1fr; }
  .dt-sb-footer-row > div { border-right: 0; border-bottom: 1px solid var(--dt-gold); }
}
