@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/lora-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/lora-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/lora-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/lora-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/playfair-display-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/playfair-display-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   WorldStrata home (v4) - same tokens, top bar and footer as the title pages.
   Every size is a clamp(), so it grows on big screens and stays tight on phones.
   Loaded from index.html written by generate-home.js. Fonts: Playfair Display
   (headings, titles, scores) and Lora (everything you read).
   ========================================================================== */

:root {
  --on-accent: #fff;
  --bg: #fafafa;
  --bg-dark: #f0f0f0;
  --text: #1a1a1a;
  --text-light: #666;
  --text-body: #1a1a1a;
  --strata: linear-gradient(to bottom, transparent 0 3px, var(--accent) 3px 4px, transparent 4px 7px, var(--accent-slime) 7px 9px, transparent 9px 12px, var(--border) 12px 15px);
  --nav-icon-svg: clamp(19px, 8.71px + 0.714vw, 29px);
  --accent: #1f8fce;
  --accent-text: #106f9e;
  --accent-slime: #2ba889;
  --accent-slime-text: #14805f;
  --border: #e0e0e0;
  --topbar-bg: rgba(250, 250, 250, 0.82);
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --topbar-h: clamp(52px, 18px + 2.3vw, 80px);
  --space-inline: clamp(20px, 9.96px + 2.642vw, 48px);
  --space-block: clamp(32px, 14.79px + 4.528vw, 80px);
  --fs-brand: clamp(0.9rem, 0.314rem + 0.929vw, 2rem);
  --nav-icon-btn: clamp(32px, 14px + 1.25vw, 50px);

  /* spacing, radii, lines (same scale as the title pages) */
  --s1: clamp(4px, 2px + 0.3vw, 8px);
  --s2: clamp(8px, 5px + 0.5vw, 14px);
  --s3: clamp(12px, 7px + 0.9vw, 24px);
  --s4: clamp(16px, 8px + 1.4vw, 36px);
  --s5: clamp(24px, 12px + 2.2vw, 56px);
  --gap: clamp(20px, 4.57px + 3.571vw, 64px);
  --section: clamp(48px, 22px + 6vw, 120px);
  --line: clamp(1px, 0.5px + 0.06vw, 2px);
  --radius: clamp(4px, 2px + 0.3vw, 8px);
  --radius-sm: clamp(2px, 1px + 0.15vw, 4px);
  --max: calc(1100px + clamp(0px, 4vw, 240px));

  /* type scale */
  --fs-body: clamp(1rem, 0.94rem + 0.25vw, 1.3rem);
  --fs-small: clamp(0.82rem, 0.76rem + 0.2vw, 1.05rem);
  --fs-ui: clamp(0.9rem, 0.84rem + 0.2vw, 1.15rem);
  --fs-h1: clamp(2.3rem, 0.9rem + 4.6vw, 5.6rem);
  --fs-h2: clamp(1.5rem, 1.05rem + 1.5vw, 2.7rem);
  --fs-h3: clamp(1.5rem, 1rem + 1.9vw, 3.1rem);
  --fs-hero-sub: clamp(1.1rem, 0.75rem + 0.9vw, 1.9rem);
  --fs-score: clamp(1.5rem, 0.9rem + 1.3vw, 2.8rem);
  --fs-band: clamp(1rem, 0.88rem + 0.4vw, 1.4rem);

  /* cover and rows */
  --card-w: clamp(124px, 78px + 8.5vw, 220px);
  --feat-w: clamp(120px, 60px + 15vw, 300px);
  --core-w: clamp(6px, 4px + 0.35vw, 11px);
  --band-h: clamp(44px, 32px + 1.7vw, 72px);

  /* one colour per format, same as the title pages (data-kind "tv" is shown as "Anime") */
  --k-tv: #87ceeb;      /* Anime        Sky Blue      */
  --k-movie: #d4c1f5;   /* Movie        Lavender      */
  --k-ova: #ffd3b6;     /* OVA          Peach         */
  --k-special: #fff1a8; /* Special      Butter Yellow */
  --k-ln: #a8e6a1;      /* Light Novel  Slime Green   */
  --k-wn: #bdefe8;      /* Web Novel    Aqua Mint     */
  --k-manga: #ffc8dd;   /* Manga        Sakura Pink   */
}
:root[data-theme="dark"] {
  --on-accent: #0b1d28;
  --bg: #131316;
  --bg-dark: #1c1c21;
  --text: #f0f0f0;
  --text-light: #9a9a9f;
  --text-body: #d6d6da;
  --accent: #52b8ea;
  --accent-text: #52b8ea;
  --accent-slime: #4fd1ac;
  --accent-slime-text: #4fd1ac;
  --border: #2b2b31;
  --topbar-bg: rgba(19, 19, 22, 0.82);
}

html { scrollbar-gutter: stable; scroll-behavior: smooth; }
[hidden] { display: none !important; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
}
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
.pf { font-family: var(--font-display); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 300; transform: translateY(-150%); background: var(--accent-text); color: var(--on-accent); font-weight: 600; font-size: var(--fs-small); padding: 12px 20px; border-radius: var(--radius-sm); transition: transform 0.2s ease; }
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--text); outline-offset: 2px; }

/* ---------- Top bar (same as the title pages) ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-inline); border-bottom: 1px solid transparent; transition: border-color 0.3s ease; }
.topbar::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: transparent; transition: background 0.3s ease; }
.topbar.is-scrolled { border-bottom-color: var(--border); }
.topbar.is-scrolled::before { background: var(--topbar-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 12px; border-radius: var(--radius-sm); }
.logo-icon { height: 26px; width: auto; display: block; }
.brand-name { font-family: var(--font-display); font-size: var(--fs-brand); font-weight: 800; letter-spacing: -0.02em; }
.nav-actions { --nav-gap: 14px; display: flex; align-items: center; gap: var(--nav-gap); margin-left: auto; }
.nav-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--nav-icon-btn); height: var(--nav-icon-btn); background: transparent; border: none; color: var(--text); cursor: pointer; padding: 0; text-decoration: none; transition: color 0.25s ease, transform 0.2s ease; }
.nav-icon-btn:hover { color: var(--accent); transform: translateY(-1px); }
.nav-icon-btn svg { width: var(--nav-icon-svg); height: var(--nav-icon-svg); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* The search icon waits until the hero search box has scrolled out of view, then slides in */
.nav-search { transition: width 0.25s ease, margin 0.25s ease, opacity 0.2s ease, color 0.25s ease, transform 0.2s ease; overflow: hidden; }
.nav-search.is-away { width: 0; margin-right: calc(var(--nav-gap) * -1); opacity: 0; pointer-events: none; }
.nav-icon-btn .theme-icon-sun { display: none; }
:root[data-theme="dark"] .nav-icon-btn .theme-icon-moon { display: none; }
:root[data-theme="dark"] .nav-icon-btn .theme-icon-sun { display: block; }

/* ---------- Page ---------- */
.hm { max-width: var(--max); margin: 0 auto; padding: calc(var(--topbar-h) + var(--s3)) var(--space-inline) 0; }
.sc { font-family: var(--font-display); font-weight: 800; font-variant-numeric: lining-nums; color: var(--accent-text); }
[data-kind="tv"] { --kind: var(--k-tv); } [data-kind="movie"] { --kind: var(--k-movie); }
[data-kind="ova"] { --kind: var(--k-ova); } [data-kind="special"] { --kind: var(--k-special); }
[data-kind="ln"] { --kind: var(--k-ln); } [data-kind="wn"] { --kind: var(--k-wn); } [data-kind="manga"] { --kind: var(--k-manga); }

/* Hide ratings only (same as the title pages): card scores, big score next to the facts, search scores */
.sc,
.sr-score {
  display: none;
}

/* Hero: words and search on the left, the format layers on the right */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--gap); align-items: center; padding: var(--s4) 0 0; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { font-size: var(--fs-h1); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; color: var(--text); text-wrap: balance; }
.hero-sub { font-size: var(--fs-hero-sub); font-style: italic; line-height: 1.4; max-width: 34ch; margin: var(--s3) 0 var(--s4); color: var(--text-light); }
.sb { position: relative; max-width: 34em; }
.q { width: 100%; padding: clamp(12px, 9px + 0.5vw, 20px) clamp(18px, 14px + 0.6vw, 30px); border: var(--line) solid var(--border); border-radius: 99px; background: var(--bg-dark); font-size: var(--fs-ui); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.q:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.dd { position: absolute; left: 0; right: 0; top: calc(100% + var(--s1)); z-index: 30; background: var(--bg); border: var(--line) solid var(--border); border-radius: var(--radius); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22); overflow: hidden; }
.hit { display: grid; grid-template-columns: clamp(30px, 24px + 1vw, 44px) minmax(0, 1fr) auto; gap: var(--s2); align-items: center; padding: var(--s1) var(--s2); border-bottom: var(--line) solid var(--border); }
.hit:hover, .hit.is-active { background: color-mix(in srgb, var(--accent) 9%, var(--bg)); }
.hit-c { display: block; }
.hit .cv { padding: 0; border-radius: var(--radius-sm); }
.hit b { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-ui); line-height: 1.25; }
.hit small { display: block; color: var(--text-light); font-size: var(--fs-small); line-height: 1.3; }
.dd { max-height: min(72vh, 36rem); overflow-y: auto; overscroll-behavior: contain; }
.dd .sr-row.is-active { background: color-mix(in srgb, var(--accent) 9%, var(--bg)); }
.dd .sr-link { display: block; margin: var(--s2); }
.dd-foot { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s1) var(--s2); font-size: var(--fs-small); color: var(--text-light); }
.dd-foot button { background: none; border: 0; color: var(--accent-text); font-weight: 600; }

/* The format layers: counted from worlds.js, each one a filter */
.strata h2 { font-family: var(--font-body); font-size: var(--fs-small); font-weight: 600; color: var(--text-light); margin: 0 0 var(--s2); }
.bands { display: flex; flex-direction: column; gap: clamp(3px, 2px + 0.2vw, 6px); }
.band { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); width: var(--w); min-width: min(100%, 12rem); height: var(--band-h); padding: 0 var(--s3) 0 var(--s3); border: 0; border-left: clamp(6px, 4px + 0.4vw, 12px) solid var(--kind); border-radius: var(--radius-sm) var(--radius) var(--radius) var(--radius-sm); background: color-mix(in srgb, var(--kind) 26%, var(--bg)); color: var(--text); text-align: left; transition: background 0.2s ease; }
.band span { font-weight: 600; font-size: var(--fs-ui); }
.band b { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-band); font-variant-numeric: lining-nums; }
.band:hover:not(:disabled) { background: color-mix(in srgb, var(--kind) 40%, var(--bg)); }
.band[aria-pressed="true"] { background: var(--kind); color: #1a1a1a; }   /* dark text: the format colours are pastel */
.band:disabled { opacity: 0.4; cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  .band { animation: lay 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i) * 70ms); }
}
@keyframes lay { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }

/* Sections */
.sec { margin-top: var(--section); }
.sec h2, .two h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.15; }
.tabs { display: flex; gap: var(--s1); overflow-x: auto; padding: var(--s2) 0 var(--s3); scrollbar-width: thin; }
.tabs--wrap { flex-wrap: wrap; overflow: visible; }
.tab { position: relative; flex: none; background: none; border: var(--line) solid var(--border); border-radius: 99px; padding: clamp(3px, 2px + 0.2vw, 7px) clamp(13px, 10px + 0.4vw, 22px); font-size: var(--fs-ui); line-height: 1.5; transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
.tab:hover { border-color: var(--text); }
.tab[aria-pressed="true"] {   /* glass HUD: see-through blue/slime tint, soft blur, light edge on top */
  background: linear-gradient(135deg, color-mix(in srgb, var(--k-tv) 38%, transparent), color-mix(in srgb, var(--k-ln) 26%, transparent));
  -webkit-backdrop-filter: blur(10px) saturate(1.5);
  backdrop-filter: blur(10px) saturate(1.5);
  border-color: color-mix(in srgb, var(--k-tv) 70%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.12), 0 4px 14px color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--text);
}

/* Covers: a cover with the colour strip of its story beside it */
.cw { display: grid; grid-template-columns: minmax(0, 1fr) var(--core-w); gap: clamp(3px, 2px + 0.2vw, 6px); }
.cv { position: relative; display: flex; align-items: flex-end; aspect-ratio: 2 / 3; padding: var(--s2); overflow: hidden; border-radius: var(--radius); background: linear-gradient(160deg, var(--accent), var(--accent-slime)); color: #fff; }   /* no picture: same colour as the title page cover */
.cv-t { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-small); line-height: 1.12; overflow-wrap: anywhere; }
.cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.core { display: flex; flex-direction: column; gap: clamp(2px, 1.5px + 0.1vw, 4px); }
.core .ci { position: relative; flex: var(--w, 60) 1 0; min-height: clamp(5px, 4px + 0.3vw, 10px); padding: 0; border: 0; background: var(--kind); opacity: 0.7; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 28%, transparent); border-radius: var(--radius-sm); cursor: pointer; transition: opacity 0.15s ease; }
.core .ci::after { content: ""; position: absolute; inset: 0 -6px 0 -4px; }                 /* a bigger area to press (the strip is thin) */
.core .ci:hover { opacity: 1; }
.core .ci[aria-pressed="true"] { opacity: 1; cursor: default; }
.core .ci.is-multi[aria-pressed="true"] { cursor: pointer; }                                  /* the lit format with more titles: press for the next one */
.core .ci:disabled { cursor: default; }
.core .ci:disabled:hover { opacity: 0.4; }
.core .ci[aria-pressed="true"]:disabled:hover { opacity: 1; }
.core .ci:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.rail { display: flex; gap: var(--s3); overflow-x: auto; scroll-snap-type: x proximity; padding: var(--s1) 0 var(--s2); scrollbar-width: thin; }
.card { position: relative; display: block; flex: none; width: var(--card-w); scroll-snap-align: start; }
a.cv, a.card-t { color: inherit; text-decoration: none; }
.card-t { display: block; margin-top: var(--s2); font-family: var(--font-display); font-weight: 600; font-size: var(--fs-ui); line-height: 1.25; }
.card:hover .card-t { color: var(--accent-text); }
.card-m { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s1); font-size: var(--fs-small); color: var(--text-light); line-height: 1.4; }
.card.is-soon { opacity: 0.55; }

/* Big title (New, mood pick) */
.feat { display: grid; grid-template-columns: var(--feat-w) minmax(0, 1fr); gap: var(--gap); align-items: center; margin-bottom: var(--s5); }
.feat--sm { --feat-w: clamp(100px, 50px + 11vw, 200px); gap: var(--s4); margin-bottom: 0; }
.feat h3 { font-size: var(--fs-h3); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; color: var(--text); text-wrap: balance; }
.feat--sm h3 { font-size: clamp(1.4rem, 1rem + 1.3vw, 2.3rem); }
.feat-hook { margin: var(--s1) 0 var(--s3); font-style: italic; color: var(--text-light); max-width: 40ch; }
.facts { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); font-size: var(--fs-small); }
.facts .sc { font-size: var(--fs-score); line-height: 1; padding-right: var(--s2); border-right: var(--line) solid var(--accent-slime); }
.pill { display: inline-block; padding: clamp(10px, 6px + 0.6vw, 18px) clamp(18px, 12px + 1vw, 38px); border-radius: 99px; background: var(--accent-text); color: var(--on-accent); font-weight: 600; font-size: var(--fs-ui); text-decoration: none; transition: transform 0.2s ease, filter 0.2s ease; }
a.pill:hover { transform: translateY(calc(var(--line) * -1)); filter: brightness(1.08); }
.pill.is-off { opacity: 0.5; }

/* Mood + recently updated side by side */
.two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--gap); }
.two--one { grid-template-columns: minmax(0, 1fr); }
.upd { list-style: none; margin-top: var(--s3); }
.upd li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2); padding: var(--s2) 0 var(--s2) var(--s3); border-left: clamp(3px, 2px + 0.2vw, 5px) solid var(--kind); border-bottom: var(--line) solid var(--border); }
.upd a, .upd span { display: block; min-width: 0; }
.upd b { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-ui); line-height: 1.3; }
.upd small, .upd time { color: var(--text-light); font-size: var(--fs-small); }
.upd a:hover b { color: var(--accent-text); }

/* Archive */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.bar select { background: var(--bg-dark); border: var(--line) solid var(--border); border-radius: 99px; padding: clamp(3px, 2px + 0.2vw, 7px) clamp(12px, 9px + 0.4vw, 20px); font-size: var(--fs-ui); }
.bar-n { margin-left: auto; color: var(--text-light); font-size: var(--fs-small); }
.empty { color: var(--text-light); padding: var(--s3) 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: var(--s3); margin-top: var(--s2); color: var(--text-light); font-size: var(--fs-small); }
.pager button { background: none; border: var(--line) solid var(--border); border-radius: 99px; padding: clamp(4px, 3px + 0.2vw, 8px) clamp(16px, 12px + 0.6vw, 26px); font-size: var(--fs-ui); }
.pager button:disabled { opacity: 0.35; cursor: default; }

/* Search pop-up: copied from style.css so it looks the same as on the title pages */
body.modal-locked { overflow: hidden; }
.modal-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 210; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.modal-scrim.is-open { opacity: 1; pointer-events: auto; }
.search-modal { position: fixed; top: 12vh; top: 12dvh; left: 50%; width: min(600px, 92vw); max-height: 74vh; max-height: 74dvh; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3); z-index: 220; opacity: 0; pointer-events: none; transform: translate(-50%, -8px); transition: opacity 0.2s ease, transform 0.2s ease; display: flex; flex-direction: column; }
.search-modal.is-open { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: none; border: none; color: var(--text-light); cursor: pointer; transition: color 0.2s ease, background 0.2s ease; }
.modal-close:hover { color: var(--accent); background: var(--bg-dark); }
.modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 50%; }
.modal-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search-modal-inner { padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; min-height: 0; }
.search-form { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.search-form-icon { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--text-light); stroke-width: 1.6; }
.search-form:focus-within { border-bottom-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.search-input { flex: 1; border: none; background: transparent; outline: none; font-family: var(--font-body); font-size: 1.05rem; color: var(--text); }
.search-input::placeholder { color: var(--text-light); }
.search-results { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.search-empty, .search-note { font-family: var(--font-body); font-style: italic; color: var(--text-light); font-size: 0.92rem; padding: 20px 2px; text-align: center; }
@media (max-width: 600px) { .search-modal { top: 8vh; top: 8dvh; max-height: 84vh; max-height: 84dvh; } }
/* Results inside the pop-up (rules from anime-strata.css) */
.sr-rows { list-style: none; }
.sr-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-left: clamp(3px, 2px + 0.2vw, 5px) solid var(--kind, var(--accent)); border-bottom: var(--line) solid var(--border); }
.sr-row:hover, .sr-row:focus-visible { background: var(--bg-dark); }
.sr-type { flex: 0 0 clamp(70px, 54px + 3vw, 120px); font-size: var(--fs-small); color: var(--text-light); }
.sr-main { min-width: 0; flex: 1; }
.sr-main b { display: block; font-size: var(--fs-ui); line-height: 1.3; }
.sr-main small { display: block; font-size: var(--fs-small); color: var(--text-light); }
.sr-link { display: inline-block; margin-top: var(--s2); font-weight: 600; color: var(--accent-text); }
.sr-intro { margin-bottom: var(--s3); font-size: var(--fs-small); color: var(--text-light); }
.sr-chips { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s1) 0; list-style: none; }
.sr-chips li { padding: 1px clamp(10px, 7px + 0.4vw, 16px); border: var(--line) solid var(--border); border-radius: 99px; color: var(--text); }
.sr-answer { padding: var(--s3); border-left: clamp(4px, 3px + 0.2vw, 8px) solid var(--accent); background: var(--bg-dark); border-radius: 0 var(--radius) var(--radius) 0; }
.sr-answer h3 { font-family: var(--font-display); margin-bottom: var(--s1); }

/* Back to top + footer: same as the title pages */
.back-to-top { position: fixed; right: var(--space-inline); bottom: 20px; width: var(--nav-icon-btn); height: var(--nav-icon-btn); border-radius: 50%; border: none; background: var(--accent-text); color: var(--on-accent); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28); z-index: 90; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; }
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
footer { position: relative; margin-top: var(--section); background: var(--bg-dark); padding: 48px var(--space-inline) 24px; color: var(--text-light); font-family: var(--font-body); font-size: clamp(0.875rem, 0.336rem + 0.571vw, 1.4rem); }
footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 15px; background: var(--strata); transform: scaleY(-1); pointer-events: none; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; max-width: 1200px; margin: 0 auto; }
.footer-about { max-width: 36ch; }
.footer-brand { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.25em; letter-spacing: -0.01em; color: var(--text); margin-bottom: 6px; }
.footer-about p { line-height: 1.6; }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 0 40px; align-content: start; }
.footer-nav a { padding: 7px 0; color: var(--text-light); text-decoration: none; font-weight: 500; transition: color 0.25s ease; }
.footer-nav a:hover { color: var(--accent-text); text-decoration: underline; }
.footer-legal { max-width: 1200px; margin: 32px auto 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.9em; }

/* Phones and small tablets */
@media (max-width: 700px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .feat { grid-template-columns: clamp(100px, 34vw, 160px) minmax(0, 1fr); gap: var(--s3); }
}
@media (max-width: 420px) {
  .band { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
