.stage { max-width: 960px; }
.gl-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100svh - 190px); border-radius: 16px; overflow: hidden; background: #120c08; }
.gl-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-height: none; border-radius: 0; }
#hud { pointer-events: none; }
.gl-touch { position: absolute; inset: 0; touch-action: none; cursor: pointer; }
.gl-bar { margin-top: 12px; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.gl-hint { color: var(--muted); font-size: .82rem; margin-inline-start: auto; }
.ld-roll { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 500; }
.ld-roll:hover:not(:disabled) { color: var(--ink); border-color: var(--gold-l); filter: brightness(1.08); }
.ld-roll:disabled { background: transparent; color: var(--muted); border-color: var(--line); cursor: default; opacity: .6; }
/* شاشة اختيار اللاعبين */
.stage .overlay { background: rgba(10, 7, 5, .72); overflow-y: auto; padding: 18px; }
.stage .overlay > div { max-width: 460px; }
.ld-opts { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 0 auto 10px; }
.ld-opts button { background: rgba(255, 255, 255, .05); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; cursor: pointer; font: inherit; font-size: .85rem; transition: border-color .2s, background .2s; }
.ld-opts button:hover { border-color: var(--line2); color: var(--text); }
.ld-opts button.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.ld-opts.off { display: none; }
.stage .overlay p.ld-note { margin: 2px 0 16px; font-size: .82rem; }
.ld-rank { list-style: none; padding: 0; margin: 4px auto 18px; max-width: 270px; text-align: start; }
.ld-rank li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.ld-rank li:last-child { border-bottom: 0; }
.ld-rank b { color: var(--gold-l); font-weight: 500; min-width: 58px; }
.ld-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.ld-dot.c0 { background: #d8432f; } .ld-dot.c1 { background: #2e9d57; } .ld-dot.c2 { background: #e8b320; } .ld-dot.c3 { background: #2f6fd8; }
@media (max-width: 640px) {
  .gl-wrap { aspect-ratio: 5 / 6; }
  .gl-hint { flex-basis: 100%; }
  .gl-bar .cbtn { flex: 1 1 auto; }
  .stage .overlay { padding: 10px; }
  .stage .overlay h2 { font-size: 1.5rem; margin: 2px 0 8px; }
  .ld-opts button { padding: 6px 12px; font-size: .8rem; }
}
