/* Yahtzee screen */
.yz-screen { display: flex; flex-direction: column; gap: 10px; max-width: 1000px; margin: 0 auto; color: #fff; }
.yz-header { display: flex; justify-content: space-between; font: 700 16px system-ui; }
.yz-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.yz-chip { padding: 6px 10px; min-height: 36px; font-size: 13px; }
.yz-main { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.yz-mine { flex: 1 1 320px; max-width: 520px; display: flex; flex-direction: column; gap: 10px; }
.yz-panel { flex: 1 1 260px; max-width: 360px; background: rgba(0, 0, 0, .18); border-radius: 12px; padding: 8px;
  display: flex; flex-direction: column; gap: 6px; }
.yz-panel-head { font: 600 13px system-ui; }

/* Dice: 5 x 52px + gaps = 292px, fits a 344px phone content width */
.yz-dice { display: flex; gap: 8px; justify-content: center; }
.yz-dice.sm { gap: 4px; justify-content: flex-start; }
.yz-die { width: 52px; height: 52px; background: #fff; border-radius: 10px; box-shadow: 0 2px 4px rgba(0, 0, 0, .35);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 7px; gap: 2px;
  transition: transform .08s ease; user-select: none; cursor: pointer; touch-action: manipulation; }
.yz-die .pip { border-radius: 50%; }
.yz-die .pip.on { background: #222; }
.yz-die.blank { background: rgba(255, 255, 255, .35); cursor: default; }
.yz-die.held { transform: translateY(-6px); outline: 3px solid #ffd84d; outline-offset: 1px; }
.yz-die.sm { width: 24px; height: 24px; padding: 3px; gap: 1px; border-radius: 5px; cursor: default; }
.yz-roll, .yz-score { width: 100%; }
.yz-score.scratch { background: #f59e0b; }
.yz-score.scratch:disabled { background: #bbb; }
.yz-waiting { text-align: center; font: 600 14px system-ui; color: #ffe08a; }

/* Scorecard */
.yz-card { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #fff; color: #222;
  border-radius: 12px; padding: 8px; }
.yz-col { display: flex; flex-direction: column; min-width: 0; }
.yz-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 34px;
  padding: 0 8px; border-bottom: 1px solid #eee; font: 500 14px system-ui; }
.yz-row .val { font-weight: 700; }
.yz-row .val.preview { color: #757575; font-weight: 600; }
.yz-row.pickable { cursor: pointer; touch-action: manipulation; }
.yz-row.selected { background: #fff3b0; outline: 2px solid #ffb703; outline-offset: -2px; border-radius: 6px; }
.yz-row.sum { color: #555; font-size: 13px; }
.yz-row.total { color: #222; font-weight: 800; border-bottom: none; }
.yz-row.total .val { font-weight: 800; }
.yz-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* Overlays: an opponent's card, history */
.yz-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); display: flex; align-items: center;
  justify-content: center; z-index: 100; padding: 12px; }
.yz-box { background: #4b3f8f; color: #fff; border-radius: 14px; padding: 14px; max-width: 94vw; max-height: 86vh;
  overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.yz-box-title { font: 700 16px system-ui; }
.yz-history { display: flex; flex-direction: column; gap: 4px; min-width: 240px; font: 500 14px system-ui; }

@media (max-width: 380px) {
  .yz-row { font-size: 13px; padding: 0 5px; }
}
