/* Zenogami — public stylesheet.
   Colour tokens (--bg, --accent, …) are emitted per theme by the layout from
   Admin → Theme. Everything below derives from them, so an edited accent
   carries through every tint, glow and hatch. */

:root {
  --serif: var(--font-serif, Newsreader), Georgia, 'Times New Roman', serif;
  --sans: var(--font-sans, 'Work Sans'), Helvetica, Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;

  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 26px; --s7: 40px; --s8: 60px;
  --r1: 8px; --r2: 11px; --r3: 14px; --pill: 999px;
  --page-max: 1280px; --gutter: 40px; --rail: 236px;

  --ease: cubic-bezier(.32, .72, 0, 1);
  --t-hover: 180ms; --t-panel: 320ms; --t-page: 600ms;

  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --premium-line: color-mix(in srgb, var(--accent) 50%, transparent);
  --accent-glow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 55%, transparent);
  --membership-wash: linear-gradient(100deg, color-mix(in srgb, var(--accent) 12%, transparent), color-mix(in srgb, var(--warm) 7%, transparent));
  --hatch-a: color-mix(in srgb, var(--card) 80%, var(--line));
  --hatch-b: color-mix(in srgb, var(--card) 45%, var(--line));
  --hatch: repeating-linear-gradient(135deg, var(--hatch-a) 0 10px, var(--hatch-b) 10px 20px);
  --hatch-premium: repeating-linear-gradient(135deg, color-mix(in srgb, var(--hatch-a) 85%, var(--accent)) 0 10px, color-mix(in srgb, var(--hatch-b) 85%, var(--accent)) 10px 20px);
  --hatch-sponsor: repeating-linear-gradient(135deg, var(--card) 0 10px, var(--hatch-a) 10px 20px);
  --scrim: linear-gradient(to top, color-mix(in srgb, var(--bg) 88%, transparent), transparent 62%);
  --badge-fill: color-mix(in srgb, var(--bg) 72%, transparent);
}
/* ─── base ─────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

html, body, #root { margin: 0; padding: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
::selection { background: var(--accent-soft); }

/* Focus: a visible 2px accent outline at 2px offset on every interactive
   element. Never removed. */
:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r1);
}

/* One easing everywhere, fade + 4–8px travel only. Nothing loops. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── type ─────────────────────────────────────────────────────────── */

.display {
  font-family: var(--serif); font-weight: 200;
  font-size: clamp(34px, 4.4vw, 56px); line-height: 1.02;
  letter-spacing: -0.025em; color: var(--ink); margin: 0; text-wrap: pretty;
}
.section-title {
  font-family: var(--serif); font-weight: 300;
  font-size: 30px; line-height: 1.13; color: var(--ink); margin: 0;
}
.game-title { font-family: var(--serif); font-weight: 400; font-size: 19px; line-height: 1.26; color: var(--ink); }
.body { font-size: 16.5px; line-height: 1.65; color: var(--ink-2); max-width: 46ch; margin: 0; }
.meta { font-size: 12.5px; color: var(--muted); }
.eyebrow {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.eyebrow--warm { color: var(--warm); }
.eyebrow--sm { font-size: 10.5px; letter-spacing: 0.16em; }

/* ─── layout ───────────────────────────────────────────────────────── */

.page { max-width: var(--page-max); margin: 0 auto; width: 100%; }
.app { min-height: 100vh; display: flex; flex-direction: column; background: var(--surface); }
.app main { flex: 1; }

.route-fade { animation: fade-in var(--t-panel) var(--ease) both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─── buttons — pill only ──────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--pill); white-space: nowrap; cursor: pointer;
  min-height: 44px;
  transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.btn--primary {
  padding: 14px 26px; background: var(--accent); color: var(--ink-on-accent);
  font-size: 14.5px; font-weight: 600; border: 1px solid var(--accent);
}
.btn--secondary {
  padding: 13px 22px; background: transparent; color: var(--ink-2);
  font-size: 14px; border: 1px solid var(--line-strong);
}
.btn--secondary:hover { border-color: var(--ink-2); }
.btn--control {
  padding: 8px 13px; min-height: 36px; color: var(--muted);
  font-size: 12.5px; border: 1px solid var(--line);
}
.btn--control:hover { border-color: var(--line-strong); }
.btn[aria-disabled='true'] { opacity: 0.55; pointer-events: none; }

/* ─── chips ────────────────────────────────────────────────────────── */

.chip {
  padding: 7px 12px; border-radius: var(--pill); font-size: 12.5px;
  border: 1px solid var(--line); color: var(--muted); background: transparent;
  min-height: 34px; cursor: pointer;
  transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease),
              background-color var(--t-hover) var(--ease);
}
.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed='true'] {
  background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink);
}

/* ─── toggle ───────────────────────────────────────────────────────── */

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 34px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.toggle[aria-pressed='false'] { color: var(--muted); }
.toggle__track { position: relative; width: 34px; height: 19px; border-radius: var(--pill); background: var(--chip-line); flex-shrink: 0; transition: background-color var(--t-hover) var(--ease); }
.toggle[aria-pressed='true'] .toggle__track { background: var(--accent); }
.toggle__knob { position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--faint); transition: transform var(--t-hover) var(--ease), background-color var(--t-hover) var(--ease); }
.toggle[aria-pressed='true'] .toggle__knob { transform: translateX(15px); background: var(--ink-on-accent); }

/* ─── media placeholders ───────────────────────────────────────────── */

.hatch {
  position: relative; overflow: hidden; background: var(--hatch);
  border: 1px solid var(--line); border-radius: var(--r2);
  display: flex; align-items: center; justify-content: center;
}
.hatch--premium { background: var(--hatch-premium); border-color: var(--premium-line); box-shadow: var(--accent-glow); }
.hatch--sponsor { background: var(--hatch-sponsor); border-style: dashed; border-color: var(--line-strong); }
.hatch__slot { font: 400 10px/1 var(--mono); color: var(--faint); letter-spacing: 0.08em; padding: 4px; text-align: center; }
.hatch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ─── header / footer ──────────────────────────────────────────────── */

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 28px; padding: 18px 32px;
  border-bottom: 1px solid var(--line); background: var(--header-fill);
}
.site-header__brand { display: flex; align-items: center; gap: 11px; }
.wordmark { font-family: var(--serif); font-size: 23px; color: var(--ink); line-height: 1; }
.site-header__nav { display: flex; gap: 28px; font-size: 14.5px; white-space: nowrap; }
.site-header__nav a { color: var(--muted); transition: color var(--t-hover) var(--ease); }
.site-header__nav a:hover, .site-header__nav a[aria-current='page'] { color: var(--ink); }
.site-header__right { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; justify-content: flex-end; }

.search {
  display: flex; align-items: center; gap: 9px; padding: 9px 14px;
  border: 1px solid var(--chip-line); border-radius: var(--pill);
  background: var(--card); flex: 0 1 220px; min-width: 0; min-height: 40px;
}
.search input {
  border: none; background: none; outline: none; color: var(--ink);
  font-size: 13px; font-family: var(--sans); width: 100%; min-width: 0;
}
.search input::placeholder { color: var(--muted); }
.search__glyph { width: 11px; height: 11px; border: 1.5px solid var(--faint); border-radius: 50%; flex-shrink: 0; }

.plus-link {
  padding: 9px 15px; border-radius: var(--pill); flex-shrink: 0;
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  font-size: 13px; font-weight: 500; color: var(--accent-ink); min-height: 40px;
  display: inline-flex; align-items: center;
}

.site-footer {
  border-top: 1px solid var(--line); padding: 30px var(--gutter);
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--faint);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer__links { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }

/* ─── game cards ───────────────────────────────────────────────────── */

.card { display: flex; flex-direction: column; gap: 11px; text-align: left; }
.card__cover { aspect-ratio: 3 / 4; border-radius: var(--r2); }
.card--square .card__cover { aspect-ratio: 1 / 1; }
.card:hover .card__cover { border-color: var(--line-strong); }
.card:hover .card__title { color: var(--ink); }
.card__cover, .card__title { transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease); }
.card__title { font-family: var(--serif); font-size: 19px; line-height: 1.26; color: var(--ink); }
.card__meta { font-size: 12.5px; color: var(--muted); }
.card__meta--plus { color: var(--accent); }
.card__badge {
  position: absolute; top: 10px; right: 10px; padding: 4px 9px; border-radius: var(--pill);
  background: var(--badge-fill); font: 500 10px/1 var(--mono); color: var(--ink-2);
}
.card__badge--plus { background: var(--accent); color: var(--ink-on-accent); font-weight: 600; }
.card__sponsor-label { font: 400 10px/1 var(--mono); letter-spacing: 0.14em; color: var(--faint); }

.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1099px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 839px)  { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Loading skeleton: static card fill, no shimmer (pulsing is not allowed). */
.skeleton { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); }

/* ─── feeling tiles ────────────────────────────────────────────────── */

.feelings { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 839px) { .feelings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feeling {
  padding: 22px 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); display: flex; flex-direction: column; gap: 7px; text-align: left;
  transition: border-color var(--t-hover) var(--ease);
}
.feeling:hover { border-color: var(--line-strong); }
.feeling__name { font-family: var(--serif); font-size: 19px; color: var(--ink); }

/* ─── comfort profile ──────────────────────────────────────────────── */

.comfort { display: flex; flex-direction: column; gap: 7px; }
.comfort__row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.comfort__note { color: var(--muted); }
.comfort__track { height: 4px; border-radius: var(--pill); background: var(--line); overflow: hidden; }
.comfort__fill { height: 100%; border-radius: var(--pill); background: var(--accent); }

/* ─── panels ───────────────────────────────────────────────────────── */

.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.panel--bare { background: transparent; padding: 20px 22px; }
.panel__row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.panel__row dt, .panel__label { color: var(--muted); }

.sponsored-rail { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

/* ─── errors ───────────────────────────────────────────────────────── */

.notice { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 14px; }

/* ─── mobile chrome ────────────────────────────────────────────────── */

.tabbar { display: none; }

@media (max-width: 839px) {
  :root { --gutter: 20px; }

  .site-header { padding: 14px 20px; gap: 12px; }
  .site-header__nav { display: none; }
  .site-header__right { gap: 8px; flex-wrap: wrap; }
  .search { min-width: 140px; }
  .search { flex: 1 1 auto; }

  /* The tab bar from the mobile designs, pinned above the safe area. */
  .tabbar {
    position: sticky; bottom: 0; z-index: 5;
    display: flex; justify-content: space-around; align-items: center;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--surface);
    font-size: 11px; color: var(--faint);
  }
  .tabbar a { color: var(--faint); min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; }
  .tabbar a[aria-current='page'] { color: var(--ink); }

  .site-footer { padding: 26px 20px; }
}
/* Route-level layout. Values read straight off the design mocks. */

.row-gap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.link-quiet { font-size: 13.5px; }
.fine-print { font-size: 11.5px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 14px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ─── home ─────────────────────────────────────────────────────────── */

.home-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: 48px; align-items: center; padding: 60px var(--gutter) 54px;
  background: radial-gradient(55% 75% at 75% 30%, var(--accent-soft), transparent 70%);
}
.home-hero__copy { display: flex; flex-direction: column; gap: 24px; }
.home-hero__assurances { display: flex; gap: 26px; flex-wrap: wrap; padding-top: 8px; font-size: 12.5px; color: var(--muted); }
.home-hero__art { display: block; }
.home-hero__art .hatch { align-items: flex-end; justify-content: flex-start; border-color: var(--line-strong); padding: 26px; }
.home-hero__slot { position: absolute; top: 18px; left: 18px; font: 400 10.5px/1 var(--mono); color: var(--faint); letter-spacing: 0.08em; }
.home-hero__scrim { position: absolute; inset: 0; background: var(--scrim); }
.home-hero__caption { position: relative; display: flex; flex-direction: column; gap: 8px; }
.home-hero__title { font-family: var(--serif); font-weight: 300; font-size: 34px; color: var(--ink); }
.home-hero__tagline { font-size: 14px; color: var(--ink-2); }

.home-section { padding: 10px var(--gutter) 44px; display: flex; flex-direction: column; gap: 20px; }

.membership-strip {
  margin: 0 var(--gutter) 44px; padding: 34px 36px; border-radius: var(--r3);
  border: 1px solid var(--accent-line); background: var(--membership-wash);
  display: flex; align-items: center; justify-content: space-between; gap: 34px; flex-wrap: wrap;
}
.membership-strip__copy { display: flex; flex-direction: column; gap: 9px; max-width: 60ch; }
.membership-strip__title { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 28px; line-height: 1.2; color: var(--ink); }
.membership-strip__sub { margin: 0; font-size: 14.5px; color: var(--ink-2); }

@media (max-width: 839px) {
  .home-hero { grid-template-columns: 1fr; gap: 32px; padding: 40px var(--gutter); }
}

/* ─── browse ───────────────────────────────────────────────────────── */

.browse { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); align-items: stretch; min-height: calc(100vh - 150px); }
.browse__rail {
  border-right: 1px solid var(--line); background: var(--surface-2);
  padding: 26px 22px; display: flex; flex-direction: column; gap: 28px;
  position: sticky; top: 0;
}
.browse__results { padding: 26px 32px 44px; display: flex; flex-direction: column; gap: 20px; }
.browse__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.filter-group { display: flex; flex-direction: column; gap: 12px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-rows { display: flex; flex-direction: column; gap: 10px; }
.filter-row {
  display: flex; justify-content: space-between; gap: 10px; width: 100%;
  min-height: 34px; align-items: center; font-size: 13.5px; color: var(--ink-2); cursor: pointer;
  transition: color var(--t-hover) var(--ease);
}
.filter-row[aria-pressed='true'] { color: var(--accent-ink); }
.filter-row__count { color: var(--faint); }

.sort { display: flex; align-items: center; gap: 8px; }
.sort select {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--pill); padding: 8px 13px; min-height: 36px; cursor: pointer;
}

.sheet__scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); border: none; z-index: 10; cursor: default; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; max-height: 82vh; overflow: auto;
  background: var(--surface-2); border-top: 1px solid var(--line);
  border-radius: var(--r3) var(--r3) 0 0; padding: 20px var(--gutter) 32px;
  display: flex; flex-direction: column; gap: 24px;
  animation: sheet-up var(--t-panel) var(--ease) both;
}
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
@keyframes sheet-up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 839px) {
  .browse { grid-template-columns: 1fr; }
  .browse__results { padding: 20px var(--mobile-gutter, 20px) 40px; }
}

/* ─── game detail ──────────────────────────────────────────────────── */

.detail-hero { position: relative; min-height: 300px; display: flex; align-items: flex-end; padding: 34px var(--gutter); }
.detail-hero__art { position: absolute; inset: 0; border: none; border-radius: 0; }
.detail-hero__slot { position: absolute; top: 16px; left: var(--gutter); font: 400 10.5px/1 var(--mono); color: var(--faint); }
.detail-hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--surface) 4%, transparent 70%);
}
.detail-hero__content { position: relative; display: flex; align-items: flex-end; gap: 28px; width: 100%; flex-wrap: wrap; }
.detail-hero__cover { width: 132px; flex-shrink: 0; border-radius: 12px; border-color: var(--line-strong); }
.detail-hero__titles { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 260px; }
.detail-hero__title { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 4vw, 44px); line-height: 1; color: var(--ink); }
.detail-hero__tagline { margin: 0; font-size: 15px; color: var(--ink-2); }

.detail-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 44px; padding: 34px var(--gutter) 44px; }
.detail-main { display: flex; flex-direction: column; gap: 30px; }
.detail-description { margin: 0; font-size: 16px; line-height: 1.7; color: var(--ink-2); max-width: 62ch; }
.detail-shots { display: flex; flex-direction: column; gap: 14px; }
.detail-shots__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.detail-note { margin: 0; padding: 24px 26px; border-left: 2px solid var(--warm); background: color-mix(in srgb, var(--warm) 6%, transparent); border-radius: 0 10px 10px 0; }
.detail-note__quote { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 21px; line-height: 1.45; color: var(--ink); }
.detail-side { display: flex; flex-direction: column; gap: 22px; }
.detail-similar { display: flex; flex-direction: column; gap: 12px; }

.list-row { display: flex; gap: 12px; align-items: center; }
.list-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.list-row__title { font-family: var(--serif); font-size: 16.5px; color: var(--ink); }
.list-row__cover { width: 52px; height: 52px; flex-shrink: 0; }
.list-row__cover--sm { width: 40px; height: 40px; }
.list-row--sm { gap: 10px; }

@media (max-width: 839px) {
  .detail-body { grid-template-columns: 1fr; gap: 30px; padding: 26px 20px 40px; }
  .detail-shots__grid { grid-template-columns: 1fr; }
  .detail-hero { padding: 26px 20px; }
}

/* ─── play ─────────────────────────────────────────────────────────── */

.play { display: flex; flex-direction: column; }
.play__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.play__back { font-size: 13px; color: var(--muted); cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.play__back:hover { color: var(--ink); }
.play__save { font: 400 10.5px/1 var(--mono); color: var(--faint); }
.play__body { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 20px; padding: 20px 24px 26px; }
.play__canvas {
  position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--hatch);
  display: flex; align-items: center; justify-content: center;
}
.play__canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.play__frame { width: 100%; height: 100%; border: none; display: block; background: transparent; }
.play__frame--empty { display: flex; align-items: center; justify-content: center; }
.play__gate { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 40px; }
.play__controls { position: absolute; bottom: 14px; left: 14px; display: flex; gap: 8px; }
.play__control { padding: 7px 12px; border-radius: var(--pill); background: var(--badge-fill); backdrop-filter: blur(6px); font-size: 12px; color: var(--ink-2); }
.play__rail { display: flex; flex-direction: column; gap: 16px; }
.play__session { font-family: var(--serif); font-weight: 300; font-size: 30px; color: var(--ink); }

@media (max-width: 839px) {
  .play__body { grid-template-columns: 1fr; padding: 16px 20px 30px; }
}

/* ─── membership ───────────────────────────────────────────────────── */

.membership {
  padding: 60px var(--gutter) 56px; display: flex; flex-direction: column; gap: 40px; align-items: center;
  background: radial-gradient(90% 70% at 50% 0%, var(--accent-soft), transparent 65%);
}
.membership__head { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; max-width: 620px; }
.membership__sub { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.membership__plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; width: 100%; max-width: 880px; }

.plan { border: 1px solid var(--line); border-radius: var(--r3); background: var(--card); padding: 30px; display: flex; flex-direction: column; gap: 22px; }
.plan--plus {
  border-color: var(--premium-line);
  background: linear-gradient(170deg, var(--accent-soft), var(--card));
  box-shadow: 0 24px 60px -28px color-mix(in srgb, var(--accent) 45%, transparent);
}
.plan__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan__name { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--ink); }
.plan__flag { padding: 5px 10px; border-radius: var(--pill); background: var(--accent); font: 600 10px/1 var(--mono); color: var(--ink-on-accent); }
.plan__price { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.plan__figure { font-family: var(--serif); font-weight: 300; font-size: 42px; color: var(--ink); }
.plan__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; font-size: 14px; color: var(--ink-2); }
.plan__list--plus { color: var(--ink); }
.plan__cta { margin-top: auto; width: 100%; }

.membership__faq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; max-width: 880px; width: 100%; }
.faq__q { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 17px; color: var(--ink); }
.faq__a { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }

@media (max-width: 839px) {
  .membership { padding: 40px 20px; }
  .membership__plans, .membership__faq { grid-template-columns: 1fr; }
}

/* ─── shelf ────────────────────────────────────────────────────────── */

.shelf { padding: 44px var(--gutter) 56px; display: flex; flex-direction: column; gap: 20px; }
.shelf__head { display: flex; flex-direction: column; gap: 6px; }
.shelf__list { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.shelf-row { display: flex; gap: 13px; align-items: center; }
.shelf-row__cover { width: 64px; height: 64px; flex-shrink: 0; }
.shelf-row__body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; max-width: 420px; }
.shelf__note { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 839px) {
  .shelf { padding: 32px 20px 44px; }
}
.play__loading { position: absolute; inset: 0; display: grid; place-items: center; font: 400 11px/1 var(--mono); color: var(--faint); letter-spacing: 0.08em; }

/* ─── server-rendered additions ────────────────────────────────────── */

.flashes { max-width: var(--page-max); margin: 0 auto; padding: 16px var(--gutter) 0; display: flex; flex-direction: column; gap: 8px; }
.flash { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 16px; font-size: 14px; color: var(--ink-2); }
.flash--ok { border-color: var(--accent-line); }
.flash--error { border-color: color-mix(in srgb, var(--warm) 55%, transparent); }

.header-link { font-size: 13px; color: var(--muted); white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; }
.header-link:hover { color: var(--ink); }
.site-header__brand { color: inherit; }

/* forms (sign-in, account) */
.narrow { max-width: 440px; margin: 0 auto; padding: 56px var(--gutter) 64px; display: flex; flex-direction: column; gap: 22px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; min-height: 44px;
  transition: border-color var(--t-hover) var(--ease);
}
.field input:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field__hint { font-size: 12px; color: var(--muted); }
.form-errors { margin: 0; padding: 14px 18px 14px 34px; border: 1px solid color-mix(in srgb, var(--warm) 55%, transparent); border-radius: 12px; background: var(--card); color: var(--ink-2); font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.or-line { font-size: 13.5px; color: var(--muted); }

.account { max-width: 760px; margin: 0 auto; padding: 48px var(--gutter) 64px; display: flex; flex-direction: column; gap: 28px; }
.account__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 839px) { .account__grid { grid-template-columns: 1fr; } }

/* CMS pages */
.prose { max-width: 68ch; margin: 0 auto; padding: 56px var(--gutter) 72px; color: var(--ink-2); font-size: 16.5px; line-height: 1.7; }
.prose h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 4vw, 46px); line-height: 1.05; color: var(--ink); margin: 0 0 26px; letter-spacing: -0.02em; }
.prose h2, .prose h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); margin: 34px 0 10px; }
.prose h2 { font-size: 26px; } .prose h3 { font-size: 20px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--warm); font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink); }

/* text block section on home */
.text-block { padding: 10px var(--gutter) 44px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; }
.text-block__body { color: var(--ink-2); font-size: 16px; line-height: 1.7; max-width: 62ch; }
@media (max-width: 839px) { .text-block { grid-template-columns: 1fr; gap: 14px; } }

/* browse filters: server links, plus a no-JS sheet on narrow screens */
.filter-row { text-decoration: none; }
.chip { display: inline-flex; align-items: center; text-decoration: none; }
.filters-toggle { display: none; }
@media (max-width: 839px) {
  .browse__rail { display: none; position: static; }
  .browse__rail.is-open { display: flex; position: fixed; inset: auto 0 0 0; z-index: 11; max-height: 82vh; overflow: auto; border-right: none; border-top: 1px solid var(--line); border-radius: var(--r3) var(--r3) 0 0; padding: 20px var(--gutter) 32px; animation: sheet-up var(--t-panel) var(--ease) both; }
  .filters-toggle { display: inline-flex; }
}
.rail-close { display: none; }
@media (max-width: 839px) { .browse__rail.is-open .rail-close { display: inline-flex; align-self: flex-end; } }

/* game cover images */
.hatch > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 404 */
.empty-state { padding: 90px var(--gutter); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* sticky footer on short pages */
.app { min-height: 100vh; }
