/* ============================================
   歪歪漫画中文站共享样式 · /assets/site.css
   设计系统：漫画目录墙 / 印刷三色 / 粗野主义边框
   ============================================ */

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
}

img, picture, svg, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-ink);
}

h1 { font-size: clamp(32px, 5vw, 48px); }
h2 { font-size: clamp(26px, 3.6vw, 34px); }
h3 { font-size: 22px; }
h4 { font-size: 18px; }

p { margin-bottom: 12px; }
strong { font-weight: 800; }
.text-muted { color: #666; }

:focus-visible {
  outline: 3px solid var(--c-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--c-tag-y);
  color: var(--c-ink);
}

/* ---------- Design Tokens ---------- */
:root {
  --c-bg: #F7F3E8;
  --c-panel: #FFFFFF;
  --c-ink: #1A1A1A;
  --c-text: #1A1A1A;
  --c-white: #FFFFFF;

  --c-accent: #FF4D6D;
  --c-blue: #00D4FF;

  --c-sci: #2E2B5F;
  --c-romance: #FFE5EC;
  --c-adventure: #D9F2D4;

  --c-new: #00CC88;
  --c-ongoing: #FF9F1C;
  --c-done: #8D99AE;

  --c-tag-y: #FFE066;
  --c-tag-p: #FFB6C1;
  --c-tag-g: #77C987;
  --c-tag-b: #59A5FF;

  --border-w: 3px;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 6px 6px 0 var(--c-ink);
  --shadow-sm: 4px 4px 0 var(--c-ink);

  --font-head: "ZCOOL KuaiLe", "YouYuan", "幼圆", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --container: 1200px;
}

/* ---------- Layout Helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.main-content {
  min-height: 60vh;
}

.content-wrap {
  padding-block: 24px 72px;
}

.section {
  margin-block: 32px;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--c-accent);
  color: var(--c-ink);
  font-weight: 800;
  padding: 10px 18px;
  border: 3px solid var(--c-ink);
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-weight: 800;
  font-size: 15px;
  border: 3px solid var(--c-ink);
  border-radius: var(--radius-sm);
  background: var(--c-tag-y);
  color: var(--c-ink);
  box-shadow: 4px 4px 0 var(--c-ink);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--c-ink);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--c-ink);
}

.btn--primary { background: var(--c-accent); color: var(--c-ink); }
.btn--blue { background: var(--c-blue); color: var(--c-ink); }
.btn--dark { background: var(--c-ink); color: var(--c-white); }
.btn--ghost { background: transparent; border-width: 2px; box-shadow: none; }
.btn--ghost:hover { background: var(--c-tag-y); box-shadow: none; transform: none; }
.btn--sm { padding: 5px 12px; font-size: 13px; border-width: 2px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 18px 0 4px;
  font-size: 14px;
  color: #666;
}

.breadcrumb a {
  font-weight: 700;
  color: var(--c-ink);
}

.breadcrumb a:hover {
  color: var(--c-accent);
}

.breadcrumb .sep {
  color: #999;
}

.breadcrumb [aria-current="page"] {
  color: var(--c-accent);
  font-weight: 800;
}

/* ---------- Page Hero / Section Head ---------- */
.page-hero {
  padding-block: 34px 10px;
}

.page-title {
  margin-top: 8px;
}

.page-lede {
  max-width: 720px;
  font-size: 16px;
  color: #444;
  margin-top: 8px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--c-accent);
}

.kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--c-accent);
  border: 2px solid var(--c-ink);
  border-radius: 2px;
  transform: rotate(45deg);
  flex: none;
}

.section-head {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 44px 0 20px;
}

.section-no {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: var(--c-accent);
  -webkit-text-stroke: 1.5px var(--c-ink);
}

.section-title {
  font-size: clamp(24px, 3vw, 32px);
}

.section-count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: #666;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.section-count b {
  color: var(--c-accent);
  font-size: 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  background: var(--c-ink);
  color: var(--c-white);
}

.header-frame {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.brand-flag {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.3;
  background: var(--c-tag-y);
  color: var(--c-ink);
  border: 2px solid var(--c-ink);
  border-radius: 8px 3px 8px 3px;
  padding: 2px 9px;
  box-shadow: 3px 3px 0 var(--c-tag-p);
  transform: rotate(-2deg);
}

.brand-name {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  color: var(--c-white);
}

.brand-index {
  display: none;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .22em;
  color: var(--c-blue);
  border: 2px solid var(--c-blue);
  border-radius: 4px;
  padding: 2px 5px;
  transform: translateY(-2px);
}

@media (min-width: 861px) {
  .brand-index {
    display: inline-flex;
  }
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  max-width: 380px;
  margin-left: auto;
  background: var(--c-white);
  border: 3px solid var(--c-ink);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .3);
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 6px 0;
  font-size: 14px;
  color: var(--c-ink);
}

.header-search input::placeholder {
  color: #8A8578;
}

.header-search input:focus {
  outline: none;
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.header-search:focus-within {
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .3), 0 0 0 4px rgba(0, 212, 255, .5);
}

.search-mark {
  width: 14px;
  height: 14px;
  border: 3px solid var(--c-ink);
  border-radius: 50%;
  position: relative;
  flex: none;
}

.search-mark::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--c-ink);
  left: 9px;
  top: 9px;
  transform: rotate(45deg);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  background: var(--c-accent);
  color: var(--c-ink);
  border: 3px solid var(--c-ink);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 3px 3px 0 var(--c-tag-y);
}

.nav-toggle-box {
  display: grid;
  width: 20px;
  gap: 3px;
}

.nav-toggle-bar {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .18s, opacity .18s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle-label {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .05em;
}

.site-nav {
  background: var(--c-ink);
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
}

.nav-list li {
  --c-nav-color: var(--c-white);
}

.nav-list li:nth-child(1) { --c-nav-color: var(--c-blue); }
.nav-list li:nth-child(2) { --c-nav-color: var(--c-accent); }
.nav-list li:nth-child(3) { --c-nav-color: var(--c-tag-y); }
.nav-list li:nth-child(4) { --c-nav-color: var(--c-new); }
.nav-list li:nth-child(5) { --c-nav-color: var(--c-tag-b); }
.nav-list li:nth-child(6) { --c-nav-color: var(--c-tag-p); }

.nav-list a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 20px;
  color: var(--c-white);
  font-weight: 700;
  font-size: 15px;
  border-right: 1px solid rgba(255, 255, 255, .18);
  transition: background .15s, color .15s;
}

.nav-list li:first-child a {
  border-left: 1px solid rgba(255, 255, 255, .18);
}

.nav-list li:last-child a {
  border-right: none;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 7px;
  height: 3px;
  background: var(--c-nav-color);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--c-nav-color);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  transform: scaleX(1);
}

.nav-list a[aria-current="page"] {
  background: var(--c-tag-y);
  color: var(--c-ink);
  font-weight: 900;
}

.nav-list a[aria-current="page"]::after {
  background: var(--c-accent);
  transform: scaleX(1);
}

.nav-list a[aria-current="page"]:hover {
  color: var(--c-ink);
}

/* ---------- CMYK Registration Strip ---------- */
.cmyk-strip {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr 2fr;
  height: 10px;
}

.cmyk-strip i {
  display: block;
  font-style: normal;
}

.cmyk-c {
  background: var(--c-blue);
}

.cmyk-m {
  background: var(--c-accent);
  border-left: 2px solid var(--c-white);
}

.cmyk-y {
  background: var(--c-tag-y);
  border-left: 2px solid var(--c-white);
}

.cmyk-k {
  background: repeating-linear-gradient(45deg, var(--c-ink) 0 5px, #666 5px 10px);
  border-left: 2px solid var(--c-white);
}

/* ---------- Footer & Back Top ---------- */
.site-footer {
  margin-top: 72px;
  background: var(--c-ink);
  color: var(--c-white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 36px;
  padding-block: 44px 28px;
}

.brand--footer .brand-flag {
  font-size: 22px;
  box-shadow: 3px 3px 0 rgba(255, 255, 255, .4);
}

.brand--footer .brand-name {
  font-size: 21px;
}

.footer-slogan {
  margin: 14px 0 12px;
  font-size: 14px;
  color: #AAB;
}

.footer-mininav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-mininav a {
  display: inline-flex;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-white);
  transition: border-color .15s, background .15s;
}

.footer-mininav a:hover {
  border-color: var(--c-tag-y);
  background: var(--c-tag-y);
  color: var(--c-ink);
}

.footer-title {
  font-family: var(--font-head);
  font-size: 17px;
  color: var(--c-white);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-accent);
  max-width: max-content;
}

.footer-col ul li {
  margin-bottom: 9px;
}

.footer-col a {
  font-size: 14px;
  color: #cfd8e0;
  transition: color .12s, padding-left .12s;
}

.footer-col a:hover {
  color: var(--c-blue);
  padding-left: 4px;
}

.footer-contact a {
  font-weight: 800;
  color: var(--c-white);
}

.footer-contact a:hover {
  color: var(--c-blue);
}

.contact-line {
  font-size: 14px;
  color: #AAB;
  line-height: 1.5;
  margin-bottom: 9px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  padding-block: 18px 26px;
  font-size: 13px;
  color: #8B95A1;
}

.footer-icp {
  letter-spacing: .05em;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 120;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 56px;
  min-height: 56px;
  padding: 8px 10px;
  background: var(--c-accent);
  color: var(--c-ink);
  border: 3px solid var(--c-ink);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  box-shadow: 4px 4px 0 var(--c-ink);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .2s ease, transform .2s ease, background .2s;
}

.back-top[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-top:hover,
.back-top:focus-visible {
  background: var(--c-tag-y);
}

.back-top-arrow {
  font-size: 22px;
  line-height: 1;
}

.back-top-text {
  font-size: 12px;
  font-weight: 900;
}

/* ---------- Panels (Directory Walls) ---------- */
.panel {
  position: relative;
  border: 3px solid var(--c-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 24px 32px;
  background: var(--c-panel);
}

.panel--sci {
  background: var(--c-sci);
  color: var(--c-white);
}

.panel--romance {
  background: var(--c-romance);
  color: var(--c-ink);
}

.panel--adventure {
  background: var(--c-adventure);
  color: var(--c-ink);
}

.panel--sci .panel-title,
.panel--sci h2,
.panel--sci h3 {
  color: var(--c-white);
}

.panel::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  height: 6px;
  border-radius: 999px;
  background: var(--c-ink);
  opacity: .16;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.panel-title {
  font-size: 26px;
  line-height: 1.2;
}

.panel-count {
  font-size: 12px;
  font-weight: 900;
  color: var(--c-white);
  background: var(--c-ink);
  border-radius: 999px;
  padding: 2px 10px;
  border: 2px solid var(--c-ink);
}

.panel--romance .panel-count,
.panel--adventure .panel-count {
  background: var(--c-white);
  color: var(--c-ink);
}

/* ---------- Card Grid & Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--c-panel);
  border: 3px solid var(--c-ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--c-ink);
}

.card--y { border-top: 8px solid var(--c-tag-y); }
.card--p { border-top: 8px solid var(--c-tag-p); }
.card--g { border-top: 8px solid var(--c-tag-g); }
.card--b { border-top: 8px solid var(--c-tag-b); }
.card--accent { border-top: 8px solid var(--c-accent); }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  flex: 1;
}

.card-title {
  font-size: 19px;
  line-height: 1.25;
}

.card-meta {
  font-size: 13px;
  color: #555;
}

.card-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

/* ---------- Cover Placeholders ---------- */
.card-cover,
.cover-place {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-bottom: 3px solid var(--c-ink);
}

.cover-place {
  --cv-a: var(--c-tag-y);
  --cv-b: #F5A623;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 24% 30%, rgba(255, 255, 255, .3) 0 11%, transparent 12%),
    radial-gradient(circle at 76% 70%, rgba(255, 255, 255, .22) 0 8%, transparent 9%),
    radial-gradient(circle at 66% 24%, rgba(255, 255, 255, .15) 0 6%, transparent 7%),
    linear-gradient(135deg, var(--cv-a) 0%, var(--cv-b) 100%);
}

.cover-place::before {
  content: "封面图位";
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .22em;
  color: rgba(26, 26, 26, .6);
  border: 2px dashed rgba(26, 26, 26, .45);
  border-radius: 6px;
  padding: 8px 12px;
  position: relative;
  z-index: 1;
}

.cover-place::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, transparent 0 16px, rgba(255, 255, 255, .14) 16px 17px);
}

.cover-place--y { --cv-a: var(--c-tag-y); --cv-b: #F5A623; }
.cover-place--p { --cv-a: var(--c-tag-p); --cv-b: #FF7B96; }
.cover-place--g { --cv-a: #9DE8B2; --cv-b: var(--c-new); }
.cover-place--b { --cv-a: var(--c-tag-b); --cv-b: #3D5A80; }
.cover-place--sci { --cv-a: var(--c-sci); --cv-b: #5361C4; }

.cover-place--sci::before {
  color: rgba(255, 255, 255, .7);
  border-color: rgba(255, 255, 255, .6);
}

.cover-place--sci::after {
  background: repeating-linear-gradient(-45deg, transparent 0 16px, rgba(255, 255, 255, .08) 16px 17px);
}

.card-cover .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

/* ---------- Tiles & Stat Blocks ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 22px 12px;
  text-align: center;
  background: var(--c-tag-y);
  border: 3px solid var(--c-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease;
}

.tile:hover {
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 6px 6px 0 var(--c-ink);
}

.tile--p { background: var(--c-tag-p); }
.tile--g { background: var(--c-tag-g); }
.tile--b { background: var(--c-tag-b); }
.tile--orange { background: var(--c-ongoing); }
.tile--ink { background: var(--c-ink); color: var(--c-white); }

.tile-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.tile-count {
  font-size: 12px;
  font-weight: 700;
  opacity: .85;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 18px 12px;
  background: var(--c-ink);
  color: var(--c-white);
  border: 3px solid var(--c-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat-num {
  font-family: var(--font-head);
  font-size: 34px;
  line-height: 1.1;
  color: var(--c-tag-y);
}

.stat-label {
  font-size: 13px;
  font-weight: 700;
  color: #cfd8e0;
}

/* ---------- Row List (Playlist) ---------- */
.row-list {
  background: var(--c-panel);
  border: 3px solid var(--c-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.row-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--c-panel);
  border-bottom: 2px dashed #D8D2C6;
}

.row-item:last-child {
  border-bottom: 0;
}

.row-item:nth-child(even) {
  background: #FFF9EE;
}

.row-item:hover {
  background: #E9F6FF;
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-title {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.4;
}

.row-sub {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}

.row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.seq-num {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  min-width: 2.2em;
  text-align: center;
  color: var(--c-accent);
  -webkit-text-stroke: 1px var(--c-ink);
  flex: none;
}

.seq-num--line {
  color: transparent;
}

/* ---------- Tags & Badges ---------- */
.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  background: var(--c-tag-y);
  color: var(--c-ink);
  transition: background .12s, transform .12s;
}

.tag:hover {
  transform: translateY(-1px);
}

.tag--p { background: var(--c-tag-p); }
.tag--g { background: var(--c-tag-g); }
.tag--b { background: var(--c-tag-b); }
.tag--line { background: transparent; }
.tag--line:hover { background: var(--c-tag-y); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
  padding: 2px 10px;
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  background: var(--c-done);
  color: var(--c-ink);
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge--new { background: var(--c-new); }
.badge--ongoing { background: var(--c-ongoing); }
.badge--done { background: var(--c-done); }
.badge--hot { background: var(--c-accent); }
.badge--corner {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

/* ---------- Meters & Index Bar ---------- */
.meter {
  height: 10px;
  min-width: 90px;
  background: #E6DFD1;
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  overflow: hidden;
}

.meter-fill {
  display: block;
  height: 100%;
  width: 50%;
  background: var(--c-ongoing);
  border-radius: 999px;
  transition: width .3s ease;
}

.meter--new .meter-fill { background: var(--c-new); }
.meter--done .meter-fill { background: var(--c-done); }
.meter--accent .meter-fill { background: var(--c-accent); }
.meter--blue .meter-fill { background: var(--c-blue); }

.index-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
  background: var(--c-panel);
  border: 3px solid var(--c-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.index-link {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--c-ink);
  background: var(--c-bg);
  border: 2px solid var(--c-ink);
  border-radius: 6px;
  transition: background .12s, transform .12s;
}

.index-link:hover {
  background: var(--c-blue);
  transform: translateY(-1px);
}

.index-link.is-active,
.index-link[aria-current="true"] {
  background: var(--c-accent);
}

.page-note {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: #666;
}

.page-note b {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: var(--c-tag-y);
  color: var(--c-ink);
  border: 2px solid var(--c-ink);
  border-radius: 4px;
  padding: 0 4px;
}

/* ---------- Horizontal Rail ---------- */
.rail {
  position: relative;
}

.rail-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.rail-track::-webkit-scrollbar {
  height: 8px;
}

.rail-track::-webkit-scrollbar-thumb {
  background: var(--c-ink);
  border-radius: 999px;
}

.rail-track::-webkit-scrollbar-track {
  background: #E2DBCB;
  border-radius: 999px;
}

.rail-item {
  flex: 0 0 180px;
  min-width: 0;
  scroll-snap-align: start;
}

.rail-item .card {
  height: 100%;
}

/* ---------- Schedule Table ---------- */
.sched {
  background: var(--c-panel);
  border: 3px solid var(--c-ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sched-head,
.sched-row {
  display: grid;
  grid-template-columns: 76px 1fr 130px 84px;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 16px;
}

.sched-head {
  background: var(--c-ink);
  color: var(--c-white);
  font-weight: 800;
  font-size: 14px;
  border-bottom: 2px solid var(--c-tag-y);
}

.sched-row {
  font-size: 14px;
  border-bottom: 1px dashed #D8D2C6;
}

.sched-row:last-child {
  border-bottom: 0;
}

.sched-row:nth-child(even) {
  background: #FFFBEF;
}

.sched-day {
  font-weight: 800;
}

.sched-title {
  font-weight: 700;
}

.sched-ep {
  color: var(--c-ongoing);
  font-weight: 800;
}

.sched-status {
  font-size: 13px;
  text-align: right;
}

/* ---------- Hero Collage Base ---------- */
.hero-tiles {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.hero-col-3 { grid-column: span 3; }
.hero-col-4 { grid-column: span 4; }
.hero-col-6 { grid-column: span 6; }
.hero-col-8 { grid-column: span 8; }
.hero-col-9 { grid-column: span 9; }
.hero-col-12 { grid-column: span 12; }

/* ---------- Reveal ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease-out, transform .5s ease-out;
}

html.js [data-reveal][data-revealed] {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brandcol {
    grid-column: span 2;
  }

  .hero-tiles {
    gap: 12px;
  }
}

@media (max-width: 860px) {
  .header-frame {
    gap: 12px;
  }

  .brand {
    margin-right: auto;
  }

  .brand-index {
    display: none;
  }

  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--c-ink);
    border-top: 0;
    box-shadow: 0 20px 28px rgba(0, 0, 0, .35);
  }

  .site-nav[data-open] {
    display: block;
  }

  .site-nav .container {
    padding-inline: 0;
  }

  .nav-list {
    flex-direction: column;
    padding-block: 6px;
  }

  .nav-list a,
  .nav-list li:first-child a {
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    padding: 14px 22px;
  }

  .nav-list li:last-child a {
    border-bottom: 0;
  }

  .nav-list a::after {
    display: none;
  }

  .hero-col-3,
  .hero-col-4,
  .hero-col-6,
  .hero-col-8,
  .hero-col-9,
  .hero-col-12 {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: 14px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brandcol {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }

  .tile-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .row-item {
    flex-wrap: wrap;
    gap: 10px;
  }

  .row-meta {
    justify-content: flex-start;
    width: 100%;
  }

  .panel {
    padding: 20px 16px 28px;
  }

  .sched-head,
  .sched-row {
    grid-template-columns: 56px 1fr 78px;
    padding: 10px 12px;
    font-size: 13px;
    gap: 6px 8px;
  }

  .sched-status {
    display: none;
  }

  .back-top {
    right: 14px;
    bottom: 18px;
    min-width: 48px;
    min-height: 48px;
  }

  .back-top-text {
    display: none;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
