:root {
  --bg: #f4f7fb;
  --bg-soft: #eaf0f8;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: rgba(255, 255, 255, 0.99);
  --text: #0f1a32;
  --muted: #60708f;
  --line: rgba(21, 38, 76, 0.12);
  --accent: #2972e9;
  --accent-2: #ff9a57;
  --accent-3: #7cb0ff;
  --danger: #ff5d75;
  --shadow: 0 20px 60px rgba(18, 28, 58, 0.1);
  --radius: 24px;
  --radius-sm: 16px;
  --font-display: "Arial Black", "Avenir Next Condensed", "Impact", sans-serif;
  --font-body: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 176, 255, 0.24), transparent 26%),
    radial-gradient(circle at top right, rgba(255, 154, 87, 0.14), transparent 22%),
    linear-gradient(180deg, #fcfdff 0%, #f4f7fb 40%, #eef3f9 100%);
  min-height: 100vh;
}

img,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
.button-link {
  font: inherit;
}

.site-shell {
  position: relative;
  overflow: hidden;
}

.site-shell::before,
.site-shell::after {
  content: "";
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.1;
  pointer-events: none;
  z-index: -1;
}

.site-shell::before {
  top: -10rem;
  left: -8rem;
  background: var(--accent-3);
}

.site-shell::after {
  right: -10rem;
  bottom: 8rem;
  background: var(--accent-2);
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 2.7rem;
  height: 2.7rem;
  display: inline-block;
  border-radius: 0.85rem;
  background:
    center / cover no-repeat url("../icons/quickgameroom-icon.svg");
  color: transparent;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  text-indent: -9999px;
  box-shadow: 0 10px 24px rgba(19, 72, 181, 0.16);
  flex: 0 0 auto;
}

.brand-copy strong {
  display: block;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--muted);
  padding: 0.72rem 0.96rem;
  border-radius: 999px;
  transition: 180ms ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(41, 114, 233, 0.1);
}

.button-link,
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.9rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button-link:hover,
.cta-button:hover {
  transform: translateY(-1px);
}

.button-link.primary,
.cta-button.primary {
  background: linear-gradient(135deg, var(--accent), #4f95ff);
  color: white;
}

.button-link.secondary,
.cta-button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

.hero,
.landing-hero {
  padding: 4.6rem 0 3rem;
}

.hero-grid,
.page-hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(41, 114, 233, 0.14);
  border-radius: 999px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.hero h1,
.page-hero h1,
.section-heading {
  margin: 0;
  font-family: var(--font-display);
  line-height: 0.96;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(3.4rem, 10vw, 6.8rem);
  max-width: 10ch;
}

.page-hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
}

.hero p,
.page-hero p,
.lede {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
  max-width: 62ch;
}

.hero-actions,
.split-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.hero-visual {
  position: relative;
  min-height: 460px;
  border-radius: clamp(1.4rem, 2vw, 2.1rem);
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 255, 0.92)),
    radial-gradient(circle at 28% 22%, rgba(79, 149, 255, 0.18), transparent 30%);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 50%;
}

.hero-visual::before {
  width: 22rem;
  height: 22rem;
  top: -5rem;
  right: -2rem;
  background: radial-gradient(circle, rgba(99, 245, 210, 0.26), transparent 62%);
}

.hero-visual::after {
  width: 18rem;
  height: 18rem;
  bottom: -5rem;
  left: -4rem;
  background: radial-gradient(circle, rgba(255, 139, 95, 0.26), transparent 62%);
}

.arcade-mockup {
  position: absolute;
  inset: 1.25rem;
  border-radius: 1.7rem;
  background:
    linear-gradient(180deg, rgba(79, 149, 255, 0.08), transparent 26%),
    rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  padding: 1.2rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
}

.mockup-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.mockup-dots {
  display: flex;
  gap: 0.45rem;
}

.mockup-dots span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(15, 26, 50, 0.22);
}

.mockup-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mockup-badges span,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 30px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(41, 114, 233, 0.14);
  color: var(--muted);
  font-size: 0.8rem;
}

.mockup-panels {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1rem;
}

.play-stage {
  position: relative;
  overflow: hidden;
  border-radius: 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(116, 167, 255, 0.24), rgba(232, 240, 255, 0.92)),
    repeating-linear-gradient(
      90deg,
      rgba(15, 26, 50, 0.04) 0,
      rgba(15, 26, 50, 0.04) 1px,
      transparent 1px,
      transparent 56px
    );
  min-height: 280px;
}

.play-stage::before {
  content: "";
  position: absolute;
  inset: 14% auto auto 18%;
  width: 24%;
  height: 12%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), white);
  box-shadow: 0 0 30px rgba(99, 245, 210, 0.45);
}

.play-stage::after {
  content: "";
  position: absolute;
  inset: auto 18% 16% auto;
  width: 18%;
  height: 22%;
  border-radius: 0.8rem;
  background: linear-gradient(180deg, #ff6d7b, #ffae6f);
  box-shadow: 0 0 30px rgba(255, 139, 95, 0.32);
}

.score-column {
  display: grid;
  gap: 0.9rem;
}

.score-tile,
.surface,
.game-tile,
.info-slab,
.legal-block,
.contact-block,
.category-strip {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.score-tile {
  padding: 1rem;
}

.score-tile strong,
.stat-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.score-tile span {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.page-hero,
.section-block {
  padding: 2.5rem 0;
}

.section-heading-wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.3rem;
}

.section-heading {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.muted-copy,
.small-copy,
label,
input,
textarea {
  color: var(--muted);
}

.featured-grid,
.game-grid,
.category-grid,
.info-grid,
.legal-grid,
.contact-grid {
  display: grid;
  gap: 1.15rem;
}

.featured-grid,
.game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-grid,
.info-grid,
.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.featured-item,
.game-tile,
.category-strip,
.info-slab,
.legal-block,
.contact-block {
  padding: 1.25rem;
}

.featured-item {
  display: grid;
  gap: 1rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.game-art,
.category-art {
  min-height: 200px;
  border-radius: 1.2rem;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.game-thumb-image {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 28% 22%, rgba(99, 245, 210, 0.22), transparent 28%),
    linear-gradient(145deg, rgba(41, 114, 233, 0.14), rgba(255, 154, 87, 0.12)),
    rgba(246, 249, 255, 0.98);
}

.game-thumb-image img {
  width: 74%;
  height: 74%;
  object-fit: contain;
  border-radius: 1rem;
  filter: drop-shadow(0 18px 24px rgba(18, 28, 58, 0.18));
}

.art-orbit {
  background:
    radial-gradient(circle at 20% 20%, rgba(99, 245, 210, 0.34), transparent 22%),
    linear-gradient(180deg, rgba(52, 105, 194, 0.55), rgba(9, 14, 37, 0.9)),
    #0e1331;
}

.art-orbit::before,
.art-stack::before,
.art-memory::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.art-stack {
  background:
    linear-gradient(180deg, rgba(255, 154, 87, 0.24), transparent 44%),
    linear-gradient(180deg, rgba(242, 247, 255, 0.92), rgba(225, 233, 246, 0.96));
}

.art-memory {
  background:
    radial-gradient(circle at top left, rgba(115, 164, 255, 0.26), transparent 26%),
    linear-gradient(180deg, rgba(246, 249, 255, 0.94), rgba(226, 233, 245, 0.98));
}

.game-art::after,
.category-art::after {
  content: "";
  position: absolute;
  inset: auto 10% 12% 10%;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.22));
}

.game-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.featured-item h3,
.game-tile h3,
.category-strip h3,
.info-slab h3,
.contact-block h3,
.legal-block h3 {
  margin: 0;
  font-size: 1.35rem;
}

.featured-item p,
.game-tile p,
.category-strip p,
.info-slab p,
.contact-block p,
.legal-block p,
li {
  color: var(--muted);
  line-height: 1.7;
}

.list-clean {
  padding-left: 1.1rem;
  margin: 0.7rem 0 0;
}

.split-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.2rem;
}

.cta-band {
  padding: 1.6rem;
  border-radius: var(--radius);
  border: 1px solid rgba(41, 114, 233, 0.16);
  background:
    linear-gradient(120deg, rgba(79, 149, 255, 0.08), transparent 44%),
    rgba(255, 255, 255, 0.98);
}

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 1.2rem;
}

.footer-links {
  display: grid;
  gap: 0.7rem;
}

.footer-links a {
  color: var(--muted);
}

.page-hero-grid {
  grid-template-columns: 1fr 0.7fr;
}

.hero-card {
  padding: 1.4rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-card dl {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}

.hero-card div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(21, 38, 76, 0.08);
}

.hero-card dt {
  color: var(--muted);
}

.hero-card dd {
  margin: 0;
  font-family: var(--font-display);
}

.game-page-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.2rem;
}

.game-play-shell {
  position: relative;
  width: 100%;
}

.game-stage-panel,
.game-side-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.game-stage-panel {
  padding: 1rem;
}

.game-side-panel {
  padding: 1.1rem;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.game-stage-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: start;
  margin-bottom: 0.8rem;
}

.game-status {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.status-pill {
  min-width: 96px;
  padding: 0.65rem 0.8rem;
  border-radius: 1rem;
  background: rgba(244, 247, 251, 0.96);
  border: 1px solid var(--line);
}

.status-pill span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.05rem;
}

.canvas-wrap {
  border-radius: 1.2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(224, 235, 255, 0.96), rgba(242, 247, 255, 1));
}

.board-wrap {
  border-radius: 1.2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(240, 245, 255, 0.96), rgba(248, 250, 255, 1));
  padding: 1rem;
}

.game-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 10 / 14;
  touch-action: manipulation;
}

.game-canvas.landscape {
  aspect-ratio: 10 / 8;
}

.control-panel,
.info-panel,
.detail-panel {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(246, 249, 255, 0.96);
}

.control-panel h3,
.info-panel h3,
.detail-panel h3 {
  margin-top: 0;
}

.button-row,
.touch-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.cta-button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.cta-button.ghost {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border: 1px solid var(--line);
}

.cta-button.warn {
  background: linear-gradient(135deg, #ff9f6b, #ffd26b);
  color: #271100;
}

.cta-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.touch-row .cta-button {
  flex: 1;
}

.memory-grid {
  display: grid;
  gap: 0.75rem;
}

.memory-card {
  position: relative;
  min-height: 78px;
  border: 0;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(22, 36, 77, 0.96), rgba(10, 15, 32, 1));
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
  touch-action: manipulation;
}

.memory-card:hover {
  transform: translateY(-2px);
}

.memory-card.flipped,
.memory-card.matched {
  background: linear-gradient(135deg, rgba(99, 245, 210, 0.26), rgba(115, 164, 255, 0.3));
}

.memory-card .front,
.memory-card .back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
}

.memory-card .front {
  opacity: 0;
}

.memory-card.flipped .front,
.memory-card.matched .front {
  opacity: 1;
}

.memory-card.flipped .back,
.memory-card.matched .back {
  opacity: 0;
}

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

.contact-card-list,
.legal-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.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;
}

.section-block--tight {
  padding-top: 1.2rem;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.3rem;
  align-items: start;
}

.landing-hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 7vw, 5.3rem);
  line-height: 0.96;
  text-transform: uppercase;
  max-width: 11ch;
}

.landing-hero-copy p {
  max-width: 62ch;
}

.landing-hero-panel {
  padding: 1.3rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.landing-note-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.landing-note-bar span {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(41, 114, 233, 0.08);
  color: #23406f;
  font-size: 0.88rem;
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.mini-stat {
  padding: 1rem;
  background: rgba(246, 249, 255, 0.92);
  border: 1px solid rgba(41, 114, 233, 0.12);
  border-radius: var(--radius-sm);
}

.mini-stat strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #546684;
}

.mini-stat span {
  display: block;
  color: #162443;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.35;
}

.home-shelf-head {
  align-items: start;
}

.home-game-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
}

.home-game-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.game-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
}

.compact-game-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0;
  border-radius: 0.9rem;
  background: #eef3fb;
  border: 1px solid rgba(21, 38, 76, 0.08);
  box-shadow: 0 10px 24px rgba(18, 28, 58, 0.08);
  color: var(--text);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.compact-game-card:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(41, 114, 233, 0.28);
  box-shadow: 0 16px 34px rgba(18, 28, 58, 0.12);
}

.compact-game-card .game-art,
.compact-game-card .home-game-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: inherit;
  transition: transform 180ms ease;
}

.compact-game-card:hover .game-art,
.compact-game-card:hover .home-game-thumb,
.compact-game-card:focus-visible .game-art,
.compact-game-card:focus-visible .home-game-thumb {
  transform: scale(1.05);
}

.compact-game-card .game-thumb-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  filter: none;
}

.compact-game-title {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 0.75rem 0.55rem;
  overflow: hidden;
  background: linear-gradient(180deg, transparent 20%, rgba(6, 12, 26, 0.86) 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.78rem;
  line-height: 1.12;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.compact-game-card:hover .compact-game-title,
.compact-game-card:focus .compact-game-title,
.compact-game-card:focus-visible .compact-game-title,
.compact-game-card:active .compact-game-title {
  opacity: 1;
  transform: translateY(0);
}

.home-game-link {
  display: block;
  overflow: hidden;
  border-radius: 1.15rem;
  border: 1px solid rgba(21, 38, 76, 0.08);
}

.home-game-thumb {
  min-height: 220px;
  transition: transform 220ms ease;
}

.home-game-card:not(.compact-game-card):hover .home-game-thumb {
  transform: scale(1.03);
}

.home-game-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.home-game-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.game-tile p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (max-width: 980px) {
  .hero-grid,
  .landing-hero-grid,
  .page-hero-grid,
  .game-page-layout,
  .split-panel,
  .featured-grid,
  .home-game-grid,
  .game-grid,
  .category-grid,
  .info-grid,
  .legal-grid,
  .contact-grid,
  .footer-grid,
  .mockup-panels,
  .mini-stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 390px;
  }

  .home-game-grid,
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .preview-content-grid {
    grid-template-columns: 1fr;
  }

  .game-status {
    width: 100%;
  }

  .status-pill {
    flex: 1 1 120px;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 1rem;
    width: min(320px, calc(100% - 2rem));
    padding: 0.8rem;
    border-radius: 1.1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    display: none;
  }

  .main-nav.open {
    display: grid;
  }

  .main-nav a {
    width: 100%;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 720px) {
  .hero,
  .landing-hero {
    padding-top: 3.2rem;
  }

  .page-hero,
  .section-block {
    padding: 1.4rem 0;
  }

  .container {
    width: min(calc(100% - 1.2rem), var(--max));
  }

  .hero h1 {
    font-size: clamp(2.7rem, 16vw, 4.4rem);
  }

  .hero-visual {
    min-height: 320px;
  }

  .landing-hero-copy h1 {
    max-width: none;
  }

  .home-game-thumb {
    min-height: 180px;
  }

  .home-game-grid,
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .preview-hero {
    padding-top: 0;
  }

  .preview-hero-inner {
    width: 100%;
    padding-bottom: 0;
  }

  .preview-stage {
    border-inline: 0;
    border-radius: 0;
    padding: 1.25rem 0.75rem 1.6rem;
  }

  .preview-copy {
    gap: 1rem;
  }

  .preview-copy h1 {
    width: 100%;
    max-width: calc(100vw - 1.2rem);
    overflow-wrap: anywhere;
    font-size: clamp(1.65rem, 8vw, 2.25rem);
  }

  .preview-art {
    width: min(200px, 64vw);
  }

  .preview-start {
    width: min(280px, calc(100vw - 1.2rem));
  }

  .preview-content {
    padding-top: 1rem;
  }

  .preview-detail,
  .preview-meta {
    padding: 1rem 0;
  }

  .preview-ad-slot {
    min-height: 298px;
  }

  .compact-game-card {
    padding: 0;
  }

  .compact-game-card .home-game-thumb,
  .compact-game-card .game-art {
    min-height: 0;
  }

  .game-stage-panel,
  .game-side-panel {
    padding: 0.85rem;
  }

  .button-row .cta-button,
  .touch-row .cta-button {
    flex: 1 1 calc(50% - 0.65rem);
    min-width: 0;
    min-height: 54px;
  }

  .board-wrap {
    padding: 0.8rem;
  }

  .memory-grid {
    gap: 0.6rem;
  }

  .arcade-mockup {
    inset: 0.8rem;
  }

  .play-stage {
    min-height: 220px;
  }

  .game-stage-head {
    flex-direction: column;
  }

  .status-pill {
    flex: 1 1 120px;
  }

  .memory-card {
    min-height: 66px;
  }
}

.site-header--light {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(17, 25, 54, 0.08);
  backdrop-filter: blur(10px);
}

.nav-row--light .brand-copy span,
.brand-copy--light span {
  color: rgba(17, 25, 54, 0.58);
}

.main-nav--light a {
  color: rgba(17, 25, 54, 0.72);
}

.main-nav--light a:hover,
.main-nav--light a[aria-current="page"] {
  color: #101735;
  background: rgba(27, 114, 238, 0.08);
}

.nav-toggle--light {
  color: #101735;
  border-color: rgba(17, 25, 54, 0.12);
}

.brand-mark--light {
  background:
    center / cover no-repeat url("../icons/quickgameroom-icon.svg");
}

.game-preview-body .site-shell::before,
.game-preview-body .site-shell::after {
  display: none;
}

.preview-page {
  background: #ffffff;
  color: #11152d;
  min-height: 100vh;
  overflow-x: hidden;
}

.preview-hero {
  padding: 2.35rem 0 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(17, 25, 54, 0.035) 0,
      rgba(17, 25, 54, 0.035) 1px,
      transparent 1px,
      transparent 20px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(17, 25, 54, 0.035) 0,
      rgba(17, 25, 54, 0.035) 1px,
      transparent 1px,
      transparent 20px
    ),
    #ffffff;
}

.preview-hero-inner {
  padding-bottom: 1.65rem;
}

.preview-copy {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1.35rem;
}

.eyebrow--dark {
  border-color: rgba(17, 25, 54, 0.12);
  color: #2972e9;
}

.preview-copy h1 {
  color: #0b1224;
  font-size: clamp(2.1rem, 3.8vw, 3rem);
  max-width: min(100%, 920px);
  margin: 0 auto;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
}

.preview-lede,
.preview-description p,
.preview-meta p,
.preview-meta li {
  color: rgba(17, 25, 54, 0.72);
  overflow-wrap: anywhere;
}

.preview-description {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
  max-width: 74ch;
  color: rgba(17, 25, 54, 0.76);
  font-size: 1rem;
  line-height: 1.72;
}

.preview-description p {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.preview-description .description-lede {
  color: #11152d;
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.75;
}

.preview-description .description-copy {
  color: rgba(17, 25, 54, 0.74);
}

.preview-description .description-step {
  position: relative;
  padding: 0.72rem 0.9rem 0.72rem 2.35rem;
  border: 1px solid rgba(17, 25, 54, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(248, 250, 255, 0.98), rgba(255, 255, 255, 0.98)),
    #ffffff;
  color: #1e2944;
  line-height: 1.55;
}

.preview-description .description-step::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.08rem;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: #1877f2;
  box-shadow: 0 0 0 4px rgba(24, 119, 242, 0.11);
}

.preview-detail,
.preview-meta,
.preview-missing {
  background: #ffffff;
}

.preview-stage {
  position: relative;
  padding: 0;
  background: transparent;
}

.preview-art {
  width: min(200px, 54vw);
  aspect-ratio: 1 / 1;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background:
    radial-gradient(circle at 28% 22%, rgba(99, 245, 210, 0.24), transparent 30%),
    linear-gradient(145deg, rgba(41, 114, 233, 0.14), rgba(255, 154, 87, 0.12)),
    rgba(246, 249, 255, 0.98);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 72%;
}

.preview-art--image {
  background-size: cover;
}

.preview-start {
  width: min(332px, 100%);
  min-height: 42px;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  background: #1877f2;
  color: white;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: none;
  transition: background 160ms ease, transform 160ms ease;
}

.preview-start:hover,
.preview-start:focus-visible {
  background: #0b70d8;
  transform: translateY(-1px);
}

.preview-content {
  padding: 0 0 1.8rem;
}

.preview-detail,
.preview-meta {
  padding: 1rem 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.preview-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.35fr);
  gap: 1rem;
}

.preview-ad-slot {
  grid-column: 1 / -1;
  min-height: 298px;
  border: 1px solid rgba(17, 25, 54, 0.12);
  background: #ffffff;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.preview-ad-slot span {
  color: #6d7892;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.preview-meta h2,
.preview-meta h3 {
  color: #11152d;
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.preview-meta h3 {
  margin-top: 1rem;
}

.preview-missing-wrap {
  padding: 2rem 0 4rem;
}

.preview-missing {
  padding: 2rem;
  text-align: center;
  border-radius: var(--radius);
}

@media (max-width: 980px) {
  .preview-content-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 720px) {
  .preview-hero {
    padding-top: 0;
  }

  .preview-hero-inner {
    width: 100%;
    padding-bottom: 0;
  }

  .preview-copy {
    gap: 1rem;
  }

  .preview-copy h1 {
    width: 100%;
    max-width: calc(100vw - 1rem);
    overflow-wrap: anywhere;
    font-size: clamp(1.25rem, 6vw, 1.55rem);
    letter-spacing: 0;
    line-height: 1.08;
  }

  .preview-art {
    width: min(200px, 64vw);
  }

  .preview-start {
    width: min(280px, calc(100vw - 1.2rem));
  }

  .preview-content {
    padding-top: 0;
  }

  .preview-detail,
  .preview-meta {
    padding: 1rem 0;
    min-width: 0;
  }

  .preview-description {
    max-width: none;
    gap: 0.72rem;
    font-size: 0.95rem;
    line-height: 1.66;
  }

  .preview-description .description-lede {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .preview-description .description-step {
    padding: 0.68rem 0.72rem 0.68rem 2rem;
  }

  .preview-description .description-step::before {
    left: 0.78rem;
    top: 1.02rem;
  }

  .preview-ad-slot {
    min-height: 298px;
  }

}

@media (hover: none), (max-width: 720px) {
  .compact-game-title {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .game-preview-body .nav-row {
    min-height: 64px;
  }

  .game-preview-body .brand-lockup {
    min-width: 0;
  }

  .game-preview-body .brand-copy strong {
    max-width: calc(100vw - 8.25rem);
    overflow: hidden;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-preview-body .brand-copy span {
    display: none;
  }

  .game-preview-body .main-nav {
    right: 0.6rem;
    left: 0.6rem;
    width: auto;
  }

  .preview-stage {
    padding: 0.9rem 0.6rem 1.1rem;
  }

  .preview-copy {
    gap: 0.75rem;
  }

  .preview-copy h1 {
    max-width: calc(100vw - 1.2rem);
    font-size: clamp(1.2rem, 5.7vw, 1.48rem);
  }

  .preview-art {
    width: clamp(140px, 50vw, 180px);
  }

  .preview-start {
    width: min(280px, calc(100vw - 1.2rem));
    min-height: 44px;
    padding: 0.68rem 1rem;
    line-height: 1.15;
  }

  .preview-content-grid {
    gap: 0.45rem;
  }

  .preview-ad-slot {
    min-height: min(298px, 72vw);
  }

  .compact-game-title {
    padding: 0.55rem 0.4rem;
    font-size: 0.68rem;
  }
}

@media (max-width: 340px) {
  .preview-copy h1 {
    font-size: clamp(1.05rem, 5.8vw, 1.28rem);
  }

}

.access-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(12, 18, 39, 0.6);
  backdrop-filter: blur(4px);
  z-index: 30;
  padding: 1rem;
}

.access-overlay[hidden] {
  display: none;
}

.access-overlay--inline {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2rem;
}

.access-sheet {
  width: min(100%, 740px);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 1.6rem;
  padding: 2rem;
  text-align: center;
  color: #11152d;
  box-shadow: 0 30px 80px rgba(6, 13, 30, 0.34);
}

.access-sheet h2 {
  margin: 0.6rem 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.98;
}

.access-sheet p {
  margin: 0 auto 1.2rem;
  max-width: 30ch;
  color: rgba(17, 25, 54, 0.66);
}

.access-logo {
  margin: 0 auto;
}

.access-cta {
  width: min(100%, 650px);
  min-height: 96px;
  border-radius: 1.2rem;
  border: 1px solid rgba(17, 25, 54, 0.14);
  background: white;
  display: grid;
  gap: 0.35rem;
  justify-items: start;
  align-content: center;
  padding: 1rem 1.4rem;
  cursor: pointer;
}

.access-cta span {
  color: #11152d;
  font-weight: 800;
  font-size: 1.15rem;
}

.access-cta small {
  color: rgba(17, 25, 54, 0.56);
  font-size: 0.94rem;
}

.game-play-shell {
  position: relative;
}

/* ---------------------------------------------------------------------------
   Static game pages (games/<slug>/index.html)
   Generated by scripts/build-game-pages.py
   --------------------------------------------------------------------------- */

.breadcrumb-trail {
  padding-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.breadcrumb-trail a { color: inherit; }

.breadcrumb-trail span[aria-current] { font-weight: 600; }

.game-embed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

/* The landing page gives the art the full column, which on a wide screen made
   a 1:1 box hundreds of pixels tall before the Play button. Cap it - it is a
   thumbnail, not the game. */
.game-page-body .preview-art { width: min(100%, 250px); }

.game-page-body .small-copy { font-size: 0.88rem; }

/* --- immersive player ------------------------------------------------------
   Edge to edge over the whole viewport so the game feels native, with the
   landing page still behind it to return to. --------------------------------- */

.qgr-player {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  background: #000;
  overscroll-behavior: none;
}

.qgr-player-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.qgr-player-back {
  position: fixed;
  top: calc(0.6rem + env(safe-area-inset-top));
  left: calc(0.6rem + env(safe-area-inset-left));
  z-index: 1;
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(12, 14, 18, 0.5);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.qgr-player-back:hover,
.qgr-player-back:focus-visible {
  background: rgba(12, 14, 18, 0.78);
  transform: scale(1.06);
}

.qgr-player-back:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.qgr-player-back svg {
  width: 22px;
  height: 22px;
  display: block;
}

html.qgr-player-open,
html.qgr-player-open body {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

@media (prefers-reduced-motion: reduce) {
  .qgr-player-back { transition: none; }
  .qgr-player-back:hover,
  .qgr-player-back:focus-visible { transform: none; }
}
