/* Over/Under 7. The page is built once; states only change content inside fixed regions. */

.game-root { min-height: 36rem; }

.ou-table {
  width: min(100%, 36rem);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.ou-dice {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  height: 5.5rem;
}

.ou-die-slot {
  width: 4.6rem;
  height: 4.6rem;
  display: grid;
  place-items: center;
}

.ou-dice .die-wrap { gap: 0; }
.ou-dice .die-tag { display: none; }

.ou-dice .die {
  width: 4.5rem;
  cursor: default;
}

.ou-dice .die:disabled { opacity: 1; }

.ou-readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 3.5rem;
  margin: 0;
  text-align: center;
}

.ou-readout b {
  font: 700 1.9rem/1 var(--font-serif);
  color: #fffdf7;
  font-variant-numeric: tabular-nums;
}

.ou-readout span {
  margin-top: 0.15rem;
  height: 1.2em;
  color: #d5ddd6;
  font-size: 0.82rem;
  line-height: 1.2;
}

.ou-readout--seven b { color: #f0cf6a; }

.ou-history {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 2.15rem));
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0.2rem 0 0.35rem;
  padding: 0;
  list-style: none;
}

.ou-hist {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
  color: #fffdf7;
  font: 700 0.78rem/1 var(--font-serif);
  font-variant-numeric: tabular-nums;
}

.ou-hist.is-empty { border-color: rgba(255, 253, 247, 0.32); }
.ou-hist--under { background: #2a3a48; }
.ou-hist--seven { background: #c4a24a; color: #1d2433; }
.ou-hist--over { background: #8c3b32; }
.ou-hist.is-latest { box-shadow: inset 0 0 0 1px rgba(255, 253, 247, 0.85); }

.ou-spots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
}

.ou-spots.is-locked { pointer-events: none; }

.ou-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 8.75rem;
  margin: 0;
  padding: 0.7rem 0.35rem 0.5rem;
  border: 1px solid rgba(255, 253, 247, 0.38);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: #fffdf7;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.ou-spot--seven {
  background: rgba(224, 185, 72, 0.14);
  border-color: rgba(224, 185, 72, 0.55);
}

.ou-spot-name {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.4em;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 4.2cqw, 1.28rem);
  line-height: 1.15;
  text-align: center;
}

.ou-spot-pay {
  height: 1.2em;
  color: #f0cf6a;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.ou-spot-well {
  position: relative;
  width: 100%;
  height: 2.8rem;
  margin-top: auto;
}

.ou-spot.is-win {
  border-color: #f0cf6a;
  box-shadow: inset 0 0 0 1px #f0cf6a;
}

.ou-spot.is-lose { border-color: rgba(255, 253, 247, 0.16); }

.ou-spot:focus-visible {
  outline: 3px solid #e0b948;
  outline-offset: 2px;
}

@media (hover: hover) {
  .ou-spot:hover { background: rgba(255, 253, 247, 0.08); }
  .ou-spot--seven:hover { background: rgba(224, 185, 72, 0.22); }
}

.ou-spot:active { background: rgba(255, 253, 247, 0.12); }
