/* ============================================================
   11games — dark grey, sharp-pixel design system
   ============================================================ */

@font-face {
  font-family: "PressStart";
  src: url("../fonts/pressstart.woff2") format("woff2");
  font-display: swap;
}

:root {
  /* Surfaces — warm dark brown-grey (header sits lighter than the page) */
  --bg:        #1c1b1a;
  --surface-1: #262524;
  --surface-2: #2e2c2a;
  --surface-3: #38352f;
  --border:    #33312e;
  --border-2:  #4a4641;

  /* Text */
  --text:      #f4f2ef;
  --text-dim:  #c2bcb5;
  --text-mute: #8d8781;

  /* Highlight — plain white, no colour cast */
  --accent:      #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.10);

  /* Reserved for our own directly-embedded games — nothing else uses gold. */
  --gold: #e8b23a;

  /* Scale */
  --radius:    8px;
  --radius-sm: 6px;
  --gap:       clamp(16px, 1.7vw, 36px);
  /* Full-bleed: the page fills the window at any width, with the padding
     below (and the fluid scale) doing the breathing rather than a hard cap. */
  --maxw:      100%;

  /* Fluid scale — every size below tracks the viewport between the bounds,
     so the whole page grows together instead of stranding margins. */
  --card-min:  clamp(190px, 16vw, 360px);
  --fs-h1:     clamp(21px, 2.05vw, 44px);
  --fs-h2:     clamp(18px, 1.55vw, 34px);
  --fs-body:   clamp(13px, 0.98vw, 20px);
  --fs-title:  clamp(11px, 0.86vw, 18px);
  --fs-nav:    clamp(11px, 0.88vw, 18px);
  --fs-mark:   clamp(26px, 3.1vw, 68px);
  --fs-word:   clamp(14px, 1.62vw, 35px);

  /* Pixel font for the logo; condensed fallback for the mark */
  --font-pixel:   "PressStart", "Courier New", monospace;
  --font-display: "PressStart", "Bahnschrift", "Arial Narrow", monospace;

  --shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
  --ease:   cubic-bezier(0.2, 0, 0, 1);
}
/* Crisp edges for pixel-styled imagery (logo emblem). */
.pixelated { image-rendering: pixelated; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 4.5vw, 110px);
}

/* -------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(38, 37, 36, 0.95);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
}
.site-header .wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 36px);
  height: clamp(78px, 7.4vw, 140px);
}
/* Category nav sits left, next to the brand — centring it ran the last
   items under the search box. */
.topnav {
  display: flex;
  /* Never shrink: flexbox was clipping the last category ("ALL GAMES") to make
     room for the search box. The search shrinks instead — and below the
     breakpoint further down, the whole nav moves into the burger drawer. */
  flex: 0 0 auto;
  margin-left: clamp(12px, 2.4vw, 44px);
  gap: clamp(12px, 1.5vw, 28px);
  scrollbar-width: none;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  padding: 2px 0;
  color: var(--text);
  font-size: var(--fs-nav);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  transition: color 0.14s var(--ease);
}
.topnav a:hover { color: var(--accent); }
.topnav a.active { color: var(--accent); }

/* Brand sits at the left of the bar. The two words are aligned by their
   *ink*, not their line boxes: a pixel font's glyphs sit high in the em box,
   so box-centring leaves "GAMES" visibly low. Baseline-align, then lift the
   word by half the cap-height difference (~0.32em of its own size). */
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
  /* The pixel font leaves empty space below its glyphs, so a box-centred
     lockup renders visibly low. Sized in em of the logo so it scales. */
  font-size: var(--fs-mark);
  position: relative;
  top: -0.16em;
}
.brand .mark {
  font-family: var(--font-pixel);
  color: #fff;
  font-size: var(--fs-mark);
  line-height: 1;
  text-shadow: 0.09em 0.09em 0 rgba(0, 0, 0, 0.32);
}
.brand .word {
  position: relative;
  top: -0.32em;
  font-family: var(--font-pixel);
  color: #fff;
  font-size: var(--fs-word);
  line-height: 1;
  letter-spacing: 0.02em;
}
/* -------------------------------------------------- Burger (mobile nav) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 0;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.16s var(--ease);
}
.site-header.nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .burger span:nth-child(2) { opacity: 0; }
.site-header.nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Below this the eight categories no longer fit alongside the logo and search,
   so they move into the drawer rather than being clipped. */
@media (max-width: 1240px) {
  .burger { display: flex; }
  .topnav {
    display: none;
    position: absolute;
    transform: none;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 6px 0 10px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .site-header.nav-open .topnav { display: flex; }
  .topnav a {
    padding: 13px clamp(20px, 4.5vw, 110px);
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
  }
  .topnav a:last-child { border-bottom: 0; }
  .topnav a.active { color: #fff; background: var(--accent-soft); }
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.nav a {
  padding: 7px 12px;
  border-radius: 7px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--accent-soft); }

.search {
  position: relative;
  flex: 0 1 260px;
  min-width: 140px;
  margin-left: auto;
}
.search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.search input::placeholder { color: var(--text-mute); }
.search input:focus {
  border-color: var(--border-2);
  background: var(--surface-2);
}
.search .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
  pointer-events: none;
}

/* Search suggestions dropdown */
.search-results {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: none;
  max-height: 60vh;
  overflow-y: auto;
}
.search-results.open { display: block; }
.search-results a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover { background: var(--surface-3); }
.search-results img {
  width: 44px;
  height: 33px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.search-results .t { font-size: 14px; font-weight: 500; }
.search-results .c { font-size: 12px; color: var(--text-mute); }
.search-results .empty { padding: 14px; color: var(--text-mute); font-size: 14px; }

/* Account / avatar (top-right) */
.account {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.avatar-btn {
  display: flex;
  align-items: center;
  gap: 9px;
}
.avatar-btn .who { display: none; } /* mockup shows the avatar alone */
.avatar-btn .pic {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--text-dim);
  font-family: var(--font-pixel);
  font-size: 12px;
  transition: color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.avatar-btn:hover .pic { color: var(--accent); border-color: var(--accent); }
.avatar-btn .pic svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

/* -------------------------------------------------- Hero / tagline */
.hero {
  padding: 34px 0 4px;
}
.hero h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: #fff;
}
.hero p {
  margin: 6px 0 0;
  color: var(--text-dim);
  max-width: 640px;
}

/* -------------------------------------------------- Section headings */
.section { padding: 26px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.section-head h2 {
  margin: 0;
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #fff;
}
.section-head a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.16s var(--ease);
}
.section-head a:hover { color: var(--accent); }

/* -------------------------------------------------- Home top: about + podium */
.home-top {
  display: grid;
  grid-template-columns: minmax(230px, 24%) 1fr;
  gap: clamp(28px, 4.4vw, 90px);
  align-items: center;
  padding: clamp(28px, 4vw, 72px) 0 clamp(24px, 3vw, 56px);
}
.about h1 {
  margin: 0 0 16px;
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.22;
  color: #fff;
}
.about h1 em {
  font-style: normal;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
}
.about p {
  margin: 0;
  color: var(--text-dim);
  font-size: var(--fs-body);
  line-height: 1.75;
  max-width: 38ch;
}

/* Podium — #1 centred and raised, #2 and #3 flanking it. */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.24fr 1fr;
  gap: clamp(16px, 2.6vw, 48px);
  align-items: start;
}
.podium .slot { min-width: 0; display: block; }
.podium .slot-1 { order: 2; }
.podium .slot-2 { order: 1; }
.podium .slot-3 { order: 3; }
/* Flanking slots sit lower and slightly recessed, so #1 reads as the winner. */
.podium .slot-2, .podium .slot-3 { padding-top: clamp(26px, 4.5vw, 96px); }
.podium .slot-2 .thumb, .podium .slot-3 .thumb { opacity: 0.86; }
.podium .slot:hover .thumb { opacity: 1; }
.podium .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: radial-gradient(120% 120% at 30% 20%, var(--surface-3), var(--surface-2));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
}
.podium .slot-1 .thumb {
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.44);
  outline: 1px solid rgba(255, 255, 255, 0.18);
  outline-offset: -1px;
}
.podium .slot:hover .thumb { transform: translateY(-4px); }
.podium .slot .meta { padding: 14px 2px 0; }
.podium .slot .meta-line { gap: 12px; }
.podium .rank-num {
  font-family: var(--font-pixel);
  font-size: clamp(14px, 1.35vw, 24px);
  line-height: 1;
  color: var(--text-mute);
}
.podium .slot-1 .rank-num { font-size: clamp(19px, 1.95vw, 34px); color: #fff; }
.podium .slot-1 .rank-title { font-size: calc(var(--fs-title) * 1.12); color: #fff; }
.podium .rank-title {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1.35;
}
@media (max-width: 900px) {
  .home-top { grid-template-columns: 1fr; gap: 30px; padding: 26px 0 18px; }
  .podium { gap: 14px; align-items: start; }
  .podium .slot-2, .podium .slot-3 { padding-top: 0; }
}
/* Phones: three across is too cramped — #1 takes the full width, #2/#3 pair up. */
@media (max-width: 560px) {
  .podium { grid-template-columns: 1fr 1fr; }
  .podium .slot-1 { order: 0; grid-column: 1 / -1; }
}

/* -------------------------------------------------- Horizontal rails */
.top11-rail, .rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(var(--card-min), 1fr);
  gap: var(--gap);
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.top11-rail::-webkit-scrollbar, .rail::-webkit-scrollbar { height: 6px; }
.top11-rail::-webkit-scrollbar-thumb, .rail::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 3px;
}
.rail { grid-auto-columns: minmax(var(--card-min), 1fr); }
.rank-card { position: relative; scroll-snap-align: start; }

/* Rank numeral sits beside the title, pixel-font, under the thumbnail. */
.rank-num {
  font-family: var(--font-pixel);
  font-size: calc(var(--fs-title) * 1.05);
  line-height: 1;
  color: var(--text-mute);
  flex-shrink: 0;
}

/* -------------------------------------------------- Game grid + cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr));
  gap: var(--gap);
}

.card {
  display: block;
  background: transparent;
  transition: transform 0.18s var(--ease);
  will-change: transform;
}
.card:hover { transform: translateY(-3px); }
.card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 30% 20%, var(--surface-3), var(--surface-2));
  transition: box-shadow 0.18s var(--ease);
}
.card:hover .thumb { box-shadow: var(--shadow); }
.thumb .mono {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-pixel);
  font-size: 30px;
  color: var(--text);
  opacity: 0.18;
  z-index: 0;
}
.thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), filter 0.3s var(--ease);
}
.thumb img.loaded { opacity: 1; }
.card:hover .thumb img,
.slot:hover .thumb img { transform: scale(1.05); filter: brightness(1.06); }
.play-badge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(16, 15, 15, 0.34);
  transition: opacity 0.2s var(--ease);
}
.card:hover .play-badge,
.slot:hover .play-badge { opacity: 1; }
.play-badge span {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(16, 15, 15, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  backdrop-filter: blur(4px);
}
.card .meta {
  padding: 11px 2px 0;
}
.meta-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}
/* One-line teaser under the title (see `blurb` in scripts/fetch-feed.js).
   Clamped to two lines so uneven text can't stagger the grid rows. */
.blurb {
  margin: 5px 0 0;
  font-size: calc(var(--fs-title) * 0.92);
  line-height: 1.45;
  color: var(--text-mute);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.podium .blurb {
  -webkit-line-clamp: 2;
  max-width: 44ch;
}
.card .meta .title {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Our own games: gold frame + ad-free flag ---- */
/* Specificity has to beat `.podium .slot-1 .thumb`, which sets its own
   white hairline outline for the #1 slot. */
.is-original .thumb,
.podium .slot.is-original .thumb {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
  box-shadow: 0 0 0 1px rgba(232, 178, 58, 0.25), 0 10px 26px rgba(0, 0, 0, 0.4);
}
.podium .slot-1.is-original .thumb { outline-width: 3px; }
.is-original:hover .thumb {
  box-shadow: 0 0 0 1px rgba(232, 178, 58, 0.45), 0 14px 32px rgba(0, 0, 0, 0.48);
}
.no-ads {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: #221c0c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.is-original .rank-num,
.podium .is-original .rank-num { color: var(--gold); }

/* "See all" under a truncated grid */
.see-all {
  display: flex;
  justify-content: center;
  margin-top: clamp(22px, 2.6vw, 44px);
}
.see-all-btn {
  padding: 14px 30px;
  border-radius: 999px;
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* -------------------------------------------------- Category chips */
.chips {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.chip {
  padding: 0.7em 1.25em;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.16s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }
.chip.active { color: #1c1b1a; background: var(--accent); border-color: transparent; }

/* -------------------------------------------------- Game (play) page */
/* Vertical only — this element is also `.wrap`, and the `padding` shorthand
   would reset that class's horizontal padding to 0 and run the player straight
   into the window edges. */
.player-wrap {
  padding-top: clamp(20px, 2.4vw, 44px);
  padding-bottom: clamp(24px, 3vw, 56px);
}
.player-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(14px, 1.6vw, 28px);
  flex-wrap: wrap;
}
.player-top h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.player-top .cat { color: var(--text-mute); font-size: 13px; }
.player-actions { margin-left: auto; display: flex; gap: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn.primary { background: var(--accent); color: #1c1b1a; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.active { color: var(--accent); border-color: var(--accent); }

/* The stage is capped and centred rather than spanning the full window: at
   1600px+ a full-bleed 4:3 frame is taller than the viewport, and the game
   inside letterboxes anyway. */
.stage {
  position: relative;
  width: 100%;
  max-width: min(100%, 1280px);
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  max-height: 74vh;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.stage.theater {
  aspect-ratio: auto;
  height: 82vh;
  max-height: 82vh;
  max-width: 100%;
}
.stage iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Click-to-play poster — the embed is only created once this is pressed. */
.poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface-1);
}
.poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.42) saturate(0.9);
  transform: scale(1.04);
}
.poster-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}
.poster-play {
  font-size: clamp(14px, 1.1vw, 19px);
  padding: 14px 26px;
  border-radius: 999px;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poster-note {
  margin: 0;
  min-height: 1.2em;
  font-size: 13px;
  color: var(--text-dim);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}


/* -------------------------------------------------- Profile / sign-in */
.signin-card {
  max-width: 440px;
  margin: 40px auto;
  padding: 28px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  text-align: center;
}
.signin-card h1 {
  font-family: var(--font-pixel);
  font-size: 16px;
  line-height: 1.4;
  color: #fff;
  margin: 0 0 10px;
}
.signin-card form {
  display: flex;
  gap: 8px;
  margin: 18px 0 14px;
}
.signin-card input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.signin-card input:focus { border-color: var(--accent); }
.signin-card .note {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.5;
  margin: 0;
  text-align: left;
  background: var(--surface-2);
  border-left: 2px solid var(--accent);
  padding: 10px 12px;
}
.signin-card .note b { color: var(--text-dim); }
.big-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border: 2px solid var(--accent);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 24px;
  box-shadow: var(--shadow);
}

/* -------------------------------------------------- Legal / prose pages */
.legal { max-width: 780px; margin: 8px auto 48px; }
.legal h1 {
  font-family: var(--font-pixel);
  font-size: 18px;
  line-height: 1.5;
  color: #fff;
  margin: 26px 0 6px;
}
.legal h2 {
  font-family: var(--font-pixel);
  font-size: 12px;
  line-height: 1.6;
  color: #fff;
  margin: 28px 0 8px;
}
.legal p, .legal li { color: var(--text-dim); font-size: 15px; line-height: 1.75; }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal a { color: var(--accent); text-decoration: underline; }
.legal .updated { color: var(--text-mute); font-size: 13px; margin-top: 0; }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin-top: 18px; }
.contact-form label { font-size: 13px; color: var(--text-dim); margin-bottom: -6px; }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--surface-1);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form button { align-self: flex-start; }
.form-note { font-size: 13px; color: var(--text-mute); margin-top: 10px; }

/* -------------------------------------------------- Footer */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  padding: 26px 0 40px;
  color: var(--text-mute);
  font-size: 13px;
}
.site-footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--text); }
.site-footer .sep { margin-left: auto; }

/* -------------------------------------------------- Cookie consent */
.consent {
  position: fixed;
  z-index: 200;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface-1);
  border-top: 1px solid var(--border-2);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}
.consent-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px clamp(20px, 4.5vw, 110px);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.consent p {
  margin: 0;
  flex: 1 1 320px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}
.consent a { color: var(--text); text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 560px) {
  .consent-actions { width: 100%; }
  .consent-actions .btn { flex: 1; justify-content: center; }
}

/* -------------------------------------------------- Utilities */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-mute);
}
.muted { color: var(--text-dim); }
.hide { display: none !important; }

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface-1) 30%, var(--surface-2) 50%, var(--surface-1) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  aspect-ratio: 4 / 3;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .site-header .wrap { gap: 12px; }
}
