/* ==========================================================================
   羞羞动漫 · 基础样式层 (toolkit)
   仅包含：设计令牌 / 复位 / 排版基线 / 通用工具类 / 响应式栅格
   页面级视觉一律写在各页 <style> 中，不在此复用整页样式。
   ========================================================================== */

/* --- 1. 设计令牌 --------------------------------------------------------- */
:root {
  --sakura: #ff8fbb;
  --sakura-mid: #ffb3ce;
  --sakura-soft: #ffe4ef;
  --sky: #93b9ff;
  --sky-soft: #e5efff;
  --peri: #b9a8ff;
  --peri-soft: #ece7ff;
  --peach: #ffd79a;
  --mint: #9fe3d0;
  --ink: #2b2536;
  --ink-2: #635b72;
  --ink-3: #968ca6;
  --paper: #fffbfd;
  --paper-2: #fff6fa;
  --line: #f2e3ec;
  --line-strong: #e8d3e0;
  --shadow-s: 0 2px 10px rgba(126, 92, 122, .06);
  --shadow-m: 0 10px 30px rgba(126, 92, 122, .10);
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --wrap: 1200px;
}

/* --- 2. 复位 ------------------------------------------------------------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.75 var(--font-sans);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* --- 3. 通用工具类 ------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.eyebrow {
  font: 600 11px/1 var(--font-mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sakura);
}
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: var(--sakura-soft); color: #b2597f;
  font-size: 11.5px; line-height: 1.7;
}
.tag--sky { background: var(--sky-soft); color: #4b6fae; }
.tag--peri { background: var(--peri-soft); color: #6a58ad; }
.hairline { border: 0; border-top: 1px solid var(--line); margin: 0; }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-s); overflow: hidden;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(120deg, var(--sakura), var(--sky));
  color: #fff; font-weight: 600; font-size: 14px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); }
.btn--sm { padding: 7px 14px; font-size: 13px; }
.ratio-3-4 { position: relative; }
.ratio-3-4::before { content: ""; display: block; padding-top: 137%; }
.ratio-3-4 > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* --- 4. 共享组件层（全站页头 / 导航 / 页脚 / 回到顶部） ------------------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 251, 253, .93);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head__bar { display: flex; align-items: center; gap: 22px; height: 74px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand__logo { height: 42px; width: auto; }
.brand__text { display: none; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 9px 14px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2);
  transition: background .18s ease, color .18s ease;
}
.nav a:hover { background: var(--sakura-soft); color: #ad4f79; }
.nav a[aria-current="page"] { background: linear-gradient(120deg, #ffe6f0, #eaf1ff); color: var(--ink); font-weight: 600; }
.search { flex: 0 0 auto; }
.search input {
  width: 176px; padding: 9px 14px; border: 1px solid var(--line-strong);
  border-radius: 999px; background: #fff; font-size: 13.5px; outline: none;
  transition: width .2s ease, border-color .2s ease;
}
.search input:focus { width: 216px; border-color: var(--sakura-mid); }
.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--line-strong);
  border-radius: 12px; background: #fff; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.site-foot { background: #2b2536; color: rgba(255, 255, 255, .78); padding: 46px 0 26px; margin-top: 8px; }
.site-foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.site-foot h3 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-foot a { display: block; padding: 5px 0; font-size: 13.5px; color: rgba(255, 255, 255, .72); }
.site-foot a:hover { color: #ffd9e7; }
.site-foot__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.site-foot__brand img { height: 38px; width: auto; background: #fff; border-radius: 10px; padding: 4px 8px; }
.site-foot__note { font-size: 13px; line-height: 1.9; color: rgba(255, 255, 255, .62); }
.site-foot__bar {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 12.5px; color: rgba(255, 255, 255, .5);
}
.totop {
  position: fixed; right: 22px; bottom: 26px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: #fff; box-shadow: var(--shadow-m);
  cursor: pointer; color: #ad4f79; font-size: 16px;
}

/* --- 5. 响应式栅格 ------------------------------------------------------- */
@media (max-width: 1080px) {
  .g6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .g3, .g4, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .g2, .g3, .g4, .g6 { grid-template-columns: minmax(0, 1fr); }
  .grid { gap: 16px; }
}

/* --- 6. 组件层响应式 ----------------------------------------------------- */
@media (max-width: 980px) {
  .nav { display: none; }
  .nav.is-open {
    display: grid; position: absolute; left: 16px; right: 16px; top: 74px; margin: 0;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m);
    box-shadow: var(--shadow-m); padding: 10px; gap: 2px;
  }
  .nav-toggle { display: inline-flex; }
  .site-head__bar { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
  .search { order: 3; flex: 1 1 100%; }
  .search input { width: 100%; }
  .site-foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 430px) {
  .site-foot__grid { grid-template-columns: minmax(0, 1fr); }
  .totop { right: 12px; bottom: 14px; }
}
