/* 《翻轉》Fanzhuan — 全站样式 v2（2026-10） */

:root {
  --paper: #F5F0E4;
  --paper-deep: #EFE8D8;
  --ivory: #FFFBF0;
  --ink: #2B2F3A;
  --ink-soft: #3E434B;
  --muted: #5A5F66;
  --line: #D8CFBC;
  --cinnabar: #C8321A;      /* 朱砂（按钮用的深一档） */
  --cinnabar-dark: #8A2A20;
  --azurite: #1F6F8B;       /* 石青（深一档，保证白字对比度） */
  --water: #DCEBEC;
  --gold: #F0C239;          /* 缃色 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --brush: "Ma Shan Zheng", "STKaiti", "KaiTi", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--cinnabar); }
:focus-visible { outline: 3px solid var(--azurite); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.25em; color: var(--muted); text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 900; margin: 0; line-height: 1.25; }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 22px; }
p { margin: 0; text-wrap: pretty; }
.lead { font-size: 18px; line-height: 1.8; color: var(--ink-soft); max-width: 36em; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- buttons ---------- */
.btn { display: inline-block; padding: 12px 28px; border-radius: 999px; font-size: 16px; font-weight: 700; border: 2px solid transparent; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--cinnabar); color: var(--ivory); }
.btn-primary:hover { background: #A92814; color: var(--ivory); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #1B1E26; color: var(--paper); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--ivory); color: #1B3A48; }
.btn-light:hover { background: #fff; color: #1B3A48; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.site-header nav { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.seal { width: 40px; height: 40px; border-radius: 8px; background: var(--cinnabar); display: flex; align-items: center; justify-content: center; flex: none; }
.seal span { font-family: var(--serif); font-weight: 900; font-size: 26px; line-height: 1; color: var(--ivory); transform: rotate(180deg); display: block; }
.brand-name { font-family: var(--serif); font-weight: 900; font-size: 24px; letter-spacing: 0.15em; }
.brand-en { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; color: var(--muted); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; font-size: 15px; font-weight: 500; }
.nav-links a[aria-current="page"] { color: var(--cinnabar); box-shadow: inset 0 -2px 0 var(--cinnabar); }
.nav-links .btn { padding: 7px 20px; font-size: 15px; }
@media (max-width: 560px) {
  .site-header { position: static; }
  .brand-en { display: none; }
  .nav-links { gap: 4px 16px; font-size: 14px; }
}

/* ---------- home hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 230px; background: var(--water); border-top: 2px solid var(--ink); z-index: 0; }
.hero .wrap { position: relative; z-index: 1; padding-top: 56px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.hero-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; padding-top: 40px; padding-bottom: 32px; }
.hero h1 { font-size: clamp(72px, 12vw, 148px); line-height: 1; letter-spacing: 0.12em; }
.hero .tagline { font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.5; }
.hero-figure { flex: 0 1 380px; min-width: 0; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hero-figure .figure { display: block; width: 100%; max-width: 360px; aspect-ratio: 3 / 5; margin-bottom: -21px; }
.reflection { width: 100%; max-width: 360px; height: 230px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
          mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0)); }
.reflection img { display: block; width: 100%; aspect-ratio: 3 / 5; margin-top: -21px; transform: scale(-1, -1); }

/* ---------- inner page hero ---------- */
.page-hero { position: relative; overflow: hidden; border-bottom: 2px solid var(--ink); }
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: var(--water); border-top: 2px solid var(--ink); }
.page-hero .wrap { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 40px; padding-top: 48px; }
.page-hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding-bottom: 130px; }
.page-hero h1 { font-size: clamp(44px, 7vw, 80px); letter-spacing: 0.06em; }
.page-hero-figure { flex: 0 1 260px; height: 330px; position: relative; overflow: hidden; margin: 0 auto; }
.page-hero-figure img { position: absolute; left: 50%; top: 0; width: 240px; height: 400px; transform: translateX(-50%); }

/* ---------- quote band ---------- */
.quote-band { background: var(--ink); color: var(--paper); }
.quote-band .wrap { max-width: 1000px; padding-top: 72px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 20px; }
.quote-band .eyebrow { color: #C9C2B0; }
.quote-band blockquote { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 3vw, 34px); line-height: 1.6; text-wrap: pretty; }
.quote-band cite { font-style: normal; font-size: 16px; color: #E0D9C8; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 36px; }
.band-deep { background: var(--paper-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- column cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 24px; }
.col-card { display: flex; flex-direction: column; border-radius: 20px; background: var(--ivory); border: 1px solid #DDD3BE; overflow: hidden; }
.col-art { position: relative; height: 220px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.col-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 6%; }
.col-art .name { position: absolute; left: 14px; top: 10px; font-family: var(--brush); font-size: 28px; color: var(--ink); }
.col-art .glyph { font-family: var(--brush); font-size: 120px; line-height: 1; }
.col-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.col-body p { font-size: 15px; color: var(--ink-soft); }
.tint-narnia { background: #E9E2D0; } .tint-narnia .glyph { color: #6B5A3A; }
.tint-drama { background: #F6E3C8; }
.tint-forest { background: #E2DDF3; }
.tint-anime { background: #F6DDD6; } .tint-anime .glyph { color: var(--cinnabar-dark); }
.tint-island { background: #D6EEEB; }
.tint-classic { background: #F4DEC4; }
.tint-talk { background: #DCE7EF; } .tint-talk .glyph { color: #1F4E6B; }

/* ---------- do-it-yourself panel ---------- */
.diy-panel { border-radius: 28px; background: #E4E6F2; overflow: hidden; display: flex; flex-wrap: wrap; align-items: stretch; }
.diy-figure { flex: 0 1 320px; min-height: 360px; background: #D3D7EC; position: relative; overflow: hidden; margin: 0 auto; }
.diy-figure img { position: absolute; left: 50%; top: 24px; width: 300px; height: 500px; transform: translateX(-50%); }
.diy-body { flex: 1 1 480px; min-width: 0; padding: 48px 40px; display: flex; flex-direction: column; gap: 24px; }
.steps { display: flex; flex-direction: column; gap: 18px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step .num { font-family: var(--serif); font-weight: 900; font-size: 26px; color: var(--cinnabar); flex: none; width: 40px; line-height: 1.3; }
.step h3 { font-family: var(--sans); font-weight: 700; font-size: 19px; }
.step p { font-size: 15px; color: var(--ink-soft); }
@media (max-width: 560px) { .diy-body { padding: 32px 22px; } }

/* ---------- issue ---------- */
.issue { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.cover { flex: 0 1 340px; min-width: 0; width: 100%; margin: 0 auto; aspect-ratio: 3 / 4; border-radius: 16px; background: var(--ink); color: var(--paper); position: relative; overflow: hidden; box-shadow: 0 18px 40px rgba(43,47,58,.25); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-fallback { position: absolute; inset: 0; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; }
.cover-fallback .t { font-family: var(--serif); font-weight: 900; font-size: 48px; line-height: 1.2; }
.issue-body { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.toc { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.toc li { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid #D0C6AE; }
.toc .col { width: 96px; flex: none; font-size: 13px; font-weight: 700; color: var(--cinnabar-dark); }
.toc .title { flex: 1 1 200px; font-size: 17px; font-weight: 500; }
.toc .author { font-size: 15px; color: var(--ink-soft); }
.note { font-size: 15px; color: var(--ink-soft); padding: 16px 20px; border-radius: 14px; background: var(--ivory); border: 1px dashed #C9BEA4; }

/* ---------- subscribe ---------- */
.subscribe { background: var(--azurite); color: var(--ivory); overflow: hidden; }
.subscribe .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 48px; }
.subscribe-text { flex: 1 1 420px; min-width: 0; padding: 64px 0; display: flex; flex-direction: column; gap: 18px; }
.subscribe-text p { font-size: 18px; }
.subscribe-figure { flex: 0 1 300px; height: 320px; position: relative; overflow: hidden; margin: 0 auto; }
.subscribe-figure img { position: absolute; left: 50%; top: 20px; width: 300px; height: 500px; transform: translateX(-50%); }

/* ---------- about ---------- */
.prose { max-width: 46em; display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.9; }
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 20px; }
.principle { background: var(--ivory); border: 1px solid #DDD3BE; border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.principle .num { font-family: var(--serif); font-weight: 900; font-size: 32px; color: var(--cinnabar); line-height: 1; }
.principle p { font-size: 15px; color: var(--ink-soft); }
.col-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 14px 28px; }
.col-list li { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; border: 2px solid var(--ink); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 4%; transform: scale(1.5); transform-origin: 50% 0; }
.avatar .glyph { font-family: var(--brush); font-size: 30px; line-height: 1; }
.col-list b { font-family: var(--serif); font-size: 18px; display: block; }
.col-list span { font-size: 14px; color: var(--ink-soft); }
.guide { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 0; margin: 0; border-top: 2px solid var(--ink); }
.guide dt, .guide dd { padding: 16px 0; border-bottom: 1px solid #D0C6AE; margin: 0; }
.guide dt { font-weight: 700; padding-right: 16px; }
.guide dd { color: var(--ink-soft); }
.guide code { font-family: inherit; background: var(--ivory); border: 1px solid #DDD3BE; border-radius: 6px; padding: 1px 8px; color: var(--ink); }
@media (max-width: 560px) {
  .guide { grid-template-columns: 1fr; }
  .guide dt { border-bottom: 0; padding-bottom: 2px; }
  .guide dd { padding-top: 0; }
}
.registry { width: 100%; border-collapse: collapse; font-size: 15px; }
.registry th, .registry td { text-align: left; padding: 12px 0; border-bottom: 1px solid #D0C6AE; vertical-align: top; }
.registry th { width: 8em; font-weight: 700; padding-right: 16px; }
.registry td { color: var(--ink-soft); }
.two-col { display: flex; flex-wrap: wrap; gap: 48px; }
.two-col > * { flex: 1 1 420px; min-width: 0; }

/* ---------- upside-down hub ---------- */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.path { border-radius: 24px; overflow: hidden; background: var(--ivory); border: 1px solid #DDD3BE; display: flex; flex-direction: column; }
.path-art { position: relative; height: 240px; overflow: hidden; }
.path-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 6%; }
.path-art .tag { position: absolute; left: 16px; top: 14px; font-size: 12px; font-weight: 700; letter-spacing: .25em; background: var(--ink); color: var(--paper); padding: 4px 10px; border-radius: 999px; }
.path-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.path-body > p { font-size: 15px; color: var(--ink-soft); }
.exercises { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.exercises a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid #E2D9C6; }
.exercises a:hover { border-color: var(--cinnabar); color: var(--ink); }
.exercises b { font-size: 16px; }
.exercises span { font-size: 14px; color: var(--ink-soft); }
.path-body .btn { align-self: flex-start; margin-top: auto; }
.privacy { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--ink-soft); margin-top: 32px; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #E0D9C8; }
.footer-grid { padding-top: 56px; padding-bottom: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 32px; }
.footer-grid h4 { margin: 0 0 10px; font-size: 14px; color: var(--ivory); }
.footer-grid .fname { font-family: var(--serif); font-weight: 900; font-size: 22px; color: var(--ivory); letter-spacing: .1em; margin-bottom: 10px; }
.footer-grid p, .footer-grid li { font-size: 14px; line-height: 1.9; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid a { color: #E0D9C8; }
.footer-grid a:hover { color: var(--gold); }
.copyright { border-top: 1px solid #464B58; padding-top: 16px; padding-bottom: 32px; font-size: 13px; color: #B9B2A0; }

/* ---------- 栏目光标预览（亲自翻转入口、首页） ---------- */
@media (pointer: fine) {
  .cur-think, .cur-think * { cursor: url(/assets/cursors/think-hover.png) 1 1, pointer; cursor: -webkit-image-set(url(/assets/cursors/think-hover.png) 1x, url(/assets/cursors/think-hover@2x.png) 2x) 1 1, pointer; }
  .cur-words, .cur-words * { cursor: url(/assets/cursors/words-hover.png) 1 1, pointer; cursor: -webkit-image-set(url(/assets/cursors/words-hover.png) 1x, url(/assets/cursors/words-hover@2x.png) 2x) 1 1, pointer; }
  .cur-write, .cur-write * { cursor: url(/assets/cursors/write-hover.png) 1 1, pointer; cursor: -webkit-image-set(url(/assets/cursors/write-hover.png) 1x, url(/assets/cursors/write-hover@2x.png) 2x) 1 1, pointer; }
}
.path { transition: transform .2s ease, box-shadow .2s ease; }
.path:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(43,47,58,.12); }
.path-art img { transition: transform .4s ease; }
.path:hover .path-art img { transform: scale(1.06) rotate(-1.5deg); }
.item-card { display: flex; flex-direction: column; gap: 10px; background: var(--ivory); border: 1px solid #DDD3BE; border-radius: 20px; padding: 26px 26px 24px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.item-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(43,47,58,.12); border-color: var(--cinnabar); color: var(--ink); }
.item-card .kind { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .12em; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.item-card h3 { font-size: 24px; }
.item-card p { font-size: 15px; color: var(--ink-soft); }
.item-card .meta { font-size: 13px; color: var(--muted); }
.item-card .go { margin-top: auto; font-weight: 700; color: var(--cinnabar); }
.back { font-size: 14px; color: var(--muted); }
.back:hover { color: var(--cinnabar); }
