:root {
  --bg: #08130c;
  --bg-deep: #040a06;
  --felt: #123522;
  --felt-bright: #1d4a31;
  --panel: rgba(10, 18, 13, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(233, 241, 220, 0.12);
  --line-strong: rgba(233, 241, 220, 0.22);
  --text: #f3f0e8;
  --text-soft: rgba(243, 240, 232, 0.66);
  --accent: #d9ee8f;
  --accent-soft: rgba(217, 238, 143, 0.14);
  --sand: #d9c39b;
  --danger: #ffc0b2;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(
      circle at top left,
      rgba(217, 238, 143, 0.08),
      transparent 24%
    ),
    radial-gradient(
      circle at top right,
      rgba(217, 195, 155, 0.1),
      transparent 20%
    ),
    linear-gradient(180deg, var(--bg) 0%, #0a1d12 48%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 78%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Brand Bar ── */

.brand-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(8, 19, 12, 0.82);
  border-bottom: 1px solid var(--line);
}

.brand-bar-inner {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: inline-grid;
  grid-template-columns: repeat(3, 8px);
  gap: 3px;
  padding: 7px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--felt-bright), var(--felt));
  border: 1px solid rgba(217, 238, 143, 0.2);
}

.brand-pip {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.brand-pip:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.brand-pip:nth-child(2) {
  grid-column: 2;
  grid-row: 2;
}

.brand-pip:nth-child(3) {
  grid-column: 3;
  grid-row: 3;
}

.brand-name {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}

.brand-tagline {
  color: var(--text-soft);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand-phase-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid rgba(217, 238, 143, 0.25);
  border-radius: 999px;
  background: rgba(217, 238, 143, 0.08);
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-link-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 2px;
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(217, 238, 143, 0.35);
  text-underline-offset: 0.26em;
  cursor: pointer;
  transition:
    color 180ms ease,
    text-decoration-color 180ms ease,
    opacity 180ms ease;
}

.header-link-button:hover,
.header-link-button.is-active {
  color: var(--text);
  text-decoration-color: rgba(243, 240, 232, 0.55);
}

#score-total {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  color: var(--accent);
  white-space: nowrap;
}

/* ── Page Shell ── */

.page-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  display: grid;
  gap: 20px;
  padding: 24px 0 42px;
  overflow-x: clip;
}

body.overlay-open {
  overflow: hidden;
}

/* ── Overlays ── */

.overlay-shell {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.overlay-shell[hidden] {
  display: none !important;
}

.overlay-shell[data-locked="true"] .overlay-close,
.overlay-shell[data-locked="true"] .overlay-backdrop {
  display: none;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(
      circle at top center,
      rgba(217, 238, 143, 0.12),
      transparent 38%
    ),
    rgba(2, 6, 4, 0.72);
  backdrop-filter: blur(18px);
}

.overlay-panel {
  position: relative;
  width: min(1040px, calc(100vw - 36px));
  max-height: min(840px, calc(100vh - 36px));
  overflow: auto;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(233, 241, 220, 0.14);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(11, 20, 14, 0.94), rgba(7, 14, 10, 0.92)),
    rgba(7, 14, 10, 0.92);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.overlay-panel--setup {
  width: min(860px, calc(100vw - 36px));
}

.overlay-panel--instructions {
  width: min(1120px, calc(100vw - 36px));
  max-height: min(900px, calc(100vh - 24px));
  padding: 0;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.overlay-panel--tutorial {
  width: min(1160px, calc(100vw - 24px));
  max-height: min(900px, calc(100vh - 24px));
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.overlay-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.overlay-copy {
  display: grid;
  gap: 6px;
}

.overlay-copy h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.05em;
  color: var(--text);
}

.overlay-note {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 0.92rem;
  max-width: 54ch;
}

.overlay-close {
  min-height: 42px;
  padding-inline: 16px;
  flex-shrink: 0;
}

.overlay-body {
  display: grid;
  gap: 16px;
  align-content: start;
}

.overlay-body--room {
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.82fr);
  gap: 24px;
  align-items: start;
}

.overlay-body--setup {
  grid-template-columns: minmax(0, 1fr);
}

.overlay-header--instructions {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 24px 26px 18px;
  background:
    linear-gradient(180deg, rgba(7, 14, 10, 0.98), rgba(7, 14, 10, 0.94)),
    rgba(7, 14, 10, 0.94);
  border-bottom: 1px solid rgba(233, 241, 220, 0.08);
}

.overlay-header--tutorial {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 24px 26px 18px;
  background:
    linear-gradient(180deg, rgba(7, 14, 10, 0.985), rgba(7, 14, 10, 0.95)),
    rgba(7, 14, 10, 0.96);
  border-bottom: 1px solid rgba(233, 241, 220, 0.08);
}

.overlay-body--instructions {
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.72fr);
  grid-template-areas:
    "hero hero"
    "main aside";
  gap: 26px;
  align-items: start;
  min-height: 0;
  padding: 24px 26px 28px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.overlay-body--tutorial {
  grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
  gap: 0;
  align-items: start;
  min-height: 0;
  overflow: hidden;
}

.manual-hero {
  grid-area: hero;
  display: grid;
  height: max-content;
  gap: 16px;
  padding: 22px 22px 20px;
  border: 1px solid rgba(217, 238, 143, 0.12);
  border-radius: 26px;
  background:
    radial-gradient(
      circle at top right,
      rgba(217, 238, 143, 0.18),
      transparent 30%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.04),
      rgba(217, 238, 143, 0.04)
    );
}

.manual-hero-copy {
  display: grid;
  gap: 8px;
  max-width: 64ch;
}

.manual-hero-copy h3,
.manual-section-head h3,
.manual-side-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
  color: var(--text);
}

.manual-hero-copy h3 {
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
}

.manual-hero-copy p,
.manual-section p,
.manual-side-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.62;
}

.manual-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.manual-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.manual-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(217, 238, 143, 0.18);
  background: rgba(217, 238, 143, 0.08);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
}

.manual-hero-button {
  min-height: 42px;
  padding-inline: 16px;
}

.manual-hero-caption {
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.manual-hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.manual-hero-stat {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(233, 241, 220, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(6, 14, 9, 0.38);
}

.manual-hero-stat strong,
.manual-flow-card strong,
.manual-tip-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.manual-hero-stat span {
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 0.9rem;
}

.manual-main {
  grid-area: main;
  display: grid;
  gap: 22px;
  min-width: 0;
}

.manual-section {
  display: grid;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(233, 241, 220, 0.08);
}

.manual-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.manual-section-head {
  display: grid;
  gap: 6px;
}

.manual-section-head h3,
.manual-side-card h3 {
  font-size: 1.18rem;
}

.manual-step-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 12px;
  color: var(--text-soft);
  line-height: 1.62;
}

.manual-flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.manual-flow-card,
.manual-tip-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(233, 241, 220, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(255, 255, 255, 0.015);
}

.manual-flow-card p,
.manual-tip-card p {
  margin: 0;
}

.manual-flow-step {
  width: fit-content;
  min-width: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 238, 143, 0.22);
  background: rgba(217, 238, 143, 0.08);
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.manual-par-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.manual-par-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(233, 241, 220, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(255, 255, 255, 0.02);
}

.manual-par-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.manual-par-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.manual-par-list li {
  display: grid;
  gap: 3px;
}

.manual-par-list li strong {
  font-size: 0.88rem;
}

.manual-par-list li span {
  color: var(--text-soft);
  line-height: 1.48;
  font-size: 0.9rem;
}

.manual-par-badge {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 238, 143, 0.18);
  background: rgba(217, 238, 143, 0.08);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manual-example-stack {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(233, 241, 220, 0.08);
}

.manual-example-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.manual-example-row span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manual-example-row code,
.manual-rule-item code {
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
}

.manual-example-row strong {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.manual-rule-band {
  display: grid;
  gap: 10px;
}

.manual-rule-band--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.manual-rule-item {
  display: grid;
  gap: 4px;
  padding: 15px 16px 15px 18px;
  border-left: 3px solid rgba(217, 238, 143, 0.7);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.manual-rule-item--spotlight {
  gap: 8px;
  padding: 16px 18px;
  border-left: 0;
  border: 1px solid rgba(233, 241, 220, 0.1);
  background:
    linear-gradient(
      180deg,
      rgba(217, 238, 143, 0.07),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(255, 255, 255, 0.02);
}

.manual-rule-item strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.manual-rule-item span {
  color: var(--text-soft);
  line-height: 1.5;
}

.manual-tip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.manual-bullet-list,
.manual-quick-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.manual-bullet-list {
  gap: 10px;
}

.manual-bullet-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.6;
}

.manual-bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.88;
}

.manual-aside {
  grid-area: aside;
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.manual-side-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(217, 238, 143, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(
      180deg,
      rgba(217, 238, 143, 0.08),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(255, 255, 255, 0.02);
}

.manual-side-card:first-child {
  position: sticky;
  top: 0;
}

.manual-side-card--subtle {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(255, 255, 255, 0.02);
}

.manual-side-callout {
  padding: 14px 16px;
  border-left: 3px solid rgba(217, 238, 143, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.98rem;
}

.manual-quick-list {
  gap: 0;
}

.manual-quick-list li {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(233, 241, 220, 0.08);
}

.manual-quick-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.manual-quick-list strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.manual-quick-list span {
  color: var(--text-soft);
  line-height: 1.5;
}

.manual-quick-list--compact li {
  gap: 3px;
  padding: 10px 0;
}

.tutorial-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.tutorial-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(217, 238, 143, 0.16);
  background: rgba(217, 238, 143, 0.08);
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tutorial-rail {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 26px;
  border-right: 1px solid rgba(233, 241, 220, 0.08);
  background:
    radial-gradient(
      circle at top left,
      rgba(217, 238, 143, 0.12),
      transparent 44%
    ),
    rgba(255, 255, 255, 0.015);
}

.tutorial-progress-head {
  display: grid;
  gap: 8px;
}

.tutorial-progress-head strong,
.tutorial-rail-card h3,
.tutorial-step-head h3,
.tutorial-lesson-card h3,
.tutorial-check-card h3,
.tutorial-summary-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
  color: var(--text);
}

.tutorial-progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.tutorial-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(217, 238, 143, 0.95), rgba(217, 195, 155, 0.8));
  transition: width 220ms ease;
}

.tutorial-progress-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.tutorial-progress-step {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(233, 241, 220, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.tutorial-progress-step:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(217, 238, 143, 0.18);
}

.tutorial-progress-step:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.tutorial-progress-step.is-current {
  border-color: rgba(217, 238, 143, 0.24);
  background:
    linear-gradient(
      180deg,
      rgba(217, 238, 143, 0.08),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(255, 255, 255, 0.02);
}

.tutorial-progress-step.is-complete .tutorial-progress-index {
  background: var(--accent);
  color: #122014;
}

.tutorial-progress-index {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(217, 238, 143, 0.18);
  background: rgba(217, 238, 143, 0.08);
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.tutorial-progress-copy {
  display: grid;
  gap: 3px;
}

.tutorial-progress-copy strong {
  font-size: 0.94rem;
}

.tutorial-progress-copy span {
  color: var(--text-soft);
  font-size: 0.78rem;
}

.tutorial-rail-card,
.tutorial-summary-card,
.tutorial-lesson-card,
.tutorial-check-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(233, 241, 220, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(255, 255, 255, 0.02);
}

.tutorial-rail-card p,
.tutorial-step-card p,
.tutorial-check-card p,
.tutorial-summary-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.tutorial-stage {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 26px;
  min-height: 0;
  overflow: auto;
}

.tutorial-step-card {
  display: grid;
  gap: 18px;
}

.tutorial-step-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.tutorial-step-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(217, 238, 143, 0.16);
  background: rgba(217, 238, 143, 0.08);
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.tutorial-step-lead {
  max-width: 66ch;
  font-size: 1rem;
}

.tutorial-board {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.tutorial-board--summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tutorial-card-eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tutorial-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tutorial-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(233, 241, 220, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 600;
}

.tutorial-dice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tutorial-die {
  width: 86px;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px 10px 10px;
  border: 1px solid rgba(233, 241, 220, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.025)
    ),
    rgba(5, 12, 8, 0.24);
  color: inherit;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.tutorial-die.is-interactive {
  cursor: pointer;
}

.tutorial-die.is-interactive:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 238, 143, 0.22);
}

.tutorial-die.is-selected {
  border-color: rgba(217, 238, 143, 0.28);
  box-shadow: 0 0 0 3px rgba(217, 238, 143, 0.12);
}

.tutorial-die.is-match {
  border-color: rgba(217, 238, 143, 0.24);
  background:
    linear-gradient(
      180deg,
      rgba(217, 238, 143, 0.09),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(5, 12, 8, 0.28);
}

.tutorial-die.is-score {
  border-color: rgba(217, 195, 155, 0.28);
}

.tutorial-die.is-straight {
  border-color: rgba(217, 238, 143, 0.2);
  background:
    linear-gradient(
      180deg,
      rgba(217, 238, 143, 0.06),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(5, 12, 8, 0.26);
}

.tutorial-die:disabled {
  cursor: default;
}

.tutorial-die-face {
  width: 62px;
  height: 62px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5px;
  padding: 9px;
  border-radius: 16px;
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.24),
      transparent 32%
    ),
    linear-gradient(145deg, #fff7e5 0%, #e0c89d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 10px 18px rgba(0, 0, 0, 0.15);
}

.tutorial-pip {
  width: 100%;
  aspect-ratio: 1 / 1;
  align-self: center;
  justify-self: center;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.4);
  background: radial-gradient(circle at 34% 30%, rgba(85, 94, 88, 0.98) 0%, rgba(31, 38, 34, 0.98) 45%, rgba(7, 10, 8, 0.99) 100%);
}

.tutorial-pip.is-active {
  opacity: 1;
  transform: scale(0.54);
}

.tutorial-die-caption {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tutorial-lesson-note {
  color: var(--text);
}

.tutorial-side-note {
  padding: 12px 14px;
  border-left: 3px solid rgba(217, 238, 143, 0.66);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  line-height: 1.55;
}

.tutorial-choice-grid {
  display: grid;
  gap: 10px;
}

.tutorial-choice {
  display: grid;
  gap: 4px;
  padding: 14px 15px;
  border: 1px solid rgba(233, 241, 220, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.tutorial-choice:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(217, 238, 143, 0.2);
}

.tutorial-choice.is-selected,
.tutorial-choice.is-correct {
  border-color: rgba(217, 238, 143, 0.24);
  background: rgba(217, 238, 143, 0.08);
}

.tutorial-choice.is-wrong {
  border-color: rgba(255, 192, 178, 0.24);
  background: rgba(255, 192, 178, 0.08);
}

.tutorial-choice strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.96rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.tutorial-choice span,
.tutorial-selection-count {
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

.tutorial-check-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tutorial-check-button {
  min-height: 40px;
  padding-inline: 14px;
}

.tutorial-feedback {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(233, 241, 220, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  line-height: 1.58;
}

.tutorial-feedback.is-good {
  border-color: rgba(217, 238, 143, 0.18);
  background: rgba(217, 238, 143, 0.08);
}

.tutorial-feedback.is-warn {
  border-color: rgba(255, 192, 178, 0.18);
  background: rgba(255, 192, 178, 0.08);
}

.tutorial-feedback--placeholder {
  color: var(--text-soft);
}

.tutorial-success-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(217, 238, 143, 0.08);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tutorial-summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.tutorial-summary-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.62;
}

.tutorial-summary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.tutorial-coach {
  padding: 14px 16px;
  border-top: 1px solid rgba(233, 241, 220, 0.08);
  color: var(--text-soft);
  line-height: 1.58;
}

.tutorial-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.tutorial-nav-button {
  min-width: 170px;
}

.overlay-section-head {
  display: grid;
  gap: 6px;
}

/* ── Panels ── */

.tee-sheet-panel,
.play-surface {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.tee-sheet-panel {
  width: 100%;
  margin: 0;
  border-radius: 28px;
  padding: 24px 24px 20px;
  background: rgba(7, 14, 10, 0.82);
}

.tee-sheet-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-label,
.status-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--text-soft);
}

.tee-sheet-header h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  letter-spacing: -0.04em;
}

.tee-sheet-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
}

.tee-sheet {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
}

.tee-sheet th,
.tee-sheet td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.tee-sheet th {
  background: rgba(255, 255, 255, 0.04);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--text-soft);
}

.tee-sheet td {
  color: var(--text-soft);
}

.tee-sheet tbody tr:last-child td {
  border-bottom: 0;
}

.tee-sheet tbody tr.is-current {
  background: linear-gradient(
    90deg,
    rgba(217, 238, 143, 0.14),
    rgba(217, 238, 143, 0.04)
  );
}

.tee-sheet tbody tr.is-complete td {
  color: var(--text);
}

.tee-sheet tbody tr.is-current td {
  border-bottom-color: rgba(217, 238, 143, 0.08);
}

.tee-sheet td.score-cell {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
  color: var(--accent);
}

.tee-sheet td.player-cell.is-active {
  background: rgba(217, 238, 143, 0.1);
  color: var(--text);
}

.tee-sheet td.player-cell.is-live {
  color: var(--accent);
}

.live-score-stack {
  display: inline-grid;
  gap: 2px;
}

.live-score-stack small {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.live-score-stack strong {
  font-size: 1.08rem;
  line-height: 1;
}

.tee-sheet tfoot td {
  padding: 13px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-family: "Space Grotesk", sans-serif;
}

.tee-sheet tfoot td.total-label {
  color: var(--text-soft);
}

.room-chat-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(233, 241, 220, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.035),
      rgba(255, 255, 255, 0.015)
    ),
    rgba(255, 255, 255, 0.015);
}

.room-chat-panel--overlay {
  margin-top: 4px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid rgba(233, 241, 220, 0.08);
  border-radius: 0;
  background: transparent;
}

.room-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.room-chat-copy {
  display: grid;
  gap: 4px;
}

.room-chat-copy h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  letter-spacing: -0.04em;
}

.room-chat-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 238, 143, 0.14);
  background: rgba(217, 238, 143, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.room-chat-log {
  display: grid;
  gap: 10px;
  max-height: 270px;
  overflow: auto;
  padding-right: 4px;
}

.room-chat-log--compact {
  max-height: 220px;
}

.room-chat-empty {
  padding: 14px 16px;
  border: 1px dashed rgba(233, 241, 220, 0.12);
  border-radius: 18px;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
}

.room-chat-message {
  display: grid;
  gap: 8px;
  width: min(100%, 38ch);
  padding: 12px 14px;
  border: 1px solid rgba(233, 241, 220, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.045),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(10, 18, 12, 0.46);
}

.room-chat-message.is-own {
  margin-left: auto;
  border-color: rgba(217, 238, 143, 0.18);
  background:
    linear-gradient(
      180deg,
      rgba(217, 238, 143, 0.12),
      rgba(217, 238, 143, 0.04)
    ),
    rgba(10, 18, 12, 0.42);
}

.room-chat-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.room-chat-message-meta strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.94rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.room-chat-message-meta span {
  color: var(--text-soft);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.room-chat-message p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.room-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.room-chat-form input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(233, 241, 220, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.room-chat-form input::placeholder {
  color: rgba(233, 241, 220, 0.4);
}

.room-chat-form input:focus-visible {
  outline: 2px solid rgba(217, 238, 143, 0.88);
  outline-offset: 3px;
}

.room-chat-form button {
  min-height: 46px;
  min-width: 96px;
}

/* ── Play Surface ── */

.play-surface {
  border-radius: 32px;
  padding: 24px;
}

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.page-shell[data-phase="join"] .dice-focus-stack {
  opacity: 0.88;
}

.page-shell[data-phase="play"] .tee-sheet-panel,
.page-shell[data-phase="complete"] .tee-sheet-panel {
  background: rgba(7, 14, 10, 0.72);
}

.page-shell[data-phase="complete"] .tee-sheet-panel {
  border-color: rgba(217, 238, 143, 0.24);
}

/* ── Dice Stack ── */

.dice-focus-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.control-panel[hidden],
.room-hub[hidden],
.roster-panel[hidden],
.room-chat-panel[hidden],
.room-code-card[hidden],
.share-bar[hidden],
.share-note[hidden] {
  display: none !important;
}

.dice-focus-stack {
  position: sticky;
  top: 72px;
}

.utility-button {
  color: var(--text-soft);
  border-color: rgba(233, 241, 220, 0.12);
}

.utility-button[aria-expanded="true"],
.utility-button.is-active {
  color: var(--text);
  border-color: rgba(217, 238, 143, 0.3);
  background: rgba(217, 238, 143, 0.08);
}

.header-utility-button {
  min-height: 38px;
  padding: 9px 14px;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ── Lobby Panels ── */

.lobby-panel {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

.lobby-panel-head {
  display: grid;
  gap: 6px;
}

.lobby-panel-head h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  letter-spacing: -0.04em;
}

.lobby-panel-note {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 0.88rem;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.round-admin {
  padding-top: 4px;
}

.control-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 0;
}

.control-group {
  display: grid;
  gap: 8px;
}

/* ── Room Hub ── */

.room-hub {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(217, 238, 143, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(
      180deg,
      rgba(217, 238, 143, 0.04),
      rgba(255, 255, 255, 0.015)
    ),
    rgba(8, 16, 11, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 40px rgba(0, 0, 0, 0.18);
}

.room-mode-head {
  display: grid;
  gap: 6px;
}

.room-mode-head h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: -0.05em;
}

.room-quick-actions {
  display: grid;
  gap: 16px;
}

.room-flow {
  display: grid;
  gap: 16px;
}

.room-flow[hidden] {
  display: none !important;
}

.room-mode-grid,
.room-inline-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#start-room-game-button {
  grid-column: 1 / -1;
  min-height: 54px;
}

.room-name-field {
  max-width: 460px;
}

.room-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(160px, 200px) auto;
  gap: 12px;
  align-items: end;
}

.room-host-bar,
.join-bar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.room-host-bar .room-code-card {
  grid-column: 1 / -1;
}

.room-host-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.create-room-cta,
.join-room-cta {
  min-height: 52px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
}

.join-code-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.room-hero {
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  border: 1px solid rgba(217, 238, 143, 0.24);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at left top,
      rgba(217, 238, 143, 0.12),
      transparent 60%
    ),
    rgba(8, 20, 12, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 44px rgba(0, 0, 0, 0.18);
}

.room-hero strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.24em;
  color: var(--accent);
}

.room-hero-status {
  margin: 0;
  max-width: 42ch;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 0.94rem;
}

.room-hero--joined {
  gap: 10px;
}

.lobby-video-module {
  position: relative;
  margin: 0;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid rgba(233, 241, 220, 0.1);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at top left,
      rgba(217, 238, 143, 0.12),
      transparent 42%
    ),
    linear-gradient(180deg, rgba(8, 18, 12, 0.92), rgba(6, 12, 9, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 50px rgba(0, 0, 0, 0.22);
  isolation: isolate;
}

.lobby-video-module::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 10, 6, 0.12), transparent 32%),
    linear-gradient(180deg, transparent 34%, rgba(4, 10, 6, 0.76) 100%);
  z-index: 1;
}

.lobby-video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  filter: saturate(0.82) brightness(0.84) contrast(1.02);
}

.lobby-video-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 4px;
  padding: 18px 18px 16px;
}

.lobby-video-caption strong,
.lobby-video-caption span {
  display: block;
}

.lobby-video-caption strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.lobby-video-caption span {
  color: rgba(243, 240, 232, 0.78);
  font-size: 0.88rem;
  line-height: 1.45;
}

.lobby-video-caption-label {
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  color: rgba(217, 238, 143, 0.76) !important;
}

.lobby-video-module--joined .lobby-video-caption strong {
  color: rgba(243, 240, 232, 0.96);
}

.page-shell[data-phase="play"] ~ .room-overlay .lobby-video-module,
.page-shell[data-phase="complete"] ~ .room-overlay .lobby-video-module {
  display: none;
}

.join-code-field {
  grid-column: 1 / 3;
}

.join-code-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  text-transform: uppercase;
}

.join-code-field input:focus-visible {
  outline: 2px solid rgba(217, 238, 143, 0.9);
  outline-offset: 3px;
}

.share-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding-top: 2px;
}

.room-link-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.room-link-copy a {
  color: rgba(233, 241, 220, 0.78);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.room-link-copy a:hover {
  color: var(--accent);
}

.room-link-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.share-note {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 0.85rem;
}

.room-inline-actions--host {
  gap: 10px 12px;
}

.join-bar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.join-bar .join-code-field {
  grid-column: auto;
}

.room-back-button {
  justify-self: start;
}

/* ── Match Banner ── */

.roster-panel {
  display: grid;
  gap: 14px;
  padding: 24px 22px;
  border: 1px solid rgba(233, 241, 220, 0.1);
  border-radius: 28px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02),
      rgba(255, 255, 255, 0.008)
    ),
    rgba(7, 14, 10, 0.4);
}

.roster-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.roster-copy {
  display: grid;
  gap: 4px;
}

.roster-copy h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.04em;
}

.roster-summary {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(233, 241, 220, 0.08);
}

.match-detail {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 0.88rem;
}

.match-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.85rem;
  white-space: nowrap;
  width: fit-content;
}

.match-pill.accent {
  border-color: rgba(217, 238, 143, 0.35);
  background: rgba(217, 238, 143, 0.12);
  color: var(--accent);
}

/* ── Selectors ── */

.round-selector,
.player-count-selector {
  display: grid;
  gap: 8px;
}

.round-selector {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-count-selector {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ── Player Cards ── */

.player-names {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 0;
}

.player-card {
  display: grid;
  gap: 8px;
  padding: 14px 15px;
  border: 1px solid rgba(233, 241, 220, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.player-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.player-card-identity {
  min-width: 0;
}

.player-card-identity--editable {
  flex: 1 1 auto;
}

.player-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
}

.player-card span {
  color: var(--text-soft);
  line-height: 1.4;
  font-size: 0.88rem;
}

.player-card.is-active {
  border-color: rgba(217, 238, 143, 0.22);
  background:
    linear-gradient(
      90deg,
      rgba(217, 238, 143, 0.08),
      rgba(217, 238, 143, 0.02)
    ),
    rgba(255, 255, 255, 0.02);
}

.player-card.is-local strong::after {
  content: " · You";
  color: var(--accent);
}

.player-name-edit {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.player-name-edit-label {
  color: rgba(217, 238, 143, 0.78);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.player-name-edit-input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(217, 238, 143, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
}

.player-name-edit-input:focus-visible {
  outline: 2px solid rgba(217, 238, 143, 0.85);
  outline-offset: 3px;
}

.player-card.is-open-seat {
  border-style: dashed;
  border-color: rgba(233, 241, 220, 0.14);
  background: rgba(255, 255, 255, 0.012);
}

.player-card.is-open-seat strong,
.player-card.is-open-seat span,
.player-card.is-open-seat .player-total-chip {
  color: var(--text-soft);
}

.player-tag,
.player-total-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.player-tag {
  border: 1px solid var(--line);
  color: var(--text-soft);
}

.player-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.player-total-chip {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sand);
}

.player-live-chip {
  background: rgba(217, 238, 143, 0.08);
  border: 1px solid rgba(217, 238, 143, 0.2);
  color: var(--text-soft);
}

.player-live-chip.is-live {
  border-color: rgba(217, 238, 143, 0.38);
  color: var(--accent);
}

.name-field {
  display: grid;
  gap: 6px;
}

.name-field label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.name-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.name-field input:focus-visible {
  outline: 2px solid rgba(217, 238, 143, 0.9);
  outline-offset: 3px;
}

/* ── Buttons ── */

.round-chip,
.par-chip,
.primary-button,
.secondary-button,
.ghost-button {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.round-chip,
.par-chip,
.primary-button,
.secondary-button,
.ghost-button {
  cursor: pointer;
  touch-action: manipulation;
}

.round-chip:hover,
.par-chip:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.round-chip,
.par-chip {
  padding: 12px 14px;
  border-radius: 16px;
  text-align: center;
}

.round-chip span,
.par-chip span {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.round-chip small,
.par-chip small {
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.round-chip.active,
.par-chip.active {
  border-color: rgba(217, 238, 143, 0.5);
  background: linear-gradient(
    180deg,
    rgba(217, 238, 143, 0.18),
    rgba(217, 238, 143, 0.08)
  );
}

/* ── Status Strip ── */

/* (status strip replaced by stage-status-bar inside dice-stage) */

/* ── Dice Stage ── */

.dice-stage {
  display: grid;
  gap: 0;
  border-radius: 32px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(217, 238, 143, 0.08),
      transparent 24%
    ),
    radial-gradient(
      circle at 78% 18%,
      rgba(255, 255, 255, 0.05),
      transparent 22%
    ),
    linear-gradient(
      180deg,
      var(--felt-bright) 0%,
      var(--felt) 50%,
      #0d2618 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 28px 64px rgba(0, 0, 0, 0.32);
  overflow: clip;
  perspective: 1100px;
}

.dice-board {
  position: relative;
  min-height: clamp(280px, 36vw, 420px);
  padding: 16px 28px 24px;
  --dice-box-roll-zoom: 1;
  --dice-box-roll-lift: 0%;
  --dice-box-roll-brightness: 1;
  transition: min-height 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.golf-green-scenery {
  position: absolute;
  inset: 6px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(
      circle at 74% 28%,
      rgba(230, 247, 175, 0.28),
      rgba(230, 247, 175, 0.06) 16%,
      transparent 30%
    ),
    radial-gradient(circle at 26% 72%, rgba(9, 26, 16, 0.3), transparent 34%),
    repeating-linear-gradient(
      -18deg,
      rgba(94, 155, 88, 0.2) 0 24px,
      rgba(58, 118, 61, 0.08) 24px 48px
    ),
    linear-gradient(180deg, #63b05d 0%, #3b8146 48%, #275c34 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -18px 34px rgba(4, 16, 9, 0.18);
}

.golf-green-scenery::before,
.golf-green-scenery::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
}

.golf-green-scenery::before {
  left: -6%;
  right: 18%;
  top: 8%;
  bottom: 20%;
  border: 1px solid rgba(235, 249, 191, 0.12);
  transform: rotate(-8deg);
  opacity: 0.55;
}

.golf-green-scenery::after {
  left: 8%;
  right: -2%;
  top: 24%;
  bottom: -8%;
  border: 1px solid rgba(19, 58, 31, 0.22);
  transform: rotate(9deg);
  opacity: 0.5;
}

.golf-green-ridge {
  position: absolute;
  display: block;
  border-radius: 999px;
  border: 1px solid rgba(240, 251, 199, 0.12);
  opacity: 0.65;
}

.golf-green-ridge--left {
  inset: 18% 42% 26% 4%;
  transform: rotate(-10deg);
}

.golf-green-ridge--right {
  inset: 10% 6% 30% 48%;
  transform: rotate(14deg);
  opacity: 0.4;
}

.golf-hole-shadow,
.golf-hole-cup,
.golf-flagstick,
.golf-flag-banner {
  position: absolute;
  display: block;
}

.golf-hole-shadow {
  right: 17%;
  top: 31%;
  width: 56px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(
    ellipse at center,
    rgba(6, 15, 8, 0.42),
    rgba(6, 15, 8, 0.1) 62%,
    transparent 74%
  );
  transform: translateX(-2px);
}

.golf-hole-cup {
  right: 20%;
  top: 28%;
  width: 24px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(4, 12, 6, 0.95) 0 38%,
    rgba(90, 56, 23, 0.8) 39% 58%,
    rgba(191, 225, 145, 0.38) 59% 100%
  );
  box-shadow:
    0 2px 0 rgba(239, 251, 203, 0.1),
    inset 0 2px 3px rgba(0, 0, 0, 0.42);
}

.golf-flagstick {
  right: calc(20% + 11px);
  top: calc(28% - 56px);
  width: 3px;
  height: 62px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f4f0df 0%, #c6b898 100%);
  box-shadow: 0 0 0 1px rgba(5, 12, 6, 0.08);
  transform-origin: bottom center;
  transform: rotate(4deg);
}

.golf-flag-banner {
  right: calc(20% + 11px);
  top: calc(28% - 56px);
  width: 34px;
  height: 24px;
  border-radius: 3px 10px 10px 3px;
  background: linear-gradient(
    180deg,
    #fff4d4 0%,
    #ffd873 24%,
    #e95742 24%,
    #d84132 100%
  );
  clip-path: polygon(0 0, 100% 0, 76% 50%, 100% 100%, 0 100%);
  box-shadow:
    0 10px 16px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transform-origin: left center;
  transform: translate(1px, -2px) rotate(-2deg);
}

@media (max-width: 720px) {
  .dice-board {
    min-height: 336px;
    padding: 16px 18px 24px;
  }

  .dice-box-layer {
    inset: 8px 8px 10px;
  }

  .dice-board.is-dice-box-active {
    min-height: 404px;
  }

  .golf-hole-shadow {
    right: 8%;
    top: 56%;
    width: 40px;
    height: 18px;
  }

  .golf-hole-cup {
    right: 10%;
    top: 52%;
    width: 18px;
    height: 12px;
  }

  .golf-flagstick {
    right: calc(10% + 8px);
    top: calc(52% - 42px);
    height: 48px;
  }

  .golf-flag-banner {
    right: calc(10% + 8px);
    top: calc(52% - 42px);
    width: 24px;
    height: 18px;
  }
}

.dice-box-layer {
  position: absolute;
  inset: 6px 6px 8px;
  z-index: 2;
  pointer-events: none;
  border-radius: 20px;
  overflow: hidden;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center center;
  filter: brightness(1);
  transition:
    opacity 180ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 260ms ease;
  will-change: transform, opacity, filter;
}

.dice-box-layer--hidden {
  opacity: 0;
}

.dice-board.is-dice-box-active .dice-box-layer {
  transform: translate3d(0, var(--dice-box-roll-lift), 0)
    scale(var(--dice-box-roll-zoom));
  filter: brightness(var(--dice-box-roll-brightness));
}

.dice-board.has-dice-box-display {
  --dice-display-scale: 1.18;
  --dice-display-y: 40px;
  --dice-selector-top: 132px;
  --dice-selector-bottom: 28px;
  min-height: clamp(360px, 46vw, 540px);
}

.dice-board.has-dice-box-display:not(.is-dice-box-active) .dice-box-layer {
  transform: translate3d(0, var(--dice-display-y), 0)
    scale(var(--dice-display-scale));
  filter: brightness(1.04) saturate(1.02);
}

.dice-board.is-dice-box-active {
  min-height: clamp(360px, 46vw, 540px);
}

.dice-box-layer canvas,
.dice-box-layer .dice-box-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.dice-stage-header {
  display: grid;
  gap: 10px;
  padding: 18px 22px 14px;
}

.stage-status-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stage-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}

.stage-stat .status-label {
  font-size: 0.62rem;
  color: rgba(243, 240, 232, 0.5);
}

.stage-stat strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  color: var(--text);
}

.stage-context {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.stage-context strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.dice-owner-detail {
  color: rgba(243, 240, 232, 0.6);
  font-size: 0.82rem;
  text-align: right;
  white-space: nowrap;
}

/* ── Dice Stage Footer ── */

.dice-stage-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px 22px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.14);
}

.stage-score {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.stage-score-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(243, 240, 232, 0.5);
  white-space: nowrap;
}

.stage-score-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stage-score-note {
  color: rgba(243, 240, 232, 0.55);
  font-size: 0.82rem;
  line-height: 1.4;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dice-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 16px;
  perspective: 760px;
  transform-style: preserve-3d;
}

.dice-board.is-dice-box-active .dice-grid {
  min-height: inherit;
}

/* ── Dice ── */

.die {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  --die-depth: clamp(24px, 4vw, 38px);
  border: 0;
  background: transparent;
  padding: 0;
  perspective: 720px;
  transform-origin: 50% 78%;
  transform-style: preserve-3d;
  will-change: transform, filter;
  overflow: visible;
  transition:
    transform 140ms ease-out,
    box-shadow 180ms ease-out,
    filter 180ms ease-out;
  min-width: 0;
  min-height: 0;
}

.die::before {
  content: "";
  position: absolute;
  inset: auto 15% -12px;
  height: 20px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(5, 12, 8, 0.34) 0%,
    rgba(5, 12, 8, 0) 72%
  );
  transform: scale(0.72);
  transform-origin: center;
  opacity: 0.18;
  pointer-events: none;
  transition:
    transform 180ms ease-out,
    opacity 180ms ease-out;
}

.die-placeholder {
  display: grid;
  place-items: center;
  opacity: 0.42;
}

.die-placeholder-shell {
  position: absolute;
  inset: 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(
      145deg,
      rgba(245, 241, 231, 0.8) 0%,
      rgba(217, 195, 155, 0.58) 100%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(8, 20, 12, 0.08));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    0 18px 32px rgba(0, 0, 0, 0.16);
}

.die-cube {
  position: absolute;
  inset: 8px;
  transform-style: preserve-3d;
  transform:
    rotateX(var(--cube-camera-x, -18deg))
    rotateY(var(--cube-camera-y, 22deg))
    rotateZ(var(--cube-camera-z, -8deg))
    rotateX(var(--cube-to-x, 0deg))
    rotateY(var(--cube-to-y, 0deg))
    rotateZ(var(--cube-to-z, 0deg));
  will-change: transform;
  transition: filter 180ms ease-out;
}

.die-face {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.22),
      transparent 32%
    ),
    linear-gradient(145deg, #f9f5ea 0%, #dfc89f 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -10px 18px rgba(98, 72, 24, 0.08),
    0 0 0 1px rgba(12, 18, 12, 0.06);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  padding: 16px;
  backface-visibility: hidden;
}

.die-face--front {
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.24),
      transparent 32%
    ),
    linear-gradient(145deg, #fff8eb 0%, #ead3a8 100%);
  transform: translateZ(var(--die-depth));
}

.die-face--back {
  transform: rotateY(180deg) translateZ(var(--die-depth));
  filter: brightness(0.78) saturate(0.92);
}

.die-face--right {
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.16),
      transparent 34%
    ),
    linear-gradient(145deg, #efd9ae 0%, #ccae7e 100%);
  transform: rotateY(90deg) translateZ(var(--die-depth));
}

.die-face--left {
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.16),
      transparent 34%
    ),
    linear-gradient(145deg, #ebd3a8 0%, #c6a776 100%);
  transform: rotateY(-90deg) translateZ(var(--die-depth));
  filter: brightness(0.9);
}

.die-face--top {
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.2),
      transparent 34%
    ),
    linear-gradient(145deg, #f7e3bb 0%, #d7bb8c 100%);
  transform: rotateX(90deg) translateZ(var(--die-depth));
}

.die-face--bottom {
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.14),
      transparent 36%
    ),
    linear-gradient(145deg, #e6cb99 0%, #c09d67 100%);
  transform: rotateX(-90deg) translateZ(var(--die-depth));
  filter: brightness(0.82);
}

.dice-grid.is-rolling .die:not(.held) {
  animation: die-roll-path var(--roll-duration, 880ms)
    cubic-bezier(0.16, 0.84, 0.24, 1) both;
  animation-delay: var(--roll-stagger, 0ms);
  filter: saturate(1.12) brightness(1.02);
}

.dice-grid.is-rolling .die:not(.held)::before {
  opacity: 0.34;
  animation: die-shadow-loop var(--roll-duration, 880ms)
    cubic-bezier(0.16, 0.84, 0.24, 1) both;
  animation-delay: var(--roll-stagger, 0ms);
}

.dice-grid.is-rolling .die:not(.held) .die-cube {
  animation: die-cube-roll var(--roll-duration, 880ms)
    cubic-bezier(0.14, 0.88, 0.24, 1) both;
  animation-delay: var(--roll-stagger, 0ms);
  filter: blur(0.3px) saturate(1.04);
}

.dice-grid.is-settling .die.is-settling:not(.held) {
  animation: die-settle var(--settle-duration, 340ms)
    cubic-bezier(0.16, 0.84, 0.26, 1.05) both;
}

.dice-grid.is-settling .die.is-settling:not(.held)::before {
  animation: die-shadow-settle var(--settle-duration, 340ms)
    cubic-bezier(0.2, 0.82, 0.26, 1) both;
}

.dice-grid.is-settling .die.is-settling:not(.held) .die-cube {
  animation: die-cube-settle var(--settle-duration, 340ms)
    cubic-bezier(0.18, 0.82, 0.24, 1.02) both;
  filter: blur(0);
}

.die-button {
  appearance: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    border-color 180ms ease;
  touch-action: manipulation;
}

.die-button:not(.is-rolling):not(.is-settling):hover {
  transform: translateY(-2px);
}

.die-button:focus-visible {
  outline: 2px solid rgba(217, 238, 143, 0.9);
  outline-offset: 4px;
}

.die-button.held {
  box-shadow:
    0 0 0 3px rgba(217, 238, 143, 0.22),
    0 18px 30px rgba(0, 0, 0, 0.2);
  filter: none;
}

.dice-board.is-dice-box-active .die-button.held {
  z-index: 3;
}

.die-button.held .die-cube {
  filter: none;
}

.die-button.held .die-face {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.12),
      transparent 34%
    ),
    linear-gradient(145deg, #3f4548 0%, #090d0f 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.1),
    inset 0 -14px 22px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.02);
}

.die-button.held .die-face--back,
.die-button.held .die-face--left,
.die-button.held .die-face--bottom {
  filter: brightness(0.82);
}

.die-button.held .die-face--right,
.die-button.held .die-face--top {
  filter: brightness(0.92);
}

.die-button.held .pip {
  background: radial-gradient(
    circle at 34% 30%,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(244, 246, 239, 0.97) 42%,
    rgba(208, 214, 203, 0.96) 100%
  );
  box-shadow:
    inset 0 0.9px 1px rgba(255, 255, 255, 0.82),
    inset 0 -1.2px 1.6px rgba(61, 72, 62, 0.24),
    0 0 0 0.7px rgba(255, 255, 255, 0.28),
    0 0.8px 1.5px rgba(17, 28, 20, 0.22);
}

.die-button.held .pip::before {
  background:
    radial-gradient(
      circle at 32% 30%,
      rgba(255, 255, 255, 0.58) 0%,
      transparent 24%
    ),
    radial-gradient(
      circle at 68% 34%,
      rgba(95, 108, 98, 0.16) 0%,
      transparent 15%
    ),
    radial-gradient(
      circle at 42% 67%,
      rgba(95, 108, 98, 0.14) 0%,
      transparent 16%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(95, 108, 98, 0.12) 0%,
      transparent 14%
    );
}

.die-button.held::after {
  content: "Held";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(8, 20, 12, 0.88);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.die-button:disabled {
  cursor: default;
  opacity: 1;
}

.die.is-hidden-for-roll {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

.pip {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  align-self: center;
  justify-self: center;
  border-radius: 999px;
  overflow: hidden;
  background: radial-gradient(
    circle at 34% 30%,
    rgba(82, 90, 84, 0.98) 0%,
    rgba(36, 42, 39, 0.98) 42%,
    rgba(7, 10, 8, 0.99) 100%
  );
  box-shadow:
    inset 0 0.9px 1px rgba(164, 172, 166, 0.34),
    inset 0 -1.4px 1.8px rgba(0, 0, 0, 0.42),
    0 0 0 0.7px rgba(255, 255, 255, 0.18),
    0 0.8px 1.5px rgba(17, 28, 20, 0.26);
  opacity: 0;
  transform: scale(0.42);
}

.pip::before {
  content: "";
  position: absolute;
  inset: 17%;
  border-radius: 999px;
  background:
    radial-gradient(
      circle at 32% 30%,
      rgba(224, 230, 225, 0.2) 0%,
      transparent 24%
    ),
    radial-gradient(
      circle at 68% 34%,
      rgba(192, 199, 194, 0.14) 0%,
      transparent 15%
    ),
    radial-gradient(
      circle at 42% 67%,
      rgba(196, 204, 198, 0.12) 0%,
      transparent 16%
    ),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.16) 0%, transparent 14%);
  opacity: 0;
}

.pip.active {
  opacity: 1;
  transform: scale(0.45);
}

.pip.active::before {
  opacity: 1;
}

/* ── Action Row ── */

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.action-row > * {
  min-width: 0;
}

.pregame-invite-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(217, 238, 143, 0.2);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at top right,
      rgba(217, 238, 143, 0.12),
      transparent 28%
    ),
    linear-gradient(
      180deg,
      rgba(217, 238, 143, 0.08),
      rgba(255, 255, 255, 0.02)
    );
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pregame-invite-panel[hidden],
.pregame-invite-link[hidden],
.pregame-invite-code[hidden] {
  display: none !important;
}

.pregame-invite-copy {
  display: grid;
  gap: 8px;
}

.pregame-invite-copy strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: -0.04em;
  color: var(--text);
}

.pregame-invite-copy p:not(.section-label) {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 0.9rem;
}

.pregame-invite-link {
  display: inline-block;
  max-width: 100%;
  color: var(--accent);
  font-size: 0.84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.pregame-invite-code {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 238, 143, 0.18);
  background: rgba(6, 18, 11, 0.42);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pregame-invite-actions {
  display: grid;
  min-width: min(240px, 100%);
}

.pregame-invite-actions .primary-button {
  min-height: 58px;
  padding-inline: 22px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.primary-button,
.secondary-button,
.ghost-button {
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  min-height: 44px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    filter 180ms ease;
}

.primary-button {
  background: linear-gradient(180deg, var(--accent) 0%, #b7d971 100%);
  color: #102313;
  border-color: transparent;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
}

.ghost-button {
  background: transparent;
}

#roll-button {
  width: 100%;
  min-height: 66px;
  padding: 16px 26px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.05rem, 1.9vw, 1.28rem);
  letter-spacing: 0.02em;
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

#score-button {
  width: 100%;
  min-height: 66px;
  padding: 16px 26px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  letter-spacing: 0.02em;
  border: 1px solid rgba(233, 241, 220, 0.18);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

#roll-button,
#score-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-align: center;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

#score-button.is-score-ready {
  background: linear-gradient(180deg, #eef7c5 0%, #cfe68a 100%);
  color: #102313;
  border-color: transparent;
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

#score-button.is-score-ready:not(:disabled):hover,
#roll-button:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.result-banner {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 0.9rem;
}

.result-banner.good {
  border-color: rgba(217, 238, 143, 0.3);
  color: var(--accent);
}

.result-banner.warn {
  border-color: rgba(255, 192, 178, 0.24);
  color: var(--danger);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ── Animations ── */

@keyframes die-roll-path {
  0% {
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    filter: blur(0) saturate(1);
  }
  14% {
    transform: var(
      --die-roll-step-1-transform,
      translate3d(0, 0, 0) scale3d(1, 1, 1)
    );
    filter: var(--die-roll-step-1-filter, blur(0) saturate(1));
  }
  34% {
    transform: var(
      --die-roll-step-2-transform,
      translate3d(0, 0, 0) scale3d(1, 1, 1)
    );
    filter: var(--die-roll-step-2-filter, blur(0) saturate(1));
  }
  56% {
    transform: var(
      --die-roll-step-3-transform,
      translate3d(0, 0, 0) scale3d(1, 1, 1)
    );
    filter: var(--die-roll-step-3-filter, blur(0) saturate(1));
  }
  78% {
    transform: var(
      --die-roll-step-4-transform,
      translate3d(0, 0, 0) scale3d(1, 1, 1)
    );
    filter: var(--die-roll-step-4-filter, blur(0) saturate(1));
  }
  100% {
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    filter: blur(0) saturate(1);
  }
}

@keyframes die-cube-roll {
  0% {
    transform: var(
      --die-cube-roll-from,
      rotateX(0deg) rotateY(0deg) rotateZ(0deg)
    );
  }
  18% {
    transform: var(
      --die-cube-roll-step-1,
      rotateX(180deg) rotateY(180deg) rotateZ(90deg)
    );
  }
  52% {
    transform: var(
      --die-cube-roll-step-2,
      rotateX(540deg) rotateY(540deg) rotateZ(180deg)
    );
  }
  78% {
    transform: var(
      --die-cube-roll-step-3,
      rotateX(90deg) rotateY(90deg) rotateZ(24deg)
    );
  }
  100% {
    transform: var(
      --die-cube-roll-to,
      rotateX(0deg) rotateY(0deg) rotateZ(0deg)
    );
  }
}

@keyframes die-shadow-loop {
  0% {
    opacity: 0.16;
    transform: translateX(0) scale(0.74);
  }
  30% {
    opacity: 0.38;
    transform: var(--die-shadow-step-1-transform, translateX(8px) scale(1.04));
  }
  62% {
    opacity: 0.2;
    transform: var(--die-shadow-step-2-transform, translateX(-4px) scale(0.88));
  }
  82% {
    opacity: 0.3;
    transform: var(--die-shadow-step-3-transform, translateX(2px) scale(0.98));
  }
  100% {
    opacity: 0.18;
    transform: translateX(0) scale(0.76);
  }
}

@keyframes die-settle {
  0% {
    transform: translate3d(calc(var(--roll-drift-x, 0px) * 0.08), 4px, 0)
      scale3d(1.04, 0.92, 1);
  }
  46% {
    transform: translate3d(0, -4px, 0) scale3d(0.98, 1.02, 1);
  }
  72% {
    transform: translate3d(0, 2px, 0) scale3d(1.01, 0.99, 1);
  }
  100% {
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
  }
}

@keyframes die-cube-settle {
  0% {
    transform: var(
      --die-cube-settle-from,
      rotateX(10deg) rotateY(-8deg) rotateZ(6deg)
    );
  }
  46% {
    transform: var(
      --die-cube-settle-step-1,
      rotateX(-4deg) rotateY(3deg) rotateZ(-2deg)
    );
  }
  72% {
    transform: var(
      --die-cube-settle-step-2,
      rotateX(1deg) rotateY(-1deg) rotateZ(1deg)
    );
  }
  100% {
    transform: var(
      --die-cube-settle-to,
      rotateX(0deg) rotateY(0deg) rotateZ(0deg)
    );
  }
}

@keyframes die-shadow-settle {
  0% {
    opacity: 0.32;
    transform: var(--die-shadow-settle-from, translateX(1px) scale(1.04));
  }
  42% {
    opacity: 0.18;
    transform: var(--die-shadow-settle-step-1, translateX(-1px) scale(0.88));
  }
  72% {
    opacity: 0.24;
    transform: var(--die-shadow-settle-step-2, translateX(0px) scale(0.94));
  }
  100% {
    opacity: 0.18;
    transform: translateX(0) scale(0.76);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dice-grid.is-rolling .die,
  .dice-grid.is-rolling .die::before,
  .dice-grid.is-rolling .die .die-cube,
  .dice-grid.is-settling .die,
  .dice-grid.is-settling .die::before,
  .dice-grid.is-settling .die .die-cube {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
  }
}

/* ── Responsive ── */

@media (max-width: 780px) {
  .brand-bar-inner {
    width: min(100% - 14px, 100%);
    padding: 12px 0;
  }

  .brand-tagline {
    display: none;
  }

  .page-shell {
    width: min(100% - 14px, 100%);
    padding-top: 14px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .tee-sheet-panel,
  .play-surface {
    padding: 16px;
  }

  .tee-sheet-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .experience-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dice-focus-stack {
    position: static;
  }

  .overlay-shell {
    padding: 14px;
  }

  .overlay-panel,
  .overlay-panel--setup {
    width: min(100vw - 24px, 100%);
    max-height: calc(100vh - 24px);
    padding: 20px;
    border-radius: 26px;
  }

  .overlay-body--room {
    grid-template-columns: 1fr;
  }

  .overlay-body--tutorial,
  .overlay-body--instructions {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "aside"
      "main";
  }

  .manual-hero {
    padding: 20px 20px 18px;
  }

  .tutorial-board,
  .tutorial-board--summary,
  .manual-hero-strip,
  .manual-flow-grid,
  .manual-rule-band--grid,
  .manual-tip-grid {
    grid-template-columns: 1fr;
  }

  .manual-par-grid {
    grid-template-columns: 1fr;
  }

  .manual-aside {
    order: 1;
  }

  .manual-main {
    order: 2;
  }

  .manual-side-card {
    position: static;
  }

  .tutorial-rail {
    border-right: 0;
    border-bottom: 1px solid rgba(233, 241, 220, 0.08);
  }

  .tutorial-stage {
    padding-top: 22px;
  }

  .control-bar {
    grid-template-columns: 1fr;
  }

  .room-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .share-bar {
    grid-template-columns: 1fr;
  }

  .room-link-actions {
    justify-content: flex-start;
  }

  .roster-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .dice-stage-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dice-owner-detail {
    text-align: left;
  }

  .tee-sheet-wrap {
    border-radius: 20px;
  }
}

@media (max-width: 620px) {
  .brand-bar-inner {
    width: min(100% - 10px, 100%);
    padding: 10px 0;
  }

  .brand-meta {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .brand-actions {
    gap: 8px;
  }

  .tutorial-status-badge {
    order: -1;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .brand-logo {
    padding: 5px;
    border-radius: 8px;
  }

  .brand-pip {
    width: 6px;
    height: 6px;
  }

  .brand-logo {
    grid-template-columns: repeat(3, 6px);
    gap: 2px;
  }

  .brand-phase-chip {
    padding: 4px 10px;
    font-size: 0.74rem;
  }

  #score-total {
    font-size: 0.82rem;
  }

  .page-shell {
    width: min(100% - 10px, 100%);
    gap: 10px;
    padding-top: 10px;
  }

  .tee-sheet-panel {
    border-radius: 22px;
    padding: 14px 14px 12px;
  }

  .tee-sheet-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .tee-sheet-header h2 {
    font-size: 1.2rem;
  }

  .tee-sheet-wrap {
    border-radius: 18px;
    scrollbar-width: thin;
  }

  .tee-sheet th,
  .tee-sheet td,
  .tee-sheet tfoot td {
    padding: 10px 8px;
    font-size: 0.82rem;
  }

  .tee-sheet th {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
  }

  .tee-sheet th:first-child,
  .tee-sheet td:first-child,
  .tee-sheet tfoot td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: rgba(8, 19, 12, 0.96);
  }

  .tee-sheet th:first-child,
  .tee-sheet tfoot td:first-child {
    z-index: 2;
  }

  .tee-sheet td:first-child {
    box-shadow: 10px 0 18px rgba(4, 10, 6, 0.18);
  }

  .live-score-stack small {
    font-size: 0.52rem;
  }

  .play-surface {
    border-radius: 24px;
    padding: 14px 12px 16px;
  }

  .dice-focus-stack {
    display: grid;
    gap: 10px;
  }

  .overlay-shell {
    padding: 12px;
  }

  .overlay-panel,
  .overlay-panel--setup {
    width: 100%;
    max-height: calc(100vh - 16px);
    padding: 16px;
    border-radius: 24px;
  }

  .overlay-panel--instructions {
    padding: 0;
  }

  .overlay-panel--tutorial {
    padding: 0;
  }

  .overlay-header {
    gap: 12px;
  }

  .overlay-header--instructions {
    padding: 18px 18px 14px;
  }

  .overlay-header--tutorial {
    padding: 18px 18px 14px;
  }

  .overlay-copy h2 {
    font-size: 1.35rem;
  }

  .overlay-note {
    font-size: 0.84rem;
  }

  .overlay-body--instructions {
    padding: 18px;
    gap: 20px;
  }

  .overlay-body--tutorial {
    gap: 0;
  }

  .manual-chip-row {
    gap: 8px;
  }

  .manual-hero-actions {
    align-items: flex-start;
  }

  .manual-chip {
    min-height: 32px;
    padding: 7px 11px;
    font-size: 0.78rem;
  }

  .manual-hero-button,
  .tutorial-nav-button {
    width: 100%;
    min-width: 0;
  }

  .manual-section-head h3,
  .manual-side-card h3 {
    font-size: 1.04rem;
  }

  .manual-par-card,
  .manual-side-card {
    padding: 16px;
    border-radius: 20px;
  }

  .manual-example {
    flex-direction: column;
    align-items: flex-start;
  }

  .manual-example-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .tutorial-header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .tutorial-header-actions .ghost-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .tutorial-rail,
  .tutorial-stage {
    padding: 18px;
  }

  .tutorial-step-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .tutorial-dice-row {
    gap: 10px;
  }

  .tutorial-die {
    width: 78px;
    padding: 10px 8px 9px;
  }

  .tutorial-die-face {
    width: 56px;
    height: 56px;
    padding: 8px;
  }

  .tutorial-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .control-group {
    gap: 6px;
  }

  .round-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-count-selector {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .round-chip,
  .par-chip {
    padding: 10px 8px;
    border-radius: 14px;
  }

  .round-chip span,
  .par-chip span {
    font-size: 1rem;
  }

  .round-chip small,
  .par-chip small {
    font-size: 0.68rem;
  }

  .room-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
  }

  .room-hub {
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
  }

  .lobby-panel {
    gap: 12px;
    padding: 0;
    border-radius: 20px;
  }

  .lobby-panel-head h3 {
    font-size: 1rem;
  }

  .room-host-panel,
  .join-code-field {
    grid-column: 1 / -1;
  }

  #copy-room-code-button,
  #join-room-button {
    width: 100%;
    min-width: 0;
  }

  .room-hero,
  .roster-panel,
  .result-banner,
  .lobby-video-module {
    border-radius: 16px;
  }

  .room-hero {
    padding: 16px 18px;
  }

  .room-hero strong {
    font-size: 1.8rem;
    letter-spacing: 0.18em;
  }

  .room-hero-status {
    font-size: 0.88rem;
  }

  .lobby-video-module,
  .lobby-video {
    min-height: 188px;
  }

  .lobby-video-caption {
    padding: 16px 16px 14px;
  }

  .join-code-field input,
  .name-field input {
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 14px;
  }

  .share-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .room-link-copy {
    gap: 6px;
  }

  .room-link-copy a {
    font-size: 0.82rem;
  }

  .room-link-actions {
    width: 100%;
    justify-content: stretch;
  }

  .room-link-actions .primary-button,
  .room-link-actions .secondary-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .roster-copy h3 {
    font-size: 1.1rem;
  }

  .match-detail {
    font-size: 0.82rem;
  }

  .roster-summary {
    padding-bottom: 10px;
  }

  .match-pill {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.78rem;
    white-space: normal;
  }

  .player-names {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .player-card {
    padding: 10px;
    border-color: rgba(233, 241, 220, 0.09);
    background: rgba(255, 255, 255, 0.02);
  }

  .name-field label {
    font-size: 0.64rem;
    letter-spacing: 0.12em;
  }

  .status-label {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }

  .dice-stage {
    border-radius: 24px;
    border-color: rgba(217, 238, 143, 0.22);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 24px 50px rgba(2, 8, 4, 0.28);
  }

  .dice-stage-header {
    padding: 14px 14px 10px;
    gap: 8px;
  }

  .stage-status-bar {
    gap: 4px;
    justify-content: center;
  }

  .stage-stat {
    padding: 4px 10px;
    font-size: 0.76rem;
  }

  .stage-stat .status-label {
    font-size: 0.56rem;
  }

  .stage-stat strong {
    font-size: 0.8rem;
  }

  .stage-context {
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
  }

  .stage-context strong {
    font-size: 1.05rem;
  }

  .dice-owner-detail {
    width: 100%;
    font-size: 0.74rem;
    text-align: center;
  }

  .dice-stage-footer {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px 16px;
  }

  .stage-score {
    justify-content: center;
    gap: 8px;
  }

  .stage-score-value {
    font-size: 1.6rem;
  }

  .stage-score-note {
    font-size: 0.76rem;
  }

  .dice-grid {
    display: grid;
    justify-content: center;
    justify-items: center;
    align-content: start;
    gap: 12px 14px;
    max-width: 312px;
    margin-inline: auto;
    padding: 6px 14px 12px;
  }

  .die {
    --die-depth: 22px;
    flex: none;
    width: 100%;
  }

  .dice-grid[data-dice-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 86px));
    max-width: 300px;
  }

  .dice-grid[data-dice-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 104px));
    max-width: 252px;
  }

  .dice-grid[data-dice-count="5"] {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-width: 312px;
  }

  .dice-grid[data-dice-count="5"] > .die {
    grid-column: span 2;
  }

  .dice-grid[data-dice-count="5"] > .die:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .dice-grid[data-dice-count="5"] > .die:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .die-cube {
    inset: 6px;
  }

  .die-face {
    border-radius: 16px;
    gap: 6px;
    padding: 12px;
  }

  .die-button.held::after {
    top: 7px;
    right: 7px;
    padding: 3px 7px;
    font-size: 0.6rem;
  }

  .result-banner,
  .share-note {
    font-size: 0.84rem;
  }

  .action-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .action-row .primary-button,
  .action-row .secondary-button {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 12px 14px;
  }

  .pregame-invite-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .pregame-invite-actions {
    min-width: 0;
  }

  .utility-button {
    width: auto;
  }

  .header-utility-button {
    min-height: 36px;
    padding: 8px 12px;
  }

  .header-link-button {
    padding: 7px 0;
    font-size: 0.76rem;
  }

  .result-banner {
    padding: 10px 12px;
    border-color: rgba(233, 241, 220, 0.09);
    background: rgba(255, 255, 255, 0.02);
  }

  .control-bar {
    gap: 10px;
  }

  .room-hub {
    gap: 10px;
    padding: 12px;
    border-color: rgba(217, 238, 143, 0.1);
    background:
      linear-gradient(
        135deg,
        rgba(217, 238, 143, 0.04),
        rgba(255, 255, 255, 0.01)
      ),
      rgba(255, 255, 255, 0.015);
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .top-actions .ghost-button {
    width: 100%;
  }

  .room-hero,
  .roster-panel {
    border-color: rgba(233, 241, 220, 0.09);
  }
}

@media (max-width: 480px) {
  .dice-board {
    min-height: 324px;
    padding: 14px 16px 22px;
  }

  .dice-box-layer {
    inset: 8px 8px 10px;
  }

  .dice-board.is-dice-box-active {
    min-height: 388px;
  }

  .brand-bar-inner {
    width: min(100% - 8px, 100%);
    padding: 8px 0;
  }

  .brand-actions {
    gap: 6px 10px;
  }

  .header-link-button {
    font-size: 0.72rem;
  }

  .page-shell {
    width: min(100% - 8px, 100%);
    padding-top: 8px;
  }

  .tee-sheet-panel,
  .play-surface {
    border-radius: 20px;
    padding: 12px 10px;
  }

  .tee-sheet-panel {
    margin-bottom: 0;
  }

  .tee-sheet-header h2 {
    font-size: 1.1rem;
  }

  .tee-sheet-wrap {
    border-radius: 16px;
  }

  .tee-sheet th,
  .tee-sheet td,
  .tee-sheet tfoot td {
    padding: 9px 7px;
    font-size: 0.76rem;
  }

  .tee-sheet td.score-cell {
    font-size: 0.96rem;
  }

  .control-bar,
  .share-bar,
  .top-actions {
    gap: 6px;
  }

  .roster-panel,
  .lobby-panel,
  .room-hub,
  .result-banner,
  .lobby-video-module {
    border-radius: 14px;
  }

  .overlay-shell {
    padding: 8px;
  }

  .overlay-panel,
  .overlay-panel--setup {
    max-height: calc(100vh - 8px);
    padding: 14px;
    border-radius: 20px;
  }

  .overlay-header {
    flex-direction: column;
    align-items: stretch;
  }

  .overlay-close {
    width: 100%;
  }

  .room-hub {
    padding: 14px;
  }

  .room-bar {
    grid-template-columns: 1fr;
  }

  .room-host-panel,
  .join-code-field,
  #copy-room-code-button,
  #join-room-button {
    grid-column: auto;
  }

  .create-room-cta,
  .join-room-cta {
    min-height: 48px;
    font-size: 0.92rem;
  }

  .lobby-video-module,
  .lobby-video {
    min-height: 172px;
  }

  .lobby-video-caption {
    gap: 3px;
    padding: 14px 14px 12px;
  }

  .lobby-video-caption strong {
    font-size: 0.96rem;
  }

  .lobby-video-caption span {
    font-size: 0.82rem;
  }

  .player-names {
    grid-template-columns: 1fr;
  }

  .room-mode-grid,
  .room-inline-actions {
    grid-template-columns: 1fr;
  }

  .room-link-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .room-link-actions .primary-button,
  .room-link-actions .secondary-button {
    width: 100%;
  }

  .round-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-count-selector {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .round-chip,
  .par-chip {
    min-height: 44px;
    padding: 10px 8px;
  }

  .dice-stage-footer {
    padding: 10px 12px 14px;
  }

  .stage-score-value {
    font-size: 1.5rem;
  }

  .dice-grid {
    gap: 10px 12px;
    max-width: 286px;
    padding: 6px 12px 10px;
  }

  .die {
    --die-depth: 20px;
    width: 100%;
  }

  .dice-grid[data-dice-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 78px));
    max-width: 264px;
  }

  .dice-grid[data-dice-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 92px));
    max-width: 224px;
  }

  .dice-grid[data-dice-count="5"] {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-width: 282px;
  }

  .dice-grid[data-dice-count="5"] > .die {
    grid-column: span 2;
  }

  .dice-grid[data-dice-count="5"] > .die:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .dice-grid[data-dice-count="5"] > .die:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .die-cube {
    inset: 5px;
  }

  .die-face {
    border-radius: 14px;
    gap: 5px;
    padding: 10px;
  }

  .action-row {
    grid-template-columns: 1fr;
  }

  .action-row .primary-button,
  .action-row .secondary-button {
    min-height: 50px;
  }

  .pregame-invite-actions .primary-button {
    min-height: 50px;
  }
}

@media (max-width: 720px) {
  .room-chat-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .room-chat-status {
    width: fit-content;
  }

  .room-chat-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .room-chat-form button {
    width: 100%;
  }

  .room-chat-log,
  .room-chat-log--compact {
    max-height: 200px;
  }

  .room-chat-message {
    width: 100%;
  }
}

/* ===== Premium Clubhouse Redesign Overrides ===== */

:root {
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --club-bg: #04110c;
  --club-bg-deep: #071a13;
  --club-bg-forest: #0d2a1d;
  --club-panel: rgba(8, 23, 17, 0.68);
  --club-panel-strong: rgba(5, 16, 12, 0.82);
  --club-panel-soft: rgba(255, 250, 236, 0.06);
  --club-line: rgba(216, 191, 140, 0.18);
  --club-line-strong: rgba(216, 191, 140, 0.34);
  --club-gold: #d9bf8d;
  --club-gold-soft: rgba(216, 191, 140, 0.15);
  --club-green: #d9ec9f;
  --club-green-strong: #f0ffbd;
  --club-ivory: #fff7e6;
  --club-ink: #102018;
  --club-text: #f7f2e4;
  --club-text-soft: rgba(240, 232, 214, 0.72);
  --club-text-muted: rgba(230, 219, 195, 0.58);
  --club-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --club-shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.22);
  --club-glow: 0 0 0 1px rgba(236, 223, 187, 0.08), 0 22px 54px rgba(0, 0, 0, 0.28);
  --club-radius-lg: 34px;
  --club-radius-md: 26px;
  --club-radius-sm: 20px;
  --club-pill: 999px;
  --panel: var(--club-panel);
  --panel-soft: rgba(255, 249, 235, 0.06);
  --line: var(--club-line);
  --line-strong: var(--club-line-strong);
  --shadow: var(--club-shadow);
  --accent: var(--club-green);
  --sand: var(--club-gold);
  --text: var(--club-text);
  --text-soft: var(--club-text-soft);
}

html {
  background:
    radial-gradient(circle at top, rgba(35, 81, 55, 0.22), transparent 38%),
    linear-gradient(180deg, #071912 0%, #04110c 55%, #020906 100%);
}

body {
  position: relative;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--club-text);
  background:
    linear-gradient(180deg, rgba(3, 11, 8, 0.18) 0%, rgba(3, 9, 7, 0.62) 100%),
    url("/assets/ui/clubhouse-green-night.png") center top / cover fixed no-repeat,
    linear-gradient(180deg, #0a2218 0%, #04110c 100%);
  letter-spacing: 0.01em;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(circle at 15% 10%, rgba(244, 220, 168, 0.14), transparent 24%),
    radial-gradient(circle at 85% 12%, rgba(143, 183, 112, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(5, 12, 10, 0.1), rgba(2, 6, 5, 0.58));
}

body::after {
  opacity: 0.46;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 88px 88px;
  mix-blend-mode: soft-light;
}

body > * {
  position: relative;
  z-index: 1;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

.brand-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 22px 24px 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.brand-bar-inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 18px 22px;
  border: 1px solid var(--club-line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(253, 249, 236, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(4, 14, 10, 0.72);
  box-shadow: var(--club-glow);
  backdrop-filter: blur(22px) saturate(145%);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 10px);
  gap: 6px;
  width: 54px;
  height: 54px;
  place-content: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 248, 229, 0.16);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.28), transparent 40%),
    linear-gradient(160deg, rgba(31, 76, 52, 0.96), rgba(8, 24, 18, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 16px 28px rgba(0, 0, 0, 0.24);
}

.brand-pip {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.78), rgba(217, 236, 159, 0.96) 45%, rgba(165, 193, 94, 0.96) 100%);
  box-shadow: 0 0 0 1px rgba(255, 252, 242, 0.16), 0 0 18px rgba(212, 233, 134, 0.18);
}

.brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.55rem, 4vw, 3.6rem);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--club-ivory);
  text-transform: uppercase;
}

.brand-tagline {
  padding-top: 8px;
  color: var(--club-gold);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.brand-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.brand-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.brand-phase-chip,
#score-total,
.club-status-pill,
.player-tag,
.player-total-chip,
.match-pill,
.room-chat-status,
.die-state-badge,
.die-value-chip,
.manual-chip,
.manual-par-badge,
.tutorial-status-badge,
.tutorial-success-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: var(--club-pill);
  border: 1px solid rgba(255, 247, 224, 0.12);
  background: rgba(255, 250, 236, 0.065);
  color: var(--club-text);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-phase-chip,
.club-status-pill,
.match-pill.accent,
.tutorial-status-badge,
.tutorial-success-chip {
  border-color: rgba(219, 237, 166, 0.34);
  background:
    linear-gradient(180deg, rgba(223, 241, 161, 0.18), rgba(223, 241, 161, 0.08)),
    rgba(20, 38, 28, 0.7);
  color: var(--club-green-strong);
  box-shadow: 0 10px 24px rgba(7, 20, 13, 0.26);
}

#score-total {
  padding-inline: 16px;
  border-color: rgba(216, 191, 140, 0.24);
  background:
    linear-gradient(180deg, rgba(216, 191, 140, 0.16), rgba(216, 191, 140, 0.05)),
    rgba(18, 34, 25, 0.72);
  color: var(--club-ivory);
}

.header-link-button,
.header-utility-button,
.round-chip,
.par-chip,
.primary-button,
.secondary-button,
.ghost-button {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--club-line);
  border-radius: 18px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.header-link-button::before,
.header-utility-button::before,
.round-chip::before,
.par-chip::before,
.primary-button::before,
.secondary-button::before,
.ghost-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.16) 50%, transparent 100%);
  transform: translateX(-130%);
  transition: transform 240ms ease;
  pointer-events: none;
}

.header-link-button:hover::before,
.header-utility-button:hover::before,
.round-chip:hover::before,
.par-chip:hover::before,
.primary-button:hover::before,
.secondary-button:hover::before,
.ghost-button:hover::before {
  transform: translateX(130%);
}

.header-link-button:hover,
.header-utility-button:hover,
.round-chip:hover,
.par-chip:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.2);
}

.header-link-button,
.header-utility-button,
.ghost-button,
.secondary-button {
  background:
    linear-gradient(180deg, rgba(255, 252, 243, 0.1), rgba(255, 255, 255, 0.025)),
    rgba(10, 27, 19, 0.72);
  color: var(--club-text);
}

.primary-button {
  border-color: rgba(222, 241, 170, 0.4);
  background:
    linear-gradient(180deg, rgba(226, 244, 174, 0.92), rgba(179, 215, 111, 0.95)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  color: var(--club-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 18px 32px rgba(111, 142, 62, 0.24);
}

.secondary-button {
  border-color: rgba(216, 191, 140, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 249, 236, 0.14), rgba(216, 191, 140, 0.06)),
    rgba(10, 27, 19, 0.74);
  color: var(--club-ivory);
}

.ghost-button {
  color: var(--club-text-soft);
}

.header-link-button,
.header-utility-button {
  min-height: 42px;
  padding: 10px 15px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 52px;
  padding: 12px 18px;
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
.round-chip:disabled,
.par-chip:disabled,
.header-link-button:disabled,
.header-utility-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.round-chip,
.par-chip {
  min-height: 72px;
  border-radius: 20px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, rgba(255, 250, 237, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(8, 24, 17, 0.82);
}

.round-chip.active,
.par-chip.active {
  border-color: rgba(219, 237, 166, 0.36);
  background:
    linear-gradient(180deg, rgba(219, 237, 166, 0.18), rgba(219, 237, 166, 0.06)),
    rgba(14, 34, 24, 0.84);
}

.round-chip span,
.par-chip span {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--club-ivory);
}

.round-chip small,
.par-chip small {
  color: var(--club-text-soft);
}

.page-shell {
  max-width: 1560px;
  margin: 0 auto;
  padding: 18px 24px 46px;
}

.club-layout {
  display: grid;
  grid-template-columns: minmax(270px, 310px) minmax(0, 1fr) minmax(300px, 360px);
  gap: 22px;
  align-items: start;
}

.club-rail,
.app-layout {
  display: grid;
  gap: 20px;
  align-content: start;
}

.club-card,
.pregame-invite-panel,
.play-surface,
.tee-sheet-panel,
.overlay-panel,
.lobby-panel,
.room-flow,
.recap-stat-card,
.round-recap-panel,
.manual-hero,
.manual-flow-card,
.manual-tip-card,
.manual-par-card,
.manual-side-card,
.tutorial-rail-card,
.tutorial-step-card,
.tutorial-lesson-card,
.tutorial-check-card,
.tutorial-summary-card,
.tutorial-choice,
.tutorial-feedback,
.tutorial-progress-step,
.room-chat-message-body {
  border: 1px solid var(--club-line);
  box-shadow: var(--club-shadow-soft);
  background:
    linear-gradient(180deg, rgba(255, 251, 240, 0.08), rgba(255, 255, 255, 0.02)),
    var(--club-panel);
  backdrop-filter: blur(20px) saturate(142%);
}

.club-card,
.pregame-invite-panel {
  padding: 22px;
  border-radius: var(--club-radius-md);
}

.club-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.club-card-title,
.tee-sheet-header h2,
.roster-copy h3,
.overlay-copy h2,
.overlay-section-head h3,
.manual-hero-copy h3,
.manual-section-head h3,
.manual-side-card h3,
.tutorial-rail-card h3,
.tutorial-step-head h3,
.tutorial-lesson-card h3,
.tutorial-check-card h3,
.tutorial-summary-card h3,
.round-recap-head h2 {
  margin: 0;
  font-family: var(--font-display) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--club-ivory);
}

.club-card-title {
  font-size: 1.72rem;
}

.section-label,
.status-label,
.name-field label,
.player-name-edit-label,
.join-code-field label,
.lobby-video-caption-label {
  color: var(--club-gold);
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.club-card-note,
.overlay-note,
.lobby-panel-note,
.match-detail,
.manual-hero-copy p,
.manual-flow-card p,
.manual-tip-card p,
.manual-rule-item span,
.manual-par-list li span,
.manual-bullet-list li,
.manual-side-callout,
.manual-quick-list span,
.tutorial-choice span,
.tutorial-feedback,
.tutorial-lesson-note,
.tutorial-side-note,
.tutorial-selection-count,
.tutorial-progress-step span,
.tutorial-coach,
.room-hero-status,
.share-note,
.pregame-invite-copy p,
.recap-highlight,
.round-recap-note {
  color: var(--club-text-soft);
}

.room-summary-code,
.pregame-invite-code,
.match-pill,
.room-chat-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.room-summary-code {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(216, 191, 140, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 249, 235, 0.1), rgba(216, 191, 140, 0.04)),
    rgba(6, 18, 13, 0.65);
  color: var(--club-text-soft);
}

.room-summary-code strong,
.room-hero strong,
#joined-room-code-display,
#room-code-display {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  letter-spacing: 0.1em;
  color: var(--club-ivory);
  text-transform: uppercase;
}

.player-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255, 249, 235, 0.14);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.26), transparent 38%),
    linear-gradient(160deg, rgba(29, 71, 48, 0.98), rgba(10, 24, 18, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 16px 28px rgba(0, 0, 0, 0.24);
}

.player-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.player-avatar-monogram {
  position: relative;
  z-index: 0;
  color: rgba(255, 247, 226, 0.9);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-avatar--sm {
  width: 48px;
  height: 48px;
}

.player-avatar--md {
  width: 60px;
  height: 60px;
}

.player-avatar--lg {
  width: 82px;
  height: 82px;
}

.player-avatar--sm .player-avatar-monogram {
  font-size: 0.95rem;
}

.player-avatar--md .player-avatar-monogram {
  font-size: 1.2rem;
}

.player-avatar--lg .player-avatar-monogram {
  font-size: 1.55rem;
}

.player-avatar--seat {
  background:
    linear-gradient(180deg, rgba(216, 191, 140, 0.26), rgba(216, 191, 140, 0.08)),
    rgba(15, 28, 21, 0.88);
}

.player-avatar--seat img {
  display: none;
}

.player-summary-list,
.player-names,
.round-recap-list {
  display: grid;
  gap: 12px;
}

.player-summary-row,
.player-card,
.round-recap-row {
  display: grid;
  gap: 10px;
  border-radius: 22px;
  border: 1px solid rgba(216, 191, 140, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 20, 15, 0.64);
}

.player-summary-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 14px 15px;
}

.player-summary-row.is-active,
.player-card.is-active,
.round-recap-row.is-winner {
  border-color: rgba(219, 237, 166, 0.3);
  background:
    linear-gradient(180deg, rgba(219, 237, 166, 0.16), rgba(219, 237, 166, 0.03)),
    rgba(8, 24, 17, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 36px rgba(0, 0, 0, 0.2);
}

.player-summary-row.is-seat,
.player-card.is-open-seat {
  border-style: dashed;
  border-color: rgba(216, 191, 140, 0.18);
}

.player-summary-copy,
.player-card-identity-copy,
.round-recap-player-copy,
.recap-winner-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.player-summary-copy strong,
.player-card-identity-copy strong,
.round-recap-player-copy strong {
  font-size: 1rem;
  font-weight: 600;
  color: var(--club-ivory);
}

.player-summary-copy span,
.player-card-identity-copy span,
.round-recap-player-copy span,
.player-card > span {
  color: var(--club-text-soft);
  font-size: 0.86rem;
}

.player-summary-score,
.round-recap-score {
  white-space: nowrap;
  color: var(--club-gold);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pregame-invite-panel {
  display: grid;
  gap: 18px;
  border-color: rgba(216, 191, 140, 0.2);
  background:
    radial-gradient(circle at top, rgba(216, 191, 140, 0.12), transparent 48%),
    linear-gradient(180deg, rgba(255, 249, 236, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 19, 14, 0.74);
}

.pregame-invite-copy {
  display: grid;
  gap: 8px;
}

#pregame-invite-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--club-ivory);
}

.pregame-invite-link,
.room-link-copy a,
#game-link-display {
  color: var(--club-green);
  word-break: break-word;
}

.pregame-invite-actions,
.room-link-actions,
.room-inline-actions,
.round-recap-actions {
  display: grid;
  gap: 10px;
}

.result-banner {
  min-height: 96px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(216, 191, 140, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 250, 238, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.76);
  color: var(--club-text);
  line-height: 1.58;
}

.result-banner.good {
  border-color: rgba(219, 237, 166, 0.26);
  background:
    linear-gradient(180deg, rgba(219, 237, 166, 0.16), rgba(219, 237, 166, 0.05)),
    rgba(9, 23, 16, 0.82);
}

.result-banner.warn {
  border-color: rgba(255, 203, 148, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 209, 157, 0.14), rgba(255, 209, 157, 0.04)),
    rgba(23, 16, 11, 0.78);
}

.play-surface {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: var(--club-radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 250, 236, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 17, 13, 0.76);
}

.play-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(255, 243, 209, 0.1), transparent 42%),
    radial-gradient(circle at bottom left, rgba(148, 188, 108, 0.14), transparent 34%);
  pointer-events: none;
}

.experience-grid,
.dice-focus-stack {
  display: grid;
}

.dice-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  min-height: 632px;
}

.dice-stage-header {
  display: grid;
  gap: 16px;
}

.stage-status-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stage-stat {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(216, 191, 140, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 17, 12, 0.66);
}

.stage-stat strong {
  color: var(--club-ivory);
  font-size: 1.08rem;
  font-weight: 600;
}

.stage-context {
  display: grid;
  gap: 4px;
  padding-inline: 4px;
}

#dice-owner-label {
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 4.2vw, 3.2rem);
  font-weight: 700;
  line-height: 0.96;
  color: var(--club-ivory);
}

.dice-owner-detail {
  color: var(--club-text-soft);
  font-size: 0.96rem;
}

.dice-board {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 30px;
  border: 1px solid rgba(216, 191, 140, 0.2);
  background:
    radial-gradient(circle at 50% 56%, rgba(216, 237, 161, 0.18), transparent 24%),
    radial-gradient(circle at 50% 84%, rgba(2, 8, 5, 0.72), transparent 34%),
    linear-gradient(180deg, rgba(7, 20, 14, 0.3), rgba(2, 8, 5, 0.52)),
    rgba(3, 11, 8, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 26px 54px rgba(0, 0, 0, 0.26);
}

.dice-board::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 18px;
  height: 88px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(2, 8, 5, 0.9) 0%, rgba(2, 8, 5, 0.12) 68%, rgba(2, 8, 5, 0) 100%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 1;
}

.golf-green-scenery {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 7, 5, 0.22), rgba(2, 7, 5, 0.82)),
    radial-gradient(circle at 50% 54%, rgba(216, 237, 161, 0.08), transparent 18%),
    url("/assets/ui/clubhouse-green-night.png") center center / cover no-repeat;
  filter: saturate(0.78) brightness(0.54);
  transform: scale(1.05);
}

.golf-green-scenery::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 54%, rgba(216, 237, 161, 0.18), rgba(216, 237, 161, 0.04) 18%, transparent 34%),
    linear-gradient(180deg, rgba(2, 7, 5, 0.4), rgba(2, 7, 5, 0.12) 32%, rgba(2, 7, 5, 0.58));
}

.golf-green-ridge,
.golf-hole-shadow,
.golf-hole-cup,
.golf-flagstick,
.golf-flag-banner,
.golf-green-scenery::after {
  display: none;
}

.dice-box-layer {
  z-index: 3;
}

.dice-grid {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-content: center;
  gap: 30px 26px;
  min-height: 420px;
  padding: 30px 34px 64px;
}

.dice-grid[data-dice-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 128px));
  max-width: 510px;
}

.dice-grid[data-dice-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 150px));
  max-width: 360px;
}

.dice-grid[data-dice-count="5"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 520px;
}

.dice-grid[data-dice-count="5"] > .die {
  grid-column: span 2;
}

.dice-grid[data-dice-count="5"] > .die:nth-child(4) {
  grid-column: 2 / span 2;
}

.dice-grid[data-dice-count="5"] > .die:nth-child(5) {
  grid-column: 4 / span 2;
}

.die {
  --die-depth: 28px;
  position: relative;
  width: 128px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  isolation: isolate;
}

.die::before {
  inset: auto 16px -18px;
  height: 24px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(3, 10, 6, 0.76), rgba(3, 10, 6, 0));
  opacity: 0.58;
  filter: blur(10px);
}

.die-cube {
  inset: 8px;
}

.die-face {
  border-radius: 24px;
  padding: 15px;
  gap: 6px;
  border: 1px solid rgba(106, 78, 27, 0.15);
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.94), transparent 30%),
    linear-gradient(160deg, #fffdf6 0%, #f9f1de 48%, #e4d2ac 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -18px 30px rgba(170, 126, 64, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.08);
}

.pip {
  background:
    radial-gradient(circle at 30% 26%, rgba(66, 93, 55, 0.98), rgba(24, 38, 25, 0.98) 60%, rgba(6, 10, 8, 0.98) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    0 2px 3px rgba(0, 0, 0, 0.2);
}

.die-placeholder {
  border: 1px dashed rgba(255, 247, 224, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
}

.die-placeholder-shell {
  inset: 14px;
  border-radius: 18px;
  border: 1px dashed rgba(216, 191, 140, 0.16);
  background: rgba(255, 255, 255, 0.02);
}

.die-button {
  background: transparent;
  border: 0;
}

.die-button:not(.is-rolling):not(.is-settling):hover {
  filter: brightness(1.04) drop-shadow(0 14px 28px rgba(0, 0, 0, 0.2));
}

.die-button:focus-visible {
  outline: 2px solid rgba(219, 237, 166, 0.92);
  outline-offset: 6px;
}

.die-button.held {
  filter: drop-shadow(0 18px 32px rgba(119, 154, 55, 0.16));
}

.die-button.held::before {
  opacity: 0.86;
  background: radial-gradient(circle, rgba(179, 239, 113, 0.52), rgba(3, 10, 6, 0));
}

.die-button.held::after {
  content: none !important;
}

.die-button.held .die-face {
  border-color: rgba(206, 232, 144, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -18px 30px rgba(170, 126, 64, 0.12),
    0 0 0 1px rgba(212, 233, 134, 0.18),
    0 14px 28px rgba(96, 136, 46, 0.2);
}

.die-state-badge,
.die-value-chip,
.die-hint {
  position: absolute;
  z-index: 4;
  pointer-events: none;
}

.die-state-badge {
  top: -8px;
  right: -4px;
  min-height: 28px;
  padding: 5px 11px;
  border-color: rgba(219, 237, 166, 0.4);
  background:
    linear-gradient(180deg, rgba(219, 237, 166, 0.22), rgba(219, 237, 166, 0.1)),
    rgba(12, 29, 20, 0.8);
  color: var(--club-green-strong);
}

.die-value-chip {
  top: 10px;
  left: 10px;
  min-width: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-color: rgba(216, 191, 140, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.88), rgba(245, 232, 199, 0.94)),
    rgba(255, 251, 241, 0.96);
  color: #4e3c19;
}

.die-hint {
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  min-width: max-content;
  color: rgba(248, 241, 226, 0.82);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dice-stage-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, auto);
  gap: 16px;
  align-items: stretch;
  padding: 0;
}

.stage-score {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(216, 191, 140, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 249, 236, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(5, 17, 12, 0.74);
}

.stage-score-label {
  color: var(--club-gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
}

.stage-score-value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  line-height: 0.94;
  color: var(--club-ivory);
}

.stage-score-note {
  color: var(--club-text-soft);
  line-height: 1.5;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#roll-button,
#score-button,
#start-room-game-button,
#join-room-button,
#create-room-button {
  min-height: 58px;
}

.tee-sheet-panel {
  position: sticky;
  top: 118px;
  padding: 24px;
  border-radius: var(--club-radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.8);
}

.tee-sheet-header {
  margin-bottom: 16px;
}

.tee-sheet-header h2 {
  font-size: clamp(1.9rem, 3vw, 2.55rem);
}

.tee-sheet-wrap {
  border-radius: 24px;
  border-color: rgba(216, 191, 140, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 250, 236, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.66);
}

.tee-sheet th,
.tee-sheet td {
  padding: 14px 16px;
}

.tee-sheet th {
  background: rgba(255, 249, 235, 0.08);
  color: var(--club-gold);
}

.tee-sheet td {
  color: var(--club-text-soft);
}

.tee-sheet tbody tr.is-current {
  background:
    linear-gradient(90deg, rgba(219, 237, 166, 0.16), rgba(219, 237, 166, 0.04)),
    rgba(11, 28, 19, 0.74);
}

.tee-sheet tbody tr.is-complete {
  background: rgba(255, 255, 255, 0.015);
}

.tee-sheet .player-cell.is-active {
  color: var(--club-ivory);
}

.tee-sheet .player-cell.is-live {
  color: var(--club-green-strong);
}

.live-score-stack small {
  color: var(--club-gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.live-score-stack strong {
  color: var(--club-green-strong);
}

.tee-sheet tfoot td,
.tee-sheet .total-label {
  color: var(--club-ivory);
  font-weight: 700;
}

.room-chat-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(216, 191, 140, 0.14);
}

.room-chat-head {
  gap: 12px;
}

.room-chat-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.44rem;
  color: var(--club-ivory);
}

.room-chat-log,
.room-chat-log--compact {
  display: grid;
  gap: 12px;
  padding-right: 4px;
  scrollbar-color: rgba(216, 191, 140, 0.34) transparent;
}

.room-chat-empty {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(216, 191, 140, 0.16);
  color: var(--club-text-soft);
  background: rgba(255, 255, 255, 0.02);
}

.room-chat-form,
.room-chat-form--compact {
  gap: 10px;
}

.room-chat-form input,
.room-chat-form--compact input,
.name-field input,
.player-name-edit-input,
.join-code-field input {
  min-height: 52px;
  border: 1px solid rgba(216, 191, 140, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.8);
  color: var(--club-ivory);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.room-chat-form input::placeholder,
.room-chat-form--compact input::placeholder,
.name-field input::placeholder,
.player-name-edit-input::placeholder,
.join-code-field input::placeholder {
  color: var(--club-text-muted);
}

.room-chat-form input:focus-visible,
.room-chat-form--compact input:focus-visible,
.name-field input:focus-visible,
.player-name-edit-input:focus-visible,
.join-code-field input:focus-visible {
  outline: 2px solid rgba(219, 237, 166, 0.9);
  outline-offset: 3px;
}

.room-chat-message {
  width: auto;
}

.room-chat-message-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
}

.room-chat-message-body {
  padding: 13px 14px;
  border-radius: 20px;
}

.room-chat-message.is-own .room-chat-message-body {
  border-color: rgba(219, 237, 166, 0.22);
  background:
    linear-gradient(180deg, rgba(219, 237, 166, 0.14), rgba(219, 237, 166, 0.04)),
    rgba(7, 20, 15, 0.7);
}

.room-chat-message-meta {
  gap: 8px;
}

.room-chat-message-meta strong {
  color: var(--club-ivory);
}

.room-chat-message-meta span,
.room-chat-message p {
  color: var(--club-text-soft);
}

.overlay-shell {
  padding: 26px;
  background: rgba(4, 9, 8, 0.36);
  backdrop-filter: blur(14px);
}

.overlay-backdrop {
  background: rgba(2, 5, 4, 0.56);
}

.overlay-panel {
  width: min(1240px, calc(100vw - 48px));
  max-height: min(92vh, 980px);
  padding: 26px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(4, 15, 11, 0.86);
  box-shadow: 0 34px 92px rgba(0, 0, 0, 0.4);
}

.overlay-panel--room:has(.roster-panel[hidden]) {
  width: min(980px, calc(100vw - 48px));
}

.overlay-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(216, 191, 140, 0.14);
}

.overlay-copy h2 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 0.94;
}

.overlay-body {
  padding-top: 20px;
  gap: 18px;
}

.overlay-body--room {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.88fr);
  align-items: start;
}

.overlay-body--room:has(.roster-panel[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.overlay-body--room:has(.roster-panel[hidden]) .room-hub {
  max-width: 760px;
}

.overlay-body--setup {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(290px, 0.9fr);
  align-items: start;
}

.room-hub,
.roster-panel,
.control-panel,
.round-admin-panel {
  padding: 22px;
  border-radius: 28px;
}

.room-mode-head,
.overlay-section-head,
.roster-summary,
.manual-section-head,
.tutorial-progress-head {
  display: grid;
  gap: 6px;
}

.room-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.room-flow {
  padding: 20px;
  border-radius: 24px;
}

.room-mode-grid,
.room-link-actions {
  display: grid;
  gap: 10px;
}

.room-hero,
.share-bar,
.match-banner,
.manual-hero,
.tutorial-rail-card,
.tutorial-step-card,
.tutorial-lesson-card,
.tutorial-check-card,
.tutorial-summary-card {
  border-radius: 24px;
}

.room-hero,
.share-bar,
.match-banner {
  padding: 18px;
  border: 1px solid rgba(216, 191, 140, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 18, 13, 0.74);
}

.lobby-video-module {
  border: 1px solid rgba(216, 191, 140, 0.16);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--club-shadow-soft);
}

.lobby-video-caption {
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.82);
}

.player-card {
  padding: 16px;
}

.player-card-head,
.player-card-identity-stack,
.recap-winner,
.round-recap-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.player-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.player-card-identity--editable {
  width: 100%;
}

.player-name-edit {
  gap: 6px;
}

.player-tag,
.player-total-chip {
  min-height: 30px;
  padding: 5px 11px;
  border-radius: var(--club-pill);
}

.player-tag {
  color: var(--club-gold);
}

.player-total-chip {
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(6, 18, 13, 0.78);
}

.player-live-chip.is-live {
  border-color: rgba(219, 237, 166, 0.34);
  color: var(--club-green-strong);
}

.round-recap-panel {
  padding: 28px;
  border-radius: var(--club-radius-lg);
  background:
    radial-gradient(circle at top, rgba(216, 191, 140, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.82);
}

.round-recap-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.round-recap-head h2 {
  font-size: clamp(2.55rem, 5vw, 3.6rem);
  line-height: 0.92;
}

.round-recap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.round-recap-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 14px 16px;
}

.round-recap-rank {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(216, 191, 140, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--club-gold);
  font-weight: 700;
}

.round-recap-score {
  font-family: var(--font-display);
  font-size: 1.34rem;
  text-transform: none;
  letter-spacing: 0;
}

.round-recap-aside {
  display: grid;
  gap: 14px;
}

.recap-stat-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
}

.recap-winner-copy strong {
  font-family: var(--font-display);
  font-size: 1.95rem;
  line-height: 0.96;
  color: var(--club-ivory);
}

.recap-winner-copy span {
  color: var(--club-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
}

.recap-highlight {
  line-height: 1.62;
}

.manual-hero,
.manual-flow-card,
.manual-tip-card,
.manual-par-card,
.manual-side-card,
.tutorial-rail-card,
.tutorial-step-card,
.tutorial-lesson-card,
.tutorial-check-card,
.tutorial-summary-card {
  border-radius: 24px;
}

.manual-hero-copy h3,
.manual-side-card h3,
.tutorial-rail-card h3,
.tutorial-step-head h3,
.tutorial-lesson-card h3,
.tutorial-check-card h3,
.tutorial-summary-card h3 {
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  line-height: 0.98;
}

.manual-chip {
  border-color: rgba(216, 191, 140, 0.24);
  color: var(--club-gold);
}

.manual-hero-stat strong,
.manual-flow-card strong,
.manual-tip-card strong,
.manual-rule-item strong,
.manual-quick-list strong,
.manual-par-card strong {
  font-family: var(--font-body) !important;
  font-weight: 600;
  color: var(--club-ivory);
}

.manual-hero-stat,
.manual-flow-card,
.manual-tip-card,
.manual-par-card,
.manual-side-card,
.manual-rule-item,
.tutorial-choice,
.tutorial-feedback,
.tutorial-side-note,
.tutorial-progress-step {
  border-color: rgba(216, 191, 140, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 18, 13, 0.68);
}

.manual-rule-item,
.manual-side-callout,
.tutorial-side-note {
  border-left-color: rgba(216, 191, 140, 0.72);
}

.manual-flow-step,
.tutorial-progress-index {
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 250, 236, 0.92), rgba(236, 218, 178, 0.92)),
    rgba(255, 250, 236, 0.94);
  color: #4c3a15;
}

.tutorial-rail {
  border-right: 1px solid rgba(216, 191, 140, 0.12);
  background:
    linear-gradient(180deg, rgba(216, 191, 140, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(7, 20, 15, 0.78);
}

.tutorial-progress-track {
  background: rgba(255, 255, 255, 0.08);
}

.tutorial-progress-fill {
  background: linear-gradient(90deg, rgba(219, 237, 166, 1), rgba(216, 191, 140, 0.92));
}

.tutorial-progress-step.is-current {
  border-color: rgba(219, 237, 166, 0.3);
  background:
    linear-gradient(180deg, rgba(219, 237, 166, 0.16), rgba(219, 237, 166, 0.04)),
    rgba(6, 18, 13, 0.74);
}

.tutorial-progress-step.is-complete .tutorial-progress-index {
  background: linear-gradient(180deg, rgba(219, 237, 166, 0.94), rgba(188, 223, 118, 0.94));
  color: var(--club-ink);
}

.page-shell[data-phase="complete"] .play-surface {
  display: none;
}

.page-shell[data-phase="complete"] .app-layout {
  gap: 0;
}

.page-shell[data-phase="complete"] .round-recap-panel {
  display: block;
}

@media (max-width: 1340px) {
  .club-layout {
    grid-template-columns: minmax(250px, 280px) minmax(0, 1fr) minmax(270px, 320px);
  }

  .brand-meta {
    justify-content: flex-start;
  }

  .dice-stage-footer {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .club-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .club-rail,
  .tee-sheet-panel {
    position: static;
  }

  .club-rail--left {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overlay-body--room,
  .overlay-body--setup,
  .round-recap-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .brand-bar {
    padding-inline: 16px;
  }

  .brand-bar-inner {
    padding: 16px;
    border-radius: 26px;
  }

  .page-shell {
    padding-inline: 16px;
  }

  .club-rail--left {
    grid-template-columns: minmax(0, 1fr);
  }

  .play-surface,
  .tee-sheet-panel,
  .round-recap-panel,
  .overlay-panel,
  .club-card,
  .pregame-invite-panel {
    border-radius: 26px;
  }

  .stage-status-bar,
  .room-quick-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .dice-grid {
    gap: 26px 18px;
    padding-inline: 16px;
  }

  .dice-grid[data-dice-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 108px));
    max-width: 392px;
  }

  .dice-grid[data-dice-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 124px));
    max-width: 296px;
  }

  .die {
    width: 108px;
  }

  .overlay-shell {
    padding: 14px;
  }

  .overlay-panel {
    width: min(100vw - 28px, 1240px);
    padding: 20px;
  }
}

@media (max-width: 720px) {
  body {
    background-attachment: scroll;
  }

  .brand-bar {
    padding-top: 14px;
  }

  .brand-bar-inner,
  .brand-lockup,
  .brand-meta,
  .brand-actions {
    align-items: flex-start;
  }

  .brand-bar-inner,
  .brand-meta {
    gap: 14px;
  }

  .brand-actions {
    width: 100%;
  }

  .header-link-button,
  .header-utility-button {
    width: 100%;
    justify-content: center;
  }

  .play-surface,
  .tee-sheet-panel,
  .round-recap-panel {
    padding: 18px;
  }

  .dice-stage {
    min-height: 0;
    gap: 18px;
  }

  .dice-board,
  .dice-grid {
    min-height: 380px;
  }

  .dice-grid {
    gap: 22px 16px;
    padding: 30px 10px 64px;
  }

  .dice-grid[data-dice-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 90px));
    max-width: 310px;
  }

  .dice-grid[data-dice-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 104px));
    max-width: 236px;
  }

  .dice-grid[data-dice-count="5"] {
    max-width: 340px;
  }

  .die {
    width: 90px;
  }

  .die-face {
    border-radius: 20px;
    padding: 11px;
  }

  .die-value-chip {
    top: 8px;
    left: 8px;
    min-width: 28px;
    min-height: 28px;
    font-size: 0.68rem;
  }

  .die-hint {
    bottom: -30px;
    font-size: 0.66rem;
  }

  .action-row,
  .room-link-actions,
  .room-inline-actions,
  .round-recap-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .player-summary-row,
  .round-recap-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .player-summary-score,
  .round-recap-score {
    grid-column: 2;
    justify-self: start;
  }

  .round-recap-head {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 2.2rem;
  }

  .brand-tagline,
  .brand-phase-chip,
  #score-total {
    font-size: 0.68rem;
  }

  .club-card,
  .pregame-invite-panel,
  .play-surface,
  .tee-sheet-panel,
  .round-recap-panel,
  .overlay-panel {
    padding: 16px;
  }

  .player-card-head,
  .player-card-identity-stack,
  .round-recap-player,
  .recap-winner {
    grid-template-columns: minmax(0, 1fr);
  }

  .player-card-head {
    gap: 12px;
  }

  .player-tag {
    justify-self: start;
  }

  .dice-grid[data-dice-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 78px));
    max-width: 268px;
  }

  .dice-grid[data-dice-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 92px));
    max-width: 210px;
  }

  .die {
    width: 78px;
  }

  .stage-score-value {
    font-size: 2.45rem;
  }

  .room-chat-form,
  .room-chat-form--compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .room-chat-form button,
  .room-chat-form--compact button {
    width: 100%;
  }
}

/* Fidelity pass: align shipped layout to the approved PAR boards */

.brand-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-header-left {
  display: flex;
  align-items: center;
  gap: 30px;
  min-width: 0;
}

.brand-crest {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(216, 191, 140, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 249, 236, 0.08), rgba(255, 255, 255, 0.015)),
    rgba(8, 20, 15, 0.9);
  color: var(--club-gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 251, 241, 0.14),
    0 14px 30px rgba(0, 0, 0, 0.24);
}

.brand-crest svg {
  width: 34px;
  height: 34px;
}

.brand-wordmark {
  display: grid;
  gap: 2px;
}

.brand-wordmark .brand-name {
  font-size: clamp(2.7rem, 4vw, 3.5rem);
  letter-spacing: 0.08em;
}

.brand-wordmark .brand-tagline {
  padding-top: 0;
  letter-spacing: 0.34em;
}

.brand-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-nav-button {
  appearance: none;
  position: relative;
  border: 0;
  padding: 12px 14px 16px;
  background: transparent;
  color: var(--club-gold);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.brand-nav-button::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(216, 191, 140, 0), rgba(216, 191, 140, 0.96), rgba(216, 191, 140, 0));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.brand-nav-button:hover,
.brand-nav-button.is-active {
  color: var(--club-ivory);
}

.brand-nav-button.is-active::after,
.brand-nav-button:hover::after {
  transform: scaleX(1);
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.brand-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 8px 14px 8px 8px;
  border-left: 1px solid rgba(216, 191, 140, 0.16);
}

.brand-profile-avatar {
  display: grid;
  place-items: center;
}

.brand-profile-avatar .player-avatar {
  width: 48px;
  height: 48px;
}

.brand-profile-copy {
  display: grid;
  gap: 2px;
}

.brand-profile-copy strong {
  color: var(--club-ivory);
  font-size: 1.06rem;
  font-weight: 600;
}

.brand-profile-copy span {
  color: var(--club-text-soft);
  font-size: 0.84rem;
}

.header-utility-button--compact {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
}

#score-total {
  white-space: nowrap;
}

.club-layout {
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr) minmax(290px, 340px);
  align-items: start;
}

.room-summary-card,
.player-summary-card,
.status-feed-card,
.club-rail--left .room-chat-panel--main,
.live-round-card {
  border: 1px solid rgba(216, 191, 140, 0.14);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.18);
}

.room-summary-button {
  width: 100%;
  margin-top: 16px;
  min-height: 48px;
}

.status-feed-card .result-banner {
  min-height: 120px;
  border-radius: 20px;
  padding: 18px 18px 20px;
  line-height: 1.6;
  background:
    linear-gradient(180deg, rgba(255, 250, 236, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 19, 14, 0.68);
}

.club-rail--left .room-chat-panel--main {
  margin-top: 0;
  padding: 18px;
  border-top: 0;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.8);
}

.club-rail--left .room-chat-log {
  max-height: 260px;
  overflow: auto;
}

.pregame-invite-panel {
  display: none !important;
}

.dice-stage-header {
  gap: 18px;
  padding: 16px 18px;
  border-radius: 26px;
  border: 1px solid rgba(216, 191, 140, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 248, 229, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(8, 17, 12, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 251, 241, 0.08);
}

.dice-stage {
  min-height: 560px;
  gap: 16px;
}

.stage-status-bar {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stage-stat {
  min-height: 78px;
}

.stage-stat strong {
  font-size: 1.1rem;
}

.stage-context {
  padding-inline: 0;
}

#dice-owner-label {
  font-size: clamp(2.05rem, 3.8vw, 3.35rem);
}

.dice-board {
  min-height: 420px;
  background:
    radial-gradient(circle at 50% 56%, rgba(140, 210, 88, 0.12), transparent 24%),
    rgba(3, 11, 8, 0.86);
}

.board-meta-card {
  position: absolute;
  z-index: 4;
  display: grid;
  gap: 6px;
  min-width: 132px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(216, 191, 140, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 249, 236, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 17, 13, 0.72);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
}

.board-meta-card--wind {
  left: 24px;
  top: 26px;
}

.board-meta-card--course {
  right: 24px;
  top: 26px;
  min-width: 178px;
}

.board-meta-label {
  color: var(--club-gold);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.board-meta-card strong {
  color: var(--club-ivory);
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 0.98;
}

.board-meta-card span:last-child {
  color: var(--club-text-soft);
  font-size: 0.88rem;
}

.course-card-button {
  margin-top: 8px;
  min-height: 42px;
}

.dice-grid {
  min-height: 420px;
  padding: 72px 38px 66px;
}

.dice-hold-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  transform: translateX(-50%);
  color: var(--club-gold);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}

.die-button.held .die-face {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -18px 30px rgba(170, 126, 64, 0.12),
    0 0 0 1px rgba(212, 233, 134, 0.18),
    0 0 0 10px rgba(219, 237, 166, 0.08),
    0 14px 28px rgba(96, 136, 46, 0.22);
}

.die-button.held::before {
  background: radial-gradient(circle, rgba(208, 170, 84, 0.46), rgba(3, 10, 6, 0));
}

.action-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}

#roll-button {
  min-height: 66px;
  font-size: 1.08rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#score-button {
  min-height: 66px;
}

.tee-sheet-panel {
  display: grid;
  gap: 18px;
}

.tee-sheet-wrap {
  margin-bottom: 0;
}

.live-round-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.8);
}

.live-round-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.live-round-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.72rem;
  line-height: 0.98;
  color: var(--club-ivory);
}

.live-round-note {
  margin: 0;
  color: var(--club-text-soft);
  line-height: 1.6;
}

.live-round-button {
  min-height: 48px;
}

@media (max-width: 1380px) {
  .brand-bar-inner,
  .brand-header-left,
  .brand-meta {
    flex-wrap: wrap;
  }

  .brand-header-left {
    row-gap: 14px;
  }

  .stage-status-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .club-layout {
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  }

  .tee-sheet-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .brand-nav {
    flex-wrap: wrap;
  }

  .brand-meta {
    justify-content: flex-start;
  }

  .stage-status-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-meta-card {
    position: relative;
    inset: auto;
  }

  .dice-board {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .dice-grid {
    padding: 28px 16px 70px;
    min-height: 360px;
  }

  .dice-hold-hint {
    bottom: 16px;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
  }
}

@media (max-height: 860px) and (min-width: 980px) {
  .brand-bar {
    padding: 12px 20px 0;
  }

  .brand-bar-inner {
    padding: 14px 18px;
  }

  .brand-wordmark .brand-name {
    font-size: 3rem;
  }

  .brand-nav-button {
    padding: 10px 12px 13px;
    font-size: 0.9rem;
  }

  .brand-profile-avatar .player-avatar {
    width: 42px;
    height: 42px;
  }

  .page-shell {
    padding: 12px 20px 30px;
  }

  .club-layout {
    gap: 16px;
  }

  .club-rail,
  .app-layout {
    gap: 14px;
  }

  .club-card,
  .tee-sheet-panel,
  .play-surface {
    padding: 18px;
  }

  .club-card-title,
  .tee-sheet-header h2 {
    font-size: 1.48rem;
  }

  .club-card-note,
  .status-feed-card .result-banner,
  .live-round-note {
    font-size: 0.94rem;
  }

  .player-summary-row {
    padding: 10px 12px;
  }

  .dice-stage {
    min-height: 470px;
    gap: 12px;
  }

  .dice-stage-header {
    gap: 12px;
    padding: 12px 14px;
  }

  .stage-stat {
    min-height: 64px;
    padding: 11px 12px;
  }

  .stage-stat strong {
    font-size: 1rem;
  }

  #dice-owner-label {
    font-size: clamp(1.75rem, 3.1vw, 2.75rem);
  }

  .dice-owner-detail {
    font-size: 0.88rem;
  }

  .dice-board {
    min-height: 300px;
  }

  .dice-board.has-dice-box-display {
    --dice-display-scale: 1.12;
    --dice-display-y: 30px;
    --dice-selector-top: 112px;
    --dice-selector-bottom: 20px;
  }

  .board-meta-card {
    padding: 12px 14px;
    min-width: 112px;
  }

  .board-meta-card strong {
    font-size: 1.28rem;
  }

  .board-meta-card--wind {
    left: 16px;
    top: 16px;
  }

  .board-meta-card--course {
    right: 16px;
    top: 16px;
    min-width: 156px;
  }

  .course-card-button {
    min-height: 38px;
    margin-top: 4px;
  }

  .dice-grid {
    min-height: 300px;
    padding: 54px 26px 44px;
    gap: 20px 18px;
  }

  .die {
    width: 108px;
  }

  .die-face {
    border-radius: 20px;
    padding: 13px;
  }

  .die-hint {
    bottom: -28px;
    font-size: 0.68rem;
  }

  .dice-hold-hint {
    bottom: 16px;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
  }

  .dice-stage-footer {
    grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
    gap: 12px;
  }

  .stage-score {
    gap: 4px;
    padding: 14px 16px;
  }

  .stage-score-value {
    font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  }

  .stage-score-note {
    font-size: 0.84rem;
  }

  #roll-button,
  #score-button {
    min-height: 56px;
    font-size: 0.98rem;
  }

  .tee-sheet-panel {
    top: 96px;
    gap: 12px;
  }

  .tee-sheet th,
  .tee-sheet td {
    padding: 11px 12px;
  }

  .live-round-card {
    gap: 10px;
    padding: 14px;
  }

  .live-round-head h3 {
    font-size: 1.48rem;
  }

  .live-round-button {
    min-height: 42px;
  }
}

@media (min-width: 980px) {
  .page-shell[data-phase="play"] {
    padding-top: 10px;
  }

  .page-shell[data-phase="play"] .club-layout {
    gap: 18px;
  }

  .page-shell[data-phase="play"] .play-surface {
    padding: 22px 22px 20px;
  }

  .page-shell[data-phase="play"] .dice-stage {
    min-height: clamp(476px, calc(100svh - 282px), 526px);
    gap: 14px;
  }

  .page-shell[data-phase="play"] .dice-stage-header {
    gap: 14px;
    padding: 14px 16px;
  }

  .page-shell[data-phase="play"] .dice-board {
    min-height: clamp(276px, calc(100svh - 442px), 356px);
  }

  .page-shell[data-phase="play"] .dice-grid {
    min-height: clamp(236px, calc(100svh - 500px), 308px);
    padding: 54px 30px 52px;
  }
}

.dice-grid {
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 22px 24px;
}

.dice-grid::before {
  content: "";
  position: absolute;
  inset: 58px 76px 74px;
  z-index: 0;
  border-radius: 42px;
  border: 1px solid rgba(255, 251, 241, 0.08);
  background:
    radial-gradient(circle at 50% 16%, rgba(214, 185, 102, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(255, 251, 241, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(2, 10, 7, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -28px 42px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.dice-board.has-dice-box-display .dice-grid::before {
  opacity: 0.4;
}

.dice-grid > .die,
.dice-grid > .die-placeholder {
  z-index: 1;
  flex: 0 0 auto;
}

.dice-grid.is-dice-box-display {
  position: absolute;
  left: 18px;
  right: 18px;
  top: var(--dice-selector-top);
  bottom: var(--dice-selector-bottom);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 2.1vw, 28px);
  padding: 0;
  z-index: 4;
  pointer-events: none;
}

.dice-grid.is-dice-box-display::before {
  display: none;
}

.dice-grid.is-dice-box-display > .die {
  pointer-events: auto;
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display) {
  display: grid;
  justify-content: center;
  justify-items: center;
  align-content: center;
  gap: 20px 22px;
  min-height: clamp(250px, 31vw, 304px);
  max-width: 484px;
  margin-inline: auto;
  padding: 34px 22px 64px;
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display)::before {
  inset: 26px 14px 42px;
  border-radius: 38px;
  border: 1px solid rgba(255, 251, 241, 0.08);
  background:
    radial-gradient(circle at 50% 40%, rgba(216, 191, 140, 0.16), transparent 28%),
    radial-gradient(circle at 50% 78%, rgba(2, 8, 5, 0.44), transparent 32%),
    linear-gradient(180deg, rgba(255, 251, 241, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(2, 10, 7, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -24px 34px rgba(0, 0, 0, 0.24);
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display)[data-dice-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 124px));
  max-width: 438px;
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display)[data-dice-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 142px));
  max-width: 332px;
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display)[data-dice-count="5"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 458px;
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display)[data-dice-count="5"] > .die {
  grid-column: span 2;
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display)[data-dice-count="5"] > .die:nth-child(4) {
  grid-column: 2 / span 2;
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display)[data-dice-count="5"] > .die:nth-child(5) {
  grid-column: 4 / span 2;
}

.die {
  --die-depth: 18px;
  --die-pedestal-width: 86px;
  --die-pedestal-height: 20px;
  --cube-camera-x: -14deg;
  --cube-camera-y: 18deg;
  --cube-camera-z: -6deg;
  width: 112px;
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display) .die {
  width: 100%;
  max-width: 132px;
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display) .die-cube {
  inset: 2px 2px 28px;
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display) .die-face--surface {
  display: block;
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display) .die-face--display {
  border-radius: 26px;
  border-color: rgba(126, 95, 38, 0.22);
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.98), transparent 34%),
    radial-gradient(circle at 76% 82%, rgba(213, 187, 118, 0.16), transparent 26%),
    linear-gradient(160deg, #fffef9 0%, #fbf3df 56%, #e7c98f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -16px 26px rgba(170, 126, 64, 0.12),
    0 16px 26px rgba(0, 0, 0, 0.14);
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display) .die-button:not(.is-rolling):not(.is-settling):hover {
  transform: translateY(-4px);
}

.die::before {
  inset: auto 12px 10px;
  height: 24px;
  opacity: 0.52;
  filter: blur(12px);
}

.die::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: var(--die-pedestal-width);
  height: var(--die-pedestal-height);
  z-index: 0;
  transform: translateX(-50%);
  border-radius: 999px;
  border: 1px solid rgba(216, 191, 140, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 250, 236, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(8, 21, 15, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -8px 14px rgba(0, 0, 0, 0.22),
    0 12px 18px rgba(0, 0, 0, 0.24);
  pointer-events: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.die-cube {
  inset: 8px 8px 24px;
  z-index: 2;
}

.die-face {
  border-radius: 22px;
  padding: 14px;
  gap: 7px;
  border: 1px solid rgba(126, 95, 38, 0.16);
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.94), transparent 30%),
    linear-gradient(160deg, #fffef9 0%, #f8efd9 46%, #e3c692 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -12px 22px rgba(170, 126, 64, 0.1),
    0 12px 20px rgba(0, 0, 0, 0.08);
}

.die-face--display {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -12px 20px rgba(170, 126, 64, 0.1),
    0 12px 20px rgba(0, 0, 0, 0.1);
}

.die-face--surface {
  display: block;
  padding: 0;
  gap: 0;
  border-color: rgba(123, 93, 42, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -8px 14px rgba(126, 93, 39, 0.1),
    0 6px 10px rgba(0, 0, 0, 0.06);
}

.die-face--surface-top {
  border-radius: 16px 16px 10px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 236, 209, 0.98)),
    linear-gradient(160deg, #fffdf8 0%, #f5ead0 100%);
  transform: rotateX(90deg) translateZ(var(--die-depth));
}

.die-face--surface-right {
  border-radius: 10px 16px 16px 10px;
  background:
    linear-gradient(180deg, rgba(245, 232, 201, 0.96), rgba(229, 208, 159, 0.96)),
    linear-gradient(160deg, #f0dfb8 0%, #dcc18f 100%);
  transform: rotateY(90deg) translateZ(var(--die-depth));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -10px 16px rgba(126, 93, 39, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.05);
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display) .pip {
  background:
    radial-gradient(circle at 30% 26%, rgba(52, 79, 58, 0.98), rgba(18, 29, 20, 0.98) 58%, rgba(5, 9, 6, 0.98) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-shell[data-phase="play"] .dice-grid:not(.is-dice-box-display) .pip.active {
  transform: scale(0.58);
}

.die-state-badge {
  top: -14px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  min-height: 28px;
  padding: 5px 12px;
  border-color: rgba(219, 237, 166, 0.42);
  background:
    linear-gradient(180deg, rgba(229, 245, 181, 0.26), rgba(229, 245, 181, 0.08)),
    rgba(12, 29, 20, 0.82);
  color: #f8ffea;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 24px rgba(7, 20, 13, 0.22);
}

.die-value-chip {
  top: auto;
  left: 50%;
  bottom: 0;
  min-width: 46px;
  min-height: 30px;
  padding: 0 13px;
  transform: translateX(-50%);
  border-color: rgba(216, 191, 140, 0.26);
  background:
    linear-gradient(180deg, rgba(18, 39, 27, 0.96), rgba(7, 19, 13, 0.96)),
    rgba(7, 19, 13, 0.96);
  color: rgba(246, 231, 189, 0.96);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 14px rgba(0, 0, 0, 0.18);
}

.die-hint {
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%) translateY(4px);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(244, 236, 218, 0.76);
  opacity: 0;
  white-space: nowrap;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.die-button:is(:hover, :focus-visible) .die-hint {
  opacity: 0.92;
  transform: translateX(-50%) translateY(0);
}

.die.is-dice-box-proxy {
  width: clamp(116px, 12vw, 142px);
  height: clamp(148px, 17vw, 178px);
  aspect-ratio: auto;
  perspective: none;
  transform-origin: 50% 100%;
  box-shadow: none;
  filter: none;
  cursor: pointer;
}

.die.is-dice-box-proxy::before {
  inset: 10px 6px 30px;
  height: auto;
  border-radius: 34px;
  border: 1px solid rgba(255, 251, 241, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01)),
    radial-gradient(circle at 50% 24%, rgba(233, 242, 186, 0.14), transparent 46%),
    rgba(6, 16, 11, 0.08);
  opacity: 0.52;
  transform: none;
  filter: none;
  transition:
    opacity 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.dice-board.has-dice-box-display .board-meta-card {
  top: 16px;
  padding: 12px 14px;
  gap: 4px;
}

.dice-board.has-dice-box-display .board-meta-card--wind {
  left: 18px;
  min-width: 100px;
}

.dice-board.has-dice-box-display .board-meta-card--course {
  right: 18px;
  min-width: 152px;
}

.dice-board.has-dice-box-display .board-meta-card strong {
  font-size: 1.34rem;
}

.dice-board.has-dice-box-display .course-card-button {
  min-height: 38px;
  margin-top: 2px;
  padding-inline: 16px;
}

.die.is-dice-box-proxy::after {
  bottom: 18px;
  width: min(106px, calc(100% - 18px));
  height: 28px;
  border-color: rgba(215, 193, 149, 0.3);
  background:
    linear-gradient(180deg, rgba(15, 33, 23, 0.98), rgba(7, 18, 12, 0.98)),
    rgba(7, 18, 12, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -8px 14px rgba(0, 0, 0, 0.2),
    0 12px 20px rgba(0, 0, 0, 0.24);
}

.die.is-dice-box-proxy .die-cube {
  display: none;
}

.die.is-dice-box-proxy .die-state-badge {
  top: 20px;
}

.die.is-dice-box-proxy .die-value-chip {
  bottom: 20px;
  min-width: 48px;
  min-height: 32px;
  font-size: 0.92rem;
}

.die.is-dice-box-proxy .die-hint {
  bottom: 2px;
}

.die.is-dice-box-proxy:is(:hover, :focus-visible)::before {
  opacity: 0.82;
  border-color: rgba(217, 238, 143, 0.34);
  background:
    linear-gradient(180deg, rgba(220, 241, 156, 0.14), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 50% 22%, rgba(220, 241, 156, 0.18), transparent 48%),
    rgba(6, 16, 11, 0.16);
  box-shadow:
    0 0 0 1px rgba(220, 241, 156, 0.08),
    0 14px 22px rgba(0, 0, 0, 0.2);
}

.die.is-dice-box-proxy.held {
  transform: translateY(-6px);
  box-shadow: none;
  filter: drop-shadow(0 18px 26px rgba(140, 184, 69, 0.24));
}

.die.is-dice-box-proxy.held::after {
  border-color: rgba(220, 241, 156, 0.5);
  background:
    linear-gradient(180deg, rgba(104, 134, 52, 0.96), rgba(48, 74, 28, 0.98)),
    rgba(48, 74, 28, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -10px 14px rgba(26, 43, 14, 0.22),
    0 14px 24px rgba(79, 111, 28, 0.24);
}

.die.is-dice-box-proxy.held::before {
  opacity: 0.9;
  border-color: rgba(220, 241, 156, 0.32);
  background:
    linear-gradient(180deg, rgba(171, 202, 82, 0.16), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 50% 22%, rgba(220, 241, 156, 0.16), transparent 46%),
    rgba(10, 24, 16, 0.18);
  box-shadow:
    0 0 0 1px rgba(220, 241, 156, 0.06),
    0 16px 26px rgba(57, 88, 20, 0.18);
}

.die-button.held {
  transform: translateY(-8px);
  filter: drop-shadow(0 20px 32px rgba(109, 151, 42, 0.24));
}

.die-button.held::before {
  opacity: 1;
  inset: auto 8px 4px;
  height: 30px;
  background:
    radial-gradient(circle, rgba(208, 170, 84, 0.46), rgba(178, 235, 113, 0.16) 42%, rgba(3, 10, 6, 0) 72%);
}

.die-button.held::after {
  content: "" !important;
  width: 92px;
  height: 24px;
  bottom: 16px;
  border-color: rgba(216, 237, 161, 0.54);
  background:
    linear-gradient(180deg, rgba(228, 244, 173, 0.18), rgba(255, 255, 255, 0.03)),
    rgba(12, 29, 20, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(225, 244, 173, 0.16),
    0 14px 22px rgba(109, 151, 42, 0.22),
    0 0 22px rgba(223, 187, 91, 0.18);
  transform: translateX(-50%) translateY(0) scale(1.02);
}

.die-button.held .die-face {
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.98), transparent 32%),
    linear-gradient(160deg, #fffef9 0%, #f8efd9 52%, #e2cda3 100%);
  border-color: rgba(219, 237, 166, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -18px 30px rgba(170, 126, 64, 0.12),
    0 0 0 1px rgba(212, 233, 134, 0.18),
    0 0 0 8px rgba(219, 237, 166, 0.06),
    0 16px 30px rgba(96, 136, 46, 0.18);
}

.die-button.held .die-face--surface-top {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 239, 214, 0.98)),
    linear-gradient(160deg, #fffef9 0%, #f6eed6 100%);
}

.die-button.held .die-face--surface-right {
  background:
    linear-gradient(180deg, rgba(244, 233, 206, 0.98), rgba(228, 210, 169, 0.98)),
    linear-gradient(160deg, #f1e1ba 0%, #dfc694 100%);
}

.die-button.held .pip {
  background:
    radial-gradient(circle at 30% 26%, rgba(66, 93, 55, 0.98), rgba(24, 38, 25, 0.98) 60%, rgba(6, 10, 8, 0.98) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    0 2px 3px rgba(0, 0, 0, 0.2);
}

.die-button.held .die-state-badge {
  top: -20px;
  min-height: 22px;
  padding: 3px 10px;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  border-color: rgba(216, 237, 161, 0.52);
  background:
    linear-gradient(180deg, rgba(216, 237, 161, 0.34), rgba(216, 237, 161, 0.12)),
    rgba(18, 38, 26, 0.9);
  color: #f8ffea;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(7, 20, 13, 0.18);
}

.die-button.held .die-value-chip {
  border-color: rgba(216, 237, 161, 0.34);
  background:
    linear-gradient(180deg, rgba(72, 88, 28, 0.98), rgba(27, 48, 20, 0.98)),
    rgba(27, 48, 20, 0.98);
  color: #fff0bc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 18px rgba(63, 101, 29, 0.16);
}

.dice-board.has-held-dice .dice-hold-hint {
  color: var(--club-green-strong);
}

@media (max-height: 860px) and (min-width: 980px) {
  .brand-bar {
    padding: 10px 18px 0;
  }

  .brand-bar-inner {
    padding: 12px 16px;
  }

  .brand-wordmark .brand-name {
    font-size: 2.72rem;
  }

  .brand-wordmark .brand-tagline {
    font-size: 0.72rem;
    letter-spacing: 0.28em;
  }

  .brand-nav {
    gap: 6px;
  }

  .brand-nav-button {
    padding: 8px 10px 12px;
    font-size: 0.86rem;
  }

  .brand-profile {
    gap: 10px;
    padding: 6px 12px 6px 8px;
  }

  .brand-profile-avatar .player-avatar {
    width: 40px;
    height: 40px;
  }

  .header-utility-button--compact,
  #score-total {
    min-height: 38px;
  }

  .page-shell {
    padding: 10px 18px 24px;
  }

  .club-layout {
    gap: 14px;
    grid-template-columns: minmax(250px, 292px) minmax(0, 1fr) minmax(270px, 320px);
  }

  .club-rail,
  .app-layout {
    gap: 12px;
  }

  .club-card,
  .tee-sheet-panel,
  .play-surface {
    padding: 16px;
  }

  .room-summary-button {
    margin-top: 12px;
    min-height: 44px;
  }

  .status-feed-card .result-banner {
    min-height: 96px;
    padding: 16px;
  }

  .player-summary-row {
    padding: 10px 11px;
  }

  .dice-stage {
    min-height: 438px;
    gap: 10px;
  }

  .dice-stage-header {
    gap: 10px;
    padding: 10px 12px;
  }

  .stage-stat {
    min-height: 56px;
    padding: 10px;
  }

  .stage-stat strong {
    font-size: 0.94rem;
  }

  #dice-owner-label {
    font-size: clamp(1.56rem, 2.8vw, 2.3rem);
  }

  .dice-owner-detail {
    font-size: 0.82rem;
  }

  .dice-board {
    min-height: 248px;
  }

  .board-meta-card {
    min-width: 98px;
    padding: 10px 12px;
  }

  .board-meta-card--wind {
    left: 14px;
    top: 14px;
  }

  .board-meta-card--course {
    right: 14px;
    top: 14px;
    min-width: 148px;
  }

  .board-meta-card strong {
    font-size: 1.3rem;
  }

  .course-card-button {
    min-height: 36px;
    margin-top: 4px;
  }

  .dice-grid {
    min-height: 246px;
    gap: 16px 14px;
    padding: 44px 20px 48px;
  }

  .dice-grid.is-dice-box-display {
    left: 12px;
    right: 12px;
    top: 104px;
    bottom: 28px;
    gap: 12px;
  }

  .dice-grid::before {
    inset: 34px 34px 54px;
  }

  .die {
    --die-pedestal-width: 72px;
    --die-pedestal-height: 20px;
    width: 88px;
  }

  .die.is-dice-box-proxy {
    width: 96px;
    height: 126px;
  }

  .die-cube {
    inset: 6px 6px 24px;
  }

  .die-face {
    border-radius: 20px;
    padding: 11px;
  }

  .die-value-chip {
    min-width: 34px;
    min-height: 24px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .die-state-badge {
    top: -8px;
    min-height: 26px;
    padding: 4px 10px;
    font-size: 0.68rem;
  }

  .die-hint {
    bottom: -15px;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .dice-hold-hint {
    bottom: 12px;
    font-size: 0.68rem;
  }

  .dice-stage-footer {
    grid-template-columns: minmax(0, 1fr) minmax(240px, auto);
    gap: 10px;
  }

  .stage-score {
    gap: 3px;
    padding: 12px 14px;
  }

  .stage-score-value {
    font-size: clamp(1.65rem, 2.4vw, 2.4rem);
  }

  .stage-score-note {
    font-size: 0.8rem;
  }

  #roll-button,
  #score-button {
    min-height: 52px;
    font-size: 0.92rem;
  }

  .tee-sheet-panel {
    top: 88px;
    gap: 10px;
  }

  .tee-sheet th,
  .tee-sheet td {
    padding: 10px 11px;
  }

  .live-round-card {
    gap: 8px;
    padding: 12px;
  }

  .live-round-head h3 {
    font-size: 1.34rem;
  }

  .live-round-button {
    min-height: 40px;
  }
}

.overlay-panel--room:has(.roster-panel[hidden]) {
  width: min(1080px, calc(100vw - 48px));
}

.overlay-body--room:has(.roster-panel[hidden]) .room-hub {
  max-width: 980px;
}

.overlay-panel--room:has(.room-start-panel:not([hidden])) {
  max-height: min(90vh, 920px);
}

.overlay-panel--room:has(.room-start-panel:not([hidden])) .overlay-header {
  padding-bottom: 14px;
}

.overlay-panel--room:has(.room-start-panel:not([hidden])) .overlay-body {
  padding-top: 16px;
}

.overlay-panel--room:has(.room-start-panel:not([hidden])) .room-hub {
  padding: 18px;
}

.room-start-panel,
.room-join-panel {
  gap: 18px;
}

.room-start-head,
.room-club-note-head,
.room-join-copy {
  display: grid;
  gap: 6px;
}

.room-start-head h4,
.room-club-note-head h4,
.room-launch-copy h4,
.room-join-copy h4,
.setup-preview-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.6vw, 2.25rem);
  line-height: 0.98;
  color: var(--club-ivory);
}

.room-launch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.room-launch-card,
.room-club-note,
.room-join-stage,
.setup-preview-card {
  border: 1px solid rgba(216, 191, 140, 0.14);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 18, 13, 0.76);
  box-shadow: var(--club-shadow-soft);
}

.room-launch-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  align-content: start;
}

.room-launch-visual {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(216, 191, 140, 0.14);
  background:
    linear-gradient(180deg, rgba(2, 8, 6, 0.16), rgba(2, 8, 6, 0.56)),
    rgba(7, 20, 14, 0.78);
}

.room-launch-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), transparent 30%),
    linear-gradient(180deg, transparent 48%, rgba(4, 12, 9, 0.62));
  pointer-events: none;
}

.room-launch-visual--host {
  background:
    linear-gradient(180deg, rgba(2, 8, 6, 0.08), rgba(2, 8, 6, 0.42)),
    url("/assets/ui/clubhouse-green-night.png") center center / cover no-repeat;
}

.room-launch-green,
.room-launch-hole,
.room-launch-flagstick,
.room-launch-flag {
  position: absolute;
  display: block;
  z-index: 1;
}

.room-launch-green {
  left: 16%;
  right: 16%;
  top: 26%;
  bottom: 22%;
  border-radius: 999px;
  border: 1px solid rgba(244, 248, 221, 0.18);
  background:
    radial-gradient(circle at 50% 44%, rgba(217, 238, 143, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(34, 86, 54, 0.68), rgba(9, 29, 20, 0.7));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -20px 32px rgba(0, 0, 0, 0.22);
}

.room-launch-hole {
  left: 50%;
  top: 50%;
  width: 22px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 14, 11, 0.96), rgba(39, 28, 18, 0.88) 70%, rgba(160, 210, 121, 0.36));
  transform: translate(-50%, 40px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.room-launch-flagstick {
  left: 50%;
  top: 50%;
  width: 2px;
  height: 70px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 248, 229, 0.92), rgba(199, 181, 142, 0.92));
  transform: translate(-50%, -20px);
}

.room-launch-flag {
  left: 50%;
  top: 50%;
  width: 34px;
  height: 20px;
  border-radius: 3px 10px 10px 3px;
  background: linear-gradient(180deg, #fef5d7 0%, #f3d279 26%, #d86145 26%, #d24f33 100%);
  clip-path: polygon(0 0, 100% 0, 74% 50%, 100% 100%, 0 100%);
  transform: translate(2px, -18px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.room-launch-visual--join {
  background:
    radial-gradient(circle at 30% 22%, rgba(216, 191, 140, 0.16), transparent 26%),
    radial-gradient(circle at 68% 64%, rgba(219, 237, 166, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(7, 20, 15, 0.82), rgba(4, 14, 10, 0.94));
}

.room-launch-die {
  position: absolute;
  width: 88px;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  border: 1px solid rgba(216, 191, 140, 0.18);
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.94), transparent 30%),
    linear-gradient(160deg, #fffdf6 0%, #f7edd7 48%, #e3cea5 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -14px 22px rgba(170, 126, 64, 0.12),
    0 18px 28px rgba(0, 0, 0, 0.18);
}

.room-launch-die::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 18px 18px, rgba(32, 51, 33, 0.9) 0 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), rgba(32, 51, 33, 0.9) 0 4px, transparent 5px),
    radial-gradient(circle at 50% 50%, rgba(32, 51, 33, 0.9) 0 4px, transparent 5px);
}

.room-launch-die--one {
  left: 24%;
  top: 30%;
  transform: rotate(-10deg);
}

.room-launch-die--two {
  right: 22%;
  top: 38%;
  transform: rotate(12deg);
}

.room-launch-copy {
  display: grid;
  gap: 8px;
}

.room-launch-copy p:last-child,
.room-club-step p,
.setup-preview-note {
  margin: 0;
  color: var(--club-text-soft);
  line-height: 1.58;
  font-size: 0.9rem;
}

.overlay-panel--room:has(.room-start-panel:not([hidden])) .room-start-panel {
  gap: 14px;
}

.overlay-panel--room:has(.room-start-panel:not([hidden])) .room-launch-card {
  gap: 12px;
  padding: 14px;
}

.overlay-panel--room:has(.room-start-panel:not([hidden])) .room-launch-visual {
  min-height: 152px;
}

.overlay-panel--room:has(.room-start-panel:not([hidden])) .room-launch-copy p:last-child,
.overlay-panel--room:has(.room-start-panel:not([hidden])) .room-club-step p {
  font-size: 0.84rem;
  line-height: 1.46;
}

.room-club-note {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.room-club-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.room-club-step {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(216, 191, 140, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(8, 20, 15, 0.56);
}

.room-club-step-index {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 250, 236, 0.92), rgba(236, 218, 178, 0.92)),
    rgba(255, 250, 236, 0.94);
  color: #4c3a15;
  font-size: 0.76rem;
  font-weight: 700;
}

.room-club-step strong {
  color: var(--club-ivory);
  font-size: 0.98rem;
}

.overlay-panel--room:has(.room-start-panel:not([hidden])) .room-club-note {
  gap: 10px;
  padding: 14px;
}

.overlay-panel--room:has(.room-start-panel:not([hidden])) .room-club-step {
  gap: 6px;
  padding: 12px;
}

.overlay-panel--room:has(.room-start-panel:not([hidden])) .room-club-step strong {
  font-size: 0.92rem;
}

.room-join-stage {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
}

.room-join-preview {
  position: relative;
  min-height: 200px;
  border-radius: 22px;
  padding: 18px;
  overflow: hidden;
  display: grid;
  align-content: end;
  gap: 6px;
  border: 1px solid rgba(216, 191, 140, 0.14);
  background:
    linear-gradient(180deg, rgba(2, 8, 6, 0.06), rgba(2, 8, 6, 0.52)),
    url("/assets/ui/clubhouse-green-night.png") center center / cover no-repeat;
}

.room-join-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), transparent 30%),
    linear-gradient(180deg, transparent 42%, rgba(4, 12, 9, 0.72));
  pointer-events: none;
}

.room-join-preview-label,
.room-join-preview strong,
.room-join-preview span:last-child {
  position: relative;
  z-index: 1;
}

.room-join-preview-label {
  color: var(--club-gold);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.room-join-preview strong {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 0.96;
  color: var(--club-ivory);
}

.room-join-preview span:last-child {
  color: rgba(245, 239, 225, 0.84);
  font-size: 0.92rem;
  line-height: 1.5;
}

.setup-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
}

.setup-preview-card {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.setup-preview-media {
  min-height: 226px;
  border-radius: 22px;
  border: 1px solid rgba(216, 191, 140, 0.14);
  background:
    linear-gradient(180deg, rgba(2, 8, 6, 0.06), rgba(2, 8, 6, 0.48)),
    url("/assets/ui/clubhouse-green-night.png") center center / cover no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 28px rgba(0, 0, 0, 0.18);
}

.setup-preview-copy {
  display: grid;
  gap: 10px;
}

.setup-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setup-preview-card .match-pill {
  border-color: rgba(216, 191, 140, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(8, 20, 15, 0.56);
  color: var(--club-gold);
}

@media (max-width: 1180px) {
  .room-launch-grid,
  .room-club-note-grid,
  .setup-board,
  .room-join-stage {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .room-launch-visual {
    min-height: 164px;
  }

  .room-club-step {
    padding: 12px;
  }

  .setup-preview-media {
    min-height: 184px;
  }
}

@media (max-width: 720px) {
  .overlay-panel--room:has(.roster-panel[hidden]) {
    width: min(100vw - 28px, 1080px);
  }

  .room-launch-card,
  .room-club-note,
  .room-join-stage,
  .setup-preview-card {
    padding: 14px;
  }

  .room-launch-copy h4,
  .room-start-head h4,
  .room-club-note-head h4,
  .room-join-copy h4,
  .setup-preview-copy h3 {
    font-size: 1.5rem;
  }

  .room-launch-die {
    width: 76px;
  }

  .room-join-preview {
    min-height: 172px;
  }
}

/* ── Premium Room + Recap Fidelity Pass ── */

.overlay-panel--room:has(.room-host-panel:not([hidden])),
.overlay-panel--room:has(.room-joined-panel:not([hidden])) {
  width: min(1160px, calc(100vw - 44px));
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .overlay-body--room,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .overlay-body--room {
  gap: 22px;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .overlay-body--room {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.84fr);
}

.overlay-panel--room:has(.room-joined-panel:not([hidden])) .overlay-body--room {
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.86fr);
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-hub,
.overlay-panel--room:has(.room-host-panel:not([hidden])) .roster-panel,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-hub,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .roster-panel {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-hub::before,
.overlay-panel--room:has(.room-host-panel:not([hidden])) .roster-panel::before,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-hub::before,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .roster-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 118px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(216, 191, 140, 0.1), transparent 88%),
    radial-gradient(circle at top left, rgba(219, 237, 166, 0.08), transparent 48%);
  opacity: 0.9;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-mode-head,
.overlay-panel--room:has(.room-host-panel:not([hidden])) .roster-head,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-mode-head,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .roster-head {
  position: relative;
  z-index: 1;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-host-panel {
  gap: 12px;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-hero {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 16px;
  gap: 8px;
  border-color: rgba(216, 191, 140, 0.18);
  background:
    linear-gradient(180deg, rgba(4, 12, 9, 0.22), rgba(4, 12, 9, 0.82)),
    url("/assets/lobby-green-loop-poster.png") center center / cover no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 40px rgba(0, 0, 0, 0.16);
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), transparent 30%),
    linear-gradient(180deg, transparent 38%, rgba(4, 12, 9, 0.78));
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-hero > * {
  position: relative;
  z-index: 1;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-hero strong {
  font-size: clamp(2.45rem, 4vw, 3.15rem);
  letter-spacing: 0.18em;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-hero-status {
  max-width: none;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(216, 191, 140, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(5, 16, 12, 0.54);
  color: rgba(245, 239, 225, 0.9);
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .lobby-video-module {
  min-height: 194px;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .lobby-video,
.overlay-panel--room:has(.room-host-panel:not([hidden])) .lobby-video-module {
  min-height: 194px;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .share-bar {
  padding: 14px 15px;
  border: 1px solid rgba(216, 191, 140, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.68);
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-link-copy {
  gap: 6px;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-link-copy a {
  font-size: 0.84rem;
  line-height: 1.55;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-inline-actions--host {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) #start-room-game-button {
  grid-column: 1 / -1;
  min-height: 56px;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .share-note {
  padding-left: 2px;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .roster-summary,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .roster-summary {
  padding: 13px 14px;
  border: 1px solid rgba(216, 191, 140, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.52);
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .player-names,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .player-names {
  gap: 10px;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .player-card,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .player-card {
  padding: 14px 15px;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-chat-panel--overlay,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-chat-panel--overlay {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(216, 191, 140, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.58);
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-chat-log--compact,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-chat-log--compact {
  max-height: 154px;
}

.overlay-panel--room:has(.room-host-panel:not([hidden])) .room-chat-form--compact,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-chat-form--compact {
  grid-template-columns: minmax(0, 1fr) auto;
}

.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-joined-panel {
  position: relative;
  overflow: hidden;
  padding: 18px;
  gap: 16px;
  min-height: 100%;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(6, 17, 13, 0.66);
}

.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-joined-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 228px;
  border-radius: 22px;
  border: 1px solid rgba(216, 191, 140, 0.16);
  background:
    linear-gradient(180deg, rgba(4, 12, 9, 0.1), rgba(4, 12, 9, 0.52)),
    url("/assets/ui/clubhouse-green-night.png") center center / cover no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 36px rgba(0, 0, 0, 0.18);
}

.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-joined-panel > * {
  position: relative;
  z-index: 1;
}

.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-hero--joined {
  margin-top: 112px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.82fr);
  grid-template-areas:
    "label status"
    "code status";
  gap: 10px 14px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-hero--joined .section-label {
  grid-area: label;
  align-self: end;
  color: rgba(245, 239, 225, 0.74);
}

.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-hero--joined strong {
  grid-area: code;
  align-self: start;
  font-size: clamp(2.2rem, 4vw, 3rem);
  letter-spacing: 0.18em;
  color: var(--club-ivory);
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-hero--joined .room-hero-status {
  grid-area: status;
  align-self: stretch;
  margin-top: 0;
  max-width: none;
  padding: 16px;
  border: 1px solid rgba(216, 191, 140, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(5, 16, 12, 0.6);
  color: rgba(245, 239, 225, 0.9);
}

.overlay-panel--room:has(.room-joined-panel:not([hidden])) .lobby-video-module--joined {
  min-height: 176px;
  background:
    radial-gradient(circle at top left, rgba(219, 237, 166, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(8, 18, 12, 0.84), rgba(5, 11, 8, 0.96));
}

.overlay-panel--room:has(.room-joined-panel:not([hidden])) .lobby-video-module--joined,
.overlay-panel--room:has(.room-joined-panel:not([hidden])) .lobby-video-module--joined .lobby-video {
  min-height: 176px;
}

.overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-inline-actions--joined {
  grid-template-columns: minmax(0, 1fr);
}

.round-recap-panel {
  position: relative;
  overflow: hidden;
}

.round-recap-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 198px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 12, 9, 0.12), rgba(4, 12, 9, 0.7)),
    url("/assets/ui/clubhouse-green-night.png") center top / cover no-repeat;
  opacity: 0.9;
}

.round-recap-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), transparent 24%),
    linear-gradient(180deg, transparent 36%, rgba(5, 16, 12, 0.32) 100%);
}

.round-recap-head,
.round-recap-grid {
  position: relative;
  z-index: 1;
}

.round-recap-head {
  align-items: flex-end;
  min-height: 152px;
}

.round-recap-standings {
  display: grid;
}

.recap-stat-card {
  position: relative;
  overflow: hidden;
}

.recap-stat-card:nth-child(2)::before {
  content: "";
  display: block;
  min-height: 136px;
  border-radius: 18px;
  border: 1px solid rgba(216, 191, 140, 0.16);
  background:
    linear-gradient(180deg, rgba(4, 12, 9, 0.1), rgba(4, 12, 9, 0.48)),
    url("/assets/lobby-green-loop-poster.png") center center / cover no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 28px rgba(0, 0, 0, 0.18);
}

.recap-highlight {
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(216, 191, 140, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.58);
}

.round-recap-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .overlay-panel--room:has(.room-host-panel:not([hidden])) .overlay-body--room,
  .overlay-panel--room:has(.room-joined-panel:not([hidden])) .overlay-body--room {
    grid-template-columns: minmax(0, 1fr);
  }

  .overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-hero--joined {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "label"
      "code"
      "status";
  }
}

@media (max-width: 720px) {
  .overlay-panel--room:has(.room-host-panel:not([hidden])),
  .overlay-panel--room:has(.room-joined-panel:not([hidden])) {
    width: min(100vw - 28px, 1160px);
  }

  .overlay-panel--room:has(.room-host-panel:not([hidden])) .room-hub,
  .overlay-panel--room:has(.room-host-panel:not([hidden])) .roster-panel,
  .overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-hub,
  .overlay-panel--room:has(.room-joined-panel:not([hidden])) .roster-panel {
    padding: 16px;
  }

  .overlay-panel--room:has(.room-host-panel:not([hidden])) .room-inline-actions--host,
  .round-recap-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-joined-panel::before {
    height: 186px;
  }

  .overlay-panel--room:has(.room-joined-panel:not([hidden])) .room-hero--joined {
    margin-top: 94px;
  }

  .round-recap-panel::before {
    height: 152px;
  }

  .round-recap-head {
    min-height: 126px;
  }
}

/* ── Premium Teaching Boards ── */

.overlay-panel--instructions,
.overlay-panel--tutorial {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.9);
  box-shadow:
    0 36px 100px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.overlay-panel--instructions::before,
.overlay-panel--tutorial::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 210px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 12, 9, 0.12), rgba(4, 12, 9, 0.7)),
    url("/assets/ui/clubhouse-green-night.png") center top / cover no-repeat;
  opacity: 0.92;
}

.overlay-panel--instructions::after,
.overlay-panel--tutorial::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), transparent 24%),
    linear-gradient(180deg, transparent 36%, rgba(5, 16, 12, 0.28) 100%);
}

.overlay-header--instructions,
.overlay-header--tutorial,
.overlay-body--instructions,
.overlay-body--tutorial {
  position: relative;
  z-index: 1;
}

.overlay-header--instructions,
.overlay-header--tutorial {
  align-items: flex-end;
  gap: 22px;
  padding: 26px 28px 18px;
  background:
    linear-gradient(180deg, rgba(5, 16, 12, 0.18), rgba(5, 16, 12, 0.88)),
    transparent;
  border-bottom-color: rgba(216, 191, 140, 0.14);
}

.overlay-header--instructions .overlay-copy,
.overlay-header--tutorial .overlay-copy {
  gap: 8px;
}

.overlay-header--instructions .overlay-copy h2,
.overlay-header--tutorial .overlay-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 4.4vw, 3.8rem);
  line-height: 0.94;
  color: var(--club-ivory);
}

.overlay-header--instructions .overlay-note,
.overlay-header--tutorial .overlay-note {
  color: rgba(240, 232, 214, 0.8);
  max-width: 56ch;
}

.overlay-body--instructions {
  gap: 20px;
  padding: 24px 28px 30px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.05), transparent 18%),
    rgba(5, 16, 12, 0.26);
}

.manual-hero {
  position: relative;
  overflow: hidden;
  gap: 18px;
  min-height: 250px;
  padding: 28px 28px 24px;
  border-color: rgba(216, 191, 140, 0.16);
  background:
    linear-gradient(180deg, rgba(4, 12, 9, 0.1), rgba(4, 12, 9, 0.7)),
    url("/assets/lobby-green-loop-poster.png") center center / cover no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 22px 44px rgba(0, 0, 0, 0.2);
}

.manual-hero::before {
  content: "";
  position: absolute;
  inset: 0 34% 0 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 12, 9, 0.92) 0%, rgba(4, 12, 9, 0.78) 58%, rgba(4, 12, 9, 0.18) 100%);
}

.manual-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.04), transparent 24%),
    linear-gradient(180deg, rgba(4, 12, 9, 0.06), rgba(4, 12, 9, 0.78));
}

.manual-hero > * {
  position: relative;
  z-index: 1;
}

.manual-hero-copy {
  max-width: 54ch;
  padding: 22px 24px 20px;
  border: 1px solid rgba(216, 191, 140, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(4, 12, 9, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 30px rgba(0, 0, 0, 0.18);
}

.manual-hero-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 0.96;
  color: var(--club-ivory);
}

.manual-hero-copy p,
.manual-section p,
.manual-side-card p,
.manual-rule-item span,
.manual-bullet-list li,
.manual-quick-list span {
  color: var(--club-text-soft);
}

.manual-chip-row,
.manual-hero-actions {
  max-width: 54ch;
}

.manual-chip-row {
  gap: 12px;
}

.manual-chip-row .manual-chip {
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(4, 12, 9, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.12);
}

.manual-hero-actions {
  align-items: center;
}

.manual-hero-caption {
  color: rgba(240, 232, 214, 0.78);
}

.manual-hero-strip {
  gap: 14px;
}

.manual-hero-stat {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.manual-section-head h3,
.manual-side-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 0.98;
}

.manual-main {
  gap: 20px;
}

.manual-section {
  gap: 14px;
}

.manual-flow-card,
.manual-tip-card,
.manual-par-card,
.manual-rule-item--spotlight,
.manual-side-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 28px rgba(0, 0, 0, 0.16);
}

.manual-rule-band--grid,
.manual-tip-grid {
  gap: 14px;
}

.manual-side-card:first-child {
  position: sticky;
  top: 0;
  overflow: hidden;
}

.manual-side-card:first-child::before {
  content: "";
  display: block;
  min-height: 128px;
  margin: -22px -22px 0;
  border-radius: 24px 24px 20px 20px;
  background:
    linear-gradient(180deg, rgba(4, 12, 9, 0.08), rgba(4, 12, 9, 0.52)),
    url("/assets/ui/clubhouse-green-night.png") center center / cover no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 28px rgba(0, 0, 0, 0.14);
}

.manual-side-card:first-child > :not(.section-label) {
  position: relative;
  z-index: 1;
}

.manual-side-card:first-child .section-label {
  position: relative;
  z-index: 1;
  margin-top: -92px;
}

.manual-side-callout {
  border-left-width: 2px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 18, 13, 0.6);
}

.overlay-body--tutorial {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 22px 28px 28px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.05), transparent 18%),
    rgba(5, 16, 12, 0.26);
}

.tutorial-stage {
  order: 1;
  gap: 16px;
  padding: 0;
  overflow: visible;
}

.tutorial-step-card {
  position: relative;
  overflow: hidden;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(216, 191, 140, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 18, 13, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 36px rgba(0, 0, 0, 0.2);
}

.tutorial-step-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 236px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 12, 9, 0.06), rgba(4, 12, 9, 0.58)),
    url("/assets/lobby-green-loop-poster.png") center center / cover no-repeat;
  opacity: 0.94;
}

.tutorial-step-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.06), transparent 24%),
    linear-gradient(180deg, transparent 38%, rgba(5, 16, 12, 0.22) 100%);
}

.tutorial-step-card > * {
  position: relative;
  z-index: 1;
}

.tutorial-step-head {
  align-items: flex-end;
}

.tutorial-step-head h3 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4vw, 3rem);
  line-height: 0.96;
}

.tutorial-step-lead {
  max-width: 60ch;
  color: rgba(240, 232, 214, 0.82);
}

.tutorial-board {
  gap: 18px;
}

.tutorial-lesson-card,
.tutorial-check-card,
.tutorial-summary-card,
.tutorial-rail-card {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 28px rgba(0, 0, 0, 0.16);
}

.tutorial-lesson-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
}

.tutorial-lesson-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at bottom center, rgba(219, 237, 166, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 251, 241, 0.04), transparent 36%);
}

.tutorial-lesson-card > * {
  position: relative;
  z-index: 1;
}

.tutorial-card-eyebrow,
.tutorial-step-chip,
.tutorial-status-badge {
  color: var(--club-gold);
  border-color: rgba(216, 191, 140, 0.2);
}

.tutorial-tag {
  border-color: rgba(216, 191, 140, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.42);
  color: rgba(240, 232, 214, 0.74);
}

.tutorial-dice-row {
  justify-content: center;
  gap: 14px;
}

.tutorial-die {
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 16, 12, 0.5);
}

.tutorial-die.is-selected {
  box-shadow:
    0 0 0 3px rgba(216, 191, 140, 0.14),
    0 18px 28px rgba(0, 0, 0, 0.16);
}

.tutorial-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.tutorial-rail {
  order: 2;
  justify-items: center;
  gap: 14px;
  padding: 0;
  border-right: 0;
  background: none;
}

.tutorial-progress-head {
  width: min(560px, 100%);
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.tutorial-progress-head .section-label {
  color: var(--club-gold);
}

.tutorial-progress-track {
  width: min(320px, 100%);
}

.tutorial-progress-list {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tutorial-progress-step {
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  box-shadow: none;
  grid-template-columns: auto;
}

.tutorial-progress-step:hover:not(:disabled) {
  transform: none;
}

.tutorial-progress-copy {
  display: none;
}

.tutorial-progress-index {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  font-size: 0;
  border-color: rgba(216, 191, 140, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.2), rgba(255, 255, 255, 0.06)),
    rgba(6, 18, 13, 0.46);
}

.tutorial-progress-step.is-current .tutorial-progress-index,
.tutorial-progress-step.is-complete .tutorial-progress-index {
  background:
    linear-gradient(180deg, rgba(219, 237, 166, 0.96), rgba(216, 191, 140, 0.92)),
    rgba(219, 237, 166, 0.94);
}

.tutorial-rail-card {
  width: min(420px, 100%);
}

@media (max-width: 1180px) {
  .overlay-body--instructions,
  .overlay-body--tutorial,
  .tutorial-board {
    grid-template-columns: minmax(0, 1fr);
  }

  .manual-par-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .overlay-header--instructions,
  .overlay-header--tutorial,
  .overlay-body--instructions,
  .overlay-body--tutorial {
    padding-left: 18px;
    padding-right: 18px;
  }

  .overlay-panel--instructions::before,
  .overlay-panel--tutorial::before {
    height: 156px;
  }

  .manual-hero,
  .tutorial-step-card {
    padding: 18px;
  }

  .manual-side-card:first-child::before {
    min-height: 104px;
  }

  .manual-side-card:first-child .section-label {
    margin-top: -76px;
  }

  .manual-hero-strip,
  .manual-flow-grid,
  .manual-rule-band--grid,
  .manual-tip-grid,
  .manual-par-grid,
  .tutorial-board--summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .tutorial-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .tutorial-nav-button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 960px) {
  .club-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .club-rail--left,
  .app-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
