/* 展览图录：页面外壳保持安静，颜色只出现在图版和画框里 */
:root {
  --c-paper: oklch(0.972 0.006 85);
  --c-paper2: oklch(0.94 0.009 80);
  --c-ink: oklch(0.2 0.01 60);
  --c-muted: oklch(0.46 0.012 60);
  --c-rule: oklch(0.86 0.01 70);
  --c-seal: oklch(0.5 0.17 28);
  --c-room: oklch(0.185 0.008 60);
  --c-room2: oklch(0.235 0.009 60);
  --c-room3: oklch(0.285 0.01 60);
  --c-room-ink: oklch(0.93 0.01 80);
  --c-room-muted: oklch(0.72 0.012 70);
  --c-room-rule: oklch(0.34 0.01 60);
  --c-room-seal: oklch(0.74 0.13 40);
  --f-serif: "Noto Serif SC", "Songti SC", serif;
  --f-latin: "Bodoni Moda", "Noto Serif SC", serif;
  --f-sans: -apple-system, "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(20px, 4.5vw, 72px);
  --max: 1480px;
  --bar-h: 54px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-padding-top: var(--bar-h); }

body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font: 15px/1.75 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
em[lang="en"], .en { font-family: var(--f-latin); font-style: italic; font-weight: 400; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-serif); font-weight: 700; }
p { margin: 0; }
figure { margin: 0; }
picture { display: block; }
.skin-img picture, .study-img picture, .plate-visual picture { width: 100%; height: 100%; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 20; padding: 8px 12px; background: var(--c-ink); color: var(--c-paper); }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--c-seal); outline-offset: 3px; }
.room :focus-visible { outline-color: var(--c-room-ink); }

/* 顶栏 */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  height: var(--bar-h);
  padding: 0 var(--gutter);
  background: var(--c-paper);
  border-bottom: 1px solid var(--c-rule);
}

.brand { display: inline-flex; align-items: center; min-height: 40px; font: 700 17px var(--f-serif); text-decoration: none; white-space: nowrap; }
.brand em { margin-left: 6px; font-size: 16px; color: var(--c-muted); }

.bar nav { display: flex; gap: 4px; font-size: 14px; }
.bar nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; color: var(--c-muted); text-decoration: none; white-space: nowrap; transition: color 160ms ease-out; }
@media (hover: hover) { .bar nav a:hover { color: var(--c-ink); } }

/* 通用按钮 */
.btn {
  appearance: none;
  min-height: 40px;
  padding: 8px 14px;
  font: 500 14px var(--f-sans);
  color: inherit;
  background: transparent;
  border: 1px solid var(--c-rule);
  border-radius: 2px;
  cursor: pointer;
  transition: transform 120ms ease-out, background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-sm { padding: 4px 12px; font-size: 13px; }
@media (hover: hover) { .btn:not(:disabled):hover { border-color: currentColor; } }

.hero { max-width: var(--max); margin-inline: auto; padding: 40px var(--gutter) 28px; }
.hero-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.hero-head p { margin-bottom: 10px; font-size: 12px; letter-spacing: 0.12em; color: var(--c-muted); }
.hero-head h1 { font-size: clamp(30px, 3.8vw, 56px); line-height: 1.3; font-weight: 900; letter-spacing: -0.04em; }
.hero-head > a { display: inline-flex; align-items: center; gap: 24px; flex: none; min-height: 44px; font-size: 13px; text-decoration: none; border-bottom: 1px solid var(--c-ink); }
.hero-head > a span { font-size: 20px; }
.hero-slides { overflow: hidden; border: 1px solid var(--c-ink); }
.hero-slide { display: grid; grid-template-columns: 0.85fr 1.15fr; min-height: 540px; color: var(--ink); background: var(--bg); }
.hero-slide:not(:first-child) { display: none; }
.hero[data-enhanced] .hero-slide { display: grid; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: clamp(26px, 3.5vw, 52px); border-right: 1px solid var(--line); }
.hero-mix { display: flex; align-items: center; gap: 14px; font: 500 12px/1.5 var(--f-sans); }
.hero-mix > span { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--ink); font: 12px var(--f-mono); }
.hero-copy h2 { margin-top: 36px; font-size: clamp(28px, 2.7vw, 40px); line-height: 1.4; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.045em; }
.hero-copy h2 span { display: block; }
.hero-description { max-width: 25em; margin-top: 18px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.hero-cta { display: inline-flex; align-items: center; gap: 32px; min-height: 46px; margin-top: 26px; padding: 8px 18px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-size: 14px; font-weight: 600; }
.hero-cta span { font-size: 21px; line-height: 1; }
.hero-roles { margin-top: auto; padding-top: 24px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.hero-slide :focus-visible { outline-color: var(--ink); }
.hero-poster.pv { min-height: 0; transition: none; }
.hero .hero-poster.pv .pv-tex { opacity: calc(var(--tex-level) * 0.24); }
.hero-poster-content { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr auto; gap: 20px 0; height: 100%; min-height: 540px; padding: 28px 32px 0; }
.hero-poster-meta { grid-column: 1 / -1; font: 11px/1.5 var(--f-sans); letter-spacing: 0.08em; }
.hero-wordmark { grid-column: 1 / 8; grid-row: 2; align-self: start; position: relative; z-index: 2; margin-top: 20px; font: var(--display-weight) clamp(72px, 19cqi, 142px)/0.86 var(--font-display); letter-spacing: var(--display-tracking); text-transform: var(--display-transform); }
.hero-wordmark > span { display: block; }
.hero-period { color: var(--accent); }
.hero-art { position: relative; grid-column: 8 / -1; grid-row: 2; align-self: end; aspect-ratio: 1; margin-bottom: 25px; overflow: hidden; border-radius: 50%; background: var(--surface); }
.hero-art picture, .hero-art img { display: block; width: 100%; height: 100%; }
.hero-art img { object-fit: cover; }
.hero-shapes { grid-column: 1 / 7; grid-row: 2; align-self: end; display: flex; align-items: flex-end; gap: 18px; padding-bottom: 28px; }
.hero-shapes i { display: block; width: 58px; aspect-ratio: 1; background: var(--accent2); }
.hero-shapes i:nth-child(2) { width: 66px; background: var(--accent); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.hero-shapes i:nth-child(3) { width: 30px; border-radius: 50%; background: var(--accent3); }
.hero-poster-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; font: 11px var(--f-sans); border-top: 6px solid var(--line); }
.hero-slide[data-s="bauhaus"] .hero-copy { border-right-width: 6px; }
.hero-slide[data-s="bauhaus"] .hero-poster-meta { padding-bottom: 12px; border-bottom: 6px solid var(--line); }
.hero-slide[data-s="minimalism"] .hero-copy { border: 0; }
.hero-slide[data-s="minimalism"] .hero-poster-content { padding: 32px 40px 0; gap: 26px 0; }
.hero-slide[data-s="minimalism"] .hero-wordmark { grid-column: 1 / -1; margin: 0; font-size: clamp(46px, 12cqi, 88px); line-height: 1; }
.hero-slide[data-s="minimalism"] .hero-wordmark > span { display: inline; }
.hero-slide[data-s="minimalism"] .hero-art { grid-column: 1 / -1; align-self: end; height: 210px; aspect-ratio: auto; margin: 110px 0 0; border-radius: 0; }
.hero-slide[data-s="minimalism"] .hero-shapes, .hero-slide[data-s="minimalism"] .hero-period { display: none; }
.hero-slide[data-s="minimalism"] .hero-poster-foot { border: 0; color: var(--muted); }
.hero-slide[data-s="art-deco"] .hero-copy { align-items: center; text-align: center; border: 0; }
.hero-slide[data-s="art-deco"] .hero-copy h2 { font-family: var(--f-serif); font-size: clamp(27px, 2.5vw, 38px); }
.hero-slide[data-s="art-deco"] .hero-mix > span { border: 0; border-block: 1px solid var(--line); }
.hero-slide[data-s="art-deco"] .hero-poster-content { margin: 18px; height: calc(100% - 36px); min-height: 504px; padding: 22px 30px 0; border: 1px solid var(--line); outline: 1px solid var(--line); outline-offset: -7px; justify-items: center; text-align: center; gap: 16px 0; }
.hero-slide[data-s="art-deco"] .hero-wordmark { grid-column: 1 / -1; align-self: start; margin: 0; font-size: clamp(46px, 10cqi, 100px); line-height: 1; letter-spacing: 0.06em; }
.hero-slide[data-s="art-deco"] .hero-wordmark > span { display: inline; }
.hero-slide[data-s="art-deco"] .hero-art { grid-column: 3 / 11; height: 215px; width: 100%; margin: 110px 0 0; border-radius: 50% 50% 0 0; border: 1px solid var(--line); outline: 1px solid var(--line); outline-offset: 5px; }
.hero-slide[data-s="art-deco"] .hero-shapes, .hero-slide[data-s="art-deco"] .hero-period { display: none; }
.hero-slide[data-s="art-deco"] .hero-poster-foot { width: 100%; border-top: 1px solid var(--line); }
.hero-slide[data-s="memphis"] .hero-copy { border: 0; }
.hero-slide[data-s="memphis"] .hero-cta { border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); transform: rotate(-2deg); }
.hero-slide[data-s="memphis"] .hero-wordmark { grid-column: 1 / 8; transform: rotate(-4deg); font-size: clamp(60px, 15cqi, 105px); }
.hero-slide[data-s="memphis"] .hero-art { grid-column: 9 / -1; border-radius: 0; transform: rotate(5deg); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); margin-bottom: 24px; }
.hero-slide[data-s="memphis"] .hero-shapes i:first-child { border: 3px solid var(--ink); transform: rotate(-6deg); }
.hero-slide[data-s="memphis"] .hero-shapes i:last-child { width: 46px; border: 3px solid var(--ink); }
.hero-slide[data-s="memphis"] .hero-poster-foot { border-top-width: 3px; }
.hero-controls { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; align-items: center; gap: 24px; padding-top: 16px; }
.hero-controls button { appearance: none; color: var(--c-ink); background: transparent; border: 1px solid var(--c-rule); cursor: pointer; font: 12px var(--f-sans); min-height: 44px; }
.hero-rotation { padding: 0 12px; }
.hero-controls button:disabled { color: var(--c-muted); cursor: default; }
.hero-pickers { display: flex; justify-content: center; gap: 8px; }
.hero-pickers button { display: inline-flex; align-items: center; gap: 10px; padding: 0 14px; border-color: transparent; }
.hero-pickers button > span:first-child { font-family: var(--f-mono); }
.hero-pickers button[aria-pressed="true"] { color: var(--c-paper); background: var(--c-ink); border-color: var(--c-ink); }
.hero-arrows { display: flex; gap: 6px; }
.hero-arrows button { width: 44px; font-size: 22px; }
.hero-controls button:not(:disabled):hover { border-color: var(--c-ink); }
.hero-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hero-combinations { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; min-height: 44px; margin-top: 16px; font-size: 12px; }
.hero-combinations > span { color: var(--c-muted); }
.hero-combinations a { min-height: 32px; text-underline-offset: 4px; }
.hero[data-enhanced] .hero-combinations { display: none; }
.hero-disclaimer { margin-top: 16px; font-size: 11px; color: var(--c-muted); }
.hero[data-transition="true"] .hero-slide:not([hidden]) .hero-poster-content { animation: hero-enter 240ms ease-out; }
@keyframes hero-enter { from { opacity: 0.6; } to { opacity: 1; } }
@media (max-width: 1100px) {
  .hero-controls { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
  .hero-pickers button { padding-inline: 12px; }
  .hero-pickers button > span:last-child { display: none; }
  .hero-copy { padding: 28px; }
  .hero-copy h2 { font-size: 30px; }
  .hero-description { font-size: 13px; }
  .hero-poster-content { padding-inline: 24px; }
  .hero-shapes { gap: 10px; }
  .hero-shapes i { width: 40px; }
  .hero-shapes i:nth-child(2) { width: 46px; }
}
@media (max-width: 720px) {
  .hero { padding-top: 28px; }
  .hero-head { display: block; margin-bottom: 22px; }
  .hero-head > a { margin-top: 12px; min-height: 36px; font-size: 12px; gap: 16px; }
  .hero-head p { font-size: 10px; }
  .hero-slide, .hero[data-enhanced] .hero-slide { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { min-height: 330px; padding: 22px 24px 26px; border-right: 0 !important; }
  .hero-poster { order: -1; }
  .hero-copy h2 { margin-top: 22px; font-size: clamp(26px, 6.8vw, 36px); }
  .hero-description { margin-top: 12px; max-width: 30em; }
  .hero-cta { margin-top: 20px; min-height: 44px; font-size: 13px; }
  .hero-roles { display: none; }
  .hero-poster-content { grid-template-rows: auto auto 1fr auto; gap: 10px 0; height: 350px; min-height: 350px; padding: 20px 24px 0; }
  .hero-wordmark { grid-column: 1 / -1; margin: 0; font-size: clamp(42px, 18cqi, 72px); line-height: 1; }
  .hero-wordmark > span { display: inline; }
  .hero-art { grid-column: 7 / -1; grid-row: 3; justify-self: end; width: min(100%, 165px); margin-bottom: 0; }
  .hero-shapes { grid-row: 3; padding-bottom: 12px; }
  .hero-poster-foot { grid-row: 4; min-height: 44px; font-size: 9px; }
  .hero-poster-meta { font-size: 10px; }
  .hero-slide[data-s="minimalism"] .hero-poster-content { gap: 12px 0; padding: 22px 24px 0; }
  .hero-slide[data-s="minimalism"] .hero-wordmark { font-size: clamp(38px, 14cqi, 62px); }
  .hero-slide[data-s="minimalism"] .hero-art { width: 100%; height: 165px; margin-top: 0; }
  .hero-slide[data-s="art-deco"] .hero-copy h2 { font-size: 27px; }
  .hero-slide[data-s="art-deco"] .hero-poster-content { gap: 12px 0; height: 326px; min-height: 326px; margin: 12px; padding: 20px 20px 0; }
  .hero-slide[data-s="art-deco"] .hero-wordmark { font-size: clamp(40px, 15cqi, 56px); }
  .hero-slide[data-s="art-deco"] .hero-art { grid-column: 3 / 11; height: 145px; margin-top: 0; }
  .hero-slide[data-s="memphis"] .hero-wordmark { grid-column: 1 / -1; font-size: clamp(32px, 13cqi, 62px); }
  .hero-slide[data-s="memphis"] .hero-art { grid-column: 7 / -1; margin: 0 8px 12px 0; }
  .hero-controls { gap: 8px; padding-top: 12px; }
  .hero-controls button { min-height: 44px; font-size: 11px; }
  .hero-rotation { padding: 0 8px; }
  .hero-pickers { gap: 3px; }
  .hero-pickers button { padding: 0 8px; min-width: 28px; }
  .hero-arrows { gap: 4px; }
  .hero-arrows button { width: 34px; font-size: 18px; }
  .hero-disclaimer { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero[data-transition="true"] .hero-slide:not([hidden]) .hero-poster-content { animation: none; }
}

/* 工作台：暗室 */
.room { background: var(--c-room); color: var(--c-room-ink); }
.room .btn { border-color: var(--c-room-rule); }
.room .btn[aria-pressed="true"] { color: var(--c-room); background: var(--c-room-ink); border-color: var(--c-room-ink); }

.bench {
  display: grid;
  grid-template-columns: clamp(380px, 37vw, 540px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "intro stage" "steps stage";
  gap: 0 clamp(32px, 3.6vw, 56px);
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px var(--gutter) 64px;
}

.bench-intro { grid-area: intro; padding-bottom: 22px; }
.bench-intro h2 { font-size: clamp(26px, 2.3vw, 32px); font-weight: 900; line-height: 1.3; }
.rule { margin-top: 6px; font-size: 15px; color: var(--c-room-muted); }
.rule b { color: var(--c-room-ink); font-weight: 600; }
.bench-summary { margin-bottom: 8px; font-size: 12px; color: var(--c-room-seal); }
.bench-about { margin-top: 10px; font-size: 13px; color: var(--c-room-muted); }
.bench-about a { display: inline-block; text-underline-offset: 3px; }
html:not(.js) .bench-stage, html:not(.js) .bench-steps { display: none; }
html:not(.js) .bench { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro"; }
html:not(.js) .install .targets, html:not(.js) .install .sheet, html:not(.js) .install-usage { display: none; }

.bench-steps { grid-area: steps; min-width: 0; }
.step + .step { margin-top: 22px; }

.step-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.step-head h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; line-height: 1.4; }
.step-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--c-room-ink); border-radius: 50%; font: 400 13px/1 var(--f-latin); }
.step-cap { flex: 1; min-width: 0; font-size: 13px; color: var(--c-room-muted); }
.step-count { font: 400 13px var(--f-sans); color: var(--c-room-muted); }

/* ① 骨架：灰阶缩略页，只比较排版 */
.skels { container-type: inline-size; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 8px; }

.skel {
  appearance: none;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 0;
  font: inherit;
  color: var(--c-room-muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: transform 120ms ease-out, color 160ms ease-out;
}
.skel .thumb { background: var(--c-room2); outline: 1px solid var(--c-room-rule); transition: outline-color 160ms ease-out; }
.skel-name { font-size: 12.5px; line-height: 1.3; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skel:active { transform: scale(0.97); }
.skel[aria-pressed="true"] { color: var(--c-room-ink); }
.skel[aria-pressed="true"] .thumb { outline: 2px solid var(--c-room-ink); outline-offset: 2px; }
.skel[aria-pressed="true"] .skel-name { font-weight: 600; }
@media (hover: hover) {
  .skel:hover { color: var(--c-room-ink); }
  .skel:not([aria-pressed="true"]):hover .thumb { outline-color: var(--c-room-muted); }
}

/* ② 表皮：横向滚动的画片 */
.skin-groups { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 6px; }
.grp {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  font: 500 13px var(--f-sans);
  color: var(--c-room-muted);
  background: transparent;
  border: 1px solid var(--c-room-rule);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 120ms ease-out, color 160ms ease-out, background-color 160ms ease-out, border-color 160ms ease-out;
}
.grp span { font-size: 12px; opacity: 0.75; }
.grp:active { transform: scale(0.97); }
.grp.is-on { color: var(--c-room-ink); border-color: var(--c-room-muted); background: var(--c-room2); }
@media (hover: hover) { .grp:hover { color: var(--c-room-ink); } }

.skins {
  --card: clamp(104px, calc((100cqi - 32px) / 4.4), 128px);
  container-type: inline-size;
  position: relative;
  display: flex;
  gap: 8px;
  padding: 6px 6px 10px;
  margin: -2px -6px 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--c-room-rule) transparent;
}
.skin-group { display: flex; gap: 8px; }
.skin-group + .skin-group { padding-left: 13px; margin-left: 5px; border-left: 1px solid var(--c-room-rule); }

.skin {
  appearance: none;
  flex: 0 0 var(--card);
  display: grid;
  gap: 5px;
  width: var(--card);
  padding: 0;
  font: inherit;
  text-align: left;
  color: var(--c-room-muted);
  background: none;
  border: 0;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 120ms ease-out, color 160ms ease-out;
}
.skin-img {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sw-bg) 0 50%, var(--sw-accent) 50% 100%);
  outline: 1px solid var(--c-room-rule);
  transition: outline-color 160ms ease-out;
}
.skin-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.skin[data-img="none"] .skin-img img { display: none; }
.skin-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12.5px; line-height: 1.3; white-space: nowrap; }
.skin-chip { display: inline-flex; flex: none; box-shadow: 0 0 0 1px oklch(1 0 0 / 0.14); }
.skin-chip i { display: block; width: 7px; height: 7px; }
.skin-chip i:nth-child(1) { background: var(--sw-bg); }
.skin-chip i:nth-child(2) { background: var(--sw-accent); }
.skin-chip i:nth-child(3) { background: var(--sw-accent2); }
.skin:active { transform: scale(0.97); }
.skin[aria-pressed="true"] { color: var(--c-room-ink); }
.skin[aria-pressed="true"] .skin-img { outline: 2px solid var(--c-room-ink); outline-offset: 2px; }
.skin[aria-pressed="true"] .skin-name { font-weight: 600; }
@media (hover: hover) {
  .skin:hover { color: var(--c-room-ink); }
  .skin:not([aria-pressed="true"]):hover .skin-img { outline-color: var(--c-room-muted); }
}

/* ③ 提示词 */
.sheet { display: flex; flex-direction: column; min-width: 0; background: var(--c-paper2); border-top: 2px solid var(--c-ink); }
.sheet header { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--c-rule); }
.sheet header > span { flex: 1; min-width: 0; font-size: 12px; color: var(--c-muted); overflow-wrap: anywhere; }
.sheet pre {
  margin: 0;
  padding: 16px 18px 20px;
  max-height: 480px;
  overflow: auto;
  font: 12.5px/1.7 var(--f-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.room .sheet { background: var(--c-room2); border-top-color: var(--c-room-ink); }
.room .sheet pre { max-height: 320px; padding: 12px 16px 16px; font-size: 12px; color: var(--c-room-ink); }
.room #code-out { min-height: 320px; }

.sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px 0 6px; border-bottom: 1px solid var(--c-room-rule); }
.tabs { display: flex; }
.tab {
  appearance: none;
  min-height: 44px;
  padding: 0 12px;
  font: 700 15px var(--f-serif);
  color: var(--c-room-muted);
  background: none;
  border: 0;
  box-shadow: inset 0 -2px 0 transparent;
  cursor: pointer;
  transition: transform 120ms ease-out, color 160ms ease-out, box-shadow 160ms ease-out;
}
.tab:active { transform: scale(0.97); }
.tab[aria-selected="true"] { color: var(--c-room-ink); box-shadow: inset 0 -2px 0 var(--c-room-ink); }
@media (hover: hover) { .tab:hover { color: var(--c-room-ink); } }

.panel-meta { padding: 10px 16px 0; font-size: 12px; color: var(--c-room-muted); }

.subject { display: grid; gap: 6px; padding: 10px 16px 0; font-size: 12px; color: var(--c-room-muted); }
.subject input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  font: 13px var(--f-mono);
  color: var(--c-room-ink);
  background: var(--c-room);
  border: 1px solid var(--c-room-rule);
  border-radius: 2px;
}
.subject input::placeholder { color: var(--c-room-muted); opacity: 0.8; }

.takeaway { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.takeaway-k { margin-right: 4px; font: 700 15px var(--f-serif); }
.takeaway-note, .takeaway-msg { flex-basis: 100%; font-size: 12.5px; line-height: 1.6; color: var(--c-room-muted); }
.takeaway-msg { color: var(--c-room-seal); }
.takeaway-msg:empty { display: none; }
.btn[aria-busy="true"] { cursor: progress; }

.to-install { display: inline-flex; align-items: center; min-height: 40px; margin-top: 4px; font-size: 13px; color: var(--c-room-muted); text-underline-offset: 4px; }
@media (hover: hover) { .to-install:hover { color: var(--c-room-ink); } }

.bench-steps .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--c-room-rule); }
.hint { min-height: 1.75em; margin-top: 10px; font-size: 13px; color: var(--c-room-muted); }

/* 舞台：900px 宽的示例页按比例缩小，不重排 */
.bench-stage {
  grid-area: stage;
  align-self: start;
  width: 100%;
  min-width: 0;
}

.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; margin-bottom: 8px; }
.stage-head h2 { font-size: 15px; line-height: 1.4; }
.stage-head h2 span { margin-left: 6px; font: 400 13px var(--f-sans); color: var(--c-room-muted); }

.frame { padding: 8px; background: oklch(0.1 0.005 60); outline: 1px solid var(--c-room-rule); }
.mat { padding: clamp(8px, 1.1vw, 14px); background: oklch(0.985 0.003 80); }

.stage-view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.stage-view.is-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stage-fig { display: grid; gap: 8px; min-width: 0; }
.stage-fig figcaption { font-size: 12.5px; line-height: 1.5; color: var(--c-muted); }
.stage-fig figcaption .cap-k { display: block; font: 700 14px var(--f-serif); color: var(--c-ink); }
.stage-fig figcaption b { font-weight: 500; color: var(--c-ink); }
.stage-fig figcaption b.chg { font-weight: 700; color: var(--c-seal); }

.note { display: grid; gap: 2px; margin-top: 12px; padding: 10px 16px 12px; background: var(--c-room3); font-size: 14px; line-height: 1.6; }
.note-k { font-size: 12px; letter-spacing: 0.08em; color: var(--c-room-seal); }
.to-duo { display: none; }

/* 两栏展签：骨架和表皮各自是谁 */
.duo { container-type: inline-size; margin-top: 2px; background: var(--c-room2); font-size: 13px; line-height: 1.65; }
.duo-k { padding: 10px 16px 0; font: 400 12px/1.5 var(--f-sans); letter-spacing: 0.08em; color: var(--c-room-muted); }
.duo-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.duo-cols.is-pure { grid-template-columns: minmax(0, 1fr); }
.duo-col { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 8px 16px 14px; }
.duo-col + .duo-col { border-left: 1px solid var(--c-room-rule); }
.duo-meta { font-size: 12px; color: var(--c-room-muted); }
.duo-meta b { font-weight: 600; color: var(--c-room-ink); }
.duo h4 { font-size: 16px; line-height: 1.35; }
.duo h4 .en { font-size: 14px; color: var(--c-room-muted); }
.duo-sub { font: 400 13px var(--f-sans); color: var(--c-room-muted); }
.duo-intro { margin-top: 2px; font-size: 13.5px; line-height: 1.7; color: var(--c-room-ink); text-wrap: pretty; }
.duo-does { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 0 12px; margin-top: 6px; }
.duo-does > span { font-size: 12px; color: var(--c-room-muted); }
.duo-does ul { margin: 0; padding: 0; list-style: none; }
.duo-does li { text-wrap: pretty; }
.duo-cap { display: inline-block; }
@container (max-width: 560px) {
  .duo-cols { grid-template-columns: minmax(0, 1fr); }
  .duo-col + .duo-col { border-left: 0; border-top: 1px solid var(--c-room-rule); }
}

.label { margin-top: 2px; background: var(--c-room2); font-size: 13px; }
.label summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 16px;
  list-style: none;
  cursor: pointer;
}
.label summary::-webkit-details-marker { display: none; }
.label .more { flex: none; font-size: 12px; color: var(--c-room-muted); }
.label .more::after { content: " ↓"; }
.label details[open] .more::after { content: " ↑"; }
@media (hover: hover) { .label summary:hover .more { color: var(--c-room-ink); } }
.label-body { padding: 0 16px 14px; }
.label h4 { font-size: 16px; line-height: 1.35; }
.label h4 .en { font-size: 14px; color: var(--c-room-muted); }
.label .thesis { color: var(--c-room-muted); }
.label dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; margin: 0; }
.label dt { color: var(--c-room-muted); }
.label dd { margin: 0; }
.label .warn { color: oklch(0.72 0.15 40); }

/* 章节 */
.chapter { max-width: var(--max); margin-inline: auto; padding: 96px var(--gutter) 112px; }
.chapter + .chapter { border-top: 1px solid var(--c-rule); }

.chapter-head { display: grid; gap: 10px; margin-bottom: 56px; }
.chapter-head h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.2; }
.chapter-head p { max-width: 40em; font-size: 16px; color: var(--c-muted); }

.group-head {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: 12px 48px;
  align-items: baseline;
  margin: 0 0 32px;
  padding-top: 18px;
  border-top: 1px solid var(--c-ink);
}
.group-head h3 { font-size: 22px; }
.group-head p { max-width: 44em; color: var(--c-muted); }
.plates + .group-head { margin-top: 96px; }

/* 图版 */
.plates { display: grid; gap: 64px 40px; }
.plates-structure { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plates-surface { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; }

.plate { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.plate-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--c-rule); font-size: 13px; color: var(--c-muted); }
.plate-no { font: italic 400 15px var(--f-latin); color: var(--c-ink); }
.plate h4 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 28px; line-height: 1.25; }
.plates-surface .plate h4 { font-size: 24px; }
.plate h4 .en { font-size: 19px; color: var(--c-muted); }
.plate .essence { font-size: 15px; }

.traits { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 14px; }
.traits dt { font-size: 12px; line-height: 24px; color: var(--c-muted); letter-spacing: 0.08em; }
.traits dd { margin: 0; color: var(--c-muted); }
.traits dd b { color: var(--c-ink); font-weight: 600; }

.plate-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.plate-actions button { display: none; }
.js .plate-actions button { display: inline-flex; }
.plate-more { display: inline-flex; align-items: center; min-height: 40px; text-underline-offset: 4px; font-size: 13px; }
.plate-intro { color: var(--c-muted); font-size: 14px; }
.plate h4 a { text-decoration-thickness: 1px; text-underline-offset: 5px; }
.plate-visual { aspect-ratio: 900 / 760; overflow: hidden; background: var(--c-paper2); }
.plate-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 缩略网页：真实的示例页按比例缩小 */
.thumb {
  position: relative;
  aspect-ratio: 900 / 760;
  overflow: hidden;
  background: var(--c-paper2);
  outline: 1px solid oklch(0.2 0.01 60 / 0.14);
}
.thumb > .pv {
  position: absolute;
  top: 0;
  left: 0;
  width: 900px;
  transform: scale(var(--s, 0.4));
  transform-origin: 0 0;
  pointer-events: none;
}
.thumb > .pv,
.thumb > .pv > .pv-page { min-height: 760px; }

/* 表皮色彩研究：底色 + 质感 + 色块，不套任何骨架 */
.pv.pv-study { aspect-ratio: 6 / 5; min-height: 0; outline: 1px solid oklch(0.2 0.01 60 / 0.14); }
.study-img { position: absolute; inset: 0 0 auto; z-index: 1; height: 80%; margin: 0; overflow: hidden; }
.study-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-study[data-img="none"] .study-img { display: none; }
.pv-study[data-img="none"] .study-glyph { display: block; }
.pv-study[data-img="ok"] .study-glyph { display: none; }
.study-glyph {
  display: none;
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 1;
  font: 400 clamp(56px, 7vw, 92px)/1 var(--f-latin);
  color: var(--ink);
}
.study-glyph[lang="zh"] { font-family: var(--f-serif); font-weight: 700; }
.study-chips { position: absolute; inset: auto 0 0; z-index: 1; display: flex; height: 20%; }
.study-chips i { display: block; }
.study-chips i:nth-child(1) { flex: 3; background: var(--surface); }
.study-chips i:nth-child(2) { flex: 2; background: var(--accent); }
.study-chips i:nth-child(3) { flex: 1; background: var(--accent2); }
.study-chips i:nth-child(4) { flex: 1; background: var(--accent3); }
.study-chips i:nth-child(5) { flex: 1; background: var(--ink); }

/* 安装 */
.install { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 40px clamp(32px, 5vw, 80px); padding-top: 18px; border-top: 1px solid var(--c-ink); }
.skill-versions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.skill-version { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; padding: 24px; border: 1px solid var(--c-rule); }
.skill-version h3 { font-size: 20px; }
.skill-version p { color: var(--c-muted); font-size: 13px; }
.skill-version .btn, .install-usage .btn { text-decoration: none; }
.skill-dir, .skill-call, .install-usage code { display: block; font: 12px/1.75 var(--f-mono); overflow-wrap: anywhere; }
.skill-call { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--c-rule); }
.skill-portable { margin-bottom: 24px; max-width: 60em; color: var(--c-muted); font-size: 13px; }
.install-usage { display: grid; justify-items: start; gap: 12px; margin-top: 20px; font-size: 13px; }
.install-usage p { color: var(--c-muted); }
@media (max-width: 900px) { .skill-versions { grid-template-columns: minmax(0, 1fr); } }
.targets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.targets .btn[aria-pressed="true"] { background: var(--c-ink); color: var(--c-paper); border-color: var(--c-ink); }
.files { margin-top: 14px; font-size: 14px; color: var(--c-muted); }
.files a { margin-left: 12px; font-family: var(--f-mono); font-size: 13px; color: var(--c-ink); }
.say h3 { margin-bottom: 10px; font-size: 18px; }
.say ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--c-rule); }
.say li { padding: 12px 0; border-bottom: 1px solid var(--c-rule); }
.say li::before { content: "“"; color: var(--c-muted); }
.say li::after { content: "”"; color: var(--c-muted); }

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px var(--gutter) 40px;
  font-size: 13px;
  color: var(--c-muted);
  border-top: 3px solid var(--c-ink);
}

/* 一次性进场 */
.js .reveal { opacity: 1; transform: none; transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

.reading-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.reading-item { display: block; padding: 18px 0; border-top: 1px solid var(--c-rule); text-decoration: none; }
.reading-item h3 { font-size: 20px; line-height: 1.5; }
.reading-item p { margin-top: 6px; color: var(--c-muted); }
.reading-item:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.article-page { max-width: 1040px; margin-inline: auto; padding: 32px var(--gutter) 96px; }
.breadcrumbs { font-size: 13px; color: var(--c-muted); overflow-wrap: anywhere; }
.breadcrumbs a { text-underline-offset: 3px; }
.article-head { display: grid; justify-items: start; gap: 18px; padding: 36px 0; }
.article-kicker { color: var(--c-muted); font-size: 13px; }
.article-head h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.3; text-wrap: balance; }
.article-lede { max-width: 40em; font-size: 18px; }
.article-head .btn { text-decoration: none; }
.article-visual img { display: block; width: 100%; height: auto; }
.article-visual figcaption { margin-top: 10px; font-size: 13px; color: var(--c-muted); }
.article-body { max-width: 760px; margin-inline: auto; }
.article-body section { padding-top: 36px; margin-top: 36px; border-top: 1px solid var(--c-rule); }
.article-body h2 { margin-bottom: 18px; font-size: clamp(22px, 2.7vw, 28px); line-height: 1.4; }
.article-body p + p { margin-top: 14px; }
.article-body a { text-underline-offset: 4px; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li + li { margin-top: 10px; }
.article-body pre { padding: 20px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--c-paper2); border-top: 2px solid var(--c-ink); font: 13px/1.8 var(--f-mono); }
.article-body code { font: 13px var(--f-mono); overflow-wrap: anywhere; }
.article-facts { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px 20px; }
.article-facts dt { color: var(--c-muted); font-size: 13px; }
.article-facts dd { margin: 0; overflow-wrap: anywhere; }
.article-body .palette-list { list-style: none; padding: 0; }
.palette-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.palette-list code:last-child { color: var(--c-muted); }
.palette-swatch { width: 28px; height: 28px; border: 1px solid var(--c-rule); flex: none; }
.mix-recommendations p { margin-top: 6px; color: var(--c-muted); }
.related-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-block: 20px; }
.article-provenance { color: var(--c-muted); font-size: 13px; }

@media (max-width: 1100px) {
  .plates-surface { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .bench {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "intro" "stage" "steps";
    padding-top: 22px;
  }
  .bench-intro { padding-bottom: 16px; }
  .bench-stage {
    position: sticky;
    top: var(--bar-h);
    z-index: 3;
    justify-self: stretch;
    width: auto;
    max-width: none;
    margin: 0 calc(-1 * var(--gutter)) 20px;
    padding: 8px var(--gutter) 10px;
    background: var(--c-room);
    box-shadow: 0 12px 16px -12px oklch(0 0 0 / 0.6);
  }
  .bench-stage .frame { max-width: calc(23svh * 900 / 760 + 32px); margin-inline: auto; }
  .stage-head { min-height: 36px; margin-bottom: 6px; }
  .note { margin-top: 8px; padding: 6px 12px; font-size: 13px; line-height: 1.5; }
  .note-k { display: none; }
  .to-duo { display: inline-flex; align-items: center; justify-self: start; min-height: 24px; font-size: 12.5px; color: var(--c-room-muted); text-underline-offset: 3px; }
  @media (hover: hover) { .to-duo:hover { color: var(--c-room-ink); } }
  .duo { scroll-margin-top: calc(var(--stage-h, 23svh + 170px) + 12px); }
  .duo-cols { grid-template-columns: minmax(0, 1fr); }
  .duo-col + .duo-col { border-left: 0; border-top: 1px solid var(--c-room-rule); }
  .bench-stage:has(.is-compare) { position: static; box-shadow: none; }
  .bench-stage:has(.is-compare) .frame { max-width: none; }
  .stage-view.is-compare { grid-template-columns: minmax(0, 1fr); }
  .skel, .skin, .grp, .tab, .bench-steps .btn { scroll-margin-top: calc(var(--bar-h) + 23svh + 150px); }
  .label-slot { margin-top: 22px; }
  .skels { display: flex; gap: 8px; padding: 6px 6px 10px; margin: -6px -6px 0; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 6px; scrollbar-width: thin; scrollbar-color: var(--c-room-rule) transparent; }
  .skel { flex: 0 0 clamp(96px, calc((100cqi - 24px) / 3.4), 140px); scroll-snap-align: start; }
  .skins { --card: clamp(110px, calc((100cqi - 16px) / 2.6), 150px); }
  .plates-structure, .install { grid-template-columns: minmax(0, 1fr); }
  .group-head { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) and (max-height: 560px) {
  .bench-stage { position: static; box-shadow: none; }
}

@media (max-width: 640px) {
  .bar { gap: 8px; }
  .brand em { display: none; }
  .bar nav a { padding: 0 10px; }
  .plates-surface, .reading-list { grid-template-columns: minmax(0, 1fr); }
  .article-facts { grid-template-columns: 70px minmax(0, 1fr); gap: 10px 12px; }
  .chapter { padding-block: 72px 88px; }
  .chapter-head { margin-bottom: 40px; }
  .stage-head h2 span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .skel, .skel .thumb, .grp, .skin, .skin-img, .tab, .bar nav a { transition: none; }
  .skins, .skels { scroll-behavior: auto; }
}
