/* Edition v2 global overlay. Applied only by scripts/apply-edition-v2.mjs. */
@import url("/_next/static/localization/edition-v2-sample.css");
html[data-edition-v2="active"] {
  color-scheme: dark;
  --edition-accent: #8999ff;
  --edition-accent-strong: #a5b0ff;
  --edition-surface-0: #0d0f13;
  --edition-surface-1: #12151a;
  --edition-surface-2: #171a20;
  --edition-text-1: #f1f3f7;
  --edition-text-2: #c2c7d0;
  --edition-text-3: #858d9b;
  --edition-line: #282d36;
  --edition-line-strong: #39404c;
  --edition-shadow: 0 28px 74px -42px rgba(0, 0, 0, .96);
  --color-bone: var(--edition-surface-0);
  --color-bone-2: var(--edition-surface-2);
  --color-card: var(--edition-surface-1);
  --color-forest: var(--edition-text-1);
  --color-slate: var(--edition-text-2);
  --color-mist: var(--edition-text-3);
  --color-line: var(--edition-line);
  --color-sage: var(--edition-accent);
  --color-sage-deep: var(--edition-accent-strong);
  --color-sage-dim: #3a405d;
  --c-bone: 13 15 19; --c-bone-2: 23 26 32; --c-card: 18 21 26;
  --c-forest: 241 243 247; --c-slate: 194 199 208; --c-mist: 133 141 155;
  --c-line: 40 45 54; --c-sage: 137 153 255; --c-sage-deep: 165 176 255;
  --c-sage-dim: 55 64 94; --c-sage-wash: 23 26 32;
  --c-clay-soft: 23 26 32; --c-gold-soft: 23 26 32; --c-spruce-soft: 23 26 32;
  --c-sage-bold: 219 174 84; --c-clay: 137 153 255;
  --c-gold: 93 198 157; --c-spruce: 132 148 184;
  --door-bg: linear-gradient(145deg, #171a20, #101318 58%, #1b1f27);
  --panel-warm: linear-gradient(145deg, #171a20, #101318 58%, #1b1f27);
}

html[data-edition-v2="active"] body {
  background: radial-gradient(circle at 76% -8%, color-mix(in srgb, var(--edition-accent) 7%, transparent), transparent 34rem), var(--edition-surface-0);
  background-attachment: fixed;
  color: var(--edition-text-1);
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  line-height: 1.78;
}
html[data-edition-v2="active"] .container-page { max-width: 80rem; }
html[data-edition-v2="active"] header.sticky { border-color: var(--edition-line); background: color-mix(in srgb, var(--edition-surface-0) 91%, transparent); box-shadow: 0 16px 38px -34px #000; }
html[data-edition-v2="active"] header .container-page { min-height: 68px; padding-block: 10px; }
html[data-edition-v2="active"] header a[href="/"] { position: relative; }
html[data-edition-v2="active"] header a[href="/"] > svg:first-child { visibility: hidden; }
html[data-edition-v2="active"] header a[href="/"]::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 0;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  background: url("/_next/static/localization/edition-v2-book.svg") center / contain no-repeat;
}
html[data-edition-v2="active"] header [role="group"][aria-label="Theme"],
html[data-edition-v2="active"] .onez-source-link { display: none !important; }
html[data-edition-v2="active"] [data-onez-edition-hidden][hidden] { display: none !important; }
/* The Chinese learning edition is long-form only. Keep every chapter article,
   but remove the parallel slide player, its launcher, and the read/slides switch. */
html[data-edition-v2="active"] :is(.csl-glide-row,.csl-embed,.csl-cover,.csl-overlay) {
  display: none !important;
}
html[data-edition-v2="active"] header a[href="/"] > span.font-sans::after,
html[data-edition-v2="active"] footer a[href="/"] > span.font-sans::after { content: " 造物书"; color: var(--edition-accent); font-weight: 700; }
html[data-edition-v2="active"] :is(h1,h2,h3,h4,.display,.display-sm) { letter-spacing: -.035em; text-wrap: balance; }
html[data-edition-v2="active"] :is(.display,.display-sm) { font-weight: 680; }
html[data-edition-v2="active"] .eyebrow { color: var(--edition-accent-strong); letter-spacing: .08em; text-transform: none; }
html[data-edition-v2="active"] :is(.card,.rounded-2xl,.rounded-3xl,.fws-card) { border-color: var(--edition-line); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--edition-text-1) 4%, transparent), inset 0 0 0 1px var(--edition-line), var(--edition-shadow); }
html[data-edition-v2="active"] :is(.card,.rounded-2xl,.rounded-3xl,.fws-card):hover { border-color: color-mix(in srgb, var(--edition-accent) 42%, var(--edition-line)); }
html[data-edition-v2="active"] :is(.btn-sage,.btn-primary) { background: linear-gradient(135deg,#9aa7ff,#7387f6); color: #10131e; box-shadow: inset 0 1px 0 rgba(255,255,255,.36),0 12px 28px -18px color-mix(in srgb,var(--edition-accent) 82%,transparent); }
html[data-edition-v2="active"] :is(a,button):focus-visible { outline: 2px solid var(--edition-accent); outline-offset: 3px; }
html[data-edition-v2="active"] .band-dark { background: var(--edition-surface-1); color: var(--edition-text-2); }
html[data-edition-v2="active"] .band-dark::before { opacity: .035; }
html[data-edition-v2="active"] footer#subscribe .text-sage-dim { color: var(--edition-text-3); }
html[data-edition-v2="active"] .prose-body { color: var(--edition-text-2); overflow-wrap: anywhere; }
html[data-edition-v2="active"] .prose-body :is(h2,h3,h4,strong,a) { color: var(--edition-text-1); }
html[data-edition-v2="active"] .prose-body table,
html[data-edition-v2="active"] .prose-body pre { border-color: var(--edition-line); background: var(--edition-surface-1); }
html[data-edition-v2="active"] .prose-body :is(th,td) { border-color: var(--edition-line); }
html[data-edition-v2="active"] :is(.fws-card,.fws-head,.fws-band,.fws-cell,.fws-station) { background: var(--edition-surface-1); border-color: var(--edition-line); }
html[data-edition-v2="active"] .fws-head { background: color-mix(in srgb,var(--edition-surface-2) 82%,var(--edition-surface-1)); }
html[data-edition-v2="active"] .fws-out { background: var(--edition-surface-2); border-color: var(--edition-line); }
html[data-edition-v2="active"] .fws-act:hover { background: color-mix(in srgb,var(--fa) 11%,var(--edition-surface-1)); text-decoration: none; }
/* Chinese book spines read upright, never through the source's 180 degree flip. */
html[data-edition-v2="active"] .cs-book { padding-inline: 3px; }
html[data-edition-v2="active"] .cs-ttl { writing-mode: vertical-rl; text-orientation: upright; transform: none; white-space: normal; overflow: hidden; text-overflow: clip; font-size: max(12px, var(--edition-spine-size, 12px)); line-height: 1.22; box-sizing: border-box; }
html[data-edition-v2="active"] .cs-ttlwrap { width: 100%; overflow: visible; }

html[data-edition-v2="active"] .edition-v2-source-menu { position: relative; }
html[data-edition-v2="active"] .edition-v2-source-menu > button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 7px 10px; border: 1px solid var(--edition-line-strong); border-radius: 9px; background: color-mix(in srgb,var(--edition-surface-1) 92%,transparent); color: var(--edition-text-1); font-size: .8rem; font-weight: 650; line-height: 1; }
html[data-edition-v2="active"] .edition-v2-source-menu > button:hover,
html[data-edition-v2="active"] .edition-v2-source-menu > button[aria-expanded="true"] { border-color: var(--edition-accent); background: color-mix(in srgb,var(--edition-accent) 10%,var(--edition-surface-1)); }
html[data-edition-v2="active"] .edition-v2-source-menu [role="menu"] { position: absolute; z-index: 70; top: calc(100% + 8px); right: 0; width: max-content; max-width: min(300px,calc(100vw - 28px)); padding: 6px; border: 1px solid var(--edition-line-strong); border-radius: 10px; background: var(--edition-surface-1); box-shadow: var(--edition-shadow); }
html[data-edition-v2="active"] .edition-v2-source-menu [role="menu"] a,
html[data-edition-v2="active"] .edition-v2-source-mobile { display: flex; align-items: center; gap: 7px; padding: 9px 10px; border-radius: 6px; color: var(--edition-text-1); font-size: .8rem; font-weight: 600; text-decoration: none; }
html[data-edition-v2="active"] .edition-v2-source-menu [role="menu"] a:hover,
html[data-edition-v2="active"] .edition-v2-source-mobile:hover { background: color-mix(in srgb,var(--edition-accent) 10%,var(--edition-surface-1)); }
html[data-edition-v2="active"] .edition-v2-source-mobile { min-height: 42px; margin-top: 8px; border: 1px solid var(--edition-line); border-radius: 9px; font-size: .875rem; }
@media (max-width: 767px) { html[data-edition-v2="active"] body { font-size: 16px; line-height: 1.72; } html[data-edition-v2="active"] .container-page { padding-inline: 18px; } html[data-edition-v2="active"] header .container-page { min-height: 60px; } }
@media (prefers-reduced-motion: reduce) { html[data-edition-v2="active"] *,html[data-edition-v2="active"] *::before,html[data-edition-v2="active"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1!important; transition-duration: .01ms!important; } }
