/* ============================================================
   polish.css — 材质层 / 光影 / 动效 / 装饰元件
   依赖 data-quality / data-depth / data-godray / data-motion 属性
   ============================================================ */

/* ============================================================
   1. 材质层（三频纸纹 + 三段调色 + 暗角）
   ============================================================ */
#fz-texture {
  position: absolute; inset: 0; z-index: 42;
  pointer-events: none; overflow: hidden;
}
#fz-texture > div { position: absolute; inset: 0; pointer-events: none; }

/* 细砂噪点（高频） */
.tz-grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)' opacity='.55'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  opacity: .16;
  mix-blend-mode: multiply;
}
[data-grain="off"] .tz-grain { display: none; }

/* 粗斑（水渍/云斑，中频） */
.tz-blotch {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .02' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23b)' opacity='.5'/%3E%3C/svg%3E");
  background-size: 420px 420px;
  opacity: .085;
  mix-blend-mode: multiply;
}

/* 纸纤维（拉丝） */
.tz-fiber {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .035' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23f)' opacity='.42'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: .06;
  mix-blend-mode: overlay;
}

/* 三段调色：阴影冷 / 中间调本色 / 高光暖 */
.tz-grade {
  background:
    linear-gradient(180deg, rgba(120,160,190,.09), transparent 22%, transparent 76%, rgba(240,190,120,.11)),
    linear-gradient(90deg, rgba(120,160,190,.05), transparent 26%, transparent 74%, rgba(240,190,120,.05));
  mix-blend-mode: soft-light;
  opacity: .9;
}

/* 暗角 */
.tz-vignette {
  background: radial-gradient(126% 100% at 50% 46%, transparent 48%, rgba(58,51,44,.30) 100%);
  mix-blend-mode: multiply;
}

/* ============================================================
   2. 手绘毛边
   ============================================================ */
[data-edge="on"] .paper,
[data-edge="on"] .bubble-text,
[data-edge="on"] .choice,
[data-edge="on"] .ui-mock {
  filter: url(#fz-edge-soft);
}
[data-edge="on"] .result-loss,
[data-edge="on"] .kcard {
  filter: url(#fz-edge);
}

/* ============================================================
   3. 场景光影：景深 / 体积光 / 环境光
   ============================================================ */
.stage-scene { position: relative; }

/* 景深：远两层虚化 + 降饱和 */
[data-depth="on"] .scene-layer[data-depth="1"] svg {
  filter: blur(.8px) saturate(.92);
}
[data-depth="on"] .scene-layer[data-depth="2"] svg {
  filter: blur(.3px) saturate(.97);
}
[data-depth="on"] .scene-layer[data-depth="3"] svg {
  filter: drop-shadow(0 10px 22px rgba(58,51,44,.22));
}
[data-depth="on"] .scene-layer[data-depth="5"] svg {
  filter: blur(.4px) brightness(.9);
}

/* 前景层压暗一点，制造景深 */
[data-depth="on"] .scene-layer[data-depth="5"] { opacity: .88; }
[data-depth="on"] .scene-layer[data-depth="6"] { opacity: .95; }

/* 体积光 */
.scene-godray {
  position: absolute; inset: -20% -10%; z-index: 8;
  pointer-events: none;
  background: linear-gradient(102deg,
      transparent 18%, rgba(255,236,196,.20) 30%,
      rgba(255,236,196,.06) 40%, transparent 52%);
  mix-blend-mode: screen;
  filter: blur(14px);
  animation: godray-sweep 58s linear infinite;
  opacity: .95;
}
[data-godray="off"] .scene-godray { display: none; }
@keyframes godray-sweep {
  0%   { transform: translate3d(-24%, 0, 0) rotate(-4deg); opacity: .25; }
  50%  { transform: translate3d(14%, 0, 0) rotate(4deg);  opacity: .85; }
  100% { transform: translate3d(42%, 0, 0) rotate(6deg);  opacity: .2; }
}

/* ============================================================
   4. 立绘：边缘光 + 地面投影 + 呼吸
   ============================================================ */
.portrait-figure {
  position: absolute; right: -3%; bottom: -2%;
  width: 54%; max-width: 236px;
  pointer-events: none;
}
.portrait-figure--left  { right: auto; left: -4%; }
.portrait-figure--center { right: auto; left: 50%; transform: translateX(-50%); width: 58%; }

.portrait-figure .portrait-art {
  width: 100%; height: auto; display: block;
  animation: portrait-breathe 4.4s ease-in-out infinite;
  transform-origin: 60% 100%;
  will-change: transform;
}
@keyframes portrait-breathe {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-3.5px) rotate(.25deg); }
}
/* 说话时轻微点头 */
.portrait-figure.is-speaking .portrait-art {
  animation: portrait-breathe 4.4s ease-in-out infinite,
             portrait-nod 1.5s ease-in-out infinite;
}
@keyframes portrait-nod {
  0%, 100% { rotate: 0deg; }
  30%      { rotate: -1.1deg; }
  70%      { rotate: .5deg; }
}

/* 地面投影 */
.portrait-shadow {
  position: absolute; left: 50%; bottom: -6px;
  transform: translateX(-50%);
  width: 76%; height: 16px;
  background: radial-gradient(closest-side, rgba(58,51,44,.30), transparent 72%);
  filter: blur(5px);
  animation: shadow-breathe 4.4s ease-in-out infinite;
}
@keyframes shadow-breathe {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: .85; }
  50%      { transform: translateX(-50%) scale(.95); opacity: .7; }
}

/* ============================================================
   5. 幕间章节卡
   ============================================================ */
.chapter-card {
  position: absolute; inset: 0; z-index: 70;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden;
  cursor: pointer;
  animation: chapter-in .52s var(--ease) both;
}
@keyframes chapter-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.chapter-card--out {
  animation: chapter-out .42s var(--ease) both;
}
@keyframes chapter-out {
  from { opacity: 1; }
  to   { opacity: 0; transform: scale(1.04); }
}
.chapter-art {
  position: absolute; inset: 0; z-index: 0;
  animation: chapter-zoom 6s ease-out both;
}
.chapter-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
@keyframes chapter-zoom {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}
.chapter-tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(46,74,99,.52), rgba(58,44,36,.62));
  mix-blend-mode: multiply;
}
.chapter-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 80% at 50% 40%, transparent 20%, rgba(30,26,22,.42) 100%),
    linear-gradient(180deg, rgba(24,20,26,.34), rgba(24,20,26,.20) 40%, rgba(24,20,26,.46));
}
.chapter-content {
  position: relative; z-index: 2;
  text-align: center; color: #FFF8EB;
  padding: 0 32px;
  animation: chapter-text .78s .1s var(--ease) both;
}
@keyframes chapter-text {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.chapter-num {
  font-family: var(--ff-num);
  font-size: 58px; font-weight: 900; line-height: 1;
  color: var(--orange);
  text-shadow: 0 4px 24px rgba(0,0,0,.4);
  letter-spacing: .06em;
}
.chapter-name {
  margin-top: 6px;
  font-size: 30px; font-weight: 900;
  letter-spacing: .34em; text-indent: .34em;
  text-shadow: 0 3px 18px rgba(0,0,0,.5);
}
.chapter-rule {
  position: relative; z-index: 2;
  width: 54px; height: 3px; border-radius: 2px;
  background: rgba(255,248,235,.5);
  margin: 18px 0 14px;
  animation: chapter-rule .6s .34s var(--ease) both;
}
@keyframes chapter-rule {
  from { width: 0; opacity: 0; }
  to   { width: 54px; opacity: 1; }
}
.chapter-epigraph {
  font-size: var(--fs-md);
  line-height: 2;
  color: rgba(255,248,235,.86);
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
  animation: chapter-text .78s .46s var(--ease) both;
}
.chapter-skip {
  position: absolute; z-index: 3;
  left: 0; right: 0; bottom: calc(var(--sab) + 26px);
  text-align: center;
  font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: .3em; text-indent: .3em;
  color: rgba(255,248,235,.6);
  animation: chapter-blink 1.8s ease-in-out infinite;
}
@keyframes chapter-blink { 0%,100% { opacity:.35 } 50% { opacity:.9 } }

/* ============================================================
   6. 打字机：逐字上浮 + 光标
   ============================================================ */
.tw-line { display: inline; }
.tw-ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(5px);
  animation: tw-rise .26s var(--ease) forwards;
}
@keyframes tw-rise {
  to { opacity: 1; transform: none; }
}
.typing-caret {
  display: inline-block;
  width: 2px; height: 1em;
  margin-left: 2px;
  vertical-align: -.12em;
  background: var(--coral);
  border-radius: 1px;
  animation: caret-blink .78s steps(2, start) infinite;
}
@keyframes caret-blink { 0%,100% { opacity: 1 } 50% { opacity: 0 } }
[data-motion="off"] .tw-ch { opacity: 1; transform: none; animation: none; }
[data-motion="off"] .typing-caret { display: none; }

/* ============================================================
   7. 仪表：分段刻度 + 充能扫光
   ============================================================ */
.gauge--segmented .gauge-track { position: relative; overflow: visible; }
.gauge--segmented .gauge-ticks {
  position: absolute; inset: 0;
  display: flex; gap: 1px;
  pointer-events: none;
}
.gauge--segmented .gauge-ticks i {
  flex: 1; height: 100%;
  border-right: 1px solid rgba(58,51,44,.18);
}
.gauge--segmented .gauge-ticks i:last-child { border-right: 0; }
.gauge--segmented .gauge-ticks i.major { border-right-color: rgba(58,51,44,.34); }

.gauge--segmented .gauge-sweep {
  position: absolute; top: -2px; bottom: -2px; left: 0; width: 22px;
  border-radius: 99px;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.gauge--segmented .gauge-sweep.run { animation: gauge-sweep .62s var(--ease); }
@keyframes gauge-sweep {
  0%   { opacity: .9; transform: translateX(-24px); }
  100% { opacity: 0;  transform: translateX(340px); }
}
.gauge--segmented .gauge-fill--radar { box-shadow: 0 0 10px rgba(78,140,107,.5); }
.gauge--segmented .gauge-fill--trust { box-shadow: 0 0 10px rgba(232,116,97,.5); }

/* ============================================================
   8. 选项落纸
   ============================================================ */
.choice {
  transform-origin: 20% 50%;
}
[data-motion="on"] .choice {
  animation: choice-drop .42s var(--ease) both;
}
@keyframes choice-drop {
  0%   { opacity: 0; transform: translateY(10px) scale(1.05) rotate(.9deg); }
  62%  { opacity: 1; transform: translateY(-2px) scale(.995) rotate(-.25deg); }
  100% { opacity: 1; transform: none; }
}
[data-motion="on"] .choice:active {
  animation: none;
  box-shadow: inset 0 3px 7px rgba(58,51,44,.22), 0 0 0 var(--stroke);
  transform: translateY(3px) scale(.995) rotate(-.35deg);
}

/* 高危红圈：双环脉冲 */
[data-motion="on"] .choice--risky::after {
  animation: risky-beat 2.4s ease-in-out infinite;
}
[data-motion="on"] .choice--risky::before {
  content: "";
  position: absolute; inset: 5px;
  border-radius: inherit;
  border: 1.5px dashed rgba(224,91,74,.5);
  opacity: 0;
  pointer-events: none;
  animation: risky-dash 2.4s ease-in-out infinite;
}
@keyframes risky-dash {
  0%, 100% { opacity: 0; }
  50%      { opacity: .8; }
}

/* ============================================================
   9. 气泡：微倾斜 + 说话者高亮
   ============================================================ */
[data-motion="on"] .log-row.bubble-tilt .bubble { transform: rotate(var(--tilt, 0deg)); }
.bubble { transition: transform var(--norm) var(--ease); }

.bubble-avatar-wrap.is-active {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--orange), var(--sh-2);
}
.bubble-avatar-wrap {
  transition: transform var(--norm) var(--ease), box-shadow var(--norm) var(--ease);
}
.bubble-name.is-active { color: var(--coral); }
.bubble-name u {
  position: relative;
}
.bubble-name u::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; border-radius: 2px;
  background: var(--coral);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--norm) var(--ease);
}
.bubble-name.is-active u::after { transform: scaleX(1); }

/* 正在输入 */
.typing-dots { display: inline-flex; gap: 3px; align-items: center; }
.typing-dots i {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-4);
  animation: dot-bounce 1.1s infinite;
}
.typing-dots i:nth-child(2) { animation-delay: .14s; }
.typing-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

/* ============================================================
   10. 装饰元件
   ============================================================ */
.deco { position: absolute; pointer-events: none; z-index: 3; }
.deco-svg { width: 100%; height: 100%; display: block; }

.deco--tape      { top: -10px; left: 50%; transform: translateX(-50%) rotate(-2.4deg); width: 108px; }
.deco--tape-left { top: -10px; left: 16px; transform: rotate(-7deg); width: 88px; }
.deco--pin       { top: -8px; right: 14px; width: 24px; }
.deco--clip      { top: -9px; right: 42px; width: 28px; }
.deco--sticky    { width: 78px; }
.deco--fold      { right: 0; bottom: 0; width: 26px; }
.deco--crease    { left: 12%; right: 12%; top: 44%; width: auto; height: 14px; opacity: .8; }
.deco--coffee    { right: 10px; bottom: 8px; width: 46px; opacity: .55; }
.deco--postage   { right: 10px; top: 10px; width: 26px; opacity: .85; }

/* 折角（伪 3D 翻起） */
.dogear { position: relative; }
.dogear::after {
  content: "";
  position: absolute; right: 0; bottom: 0;
  width: 22px; height: 22px;
  background: linear-gradient(135deg, transparent 48%, var(--paper-2) 50%, var(--paper-3) 100%);
  border-left: 1.5px solid rgba(58,51,44,.18);
  border-top: 1.5px solid rgba(58,51,44,.18);
  border-bottom-right-radius: var(--r-sm);
  box-shadow: -2px -2px 5px rgba(58,51,44,.08);
}

/* ============================================================
   11. 撕纸边容器
   ============================================================ */
.torn-card { position: relative; }
.torn-edge {
  position: absolute; left: 0; right: 0; bottom: -5px;
  height: 8px;
  pointer-events: none;
}
.torn-edge svg { width: 100%; height: 100%; }
.torn-edge svg path { fill: rgba(58,51,44,.14); }

/* ============================================================
   12. 印章
   ============================================================ */
.seal { width: 148px; margin: 6px auto 2px; }
.seal-svg { width: 100%; height: auto; display: block; overflow: visible; }
[data-motion="on"] .seal-dash {
  animation: seal-draw .62s .12s var(--ease) forwards;
}
@keyframes seal-draw { to { stroke-dashoffset: 0; } }
[data-motion="on"] .seal-ring {
  transform-origin: 100px 42px;
  animation: seal-pop .42s .1s cubic-bezier(.2,1.5,.4,1) both;
}
@keyframes seal-pop {
  from { transform: scale(2.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
[data-motion="on"] .seal-tick {
  stroke-dasharray: 46; stroke-dashoffset: 46;
  animation: seal-tick-draw .34s .5s var(--ease) forwards;
}
@keyframes seal-tick-draw { to { stroke-dashoffset: 0; } }
[data-motion="on"] .seal-text {
  animation: seal-text .4s .62s var(--ease) both;
}
@keyframes seal-text { from { opacity: 0; letter-spacing: 10px; } to { opacity: 1; letter-spacing: 3px; } }
[data-motion="on"] .seal-ink { animation: seal-ink .7s .1s var(--ease) both; }
@keyframes seal-ink { from { r: 0; opacity: .34; } to { r: 34; opacity: .12; } }
.seal { transform: rotate(-6deg); }

/* ============================================================
   13. AI 检测器
   ============================================================ */
.ai-detector {
  border-radius: var(--r-md);
  border: 2px solid var(--stroke);
  background: linear-gradient(165deg, #FFFDF8, #F4F1E6);
  padding: 11px;
  box-shadow: var(--sh-1);
}
.ai-detector-title {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: .16em; color: var(--purple);
  margin-bottom: 9px;
}
.ai-detector-title svg { width: 14px; height: 14px; }
.ai-detector-grid { display: flex; flex-direction: column; gap: 7px; }
.ai-case {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  border: 2px solid rgba(58,51,44,.24);
  background: var(--card);
  font-size: var(--fs-sm); line-height: 1.7;
  text-align: left;
  transition: all var(--fast) var(--ease);
}
.ai-case-no {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--purple); color: #fff;
  font-family: var(--ff-num); font-size: 11px; font-weight: 800;
}
.ai-case-txt { flex: 1; min-width: 0; }
.ai-case-tag { flex: 0 0 auto; font-size: 9px; font-weight: 800; color: var(--ink-4); }
.ai-case.is-locked { opacity: .35; pointer-events: none; }
.ai-case.is-pass { border-color: var(--green); background: #F0F7F2; }
.ai-case.is-pass .ai-case-no { background: var(--green); }
.ai-case.is-fail { border-color: var(--red); background: #FFF4F2; }
.ai-case.is-fail .ai-case-no { background: var(--red); }
.ai-verdict {
  margin-top: 9px;
  display: flex; align-items: flex-start; gap: 7px;
  font-size: var(--fs-sm); line-height: 1.75;
  padding: 8px 10px; border-radius: var(--r-sm);
  animation: verdict-in .34s var(--ease) both;
}
@keyframes verdict-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ai-verdict svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 3px; }
.ai-verdict.ok { background: rgba(78,140,107,.1); color: #2F6449; }
.ai-verdict.ng { background: rgba(224,91,74,.1); color: #9C3A2D; }

/* ============================================================
   14. 片头描边动画
   ============================================================ */
.brand-draw path {
  stroke-dasharray: var(--len, 200);
  stroke-dashoffset: var(--len, 200);
}
[data-motion="on"] .brand-draw path {
  animation: brand-draw 1.1s .1s var(--ease) forwards;
}
@keyframes brand-draw { to { stroke-dashoffset: 0; } }

/* ============================================================
   15. 图鉴解锁撕开
   ============================================================ */
.gal-item.is-unlocking {
  animation: gal-tear .62s var(--ease) both;
}
@keyframes gal-tear {
  0%   { clip-path: inset(0 100% 0 0); }
  55%  { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}
.gal-item.is-unlocking::after {
  content: "";
  position: absolute; right: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, transparent, #FFFDF8 30%, #FFFDF8 70%, transparent);
  animation: gal-seam .62s var(--ease) both;
}
@keyframes gal-seam { from { opacity: 1; } to { opacity: 0; } }

/* ============================================================
   16. 剧本卡结局进度环
   ============================================================ */
.sc-ring { position: relative; width: 34px; height: 34px; flex: 0 0 auto; }
.sc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sc-ring-txt {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--ff-num); font-size: 10px; font-weight: 800;
  color: var(--ink-2);
}

/* ============================================================
   17. 屏幕共享倒计时可视化
   ============================================================ */
.share-mirror {
  position: relative;
  border-radius: var(--r-md);
  border: 2px dashed var(--red);
  background: linear-gradient(180deg, #FFF4F2, #FDE8E4);
  padding: 11px 12px;
  overflow: hidden;
}
.share-mirror::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent 0 9px, rgba(224,91,74,.09) 9px 18px);
  animation: share-scan 2.6s linear infinite;
  pointer-events: none;
}
@keyframes share-scan { to { transform: translateX(25px); } }
.share-mirror-head {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 800;
  color: var(--red); letter-spacing: .12em;
  margin-bottom: 7px;
}
.share-mirror-head svg { width: 14px; height: 14px; }
.share-mirror-ring {
  display: flex; align-items: center; gap: 8px;
}
.share-mirror-ring .bar {
  flex: 1; height: 8px; border-radius: 99px;
  background: rgba(224,91,74,.2); overflow: hidden;
}
.share-mirror-ring .bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--red));
  border-radius: 99px;
  animation: share-drain 6s linear forwards;
}
@keyframes share-drain { from { width: 100%; } to { width: 4%; } }
.share-mirror-ring b { font-family: var(--ff-num); font-size: var(--fs-sm); color: var(--red); }

/* ============================================================
   18. 合同/条款逐条高亮
   ============================================================ */
.contract {
  border-radius: var(--r-sm);
  border: 2px solid rgba(58,51,44,.28);
  background: var(--card);
  overflow: hidden;
}
.contract-head {
  padding: 8px 11px;
  background: var(--paper-3);
  border-bottom: 1.5px solid rgba(58,51,44,.18);
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .1em;
}
.contract-clause {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 11px;
  border-bottom: 1px dashed rgba(58,51,44,.14);
  font-size: var(--fs-sm); line-height: 1.7;
  transition: background var(--fast) linear;
}
.contract-clause:last-child { border-bottom: 0; }
.contract-clause .flag {
  flex: 0 0 auto;
  font-size: 9px; font-weight: 800;
  padding: 2px 7px; border-radius: 99px;
  margin-top: 2px;
}
.contract-clause .flag.ok { background: rgba(78,140,107,.16); color: #2F6449; }
.contract-clause .flag.ng { background: rgba(224,91,74,.16); color: #9C3A2D; }
.contract-clause .flag.warn { background: rgba(201,154,63,.2); color: #8A6A20; }
.contract-clause.is-checked { background: rgba(242,166,90,.12); }

/* ============================================================
   19. 官方渠道对照卡
   ============================================================ */
.channel-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.channel-col {
  border-radius: var(--r-sm);
  border: 2px solid;
  padding: 9px 10px;
  font-size: 11px; line-height: 1.75;
}
.channel-col--bad { border-color: var(--red); background: #FFF5F3; }
.channel-col--ok  { border-color: var(--green); background: #F1F8F3; }
.channel-col h4 { font-size: var(--fs-sm); margin-bottom: 5px; }
.channel-col--bad h4 { color: var(--red); }
.channel-col--ok  h4 { color: var(--green); }
.channel-col ul { display: flex; flex-direction: column; gap: 3px; }
.channel-col li::before { content: "· "; }

/* ============================================================
   20. 开箱动画（空包裹）
   ============================================================ */
.unbox {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 10px;
  border-radius: var(--r-md);
  border: 2px solid rgba(58,51,44,.26);
  background: linear-gradient(180deg, #F6F0E2, #EFE5D2);
}
.unbox-box {
  width: 78px; height: 62px;
  position: relative;
  transform-style: preserve-3d;
  animation: unbox-open 1.5s var(--ease) both;
}
@keyframes unbox-open {
  0%   { transform: perspective(200px) rotateX(0deg); }
  55%  { transform: perspective(200px) rotateX(-26deg) translateY(-6px); }
  100% { transform: perspective(200px) rotateX(-16deg) translateY(-2px); }
}
.unbox-lid {
  position: absolute; left: 50%; top: 0;
  transform-origin: left bottom;
  width: 78px; height: 22px;
  background: #D8C09A;
  border: 2px solid #8A6B44;
  border-radius: 3px 3px 0 0;
  transform-origin: left bottom;
  animation: unbox-lid 1.5s var(--ease) both;
}
@keyframes unbox-lid {
  0%   { transform: rotate(0deg); }
  50%  { transform: rotate(-118deg); }
  100% { transform: rotate(-104deg); }
}
.unbox-body {
  position: absolute; left: 0; bottom: 0;
  width: 78px; height: 42px;
  background: #C9A878;
  border: 2px solid #8A6B44;
  border-radius: 0 0 4px 4px;
}
.unbox-inside {
  position: absolute; left: 6px; bottom: 6px;
  width: 62px; height: 26px;
  background: rgba(58,51,44,.18);
  border-radius: 2px;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 800; color: rgba(58,51,44,.5);
}
.unbox-cap { font-size: var(--fs-xs); color: var(--ink-3); }

/* ============================================================
   21. 轻微材质统一：卡片内阴影
   ============================================================ */
.paper {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    0 1px 0 rgba(58,51,44,.06),
    0 8px 20px rgba(138,127,115,.14);
}
.panel, .paper { position: relative; }

/* ============================================================
   22. 画质低档：关闭非必要效果
   ============================================================ */
[data-quality="low"] .tz-blotch,
[data-quality="low"] .tz-fiber { display: none; }
[data-quality="low"] .portrait-figure .portrait-shadow { display: none; }
[data-quality="low"] .portrait-figure .portrait-art { animation: none; }
[data-quality="low"] .chapter-art { animation: none; }

/* 设置里的自动降级开关标签 */
.set-row .seg + .switch { margin-left: 4px; }
