﻿:root {
  --bg: #0b0f14;
  --bg-soft: #0f141b;
  --panel: #121923;
  --panel-2: #17202c;
  --panel-3: #1d2836;
  --line: #263445;
  --line-soft: #1c2734;
  --text: #e7edf5;
  --muted: #8d9aab;
  --muted-2: #6f7c8e;
  --accent: #f0a35e;
  --accent-soft: rgba(240, 163, 94, 0.16);
  --accent-2: #65d0c2;
  --danger: #e4717f;
  --warn: #e4c56f;
  --radius: 12px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-mono: "Cascadia Code", Consolas, monospace;
  --chart-text: #e7edf5;
  --chart-muted: #8d9aab;
  --chart-line: #263445;
  --chart-bg: #121923;
  --chart-1: #f0a35e;
  --chart-2: #65d0c2;
  --chart-3: #8ea6ff;
  --chart-4: #e4717f;
  --chart-5: #e4c56f;
  --chart-6: #b18cff;
}

/* Scrollbars follow the active theme (Firefox + Chromium/WebKit). */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--panel-2);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track {
  background: var(--panel-2);
  border-radius: var(--radius);
}
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 78%, var(--panel-3));
  border: 2px solid var(--panel-2);
  border-radius: var(--radius);
}
*::-webkit-scrollbar-thumb:hover { background: var(--accent); }
*::-webkit-scrollbar-thumb:active { background: var(--accent-2); }
*::-webkit-scrollbar-corner { background: var(--panel-2); }

[data-theme="paper"] {
  --bg: #f4f1ea;
  --bg-soft: #eeeae1;
  --panel: #fffdf8;
  --panel-2: #f8f4eb;
  --panel-3: #f0ebe0;
  --line: #d8d1c4;
  --line-soft: #e5ded1;
  --text: #211c16;
  --muted: #6b6154;
  --muted-2: #85796a;
  --accent: #b65f21;
  --accent-soft: rgba(182, 95, 33, 0.12);
  --accent-2: #167f76;
  --danger: #b63d4d;
  --warn: #9a7417;
  --shadow: 0 16px 40px rgba(71, 55, 34, 0.1);
  --chart-text: #211c16;
  --chart-muted: #6b6154;
  --chart-line: #d8d1c4;
  --chart-bg: #fffdf8;
  --chart-1: #b65f21;
  --chart-2: #167f76;
  --chart-3: #4a5fb0;
  --chart-4: #b63d4d;
  --chart-5: #9a7417;
  --chart-6: #7a4fa8;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
[data-theme="paper"], [data-theme="geocities"] { color-scheme: light; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 18% -10%, rgba(240, 163, 94, 0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(101, 208, 194, 0.055), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #111; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 0.85rem clamp(1rem, 3vw, 2.2rem);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.brand-mark {
  width: 1.75rem; height: 1.75rem; display: grid; place-items: center;
  border-radius: 9px; background: var(--accent); color: #17110a; font-weight: 900;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset;
}
.nav { display: flex; align-items: center; gap: 0.2rem; flex-wrap: wrap; }
.nav a { padding: 0.4rem 0.7rem; border-radius: 8px; color: var(--muted); font-size: 0.9rem; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.active { color: var(--text); background: var(--panel-2); box-shadow: 0 0 0 1px var(--line) inset; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.quick-search input {
  width: min(260px, 28vw); padding: 0.48rem 0.7rem; border: 1px solid var(--line);
  border-radius: 9px; background: var(--panel); color: var(--text); outline: none;
}
.quick-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.icon-btn {
  width: 2.15rem; height: 2.15rem; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); }
.theme-picker .icon-btn.theme-toggle {
  width: auto; min-width: 0; display: inline-flex; align-items: center;
  gap: 0.35rem; padding: 0 0.5rem; font-size: 0.72rem;
  line-height: 1; letter-spacing: 0.02em; white-space: nowrap;
}
.theme-dots { display: inline-flex; gap: 2px; }
.theme-dots i {
  display: block; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}
.theme-dots i:nth-child(1) { background: var(--accent); }
.theme-dots i:nth-child(2) { background: var(--accent-2); }
.theme-dots i:nth-child(3) { background: var(--warn); }
.theme-toggle-chev { font-size: 0.6rem; opacity: 0.65; }

.page { max-width: 1480px; margin: 0 auto; padding: 1.5rem clamp(0.9rem, 3vw, 2.2rem) 3rem; }
.site-footer {
  max-width: 1480px; margin: 0 auto; padding: 1.2rem clamp(0.9rem, 3vw, 2.2rem) 2rem;
  display: flex; gap: 1rem; justify-content: space-between; color: var(--muted-2);
  font-size: 0.75rem; border-top: 1px solid var(--line-soft);
}
.footer-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 65%; font-family: var(--font-mono); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.eyebrow { color: var(--accent); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; margin-bottom: 0.2rem; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.45rem, 3vw, 2.15rem); }
h2 { font-size: 1.22rem; }
h3 { font-size: 1rem; }
.subtle { color: var(--muted); }
.small { font-size: 0.78rem; }
.tiny { font-size: 0.7rem; }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }

.grid { display: grid; gap: 0.8rem; }
.kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi {
  padding: 0.85rem 0.95rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(160deg, color-mix(in srgb, var(--panel) 92%, white 2%), var(--panel));
  min-width: 0;
}
.kpi .value { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 0.1rem; }
.kpi .label { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.kpi .note { color: var(--muted-2); font-size: 0.7rem; margin-top: 0.15rem; }

.panel {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 1rem; min-width: 0;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.7rem; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-head .small { color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 0.8rem; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 0.8rem; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }

/* Findings list on /insights */
.findings { display: grid; gap: 0.5rem; margin: 0.15rem 0 0.05rem; padding-left: 1.25rem; }
.findings li { font-size: 0.84rem; line-height: 1.55; color: var(--muted); }
.findings li::marker { color: var(--accent); font-weight: 700; }
.findings li b { color: var(--text); font-weight: 650; }
.findings .num { color: var(--accent); font-weight: 700; }
.plot-grid { grid-template-columns: 1fr; }
.plot-grid .chart.tall { height: 380px; }
.chart { width: 100%; height: 260px; }
.chart.tall { height: 320px; }
.chart.small { height: 210px; }

.coverage-row { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 0.8rem; align-items: center; font-size: 0.82rem; margin-bottom: 0.6rem; }
.coverage-row:last-child { margin-bottom: 0; }
.coverage-item { margin-bottom: 0.55rem; }
.coverage-item:last-child { margin-bottom: 0; }
.coverage-item .coverage-row { margin-bottom: 0.22rem; }
.coverage-count { color: var(--muted-2); font-size: 0.66rem; line-height: 1.2; margin-top: 0.22rem; font-variant-numeric: tabular-nums; }
.bar { height: 0.42rem; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
table.data th, table.data td { padding: 0.5rem 0.55rem; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:hover td { background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
.empty { color: var(--muted); padding: 1.4rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

.badge {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.12rem 0.45rem;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2);
  color: var(--muted); font-size: 0.68rem; white-space: nowrap;
}
.badge.accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.badge.teal { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line)); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.badge.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.score { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.danger { color: var(--danger); }

/* Browse */
.browse-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1rem; align-items: start; }
.filters {
  position: sticky; top: 5.4rem; max-height: calc(100vh - 6.2rem); overflow: auto;
  padding: 0.9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  scrollbar-gutter: stable;
  scrollbar-color: var(--accent) var(--panel-3);
}
.filters::-webkit-scrollbar-track { background: var(--panel-3); }
.filters::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 70%, var(--panel-3));
  border-color: var(--panel);
}
.filters::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.filters::-webkit-scrollbar-thumb:active { background: var(--accent-2); }
.filters-toggle { display: inline-flex; }
.browse-layout.filters-hidden { grid-template-columns: minmax(0, 1fr); }
.browse-layout.filters-hidden .filters { display: none; }
.filter-group { border-bottom: 1px solid var(--line-soft); padding-bottom: 0.75rem; margin-bottom: 0.75rem; }
.filter-group:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.filter-title { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin-bottom: 0.35rem; }
.filter-option { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; padding: 0.1rem 0; color: var(--text); }
.filter-option input { accent-color: var(--accent); }
.filter-option .count { margin-left: auto; color: var(--muted-2); font-size: 0.7rem; }
.filter-option label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-options-scroll {
  max-height: 13.5rem; overflow: auto; padding-right: 0.15rem;
  scrollbar-gutter: stable;
  scrollbar-color: var(--accent) var(--panel-2);
}
.filter-options-scroll::-webkit-scrollbar-track { background: var(--panel-2); }
.filter-options-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 65%, var(--panel-2));
  border-color: var(--panel);
}
.filter-options-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.filter-options-scroll::-webkit-scrollbar-thumb:active { background: var(--accent-2); }
.range-row { display: flex; align-items: center; gap: 0.3rem; }
.range-row input { width: 100%; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field label { font-size: 0.72rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 0.45rem 0.55rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel-2); color: var(--text); outline: none;
}
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  white-space: nowrap;
  padding: 0.45rem 0.75rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel-2); cursor: pointer; font-size: 0.8rem;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #17110a; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.05); color: #17110a; }
.btn.ghost { background: transparent; }
.btn.small { padding: 0.28rem 0.5rem; font-size: 0.72rem; }

.browse-toolbar {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; margin-bottom: 0.65rem;
}
.browse-toolbar .search { flex: 1 1 260px; min-width: 180px; }
.resultline { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.55rem; color: var(--muted); font-size: 0.8rem; }
.chips { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.12rem 0.45rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2);
  color: var(--muted); font-size: 0.7rem;
}
.chip:hover { color: var(--accent); border-color: var(--accent); }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.view-toggle a { padding: 0.38rem 0.6rem; font-size: 0.75rem; color: var(--muted); background: var(--panel); }
.view-toggle a.active { background: var(--panel-3); color: var(--text); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 0.7rem; }

/* Dashboard poster tiles */
/* Paraphrased MAL text marker */
.rewrite-tag {
  display: inline-block; padding: 0.02rem 0.32rem; border: 1px solid var(--line);
  border-radius: 4px; font-size: 0.62rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted-2); vertical-align: middle;
}
.rewrite-note { margin-top: 0.35rem; }

.poster-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.7rem; }
@media (max-width: 1180px) { .poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.poster {
  display: block; min-width: 0; overflow: hidden; text-decoration: none;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.poster:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow); }
.poster-cover { position: relative; display: block; aspect-ratio: 2 / 3; background: var(--panel-3); }
.poster-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; color: var(--muted); }
.poster-score {
  position: absolute; top: 0.3rem; right: 0.3rem; padding: 0.1rem 0.32rem; border-radius: 5px;
  background: rgba(8, 5, 20, 0.82); color: #ffffff; font-size: 0.66rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.poster-delta {
  position: absolute; left: 0.3rem; bottom: 0.3rem; padding: 0.1rem 0.32rem; border-radius: 5px;
  background: rgba(101, 208, 194, 0.94); color: #08201c; font-size: 0.64rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.poster-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  padding: 0.45rem 0.5rem 0.1rem; font-size: 0.76rem; font-weight: 650; line-height: 1.25;
  min-height: 2.4em; color: var(--text);
}
.poster-meta {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  padding: 0 0.5rem 0.5rem; color: var(--muted); font-size: 0.66rem; line-height: 1.3;
}
.card {
  border: 1px solid var(--line); border-radius: 11px; overflow: hidden;
  background: var(--panel); transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  min-width: 0;
}
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow); }
.cover { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--panel-3); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; font-size: 1.55rem; font-weight: 800;
  color: rgba(255,255,255,0.82); background: linear-gradient(145deg, #263a52, #4c6278);
}
.cover .score-pill { position: absolute; left: 0.4rem; bottom: 0.4rem; padding: 0.16rem 0.42rem; border-radius: 6px; background: rgba(8, 12, 18, 0.78); color: var(--accent); font-size: 0.72rem; font-weight: 700; backdrop-filter: blur(8px); }
.cover .gem-pill { position: absolute; left: 0.4rem; top: 0.4rem; padding: 0.14rem 0.4rem; border-radius: 5px; background: rgba(8, 12, 18, 0.82); border: 1px solid rgba(101, 208, 194, 0.45); color: #8ce4d8; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.02em; backdrop-filter: blur(8px); }
.cover .nsfw-pill { position: absolute; right: 0.35rem; top: 0.35rem; padding: 0.12rem 0.35rem; border-radius: 5px; background: rgba(110, 25, 35, 0.85); color: #ffd9dd; font-size: 0.6rem; letter-spacing: 0.05em; }
.cover.is-nsfw img { filter: blur(14px); transform: scale(1.06); }
.card.revealed .cover.is-nsfw img { filter: none; transform: none; }
.card-body { padding: 0.5rem 0.55rem 0.6rem; }
.card-title { font-size: 0.8rem; font-weight: 650; line-height: 1.22; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.card-meta { display: flex; justify-content: space-between; gap: 0.35rem; color: var(--muted); font-size: 0.68rem; margin-top: 0.18rem; }
.card-genres { color: var(--muted-2); font-size: 0.66rem; margin-top: 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-flags { display: flex; gap: 0.2rem; flex-wrap: wrap; margin-top: 0.35rem; }
.flag { width: 0.38rem; height: 0.38rem; border-radius: 999px; background: var(--line); }
.flag.on { background: var(--accent-2); }
.flag.cast { background: var(--accent); }
.flag.stats { background: #8ea6ff; }

.tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.7rem; }
.tag-card a { display: block; height: 100%; }
.tag-card-body { padding: 0.7rem 0.75rem 0.75rem; }
.tag-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.4rem; }
.tag-card-name { font-size: 0.86rem; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.tag-card .badge { flex: none; }
.tag-card-root { color: var(--muted-2); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.07em; margin-top: 0.22rem; }
.tag-card-metrics { display: flex; gap: 0.75rem; margin-top: 0.55rem; color: var(--muted); font-size: 0.7rem; }
.tag-card-metrics strong { color: var(--text); font-variant-numeric: tabular-nums; }
.tag-meter { height: 0.3rem; border-radius: 999px; background: var(--panel-3); overflow: hidden; margin-top: 0.45rem; }
.tag-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.tag-card-foot { display: flex; justify-content: space-between; gap: 0.4rem; color: var(--muted); font-size: 0.66rem; margin-top: 0.4rem; }
.tag-avatar {
  width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(145deg, #263a52, #4c6278);
  color: rgba(255, 255, 255, 0.88); font-weight: 800; font-size: 0.78rem;
}
.delta-up { color: var(--accent-2); }
.delta-down { color: var(--danger); }

.list { display: flex; flex-direction: column; gap: 0.35rem; }
.list-row {
  display: grid; grid-template-columns: 42px minmax(0, 1.4fr) 0.8fr 0.7fr 0.7fr 0.8fr;
  gap: 0.6rem; align-items: center; padding: 0.42rem 0.5rem; border: 1px solid var(--line-soft);
  border-radius: 8px; background: var(--panel);
}
.list-row:hover { border-color: var(--accent); }
.list-thumb { width: 42px; height: 58px; border-radius: 5px; overflow: hidden; background: var(--panel-3); }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-title { font-size: 0.82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-sub { color: var(--muted); font-size: 0.68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-cell { color: var(--muted); font-size: 0.75rem; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.35rem; margin-top: 1rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 2rem; padding: 0.3rem 0.5rem; text-align: center; border: 1px solid var(--line); border-radius: 7px; font-size: 0.75rem; color: var(--muted); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--panel-3); color: var(--text); }
.pagination .disabled { opacity: 0.4; }

/* Hidden gems */
.preset-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .8rem; }
.preset-tabs a { padding: .42rem .7rem; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: .78rem; background: var(--panel); position: relative; }
.preset-tabs a:hover { border-color: var(--accent); color: var(--accent); }
.preset-tabs a.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.preset-tabs a[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; top: calc(100% + .45rem); left: 50%; transform: translateX(-50%);
  z-index: 30; width: max-content; max-width: min(320px, 78vw);
  padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 7px;
  background: var(--panel-3); color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.28);
  font-size: .72rem; line-height: 1.4; text-align: left; white-space: normal;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s ease;
}
.preset-tabs a[data-tooltip]:hover::after,
.preset-tabs a[data-tooltip]:focus-visible::after { opacity: 1; visibility: visible; }
.preset-tabs a[data-tooltip]:first-child::after { left: 0; transform: none; }
.preset-tabs a[data-tooltip]:last-child::after { left: auto; right: 0; transform: none; }
.gem-filters { margin-bottom: .8rem; padding: .8rem .9rem; }
.gem-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .7rem; align-items: start; }
@media (min-width: 1200px) {
  .gem-filter-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
.gem-filter-grid > .field:last-child { align-self: stretch; }
.split.gem-hero-split { align-items: stretch; }
.gem-hero-split > .panel { display: flex; flex-direction: column; }
.gem-hero-split .chart { flex: 1 1 auto; height: auto; min-height: 320px; }
.gem-extra-options { display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: center; margin-top: .7rem; }
.gem-extra-options .filter-option { margin: 0; }
.gem-types { display: flex; flex-wrap: wrap; gap: .3rem .6rem; }
.gem-title { display: flex; align-items: center; gap: .45rem; min-width: 220px; }
.gem-title img { width: 30px; height: 42px; object-fit: cover; border-radius: 4px; }
.gem-score { display: inline-block; padding: .1rem .38rem; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.breakout-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: .5rem; }
.breakout-card { padding: .5rem .55rem; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel); font-size: .78rem; }
.breakout-card strong { font-size: .8rem; }
.gem-components { display: flex; gap: 2px; width: 105px; }
.comp { flex: 1; height: 22px; border-radius: 3px; background: var(--panel-3); display: flex; align-items: flex-end; overflow: hidden; }
.comp i { display: block; height: 100%; width: 50%; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.comp-quality i { background: #f0a35e; }
.comp-reach i { background: #65d0c2; }
.comp-passion i { background: #e4717f; }
.comp-completion i { background: #8ea6ff; }
.comp-stability i { background: #e4c56f; }
.comp-character i { background: #b18cff; }
.comp-ensemble i { background: #5fb3a1; }
.comp-iconic i { background: #d9a441; }
.comp-consensus i { background: #7ec8e3; }
.comp-controversy i { background: #ff9f6e; }
.gem-legend { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .55rem; color: var(--muted); font-size: .68rem; }
.gem-legend span { display: inline-flex; align-items: center; gap: .25rem; }
.gem-legend i { width: .5rem; height: .5rem; border-radius: 2px; display: inline-block; }
.legend-quality { background: #f0a35e; }
.legend-reach { background: #65d0c2; }
.legend-passion { background: #e4717f; }
.legend-completion { background: #8ea6ff; }
.legend-character { background: #b18cff; }
.legend-ensemble { background: #5fb3a1; }
.legend-iconic { background: #d9a441; }
.legend-controversy { background: #ff9f6e; }
abbr[title] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.chart-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 0.95rem; height: 0.95rem; margin-left: 0.3rem;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 0.6rem; font-weight: 700; line-height: 1;
  text-decoration: none; cursor: help; vertical-align: middle;
}
.chart-help:hover { color: var(--accent); border-color: var(--accent); }
.chart-help[title] { text-decoration: none; }
.column-guide { margin-top: .75rem; border-top: 1px solid var(--line-soft); padding-top: .55rem; font-size: .76rem; }
.column-guide summary { cursor: pointer; color: var(--accent); }
.column-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .45rem .8rem; margin-top: .55rem; }
.column-guide-grid div { display: flex; flex-direction: column; gap: .12rem; }
.column-guide-grid strong { font-size: .74rem; }
.column-guide-grid span { color: var(--muted); line-height: 1.4; }
.weight-list .stat-line span:last-child { color: var(--accent); }
.notice { padding: .45rem .55rem; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-size: .74rem; line-height: 1.35; }
.teal { color: var(--accent-2); }
@media (max-width: 680px) {
  .gem-filter-grid { grid-template-columns: 1fr 1fr; }
  .gem-title { min-width: 160px; }
  .gem-components { width: 75px; }
}

/* Seasonal */
.season-controls { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.season-nav { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.season-arrows { display: flex; gap: .35rem; flex-wrap: wrap; }
.season-years { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.season-years form { display: flex; gap: .35rem; align-items: center; }
.season-tabs { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.season-tabs a { padding: .38rem .62rem; font-size: .76rem; color: var(--muted); background: var(--panel); }
.season-tabs a:hover { color: var(--accent); }
.season-tabs a.active { background: var(--panel-3); color: var(--text); }
.season-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.season-section { margin-top: 1.25rem; }
.season-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .7rem; margin-bottom: .55rem; border-bottom: 1px solid var(--line-soft); padding-bottom: .35rem; }
.season-section-head h2 { font-size: 1.05rem; }
.season-section .cards { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }

/* Detail */
.detail-hero { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.2rem; align-items: start; margin-bottom: 1rem; }
.detail-cover { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-3); aspect-ratio: 2 / 3; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover.is-nsfw img { filter: blur(16px); transform: scale(1.05); }
.detail-cover.revealed img { filter: none; transform: none; }
.list-thumb.is-nsfw img { filter: blur(8px); }
.detail-title { font-size: clamp(1.5rem, 3.4vw, 2.35rem); margin-bottom: 0.2rem; }
.detail-alt { color: var(--muted); font-size: 0.82rem; margin-bottom: 0.55rem; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.7rem; }
.detail-synopsis { color: color-mix(in srgb, var(--text) 84%, var(--muted)); max-width: 82ch; font-size: 0.9rem; }
.detail-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.9rem; }
.metric { padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.metric .label { color: var(--muted); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.07em; }
.metric .value { font-size: 1rem; font-weight: 700; margin-top: 0.08rem; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 0.9rem; align-items: start; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem 1.2rem; font-size: 0.82rem; }
.info-row { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 0.5rem; padding: 0.25rem 0; border-bottom: 1px solid var(--line-soft); }
.info-row .key { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.info-row .val { min-width: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.rec-group { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0.6rem; border-top: 1px solid var(--line-soft); padding: 0.55rem 0; }
.rec-group:first-child { border-top: 0; padding-top: 0; }
.rec-list { max-height: 420px; overflow: auto; }
.rec-list.tall { max-height: 520px; }
.recs-note { margin-top: 0.45rem; }
.recs-pager { margin-top: 0.55rem; }
.recs-pager:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.recs-body.is-loading { opacity: 0.55; pointer-events: none; transition: opacity 0.12s ease; }
.rec-thumb { width: 44px; height: 62px; border-radius: 5px; overflow: hidden; background: var(--panel-3); align-self: start; }
.rec-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rec-thumb-empty { display: grid; place-items: center; width: 100%; height: 100%; font-size: 0.7rem; color: var(--muted); }
.rec-body { min-width: 0; }
.rec-target { display: flex; align-items: center; gap: 0.45rem; font-weight: 650; margin-bottom: 0.35rem; }
.rec { border-left: 2px solid var(--line); padding: 0.35rem 0 0.35rem 0.55rem; margin-top: 0.35rem; }
.rec-text { white-space: pre-line; color: color-mix(in srgb, var(--text) 84%, var(--muted)); font-size: 0.8rem; line-height: 1.45; }.tag { padding: 0.14rem 0.42rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--muted); font-size: 0.7rem; }
.tag:hover { color: var(--accent); border-color: var(--accent); }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; }
.char-card { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0.5rem; padding: 0.45rem; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel); }
.char-card:hover { border-color: var(--accent); }
.char-thumb { width: 46px; height: 64px; border-radius: 5px; overflow: hidden; background: var(--panel-3); }
.char-thumb img { width: 100%; height: 100%; object-fit: cover; }
.char-name { font-size: 0.78rem; font-weight: 600; line-height: 1.2; }
.char-role { color: var(--muted); font-size: 0.66rem; margin-top: 0.1rem; }
.char-vas { color: var(--muted-2); font-size: 0.64rem; margin-top: 0.15rem; line-height: 1.25; }
.staff-list { display: flex; flex-direction: column; gap: 0.25rem; }
.staff-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0.5rem; align-items: center; padding: 0.3rem 0; border-bottom: 1px solid var(--line-soft); }
.staff-row:last-child { border-bottom: 0; }
.staff-thumb { width: 34px; height: 48px; border-radius: 4px; overflow: hidden; background: var(--panel-3); }
.staff-thumb img { width: 100%; height: 100%; object-fit: cover; }
.staff-name { font-size: 0.78rem; font-weight: 600; }
.staff-role { color: var(--muted); font-size: 0.68rem; }
.completeness { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.78rem; }
.completeness .row { display: flex; justify-content: space-between; gap: 0.5rem; }
.dot { width: 0.45rem; height: 0.45rem; border-radius: 999px; display: inline-block; background: var(--muted-2); }
.dot.ok { background: var(--accent-2); }
.dot.partial { background: var(--warn); }
.dot.missing { background: var(--danger); }

.character-hero { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 1.1rem; margin-bottom: 1rem; }
.character-image { aspect-ratio: 2 / 3; border-radius: 11px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-3); }
.character-image img { width: 100%; height: 100%; object-fit: cover; }
.bio { white-space: pre-line; color: color-mix(in srgb, var(--text) 82%, var(--muted)); font-size: 0.86rem; line-height: 1.65; }
.section { margin-top: 1rem; }
.section:first-child { margin-top: 0; }

.health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
@media (min-width: 1200px) {
  .health-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.stat-line { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.32rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.8rem; }
.stat-line:last-child { border-bottom: 0; }
.stat-line span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split, .detail-layout { grid-template-columns: 1fr; }
  .detail-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .browse-layout { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; }
  .chart-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .detail-hero { grid-template-columns: 160px minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .filters { display: none; max-height: none; }
  .filters.open { display: block; }
  .filters-toggle { display: inline-flex; }
  .filter-options-scroll { max-height: none; overflow: visible; }
  .site-header { gap: 0.7rem; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .header-actions { margin-left: auto; }
  .quick-search input { width: 150px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-hero { grid-template-columns: 120px minmax(0, 1fr); gap: 0.8rem; }
  .detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .character-hero { grid-template-columns: 120px minmax(0, 1fr); }
  .list-row { grid-template-columns: 38px minmax(0, 1fr) 0.7fr; }
  .list-row .hide-mobile { display: none; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .season-summary { grid-template-columns: 1fr; }
  .season-nav { align-items: flex-start; flex-direction: column; }
  .site-footer { flex-direction: column; }
  .footer-path { max-width: 100%; }
}

/* Archive search autocomplete */
.ac-wrap { position: relative; }
.ac-menu {
  position: fixed; top: 0; left: 0;
  width: min(460px, calc(100vw - 1rem)); max-height: min(70vh, 540px);
  overflow-y: auto; padding: 0.35rem; z-index: 120;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 11px; box-shadow: var(--shadow);
}
.ac-group + .ac-group {
  margin-top: 0.25rem; padding-top: 0.25rem; border-top: 1px solid var(--line-soft);
}
.ac-group-title {
  padding: 0.3rem 0.45rem 0.2rem; color: var(--muted);
  font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.ac-item {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.35rem 0.45rem; border-radius: 8px; color: var(--text);
}
.ac-item:hover, .ac-item.is-active { background: var(--panel-2); color: var(--text); }
.ac-thumb {
  display: grid; place-items: center; flex: 0 0 34px;
  width: 34px; height: 46px; overflow: hidden; border-radius: 5px;
  background: var(--panel-3); color: var(--muted); font-size: 0.68rem;
}
.ac-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ac-main { flex: 1; min-width: 0; }
.ac-title {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 0.82rem; font-weight: 600;
}
.ac-title mark { background: transparent; color: var(--accent); font-weight: 800; }
.ac-meta {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: var(--muted); font-size: 0.68rem;
}
.ac-score { flex: 0 0 auto; color: var(--accent-2); font-size: 0.76rem; font-weight: 700; }
.ac-empty { padding: 1rem 0.75rem; color: var(--muted); font-size: 0.8rem; text-align: center; }
.ac-all {
  display: block; margin-top: 0.3rem; padding: 0.48rem;
  border-top: 1px solid var(--line-soft); color: var(--accent);
  font-size: 0.76rem; text-align: center;
}
.ac-all:hover { background: var(--panel-2); border-radius: 7px; }

@media (max-width: 720px) {
  .ac-menu { max-height: 62vh; }
}

/* AniDB weighted tags */
.anidb-tag { border-color: var(--line); }
.anidb-tag .muted { margin-left: .2rem; font-size: .66rem; }
.anidb-tag.weight-minor { opacity: .62; }
.anidb-tag.weight-low { color: var(--text); }
.anidb-tag.weight-mid { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line)); }
.anidb-tag.weight-high { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--accent-soft); }
.anidb-tag.spoiler { opacity: .5; }
.anidb-tag.spoiler::after { content: " spoiler"; font-size: .6rem; color: var(--muted); }

/* Theme picker */
.theme-picker { position: relative; }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 130;
  min-width: 172px; padding: 0.35rem;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); box-shadow: var(--shadow);
}
.theme-menu[hidden] { display: none; }
.theme-menu-title {
  padding: 0.25rem 0.45rem 0.3rem; color: var(--muted);
  font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.theme-option {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  padding: 0.38rem 0.45rem; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--text); font-size: 0.8rem;
  text-align: left; cursor: pointer;
}
.theme-option:hover { background: var(--panel-2); border-color: var(--line); }
.theme-option[aria-checked="true"] {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
}
.theme-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.theme-swatch {
  width: 1.05rem; height: 1.05rem; flex: none; border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.35);
}
.sw-slate { background: linear-gradient(135deg, #121923 0 50%, #f0a35e 50%); }
.sw-paper { background: linear-gradient(135deg, #fffdf8 0 50%, #b65f21 50%); }
.sw-geocities { background: linear-gradient(135deg, #120b2e 0 40%, #ff5fb0 40% 65%, #ffd23c 65%); }
.sw-sakura { background: linear-gradient(135deg, #1c0f18 0 40%, #ff9dc4 40% 65%, #d95c8a 65%); }

/* ---------- Theme: Geocities (00s maximalist) ---------- */
[data-theme="geocities"] {
  --bg: #120b2e;
  --bg-soft: #1a1040;
  --panel: #1b1140;
  --panel-2: #241552;
  --panel-3: #2f1c66;
  --line: #6f5bb0;
  --line-soft: #4a3a86;
  --text: #f4efff;
  --muted: #c9bcf0;
  --muted-2: #a99ad6;
  --accent: #ff9dc4;
  --accent-soft: rgba(255, 95, 176, 0.18);
  --accent-2: #8ef0ff;
  --danger: #ff8fa0;
  --warn: #ffe98a;
  --radius: 2px;
  --shadow: 3px 3px 0 #3b2a6e;
  --font-sans: Verdana, Tahoma, Geneva, sans-serif;
  --chart-text: #241a3d;
  --chart-muted: #5c4a86;
  --chart-line: #b5a7e0;
  --chart-bg: #fffdf0;
  --chart-1: #a8186a;
  --chart-2: #0a6f8f;
  --chart-3: #8a5a00;
  --chart-4: #3b2a6e;
  --chart-5: #b3122f;
  --chart-6: #0a8f5a;
}
[data-theme="geocities"] body {
  background-color: #120b2e;
  background-image:
    radial-gradient(circle at 12px 18px, #ffffff 1px, transparent 1.6px),
    radial-gradient(circle at 46px 52px, #ffd6f2 1px, transparent 1.6px),
    radial-gradient(circle at 74px 16px, #9fe8ff 1px, transparent 1.6px),
    radial-gradient(circle at 28px 72px, #fff6a8 1px, transparent 1.6px);
  background-size: 96px 84px;
}
[data-theme="geocities"] .site-header {
  background: linear-gradient(#2b1d5e, #150d3a);
  border-bottom: 3px double #ff7ac8;
  backdrop-filter: none;
}
[data-theme="geocities"] .brand {
  color: #ffe9a8;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  letter-spacing: 0;
  text-shadow: 1px 1px 0 #7a1d5e, 2px 2px 0 #000;
}
[data-theme="geocities"] .brand-mark {
  border-radius: 0;
  border: 2px solid #ffd0e8;
  background: linear-gradient(#ff5fb0, #ff9a3c);
  color: #2a0d2a;
  text-shadow: 1px 1px 0 #fff;
  box-shadow: 2px 2px 0 #000;
}
[data-theme="geocities"] .nav a {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffe98a, #ffb13c);
  color: #3a1a00;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.28rem 0.6rem;
  box-shadow: inset 0 1px 0 #fff3c4, 1px 1px 0 #000;
}
[data-theme="geocities"] .nav a:hover {
  background: linear-gradient(#fff6a8, #ffd23c);
  color: #6a2a00;
}
[data-theme="geocities"] .nav a.active {
  background: linear-gradient(#8ef0ff, #3bb7e8);
  border-color: #d8fbff;
  color: #002233;
  box-shadow: inset 0 1px 0 #e6fdff, 1px 1px 0 #000;
}
[data-theme="geocities"] .quick-search input {
  background: #fffdf0;
  border: 2px solid #8f7bd6;
  border-radius: 0;
  color: #241a3d;
  box-shadow: inset 1px 1px 0 #c9bcf0;
}
[data-theme="geocities"] .quick-search input::placeholder { color: #7a68a8; }
[data-theme="geocities"] .icon-btn {
  background: linear-gradient(#fff6a8, #ffd23c);
  border: 2px solid #8f7bd6;
  border-radius: 0;
  color: #3a2500;
  box-shadow: inset 0 1px 0 #fffbe0, 1px 1px 0 #000;
}
[data-theme="geocities"] :is(
  .panel, .card, .kpi, .metric, .filters, .list-row, .char-card,
  .ac-menu, .season-tabs, .view-toggle, .preset-tabs a,
  .pagination a, .pagination span, .badge, .chip, .tag, .btn,
  .input, .select, .textarea, .breakout-card
) {
  --text: #241a3d;
  --muted: #5c4a86;
  --muted-2: #7a68a8;
  --line: #8f7bd6;
  --line-soft: #c9bcf0;
  --panel: #fffdf0;
  --panel-2: #f3ecff;
  --panel-3: #e6dcff;
  --accent: #a8186a;
  --accent-soft: rgba(255, 95, 176, 0.16);
  --accent-2: #0a6f8f;
  --danger: #b3122f;
  --warn: #8a5a00;
  --shadow: 3px 3px 0 #3b2a6e;
  color: var(--text);
}
[data-theme="geocities"] .panel,
[data-theme="geocities"] .kpi,
[data-theme="geocities"] .metric,
[data-theme="geocities"] .filters,
[data-theme="geocities"] .breakout-card {
  background: #fffdf0;
  border: 3px double #8f7bd6;
  border-radius: 0;
  box-shadow: 3px 3px 0 #3b2a6e;
}
[data-theme="geocities"] .panel > .panel-head {
  margin: -1rem -1rem 0.7rem;
  padding: 0.4rem 0.75rem;
  background: linear-gradient(#ff5fb0, #ff9a3c);
  border-bottom: 2px solid #8f7bd6;
  border-radius: 0;
  color: #ffffff;
  text-shadow: 1px 1px 0 #8a1d55;
}
[data-theme="geocities"] .panel > .panel-head .small { color: #fff6d6; }
[data-theme="geocities"] .gem-filters > .panel-head { margin: -0.8rem -0.9rem 0.7rem; }
[data-theme="geocities"] h1,
[data-theme="geocities"] h2,
[data-theme="geocities"] h3 {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  letter-spacing: 0;
}
[data-theme="geocities"] .page-head h1 { text-shadow: 2px 2px 0 #3b2a6e; }
[data-theme="geocities"] .eyebrow { color: #ffe98a; }
[data-theme="geocities"] .card {
  background: #fffdf0;
  border: 2px solid #3b2a6e;
  border-radius: 0;
  box-shadow: 2px 2px 0 #ff7ac8;
}
[data-theme="geocities"] .card:hover {
  transform: none;
  border-color: #0a6f8f;
  box-shadow: 3px 3px 0 #8ef0ff;
}
[data-theme="geocities"] .card-title { color: #0a3ea8; text-decoration: underline; }
[data-theme="geocities"] .list-row {
  background: #fffdf0;
  border: 2px solid #8f7bd6;
  border-radius: 0;
  box-shadow: 2px 2px 0 #b9a9ff;
}
[data-theme="geocities"] .list-row:hover { border-color: #a8186a; }
[data-theme="geocities"] .btn {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffffff, #e6dcff);
  color: #3a2a6a;
  font-weight: 700;
  box-shadow: inset 0 1px 0 #ffffff, 1px 1px 0 #b9a9ff;
}
[data-theme="geocities"] .btn:hover { color: #a8186a; border-color: #a8186a; }
[data-theme="geocities"] .btn.primary {
  background: linear-gradient(#fff6a8, #ffd23c);
  border-color: #a06b00;
  color: #3a2500;
}
[data-theme="geocities"] .btn.ghost { background: transparent; }
[data-theme="geocities"] .badge,
[data-theme="geocities"] .chip,
[data-theme="geocities"] .tag {
  border: 1px solid #8f7bd6;
  border-radius: 0;
  background: #f3ecff;
  color: #4a3a7a;
}
[data-theme="geocities"] .badge.accent {
  background: #fff6a8;
  border-color: #a06b00;
  color: #6a4500;
}
[data-theme="geocities"] .chip:hover { color: #a8186a; border-color: #a8186a; }
[data-theme="geocities"] .pagination a,
[data-theme="geocities"] .pagination span {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffffff, #e6dcff);
  color: #3a2a6a;
  font-weight: 700;
}
[data-theme="geocities"] .pagination a:hover { border-color: #a8186a; color: #a8186a; }
[data-theme="geocities"] .pagination .current {
  background: linear-gradient(#8ef0ff, #3bb7e8);
  border-color: #0a6f8f;
  color: #002233;
}
[data-theme="geocities"] .input,
[data-theme="geocities"] .select,
[data-theme="geocities"] .textarea {
  background: #fffdf0;
  border: 2px solid #8f7bd6;
  border-radius: 0;
  color: #241a3d;
}
[data-theme="geocities"] table.data th {
  background: #efe8ff;
  color: #4a3a7a;
  border-bottom: 1px solid #8f7bd6;
}
[data-theme="geocities"] table.data td { border-bottom: 1px solid #c9bcf0; }
[data-theme="geocities"] table.data tr:hover td { background: #f6f0ff; }
[data-theme="geocities"] .preset-tabs a,
[data-theme="geocities"] .season-tabs a,
[data-theme="geocities"] .view-toggle a {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffffff, #e6dcff);
  color: #3a2a6a;
  font-weight: 700;
}
[data-theme="geocities"] .preset-tabs a.active,
[data-theme="geocities"] .season-tabs a.active,
[data-theme="geocities"] .view-toggle a.active {
  background: linear-gradient(#fff6a8, #ffd23c);
  border-color: #a06b00;
  color: #3a2500;
}
[data-theme="geocities"] .cover .placeholder,
[data-theme="geocities"] .tag-avatar {
  background: linear-gradient(145deg, #ff5fb0, #ff9a3c);
  color: #ffffff;
}
[data-theme="geocities"] .ac-menu {
  background: #fffdf0;
  border: 3px double #8f7bd6;
  border-radius: 0;
  box-shadow: 4px 4px 0 #3b2a6e;
}

/* ---------- Theme: Sakura (00s fansite glam) ---------- */
[data-theme="sakura"] {
  --bg: #1c0f18;
  --bg-soft: #241019;
  --panel: #2e1724;
  --panel-2: #35182a;
  --panel-3: #3f2030;
  --line: #6e3a52;
  --line-soft: #4a2434;
  --text: #f4dbe5;
  --muted: #c69aab;
  --muted-2: #a97e90;
  --accent: #ff9dc4;
  --accent-soft: rgba(255, 157, 196, 0.16);
  --accent-2: #9fe8d8;
  --danger: #ff8fa0;
  --warn: #ffd28a;
  --radius: 10px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  --font-sans: Verdana, Tahoma, Geneva, sans-serif;
  --chart-text: #f4dbe5;
  --chart-muted: #c69aab;
  --chart-line: #4a2434;
  --chart-bg: #2e1724;
  --chart-1: #ff9dc4;
  --chart-2: #9fe8d8;
  --chart-3: #ffd28a;
  --chart-4: #b18cff;
  --chart-5: #ff8fa0;
  --chart-6: #7ec8e3;
}
[data-theme="sakura"] body {
  background-color: #1c0f18;
  background-image:
    radial-gradient(760px 420px at 12% 0%, rgba(255, 140, 190, 0.16), transparent 62%),
    radial-gradient(620px 360px at 92% 6%, rgba(255, 210, 170, 0.1), transparent 58%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 7px);
}
[data-theme="sakura"] .site-header {
  background: linear-gradient(#4a1f33, #2a1120);
  border-bottom: 1px solid #7a3a52;
  backdrop-filter: none;
  box-shadow: inset 0 1px 0 rgba(255, 180, 210, 0.18);
}
[data-theme="sakura"] .brand { letter-spacing: 0; }
[data-theme="sakura"] .brand-mark {
  border-radius: 999px;
  background: linear-gradient(#ffb3d0, #d95c8a);
  color: #3a0d1f;
  box-shadow: 0 0 10px rgba(255, 140, 190, 0.55);
}
[data-theme="sakura"] .nav a {
  border: 1px solid #6e3a52;
  border-radius: 999px;
  background: linear-gradient(#5a2740, #3a1828);
  color: #e6b9ca;
  padding: 0.3rem 0.7rem;
  box-shadow: inset 0 1px 0 rgba(255, 200, 220, 0.22);
}
[data-theme="sakura"] .nav a:hover {
  background: linear-gradient(#6b2e4a, #451d31);
  color: #ffd0e0;
}
[data-theme="sakura"] .nav a.active {
  background: linear-gradient(#ff9dc4, #c94f7f);
  border-color: #ffc9dd;
  color: #2a0a18;
  box-shadow: 0 0 12px rgba(255, 140, 190, 0.45);
}
[data-theme="sakura"] .quick-search input {
  background: #2a1220;
  border: 1px solid #6e3a52;
  border-radius: 999px;
  color: #f4dbe5;
}
[data-theme="sakura"] .quick-search input::placeholder { color: #a97e90; }
[data-theme="sakura"] .icon-btn {
  background: linear-gradient(#5a2740, #3a1828);
  border: 1px solid #6e3a52;
  border-radius: 999px;
  color: #ffd0e0;
}
[data-theme="sakura"] .panel,
[data-theme="sakura"] .kpi,
[data-theme="sakura"] .metric,
[data-theme="sakura"] .filters,
[data-theme="sakura"] .breakout-card {
  background: linear-gradient(#2e1724, #241019);
  border: 1px solid #6e3a52;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 190, 215, 0.1);
}
[data-theme="sakura"] .panel > .panel-head {
  margin: -1rem -1rem 0.7rem;
  padding: 0.45rem 0.8rem;
  background: linear-gradient(#d95c8a, #8a2f52);
  border-bottom: 1px solid #5e243c;
  border-radius: 9px 9px 0 0;
  color: #fff0f6;
  text-shadow: 0 0 6px rgba(255, 180, 210, 0.7);
}
[data-theme="sakura"] .panel > .panel-head .small { color: #ffd7e6; }
[data-theme="sakura"] .gem-filters > .panel-head { margin: -0.8rem -0.9rem 0.7rem; }
[data-theme="sakura"] h1,
[data-theme="sakura"] h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}
[data-theme="sakura"] .page-head h1 { text-shadow: 0 0 18px rgba(255, 140, 190, 0.35); }
[data-theme="sakura"] .eyebrow { color: #ffb3d0; }
[data-theme="sakura"] .card {
  background: linear-gradient(#2e1724, #241019);
  border-color: #6e3a52;
  border-radius: 10px;
}
[data-theme="sakura"] .card:hover {
  border-color: #ff9dc4;
  box-shadow: 0 0 0 1px rgba(255, 157, 196, 0.35), 0 8px 24px rgba(0, 0, 0, 0.45);
}
[data-theme="sakura"] .card-title { color: #ffd0e0; }
[data-theme="sakura"] .card:hover .card-title { color: #ff9dc4; }
[data-theme="sakura"] .list-row {
  background: linear-gradient(#2e1724, #241019);
  border-color: #4a2434;
}
[data-theme="sakura"] .list-row:hover { border-color: #ff9dc4; }
[data-theme="sakura"] .btn {
  border-radius: 999px;
  border-color: #6e3a52;
  background: linear-gradient(#5a2740, #3a1828);
  color: #f4dbe5;
  box-shadow: inset 0 1px 0 rgba(255, 200, 220, 0.2);
}
[data-theme="sakura"] .btn:hover { border-color: #ff9dc4; color: #ffd0e0; }
[data-theme="sakura"] .btn.primary {
  background: linear-gradient(#ff9dc4, #c94f7f);
  border-color: #ffc9dd;
  color: #2a0a18;
}
[data-theme="sakura"] .btn.ghost { background: transparent; }
[data-theme="sakura"] .badge,
[data-theme="sakura"] .chip,
[data-theme="sakura"] .tag {
  border-color: #6e3a52;
  background: #35182a;
  color: #e6b9ca;
}
[data-theme="sakura"] .badge.accent {
  background: rgba(255, 157, 196, 0.16);
  border-color: #ff9dc4;
  color: #ffd0e0;
}
[data-theme="sakura"] .pagination a,
[data-theme="sakura"] .pagination span {
  border-radius: 999px;
  border-color: #6e3a52;
  background: #35182a;
  color: #e6b9ca;
}
[data-theme="sakura"] .pagination a:hover { border-color: #ff9dc4; color: #ffd0e0; }
[data-theme="sakura"] .pagination .current {
  background: linear-gradient(#ff9dc4, #c94f7f);
  border-color: #ffc9dd;
  color: #2a0a18;
}
[data-theme="sakura"] .input,
[data-theme="sakura"] .select,
[data-theme="sakura"] .textarea {
  background: #2a1220;
  border-color: #6e3a52;
  border-radius: 8px;
  color: #f4dbe5;
}
[data-theme="sakura"] .input:focus,
[data-theme="sakura"] .select:focus {
  border-color: #ff9dc4;
  box-shadow: 0 0 0 3px rgba(255, 157, 196, 0.18);
}
[data-theme="sakura"] table.data th { color: #ffb3d0; border-bottom-color: #4a2434; }
[data-theme="sakura"] table.data td { border-bottom-color: #3f2030; }
[data-theme="sakura"] table.data tr:hover td { background: rgba(255, 157, 196, 0.06); }
[data-theme="sakura"] .preset-tabs a,
[data-theme="sakura"] .season-tabs a,
[data-theme="sakura"] .view-toggle a {
  border-radius: 999px;
  border-color: #6e3a52;
  background: #35182a;
  color: #e6b9ca;
}
[data-theme="sakura"] .preset-tabs a.active,
[data-theme="sakura"] .season-tabs a.active,
[data-theme="sakura"] .view-toggle a.active {
  background: linear-gradient(#ff9dc4, #c94f7f);
  border-color: #ffc9dd;
  color: #2a0a18;
}
[data-theme="sakura"] .cover .placeholder,
[data-theme="sakura"] .tag-avatar {
  background: linear-gradient(145deg, #6e2f4a, #d95c8a);
  color: #fff0f6;
}
[data-theme="sakura"] .ac-menu {
  background: #2e1724;
  border-color: #6e3a52;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="geocities"] .cover .score-pill {
  background: rgba(20, 8, 40, 0.84);
  color: #ffd6f2;
}
[data-theme="geocities"] .card:hover .card-title { color: #a8186a; }
[data-theme="geocities"] .input::placeholder,
[data-theme="geocities"] .textarea::placeholder { color: #7a68a8; }
[data-theme="geocities"] .season-tabs,
[data-theme="geocities"] .view-toggle {
  border: 0;
  border-radius: 0;
  gap: 0.3rem;
  overflow: visible;
}
[data-theme="sakura"] .season-tabs,
[data-theme="sakura"] .view-toggle {
  border: 0;
  border-radius: 0;
  gap: 0.3rem;
  overflow: visible;
}
[data-theme="sakura"] .metric { border-radius: 10px; }
[data-theme="sakura"] .cover .score-pill { color: #ffd6f2; }

/* Theme menu grows with the theme list */
.theme-menu { max-height: min(70vh, 360px); overflow-y: auto; }
.sw-webring { background: linear-gradient(135deg, #1b0640 0 40%, #ff5fb0 40% 62%, #ffe98a 62%); }
.sw-vaporwave { background: linear-gradient(135deg, #1a0033 0 38%, #ff4fa3 38% 62%, #8ef0ff 62%); }

/* ---------- Theme: Webring 1998 ---------- */
[data-theme="webring"] {
  --bg: #1b0640;
  --bg-soft: #22084f;
  --panel: #241552;
  --panel-2: #2c1a63;
  --panel-3: #362078;
  --line: #7a63c0;
  --line-soft: #4a3a86;
  --text: #f6efff;
  --muted: #d3c6f5;
  --muted-2: #b3a2e0;
  --accent: #ff9dc4;
  --accent-soft: rgba(255, 95, 176, 0.18);
  --accent-2: #8ef0ff;
  --danger: #ff8fa0;
  --warn: #ffe98a;
  --radius: 0px;
  --shadow: 3px 3px 0 #000000;
  --font-sans: Verdana, Tahoma, Geneva, sans-serif;
  --chart-text: #241a3d;
  --chart-muted: #5c4a86;
  --chart-line: #b9a9ff;
  --chart-bg: #fffdf0;
  --chart-1: #a8186a;
  --chart-2: #0a6f8f;
  --chart-3: #8a5a00;
  --chart-4: #6a2fd0;
  --chart-5: #b3122f;
  --chart-6: #0a8f5a;
}
[data-theme="webring"] body {
  background-color: #1b0640;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 1px, transparent 1.5px),
    repeating-linear-gradient(45deg, #1b0640 0 14px, #22084f 14px 28px);
  background-size: 22px 22px, auto;
}
[data-theme="webring"] .site-header {
  background: linear-gradient(#3a1178, #1b0640);
  border-bottom: 3px double #ff7ac8;
  backdrop-filter: none;
}
[data-theme="webring"] .brand {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  letter-spacing: 0.01em;
}
[data-theme="webring"] .brand > span:last-child {
  background: linear-gradient(90deg, #ff5fb0, #ffd23c, #8ef0ff, #b18cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="webring"] .brand-mark {
  border: 2px solid #ffd0e8;
  background: linear-gradient(#ff5fb0, #ff9a3c);
  color: #2a0d2a;
  text-shadow: 1px 1px 0 #ffffff;
  box-shadow: 2px 2px 0 #000000;
}
[data-theme="webring"] .nav a {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffe98a, #ffb13c);
  color: #3a1a00;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.28rem 0.6rem;
  box-shadow: inset 0 1px 0 #fff3c4, 1px 1px 0 #000000;
}
[data-theme="webring"] .nav a:hover {
  background: linear-gradient(#fff6a8, #ffd23c);
  color: #6a2a00;
}
[data-theme="webring"] .nav a.active {
  background: linear-gradient(#8ef0ff, #3bb7e8);
  border-color: #d8fbff;
  color: #002233;
  box-shadow: inset 0 1px 0 #e6fdff, 1px 1px 0 #000000;
}
[data-theme="webring"] .quick-search input {
  background: #fffdf0;
  border: 2px solid #8f7bd6;
  border-radius: 0;
  color: #241a3d;
  box-shadow: inset 1px 1px 0 #c9bcf0;
}
[data-theme="webring"] .quick-search input::placeholder { color: #7a68a8; }
[data-theme="webring"] .icon-btn {
  background: linear-gradient(#fff6a8, #ffd23c);
  border: 2px solid #8f7bd6;
  border-radius: 0;
  color: #3a2500;
  box-shadow: inset 0 1px 0 #fffbe0, 1px 1px 0 #000000;
}
[data-theme="webring"] :is(
  .panel, .card, .kpi, .metric, .filters, .list-row, .char-card,
  .ac-menu, .season-tabs, .view-toggle, .preset-tabs a,
  .pagination a, .pagination span, .badge, .chip, .tag, .btn,
  .input, .select, .textarea, .breakout-card
) {
  --text: #241a3d;
  --muted: #5c4a86;
  --muted-2: #7a68a8;
  --line: #8f7bd6;
  --line-soft: #c9bcf0;
  --panel: #fffdf0;
  --panel-2: #f3ecff;
  --panel-3: #e6dcff;
  --accent: #a8186a;
  --accent-soft: rgba(255, 95, 176, 0.16);
  --accent-2: #0a6f8f;
  --danger: #b3122f;
  --warn: #8a5a00;
  --shadow: 3px 3px 0 #000000;
  color: var(--text);
}
[data-theme="webring"] .panel,
[data-theme="webring"] .kpi,
[data-theme="webring"] .metric,
[data-theme="webring"] .filters,
[data-theme="webring"] .breakout-card {
  background: #fffdf0;
  border: 3px ridge #8f7bd6;
  border-radius: 0;
  box-shadow: 3px 3px 0 #000000;
}
[data-theme="webring"] .panel > .panel-head {
  margin: -1rem -1rem 0.7rem;
  padding: 0.4rem 0.75rem;
  background: linear-gradient(90deg, #7a2fd0, #ff5fb0);
  border-bottom: 2px solid #8f7bd6;
  border-radius: 0;
  color: #ffffff;
  text-shadow: 1px 1px 0 #4a0a6a;
}
[data-theme="webring"] .panel > .panel-head .small { color: #ffe9ff; }
[data-theme="webring"] .gem-filters > .panel-head { margin: -0.8rem -0.9rem 0.7rem; }
[data-theme="webring"] h1,
[data-theme="webring"] h2,
[data-theme="webring"] h3 {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  letter-spacing: 0;
}
[data-theme="webring"] .page-head h1 { text-shadow: 2px 2px 0 #000000; }
[data-theme="webring"] .eyebrow { color: #ffe98a; }
[data-theme="webring"] .card {
  background: #fffdf0;
  border: 2px solid #3b2a6e;
  border-radius: 0;
  box-shadow: 2px 2px 0 #ff7ac8;
}
[data-theme="webring"] .card:hover {
  transform: none;
  border-color: #0a6f8f;
  box-shadow: 3px 3px 0 #8ef0ff;
}
[data-theme="webring"] .card-title { color: #0a3ea8; text-decoration: underline; }
[data-theme="webring"] .card:hover .card-title { color: #a8186a; }
[data-theme="webring"] .list-row {
  background: #fffdf0;
  border: 2px solid #8f7bd6;
  border-radius: 0;
  box-shadow: 2px 2px 0 #b9a9ff;
}
[data-theme="webring"] .list-row:hover { border-color: #a8186a; }
[data-theme="webring"] .btn {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffffff, #e6dcff);
  color: #3a2a6a;
  font-weight: 700;
  box-shadow: inset 0 1px 0 #ffffff, 1px 1px 0 #b9a9ff;
}
[data-theme="webring"] .btn:hover { color: #a8186a; border-color: #a8186a; }
[data-theme="webring"] .btn.primary {
  background: linear-gradient(#fff6a8, #ffd23c);
  border-color: #a06b00;
  color: #3a2500;
}
[data-theme="webring"] .btn.ghost { background: transparent; }
[data-theme="webring"] .badge,
[data-theme="webring"] .chip,
[data-theme="webring"] .tag {
  border: 1px solid #8f7bd6;
  border-radius: 0;
  background: #f3ecff;
  color: #4a3a7a;
}
[data-theme="webring"] .badge.accent {
  background: #fff6a8;
  border-color: #a06b00;
  color: #6a4500;
}
[data-theme="webring"] .chip:hover { color: #a8186a; border-color: #a8186a; }
[data-theme="webring"] .pagination a,
[data-theme="webring"] .pagination span {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffffff, #e6dcff);
  color: #3a2a6a;
  font-weight: 700;
}
[data-theme="webring"] .pagination a:hover { border-color: #a8186a; color: #a8186a; }
[data-theme="webring"] .pagination .current {
  background: linear-gradient(#8ef0ff, #3bb7e8);
  border-color: #0a6f8f;
  color: #002233;
}
[data-theme="webring"] .input,
[data-theme="webring"] .select,
[data-theme="webring"] .textarea {
  background: #fffdf0;
  border: 2px solid #8f7bd6;
  border-radius: 0;
  color: #241a3d;
}
[data-theme="webring"] .input::placeholder,
[data-theme="webring"] .textarea::placeholder { color: #7a68a8; }
[data-theme="webring"] table.data th {
  background: #efe8ff;
  color: #4a3a7a;
  border-bottom: 1px solid #8f7bd6;
}
[data-theme="webring"] table.data td { border-bottom: 1px solid #c9bcf0; }
[data-theme="webring"] table.data tr:hover td { background: #f6f0ff; }
[data-theme="webring"] .preset-tabs a,
[data-theme="webring"] .season-tabs a,
[data-theme="webring"] .view-toggle a {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffffff, #e6dcff);
  color: #3a2a6a;
  font-weight: 700;
}
[data-theme="webring"] .preset-tabs a.active,
[data-theme="webring"] .season-tabs a.active,
[data-theme="webring"] .view-toggle a.active {
  background: linear-gradient(#fff6a8, #ffd23c);
  border-color: #a06b00;
  color: #3a2500;
}
[data-theme="webring"] .season-tabs,
[data-theme="webring"] .view-toggle {
  border: 0;
  border-radius: 0;
  gap: 0.3rem;
  overflow: visible;
}
[data-theme="webring"] .cover .placeholder,
[data-theme="webring"] .tag-avatar {
  background: linear-gradient(145deg, #ff5fb0, #ff9a3c);
  color: #ffffff;
}
[data-theme="webring"] .cover .score-pill {
  background: rgba(20, 8, 40, 0.84);
  color: #ffd6f2;
}
[data-theme="webring"] .ac-menu {
  background: #fffdf0;
  border: 3px ridge #8f7bd6;
  border-radius: 0;
  box-shadow: 4px 4px 0 #000000;
}
[data-theme="webring"] .site-footer { flex-wrap: wrap; }
[data-theme="webring"] .site-footer::before {
  content: "BEST VIEWED 800ﾃ・00  ﾂｷ  NETSCAPE NOW!  ﾂｷ  笘・WEBRING 笘・;
  flex-basis: 100%;
  order: -1;
  padding: 0.32rem 0.4rem;
  border: 1px solid #8f7bd6;
  background: #000000;
  color: #8ef0ff;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-align: center;
}

/* ---------- Theme: Vaporwave 1999 ---------- */
[data-theme="vaporwave"] {
  --bg: #1a0033;
  --bg-soft: #24063f;
  --panel: #2a0a4a;
  --panel-2: #35105c;
  --panel-3: #42176f;
  --line: #7a3aa8;
  --line-soft: #4a1f70;
  --text: #f0e3ff;
  --muted: #c9a8e8;
  --muted-2: #a986cc;
  --accent: #ff7ac8;
  --accent-soft: rgba(255, 79, 163, 0.18);
  --accent-2: #8ef0ff;
  --danger: #ff8fa0;
  --warn: #ffd23c;
  --radius: 10px;
  --shadow: 0 0 18px rgba(255, 79, 163, 0.35);
  --font-sans: Verdana, Tahoma, Geneva, sans-serif;
  --chart-text: #f0e3ff;
  --chart-muted: #c9a8e8;
  --chart-line: #4a1f70;
  --chart-bg: #2a0a4a;
  --chart-1: #ff7ac8;
  --chart-2: #8ef0ff;
  --chart-3: #ffd23c;
  --chart-4: #b18cff;
  --chart-5: #ff8fa0;
  --chart-6: #7ec8e3;
}
[data-theme="vaporwave"] body {
  background-color: #1a0033;
  background-image:
    radial-gradient(circle at 82% 6%, rgba(255, 210, 60, 0.9) 0 22px, rgba(255, 210, 60, 0.28) 23px 34px, transparent 35px),
    repeating-linear-gradient(90deg, rgba(255, 79, 163, 0.16) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, rgba(255, 79, 163, 0.16) 0 1px, transparent 1px 26px),
    linear-gradient(#1a0033, #3a0a5e 55%, #c22e86);
  background-attachment: fixed;
}
[data-theme="vaporwave"] .site-header {
  background: rgba(20, 4, 40, 0.62);
  border-bottom: 1px solid #ff7ac8;
  box-shadow: 0 0 14px rgba(255, 79, 163, 0.45);
  backdrop-filter: blur(10px);
}
[data-theme="vaporwave"] .brand {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  letter-spacing: 0.18em;
}
[data-theme="vaporwave"] .brand > span:last-child {
  background: linear-gradient(#ffffff, #ffd9f0 45%, #ff4fa3 55%, #8ef0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="vaporwave"] .brand-mark {
  border: 1px solid #8ef0ff;
  background: rgba(20, 4, 40, 0.8);
  color: #8ef0ff;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(142, 240, 255, 0.7);
}
[data-theme="vaporwave"] .nav a {
  border: 1px solid #ff7ac8;
  border-radius: 999px;
  background: rgba(20, 4, 40, 0.6);
  color: #ffd0e0;
  box-shadow: inset 0 0 8px rgba(255, 79, 163, 0.25);
}
[data-theme="vaporwave"] .nav a:hover {
  background: rgba(255, 79, 163, 0.22);
  color: #ffffff;
}
[data-theme="vaporwave"] .nav a.active {
  background: linear-gradient(#ff4fa3, #8a2be2);
  border-color: #ffd0e0;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 79, 163, 0.7);
}
[data-theme="vaporwave"] .quick-search input {
  background: rgba(20, 4, 40, 0.75);
  border: 1px solid #8ef0ff;
  border-radius: 999px;
  color: #e9f9ff;
}
[data-theme="vaporwave"] .quick-search input::placeholder { color: #9fd9e8; }
[data-theme="vaporwave"] .icon-btn {
  background: rgba(20, 4, 40, 0.75);
  border: 1px solid #ff7ac8;
  border-radius: 999px;
  color: #ffd0e0;
}
[data-theme="vaporwave"] .panel,
[data-theme="vaporwave"] .kpi,
[data-theme="vaporwave"] .metric,
[data-theme="vaporwave"] .filters,
[data-theme="vaporwave"] .breakout-card {
  background: rgba(18, 4, 38, 0.72);
  border: 1px solid #ff7ac8;
  box-shadow: 0 0 14px rgba(255, 79, 163, 0.4), inset 0 0 16px rgba(142, 240, 255, 0.08);
}
[data-theme="vaporwave"] .panel > .panel-head {
  margin: -1rem -1rem 0.7rem;
  padding: 0.45rem 0.8rem;
  background: linear-gradient(90deg, #ff4fa3, #8a2be2);
  border-bottom: 1px solid #ffd0e0;
  border-radius: 9px 9px 0 0;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 157, 196, 0.9);
}
[data-theme="vaporwave"] .panel > .panel-head .small { color: #ffe3f2; }
[data-theme="vaporwave"] .gem-filters > .panel-head { margin: -0.8rem -0.9rem 0.7rem; }
[data-theme="vaporwave"] h1,
[data-theme="vaporwave"] h2 {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  letter-spacing: 0.04em;
}
[data-theme="vaporwave"] .page-head h1 { text-shadow: 0 0 18px rgba(255, 79, 163, 0.55); }
[data-theme="vaporwave"] .eyebrow { color: #8ef0ff; }
[data-theme="vaporwave"] .card {
  background: rgba(18, 4, 38, 0.72);
  border-color: #7a3aa8;
  border-radius: 10px;
}
[data-theme="vaporwave"] .card:hover {
  border-color: #8ef0ff;
  box-shadow: 0 0 0 1px rgba(142, 240, 255, 0.35), 0 0 20px rgba(255, 79, 163, 0.4);
}
[data-theme="vaporwave"] .card-title { color: #ffd0e0; }
[data-theme="vaporwave"] .card:hover .card-title { color: #8ef0ff; }
[data-theme="vaporwave"] .list-row {
  background: rgba(18, 4, 38, 0.72);
  border-color: #4a1f70;
}
[data-theme="vaporwave"] .list-row:hover { border-color: #ff7ac8; }
[data-theme="vaporwave"] .btn {
  border-radius: 999px;
  border-color: #ff7ac8;
  background: rgba(20, 4, 40, 0.75);
  color: #ffd0e0;
}
[data-theme="vaporwave"] .btn:hover { border-color: #8ef0ff; color: #ffffff; }
[data-theme="vaporwave"] .btn.primary {
  background: linear-gradient(#ff4fa3, #8a2be2);
  border-color: #ffd0e0;
  color: #ffffff;
}
[data-theme="vaporwave"] .btn.ghost { background: transparent; }
[data-theme="vaporwave"] .badge,
[data-theme="vaporwave"] .chip,
[data-theme="vaporwave"] .tag {
  border-color: #ff7ac8;
  border-radius: 999px;
  background: rgba(20, 4, 40, 0.6);
  color: #ffd0e0;
}
[data-theme="vaporwave"] .badge.accent {
  background: rgba(255, 79, 163, 0.2);
  border-color: #ff7ac8;
  color: #ffd9ec;
}
[data-theme="vaporwave"] .pagination a,
[data-theme="vaporwave"] .pagination span {
  border-radius: 999px;
  border-color: #ff7ac8;
  background: rgba(20, 4, 40, 0.65);
  color: #ffd0e0;
}
[data-theme="vaporwave"] .pagination a:hover { border-color: #8ef0ff; color: #ffffff; }
[data-theme="vaporwave"] .pagination .current {
  background: linear-gradient(#ff4fa3, #8a2be2);
  border-color: #ffd0e0;
  color: #ffffff;
}
[data-theme="vaporwave"] .input,
[data-theme="vaporwave"] .select,
[data-theme="vaporwave"] .textarea {
  background: rgba(20, 4, 40, 0.75);
  border-color: #7a3aa8;
  border-radius: 8px;
  color: #f0e3ff;
}
[data-theme="vaporwave"] .input:focus,
[data-theme="vaporwave"] .select:focus {
  border-color: #8ef0ff;
  box-shadow: 0 0 0 3px rgba(142, 240, 255, 0.18);
}
[data-theme="vaporwave"] table.data th { color: #ffb3d0; border-bottom-color: #4a1f70; }
[data-theme="vaporwave"] table.data td { border-bottom-color: #3a1550; }
[data-theme="vaporwave"] table.data tr:hover td { background: rgba(255, 79, 163, 0.08); }
[data-theme="vaporwave"] .preset-tabs a,
[data-theme="vaporwave"] .season-tabs a,
[data-theme="vaporwave"] .view-toggle a {
  border-radius: 999px;
  border-color: #7a3aa8;
  background: rgba(20, 4, 40, 0.65);
  color: #ffd0e0;
}
[data-theme="vaporwave"] .preset-tabs a.active,
[data-theme="vaporwave"] .season-tabs a.active,
[data-theme="vaporwave"] .view-toggle a.active {
  background: linear-gradient(#ff4fa3, #8a2be2);
  border-color: #ffd0e0;
  color: #ffffff;
}
[data-theme="vaporwave"] .season-tabs,
[data-theme="vaporwave"] .view-toggle {
  border: 0;
  border-radius: 0;
  gap: 0.3rem;
  overflow: visible;
}
[data-theme="vaporwave"] .cover .placeholder,
[data-theme="vaporwave"] .tag-avatar {
  background: linear-gradient(145deg, #4a1f70, #ff4fa3);
  color: #ffffff;
}
[data-theme="vaporwave"] .cover .score-pill {
  background: rgba(12, 2, 26, 0.82);
  color: #8ef0ff;
}
[data-theme="vaporwave"] .ac-menu {
  background: #24063f;
  border-color: #ff7ac8;
  box-shadow: 0 0 20px rgba(255, 79, 163, 0.4);
}

.sw-stardust { background: linear-gradient(135deg, #120b2e 0 38%, #ff5fb0 38% 62%, #8ef0ff 62%); }

/* ---------- Theme: Stardust 1998 (animated Geocities) ---------- */
[data-theme="stardust"] {
  --bg: #120b2e;
  --bg-soft: #1a1040;
  --panel: #241552;
  --panel-2: #2c1a63;
  --panel-3: #362078;
  --line: #7a63c0;
  --line-soft: #4a3a86;
  --text: #f6efff;
  --muted: #d3c6f5;
  --muted-2: #b3a2e0;
  --accent: #ff9dc4;
  --accent-soft: rgba(255, 95, 176, 0.18);
  --accent-2: #8ef0ff;
  --danger: #ff8fa0;
  --warn: #ffe98a;
  --radius: 0px;
  --shadow: 3px 3px 0 #000000;
  --font-sans: Verdana, Tahoma, Geneva, sans-serif;
  --chart-text: #241a3d;
  --chart-muted: #5c4a86;
  --chart-line: #b9a9ff;
  --chart-bg: #fffdf0;
  --chart-1: #a8186a;
  --chart-2: #0a6f8f;
  --chart-3: #8a5a00;
  --chart-4: #6a2fd0;
  --chart-5: #0a8f5a;
  --chart-6: #b3122f;
}
[data-theme="stardust"] body {
  background-color: #120b2e;
  background-image:
    radial-gradient(900px 520px at 15% 0%, rgba(255, 95, 176, 0.14), transparent 60%),
    radial-gradient(720px 420px at 90% 8%, rgba(142, 240, 255, 0.1), transparent 55%),
    linear-gradient(#120b2e, #1b0640 60%, #2a0a4a);
}
[data-theme="stardust"] body::before,
[data-theme="stardust"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: repeat;
}
[data-theme="stardust"] body::before {
  background-image:
    radial-gradient(circle at 12px 18px, #ffffff 1.4px, transparent 1.9px),
    radial-gradient(circle at 48px 54px, #ffd6f2 1.2px, transparent 1.7px),
    radial-gradient(circle at 76px 22px, #9fe8ff 1.2px, transparent 1.7px),
    radial-gradient(circle at 30px 78px, #fff6a8 1.2px, transparent 1.7px);
  background-size: 96px 88px;
  animation: stardust-twinkle 4.2s steps(3) infinite;
}
[data-theme="stardust"] body::after {
  background-image:
    radial-gradient(circle at 20px 40px, #ffffff 1px, transparent 1.5px),
    radial-gradient(circle at 60px 10px, #ff9dc4 1px, transparent 1.5px),
    radial-gradient(circle at 90px 70px, #8ef0ff 1px, transparent 1.5px);
  background-size: 120px 110px;
  opacity: 0.7;
  animation: stardust-twinkle 6.8s steps(4) infinite;
  animation-delay: -2.2s;
}
@keyframes stardust-twinkle {
  0%, 100% { opacity: 0.28; }
  45% { opacity: 0.95; }
  70% { opacity: 0.45; }
}
[data-theme="stardust"] .page,
[data-theme="stardust"] .site-footer {
  position: relative;
  z-index: 5;
}
[data-theme="stardust"] .site-header {
  background: linear-gradient(#3a1178, #1b0640);
  border-bottom: 3px double #ff7ac8;
  backdrop-filter: none;
}
[data-theme="stardust"] .brand {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  letter-spacing: 0.01em;
}
[data-theme="stardust"] .brand::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='1' width='2' height='14' fill='%23ffe98a'/%3E%3Crect x='1' y='7' width='14' height='2' fill='%23ffe98a'/%3E%3Crect x='5' y='5' width='6' height='6' fill='%23fff6a8'/%3E%3Crect x='7' y='7' width='2' height='2' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  image-rendering: pixelated;
  animation: stardust-sparkle 2.4s steps(2) infinite;
}
@keyframes stardust-sparkle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.82); opacity: 0.7; }
}
[data-theme="stardust"] .brand > span:last-child {
  background: linear-gradient(90deg, #ff5fb0, #ffd23c, #8ef0ff, #b18cff, #ff5fb0);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: stardust-rainbow 6s linear infinite, stardust-hue 9s linear infinite;
}
@keyframes stardust-hue {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}
@keyframes stardust-rainbow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
[data-theme="stardust"] .brand-mark {
  border: 2px solid #ffd0e8;
  background: linear-gradient(#ff5fb0, #ff9a3c);
  color: #2a0d2a;
  text-shadow: 1px 1px 0 #ffffff;
  box-shadow: 2px 2px 0 #000000;
}
[data-theme="stardust"] .nav a {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffe98a, #ffb13c);
  color: #3a1a00;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  box-shadow: inset 0 1px 0 #fff3c4, 1px 1px 0 #000000;
}
[data-theme="stardust"] .nav { gap: 1px; }
[data-theme="stardust"] .quick-search input { width: min(220px, 26vw); }
[data-theme="stardust"] .nav a:hover {
  background: linear-gradient(#fff6a8, #ffd23c);
  color: #6a2a00;
}
[data-theme="stardust"] .nav a.active {
  background: linear-gradient(#8ef0ff, #3bb7e8);
  border-color: #d8fbff;
  color: #002233;
  box-shadow: inset 0 1px 0 #e6fdff, 1px 1px 0 #000000;
}
[data-theme="stardust"] .brand::after {
  content: "NEW!";
  margin-left: 0.2rem;
  border: 2px solid #ffd0e8;
  background: #a8186a;
  color: #fff6a8;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.08rem 0.25rem;
  box-shadow: 2px 2px 0 #000000;
  animation: stardust-blink 1.8s steps(1) infinite;
}
@keyframes stardust-blink {
  0%, 58% { opacity: 1; }
  59%, 100% { opacity: 0.2; }
}
[data-theme="stardust"] .quick-search input {
  background: #fffdf0;
  border: 2px solid #8f7bd6;
  border-radius: 0;
  color: #241a3d;
  box-shadow: inset 1px 1px 0 #c9bcf0;
}
[data-theme="stardust"] .quick-search input::placeholder { color: #7a68a8; }
[data-theme="stardust"] .icon-btn {
  background: linear-gradient(#fff6a8, #ffd23c);
  border: 2px solid #8f7bd6;
  border-radius: 0;
  color: #3a2500;
  box-shadow: inset 0 1px 0 #fffbe0, 1px 1px 0 #000000;
}
[data-theme="stardust"] :is(
  .panel, .card, .kpi, .metric, .filters, .list-row, .char-card,
  .ac-menu, .season-tabs, .view-toggle, .preset-tabs a,
  .pagination a, .pagination span, .badge, .chip, .tag, .btn,
  .input, .select, .textarea, .breakout-card
) {
  --text: #241a3d;
  --muted: #5c4a86;
  --muted-2: #7a68a8;
  --line: #8f7bd6;
  --line-soft: #c9bcf0;
  --panel: #fffdf0;
  --panel-2: #f3ecff;
  --panel-3: #e6dcff;
  --accent: #a8186a;
  --accent-soft: rgba(255, 95, 176, 0.16);
  --accent-2: #0a6f8f;
  --danger: #b3122f;
  --warn: #8a5a00;
  --shadow: 3px 3px 0 #000000;
  color: var(--text);
}
[data-theme="stardust"] .panel,
[data-theme="stardust"] .kpi,
[data-theme="stardust"] .metric,
[data-theme="stardust"] .filters,
[data-theme="stardust"] .breakout-card {
  background: #fffdf0;
  border: 3px ridge #8f7bd6;
  border-radius: 0;
  box-shadow: 3px 3px 0 #000000;
}
[data-theme="stardust"] .panel > .panel-head {
  margin: -1rem -1rem 0.7rem;
  padding: 0.4rem 0.75rem;
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.16) 0 25%, transparent 0 50%) 0 0 / 6px 6px,
    linear-gradient(90deg, #7a2fd0, #ff5fb0);
  border-bottom: 2px solid #8f7bd6;
  border-radius: 0;
  color: #ffffff;
  text-shadow: 1px 1px 0 #4a0a6a;
}
[data-theme="stardust"] .panel > .panel-head h2::before,
[data-theme="stardust"] .panel > .panel-head h3::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='1' width='2' height='5' fill='%23fff6a8'/%3E%3Crect x='7' y='10' width='2' height='5' fill='%23fff6a8'/%3E%3Crect x='1' y='7' width='5' height='2' fill='%23fff6a8'/%3E%3Crect x='10' y='7' width='5' height='2' fill='%23fff6a8'/%3E%3Crect x='6' y='6' width='4' height='4' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  image-rendering: pixelated;
  vertical-align: -1px;
}
[data-theme="stardust"] .panel > .panel-head .small { color: #ffe9ff; }
[data-theme="stardust"] .gem-filters > .panel-head { margin: -0.8rem -0.9rem 0.7rem; }
[data-theme="stardust"] h1,
[data-theme="stardust"] h2,
[data-theme="stardust"] h3 {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  letter-spacing: 0;
}
[data-theme="stardust"] .page-head h1 { text-shadow: 2px 2px 0 #000000; }
[data-theme="stardust"] .eyebrow { color: #ffe98a; }
[data-theme="stardust"] .card {
  background: #fffdf0;
  border: 2px solid #3b2a6e;
  border-radius: 0;
  box-shadow: 2px 2px 0 #ff7ac8;
  transition: none;
}
[data-theme="stardust"] .card:hover {
  transform: translate(-1px, -1px);
  border-color: #0a6f8f;
  box-shadow: 4px 4px 0 #8ef0ff;
}
[data-theme="stardust"] .card-title { color: #0a3ea8; text-decoration: underline; }
[data-theme="stardust"] .card:hover .card-title { color: #a8186a; }
[data-theme="stardust"] .cover::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='3' y='3' width='4' height='2' fill='%23ff5fb0'/%3E%3Crect x='9' y='3' width='4' height='2' fill='%23ff5fb0'/%3E%3Crect x='2' y='4' width='12' height='4' fill='%23ff5fb0'/%3E%3Crect x='3' y='8' width='10' height='2' fill='%23ff5fb0'/%3E%3Crect x='5' y='10' width='6' height='2' fill='%23ff5fb0'/%3E%3Crect x='7' y='12' width='2' height='2' fill='%23ff5fb0'/%3E%3Crect x='4' y='4' width='2' height='2' fill='%23ffd6f2'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  image-rendering: pixelated;
  filter: drop-shadow(1px 1px 0 #000000);
  pointer-events: none;
}
[data-theme="stardust"] .list-row {
  background: #fffdf0;
  border: 2px solid #8f7bd6;
  border-radius: 0;
  box-shadow: 2px 2px 0 #b9a9ff;
}
[data-theme="stardust"] .list-row:hover { border-color: #a8186a; }
[data-theme="stardust"] .btn {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffffff, #e6dcff);
  color: #3a2a6a;
  font-weight: 700;
  box-shadow: inset 0 1px 0 #ffffff, 1px 1px 0 #b9a9ff;
}
[data-theme="stardust"] .btn:hover { color: #a8186a; border-color: #a8186a; }
[data-theme="stardust"] .btn.primary {
  background: linear-gradient(#fff6a8, #ffd23c);
  border-color: #a06b00;
  color: #3a2500;
}
[data-theme="stardust"] .btn.ghost { background: transparent; }
[data-theme="stardust"] .badge,
[data-theme="stardust"] .chip,
[data-theme="stardust"] .tag {
  border: 1px solid #8f7bd6;
  border-radius: 0;
  background: #f3ecff;
  color: #4a3a7a;
}
[data-theme="stardust"] .badge.accent {
  background: #fff6a8;
  border-color: #a06b00;
  color: #6a4500;
}
[data-theme="stardust"] .chip:hover { color: #a8186a; border-color: #a8186a; }
[data-theme="stardust"] .pagination a,
[data-theme="stardust"] .pagination span {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffffff, #e6dcff);
  color: #3a2a6a;
  font-weight: 700;
}
[data-theme="stardust"] .pagination a:hover { border-color: #a8186a; color: #a8186a; }
[data-theme="stardust"] .pagination .current {
  background: linear-gradient(#8ef0ff, #3bb7e8);
  border-color: #0a6f8f;
  color: #002233;
}
[data-theme="stardust"] .input,
[data-theme="stardust"] .select,
[data-theme="stardust"] .textarea {
  background: #fffdf0;
  border: 2px solid #8f7bd6;
  border-radius: 0;
  color: #241a3d;
}
[data-theme="stardust"] .input::placeholder,
[data-theme="stardust"] .textarea::placeholder { color: #7a68a8; }
[data-theme="stardust"] table.data th {
  background: #efe8ff;
  color: #4a3a7a;
  border-bottom: 1px solid #8f7bd6;
}
[data-theme="stardust"] table.data td { border-bottom: 1px solid #c9bcf0; }
[data-theme="stardust"] table.data tr:hover td { background: rgba(255, 210, 60, 0.1); }
[data-theme="stardust"] .preset-tabs a,
[data-theme="stardust"] .season-tabs a,
[data-theme="stardust"] .view-toggle a {
  border: 2px solid #8f7bd6;
  border-radius: 0;
  background: linear-gradient(#ffffff, #e6dcff);
  color: #3a2a6a;
  font-weight: 700;
}
[data-theme="stardust"] .preset-tabs a.active,
[data-theme="stardust"] .season-tabs a.active,
[data-theme="stardust"] .view-toggle a.active {
  background: linear-gradient(#fff6a8, #ffd23c);
  border-color: #a06b00;
  color: #3a2500;
}
[data-theme="stardust"] .season-tabs,
[data-theme="stardust"] .view-toggle {
  border: 0;
  border-radius: 0;
  gap: 0.3rem;
  overflow: visible;
}
[data-theme="stardust"] .cover .placeholder,
[data-theme="stardust"] .tag-avatar {
  background: linear-gradient(145deg, #ff5fb0, #ff9a3c);
  color: #ffffff;
}
[data-theme="stardust"] .cover .score-pill {
  background: rgba(20, 8, 40, 0.84);
  color: #ffd6f2;
}
[data-theme="stardust"] .ac-menu {
  background: #fffdf0;
  border: 3px ridge #8f7bd6;
  border-radius: 0;
  box-shadow: 4px 4px 0 #000000;
}
[data-theme="stardust"] .site-footer { flex-wrap: wrap; }
[data-theme="stardust"] .site-footer {
  background: linear-gradient(transparent, #120b2e 34%);
}
.pixel-strip { display: none; }
[data-theme="stardust"] .pixel-strip {
  display: flex;
  flex-basis: 100%;
  order: -1;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 6px;
  border: 1px solid #8f7bd6;
  background: #000000;
}
.px {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  image-rendering: pixelated;
  vertical-align: -3px;
}
.px-cat { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='3' y='2' width='2' height='3' fill='%23ffffff'/%3E%3Crect x='11' y='2' width='2' height='3' fill='%23ffffff'/%3E%3Crect x='3' y='4' width='10' height='9' fill='%23ffffff'/%3E%3Crect x='5' y='7' width='2' height='2' fill='%23241a3d'/%3E%3Crect x='9' y='7' width='2' height='2' fill='%23241a3d'/%3E%3Crect x='7' y='9' width='2' height='1' fill='%23ff9dc4'/%3E%3Crect x='1' y='9' width='2' height='1' fill='%238f7bd6'/%3E%3Crect x='13' y='9' width='2' height='1' fill='%238f7bd6'/%3E%3Crect x='4' y='3' width='1' height='1' fill='%23ff9dc4'/%3E%3Crect x='11' y='3' width='1' height='1' fill='%23ff9dc4'/%3E%3C/svg%3E"); }
.px-tv { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='5' y='0' width='1' height='3' fill='%238ef0ff'/%3E%3Crect x='10' y='0' width='1' height='3' fill='%238ef0ff'/%3E%3Crect x='2' y='3' width='12' height='10' fill='%238f7bd6'/%3E%3Crect x='4' y='5' width='7' height='6' fill='%230a6f8f'/%3E%3Crect x='4' y='7' width='7' height='1' fill='%238ef0ff'/%3E%3Crect x='12' y='5' width='1' height='1' fill='%23ffe98a'/%3E%3Crect x='12' y='7' width='1' height='1' fill='%23ffe98a'/%3E%3Crect x='4' y='13' width='2' height='2' fill='%23241a3d'/%3E%3Crect x='10' y='13' width='2' height='2' fill='%23241a3d'/%3E%3C/svg%3E"); }
.px-floppy { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='3' y='1' width='10' height='14' fill='%233b2a6e'/%3E%3Crect x='7' y='1' width='5' height='5' fill='%23c9bcf0'/%3E%3Crect x='4' y='7' width='8' height='7' fill='%23fffdf0'/%3E%3Crect x='5' y='9' width='6' height='1' fill='%238f7bd6'/%3E%3Crect x='5' y='11' width='6' height='1' fill='%238f7bd6'/%3E%3C/svg%3E"); }
.px-chibi { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='4' y='1' width='8' height='2' fill='%23b18cff'/%3E%3Crect x='3' y='3' width='10' height='2' fill='%23b18cff'/%3E%3Crect x='4' y='5' width='8' height='7' fill='%23ffd9c0'/%3E%3Crect x='5' y='7' width='2' height='2' fill='%23241a3d'/%3E%3Crect x='9' y='7' width='2' height='2' fill='%23241a3d'/%3E%3Crect x='5' y='7' width='1' height='1' fill='%23ffffff'/%3E%3Crect x='9' y='7' width='1' height='1' fill='%23ffffff'/%3E%3Crect x='4' y='9' width='1' height='1' fill='%23ff9dc4'/%3E%3Crect x='11' y='9' width='1' height='1' fill='%23ff9dc4'/%3E%3Crect x='7' y='10' width='2' height='1' fill='%23a8186a'/%3E%3C/svg%3E"); }
.px-heart { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='3' y='3' width='4' height='2' fill='%23ff5fb0'/%3E%3Crect x='9' y='3' width='4' height='2' fill='%23ff5fb0'/%3E%3Crect x='2' y='4' width='12' height='4' fill='%23ff5fb0'/%3E%3Crect x='3' y='8' width='10' height='2' fill='%23ff5fb0'/%3E%3Crect x='5' y='10' width='6' height='2' fill='%23ff5fb0'/%3E%3Crect x='7' y='12' width='2' height='2' fill='%23ff5fb0'/%3E%3Crect x='4' y='4' width='2' height='2' fill='%23ffd6f2'/%3E%3C/svg%3E"); }
.px-star { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='1' width='2' height='14' fill='%23ffe98a'/%3E%3Crect x='1' y='7' width='14' height='2' fill='%23ffe98a'/%3E%3Crect x='5' y='5' width='6' height='6' fill='%23fff6a8'/%3E%3Crect x='7' y='7' width='2' height='2' fill='%23ffffff'/%3E%3C/svg%3E"); }
[data-theme="stardust"] .pixel-strip .px-badge {
  border: 1px solid #8f7bd6;
  color: #8ef0ff;
  padding: 2px 5px;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}
@media (prefers-reduced-motion: reduce) {
  [data-theme="stardust"] body::before,
  [data-theme="stardust"] body::after,
  [data-theme="stardust"] .brand::before,
  [data-theme="stardust"] .brand > span:last-child,
  [data-theme="stardust"] .brand::after {
    animation: none;
  }
  [data-theme="stardust"] .brand::after { opacity: 1; }
}

/* Ghost buttons sit on the dark page canvas in the cream-panel themes. */
[data-theme="geocities"] .btn.ghost,
[data-theme="webring"] .btn.ghost,
[data-theme="stardust"] .btn.ghost {
  background: rgba(20, 8, 40, 0.55);
  color: #ffe9ff;
  border-color: #8f7bd6;
}
[data-theme="geocities"] .btn.ghost:hover,
[data-theme="webring"] .btn.ghost:hover,
[data-theme="stardust"] .btn.ghost:hover {
  color: #ffd6f2;
  border-color: #ffd6f2;
}
[data-theme="geocities"] .panel .btn.ghost,
[data-theme="geocities"] .card .btn.ghost,
[data-theme="webring"] .panel .btn.ghost,
[data-theme="webring"] .card .btn.ghost,
[data-theme="stardust"] .panel .btn.ghost,
[data-theme="stardust"] .card .btn.ghost {
  background: transparent;
  color: #3a2a6a;
  border-color: #8f7bd6;
}
[data-theme="geocities"] .panel .btn.ghost:hover,
[data-theme="geocities"] .card .btn.ghost:hover,
[data-theme="webring"] .panel .btn.ghost:hover,
[data-theme="webring"] .card .btn.ghost:hover,
[data-theme="stardust"] .panel .btn.ghost:hover,
[data-theme="stardust"] .card .btn.ghost:hover {
  color: #a8186a;
  border-color: #a8186a;
}

/* Randomised canvas starfield (Stardust) */
.starfield-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
  pointer-events: none;
}
html[data-starfield] .starfield-canvas { display: block; }
html[data-starfield] body::before,
html[data-starfield] body::after { display: none; }

.px-sakura { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='1' width='2' height='4' fill='%23ff9dc4'/%3E%3Crect x='2' y='5' width='4' height='2' fill='%23ff9dc4'/%3E%3Crect x='10' y='5' width='4' height='2' fill='%23ff9dc4'/%3E%3Crect x='5' y='8' width='2' height='3' fill='%23ff9dc4'/%3E%3Crect x='9' y='8' width='2' height='3' fill='%23ff9dc4'/%3E%3Crect x='7' y='6' width='2' height='2' fill='%23fff6a8'/%3E%3C/svg%3E"); }
.px-note { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='9' y='2' width='2' height='9' fill='%238ef0ff'/%3E%3Crect x='11' y='2' width='3' height='2' fill='%238ef0ff'/%3E%3Crect x='11' y='4' width='2' height='2' fill='%238ef0ff'/%3E%3Crect x='5' y='10' width='5' height='4' fill='%238ef0ff'/%3E%3C/svg%3E"); }

[data-theme="stardust"] .eyebrow::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='1' width='2' height='14' fill='%23ffe98a'/%3E%3Crect x='1' y='7' width='14' height='2' fill='%23ffe98a'/%3E%3Crect x='5' y='5' width='6' height='6' fill='%23fff6a8'/%3E%3Crect x='7' y='7' width='2' height='2' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  image-rendering: pixelated;
  vertical-align: -1px;
}

[data-theme="stardust"] .empty::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 0.45rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='4' y='1' width='8' height='2' fill='%23b18cff'/%3E%3Crect x='3' y='3' width='10' height='2' fill='%23b18cff'/%3E%3Crect x='4' y='5' width='8' height='7' fill='%23ffd9c0'/%3E%3Crect x='5' y='7' width='2' height='2' fill='%23241a3d'/%3E%3Crect x='9' y='7' width='2' height='2' fill='%23241a3d'/%3E%3Crect x='5' y='7' width='1' height='1' fill='%23ffffff'/%3E%3Crect x='9' y='7' width='1' height='1' fill='%23ffffff'/%3E%3Crect x='4' y='9' width='1' height='1' fill='%23ff9dc4'/%3E%3Crect x='11' y='9' width='1' height='1' fill='%23ff9dc4'/%3E%3Crect x='7' y='10' width='2' height='1' fill='%23a8186a'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  image-rendering: pixelated;
}

@media (min-width: 1380px) {
  [data-theme="stardust"] .nav a::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 2px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    image-rendering: pixelated;
    vertical-align: -1px;
  }
  [data-theme="stardust"] .nav a[href="/"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='2' y='2' width='5' height='5' fill='%233a1a00'/%3E%3Crect x='9' y='2' width='5' height='5' fill='%233a1a00'/%3E%3Crect x='2' y='9' width='5' height='5' fill='%233a1a00'/%3E%3Crect x='9' y='9' width='5' height='5' fill='%233a1a00'/%3E%3C/svg%3E"); }
  [data-theme="stardust"] .nav a[href="/anime"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='5' y='0' width='1' height='3' fill='%233a1a00'/%3E%3Crect x='10' y='0' width='1' height='3' fill='%233a1a00'/%3E%3Crect x='2' y='3' width='12' height='10' fill='%233a1a00'/%3E%3Crect x='4' y='5' width='8' height='6' fill='%23fff6a8'/%3E%3C/svg%3E"); }
  [data-theme="stardust"] .nav a[href="/manga"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='3' y='2' width='10' height='12' fill='%233a1a00'/%3E%3Crect x='5' y='4' width='6' height='8' fill='%23fff6a8'/%3E%3Crect x='7' y='4' width='1' height='8' fill='%233a1a00'/%3E%3C/svg%3E"); }
  [data-theme="stardust"] .nav a[href="/characters"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='4' y='3' width='8' height='9' fill='%233a1a00'/%3E%3Crect x='5' y='6' width='2' height='2' fill='%23fff6a8'/%3E%3Crect x='9' y='6' width='2' height='2' fill='%23fff6a8'/%3E%3Crect x='7' y='9' width='2' height='1' fill='%23fff6a8'/%3E%3C/svg%3E"); }
  [data-theme="stardust"] .nav a[href="/companies"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='6' y='2' width='4' height='1' fill='%233a1a00'/%3E%3Crect x='6' y='3' width='1' height='3' fill='%233a1a00'/%3E%3Crect x='9' y='3' width='1' height='3' fill='%233a1a00'/%3E%3Crect x='2' y='6' width='12' height='8' fill='%233a1a00'/%3E%3Crect x='4' y='8' width='8' height='4' fill='%23fff6a8'/%3E%3Crect x='7' y='8' width='2' height='2' fill='%233a1a00'/%3E%3C/svg%3E"); }
  [data-theme="stardust"] .nav a[href="/tags"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='3' y='3' width='8' height='8' fill='%233a1a00'/%3E%3Crect x='11' y='5' width='2' height='2' fill='%233a1a00'/%3E%3Crect x='13' y='7' width='2' height='2' fill='%233a1a00'/%3E%3Crect x='5' y='5' width='2' height='2' fill='%23fff6a8'/%3E%3C/svg%3E"); }
  [data-theme="stardust"] .nav a[href="/season"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='2' width='2' height='4' fill='%233a1a00'/%3E%3Crect x='3' y='6' width='4' height='2' fill='%233a1a00'/%3E%3Crect x='9' y='6' width='4' height='2' fill='%233a1a00'/%3E%3Crect x='5' y='9' width='2' height='3' fill='%233a1a00'/%3E%3Crect x='9' y='9' width='2' height='3' fill='%233a1a00'/%3E%3Crect x='7' y='7' width='2' height='2' fill='%23fff6a8'/%3E%3C/svg%3E"); }
  [data-theme="stardust"] .nav a[href="/insights"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='2' y='9' width='3' height='5' fill='%233a1a00'/%3E%3Crect x='6' y='5' width='3' height='9' fill='%233a1a00'/%3E%3Crect x='10' y='2' width='3' height='12' fill='%233a1a00'/%3E%3C/svg%3E"); }
  [data-theme="stardust"] .nav a[href="/gems"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='2' width='2' height='2' fill='%233a1a00'/%3E%3Crect x='5' y='4' width='6' height='2' fill='%233a1a00'/%3E%3Crect x='3' y='6' width='10' height='2' fill='%233a1a00'/%3E%3Crect x='5' y='8' width='6' height='2' fill='%233a1a00'/%3E%3Crect x='7' y='10' width='2' height='2' fill='%233a1a00'/%3E%3Crect x='6' y='6' width='1' height='1' fill='%23fff6a8'/%3E%3C/svg%3E"); }
  [data-theme="stardust"] .nav a[href="/health"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='3' y='3' width='4' height='2' fill='%233a1a00'/%3E%3Crect x='9' y='3' width='4' height='2' fill='%233a1a00'/%3E%3Crect x='2' y='4' width='12' height='4' fill='%233a1a00'/%3E%3Crect x='3' y='8' width='10' height='2' fill='%233a1a00'/%3E%3Crect x='5' y='10' width='6' height='2' fill='%233a1a00'/%3E%3Crect x='7' y='12' width='2' height='2' fill='%233a1a00'/%3E%3C/svg%3E"); }
}


/* Decorative character rails (Stardust, wide screens) */
.side-art {
  --rail-w: clamp(180px, calc(50vw - 720px), 360px);
  --side-art-w: calc(var(--rail-w) * 1.2);
  display: none;
  position: fixed;
  bottom: var(--side-art-bottom, 0);
  width: var(--side-art-w);
  height: auto;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  opacity: 1;
  filter: brightness(1.09) saturate(1.04) drop-shadow(0 0 30px rgba(255, 95, 176, 0.32));
}
.side-art-left { left: calc(50% - 720px - var(--side-art-w)); }
.side-art-right {
  right: calc(50% - 720px - var(--side-art-w));
  transform: scaleX(-1);
}
@media (min-width: 1880px) {
  [data-theme="stardust"] .side-art { display: block; }
}




/* Landscape scene strip above the footer (Stardust) */
.scene-strip { display: none; }
[data-theme="stardust"] .scene-strip {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(1rem, 4vw, 4rem);
  margin-top: 1.2rem;
  padding: 0 1.5rem 0.5rem;
  background: linear-gradient(transparent, rgba(18, 11, 46, 0.7) 55%, #120b2e 100%);
}
.scene-strip img {
  height: clamp(160px, 20vw, 320px);
  width: auto;
  filter: brightness(1.05) saturate(1.03) drop-shadow(0 0 24px rgba(255, 95, 176, 0.25));
}
@media (max-width: 640px) {
  [data-theme="stardust"] .scene-strip { display: none; }
}

/* Site banner above the sticky header (Stardust) */
.site-banner { display: none; }
[data-theme="stardust"] .site-banner {
  display: block;
  position: relative;
  z-index: 3;
  overflow: hidden;
  background:
    radial-gradient(ellipse 560px 220px at 76% 72%, rgba(255, 95, 176, 0.3), transparent 70%),
    radial-gradient(ellipse 480px 200px at 20% 22%, rgba(142, 240, 255, 0.14), transparent 70%),
    radial-gradient(ellipse 320px 140px at 52% 118%, rgba(255, 210, 60, 0.1), transparent 70%),
    radial-gradient(circle at 8% 74%, #ffffff 1.4px, transparent 2px),
    radial-gradient(circle at 15% 30%, #ffd6f2 1.2px, transparent 1.8px),
    radial-gradient(circle at 22% 58%, #fff6a8 1.5px, transparent 2.1px),
    radial-gradient(circle at 29% 18%, #9fe8ff 1.2px, transparent 1.8px),
    radial-gradient(circle at 36% 82%, #ffffff 1.3px, transparent 1.9px),
    radial-gradient(circle at 43% 44%, #ffd6f2 1.1px, transparent 1.7px),
    radial-gradient(circle at 50% 68%, #ffffff 1.5px, transparent 2.1px),
    radial-gradient(circle at 57% 26%, #fff6a8 1.2px, transparent 1.8px),
    radial-gradient(circle at 64% 78%, #9fe8ff 1.3px, transparent 1.9px),
    radial-gradient(circle at 71% 40%, #ffffff 1.1px, transparent 1.7px),
    radial-gradient(circle at 78% 64%, #ffd6f2 1.4px, transparent 2px),
    radial-gradient(circle at 85% 20%, #ffffff 1.2px, transparent 1.8px),
    radial-gradient(circle at 92% 54%, #fff6a8 1.3px, transparent 1.9px),
    radial-gradient(circle at 96% 80%, #9fe8ff 1.1px, transparent 1.7px),
    radial-gradient(circle at 41% 10%, #ffffff 1px, transparent 1.6px),
    radial-gradient(circle at 88% 88%, #ffd6f2 1px, transparent 1.6px),
    linear-gradient(115deg, #1b0640, #2a0a4a 55%, #3a1178);
  background-repeat: no-repeat;
  border-bottom: 3px double #ff7ac8;
  box-shadow: inset 0 -26px 40px rgba(18, 11, 46, 0.35);
}
[data-theme="stardust"] .site-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 120' shape-rendering='crispEdges'%3E%3Cpath d='M12 84 L52 48 L96 64 L140 28 L188 52 L228 18' fill='none' stroke='%238ef0ff' stroke-width='1' stroke-dasharray='2 3' opacity='.55'/%3E%3Crect x='10' y='82' width='3' height='3' fill='%23ffffff'/%3E%3Crect x='50' y='46' width='3' height='3' fill='%23fff6a8'/%3E%3Crect x='94' y='62' width='3' height='3' fill='%23ffd6f2'/%3E%3Crect x='138' y='26' width='3' height='3' fill='%23ffffff'/%3E%3Crect x='186' y='50' width='3' height='3' fill='%239fe8ff'/%3E%3Crect x='226' y='16' width='3' height='3' fill='%23fff6a8'/%3E%3C/svg%3E") 38% 32% / 340px 170px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='1' width='2' height='14' fill='%23ffe98a'/%3E%3Crect x='1' y='7' width='14' height='2' fill='%23ffe98a'/%3E%3Crect x='5' y='5' width='6' height='6' fill='%23fff6a8'/%3E%3Crect x='7' y='7' width='2' height='2' fill='%23ffffff'/%3E%3C/svg%3E") 46% 70% / 18px 18px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='1' width='2' height='14' fill='%23ffe98a'/%3E%3Crect x='1' y='7' width='14' height='2' fill='%23ffe98a'/%3E%3Crect x='5' y='5' width='6' height='6' fill='%23fff6a8'/%3E%3Crect x='7' y='7' width='2' height='2' fill='%23ffffff'/%3E%3C/svg%3E") 60% 24% / 13px 13px no-repeat;
  opacity: 0.9;
}
[data-theme="stardust"] .banner-inner {
  position: relative;
  z-index: 1;
  filter: brightness(1.12) saturate(1.06);
}
.banner-inner {
  max-width: 1480px;
  margin: 0 auto;
  height: clamp(132px, 9.35vw, 176px);
  padding: 0 clamp(0.9rem, 3vw, 2.2rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.banner-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 0.45rem;
  min-width: 0;
}
.banner-kicker {
  font: 700 0.62rem/1.2 Verdana, Tahoma, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ff9dc4;
}
.banner-title {
  font: 700 clamp(1.15rem, 2vw, 1.75rem)/1.1 "Trebuchet MS", Verdana, sans-serif;
  color: #f6efff;
  text-shadow: 2px 2px 0 #000000;
}
.banner-title::before,
.banner-title::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 0.35rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='1' width='2' height='14' fill='%23ffe98a'/%3E%3Crect x='1' y='7' width='14' height='2' fill='%23ffe98a'/%3E%3Crect x='5' y='5' width='6' height='6' fill='%23fff6a8'/%3E%3Crect x='7' y='7' width='2' height='2' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  image-rendering: pixelated;
  vertical-align: -2px;
}
.banner-copy,
.banner-feature,
.banner-art { position: relative; z-index: 1; }
.banner-art {
  height: 100%;
  width: auto;
  flex: none;
  filter:
    drop-shadow(0 0 24px rgba(255, 95, 176, 0.35))
    drop-shadow(1px 0 0 rgba(255, 0, 90, 0.18))
    drop-shadow(-1px 0 0 rgba(0, 200, 255, 0.18));
}
.banner-feature {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 1 360px;
  min-width: 0;
  max-width: 360px;
  margin-bottom: 0.45rem;
  padding: 0.45rem 0.5rem;
  border: 2px solid #8f7bd6;
  background: rgba(18, 11, 46, 0.78);
  box-shadow: 3px 3px 0 #000000;
  color: #f6efff;
  text-decoration: none;
  animation: banner-feature-in 0.7s ease-out both;
}
.banner-feature:hover { border-color: #ffd0e8; color: #fff6a8; }
.banner-feature-cover {
  position: relative;
  width: 42px;
  height: 58px;
  flex: none;
  overflow: hidden;
  border: 2px solid #ffd0e8;
  background: #2a0a4a;
}
.banner-feature-cover img { width: 100%; height: 100%; object-fit: cover; }
.banner-feature-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: banner-cover-shine 7s ease-in-out infinite;
}
.banner-feature-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #ffd6f2;
  font-size: 0.9rem;
  font-weight: 800;
}
.banner-feature-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.banner-feature-kicker {
  font: 700 0.55rem/1.2 Verdana, Tahoma, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffe98a;
}
.banner-feature-title {
  font: 700 0.78rem/1.2 "Trebuchet MS", Verdana, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.banner-feature-meta {
  font: 400 0.62rem/1.35 Verdana, Tahoma, sans-serif;
  color: #ffd6f2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.banner-shoot {
  --shoot-color: #ff5fb0;
  --shoot-angle: 18deg;
  --shoot-dx: 640px;
  --shoot-dy: 210px;
  --shoot-duration: 6s;
  position: absolute;
  z-index: 0;
  width: 220px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--shoot-color) 20%, transparent) 25%,
    var(--shoot-color) 80%,
    #ffffff 100%
  );
  box-shadow:
    0 0 8px var(--shoot-color),
    0 0 18px color-mix(in srgb, var(--shoot-color) 65%, transparent);
  transform: rotate(var(--shoot-angle));
  opacity: 0;
  pointer-events: none;
  animation: banner-shoot var(--shoot-duration) cubic-bezier(0.7, 0, 0.95, 0.5) infinite;
}
.banner-shoot::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%) rotate(45deg);
  background: #ffffff;
  box-shadow:
    0 0 8px #ffffff,
    0 0 16px var(--shoot-color),
    0 0 26px var(--shoot-color);
}
.banner-shoot-a {
  top: 6%;
  left: 0%;
  --shoot-color: #ff5fb0;
  --shoot-angle: 12deg;
  --shoot-dx: 600px;
  --shoot-dy: 130px;
  --shoot-duration: 5.8s;
}
.banner-shoot-b {
  top: 2%;
  left: 18%;
  --shoot-color: #8ef0ff;
  --shoot-angle: 8deg;
  --shoot-dx: 500px;
  --shoot-dy: 70px;
  --shoot-duration: 7s;
  animation-delay: 2.2s;
}
.banner-shoot-c {
  top: 10%;
  left: 34%;
  --shoot-color: #ffd23c;
  --shoot-angle: 14deg;
  --shoot-dx: 520px;
  --shoot-dy: 130px;
  --shoot-duration: 5.2s;
  animation-delay: 4.4s;
}
.banner-shoot-d {
  top: 4%;
  left: 50%;
  --shoot-color: #b18cff;
  --shoot-angle: 10deg;
  --shoot-dx: 500px;
  --shoot-dy: 90px;
  --shoot-duration: 8s;
  animation-delay: 6.8s;
}
.banner-twinkle {
  position: absolute;
  z-index: 0;
  color: #ffd23c;
  font-size: 0.72rem;
  text-shadow:
    0 0 6px currentColor,
    0 0 12px currentColor;
  opacity: 0.25;
  pointer-events: none;
  animation: banner-twinkle 3.2s ease-in-out infinite;
}
.banner-twinkle-a { left: 24%; top: 22%; color: #ffd23c; }
.banner-twinkle-b {
  left: 46%;
  top: 56%;
  color: #8ef0ff;
  animation-delay: 1.4s;
}
.banner-twinkle-c {
  left: 34%;
  top: 38%;
  color: #ff9dc4;
  font-size: 0.62rem;
  animation-delay: 0.7s;
}
.banner-twinkle-d {
  left: 58%;
  top: 30%;
  color: #ffffff;
  font-size: 0.58rem;
  animation-delay: 2.1s;
}

@keyframes banner-feature-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes banner-cover-shine {
  0%, 80% { transform: translateX(-120%); }
  90%, 100% { transform: translateX(120%); }
}
@keyframes banner-shoot {
  0%, 80% { opacity: 0; transform: translate(0, 0) rotate(var(--shoot-angle)); }
  84% { opacity: 1; }
  96% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--shoot-dx), var(--shoot-dy)) rotate(var(--shoot-angle)); }
}
@keyframes banner-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); }
}
@media (prefers-reduced-motion: reduce) {
  .banner-feature,
  .banner-feature-cover::after,
  .banner-shoot,
  .banner-twinkle { animation: none !important; }
  .banner-shoot { display: none; }
}
@media (max-width: 900px) {
  .banner-feature { flex-basis: 300px; }
}
@media (max-width: 760px) {
  .banner-feature { display: none; }
}
@media (max-width: 640px) {
  [data-theme="stardust"] .site-banner { display: none; }
}



/* Data health */
.log-tail {
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* Company directory */
.company-toolbar { display: flex; flex-direction: column; gap: 0.65rem; }
.letter-index { display: flex; flex-wrap: wrap; gap: 0.15rem; }
.letter-index a, .letter-index span {
  min-width: 1.7rem; text-align: center; padding: 0.24rem 0.35rem;
  border: 1px solid transparent; border-radius: 6px;
  color: var(--muted); font-size: 0.78rem;
}
.letter-index a:hover { background: var(--panel-2); color: var(--text); }
.letter-index a.active {
  background: var(--accent-soft); color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.letter-index span.disabled { opacity: 0.3; }
.company-filters .tag-list { margin-top: 0.15rem; }
.tag.active {
  background: var(--accent-soft); color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.company-name { display: flex; align-items: center; gap: 0.55rem; min-width: 220px; }
.company-logo {
  width: 2rem; height: 2rem; flex: none; object-fit: cover;
  border-radius: 6px; background: var(--panel-2);
}
.company-logo.letter {
  display: grid; place-items: center; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line-soft);
}
.company-titles { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.78rem; }
.companies td { vertical-align: top; }

/* Company profile */
.company-about { display: flex; gap: 0.85rem; align-items: flex-start; }
.company-about-logo {
  width: 4rem; height: 4rem; flex: none; object-fit: cover;
  border-radius: 8px; background: var(--panel-2);
}
.company-about-body { min-width: 0; }
.company-facts {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
  font-size: 0.8rem; margin-bottom: 0.35rem;
}
.company-description {
  margin: 0.2rem 0 0.55rem; max-width: 80ch;
  color: var(--muted); font-size: 0.82rem; line-height: 1.55;
}

/* CRT monitor overlay (Stardust) */
.crt-overlay { display: none; }
[data-theme="stardust"] .crt-overlay {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.15) 0,
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(ellipse at center, transparent 68%, rgba(0, 0, 0, 0.22) 100%);
  animation: crt-flicker 7s linear infinite;
}
[data-theme="stardust"] .crt-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  box-shadow:
    inset 0 0 30px 8px rgba(0, 0, 0, 0.3),
    inset 0 0 16px rgba(120, 255, 220, 0.05);
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.035),
    transparent 30%,
    transparent 70%,
    rgba(255, 255, 255, 0.015)
  );
}
[data-theme="stardust"] .crt-rf {
  position: absolute;
  inset: -35% -12%;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.08) 0 1px,
      transparent 1px 12px
    ),
    repeating-linear-gradient(
      65deg,
      rgba(142, 240, 255, 0.06) 0 1px,
      transparent 1px 16px
    ),
    repeating-linear-gradient(
      155deg,
      rgba(255, 95, 176, 0.045) 0 1px,
      transparent 1px 21px
    );
  mix-blend-mode: screen;
  opacity: 0.82;
  animation: crt-rf-drift 14s linear infinite;
}
@keyframes crt-rf-drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 96px -72px, -64px 48px, 42px 84px; }
}
/* CRT treatment for the page background and decor, under the sticky header.
   It paints above the starfield and the side art but below .page and the
   footer, so cards, panels and text stay crisp. */
.crt-room { display: none; }
[data-theme="stardust"] .crt-room {
  display: block;
  position: fixed;
  top: var(--crt-room-top, 0);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.15) 0,
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.28) 100%);
  animation: crt-flicker 7s linear infinite;
}
.crt-hum { display: none; }
[data-theme="stardust"] .crt-hum {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}
[data-theme="stardust"] .crt-hum::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -150px;
  height: 150px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.025) 45%,
    rgba(255, 255, 255, 0.055) 50%,
    rgba(255, 255, 255, 0.025) 55%,
    transparent
  );
  animation: crt-hum-pass 16s linear infinite;
}
[data-theme="stardust"] .crt-room::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 90px 14px rgba(0, 0, 0, 0.26);
}
@keyframes crt-hum-pass {
  from { transform: translateY(0); }
  to { transform: translateY(calc(100vh + 150px)); }
}
@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  47% { opacity: 1; }
  48% { opacity: 0.96; }
  49% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  [data-theme="stardust"] .crt-overlay { animation: none; }
  [data-theme="stardust"] .crt-rf { animation: none; }
  [data-theme="stardust"] .crt-room { animation: none; }
  [data-theme="stardust"] .crt-hum { display: none; }
  [data-theme="stardust"] .crt-overlay::before {
    animation: none;
    display: none;
  }
}
@media print {
  .crt-overlay,
  .crt-room,
  .crt-hum { display: none !important; }
}

/* ---------------------------------------------------------------- accounts */
.account-menu { display: flex; align-items: center; gap: 0.4rem; }
.account-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.18rem 0.5rem 0.18rem 0.2rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2);
  max-width: 12rem;
}
.account-chip:hover { border-color: var(--accent); color: var(--text); }
.account-avatar {
  width: 1.55rem; height: 1.55rem; border-radius: 999px; object-fit: cover;
  background: var(--panel-3);
}
.account-avatar-text {
  display: inline-grid; place-items: center; font-size: 0.65rem;
  font-weight: 700; color: var(--accent); letter-spacing: 0.02em;
}
.account-name { font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-wrap { display: grid; place-items: center; padding: 2.2rem 0 1rem; }
.auth-card { width: min(420px, 100%); padding: 1.4rem; }
.auth-card h1 { margin: 0.15rem 0 0.3rem; font-size: 1.5rem; }
.auth-form { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1rem; }
.auth-form .field span { font-size: 0.78rem; color: var(--muted); }
.auth-form .field em { font-style: normal; }
.auth-form input {
  width: 100%; padding: 0.55rem 0.65rem; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel-2); color: var(--text); outline: none;
}
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-form .btn { margin-top: 0.25rem; }
.form-error {
  margin-top: 0.85rem; padding: 0.55rem 0.7rem; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line));
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--text); font-size: 0.82rem;
}
.auth-divider { display: flex; align-items: center; gap: 0.7rem; margin: 1.1rem 0; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-google { width: 100%; }
.auth-alt { margin: 1rem 0 0; font-size: 0.82rem; color: var(--muted); }
.auth-alt a { color: var(--accent); }

.kpis-account { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.account-sections { margin-top: 1rem; }
.kpis-account .kpi { display: block; }
.kpis-account .kpi:hover { border-color: var(--accent); }

.save-bar { display: flex; flex-direction: column; gap: 0.42rem; margin-top: 0.6rem; }
.save-form { display: flex; flex-direction: column; gap: 0.22rem; min-width: 0; }
.save-favorite { width: 100%; height: 1.8rem; font-size: 0.75rem; }
.save-label {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted-2);
}
.save-row { display: flex; align-items: center; gap: 0.3rem; min-width: 0; }
.save-row .select {
  flex: 1 1 auto; min-width: 0; width: auto;
  height: 1.8rem; padding: 0 0.4rem; font-size: 0.75rem;
}
.save-row > .btn {
  flex: 0 0 auto; height: 1.8rem; padding: 0 0.45rem; font-size: 0.72rem;
}
.stepper {
  flex: 1 1 auto; min-width: 0; display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr) 1.55rem;
  height: 1.8rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel-2); overflow: hidden;
}
.stepper button {
  border: 0; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 0.9rem; line-height: 1; padding: 0;
}
.stepper button:hover:not(:disabled) { background: var(--panel-3); color: var(--accent); }
.stepper button:disabled { opacity: 0.35; cursor: default; }
.stepper input {
  border: 0; background: transparent; color: var(--text);
  min-width: 0; width: 100%; padding: 0; text-align: center;
  font-size: 0.8rem; font-variant-numeric: tabular-nums; outline: none;
}
.stepper input:focus { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.set-btn {
  flex: 0 0 auto; height: 1.8rem; border: 0; background: transparent;
  color: var(--accent); font-size: 0.7rem; padding: 0 0.1rem; cursor: pointer;
}
.set-btn:hover { text-decoration: underline; }
.save-progress-meta {
  display: flex; justify-content: space-between; gap: 0.3rem;
  margin-top: 0.06rem; font-size: 0.66rem; color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.save-progress-track { height: 4px; max-width: none; margin-top: 0.06rem; }
.save-progress-track span {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}
.save-bar-guest { font-size: 0.82rem; }
.save-bar-guest a { color: var(--accent); }
.inline-form { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; }
.inline-form select {
  padding: 0.3rem 0.45rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel-2); color: var(--text); font-size: 0.75rem; outline: none;
}
.inline-form select:focus { border-color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: default; }

.track-list { display: flex; flex-direction: column; gap: 0.55rem; }
.track-row {
  display: flex; gap: 0.75rem; padding: 0.55rem; border-radius: 10px;
  border: 1px solid var(--line-soft); background: var(--panel-2);
}
.track-cover {
  position: relative; flex: 0 0 auto; width: 56px; height: 78px; border-radius: 7px;
  overflow: hidden; background: var(--panel-3);
}
.track-cover img { width: 100%; height: 100%; object-fit: cover; }
.track-cover .poster-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.track-body { min-width: 0; display: flex; flex-direction: column; gap: 0.28rem; flex: 1 1 auto; }
.track-title { font-weight: 600; font-size: 0.92rem; }
.track-title:hover { color: var(--accent); }
.track-meta { font-size: 0.76rem; color: var(--muted); }
.track-note {
  font-size: 0.74rem; color: var(--muted-2); line-height: 1.35;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.track-actions { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.15rem; }
.progress-track { height: 5px; border-radius: 999px; background: var(--panel-3); overflow: hidden; max-width: 420px; }
.progress-track span { display: block; height: 100%; background: var(--accent-2); }

.fav-block { margin-top: 0.9rem; }
.fav-block .filter-title { margin-bottom: 0.4rem; }
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 0.7rem; }
.fav-card {
  display: flex; flex-direction: column; gap: 0.3rem; min-width: 0;
  padding: 0.4rem; border: 1px solid var(--line-soft); border-radius: 10px;
  background: var(--panel-2); transition: border-color 0.15s ease;
}
.fav-card:hover { border-color: var(--accent); color: var(--text); }
.fav-cover {
  position: relative; aspect-ratio: 2 / 3; border-radius: 7px; overflow: hidden;
  background: var(--panel-3);
}
.fav-cover img { width: 100%; height: 100%; object-fit: cover; }
.fav-cover .poster-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.fav-title { font-size: 0.78rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fav-meta { font-size: 0.68rem; color: var(--muted-2); }
.empty-note { color: var(--muted); font-size: 0.82rem; padding: 0.4rem 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }

@media (max-width: 880px) {
  .kpis-account { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .account-name { display: none; }
  .track-cover { width: 46px; height: 64px; }
}

.head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.import-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0.8rem; align-items: start; }
.import-steps { margin: 0 0 0.8rem; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.86rem; }
.import-steps a { color: var(--accent); }
.notice {
  padding: 0.6rem 0.75rem; border-radius: 9px; font-size: 0.8rem;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  margin-bottom: 0.9rem;
}
.notice strong { color: var(--text); }
.import-form { display: flex; flex-direction: column; gap: 0.8rem; }
.import-form input[type="file"] {
  width: 100%; padding: 0.5rem; border: 1px dashed var(--line); border-radius: 9px;
  background: var(--panel-2); color: var(--muted); font-size: 0.8rem;
}
.mode-row { border: 1px solid var(--line-soft); border-radius: 9px; padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; }
.mode-row legend { padding: 0 0.25rem; }
.mode-option { display: flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; }
.mode-option input { accent-color: var(--accent); }
.kpis-import { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0.8rem; }
.import-unknown { margin-top: 0.8rem; font-size: 0.82rem; }
.import-unknown summary { cursor: pointer; color: var(--muted); }
.import-unknown ul { margin: 0.5rem 0 0.8rem; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.25rem; max-height: 18rem; overflow: auto; }
@media (max-width: 980px) {
  .import-layout { grid-template-columns: 1fr; }
  .kpis-import { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------- account overview */
.account-tabs {
  display: flex; gap: 0.25rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-soft); margin-bottom: 0.9rem;
}
.account-tabs a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.7rem; border-radius: 8px 8px 0 0;
  color: var(--muted); font-size: 0.85rem;
}
.account-tabs a:hover { background: var(--panel-2); color: var(--text); }
.account-tabs a.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }
.account-tabs .count {
  font-size: 0.68rem; color: var(--muted-2); background: var(--panel-3);
  border-radius: 999px; padding: 0.05rem 0.4rem;
}
.settings-layout {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.8rem; align-items: start; margin-top: 0.2rem;
}
.settings-stack { display: flex; flex-direction: column; gap: 0.8rem; }
.settings-identity {
  display: flex; align-items: center; gap: 0.7rem;
  padding-bottom: 0.7rem; margin-bottom: 0.7rem;
  border-bottom: 1px solid var(--line-soft);
}
.settings-avatar {
  width: 3rem; height: 3rem; flex: none; border-radius: 999px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--line); font-size: 0.95rem; font-weight: 700;
}
.settings-avatar img { width: 100%; height: 100%; object-fit: cover; }
.settings-avatar-link { margin-left: auto; flex: none; align-self: center; }
.avatar-picker-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem;
}
.avatar-picker-head .settings-identity {
  flex: 1 1 280px; margin: 0; padding: 0; border: 0;
}
.avatar-search { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.avatar-search .input { width: min(260px, 50vw); }
.avatar-sources { display: flex; gap: 0.3rem; flex-wrap: wrap; margin: 0 0 0.55rem; }
.avatar-sources a {
  padding: 0.35rem 0.65rem; border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-size: 0.8rem;
}
.avatar-sources a:hover { color: var(--text); border-color: var(--accent); }
.avatar-sources a.active {
  color: var(--text); background: var(--panel-2);
  border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent);
}
.avatar-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.5rem;
}
.avatar-choice {
  display: flex; flex-direction: column; align-items: center; gap: 0.28rem;
  padding: 0.42rem 0.3rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); color: var(--text); cursor: pointer;
  min-width: 0; font: inherit;
}
.avatar-choice:hover { border-color: var(--accent); }
.avatar-choice.is-current {
  border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft);
}
.avatar-choice img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  background: var(--panel-3); display: block;
}
.avatar-choice span {
  font-size: 0.68rem; line-height: 1.2; text-align: center;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
.avatar-actions {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  margin-top: 0.8rem; padding-top: 0.7rem;
  border-top: 1px solid var(--line-soft);
}
.settings-meta { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.settings-meta b { font-size: 0.98rem; }
.settings-meta span { color: var(--muted); font-size: 0.75rem; overflow-wrap: anywhere; }
.settings-form { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.6rem; }
.settings-form .field span { font-size: 0.72rem; color: var(--muted); }
.settings-rows { display: flex; flex-direction: column; }
.settings-row {
  display: flex; justify-content: space-between; gap: 0.8rem;
  padding: 0.42rem 0; font-size: 0.8rem;
  border-bottom: 1px solid var(--line-soft);
}
.settings-row:last-child { border-bottom: 0; }
.settings-row > span:first-child { color: var(--muted); flex: none; }
.settings-row > span:last-child { text-align: right; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
}
.account-links {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem; margin: 0.9rem 0;
}
.account-link {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.75rem 0.85rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel);
}
.account-link:hover { border-color: var(--accent); color: var(--text); }
.account-link-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.account-link-value { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.account-link-note { font-size: 0.75rem; color: var(--muted-2); }
.account-link-go { margin-top: 0.2rem; font-size: 0.75rem; color: var(--accent); }
.insight-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem; margin-bottom: 0.9rem;
}
.insight-lead {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem;
  margin: 0.15rem 0 0.65rem;
}
.insight-lead b {
  color: var(--accent); font-size: 1.55rem; line-height: 1;
  letter-spacing: -0.02em;
}
.insight-lead span { color: var(--muted); font-size: 0.74rem; line-height: 1.4; }
.insight-bars { display: flex; flex-direction: column; gap: 0.32rem; }
.insight-bar-row {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) 2.2rem;
  align-items: center; gap: 0.45rem;
  color: var(--muted); font-size: 0.7rem;
}
.insight-bar-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.insight-bar-row .bar { height: 0.35rem; }
.franchise-list { display: flex; flex-direction: column; gap: 0.35rem; }
.franchise-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 0.2rem 0.6rem; font-size: 0.74rem;
}
.franchise-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text);
}
.franchise-name:hover { color: var(--accent); }
.franchise-row .bar { grid-column: 1 / -1; height: 0.3rem; }
.bias-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.bias-title {
  color: var(--muted); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.3rem;
}
.bias-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: baseline; gap: 0.4rem;
  padding: 0.22rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: 0.72rem;
}
.bias-row:last-child { border-bottom: 0; }
.bias-kind {
  color: var(--muted-2); font-size: 0.56rem; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bias-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bias-value {
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.bias-value.up { color: var(--accent-2); }
.bias-value.down { color: var(--danger); }
.bias-row .num { color: var(--muted-2); text-align: right; }
.gem-list { display: flex; flex-direction: column; }
.gem-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.8rem; padding: 0.3rem 0;
  border-bottom: 1px solid var(--line-soft); font-size: 0.74rem;
}
.gem-row:last-child { border-bottom: 0; }
.gem-title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text);
}
.gem-row:hover .gem-title { color: var(--accent); }
.gem-row .num { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .insight-grid, .bias-columns { grid-template-columns: 1fr; }
}
.kpis-account6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.callout {
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
  border-radius: var(--radius); padding: 0.7rem 0.85rem;
  font-size: 0.85rem; margin: 0 0 0.9rem;
}
.tag-signature {
  margin: 0.2rem 0 1rem; padding: 0.95rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: linear-gradient(
    115deg,
    color-mix(in srgb, var(--accent) 16%, var(--panel)),
    var(--panel) 68%
  );
}
.tag-signature-kicker {
  color: var(--accent); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.tag-signature p {
  margin: 0.35rem 0 0; color: var(--text);
  font-size: 1rem; line-height: 1.5;
}
.tag-signature em {
  color: var(--accent); font-style: normal; font-weight: 700;
}
.index-badge {
  display: inline-block; padding: 0.02rem 0.4rem; border-radius: 999px;
  border: 1px solid var(--line); font-size: 0.72rem; font-variant-numeric: tabular-nums;
}
.index-badge.over { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line)); }
.index-badge.under { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.tag-index td:first-child { font-weight: 600; }
@media (max-width: 980px) {
  .kpis-account6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-links { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .kpis-account6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------ account lists */
.list-toolbar {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.list-toolbar .list-filter { flex: 1 1 220px; max-width: 340px; background: var(--panel); }
.list-sort { display: inline-flex; align-items: center; gap: 0.4rem; }
.list-sort .select { width: auto; padding: 0.35rem 0.5rem; font-size: 0.78rem; }
.list-toolbar-actions { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; flex-wrap: wrap; }

.list-panel { padding: 0; overflow: hidden; border-left-width: 3px; }
.list-panel .list-summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center; gap: 0.6rem;
  padding: 0.7rem 0.95rem; cursor: pointer; list-style: none;
  user-select: none;
}
.list-summary::-webkit-details-marker { display: none; }
.list-summary:hover { background: color-mix(in srgb, var(--panel-2) 65%, transparent); }
.list-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.list-title { font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em; }
.list-count {
  font-size: 0.72rem; font-variant-numeric: tabular-nums;
  padding: 0.05rem 0.45rem; border-radius: 999px;
  background: var(--panel-3); color: var(--muted);
}
.list-note { font-size: 0.72rem; color: var(--muted-2); }
.list-chev {
  width: 0.5rem; height: 0.5rem; margin-right: 0.15rem;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.15s ease;
}
details[open] > .list-summary .list-chev { transform: rotate(225deg); }
details[open] > .list-summary { border-bottom: 1px solid var(--line-soft); }
.list-panel > .track-grid, .list-panel > .empty-note { padding: 0.8rem 0.95rem; }
.track-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.track-grid .track-row { height: 100%; }
.track-row[hidden] { display: none; }

.list-panel.status-watching { border-left-color: var(--accent-2); }
.list-panel.status-completed { border-left-color: var(--accent); }
.list-panel.status-planned { border-left-color: #8ea6ff; }
.list-panel.status-on_hold { border-left-color: var(--warn); }
.list-panel.status-dropped { border-left-color: var(--danger); }
.list-panel.status-watching .list-title { color: var(--accent-2); }
.list-panel.status-dropped .list-title { color: var(--danger); }

@media (max-width: 1180px) {
  .track-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .list-toolbar-actions { margin-left: 0; }
  .list-summary { grid-template-columns: minmax(0, 1fr) auto auto; }
  .list-note { display: none; }
}

.save-progress-track span.is-updated { animation: save-pulse 0.45s ease; }
@keyframes save-pulse {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.7); }
  100% { filter: brightness(1); }
}
.fx-canvas {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 90;
}

.save-progress.is-celebrating { animation: save-celebrate 1.25s ease; }
@keyframes save-celebrate {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  35% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 16%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.panel-tools { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.toggle {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; color: var(--muted); cursor: pointer;
}
.toggle input { accent-color: var(--accent); }
.tag-index tr[hidden] { display: none; }

.status-panel { margin-bottom: 0.9rem; }
.status-breakdown tfoot td {
  font-weight: 600; border-top: 1px solid var(--line);
  padding-top: 0.45rem;
}
.status-dot {
  display: inline-block; width: 0.5rem; height: 0.5rem;
  border-radius: 999px; margin-right: 0.4rem; vertical-align: middle;
  background: var(--muted-2);
}
.status-dot.status-watching { background: var(--accent-2); }
.status-dot.status-completed { background: var(--accent); }
.status-dot.status-on_hold { background: var(--warn); }
.status-dot.status-dropped { background: var(--danger); }
.status-dot.status-planned { background: #8ea6ff; }
.status-breakdown td a { display: inline-flex; align-items: center; }

.activity-panel { margin-bottom: 0.9rem; }
.activity-feed { list-style: none; margin: 0; padding: 0; }
.activity-feed li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.6rem; align-items: baseline; padding: 0.42rem 0;
  border-bottom: 1px solid var(--line-soft); font-size: 0.82rem;
}
.activity-feed li:last-child { border-bottom: 0; }
.activity-dot {
  width: 0.45rem; height: 0.45rem; border-radius: 999px;
  background: var(--muted-2); align-self: center;
}
.activity-dot.activity-status { background: var(--accent-2); }
.activity-dot.activity-progress { background: var(--accent); }
.activity-dot.activity-favorite { background: var(--warn); }
.activity-dot.activity-score { background: #8ea6ff; }
.activity-text a { font-weight: 600; }
.activity-feed time { color: var(--muted-2); font-size: 0.72rem; white-space: nowrap; }
.save-updated { margin: 0.1rem 0 0; }

.view-switch {
  display: inline-flex; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden;
}
.view-btn {
  border: 0; background: transparent; color: var(--muted);
  font-size: 0.72rem; padding: 0.28rem 0.55rem; cursor: pointer;
}
.view-btn:hover { color: var(--text); }
.view-btn.is-active { background: var(--panel-3); color: var(--text); }
.activity-timeline { overflow-x: auto; padding: 0.9rem 0.15rem 1rem; }
.activity-timeline[hidden] { display: none; }
.timeline-track {
  list-style: none; display: flex; gap: 0.8rem; margin: 0;
  padding: 0 0 0.5rem; position: relative;
}
.timeline-track::before {
  content: ""; position: absolute; top: 0.62rem; left: 0; right: 0;
  height: 2px; background: var(--line);
}
.timeline-item { position: relative; flex: 0 0 124px; padding-top: 1.35rem; }
.timeline-item::before {
  content: ""; position: absolute; top: 0.45rem; left: 50%;
  margin-left: -0.25rem; width: 0.5rem; height: 0.5rem;
  border-radius: 999px; background: var(--accent);
  box-shadow: 0 0 0 3px var(--panel);
}
.timeline-item.activity-status::before { background: var(--accent-2); }
.timeline-item.activity-favorite::before { background: var(--warn); }
.timeline-item.activity-score::before { background: #8ea6ff; }
.timeline-card { display: flex; flex-direction: column; gap: 0.2rem; height: 100%; }
.timeline-cover {
  position: relative; width: 100%; aspect-ratio: 2 / 3;
  border-radius: 8px; overflow: hidden; background: var(--panel-3);
  border: 1px solid var(--line-soft);
}
.timeline-cover img { width: 100%; height: 100%; object-fit: cover; }
.timeline-cover .poster-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 700; color: var(--muted);
}
.timeline-title {
  font-size: 0.74rem; line-height: 1.25; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.timeline-action {
  font-size: 0.68rem; color: var(--muted); overflow-wrap: anywhere;
}
.timeline-card time { margin-top: auto; font-size: 0.66rem; color: var(--muted-2); }

.watch-timeline-panel { margin-bottom: 1.2rem; }
.timeline-legend {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  font-size: 0.7rem; color: var(--muted);
}
.timeline-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.tl-dot { width: 0.55rem; height: 0.55rem; border-radius: 999px; display: inline-block; }
.tl-completed { background: #65d0c2; }
.tl-watching { background: #f0a35e; }
.tl-dropped { background: #e4717f; }
.tl-on_hold { background: #e4c56f; }

.watch-view[hidden] { display: none; }
.watch-view-note { margin: 0.5rem 0 0; }

.yearbook-year { margin-bottom: 0.95rem; }
.yearbook-year:last-child { margin-bottom: 0; }
.yearbook-head { display: flex; align-items: baseline; gap: 0.6rem; }
.yearbook-head h3 { margin: 0; font-size: 1.05rem; letter-spacing: -0.01em; }
.yearbook-season {
  color: var(--accent); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.yearbook-head span { color: var(--muted); font-size: 0.7rem; }
.yearbook-track {
  position: relative; margin-top: 0.35rem;
  border-top: 1px solid var(--line-soft);
  overflow-x: clip;
}
.yearbook-rail {
  position: absolute; left: 0; right: 0; top: 16px;
  height: 2px; background: var(--line);
}
.yearbook-months {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  color: var(--muted-2); font-size: 0.62rem; text-align: left;
}
.yearbook-months span { padding-left: 0.35rem; }
.yearbook-poster {
  position: absolute; width: 40px; height: 58px; border-radius: 4px;
  background: var(--panel-3); border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transform: translateX(-20px); transition: transform 0.12s ease;
}
.yearbook-poster::before {
  content: ""; position: absolute; left: 50%; top: -10px;
  width: 1px; height: 10px; background: var(--line);
}
.yearbook-poster img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.yearbook-poster .poster-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 0.48rem; font-weight: 700; color: var(--muted);
}
.yearbook-poster.status-completed { border-color: color-mix(in srgb, #65d0c2 55%, var(--line)); }
.yearbook-poster.status-watching { border-color: color-mix(in srgb, #f0a35e 60%, var(--line)); }
.yearbook-poster.status-dropped { border-color: color-mix(in srgb, #e4717f 60%, var(--line)); }
.yearbook-poster.status-on_hold { border-color: color-mix(in srgb, #e4c56f 60%, var(--line)); }
.yearbook-poster:hover { transform: translateX(-20px) translateY(-2px); z-index: 6; }
.yearbook-preview {
  position: fixed; z-index: 100; width: 176px; padding: 8px;
  background: var(--panel-3); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 16px 46px rgba(0, 0, 0, 0.5);
  pointer-events: none; animation: yb-pop 0.12s ease;
}
.yearbook-preview[hidden] { display: none; }
.yp-cover {
  width: 100%; aspect-ratio: 2 / 3; border-radius: 7px;
  overflow: hidden; background: var(--panel-2);
}
.yp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yp-fallback {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-size: 1.6rem; font-weight: 700; color: var(--muted);
}
.yp-body {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 7px; font-size: 0.72rem; line-height: 1.35;
  color: var(--muted); overflow-wrap: anywhere;
}
.yp-body b { color: var(--text); font-size: 0.82rem; line-height: 1.25; }
@keyframes yb-pop {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
}
@media (prefers-reduced-motion: reduce) {
  .yearbook-preview { animation: none; }
}

.pulse-focus {
  margin-top: 0.55rem; padding-top: 0.6rem;
  border-top: 1px solid var(--line-soft);
}
.pulse-focus-head { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.45rem; }
.pulse-focus-head b { font-size: 1rem; }
.pulse-focus-head span { color: var(--muted); font-size: 0.72rem; }
.pulse-focus-strip { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.35rem; }
.pulse-cover {
  position: relative; flex: 0 0 38px; width: 38px; height: 54px;
  border-radius: 5px; overflow: hidden; background: var(--panel-3);
  border: 1px solid var(--line);
}
.pulse-cover img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.pulse-cover .poster-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 0.62rem; font-weight: 700; color: var(--muted);
}
.pulse-cover.status-completed { border-color: color-mix(in srgb, #65d0c2 55%, var(--line)); }
.pulse-cover.status-watching { border-color: color-mix(in srgb, #f0a35e 60%, var(--line)); }
.pulse-cover.status-dropped { border-color: color-mix(in srgb, #e4717f 60%, var(--line)); }
.pulse-cover.status-on_hold { border-color: color-mix(in srgb, #e4c56f 60%, var(--line)); }


/* Stardust scrollbars use a deeper purple than the pink accent. */
[data-theme="stardust"] { scrollbar-color: #4b2d8f #1a1040; }
[data-theme="stardust"] * { scrollbar-color: #4b2d8f #1a1040; }
[data-theme="stardust"] *::-webkit-scrollbar-track { background: #1a1040; }
[data-theme="stardust"] *::-webkit-scrollbar-thumb {
  background: #4b2d8f; border-color: #1a1040;
}
[data-theme="stardust"] *::-webkit-scrollbar-thumb:hover { background: #6a4bb8; }
[data-theme="stardust"] *::-webkit-scrollbar-thumb:active { background: #8e7ad6; }
[data-theme="stardust"] *::-webkit-scrollbar-corner { background: #1a1040; }
[data-theme="stardust"] .filters { scrollbar-color: #5b3fa0 #241552; }
[data-theme="stardust"] .filters::-webkit-scrollbar-track { background: #241552; }
[data-theme="stardust"] .filters::-webkit-scrollbar-thumb {
  background: #5b3fa0; border-color: #241552;
}
[data-theme="stardust"] .filters::-webkit-scrollbar-thumb:hover { background: #7a63c0; }
[data-theme="stardust"] .filters::-webkit-scrollbar-thumb:active { background: #9b87e0; }
[data-theme="stardust"] .filter-options-scroll { scrollbar-color: #5b3fa0 #241552; }
[data-theme="stardust"] .filter-options-scroll::-webkit-scrollbar-track { background: #241552; }
[data-theme="stardust"] .filter-options-scroll::-webkit-scrollbar-thumb {
  background: #5b3fa0; border-color: #241552;
}
[data-theme="stardust"] .filter-options-scroll::-webkit-scrollbar-thumb:hover {
  background: #7a63c0;
}
[data-theme="stardust"] .filter-options-scroll::-webkit-scrollbar-thumb:active {
  background: #9b87e0;
}
