/* Will It Play? — portal styles shared by the hub, game pages and info pages (ADR-0003).
   Plain CSS, system fonts only; brand colours from the video channels. */
:root {
  --bg: #14112e; --card: #201c47; --line: #322c68; --text: #f4f2ff; --muted: #aaa4e4;
  --accent: #f7c948; --ink: #1a1540; --purple: #7b6cf6;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
body.playing { overflow: hidden; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* header / footer */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 0 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; image-rendering: pixelated; }
.brand span { font-weight: 900; font-size: 19px; letter-spacing: .06em; color: var(--accent); }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; margin-left: 14px; }
.top nav a:hover { color: var(--text); }
footer { margin: 44px 0 0; padding: 18px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer a { color: var(--muted); }

/* hub hero */
.hero { margin: 6px 0 26px; }
.hero h1 { font-size: 28px; line-height: 1.15; margin: 0 0 8px; }
.hero p { margin: 0; color: var(--muted); max-width: 560px; }
.social { margin-top: 12px !important; display: flex; gap: 10px; flex-wrap: wrap; }
.social a { text-decoration: none; font-size: 13px; font-weight: 600; color: var(--text);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
h2 { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; }

/* "continue" — last played game */
#cont { display: none; margin-bottom: 26px; }
#cont.show { display: block; }
.crow { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--card); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.crow img { width: 54px; height: 72px; object-fit: cover; border-radius: 10px; background: #000; flex: none; }
.crow .t { font-weight: 700; font-size: 16px; }
.crow .s { color: var(--muted); font-size: 13px; }
.go, .cta { flex: none; padding: 9px 18px; border-radius: 999px; background: var(--accent); color: var(--ink); font-weight: 800; font-size: 14px; }
.crow .go { margin-left: auto; }

/* card grid: 2 cols on phone, more on wider screens */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.card .pic { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  transition: transform .12s ease; }
.card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .t { margin: 8px 2px 0; font-weight: 700; font-size: 15px; }
.card .s { margin: 2px 2px 0; color: var(--muted); font-size: 13px; }
.card:active .pic { transform: scale(.97); }
@media (hover: hover) { .card:hover .pic { transform: translateY(-2px); border-color: var(--purple); } }
.card:focus-visible .pic, .crow:focus-visible, .cta:focus-visible, .stage:focus-visible, #back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* game page */
.game { display: grid; gap: 22px; margin: 4px 0 34px; }
@media (min-width: 760px) { .game { grid-template-columns: 340px 1fr; gap: 34px; align-items: start; } }
.stage { position: relative; display: block; width: 100%; max-width: 340px; aspect-ratio: 3 / 4; padding: 0; border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; background: var(--card); cursor: pointer; }
.stage img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(.8); }
.stage .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%;
  background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.stage .play svg { width: 34px; height: 34px; margin-left: 4px; }
.info h1 { font-size: 30px; line-height: 1.1; margin: 0 0 6px; }
.info .tagline { color: var(--muted); margin: 0 0 16px; font-size: 16px; }
.info .cta { display: inline-block; border: 0; font: inherit; font-weight: 800; padding: 12px 24px; cursor: pointer; }
.info h2 { margin-top: 26px; }
.info p, .info li { color: #dcd8fb; }
.info ul { margin: 0; padding-left: 20px; }
.prose { max-width: 680px; margin: 6px 0 20px; }
.prose h1 { font-size: 28px; margin: 0 0 12px; }
.prose h2 { margin-top: 26px; }
.prose p, .prose li { color: #dcd8fb; }

/* play screen: full-bleed mount, back tab, loading curtain */
#play { display: none; position: fixed; inset: 0; z-index: 10; background: #000; }
#play.show { display: block; }
#root { position: absolute; inset: 0; }
/* back = small tab on the left edge, mid-height: game HUDs own the corners (pause, coins, pedals) */
#back { position: absolute; z-index: 12; top: 50%; left: env(safe-area-inset-left); transform: translateY(-50%);
  width: 30px; height: 52px; border-radius: 0 14px 14px 0; border: 0; padding: 0 2px 0 0; cursor: pointer;
  background: rgba(20,17,46,.5); color: #fff; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: .7; }
#back:hover { opacity: 1; }
#back svg { width: 20px; height: 20px; }
#curtain { position: absolute; inset: 0; z-index: 11; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--bg); transition: opacity .25s ease; }
#curtain.off { opacity: 0; pointer-events: none; }
#curtain .t { font-weight: 800; font-size: 20px; }
#curtain .spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
#curtain .err { color: var(--muted); font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #curtain .spin { animation-duration: 2.4s; } .card .pic { transition: none; } }
