/* SOURCE VERSION: v1.0.10 / 2026-09-05 */
/* Taste polish: editorial hierarchy, restrained motion, image-led atmosphere. */
:root {
  --sans: "Cabinet Grotesk", "Arial Narrow", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --skill-ink: #0b1214;
  --skill-paper: #f2eee7;
  --skill-jade: #79b5a5;
  --skill-coral: #ed654f;
  --skill-gold: #e2b568;
  --skill-blue: #879fc5;
  --motion-ui: .36s;
  --motion-scene: .92s;
  --motion-cinematic: 1.35s;
}

html { scroll-behavior: auto; }
body {
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: var(--skill-ink);
}
main { width: 100%; max-width: 100%; overflow-x: clip; overflow-y: visible; }
button, input, textarea { font-family: inherit; }
::selection { color: var(--skill-ink); background: rgba(226,181,104,.76); }

/* Keep scene layers out of document flow; this prevents time-based height drift. */
.skill-polish-ready .opening-chapter > .image-opening-depth,
.skill-polish-ready .opening-chapter > .opening-hero-readout,
.skill-polish-ready .opening-chapter > .opening-narration,
.skill-polish-ready .opening-chapter > .opening-surface-canvas,
.skill-polish-ready .voice-chapter > .back-canvas {
  position: absolute;
}
.skill-polish-ready .opening-chapter > .image-opening-depth { inset: 0; }
.skill-polish-ready .opening-chapter > .opening-hero-readout { top: auto; right: var(--page-padding); bottom: 34%; left: auto; }
.skill-polish-ready .opening-chapter > .opening-narration { top: auto; right: auto; bottom: 9%; left: 7%; }
.skill-polish-ready .opening-chapter .opening-copy { width: 100%; padding-left: 0; }

/* The fixed rail is the single chapter recognition system. */
.skill-polish-ready .chapter-title-rail {
  top: clamp(82px, 9vh, 112px);
  left: clamp(24px, 6vw, 112px);
  width: min(400px, 34vw);
  min-height: 78px;
  contain: layout paint;
}
.skill-polish-ready .chapter-title-rail::before {
  top: 4px;
  left: -16px;
  height: 64px;
  background: linear-gradient(180deg, var(--skill-coral), rgba(121,181,165,.12));
}
.skill-polish-ready .chapter-rail-slot { gap: 5px; transition: none; }
.skill-polish-ready .chapter-rail-slot small {
  color: var(--skill-coral);
  font-size: 9px;
  letter-spacing: .22em;
}
.skill-polish-ready .chapter-rail-slot strong {
  color: var(--skill-paper);
  font: clamp(18px, 1.75vw, 27px)/1.08 var(--sans);
  font-weight: 500;
  letter-spacing: .08em;
}
.skill-polish-ready .chapter-rail-slot span {
  margin-top: 2px;
  color: rgba(242,238,231,.76);
  font: clamp(21px, 2.35vw, 34px)/1.02 var(--serif);
  letter-spacing: -.04em;
}
.skill-polish-ready .chapter-index { opacity: .62; }

/* Opening: preserve the scene, sharpen the editorial split. */
.skill-polish-ready .opening-chapter {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(12px, 2.1vw, 32px);
}
.skill-polish-ready .opening-chapter .opening-copy {
  grid-column: 2 / span 5;
  max-width: 650px;
}
.skill-polish-ready .opening-copy h1 {
  max-width: 860px;
  margin-top: 20px;
  font-size: clamp(4.2rem, 8.25vw, 9rem);
  line-height: .9;
  letter-spacing: -.105em;
  text-wrap: balance;
}
.skill-polish-ready .opening-copy .opening-line {
  max-width: 340px;
  margin-top: clamp(32px, 4vw, 58px);
  color: rgba(242,238,231,.74);
  font-size: clamp(16px, 1.35vw, 21px);
  line-height: 1.72;
}
.skill-polish-ready .opening-chapter .opening-mark-wrap {
  grid-column: 8 / span 4;
  width: min(100%, 560px);
  justify-self: end;
  filter: drop-shadow(0 22px 52px rgba(0,0,0,.2));
}
.skill-polish-ready .opening-mark-wrap::before {
  content: '';
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(121,181,165,.13);
  border-radius: 50%;
  pointer-events: none;
}
.skill-polish-ready .opening-footer { grid-column: 2 / -2; }
.skill-polish-ready .opening-footer button,
.skill-polish-ready .restart-button,
.skill-polish-ready .save-button { transition: color var(--motion-ui) ease, border-color var(--motion-ui) ease, background-color var(--motion-ui) ease; }
.skill-polish-ready .opening-footer button:hover { background: var(--skill-paper); }
.skill-inline-river {
  display: inline-block;
  width: .62em;
  height: 1.62em;
  margin: 0 .08em -.2em .2em;
  border-radius: 999px;
  vertical-align: baseline;
  background: url('../generated/01_yellow_river_silt.webp') center / cover;
  filter: saturate(.78) hue-rotate(130deg) contrast(1.08);
  opacity: .82;
}

/* River: real water is the dominant visual layer, with the existing sound line in front. */
.skill-polish-ready .river-chapter { background: #092d3a; }
.skill-polish-ready .river-chapter .image-river-system {
  inset: 0;
  background: #092d3a;
}
.skill-polish-ready .river-chapter .image-river-system::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(4,20,28,.78), rgba(4,20,28,.2) 58%, rgba(4,20,28,.42)), linear-gradient(0deg, rgba(4,20,28,.7), transparent 48%);
  pointer-events: none;
}
.skill-polish-ready .image-river-system figure { transition: opacity var(--motion-cinematic) ease, clip-path var(--motion-cinematic) ease; }
.skill-polish-ready .image-river-system .river-hero {
  inset: 0 12% 0 0;
  opacity: .92;
  clip-path: polygon(0 2%, 100% 0, 96% 100%, 0 93%);
}
.skill-polish-ready .image-river-system .river-water {
  inset: 12% 0 0 52%;
  opacity: .28;
  mix-blend-mode: screen;
  clip-path: polygon(4% 0, 100% 9%, 94% 100%, 0 92%);
}
.skill-polish-ready .image-river-system figure img {
  object-position: center 56%;
  filter: saturate(.96) contrast(1.18) brightness(.62);
}
.skill-polish-ready .river-stage { background: linear-gradient(180deg, rgba(121,181,165,.11), transparent 68%); }
.skill-polish-ready .river-pulse span { box-shadow: 0 0 18px rgba(121,181,165,.42); }

/* Human: map and field are the core, not a dashboard garnish. */
.skill-polish-ready .human-chapter {
  background: #f2eee7;
  isolation: isolate;
}
.skill-polish-ready .human-chapter .human-header { max-width: 1180px; margin-right: auto; }
.skill-polish-ready .human-header h2 { max-width: 720px; }
.skill-polish-ready .human-field { min-height: 650px; }
.skill-polish-ready .human-chapter .field-map {
  left: 9%;
  width: min(58vw, 720px);
  height: 600px;
  padding: 12px;
  border: 1px solid rgba(17,22,25,.14);
  background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(121,181,165,.06));
  box-shadow: 18px 18px 0 rgba(17,22,25,.035);
}
.skill-polish-ready .human-chapter .field-map svg { position: relative; z-index: 2; }
.skill-polish-ready .human-chapter .field-map .province-outline {
  fill: rgba(121,181,165,.16);
  stroke: rgba(17,22,25,.58);
  stroke-width: 1.2;
}
.skill-polish-ready .human-chapter .field-map .field-river { stroke-width: 2; opacity: .94; }
.skill-map-spotlight {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background: radial-gradient(circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(237,101,79,.18), transparent 23%);
  mix-blend-mode: multiply;
  transition: opacity .5s ease, background-position .2s ease;
}
.skill-polish-ready .human-photo { box-shadow: 13px 15px 0 rgba(17,22,25,.08); }
.skill-polish-ready .human-sounds { max-width: 360px; }

/* Ancient layer: the timeline is a reading spine, images remain atmospheric. */
.skill-polish-ready .ancient-chapter { background: #1b1d1b; }
.skill-polish-ready .civilization-timeline { position: relative; }
.skill-polish-ready .civilization-timeline::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 18%;
  height: 1px;
  background: var(--skill-coral);
}
.skill-polish-ready .civilization-node { transition: color var(--motion-ui) ease, background-color var(--motion-ui) ease; }
.skill-polish-ready .civilization-node:hover,
.skill-polish-ready .civilization-node.is-active { background: rgba(226,181,104,.11); }

/* New signal map: one network image, restrained data surfaces. */
.skill-polish-ready .new-signal-map {
  background: radial-gradient(circle at 50% 45%, rgba(121,181,165,.15), transparent 36%), linear-gradient(120deg, rgba(10,18,22,.2), rgba(135,159,197,.07));
  box-shadow: inset 0 0 80px rgba(0,0,0,.16);
}
.skill-threads-canvas { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .82; }
.skill-polish-ready .new-signal-map .signal-node { transition: border-color var(--motion-ui) ease, background-color var(--motion-ui) ease, box-shadow var(--motion-ui) ease; }
.skill-polish-ready .new-signal-map .signal-node:hover,
.skill-polish-ready .new-signal-map .signal-node:focus { box-shadow: 0 12px 28px rgba(0,0,0,.22); }

/* Archive: horizontal accordion rhythm instead of card stacking everywhere. */
.skill-polish-ready .archive-chapter-grid { grid-auto-flow: dense; }
.skill-polish-ready .archive-chapter-panel { min-width: 0; }
.skill-polish-ready .archive-system-list { scrollbar-color: rgba(121,181,165,.55) transparent; }
.skill-polish-ready .archive-chapter-row { transition: color var(--motion-ui) ease, padding-left var(--motion-ui) ease, background-color var(--motion-ui) ease; }
.skill-polish-ready .archive-chapter-row:focus-visible { outline: 1px solid var(--skill-gold); outline-offset: 4px; }
.skill-polish-ready .voice-wall { background: radial-gradient(circle at center, rgba(121,181,165,.15), transparent 49%), repeating-radial-gradient(circle at center, transparent 0 56px, rgba(121,181,165,.06) 57px 58px); }

/* Low-attention cursor; interaction should belong to the work. */
.skill-polish-ready .custom-cursor { width: 15px; height: 15px; top: -7px; left: -7px; opacity: .48; }
.skill-polish-ready .custom-cursor::before { inset: 5px; opacity: .66; }
.skill-polish-ready .custom-cursor::after { opacity: .28; }
.skill-polish-ready .custom-cursor.is-active { width: 22px; height: 22px; top: -10px; left: -10px; }

.skill-motion-image,
.skill-motion-image img { will-change: transform, opacity; }

@media (max-width: 1023px) {
  .skill-polish-ready .opening-chapter .opening-copy { grid-column: 1 / span 6; }
  .skill-polish-ready .opening-chapter .opening-mark-wrap { grid-column: 8 / span 5; }
  .skill-polish-ready .human-chapter .field-map { left: 3%; width: 63vw; }
  .skill-polish-ready .archive-chapter-grid { gap: 24px; }
}

@media (max-width: 760px) {
  .skill-polish-ready .chapter-title-rail { top: 78px; left: 30px; width: min(330px, 78vw); min-height: 72px; }
  .skill-polish-ready .chapter-title-rail::before { left: -11px; height: 58px; }
  .skill-polish-ready .chapter-rail-slot strong { font-size: 14px; letter-spacing: .12em; }
  .skill-polish-ready .chapter-rail-slot span { font-size: 23px; }
  .skill-polish-ready .opening-chapter { display: block; }
  .skill-polish-ready .opening-chapter .opening-copy { top: 25%; left: var(--page-padding); right: var(--page-padding); width: auto; }
  .skill-polish-ready .opening-copy h1 { max-width: 6em; font-size: clamp(4rem, 17vw, 6.5rem); line-height: .92; }
  .skill-polish-ready .opening-chapter .opening-mark-wrap { top: 48%; right: 7%; width: 58vw; }
  .skill-polish-ready .opening-copy .opening-line { max-width: 240px; font-size: 16px; }
  .skill-polish-ready .river-chapter .image-river-system .river-hero { inset: 0 0 18% 0; }
  .skill-polish-ready .river-chapter .image-river-system .river-water { inset: 35% 0 0 25%; opacity: .24; }
  .skill-polish-ready .human-chapter .field-map { left: 0; width: 100%; height: 445px; }
  .skill-polish-ready .human-field { min-height: 690px; }
  .skill-polish-ready .new-signal-map { height: 780px; }
  .skill-polish-ready .skill-threads-canvas { opacity: .54; }
  .skill-polish-ready .archive-chapter-grid { grid-template-columns: 1fr; }
  .skill-polish-ready .custom-cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .skill-polish-ready *,
  .skill-polish-ready *::before,
  .skill-polish-ready *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .skill-threads-canvas { display: none; }
  .skill-map-spotlight { opacity: .2; }
  .skill-motion-image,
  .skill-motion-image img { will-change: auto; }
}
