/* Game details page (D93). Desktop first (D29), phones must work (D28). */

.gp { padding: 8px 0 40px; }
.gp-back { margin: 0 0 12px; font-weight: 700; }
.gp-back a { text-decoration: none; }

/* Media left, info right on wide screens; info (with Play) is first in the page for keyboard users. */
.gp-head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.gp-head .gp-media { grid-column: 1; grid-row: 1; }
.gp-head .gp-info { grid-column: 2; grid-row: 1; }

.gp-info h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 0 0 6px; letter-spacing: -0.01em; }
.gp-desc { margin: 0 0 18px; font-size: 18px; }
.gp-note { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--mc-radius-sm); background: #fff4d6; font-size: 15px; }
.gp-small { font-size: 14px; margin: 10px 0 0; }

.gp-actions { display: flex; flex-direction: column; gap: 10px; margin: 0 0 8px; }
.gp-row { display: flex; flex-wrap: wrap; gap: 10px; }
.gp-row:empty { display: none; }
.gp-play { font-size: 19px; padding: 12px 28px; justify-content: center; }
.gp-level {
  min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--mc-border);
  background: var(--mc-surface); color: var(--mc-text); font: inherit; font-weight: 700;
}

/* The stage keeps one 16:9 box; portrait items sit inside it without cropping (no layout shift). */
.gp-media { min-width: 0; }
.gp-media:focus { outline: none; }
.gp-stage {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--mc-radius); overflow: hidden;
  background: #1d1630; box-shadow: var(--mc-shadow);
}
.gp-zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gp-media-el { display: block; width: 100%; height: 100%; object-fit: contain; }
.gp-media > .mc-game-art { border-radius: var(--mc-radius); box-shadow: var(--mc-shadow); }

.gp-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0 0; }
.gp-nav .button { min-width: 48px; justify-content: center; padding: 8px 14px; }
.gp-count { min-width: 56px; text-align: center; color: var(--mc-text-muted); font-weight: 700; font-size: 15px; }

.gp-thumbs { display: flex; gap: 8px; margin: 10px 0 0; overflow-x: auto; padding-bottom: 4px; }
.gp-thumb {
  flex: 0 0 auto; width: 112px; aspect-ratio: 16 / 9; padding: 0; border: 3px solid transparent; border-radius: var(--mc-radius-sm);
  overflow: hidden; background: #1d1630; cursor: pointer;
}
.gp-thumb[aria-current="true"] { border-color: var(--mc-violet); }
.gp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gp-thumb-video { display: grid; place-items: center; height: 100%; color: #fff; font-weight: 800; font-size: 14px; }

.gp-section { margin: 36px 0 0; max-width: 760px; }
.gp-section h2 { font-size: 24px; margin: 0 0 12px; }
.gp-section p { margin: 0 0 12px; white-space: pre-line; overflow-wrap: anywhere; }

.gp-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.gp-facts dt { font-weight: 700; color: var(--mc-text-muted); }
.gp-facts dd { margin: 0; overflow-wrap: anywhere; }

/* Full-size viewer */
.gp-box { width: min(1200px, 96vw); max-height: 96vh; padding: 12px; border: 0; border-radius: var(--mc-radius); background: #120d20; color: #fff; }
.gp-box::backdrop { background: rgba(10, 6, 20, 0.8); }
.gp-box-bar, .gp-box-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gp-box-count { font-weight: 700; }
.gp-box-stage { margin: 10px 0; }
.gp-box-stage .gp-media-el { max-height: calc(96vh - 140px); }

@media (max-width: 760px) {
  .gp-head { grid-template-columns: 1fr; gap: 20px; }
  .gp-head .gp-media { grid-row: 1; grid-column: 1; }
  .gp-head .gp-info { grid-row: 2; grid-column: 1; }
  .gp-play { flex: 1; }
  .gp-row > .gp-playmenu { flex: 1; } .gp-playmenu > summary { width: 100%; box-sizing: border-box; text-align: center; }
  .gp-facts { grid-template-columns: 1fr; gap: 2px; }
  .gp-facts dd { margin-bottom: 10px; }
  .gp-thumb { width: 88px; }
}

/* Leaderboard (D109) */
.gp-board-controls { align-items: center; margin: 0 0 12px; }
.gp-toggles { display: inline-flex; gap: 0; }
.gp-toggles .gp-toggle { border-radius: 0; padding: 8px 14px; }
.gp-toggles .gp-toggle:first-child { border-radius: 999px 0 0 999px; }
.gp-toggles .gp-toggle:last-child { border-radius: 0 999px 999px 0; margin-left: -2px; }
.gp-toggle[aria-pressed="true"] { background: var(--mc-yellow); }
.gp-board { width: 100%; border-collapse: collapse; font-size: 16px; }
.gp-board th, .gp-board td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--mc-border); overflow-wrap: anywhere; }
.gp-board th { color: var(--mc-text-muted); font-size: 14px; }
.gp-board td:first-child { width: 2.5em; font-weight: 800; }
.gp-section .gp-small { white-space: normal; }
@media (max-width: 480px) { .gp-board { font-size: 15px; } .gp-board th, .gp-board td { padding: 6px 4px; } }

/* Public rooms of this game (list from the Live page, filtered). */
.gp-rooms { display: grid; gap: 8px; }
.gp-room { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--mc-border); border-radius: var(--mc-radius-sm, 10px); background: var(--mc-surface, #fff); }
.gp-room-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.gp-room-main strong { overflow-wrap: anywhere; }
.gp-room-now { font-size: 12.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: #f1eef7; color: var(--mc-text-muted); white-space: nowrap; }
.gp-room-now.on { background: #dff5e3; color: #146c3a; }
@media (max-width: 480px) { .gp-room { flex-direction: column; align-items: stretch; } .gp-room .button { text-align: center; } }

/* One Play button with a small menu (Quick game | Play with friends). */
.gp-playmenu { position: relative; display: inline-block; }
.gp-playmenu > summary { list-style: none; cursor: pointer; }
.gp-playmenu > summary::-webkit-details-marker { display: none; }
.gp-playmenu > summary::after { content: " ▾"; font-size: 0.8em; }
.gp-menu { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; min-width: min(340px, calc(100vw - 32px)); display: grid; gap: 6px; padding: 8px; background: var(--mc-surface, #fff); border: 1px solid var(--mc-border); border-radius: var(--mc-radius, 14px); box-shadow: var(--mc-shadow, 0 8px 24px rgba(0,0,0,.12)); }
.gp-menu-quick { display: grid; gap: 4px; padding: 10px 12px 12px; border-radius: 10px; background: var(--mc-surface-2, #f4f1fb); }
.gp-menu-quick span { font-size: 13px; }
.gp-quick-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.gp-quick-label { font-size: 13px; font-weight: 700; white-space: nowrap; }
.gp-quick-row .gp-level { flex: 1; min-width: 0; width: auto; }
.gp-quick-start { white-space: nowrap; }
.gp-menu > .gp-menu-item { border-top: 1px solid var(--mc-border); border-radius: 0 0 10px 10px; }
.gp-menu > .gp-menu-item:not(:last-child) { border-radius: 0; } /* Arcade: the quick item before the friends one */
.gp-menu-item { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--mc-text); text-decoration: none; min-height: 44px; }
.gp-menu-item:hover, .gp-menu-item:focus-visible { background: var(--mc-surface-2, #f4f1fb); outline: none; }
.gp-menu-item span { font-size: 13px; }

.gp-playmenu > summary, .gp-menu { box-sizing: border-box; }
/* Quick match next to Play (owner 2026-10-24): as big as Play, violet outline; the waiting count only when someone waits. */
.gp-qm { border-color: var(--mc-violet); color: var(--mc-violet); }
.gp-qm:hover, .gp-qm:focus-visible { background: var(--mc-violet); color: #fff; border-color: var(--mc-violet); }
.gp-qm-line { margin: -2px 0 0; font-size: 14px; }
.gp-qm-waiting { font-weight: 700; color: var(--mc-text); white-space: nowrap; }
.gp-qm-waiting::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #1f9d55; vertical-align: 1px; }
@media (max-width: 480px) { .gp-qm { display: flex; width: 100%; box-sizing: border-box; } .gp-playmenu { display: block; width: 100%; } .gp-playmenu > summary { display: block; width: 100%; text-align: center; } .gp-menu { position: static; margin-top: 8px; min-width: 0; width: 100%; } .gp-quick-row { flex-wrap: wrap; } .gp-quick-row .gp-level { flex: 1 1 140px; } }
