/* ================= Actually Free =================
   Playful skin (default) + Geek 2000s skin, with an orthogonal
   Default/Light/Dark theme layer. Mode = skin, theme = palette. */

:root, :root[data-theme="light"] {
  --bg: #fdf4e7;
  --ink: #33241a;
  --muted: #8a6f5c;
  --card: #ffffff;
  --card-edge: #eed7b8;
  --accent: #c2570b;
  --accent-soft: #fce8d2;
  --on-accent: #ffffff;
  --good: #1f9d55;
  --good-soft: #e0f4e8;
  --header-bg: #fff9f0;
  --chip-bg: #f8e6cc;
  --chip-on: #33241a;
  --input-bg: #ffffff;
  --shadow: 0 2px 12px rgba(194, 87, 11, 0.14);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1109;
    --ink: #f7ecda;
    --muted: #caa77f;
    --card: #251810;
    --card-edge: #4d3823;
    --accent: #f0a04b;
    --accent-soft: #3a2413;
    --on-accent: #241708;
    --good: #55c47e;
    --good-soft: #143a24;
    --header-bg: #201309;
    --chip-bg: #33200f;
    --chip-on: #f7ecda;
    --input-bg: #251810;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  }
}
:root[data-theme="dark"] {
  --bg: #1a1109;
  --ink: #f7ecda;
  --muted: #caa77f;
  --card: #251810;
  --card-edge: #4d3823;
  --accent: #f0a04b;
  --accent-soft: #3a2413;
  --on-accent: #241708;
  --good: #55c47e;
  --good-soft: #143a24;
  --header-bg: #201309;
  --chip-bg: #33200f;
  --chip-on: #f7ecda;
  --input-bg: #251810;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; } /* no horizontal scrolling, ever */
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--card-edge);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 12px; box-shadow: var(--shadow); }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 1.25rem; letter-spacing: 0.2px; color: var(--accent); }
.brand-text em { font-style: normal; font-size: 0.8rem; color: var(--muted); }
/* QR Cards as an Android-style home-screen app icon, next to the switchers */
.qr-appicon {
  margin-left: auto;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--ink);
  padding: 4px 8px; border-radius: 12px;
}
.qr-appicon:hover { background: var(--accent-soft); }
.qr-appicon-glyph {
  width: 46px; height: 46px; border-radius: 12px;
  background: #ffffff; border: 1px solid var(--card-edge);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); overflow: hidden;
}
.qr-appicon-glyph svg { width: 36px; height: 36px; display: block; }
.qr-appicon-label { font-size: 0.68rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.switchers { display: flex; gap: 8px; }
.switcher { display: flex; border: 1px solid var(--card-edge); border-radius: 999px; overflow: hidden; }
.switcher button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 11px;
  cursor: pointer;
}
.switcher button.on { background: var(--ink); color: var(--bg); }
/* Icon-only theme buttons (FundingSpark's half-circle / sun / moon) */
.switcher.theme-switcher button { padding: 6px 9px; line-height: 0; }
.switcher.theme-switcher button svg { width: 17px; height: 17px; display: block; }
/* ---------- layout ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0.2em 0 0.1em; }
.tagline { color: var(--muted); font-size: 1.05rem; margin: 0 0 1em; overflow: hidden; }

/* ---------- promise line: checkmarks, no box, breathing room below ---------- */
.promise-line { margin: 20px 0 26px; font-size: 1rem; }
.lock { color: var(--good); font-weight: 700; white-space: nowrap; }

/* ---------- controls ---------- */
.controls { margin-bottom: 20px; }
#search {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  padding: 12px 16px;
  border: 1px solid var(--card-edge);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--ink);
  margin-bottom: 12px;
}
#search:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
/* Filter rows scroll horizontally on narrow screens; on desktop each group
   wraps into its own band instead of an endless scroll strip. */
.filter-row { display: flex; flex-wrap: nowrap; gap: 8px; margin-bottom: 10px; align-items: center; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
@media (min-width: 900px) {
  .filter-row { flex-wrap: wrap; overflow-x: visible; }
  #category-chips, #subcategory-chips { border-radius: 20px; }
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-row .chip, .filter-row .pill { flex: 0 0 auto; }
.chip, .pill {
  border: 1px solid var(--card-edge);
  background: var(--chip-bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
}
.chip.on, .pill.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
/* Categories and subcategories share one visual language: a single joined
   segmented control per group, neutral segments, the active segment filled
   with the category hue. The hue ties the two rows (and the tiles) together. */
#category-chips {
  background: var(--input-bg);
  border: 1px solid var(--card-edge);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
}
#category-chips .chip { border-color: transparent; background: transparent; }
#category-chips .chip.on {
  background: hsl(var(--accent-h, 210) 70% 60%);
  border-color: hsl(var(--accent-h, 210) 70% 60%);
  color: #0d0d14;
}
/* Category + subcategory stack: the subcategory bar attaches directly under
   the category bar (borders connect) and rolls down from behind it when a
   category is selected. The .sub-collapse wrapper uses grid 0fr->1fr so the
   expand animation always targets the intrinsic height — no JS measurement,
   immune to font-load or wrapping timing. */
.cat-stack { position: relative; }
.cat-stack #category-chips { position: relative; z-index: 2; margin-bottom: 0; }
.sub-collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-12px);
  position: relative; z-index: 1;
  margin-top: 0; margin-bottom: 10px;
  transition: grid-template-rows .32s ease, opacity .28s ease, transform .32s ease,
              margin-top .32s ease;
  pointer-events: none;
}
.sub-collapse.open {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  margin-top: 2px;
  pointer-events: auto;
}
.sub-collapse > #subcategory-chips {
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 0;
  min-width: 0;
  background: var(--input-bg);
  border: 1px solid var(--card-edge);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 0;
  transition: padding-top .32s ease, padding-bottom .32s ease,
              border-top-width .32s ease, border-bottom-width .32s ease;
}
.sub-collapse:not(.open) > #subcategory-chips {
  padding-top: 0; padding-bottom: 0;
  border-top-width: 0; border-bottom-width: 0;
}
#subcategory-chips .chip {
  border-color: transparent; background: transparent; border-radius: 999px;
  font-size: 0.78rem; padding: 5px 11px; font-weight: 500;
}
#subcategory-chips .chip.on {
  background: hsl(var(--accent-h, 210) 70% 60%);
  border-color: hsl(var(--accent-h, 210) 70% 60%);
  color: #0d0d14;
}
/* Chip slide: old names scroll away left, new names slide in from the right
   when the category changes. */
#subcategory-chips .chip { transition: transform .16s ease, opacity .16s ease; }
#subcategory-chips .chip.chip-out { transform: translateX(-26px); opacity: 0; }
#subcategory-chips .chip.chip-in { transform: translateX(26px); opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .sub-collapse, .sub-collapse > #subcategory-chips, #subcategory-chips .chip { transition: none; }
}
.sort-row { justify-content: space-between; }
.sort-row select {
  font: inherit;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--card-edge);
  background: var(--input-bg);
  color: var(--ink);
}
.result-count { color: var(--muted); font-size: 0.9rem; }

/* ---------- tile grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0) 42%),
    var(--card);
  border: 1px solid var(--card-edge);
  border-top: 3px solid hsl(var(--accent-h, 210) 70% 60%);
  border-radius: var(--radius);
  padding: 14px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  position: relative;
  transition: transform 0.12s ease;
}
.tile:hover { transform: translateY(-2px); }
.tile-top { display: flex; align-items: center; gap: 10px; }
.tile-top > span { min-width: 0; }
.icon-wrap {
  width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--accent-h, 210) 70% 88%), hsl(var(--accent-h, 210) 70% 76%));
  border: 2px solid hsl(var(--accent-h, 210) 65% 62%);
  display: flex; align-items: center; justify-content: center;
}
.icon-wrap img { width: 100%; height: 100%; object-fit: cover; }
.icon-wrap svg { width: 100%; height: 100%; display: block; }
.icon-wrap.large { width: 84px; height: 84px; flex-basis: 84px; border-radius: 20px; }
.letter-tile {
  width: 100%; height: 100%;
  align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 800;
  color: hsl(var(--accent-h, 210) 60% 30%);
}
.tile h3 { margin: 0; font-size: 1rem; line-height: 1.25; overflow-wrap: break-word; } /* break-word only: whole words move, never an arbitrary mid-word snap */
/* Subcategory (+ "Made by us") pill row: its own full-width row under the
   title, so pills never truncate against the icon column and every tile
   header has the same shape. Ellipsis is a backstop for very long names. */
.tile-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tile .subpill {
  display: inline-block; font-size: 0.74rem; font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
  background: hsl(var(--accent-h, 210) 60% 30%);
  color: hsl(var(--accent-h, 210) 85% 88%);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.tile .desc { font-size: 0.83rem; color: var(--muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .rating { font-size: 0.82rem; color: var(--muted); margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.store-badge {
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--card-edge);
}
a.store-badge:hover { filter: brightness(0.96); }
.verified {
  font-size: 0.75rem; font-weight: 700; color: var(--good);
  display: inline-flex; align-items: center; gap: 4px;
}
/* "Free Enough" — same spot as the verified line, but a distinct warm tag:
   paid upgrades exist, the free tier is the complete product. */
.free-enough {
  font-size: 0.72rem; font-weight: 700; color: #92400e;
  background: #fde9c8; border: 1px solid #e8b96a;
  padding: 4px 10px; border-radius: 999px;
  display: inline-flex; align-items: center;
}
:root[data-theme="dark"] .free-enough { color: #fbd9a4; background: #4a2c10; border-color: #8a5a24; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .free-enough { color: #fbd9a4; background: #4a2c10; border-color: #8a5a24; }
}
.free-enough-blurb {
  font-weight: 600;
}
/* "needs review" — same pill shape as store badges, dashed = provisional */
.needs-review {
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px dashed var(--accent);
}
/* "needs account" — same pill shape as the other badges, solid = confirmed */
.needs-account {
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8eefc;
  color: #1e40af;
  border: 1px solid #93b4f5;
  white-space: nowrap;
}
:root[data-theme="dark"] .needs-account { color: #bcd0fb; background: #1c2a4d; border-color: #3f5d9e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .needs-account { color: #bcd0fb; background: #1c2a4d; border-color: #3f5d9e; }
}
.personal-use {
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f0e9fc;
  color: #6d28d9;
  border: 1px solid #c4a8f0;
  white-space: nowrap;
}
:root[data-theme="dark"] .personal-use { color: #d8c8fb; background: #2c1c4d; border-color: #7a5aae; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .personal-use { color: #d8c8fb; background: #2c1c4d; border-color: #7a5aae; }
}
.personal-use-note {
  background: #f0e9fc;
  border: 1px solid #c4a8f0;
  border-radius: 8px;
  padding: 10px 14px;
  color: #6d28d9;
}
:root[data-theme="dark"] .personal-use-note { color: #d8c8fb; background: #2c1c4d; border-color: #7a5aae; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .personal-use-note { color: #d8c8fb; background: #2c1c4d; border-color: #7a5aae; }
}
/* Platform: segmented All/Android/Windows control + tile/detail glyphs. */
.platform-seg {
  display: inline-flex; gap: 2px;
  background: var(--input-bg);
  border: 1px solid var(--card-edge);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 10px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.platform-seg::-webkit-scrollbar { display: none; }
.platform-seg .seg {
  border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 0.85rem; font-weight: 600;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.platform-seg .seg.on { background: var(--accent); color: var(--on-accent); }
.platform-seg .seg svg { width: 26px; height: 26px; display: block; }
.platform-tag { display: inline-flex; align-items: center; color: var(--muted); }
.platform-tag svg { width: 24px; height: 24px; display: block; }
.platform-line { color: var(--muted); font-size: 0.9rem; display: flex; align-items: center; gap: 6px; margin: 2px 0 0; }
.platform-line svg { width: 26px; height: 26px; display: block; }
.review-note {
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 18px;
}
.review-note h2 { margin: 0 0 6px; }
.review-note p { margin: 0; }
/* "Made by us" sits inline with the subcategory pill, so every tile header
   starts at the same height. */
.made-by-us {
  display: inline-block;
  background: var(--accent); color: var(--on-accent);
  font-size: 0.68rem; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.empty-state {
  text-align: center; font-size: 1.15rem; color: var(--muted);
  padding: 48px 16px;
}

/* ---------- detail page ---------- */
.detail { max-width: 760px; }
.back { text-decoration: none; font-weight: 600; }
.detail-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-top: 12px;
}
.detail-head { display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.detail-head h1 { margin: 0 0 4px; font-size: 1.6rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-head .cat { color: var(--muted); margin: 0; }
.detail-head .rating { margin: 4px 0 0; color: var(--muted); }
.desc { font-size: 1.02rem; }
.detail-card h2 { font-size: 1.05rem; margin: 22px 0 10px; }
.get-it { display: flex; flex-wrap: wrap; gap: 10px; }
.win-compat { color: var(--muted); margin: 4px 0 0; }
.winget-cmd, .brew-cmd { flex-basis: 100%; margin: 2px 0 0; }
.winget-cmd code, .brew-cmd code { background: #f0f0f0; padding: 2px 8px; border-radius: 6px; font-size: 0.95em; }
.store-badge.big { font-size: 0.95rem; padding: 10px 20px; }
.dl-official {
  display: inline-block;
  font-size: 0.95rem; font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}
.dl-official:hover { filter: brightness(0.94); }
.sibling-link { font-size: 0.85rem; color: var(--muted); margin: 4px 0 0; }
.sibling-link a { color: var(--accent); }
.per-badge-note {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.9rem;
}
.promise-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.promise-checks li { font-weight: 600; }
.t-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.t-pill {
  background: var(--good-soft); color: var(--good);
  font-weight: 700; font-size: 0.85rem;
  padding: 6px 12px; border-radius: 999px;
}
.feedback-note { color: var(--muted); font-size: 0.9rem; }
.feedback-row { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-row button {
  font: inherit; font-size: 0.88rem; font-weight: 600;
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--card-edge);
  background: var(--chip-bg); color: var(--ink);
  cursor: pointer;
}
.feedback-row button:hover { border-color: var(--accent); }

/* ---------- feedback forms ---------- */
.af-form-wrap { margin-top: 12px; }
.af-form {
  background: var(--accent-soft);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 560px;
}
.af-form[hidden] { display: none; }
.af-form-head { margin: 0; font-size: 0.95rem; }
.af-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.af-field input, .af-field textarea {
  font: inherit; font-weight: 400;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--card-edge);
  background: var(--input-bg); color: var(--ink);
  width: 100%;
}
.af-field textarea { resize: vertical; }
.af-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.af-error { color: #c0392b; font-size: 0.88rem; margin: 0; }
.af-error:empty { display: none; }
.af-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.af-actions button {
  font: inherit; font-size: 0.88rem; font-weight: 700;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
}
.af-actions button[data-af-cancel] { background: transparent; color: var(--ink); border-color: var(--card-edge); }
.af-thanks { font-weight: 600; color: var(--good); }
.feedback-off { color: var(--muted); font-style: italic; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--card-edge); background: var(--header-bg); }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 24px 16px 32px; }
.about { max-width: 640px; color: var(--muted); font-size: 0.92rem; }
.fine-print { max-width: 640px; color: var(--muted); font-size: 0.85rem; }
.footer-links { font-size: 0.92rem; }
.count-line { color: var(--muted); font-size: 0.85rem; font-style: italic; }
.maker-tagline { color: var(--muted); font-size: 0.92rem; font-style: italic; }
.geek-webring, .construction { display: none; }

/* ================================================================
   GEEK MODE — full 2000s internet skin over the same markup.
   The comedy lives in the chrome; content stays readable.
   ================================================================ */
:root[data-mode="geek"] {
  --font: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Times New Roman", serif;
  --radius: 0;
}
:root[data-mode="geek"] body {
  background-color: #00001a;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 8%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 84% 64%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 78%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 42%, #ffe97a 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 58%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 92%, #fff 50%, transparent 51%);
  color: #e8e8ff;
  --bg: #00001a;
  --ink: #f2f2ff;
  --muted: #b9b9e6;
  --card: #101038;
  --card-edge: #3a3a8c;
  --accent: #7df9ff;
  --accent-soft: #1c1c5e;
  --good: #39ff6a;
  --good-soft: #0d3a1c;
  --header-bg: #0a0a2e;
  --chip-bg: #1c1c5e;
  --chip-on: #7df9ff;
  --input-bg: #0a0a2e;
  --shadow: none;
  --on-accent: #00001a;
}
:root[data-mode="geek"] .site-header { border-bottom: 3px ridge #7df9ff; }
:root[data-mode="geek"] .brand-text strong { font-family: "Times New Roman", serif; color: #ffe97a; }
:root[data-mode="geek"] .tagline { overflow: hidden; white-space: nowrap; }
:root[data-mode="geek"] .marquee-text {
  display: inline-block;
  padding-left: 100%;
  animation: geek-marquee 14s linear infinite;
  color: #7df9ff;
}
@keyframes geek-marquee { to { transform: translateX(-100%); } }
:root[data-mode="geek"] .hero h1 { font-family: "Times New Roman", serif; color: #ffe97a; }
:root[data-mode="geek"] .promise-strip { border: 3px outset #39ff6a; }
:root[data-mode="geek"] .tile {
  border: 3px outset #5a5ac8;
  background: var(--card);
  box-shadow: 4px 4px 0 #000;
}
:root[data-mode="geek"] .tile:hover { transform: none; border-style: inset; }
:root[data-mode="geek"] .icon-wrap { border-radius: 0; }
:root[data-mode="geek"] .detail-card { border: 3px ridge #7df9ff; }
:root[data-mode="geek"] .chip, :root[data-mode="geek"] .pill,
:root[data-mode="geek"] #search, :root[data-mode="geek"] .sort-row select {
  border-radius: 0;
  border: 2px outset #5a5ac8;
}
:root[data-mode="geek"] .chip.on, :root[data-mode="geek"] .pill.on { border-style: inset; }
:root[data-mode="geek"] .tile .subpill { border-radius: 0; }
:root[data-mode="geek"] #category-chips {
  background: none; border: none; border-radius: 0; padding: 0 0 4px; gap: 8px; width: auto;
}
:root[data-mode="geek"] #category-chips .chip { border: 2px outset #5a5ac8; border-radius: 0; background: var(--chip-bg); }
:root[data-mode="geek"] #category-chips .chip.on { border-style: inset; background: var(--accent); color: var(--on-accent); }
:root[data-mode="geek"] #subcategory-chips {
  background: none; border: none; border-radius: 0; padding: 0 0 4px; gap: 8px; width: auto;
}
:root[data-mode="geek"] #subcategory-chips .chip { border: 2px outset #5a5ac8; border-radius: 0; background: var(--chip-bg); }
:root[data-mode="geek"] #subcategory-chips .chip.on { border-style: inset; background: var(--accent); color: var(--on-accent); }
/* Geek collapsed state needs the padding zeroed too (specificity). */
:root[data-mode="geek"] .sub-collapse:not(.open) > #subcategory-chips { padding-top: 0; padding-bottom: 0; }
:root[data-mode="geek"] .store-badge { border-radius: 0; border: 2px outset #5a5ac8; }
:root[data-mode="geek"] .needs-review { border-radius: 0; }
:root[data-mode="geek"] .made-by-us { border-radius: 0; }
:root[data-mode="geek"] .site-footer { border-top: 3px ridge #7df9ff; }
:root[data-mode="geek"] .geek-webring { display: block; text-align: center; color: var(--muted); }
:root[data-mode="geek"] .geek-webring button {
  font: inherit; color: var(--accent); background: none; border: none;
  text-decoration: underline; cursor: pointer; padding: 0;
}
:root[data-mode="geek"] .construction { display: block; text-align: center; margin: 14px 0 4px; }
:root[data-mode="geek"] .construction span {
  font-weight: 800; letter-spacing: 2px; color: #000;
  background: repeating-linear-gradient(45deg, #ffe97a 0 14px, #111 14px 28px);
  padding: 6px 18px;
  -webkit-text-stroke: 0;
}
:root[data-mode="geek"] .feedback-row button { border-radius: 0; border: 2px outset #5a5ac8; }
:root[data-mode="geek"] .af-form { border-radius: 0; border: 2px outset #5a5ac8; }
:root[data-mode="geek"] .af-field input, :root[data-mode="geek"] .af-field textarea { border-radius: 0; }
:root[data-mode="geek"] .af-actions button { border-radius: 0; }
:root[data-mode="geek"] .chip.on, :root[data-mode="geek"] .pill.on {
  background: var(--chip-on); color: #00001a; border: 2px inset #5a5ac8;
}
:root[data-mode="geek"] .qr-appicon-glyph { border-radius: 0; }
:root[data-mode="geek"] .qr-appicon:hover { background: var(--accent-soft); }
:root[data-mode="geek"] .switcher { border-radius: 0; }
:root[data-mode="geek"] .switcher button.on { background: #ffe97a; color: #000; }

/* ============ Geek light theme: classic daytime 2000s web ============
   NOTE: the geek skin declares its palette variables on `body`, so the
   light overrides must live on `body` too — :root-level vars lose to the
   nearer body scope for every card and field. */
:root[data-mode="geek"][data-theme="light"] body {
  background-color: #c9c9e8;
  background-image: none;
  color: #1a1a4d;
  --bg: #c9c9e8;
  --ink: #1a1a4d;
  --muted: #4d4d8c;
  --card: #f2f2fb;
  --card-edge: #8c8cc9;
  --accent: #0000cc;
  --accent-soft: #dadaf5;
  --good: #0a7a2e;
  --good-soft: #d9f0de;
  --header-bg: #b3b3da;
  --chip-bg: #e0e0f4;
  --chip-on: #0000cc;
  --input-bg: #ffffff;
  --shadow: none;
  --on-accent: #ffffff;
}
:root[data-mode="geek"][data-theme="light"] .brand-text strong,
:root[data-mode="geek"][data-theme="light"] .hero h1 { color: #5a4a00; }
:root[data-mode="geek"][data-theme="light"] .marquee-text { color: #0000cc; }
:root[data-mode="geek"][data-theme="light"] .chip.on,
:root[data-mode="geek"][data-theme="light"] .pill.on { color: #ffffff; }
/* theme=default follows the system in geek mode too */
@media (prefers-color-scheme: light) {
  :root[data-mode="geek"]:not([data-theme="dark"]) body {
    background-color: #c9c9e8;
    background-image: none;
    color: #1a1a4d;
    --bg: #c9c9e8;
    --ink: #1a1a4d;
    --muted: #4d4d8c;
    --card: #f2f2fb;
    --card-edge: #8c8cc9;
    --accent: #0000cc;
    --accent-soft: #dadaf5;
    --good: #0a7a2e;
    --good-soft: #d9f0de;
    --header-bg: #b3b3da;
    --chip-bg: #e0e0f4;
    --chip-on: #0000cc;
    --input-bg: #ffffff;
    --shadow: none;
    --on-accent: #ffffff;
  }
  :root[data-mode="geek"]:not([data-theme="dark"]) .brand-text strong,
  :root[data-mode="geek"]:not([data-theme="dark"]) .hero h1 { color: #5a4a00; }
  :root[data-mode="geek"]:not([data-theme="dark"]) .marquee-text { color: #0000cc; }
  :root[data-mode="geek"]:not([data-theme="dark"]) .chip.on,
  :root[data-mode="geek"]:not([data-theme="dark"]) .pill.on { color: #ffffff; }
}

/* ---------- desktop refinements ---------- */
@media (min-width: 641px) {
  /* Playful desktop: the tagline repeats the hero heading, so it goes. Geek keeps it — classic. */
  :root[data-mode="playful"] .hero .tagline { display: none; }
}

@media (max-width: 640px) {
  /* One header row on phones: brand + both toggles side by side, compact.
     Verified at 390/360/320px viewports: no horizontal overflow, no wrap,
     header 69px tall (was ~90px with the stacked toggles). The brand name
     folds to two lines to make room. Horizontal scroll is never acceptable. */
  .header-inner { gap: 8px; flex-wrap: nowrap; }
  .switchers { flex-direction: row; align-items: center; gap: 6px; margin-left: auto; }
  .switcher button { padding: 6px 8px; font-size: 0.72rem; }
  .switcher.theme-switcher button { padding: 5px 7px; }
  .qr-appicon { display: none; } /* the QR Cards icon lives in the desktop header only */
  .brand { gap: 8px; }
  .brand-text em { display: none; } /* tagline hides on phones to save vertical room */
  .brand-text strong { font-size: 1rem; }
  .brand img { width: 40px; height: 40px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .detail-card { padding: 18px; }
}
