.rc { --game: #818cf8; }
.gr-shell { max-width: 760px; margin: auto; }
.gr-shell h1 { margin: 2px 0 6px; font-size: 1.35rem; }
.gr-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.gr-actions label, .gr-score { color: var(--text-dim); font-size: .83rem; }
.gr-actions select, .gr-actions button, .gr-summary button {
  min-height: 44px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text); padding: 5px 10px;
  font: inherit; cursor: pointer;
}
.gr-actions select { flex: 1; min-width: 140px; }
.gr-message { color: var(--game); min-height: 1.3em; font-size: .82rem; margin: 3px 0; }
.gr-board { border: 1px solid var(--border); border-radius: 15px;
  background: var(--surface); padding: 7px 5px; user-select: none;
  -webkit-user-select: none; -webkit-touch-callout: none; }
.gr-chip { width: fit-content; min-width: 132px; margin: 0 auto;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface-2); text-align: center; padding: 3px 8px;
  font-size: .72rem; }
.gr-chip.turn { outline: 2px solid var(--game); }
.gr-mini { display: inline-block; width: 13px; height: 19px; margin: 0 -2px 0 2px;
  vertical-align: middle; border: 1px solid var(--game); border-radius: 3px;
  background: repeating-linear-gradient(45deg, transparent 0 5px,
    var(--game) 5px 6px, transparent 6px 11px), var(--surface-2); }
.gr-center { display: flex; justify-content: center; gap: 16px; margin: 7px 0 5px; }
.gr-pile { width: 72px; min-height: 92px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-2); color: var(--text);
  font: 700 .73rem system-ui; padding: 4px; cursor: pointer; }
.gr-pile.ready { outline: 2px solid var(--game); outline-offset: 2px; }
.gr-back { background: repeating-linear-gradient(45deg, transparent 0 8px,
  var(--game) 8px 9px, transparent 9px 17px), var(--surface-2); }
.gr-pile.hint, .gr-card.hint { outline: 3px solid #fbbf24; }
.gr-pile .gr-card { width: 100%; height: 70px; pointer-events: none; }
.gr-deadwood { text-align: center; color: var(--game); font-size: .79rem;
  font-weight: 700; margin: 3px 0 5px; }
.gr-hand, .gr-reveal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px 2px; max-width: 408px; margin: auto; }
.gr-hand { margin-bottom: 7px; }
.gr-reveal { margin-top: 5px; }
.gr-card { position: relative; min-width: 44px; width: 100%; height: 64px;
  border: 0; border-radius: 7px; padding: 4px; background: #f8f7f5;
  color: #191920; text-align: left; font: 750 .78rem/1 system-ui;
  touch-action: manipulation; -webkit-touch-callout: none; cursor: pointer; }
.gr-card.red { color: #b92343; }
.gr-card .symbol { display: block; font-size: 1.45rem; text-align: center; }
.gr-card .new { position: absolute; right: 2px; top: 2px; font-size: .53rem;
  padding: 1px 2px; border-radius: 2px; color: #111; background: #fde68a; }
.gr-card .lay-tag { position: absolute; right: 2px; bottom: 4px;
  font-size: .48rem; color: #111; background: #c7d2fe; padding: 1px; }
.gr-card.meld { border-bottom: 4px solid var(--game); }
.gr-card.group-start { margin-left: 3px; width: calc(100% - 3px); }
.gr-card.selected { transform: translateY(-5px); outline: 2px solid var(--game); }
.gr-card.dead { border-bottom: 4px solid transparent; }
.gr-actions { justify-content: flex-start; }
.gr-actions button { min-width: 78px; }
.gr-actions .off { opacity: .45; }
.gr-summary { margin-top: 7px; padding: 7px; border: 1px solid var(--game);
  border-radius: 9px; font-size: .8rem; }
.gr-summary p { margin: 3px 0 7px; }
.gr-summary button { min-height: 44px; }
button:focus-visible, select:focus-visible { outline: 3px solid #fbbf24;
  outline-offset: 2px; }
[hidden] { display: none !important; }
@media (max-width: 500px) {
  .rc-stage { padding: 0 5px; margin-top: 8px; }
  .gr-board { padding: 6px 4px; }
}
@media (min-width: 900px) {
  .gr-hand { max-width: 690px; grid-template-columns: repeat(11, minmax(0, 1fr)); }
  .gr-board { max-height: 560px; }
}
@media (prefers-reduced-motion: reduce) {
  .gr-card.selected { transition: none; }
}
