/* ═══════════════════════════════════════════════════════
   这句「人人」，有我吗？ · 共创图景人物篇 H
   34 波普漫画 / 反向批注 + 03 精密排版：
   柠檬黄 / 群青 / 珊瑚红 / 墨黑漫画格 / 网点 / 多尺寸气泡。
   状态：body[data-stage]（covered/lifted/revised）+ data-mode（a/b）
   显隐瞬时；纸条掀开有单次位移动画（验收取终态）。
   ═══════════════════════════════════════════════════════ */

:root {
  --lemon: #FFE94A;      /* 柠檬黄 */
  --ink: #141414;        /* 墨黑 */
  --ultra: #2B4BC0;      /* 群青 */
  --coral: #FF5A47;      /* 珊瑚红 */
  --paper: #FFF9E3;      /* 米黄白纸 */
  --pencil: #8d8878;
  --red-pen: #E23B2E;
  --hand: "Kaiti SC", "STKaiti", "KaiTi", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  font-size: 16px; line-height: 1.85;
  color: var(--ink);
  background:
    radial-gradient(1200px 540px at 90% -8%, rgba(255, 233, 74, .35), transparent 58%),
    radial-gradient(860px 460px at -6% 34%, rgba(43, 75, 192, .08), transparent 60%),
    var(--paper);
  overflow-x: hidden;
}

a { color: var(--ultra); }
:focus-visible { outline: 3px solid var(--ultra); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -52px; background: var(--ink); color: var(--lemon); padding: 8px 16px; border-radius: 0; z-index: 99; }
.skip:focus { top: 12px; color: var(--lemon); }
.sr-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.svg-hand { font-family: var(--hand); }

/* ---------- 站点入口（波普纸条） ---------- */
.portal-back {
  display: flex; gap: 12px; align-items: center;
  padding: 10px max(calc((100vw - 1060px) / 2), 18px);
  background: var(--ink);
  font-size: 14px;
}
.portal-back a {
  color: var(--ink); text-decoration: none;
  background: var(--lemon);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(255,233,74,.35);
  padding: 4px 15px; transform: rotate(-1deg);
}
.portal-back a:first-child { transform: rotate(1deg); }
.portal-back a:hover { background: #fff; }

/* ---------- 页头 ---------- */
.pop-head { max-width: 1060px; margin: 0 auto; padding: clamp(22px, 3.6vw, 42px) 22px 2px; }
.kicker { font-size: 14px; letter-spacing: .2em; color: var(--ultra); font-weight: 600; margin-bottom: 10px; }
h1 {
  font-weight: 900;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.3; letter-spacing: .01em;
  margin-bottom: 12px;
}
.hl { background: var(--lemon); box-shadow: 4px 4px 0 var(--ink); padding: 0 8px; display: inline-block; transform: rotate(-1.2deg); }
.intro { max-width: 38em; font-size: 16.5px; }
.intro strong { color: var(--ultra); }
.fiction-note { display: inline-block; margin-left: 10px; font-size: 14px; color: #6b6455; border-bottom: 2px dashed var(--ink); }

/* ---------- 主舞台 ---------- */
main { max-width: 1060px; margin: 0 auto; padding: 0 22px; }
.stage-section { padding-top: clamp(16px, 2.4vw, 26px); }
.stage-title {
  font-weight: 900; font-size: clamp(20px, 2.6vw, 27px);
  margin-bottom: 12px; display: flex; align-items: center; gap: 12px;
}

.stage {
  position: relative;
  border: 6px solid var(--ink);
  background: #fff;
  box-shadow: 10px 10px 0 rgba(20, 20, 20, .9);
  padding: clamp(10px, 2vw, 22px);
}

.comic-board { position: relative; }

/* 主格 */
.panel-main {
  position: relative;
  border: 5px solid var(--ink);
  background: #fff;
  min-height: clamp(340px, 44vw, 400px);
  overflow: hidden;
}
.halftone {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(20,20,20,.10) 1.3px, transparent 1.4px);
  background-size: 10px 10px;
  pointer-events: none;
}
.draft, .rv { position: absolute; inset: 0; width: 100%; height: 100%; }

/* 手稿层：covered 时被纸条盖住（仍渲染在纸条下），lifted 后可读 */
.draft { opacity: 0; }
body[data-stage="lifted"] .draft { opacity: 1; }
body[data-stage="revised"] .draft { opacity: 0; }

/* 修订终态：按 mode 只显示其一 */
.rv { opacity: 0; }
body[data-stage="revised"][data-mode="a"] .rv-a { opacity: 1; }
body[data-stage="revised"][data-mode="b"] .rv-b { opacity: 1; }

.under-hint {
  position: absolute; left: 12px; bottom: 8px;
  font-size: 14px; color: #9b937d; font-family: var(--hand);
  transform: rotate(-2deg);
}
body:not([data-stage="covered"]) .under-hint { display: none; }

/* 大主张纸条 */
.claim {
  position: absolute; left: 50%; top: 46%;
  transform: translate(-50%, -50%) rotate(-3deg);
  background: var(--lemon);
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(20, 20, 20, .85);
  padding: 22px 30px 18px;
  cursor: pointer;
  text-align: center;
  font-family: var(--sans); color: var(--ink);
  transition: transform .4s cubic-bezier(.3,.8,.3,1);
  z-index: 5;
}
.claim:hover { transform: translate(-50%, -52%) rotate(-3.5deg) scale(1.02); }
.claim-main { display: block; font-size: clamp(26px, 4vw, 40px); font-weight: 900; line-height: 1.25; }
.claim-sub { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; letter-spacing: .12em; }
.claim-tab {
  display: inline-block; margin-top: 12px;
  font-size: 14px; font-weight: 700;
  background: var(--ink); color: var(--lemon);
  padding: 3px 12px;
}
/* lifted：旧纸条折成右缘小纸角，退出主画区不遮内容 */
body[data-stage="lifted"] .claim,
body[data-stage="revised"] .claim {
  transform: translate(228%, -80%) rotate(38deg) scale(.32);
  pointer-events: none;
  opacity: .45;
}

/* 新主张纸条（revised 后，格上沿，不遮画） */
.claim-new {
  position: absolute; right: 4%; top: 5%;
  background: var(--lemon);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(20, 20, 20, .85);
  padding: 10px 16px;
  transform: rotate(1.6deg);
  max-width: 15em;
  opacity: 0; visibility: hidden; z-index: 6;
}
.claim-new .claim-main { font-size: 17px; font-weight: 800; line-height: 1.5; }
.claim-new-b { background: var(--coral); }
.claim-new-b .claim-main { color: #fff; }
body[data-stage="revised"][data-mode="a"] #claimNewA { opacity: 1; visibility: visible; }
body[data-stage="revised"][data-mode="b"] #claimNewB { opacity: 1; visibility: visible; }

/* 画下文档流：批注①②③与提问/便签（16px 正常 DOM，不进 SVG 缩字） */
.lifted-flow {
  display: none;
  margin-top: 16px;
  grid-template-columns: 1.15fr .85fr;
  gap: 14px;
  align-items: start;
}
body[data-stage="lifted"] .lifted-flow { display: grid; }
.anno-list { list-style: none; display: grid; gap: 8px; border: 3px dashed var(--red-pen); padding: 12px 16px; background: #fff; }
.anno-list li { font-size: 16px; font-family: var(--hand); color: var(--red-pen); }
.anno-list .a-no { font-family: var(--sans); font-weight: 700; margin-right: 4px; }
.q-card {
  background: #fff; border: 4px solid var(--ink); border-radius: 16px;
  box-shadow: 4px 4px 0 rgba(20,20,20,.8);
  padding: 10px 16px; font-size: 16px; font-weight: 700;
}
.q-card b { background: var(--lemon); padding: 0 4px; }
.n-card {
  margin-top: 10px; background: var(--ink); color: #fff;
  padding: 8px 14px; transform: rotate(-1.2deg);
  font-size: 14.5px; max-width: 24em; justify-self: start;
}

/* ---------- 操作条 ---------- */
.ops { margin: 18px 0 6px; display: grid; gap: 12px; }
.ops-phase { font-size: 17px; font-weight: 800; }
.ops-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ops-group[hidden] { display: none; }
.ops-tip { font-size: 14px; color: #55503f; }
.op-btn {
  font-size: 16px; font-weight: 800;
  padding: 10px 20px; border-radius: 0;
  border: 3px solid var(--ink); background: #fff; color: var(--ink);
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.op-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.op-lift { background: var(--lemon); }
.op-a { background: var(--lemon); }
.op-b { background: var(--coral); color: #fff; }
.op-rechoose { background: #fff; border-style: dashed; }

/* ---------- 章节 ---------- */
.chapter { padding: clamp(28px, 4vw, 46px) 0 4px; }
.chapter h2 {
  font-weight: 900; font-size: clamp(21px, 2.8vw, 28px);
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--ink); color: var(--lemon);
  font-size: 18px; flex-shrink: 0;
}
.chapter p { max-width: 38em; margin-bottom: 14px; }
.chapter strong { background: var(--lemon); padding: 0 4px; }

/* ---------- 无 JS 图版 ---------- */
.nojs { display: none; }
html:not(.has-js) .nojs { display: block; }
html:not(.has-js) .hasjs { display: none; }
.board-static { padding: clamp(28px, 4vw, 46px) 0 4px; }
.board-static h2 { font-weight: 900; font-size: 24px; margin-bottom: 10px; }
.board-static > p { max-width: 40em; margin-bottom: 8px; }
.static-frames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 16px; }
.static-frames figure { border: 4px solid var(--ink); background: #fff; box-shadow: 6px 6px 0 rgba(20,20,20,.85); padding: 10px; }
.static-frames figcaption { font-size: 14px; color: #45402f; margin-top: 8px; line-height: 1.7; }
.sf { border: 3px solid var(--ink); min-height: 150px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; text-align: center;
  background-image: radial-gradient(circle, rgba(20,20,20,.10) 1.2px, transparent 1.3px); background-size: 10px 10px; }
.sf-claim { font-weight: 900; font-size: 20px; background: var(--lemon); border: 3px solid var(--ink); padding: 8px 14px; transform: rotate(-3deg); }
.sf-claim small { display: block; font-size: 12px; font-weight: 600; }
.sf-anno { font-family: var(--hand); color: var(--red-pen); font-size: 14.5px; text-align: left; }
.sf-q { font-weight: 800; font-size: 15px; border: 3px solid var(--ink); background: #fff; border-radius: 14px; padding: 6px 12px; }
.sf-tag { font-weight: 800; font-size: 14px; background: var(--ink); color: var(--lemon); padding: 2px 10px; }
.sf-claim-sm { font-weight: 800; font-size: 15px; background: var(--lemon); border: 3px solid var(--ink); padding: 6px 12px; }

/* ---------- 页脚 ---------- */
.page-foot { margin: 52px 0 0; padding: 26px 0 40px; border-top: 5px solid var(--ink); font-size: 14px; color: #45402f; }
.foot-fiction { max-width: 46em; margin-bottom: 10px; }
.foot-fiction strong { color: var(--ink); }
.page-foot p { margin-bottom: 6px; }

/* ---------- reduce ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .claim { padding: 16px 20px 14px; }
  .claim-main { font-size: clamp(22px, 7vw, 30px); }
  body[data-stage="lifted"] .claim,
  body[data-stage="revised"] .claim { transform: translate(180%, -74%) rotate(38deg) scale(.3); }
  .lifted-flow { grid-template-columns: 1fr; }
  .static-frames { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  h1 { font-size: 30px; }
  .chapter p, .q-card, .anno-list li { font-size: 16px; }
  .op-btn { font-size: 15px; padding: 9px 14px; }
  .panel-main { min-height: 360px; }
}
