/* Best Anime PFP — main stylesheet */
:root {
  --primary: #6b3df4;
  --primary-dark: #5829e0;
  --primary-soft: #f1ecfe;
  --ink: #101828;
  --ink-soft: #344054;
  --muted: #667085;
  --line: #e9e6f8;
  --bg: #ffffff;
  --bg-alt: #f8f7ff;
  --footer-bg: #0c0c1d;
  --radius: 16px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow { max-width: 900px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 66px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark { width: 36px; height: 36px; }

.logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.logo-text em { font-style: normal; color: var(--primary); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.main-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.main-nav a:hover { color: var(--primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { padding: 44px 0 56px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 56px;
  align-items: start;
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; }

.hero h1 {
  font-size: 40px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.hero h1 .accent { color: var(--primary); }

.lede {
  font-size: 16px;
  color: var(--muted);
  max-width: 100%;
  margin-bottom: 22px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d9d4f5;
  border-radius: 14px;
  padding: 6px 6px 6px 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(107, 61, 244, 0.06);
  max-width: 560px;
  margin-bottom: 16px;
}

.search-bar svg { color: var(--muted); flex-shrink: 0; }

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
  min-width: 0;
}

.search-bar input::placeholder { color: #98a2b3; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.tag-row a {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: #f4f2fd;
  border: 1px solid transparent;
  padding: 6px 11px;
  border-radius: 999px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.tag-row a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.hero-stats {
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.hero-stats strong { font-weight: 700; color: var(--ink); }
.hero-stats .dot { color: #b6b0e3; margin: 0 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(107, 61, 244, 0.28);
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-outline {
  background: #fff;
  border-color: #c9bdf5;
  color: var(--primary);
}

.btn-outline:hover { border-color: var(--primary); background: var(--primary-soft); }

.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn .arrow { font-size: 18px; line-height: 1; }

/* ---------- Hero media grid ---------- */
.hero-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pfp-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1.02;
  box-shadow: var(--shadow-card);
}

.pfp-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.pfp-card:hover img { transform: scale(1.05); }

.pfp-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 12px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(to top, rgba(8, 6, 24, 0.72), transparent);
}

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.section-sub {
  font-size: 15px;
  color: var(--muted);
  max-width: 640px;
}

.link-more {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  padding-top: 6px;
}

.link-more:hover { text-decoration: underline; }

/* ---------- Cards & grids ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(107, 61, 244, 0.10);
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 14px 0 4px;
}

.card-meta {
  font-size: 13.5px;
  color: var(--muted);
}

.view-all {
  display: inline-block;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
}

.view-all:hover { text-decoration: underline; }

.thumb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.thumb-grid img,
.thumb-row img {
  width: 100%;
  height: auto;          /* the HTML height attribute would otherwise pin these at 800px tall */
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.thumb-row-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Characters ---------- */
.tabs {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 4px;
}

.tab {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab:hover { border-color: var(--primary); color: var(--primary); }

.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.filter-note {
  font-size: 14px;
  color: var(--muted);
  margin: -12px 0 18px;
}

.filter-note strong { color: var(--primary); }

.char-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 40px;
}

.char-list { list-style: none; }

.char-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 6px;
  border-radius: 12px;
  transition: background 0.15s ease;
}

.char-row:hover { background: #fff; }

.char-row.hidden { display: none; }

.rank {
  width: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  flex-shrink: 0;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.char-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.char-info strong { font-size: 15px; font-weight: 700; }
.char-info span { font-size: 13px; color: var(--muted); }

.dl {
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

/* ---------- Platforms ---------- */
.platform-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
}

.platform-card h3 { margin: 0 0 4px; }

.platform-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 14px;
}

.platform-icon svg { width: 30px; height: 30px; }

.card-spec {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
  font-weight: 500;
}

.card-spec .pipe { color: #c9c3ee; margin: 0 6px; }

/* ---------- Guides ---------- */
.guide-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
}

.guide-thumb {
  width: 104px;
  height: 104px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.guide-body h3 { margin: 6px 0 6px; font-size: 15.5px; }

.guide-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ---------- FAQ ---------- */
.faq-section h2 {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.faq-list { border-top: 1px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.faq-q:hover { color: var(--primary); }

.faq-num { color: var(--muted); font-weight: 600; margin-right: 4px; }

.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::before { width: 14px; height: 2.4px; }
.faq-icon::after { width: 2.4px; height: 14px; transition: transform 0.2s ease; }

.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.faq-a p {
  font-size: 14.5px;
  color: var(--muted);
  padding: 0 4px 20px;
  max-width: 760px;
}

.faq-item.open .faq-a { max-height: 220px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: #c9c9e0;
  padding: 52px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(5, 1fr);
  gap: 32px;
  padding-bottom: 44px;
}

.logo-light .logo-text { color: #fff; }

.footer-col h4 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8f8fae;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  padding: 5px 0;
  color: #c9c9e0;
  transition: color 0.15s ease;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: #8f8fae;
}

/* ---------- Responsive ---------- */
/* ============================================================
   RESPONSIVE — mobile-first.
   Base rules below are the phone layout; min-width queries
   add tablet, laptop and desktop layouts on top.
   ============================================================ */
.container { padding: 0 18px; }
.header-inner { gap: 16px; }
.header-actions { margin-left: auto; }
.menu-toggle { display: inline-flex; }
.main-nav {
  display: none;
  position: absolute;
  top: 66px; left: 0; right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08);
  margin-left: 0;
  z-index: 60;
}
.main-nav.open { display: flex; }
.main-nav a { padding: 14px 24px; border-top: 1px solid var(--line); }

.hero { padding: 32px 0 44px; }
.hero-grid { grid-template-columns: 1fr; gap: 36px; }
.hero h1 { font-size: 30px; }
.hero-stats { white-space: normal; }

.grid-4 { grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { grid-template-columns: 1fr; }
.card { padding: 14px; }
.char-cols { grid-template-columns: 1fr; gap: 0; }
.section-head { flex-direction: column; gap: 14px; }
.tabs { flex-wrap: wrap; }

.search-bar { flex-wrap: wrap; padding: 10px; gap: 10px; }
.search-bar input { flex: 1; min-width: 0; padding: 10px 4px; }
.search-bar .btn { flex: 1 1 100%; }
.hero-ctas .btn { flex: 1 1 100%; }

.guide-card { flex-direction: column; }
.guide-thumb { width: 100%; height: 150px; }
.dl { font-size: 12.5px; }
.footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }

/* ---------- large phone / small tablet ---------- */
@media (min-width: 561px) {
  .container { padding: 0 24px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .card { padding: 18px; }
  .hero h1 { font-size: 34px; }
  .search-bar { flex-wrap: nowrap; padding: 6px 6px 6px 16px; gap: 8px; }
  .search-bar input { padding: 0; }
  .search-bar .btn { flex: 0 1 auto; }
  .hero-ctas .btn { flex: 0 1 auto; }
  .guide-card { flex-direction: row; }
  .guide-thumb { width: 104px; height: 104px; }
  .dl { font-size: 13.5px; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

/* ---------- tablet / small laptop ---------- */
@media (min-width: 861px) {
  .main-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    margin-left: auto;
  }
  .main-nav a { padding: 0; border-top: 0; }
  .menu-toggle { display: none; }
  .header-inner { gap: 32px; }
  .header-actions { margin-left: 0; }
  .hero { padding: 44px 0 56px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .hero h1 { font-size: 40px; }
  .hero-stats { white-space: nowrap; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .char-cols { grid-template-columns: 1fr 1fr; gap: 8px 40px; }
  .section-head { flex-direction: row; gap: 20px; }
  .tabs { flex-wrap: nowrap; }
}

/* ---------- desktop ---------- */
@media (min-width: 1025px) {
  .hero-grid { grid-template-columns: 1.08fr 0.92fr; gap: 56px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr repeat(5, 1fr); }
}

/* ---------- overflow safety: grid children must never force a track wider than the viewport ---------- */
.grid-2 > *, .grid-3 > *, .grid-4 > *, .hero-grid > *, .hero-media > *, .char-cols > *, .footer-grid > *, .platform-grid > * { min-width: 0; }
img, svg, video, iframe { max-width: 100%; }

/* ============================================================
   Generated pages: hubs, characters, series, styles, platforms,
   guides, single-image (/pfp/) pages, sitemap and legal pages.
   Mobile-first: base rules are the phone layout, widened in the
   min-width blocks below.
   ============================================================ */

.muted { color: var(--muted); }

/* --- single-image (T4) page --- */
.pfp-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }

.pfp-figure {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin: 0;
}

.pfp-figure img { width: 100%; height: auto; border-radius: 12px; }

.pfp-side h1 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.pfp-facets { color: var(--muted); font-size: 14px; margin: 6px 0 16px; }

.pfp-side .btn { width: 100%; justify-content: center; text-align: center; }

.pfp-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.round-preview {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-alt);
}

.round-preview img { width: 100%; height: 100%; object-fit: cover; }
.preview-cap { font-size: 13px; color: var(--muted); }

.pfp-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 14px;
  margin: 18px 0;
  font-size: 14px;
}

.pfp-meta dt { color: var(--muted); font-weight: 600; }
.pfp-meta dd { margin: 0; color: var(--ink-soft); }
.pfp-meta a { color: var(--primary); font-weight: 600; }

/* --- tag pills (single-image pages, facet hubs) --- */
.tag-pill,
.tag-plain {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.tag-plain { background: var(--bg-alt); }
.tag-pill:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* --- link chips --- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.chip:hover { border-color: var(--primary); color: var(--primary); }

/* --- hub / character / style / match cards --- */
.char-card,
.hub-card,
.style-card,
.match-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.char-card:hover,
.hub-card:hover,
.style-card:hover,
.match-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(107, 61, 244, 0.10); }

.char-card img,
.hub-card img,
.style-card img,
.match-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }

.char-card h3,
.hub-card h3,
.style-card h3,
.match-card h3 { font-size: 15px; font-weight: 700; margin: 10px 0 2px; letter-spacing: -0.01em; }

.char-card p,
.hub-card p,
.style-card p,
.match-card p { font-size: 13.5px; color: var(--muted); }

/* --- extra grids --- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.grid-6 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* --- A–Z character index --- */
.az-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }

.az-nav a {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.az-nav a:hover { border-color: var(--primary); color: var(--primary); }

.az-letter {
  font-size: 19px;
  font-weight: 800;
  margin: 26px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

/* --- link lists / columns --- */
.link-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 18px; list-style: none; }
.link-list a { color: var(--primary); font-weight: 600; font-size: 14.5px; }
.link-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.link-cols h2 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }

/* --- numbered steps --- */
.step-list { list-style: none; counter-reset: step; display: grid; gap: 12px; margin: 0 0 16px; }

.step-list li { position: relative; padding-left: 44px; font-size: 15.5px; color: var(--ink-soft); }

.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- CTA band + ghost button --- */
.section-cta {
  text-align: center;
  padding: 32px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.section-cta h2 { font-size: 21px; font-weight: 800; }
.section-cta p { color: var(--muted); margin: 8px 0 18px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* --- matching sets --- */
.match-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

.match-set {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-card);
}

.match-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.match-row img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* --- articles / long-form (guides, legal) --- */
.prose h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin: 4px 0 12px; }
.prose h2 { font-size: 20px; font-weight: 700; margin: 26px 0 10px; }
.prose h3 { font-size: 17px; font-weight: 700; margin: 20px 0 8px; }
.prose p, .prose li { font-size: 16px; color: var(--ink-soft); }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px 22px; }
.prose li { margin-bottom: 6px; }
.prose .lede { font-size: 17.5px; color: var(--ink); }
.prose a { color: var(--primary); font-weight: 600; text-decoration: underline; }
.prose strong { color: var(--ink); }
.prose blockquote { border-left: 3px solid var(--primary); padding: 4px 0 4px 16px; margin: 0 0 16px; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { background: var(--bg-alt); font-weight: 700; }
.prose img { border-radius: 12px; }

/* --- sitemap page --- */
.sitemap-list { list-style: none; }
.sitemap-list li { margin-bottom: 6px; break-inside: avoid; }
.sitemap-list a { color: var(--primary); font-size: 14.5px; font-weight: 600; }

/* --- footer brand line --- */
.footer-brand { font-size: 14px; color: rgba(255, 255, 255, 0.62); max-width: 320px; }

@media (min-width: 561px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .link-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sitemap-list { columns: 2; }
  .pfp-side .btn { width: auto; }
  .round-preview { flex-basis: 64px; width: 64px; height: 64px; }
}

@media (min-width: 861px) {
  .pfp-detail { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 32px; align-items: start; }
  .pfp-side h1 { font-size: 29px; }
  .grid-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .link-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose h1 { font-size: 33px; }
  .prose h2 { font-size: 23px; }
  .section-cta { padding: 46px 32px; }
  .section-cta h2 { font-size: 25px; }
}

@media (min-width: 1025px) {
  .grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .match-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sitemap-list { columns: 3; }
}

.pfp-detail > *, .grid-2 > *, .grid-6 > *, .link-list > *, .link-cols > *,
.match-grid > *, .match-row > *, .char-card > *, .hub-card > *, .style-card > * { min-width: 0; }

/* ---------- every card picture stays SQUARE.
   The HTML width/height attributes (kept for layout stability) act as a presentational
   height of 800px, and that beats aspect-ratio — so without height:auto the pictures
   render 800px tall in a 100-500px wide card (long/tall images). Reset height here. */
.card img, figure img, .tile img, .thumb img, .char-card img, .hub-card img, .style-card img,
.pfp-card img, .match-card img, .match-row img, .cn-pair img, .pfp-figure img, .guide-thumb {
  height: auto;          /* not width:100% — fixed-size thumbs (e.g. .guide-thumb 104px) keep their size */
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ---------- partial rows: a grid with fewer items than columns left the cards as small
   boxes with a big empty gap on the right. From tablet up, let the last row share the
   full width (2 cards in a 4-up grid each take half). Below 861px the base layouts are
   already 1-2 columns, so they are left alone. ---------- */
@media (min-width: 861px) {
  .grid-4:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4:has(> :last-child:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-6:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-6:has(> :last-child:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-6:has(> :last-child:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-6:has(> :last-child:nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* language switcher (footer, added by build_locale.py) */
.footer-langs{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:20px 0 6px;margin-top:8px;border-top:1px solid rgba(255,255,255,.10);font-size:.85rem}
.footer-langs .lang-label{opacity:.55;letter-spacing:.06em;text-transform:uppercase}
.footer-langs .lang-link{text-decoration:none;opacity:.7;font-weight:500;letter-spacing:.04em}
.footer-langs .lang-link:hover{opacity:1}
.footer-langs .lang-link.is-current{opacity:1;font-weight:700;text-decoration:underline}
