/* Console Games page (17 Nov 2026, from the approved mockup of 16 Nov). Its own file: the game page look (game-pages/game-page.css) on the site's
   starry background (transition-landing/transition.css), frosted glass panels, softly rounded corners, no pills. */
@font-face { font-family: "Fraunces"; src: url("/transition-landing/fonts/fraunces-latin.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/transition-landing/fonts/source-sans-3-latin.woff2") format("woff2"); font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #f3f6fb;
  --muted: #b9c6d6;
  --soft: #8d9eb4;
  --gold: #f0cf74;
  --gold-deep: #c9a24a;
  --violet: #a78bfa;
  --line: rgba(186, 205, 230, .22);
  --glass: rgba(16, 24, 46, .58);
  --glass-strong: rgba(14, 20, 40, .86);
  --radius: 12px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-anchor: none; background: #050913; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--sans); font-size: 17px; overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(125, 211, 252, .18), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(167, 139, 250, .22), transparent 30%),
    linear-gradient(135deg, #030712 0%, #0b1020 48%, #090b16 100%);
  background-attachment: fixed;
}
body::before {
  position: fixed; z-index: -2; inset: -40%; content: ""; pointer-events: none; filter: blur(24px);
  background:
    radial-gradient(circle at 30% 30%, rgba(125, 211, 252, .14), transparent 24%),
    radial-gradient(circle at 70% 35%, rgba(167, 139, 250, .16), transparent 26%),
    radial-gradient(circle at 50% 70%, rgba(248, 199, 107, .10), transparent 24%);
  animation: aurora 18s ease-in-out infinite alternate;
}
body::after {
  position: fixed; z-index: -1; inset: 0; content: ""; pointer-events: none; opacity: .42;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 54px 54px; mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent 86%);
}
@keyframes aurora { 0% { transform: translate3d(-2%, -1%, 0) rotate(0); } 100% { transform: translate3d(1%, -2%, 0) rotate(-6deg) scale(1.04); } }
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

a { color: inherit; }
button, input, select { font: inherit; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.glass {
  position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 18px 50px rgba(0, 0, 0, .38);
}
.glass::before {   /* gold hairline top edge */
  position: absolute; top: -1px; left: 18px; right: 18px; height: 1px; content: "";
  background: linear-gradient(90deg, transparent, rgba(240, 207, 116, .65), transparent);
}

/* hero */
.hero { padding: 54px 0 34px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--soft); font-size: 15px; margin-bottom: 22px; }
.breadcrumbs a { text-decoration: none; } .breadcrumbs a:hover { color: var(--gold); }
.hero-card { padding: 34px 36px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 30px; align-items: center; }
.label { margin: 0 0 10px; color: var(--gold); font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0 0 14px; font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 5vw, 60px); line-height: 1.04; }
.summary { margin: 0 0 22px; color: var(--muted); font-size: 19px; line-height: 1.55; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; min-width: 128px; padding: 0 18px;
  border-radius: 10px; border: 0; cursor: pointer; text-decoration: none; font-weight: 700; font-size: 16px;
  background: linear-gradient(180deg, #f3d683, var(--gold-deep)); color: #1d1404;
  box-shadow: 0 6px 18px rgba(201, 162, 74, .25);
}
.btn:hover { filter: brightness(1.06); }
.btn.alt { background: #1e2747; color: #f3ead2; border: 1px solid rgba(255, 236, 190, .3); box-shadow: none; }
.btn:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 16px 14px; border-radius: 10px; background: rgba(8, 13, 28, .55); border: 1px solid var(--line); text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 30px; color: var(--gold); }
.stat span { color: var(--muted); font-size: 14px; }

/* sections */
.section { padding: 26px 0; }
.section-head { margin: 0 0 16px; }
.section-head p { margin: 0 0 4px; color: var(--violet); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.section-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 32px; }

/* play */
#play[hidden] { display: none; }
.play-card { padding: 18px; }
.play-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.play-bar h2 { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 600; }
.play-frame { aspect-ratio: 4 / 3; max-height: 78vh; width: 100%; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.play-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* library */
.tools { padding: 16px; display: grid; grid-template-columns: minmax(200px, 2fr) repeat(4, minmax(140px, 1fr)); gap: 10px; align-items: end; }
.tools label { display: grid; gap: 6px; color: var(--soft); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tools input, .tools select {
  width: 100%; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(6, 10, 22, .78); color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 16px;
}
.count { margin: 14px 2px 12px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
/* every card the same shape: the title two lines high, year publisher genre on one line, the platform on its own line,
   the buttons at the bottom so a row lines up */
.card { padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; height: 2.6em; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.card .meta { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .platform { margin: -4px 0 0; color: var(--soft); font-size: 13px; line-height: 1.4; }
.card .row { margin-top: auto; padding-top: 6px; }
.card .meta .pub { color: var(--gold); }
.card .row { display: flex; gap: 8px; }
.card .row .btn { min-width: 0; flex: 1 1 0; min-height: 38px; font-size: 15px; padding: 0 10px; white-space: nowrap; }
.more { display: flex; justify-content: center; margin-top: 18px; }
.empty { padding: 26px; text-align: center; color: var(--muted); }

/* controls */
.controls-card { padding: 22px 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.controls-card h3 { margin: 0 0 10px; font-size: 18px; }
.keys { width: 100%; border-collapse: collapse; font-size: 16px; }
.keys th, .keys td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.keys th { color: var(--soft); font-weight: 600; }
.keys td:first-child { width: 30%; }
kbd { display: inline-block; min-width: 26px; padding: 2px 7px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); font-family: var(--sans); font-size: 14px; text-align: center; }

/* how to play panel: our own box over the page (never a browser popup) */
.panel-back[hidden] { display: none; }
.panel-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(2, 5, 12, .66); }
.panel {
  width: min(1100px, 100%); height: min(880px, calc(100vh - 36px)); display: flex; flex-direction: column; overflow: hidden;
  padding: 24px 30px; background: rgba(12, 18, 36, .95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.panel-top { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.panel h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 30px; font-weight: 600; }
.panel .meta { margin: 0 0 16px; color: var(--muted); }
.panel h3 { margin: 18px 0 8px; font-size: 17px; color: var(--gold); }
.placeholder { padding: 12px 14px; border-radius: 10px; border: 1px dashed rgba(255, 180, 168, .55); color: #ffd4cc; background: rgba(80, 20, 20, .25); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--soft); } .facts dd { margin: 0; }
.panel .actions { margin-top: 20px; }
.close { min-width: 0; padding: 0 14px; }

footer { padding: 34px 0 44px; color: var(--soft); font-size: 14px; text-align: center; }

@media (max-width: 900px) {
  .hero-card, .controls-card { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr 1fr; }
  .tools label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .hero-card { padding: 24px 18px; }
  .tools { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr 1fr; }
}

/* added for the real page: a game's own How to play (its description, its credit, what each button does) */
.about { margin: 0 0 8px; line-height: 1.6; color: var(--ink); }
.credit { margin: 0 0 4px; color: var(--soft); font-size: 14px; }
.credit a { color: var(--gold); }
.basics { margin: 0 0 8px; padding-left: 20px; line-height: 1.6; }

/* the How to play window's tabs (About, Facts, Controls), the same look as Camp's tabs (keystone.css .tabs/.tab) */
.panel .tabs { display: flex; gap: clamp(18px, 3vw, 34px); flex-shrink: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.panel .tab {
  flex-shrink: 0; height: 46px; padding: 0 2px; border: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 600;
  color: var(--muted); cursor: pointer; margin-bottom: -1px; border-bottom: 2px solid transparent;
}
.panel .tab[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--gold); text-shadow: 0 0 16px rgba(227, 197, 106, .5); }
.panel .tab:hover { color: var(--ink); }
.panel .tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px 2px 4px; }
.panel .tabpanel[hidden] { display: none; }
.panel .tabpanel > h3:first-child { margin-top: 0; }
.panel .about { max-width: 70em; }
.panel .facts { grid-template-columns: max-content 1fr; gap: 12px 28px; font-size: 18px; }
.panel .actions { margin-top: 16px; flex-shrink: 0; }
/* Controls: the button columns stay narrow so What it does gets the room */
.panel .keys { table-layout: fixed; }
.panel .keys th:nth-child(1), .panel .keys td:nth-child(1) { width: 15%; }
.panel .keys th:nth-child(2), .panel .keys td:nth-child(2) { width: 14%; }
.panel .keys th:nth-child(3), .panel .keys td:nth-child(3) { width: 16%; }
.panel .keys td { vertical-align: top; line-height: 1.5; overflow-wrap: anywhere; }
.panel .keys kbd { white-space: nowrap; }
@media (max-width: 900px) {
  .panel .keys th:nth-child(2), .panel .keys td:nth-child(2) { width: 18%; }
  .panel .keys th:nth-child(3), .panel .keys td:nth-child(3) { width: 19%; }
}
@media (max-width: 700px) {
  .panel-back { padding: 10px; }
  .panel { height: calc(100vh - 20px); padding: 18px 16px; }
  .panel h2 { font-size: 24px; }
  .panel .facts { font-size: 17px; gap: 8px 18px; }
  /* phones: each control is its own block, the button and its keys on top and what it does under them */
  .panel .keys:has(td:nth-child(4)) { display: block; }
  .panel .keys:has(td:nth-child(4)) tr { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr); gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .panel .keys:has(td:nth-child(4)) tr:first-child { display: none; }
  .panel .keys:has(td:nth-child(4)) td { display: block; width: auto !important; padding: 0; border: 0; }
  .panel .keys:has(td:nth-child(4)) td:nth-child(4) { grid-column: 1 / -1; color: var(--muted); }
  .panel .keys:has(td:nth-child(4)) td:nth-child(1) { font-weight: 700; }
}
