/* Games page (06): plum ground #220c1c (user-supplied swatch). The two games play live, side by side, as large as the
   window allows (games.js); the title and the intro line only take the space that is left (stacked on narrow screens). */
:root {
  --bg: #220c1c;
  --ink: #f6e9d6;
  --gold: #d9b878;
  --muted: rgba(246, 233, 214, 0.58);
  --line: rgba(217, 184, 120, 0.22);
  --bar-h: 48px;
  --pad: clamp(10px, 1.4vw, 24px);
  --font: "Helvetica Neue", Helvetica, Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
html.is-side, html.is-side body { height: 100%; overflow: hidden; }
a { color: inherit; text-decoration: none; }
h1, p { margin: 0; font-weight: 400; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- top bar ---------- */
.bar {
  height: var(--bar-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 var(--pad);
}
.back { justify-self: start; display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.22em; color: var(--muted); transition: color 0.25s ease; white-space: nowrap; }
.back:hover, .back:focus-visible { color: var(--ink); }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.bar-mark { justify-self: end; font-size: 12px; letter-spacing: 0.22em; color: var(--muted); white-space: nowrap; }
/* compact title, used only when there is no room above the games */
.bar-title { font-size: 12px; letter-spacing: 0.3em; color: var(--gold); white-space: nowrap; visibility: hidden; }
.bar-title b { margin-left: 0.8em; font-weight: 400; color: var(--ink); letter-spacing: 0.36em; }
html.title-in-bar .bar-title { visibility: visible; }

/* ---------- title block: shown only in leftover space ---------- */
.intro { text-align: center; padding: 0 var(--pad); }
.intro[hidden] { display: none; }
.intro-kicker { font-size: 12px; letter-spacing: 0.3em; color: var(--gold); }
.intro h1 { margin-top: 10px; font-size: var(--title-size, 56px); line-height: 1; letter-spacing: 0.08em; font-weight: 300; }
.intro-text { margin-top: 14px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.intro-text[hidden] { display: none; }

/* ---------- the two games ---------- */
.stage { display: flex; flex-direction: column; justify-content: center; gap: var(--intro-gap, 0px); padding: 0 var(--pad) var(--pad); }
html.is-side .stage { height: calc(100% - var(--bar-h)); }
.games { display: flex; justify-content: center; gap: var(--pad); }
.game {
  position: relative; flex: none; width: calc(var(--box-w) * 1px); height: calc(var(--box-h) * 1px);
  overflow: hidden; border: 1px solid var(--line); background: #1a0814;
}
.game iframe {
  position: absolute; top: 0; left: 0; display: block; border: 0;
  width: calc(var(--frame-w) * 1px); height: calc(var(--frame-h) * 1px);
  transform: scale(var(--s, 1)); transform-origin: 0 0;
}
/* narrow screens: one game above the other, each a full screen tall */
html.is-stacked .games { flex-direction: column; align-items: center; }
@media (max-width: 640px) {
  .bar-mark { display: none; }
  .bar-title { font-size: 11px; letter-spacing: 0.24em; }
}
