/* Web-only card specimen subsets. Font credits and SIL OFL licenses are served at /licenses. */
@font-face{font-family:TSPackBricolage;font-weight:800;font-display:swap;src:url("/fonts/TSPackBricolage.woff") format("woff")}
@font-face{font-family:TSPackShantell;font-weight:400;font-display:swap;src:url("/fonts/TSPackShantell.woff") format("woff")}
@font-face{font-family:TSPackRecursive;font-weight:450;font-display:swap;src:url("/fonts/TSPackRecursive.woff") format("woff")}
@font-face{font-family:TSPackWenKai;font-weight:400;font-display:swap;src:url("/fonts/TSPackWenKai.woff") format("woff")}
@font-face{font-family:TSPackGabarito;font-weight:600;font-display:swap;src:url("/fonts/TSPackGabarito.woff") format("woff")}
@font-face{font-family:TSPackHanSerif;font-weight:600;font-display:swap;src:url("/fonts/TSPackHanSerif.woff") format("woff")}
@font-face{font-family:"Bricolage Grotesque";src:url("/fonts/BricolageGrotesque.ttf") format("truetype");font-weight:200 800;font-stretch:75% 100%;font-display:swap}
@font-face{font-family:Shantell;src:url("/fonts/ShantellSans.ttf") format("truetype");font-weight:300 800;font-display:swap}
@font-face{font-family:Recursive;src:url("/fonts/Recursive.ttf") format("truetype");font-weight:300 1000;font-display:swap}
@font-face{font-family:WenKai;src:url("/fonts/LXGWWenKai-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:Gabarito;src:url("/fonts/Gabarito.ttf") format("truetype");font-weight:400 900;font-display:swap}
@font-face{font-family:GlyphloreSpecimenSerif;src:url("/fonts/GlyphloreSpecimenSerifSC-Semibold.woff2") format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:Montserrat;src:url("/fonts/Montserrat.ttf") format("truetype");font-weight:100 900;font-display:swap}
@font-face{font-family:Lato;src:url("/fonts/Lato-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:B612;src:url("/fonts/B612-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible";src:url("/fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("/fonts/JetBrainsMono.ttf") format("truetype");font-weight:100 800;font-display:swap}
@font-face{font-family:"Comic Neue";src:url("/fonts/ComicNeue-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Space Grotesk";src:url("/fonts/SpaceGrotesk.ttf") format("truetype");font-weight:300 700;font-display:swap}
@font-face{font-family:"CMU Serif";src:url("/fonts/CMUSerif-Roman.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Smiley Sans";src:url("/fonts/SmileySans-Oblique.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Cubic 11";src:url("/fonts/Cubic11-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"EB Garamond";src:url("/fonts/EBGaramond.ttf") format("truetype");font-weight:400 800;font-display:swap}
@font-face{font-family:"Zhuque Fangsong";src:url("/fonts/ZhuqueFangsong-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"IM Fell English";src:url("/fonts/IMFeENrm28P.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"IM Fell English";src:url("/fonts/IMFeENit28P.ttf") format("truetype");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"IBM Plex Mono";src:url("/fonts/IBMPlexMono-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face {
  font-family: "Reader Title Fangsong";
  src: url("/fonts/ReaderTitleFangsong-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif SC";
  src: url("/fonts/NotoSerifSC-Reader-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}


:root {
  color-scheme: light;
  --bg-canvas: #FBFBFD;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F5F5F7;
  --ink-primary: #1D1D1F;
  --ink-secondary: #6E6E73;
  --ink-tertiary: #86868B;
  --border-hairline: #E5E5EA;
  --accent-signal: #D94A2B;
  --klein-blue: #17399A;
  --klein-blue-bright: #244AB8;
  --catalog-rule: #E2E4E8;
  --bookmark-klein-blue: var(--klein-blue);
  --bookmark-klein-blue-bright: var(--klein-blue-bright);
  --shadow-crease: linear-gradient(to right, rgba(0,0,0,0.04), transparent 16px);

  --paper: var(--bg-canvas);
  --ink: var(--ink-primary);
  --quiet: var(--ink-secondary);
  --rule: var(--border-hairline);
  --link: var(--ink-primary);
  --accent: var(--ink-primary);
  --shadow: rgba(0,0,0,.04);

  --measure: 39rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --top-anchor-offset: max(36px, calc(var(--safe-top) + 16px));
  --anchor-row-height: 44px;

  font-family: var(--app-font, system-ui);
}

@media (max-width: 767px) {
  :root {
    --top-anchor-offset: calc(var(--safe-top) + 16px);
  }
}

* { box-sizing: border-box; }

html {
  background: var(--bg-canvas);
  color: var(--ink-primary);
  -webkit-font-smoothing: antialiased;
}

/* 案头与探索双画布保持无轨道极净贴边，避免右侧 15px 经典滚动条顶开克莱因蓝索引贴 */
html:has(#main[data-screen="desk"]) {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html:has(#main[data-screen="desk"])::-webkit-scrollbar {
  display: none;
}

html:has(#main[data-screen]:not([data-screen="desk"])) {
  scrollbar-gutter: stable;
}

html.is-foldout-open,
html.is-foldout-open body {
  overflow: hidden;
  overscroll-behavior: none;
}

html.is-foldout-open .today-stage[data-paper] {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 60;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg-canvas);
  color: var(--ink-primary);
  overflow-x: hidden;
}

a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }

.skip {
  position: fixed;
  left: 1rem;
  top: .5rem;
  padding: .75rem;
  background: var(--paper);
  transform: translateY(-160%);
  z-index: 200;
}
.skip:focus { transform: none; }

.loading-note {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  color: var(--ink-tertiary);
  font: 400 .9rem/1.6 var(--app-font);
  letter-spacing: .12em;
}

/* ==========================================================================
   全画布主容器 (零顶栏、零底栏)
   ========================================================================== */

#main {
  min-height: 100dvh;
  width: 100%;
  outline: none;
}

#main.is-bookmark-dragging {
  will-change: transform;
}

body.is-bookmark-grabbing,
body.is-bookmark-grabbing * {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* ==========================================================================
   一、今日案头：现有 3D 物理纸包与活字折页 (100dvh) + 底部微弱探索提示
   ========================================================================== */

.desk-viewport {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-canvas);
}

.today-stage[data-paper] {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  align-content: stretch;
  background: var(--bg-canvas);
}

.daily-paper-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  border: 0;
  grid-area: 1 / 1;
}

.desk-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: max(18px, var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 0;
  background: transparent;
  color: var(--ink-tertiary);
  font: 400 .78rem/1 var(--app-font);
  letter-spacing: .08em;
  opacity: .52;
  will-change: opacity, color;
  transition: opacity 280ms ease, color 280ms ease;
}

.desk-scroll-cue:hover:not(.is-cue-live) {
  color: var(--ink-primary);
  opacity: 1;
}

.desk-scroll-cue.is-cue-live {
  transition: none;
}

.desk-scroll-cue.is-cue-gone,
.today-stage:not([data-phase="open"]) ~ .desk-scroll-cue {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
}

html.is-foldout-open .desk-scroll-cue {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   二、瓷白文件夹探索态（极净瓷白 × 深黑分类隔页 × 克莱因蓝收藏点缀 + 跟随拉开镜头）
   - 顶部「今天」锚点完全镜像首屏底部「探索」的排版、位置与克制感（无箭头）
   - 三列文件夹与柜体随可用视口等比缩放，柜底留白平衡前挡板的视觉重量
   ========================================================================== */

.explore-section {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    max(64px, calc(44px + var(--safe-top)))
    0
    max(clamp(46px, 6dvh, 68px), calc(32px + var(--safe-bottom)));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 与首屏底部 .desk-scroll-cue「探索」完全对称的顶部「今天」锚点（位于拉起卡片之下，抽起时不抖动、直接被卡片遮挡） */
.explore-return-cue {
  position: absolute;
  left: 50%;
  top: max(26px, var(--safe-top));
  transform: translateX(-50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 0;
  background: transparent;
  color: var(--ink-tertiary);
  font: 400 .78rem/1 var(--app-font);
  letter-spacing: .08em;
  opacity: .52;
  will-change: opacity, color;
  transition: opacity 280ms ease, color 280ms ease;
}

.explore-return-cue:hover:not(.is-cue-live) {
  color: var(--ink-primary);
  opacity: 1;
}

.explore-return-cue.is-cue-live {
  transition: none;
}

.explore-return-cue.is-cue-gone {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
}

.cabinet-camera {
  position: relative;
  z-index: 5;
  pointer-events: none;
  perspective: 1600px;
  perspective-origin: 50% 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.cabinet-pull-rig {
  width: 100%;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

.cabinet-archive-viewport {
  pointer-events: auto;
  touch-action: pan-y pinch-zoom;
}

.cabinet-archive-viewport:focus-visible {
  outline: none;
}

.cabinet-archive-track {
  position: relative;
  left: calc((100% - var(--drawer-width, 0px)) / 2);
  display: flex;
  width: max-content;
  gap: var(--drawer-gap, 0px);
  will-change: transform;
}

.cabinet-archive-track:not([style]) {
  visibility: hidden;
}

.cabinet-archive-viewport.is-dragging,
.cabinet-archive-viewport.is-dragging .drawer-pull-slot-hit {
  cursor: grabbing;
  user-select: none;
}

.cabinet-scaler {
  position: relative;
  flex: none;
  width: var(--drawer-width, 0px);
  height: var(--drawer-height, 0px);
}

.cabinet-drawer-rig {
  width: 100%;
  height: 100%;
}

.cabinet-archive-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cabinet-stage {
  position: relative;
  isolation: isolate;
  z-index: 1;
  transform-origin: top left;
  transform: scale(var(--cabinet-scale, 1));
  filter:
    drop-shadow(0 20px 42px rgba(29, 29, 31, 0.075))
    drop-shadow(0 4px 10px rgba(29, 29, 31, 0.038));
}

.cabinet-stage.is-no-transition,
.cabinet-stage.is-no-transition * {
  transition: none !important;
}

.cabinet-stack-clip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(var(--front-cover-h, 102px) - 18px);
  clip-path: inset(-260px -80px 0 -80px);
  transform-origin: 0 var(--drawer-front-join);
  will-change: transform;
}

/* Layer 1：四周一圈瓷白档案抽屉外壳（背壁 + 梯形侧壁厚度 + 内腔井深与导轨） */
.drawer-shell {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
}

.drawer-shell-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.drawer-shell-outer {
  stroke: #C9C9D4;
  stroke-width: 1;
  stroke-linejoin: round;
}

.drawer-shell-well {
  stroke: none;
}

.drawer-shell-back-wall {
  stroke: none;
}

.drawer-shell-side-wall.is-left {
  fill: #DCDCE6;
}

.drawer-shell-side-wall.is-right {
  fill: #E0E0EA;
}

.drawer-shell-rail {
  fill: none;
  stroke: rgba(29, 29, 31, 0.075);
  stroke-width: 1;
}

.drawer-shell-inner-rim {
  fill: none;
  stroke: #CFCFD9;
  stroke-width: 1;
  stroke-linejoin: round;
}

.drawer-shell-sheen {
  fill: none;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 1;
  stroke-linecap: round;
}

/* Layer 2：瓷白档案页和黑色分类隔页 */
.cabinet-folder {
  --shift-y: 0px;
  --peek-y: 0px;
  --pull-y: 0px;
  position: absolute;
  pointer-events: none;
  transform: translate3d(0, calc(var(--shift-y) + var(--peek-y) + var(--pull-y)), 0);
  transition:
    transform 440ms cubic-bezier(.22, 1, .36, 1),
    filter 260ms ease;
  filter: drop-shadow(0 -2px 5px rgba(29, 29, 31, 0.042));
  will-change: transform;
}

.cabinet-stage.is-pulling .cabinet-folder,
.cabinet-stage.is-tidying .cabinet-folder {
  transition: none;
}

.cabinet-folder.is-open {
  --peek-y: 0px;
  filter:
    drop-shadow(0 -8px 22px rgba(29, 29, 31, 0.055))
    drop-shadow(0 12px 30px rgba(29, 29, 31, 0.065));
}

@media (hover: hover) {
  .cabinet-archive-viewport:not(.is-paging) .cabinet-stage.is-settled .cabinet-folder.is-story:not(.is-open):has(.folder-tab-btn:hover, .folder-sheet-hit:hover) {
    --peek-y: -8px;
  }

  .cabinet-archive-viewport:not(.is-paging) .cabinet-stage.is-settled .cabinet-folder.is-story:not(.is-open):has(.folder-tab-btn:hover, .folder-sheet-hit:hover) .folder-svg-body {
    fill: #FFFFFF;
    stroke: #B8B8C4;
  }
}

.folder-svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  clip-path: inset(0 -2px -2px);
  transition: clip-path 440ms cubic-bezier(.22, 1, .36, 1), transform 440ms cubic-bezier(.22, 1, .36, 1);
}

.cabinet-folder.is-compressed .folder-svg {
  clip-path: inset(19px -2px -2px);
  transform: translateY(-19px);
}

.cabinet-folder.is-compressed .folder-tab-btn,
.cabinet-folder.is-compressed .folder-sheet-hit {
  visibility: hidden;
  pointer-events: none;
}

.folder-svg-body {
  fill: var(--folder-fill, #FFFFFF);
  stroke: #D2D2DB;
  stroke-width: 1;
  stroke-linejoin: round;
  transition: fill 200ms ease, stroke 200ms ease;
}

.cabinet-folder.is-divider .folder-svg-body {
  fill: #1D1D1F;
  stroke: #1D1D1F;
  pointer-events: visiblePainted;
  cursor: default;
}

.cabinet-folder.is-divider:has(button.is-divider-tab) .folder-svg-body {
  cursor: pointer;
}

.cabinet-folder.is-divider .folder-svg-sheen {
  stroke: rgba(255, 255, 255, 0.14);
}

.cabinet-folder.is-open .folder-svg-body {
  fill: #FFFFFF;
  stroke: #C6C6D0;
}

.folder-svg-sheen {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1;
  stroke-linecap: round;
}

.folder-svg-divider-tab {
  fill: #1D1D1F;
  stroke: #1D1D1F;
  stroke-width: 1;
  stroke-linejoin: round;
}

.folder-tab-btn {
  position: absolute;
  top: 0;
  z-index: 4;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 2px 6px 0;
  border: 0;
  background: transparent;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.folder-tab-btn:focus-visible {
  outline: 2px solid var(--ink-primary);
  outline-offset: -2px;
  border-radius: 5px;
}

.folder-tab-num {
  flex: none;
  font: 400 10px/1 var(--app-font);
  color: var(--ink-tertiary);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.folder-tab-name {
  flex: 1;
  min-width: 0;
  text-align: center;
  font: 450 11px/1.15 var(--app-font);
  color: var(--ink-primary);
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cabinet-folder.is-open .folder-tab-num {
  color: var(--ink-secondary);
}

.cabinet-folder.is-open .folder-tab-name {
  font-weight: 600;
}

.folder-tab-status {
  flex: none;
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: transparent;
  transition: background-color 180ms ease;
}

.folder-tab-status:not([data-state]) {
  display: none;
}

.folder-tab-status[data-state="saved"] {
  background: var(--bookmark-klein-blue);
}

.folder-tab-status[data-state="read"] {
  background: rgba(29, 29, 31, 0.24);
}

.folder-tab-btn.is-divider-tab {
  padding: 2px 10px 0;
  gap: 6px;
  color: #FFFFFF;
}

.folder-tab-btn.is-divider-tab:focus-visible {
  outline-color: #FFFFFF;
}

.folder-divider-label {
  flex: 1;
  min-width: 0;
  font: 500 10.5px/1 var(--app-font);
  letter-spacing: .06em;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-archive-family="weekly"] .folder-divider-label {
  font-size: 14px;
  letter-spacing: .02em;
}

.folder-divider-count {
  flex: none;
  font: 400 9.5px/1 var(--app-font);
  color: rgba(255, 255, 255, 0.68);
  font-variant-numeric: tabular-nums;
  letter-spacing: .05em;
}

@media (max-width: 560px) {
  .folder-tab-name { font-size: 15px; }
  .folder-tab-num { font-size: 12px; }
  .folder-divider-label { font-size: 14px; }
  .folder-divider-count { font-size: 11px; }
}

.folder-sheet-hit {
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 0;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
}

.cabinet-folder.is-open .folder-sheet-hit {
  cursor: default;
}

/* 展开后的文件夹内页档案 (Dossier) */
.folder-dossier-host {
  position: absolute;
  left: 1px;
  right: 1px;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
}

.cabinet-folder.is-open .folder-dossier-host {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 260ms ease 90ms, visibility 0s linear 0s;
}

.folder-dossier {
  height: 100%;
  padding: 12px 24px 14px;
  display: flex;
  flex-direction: column;
}

.dossier-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-hairline);
}

.dossier-masthead-meta {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  font: 400 10.5px/1 var(--app-font);
  letter-spacing: .08em;
  color: var(--ink-tertiary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dossier-arc {
  font-weight: 500;
  color: var(--ink-primary);
}

.dossier-meta-sep {
  opacity: .55;
}

.dossier-year {
  color: var(--ink-secondary);
}

.dossier-license-tag {
  color: #0066CC;
  font-weight: 500;
}

.dossier-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  margin-inline-end: -11px;
}

.dossier-icon-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-secondary);
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.dossier-icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.dossier-save-btn[aria-pressed="true"] {
  color: var(--bookmark-klein-blue);
}

/* 瑞士双栏编目主体：左活字标本舞台 / 右字体叙事与底栏，整块点击直接全屏展开 */
.dossier-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  cursor: pointer;
  outline: none;
}

.dossier-grid:focus-visible {
  outline: 2px solid var(--ink-primary);
  outline-offset: -2px;
  border-radius: 2px;
}

.dossier-stage {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 12px 20px 18px 0;
  border-right: 1px solid var(--border-hairline);
  overflow: hidden;
  background: radial-gradient(
    circle at var(--spot-x, 46%) var(--spot-y, 44%),
    rgba(255, 255, 255, 0.98),
    rgba(245, 245, 247, 0.45) 72%,
    transparent 100%
  );
}

.dossier-sculpture {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 10px;
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.dossier-guides {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 20%;
  bottom: 33%;
  pointer-events: none;
}

.dossier-guide-cap,
.dossier-guide-base {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
}

.dossier-guide-cap {
  top: 0;
  border-top: 1px dashed rgba(29, 29, 31, 0.11);
}

.dossier-guide-base {
  bottom: 0;
  background: rgba(0, 102, 204, 0.34);
}

.dossier-hero-glyph {
  position: relative;
  z-index: 1;
  font-family: var(--dossier-face, var(--app-font));
  font-weight: var(--dossier-weight, 600);
  font-size: 5.15rem;
  line-height: 1.02;
  letter-spacing: -.03em;
  color: #111113;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85), 0 10px 24px rgba(0, 0, 0, 0.055);
  user-select: none;
  -webkit-user-select: none;
  transition: font-variation-settings 90ms linear;
}

.dossier-hero-glyph.is-han {
  font-size: 4.8rem;
  letter-spacing: 0;
}

.dossier-hero-glyph.is-wide {
  font-size: 3.75rem;
}

.dossier-proof-caption {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-secondary);
}

.dossier-char-row {
  flex: none;
  font-family: var(--dossier-face, var(--app-font));
  color: var(--ink-tertiary);
  letter-spacing: .03em;
}

.dossier-proof-line {
  font-family: var(--app-font);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.dossier-axis-readout {
  position: absolute;
  right: 14px;
  bottom: 6px;
  font: 400 9.5px/1 var(--app-font);
  letter-spacing: .08em;
  color: var(--ink-tertiary);
  pointer-events: none;
}

.dossier-editorial {
  min-width: 0;
  padding: 16px 0 4px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.dossier-editorial-top {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.dossier-kicker {
  font: 400 9.5px/1 var(--app-font);
  letter-spacing: .1em;
  color: var(--ink-tertiary);
}

.dossier-native-name {
  margin: 7px 0 0;
  font-family: var(--dossier-face, var(--app-font));
  font-weight: var(--dossier-weight, 600);
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: #111113;
  overflow-wrap: anywhere;
}

.dossier-title {
  margin: 12px 0 0;
  font: 400 14.5px/1.48 var(--app-font);
  color: var(--ink-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dossier-teaser {
  margin: 7px 0 0;
  font: 400 12px/1.68 var(--app-font);
  color: var(--ink-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dossier-colophon-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
}

.dossier-origin {
  min-width: 0;
  font: 400 11px/1.3 var(--app-font);
  letter-spacing: .02em;
  color: var(--ink-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dossier-enter-chevron {
  flex: none;
  display: inline-flex;
  align-items: center;
  color: var(--ink-tertiary);
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), color 160ms ease;
}

.dossier-enter-chevron svg {
  width: 15px;
  height: 15px;
  display: block;
}

@media (hover: hover) {
  .dossier-grid:hover .dossier-enter-chevron {
    color: var(--ink-primary);
    transform: translateX(3px);
  }
  .dossier-grid:hover .dossier-title {
    color: #000000;
  }
}

/* 顶部前几排在抽屉不动时，按实际露出的可视高度自适应紧致排布（不裁字、不撑动抽屉） */
.folder-dossier-host.is-compact .folder-dossier {
  padding: 8px 22px 8px;
}
.folder-dossier-host.is-compact .dossier-head {
  min-height: 26px;
  padding-bottom: 5px;
}
.folder-dossier-host.is-compact .dossier-stage {
  padding: 6px 16px 10px 0;
}
.folder-dossier-host.is-compact .dossier-hero-glyph {
  font-size: 3.7rem;
}
.folder-dossier-host.is-compact .dossier-hero-glyph.is-han {
  font-size: 3.4rem;
}
.folder-dossier-host.is-compact .dossier-hero-glyph.is-wide {
  font-size: 2.9rem;
}
.folder-dossier-host.is-compact .dossier-sculpture {
  gap: 6px;
  padding: 2px 6px;
}
.folder-dossier-host.is-compact .dossier-editorial {
  padding: 10px 0 2px 18px;
  gap: 6px;
}
.folder-dossier-host.is-compact .dossier-native-name {
  margin-top: 4px;
  font-size: 20px;
}
.folder-dossier-host.is-compact .dossier-title {
  margin-top: 6px;
  font-size: 13.5px;
  -webkit-line-clamp: 1;
}
.folder-dossier-host.is-compact .dossier-teaser {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.5;
  -webkit-line-clamp: 1;
}
.folder-dossier-host.is-compact .dossier-colophon-bar {
  padding-top: 7px;
}

.folder-dossier-host.is-ultra-compact .folder-dossier {
  padding: 6px 22px 6px;
}
.folder-dossier-host.is-ultra-compact .dossier-head {
  min-height: 24px;
  padding-bottom: 4px;
}
.folder-dossier-host.is-ultra-compact .dossier-icon-btn {
  width: 26px;
  height: 26px;
}
.folder-dossier-host.is-ultra-compact .dossier-controls {
  margin-inline-end: -9px;
}
.folder-dossier-host.is-ultra-compact .dossier-stage {
  padding: 2px 14px 4px 0;
}
.folder-dossier-host.is-ultra-compact .dossier-guides {
  top: 16%;
  bottom: 18%;
}
.folder-dossier-host.is-ultra-compact .dossier-hero-glyph {
  font-size: 3.1rem;
  line-height: 1;
}
.folder-dossier-host.is-ultra-compact .dossier-hero-glyph.is-han {
  font-size: 2.85rem;
}
.folder-dossier-host.is-ultra-compact .dossier-hero-glyph.is-wide {
  font-size: 2.4rem;
}
.folder-dossier-host.is-ultra-compact .dossier-proof-caption,
.folder-dossier-host.is-ultra-compact .dossier-kicker,
.folder-dossier-host.is-ultra-compact .dossier-teaser {
  display: none;
}
.folder-dossier-host.is-ultra-compact .dossier-editorial {
  padding: 6px 0 0 18px;
  gap: 4px;
}
.folder-dossier-host.is-ultra-compact .dossier-native-name {
  margin-top: 0;
  font-size: 18px;
}
.folder-dossier-host.is-ultra-compact .dossier-title {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
}
.folder-dossier-host.is-ultra-compact .dossier-colophon-bar {
  padding-top: 5px;
}

.page-motion, .reader-stack, .reader-scrim, .reader-viewport {
  position: fixed;
  inset: 0;
}
.page-motion {
  z-index: 96;
  touch-action: none;
}
html.has-reader-layer { overflow: hidden; }
html.has-reader-layer .bookmark-tab.is-toast-peeking { z-index: 92; }
html.has-reader-layer .today-anchor { visibility: hidden; }
.reader-stack {
  z-index: 90;
  overflow: hidden;
  isolation: isolate;
}
.reader-scrim {
  background: rgba(29, 29, 31, .045);
  pointer-events: none;
}
.reader-stack[data-origin="explore"] .reader-scrim { background: rgba(29, 29, 31, .055); }
.reader-viewport {
  overflow: hidden auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scrollbar-gutter: stable;
  background: var(--bg-surface);
  outline: 0;
}
.reader-stack[data-moving="closing"] .reader-viewport { overflow-y: hidden; }
.reader-stack[data-moving][data-origin="collection"] .reader-viewport {
  box-shadow: -1px 0 0 rgba(29, 29, 31, .045), -4px 0 10px rgba(29, 29, 31, .035);
}

/* Layer 3：抽屉前挡板与内凹拉手 */
.drawer-front {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--front-cover-h, 102px);
  z-index: 60;
  pointer-events: auto;
  cursor: default;
  will-change: transform;
}

.cabinet-stage.has-open-folder .drawer-front {
  cursor: pointer;
}

.drawer-front-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.drawer-pull-slot-hit {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 156px;
  height: 40px;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.cabinet-archive-viewport:focus-visible [data-current] .drawer-pull-slot-hit {
  outline: 2px solid var(--link);
  outline-offset: -4px;
  border-radius: 40px;
}

.drawer-front-rim,
.drawer-front-face {
  stroke: none;
}

.drawer-front-outer-stroke {
  fill: none;
  stroke: #C6C6D2;
  stroke-width: 1;
  stroke-linejoin: round;
}

.drawer-front-inner-lip {
  fill: none;
  stroke: #CFCFD9;
  stroke-width: 1;
}

.drawer-front-chamfer-dark {
  fill: none;
  stroke: rgba(29, 29, 31, 0.075);
  stroke-width: 1;
}

.drawer-front-chamfer-light {
  fill: none;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 1;
}

.drawer-pull-slot {
  stroke: rgba(29, 29, 31, 0.13);
  stroke-width: 1;
  transition: stroke 180ms ease;
}

.drawer-pull-sheen {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1;
  stroke-linecap: round;
}

@media (hover: hover) {
  .drawer-front:has(.drawer-pull-slot-hit:hover) .drawer-pull-slot,
  .cabinet-stage.has-open-folder .drawer-front:hover .drawer-pull-slot {
    stroke: rgba(29, 29, 31, 0.24);
  }
}

/* 探索态向上轻滑时短暂浮现的「↑ 今日」锚点 */
.today-anchor {
  position: fixed;
  left: 50%;
  top: max(18px, var(--safe-top));
  transform: translate(-50%, -8px);
  z-index: 35;
  border: 1px solid var(--border-hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 7px 14px;
  min-height: 34px;
  font: 400 .76rem/1 var(--app-font);
  letter-spacing: .04em;
  color: var(--ink-secondary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms cubic-bezier(.22,1,.36,1);
}

.today-anchor.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.today-anchor:hover {
  color: var(--ink-primary);
  border-color: #c7c7cc;
}

/* ==========================================================================
   三、右侧克莱因蓝索引贴「收藏入口」 (Index Tab · 常态紧贴右缘，悬停/反馈时舒展后自然收回)
   ========================================================================== */

.bookmark-tab,
.bookmark-pull-overlay {
  --tab-tucked-width: 6px;
  --tab-expanded-width: 36px;
  --tab-height: 44px;
  --tab-corner: 5px 0 0 5px;
  --tab-shadow: -1px 3px 10px rgba(0, 47, 167, 0.16), -1px 1px 3px rgba(0, 0, 0, 0.06);
}

.bookmark-tab {
  position: fixed;
  right: 0;
  top: var(--top-anchor-offset);
  z-index: 45;
  width: 48px;
  height: var(--tab-height);
  padding: 0;
  border: 0;
  border-radius: var(--tab-corner);
  background: transparent;
  color: #FFFFFF;
  display: block;
  overflow: visible;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transform: translateX(0);
  opacity: 1;
  transition:
    width 280ms cubic-bezier(.22, 1, .36, 1),
    padding-right 280ms cubic-bezier(.22, 1, .36, 1),
    transform 240ms cubic-bezier(.22, 1, .36, 1),
    opacity 200ms ease,
    background-color 220ms ease,
    box-shadow 260ms ease;
}

@media (pointer: coarse) {
  .bookmark-tab {
    width: 58px;
  }
}

.bookmark-face {
  position: absolute;
  inset: 0;
  border-radius: var(--tab-corner);
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}

.bookmark-tab > .bookmark-face {
  left: auto;
  width: var(--tab-tucked-width);
  background: var(--bookmark-klein-blue);
  box-shadow: var(--tab-shadow);
  transition: inherit;
}

.bookmark-icon {
  display: block;
  width: 16px;
  height: 16px;
  color: #FFFFFF;
  opacity: 0;
  transform: translateX(6px);
  pointer-events: none;
  transition:
    opacity 150ms ease,
    transform 240ms cubic-bezier(.22, 1, .36, 1);
}

/* 桌面端悬停或键盘聚焦时柔和滑出，移开后自然缩回贴边；可点击也可按住向左拖拽 */
@media (hover: hover) and (pointer: fine) {
  .bookmark-tab:not(.is-retracted):hover { cursor: grab; }
  .bookmark-tab:not(.is-retracted):hover > .bookmark-face,
  .bookmark-tab:not(.is-retracted):focus-visible > .bookmark-face {
    width: var(--tab-expanded-width);
    box-shadow: -2px 4px 14px rgba(0, 47, 167, 0.22), -1px 2px 4px rgba(0, 0, 0, 0.08);
  }
  .bookmark-tab:not(.is-retracted):hover .bookmark-icon,
  .bookmark-tab:not(.is-retracted):focus-visible .bookmark-icon {
    opacity: 1;
    transform: translateX(0);
    transition:
      opacity 180ms ease 55ms,
      transform 260ms cubic-bezier(.22, 1, .36, 1);
  }
}

/* 收回屏外：收藏页 / 设置页 / 协议说明页 / 展信阅读态右侧完全纯净，无残留小条或阴影 */
.bookmark-tab.is-retracted:not(.is-toast-peeking),
html.is-foldout-open .bookmark-tab:not(.is-toast-peeking),
body:has(#main[data-screen="collection"]) .bookmark-tab:not(.is-toast-peeking),
body:has(#main[data-screen="settings"]) .bookmark-tab:not(.is-toast-peeking),
body:has(#main[data-screen="license"]) .bookmark-tab:not(.is-toast-peeking),
body:has(#main[data-screen="story"]) .bookmark-tab:not(.is-toast-peeking) {
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  box-shadow: none;
}

.bookmark-tab.is-instant-hide {
  transition: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.bookmark-tab.is-dock-rebound {
  transition: none !important;
  pointer-events: none;
  will-change: transform;
}
.bookmark-tab.is-dock-rebound > .bookmark-face { width: var(--tab-expanded-width); }
.bookmark-tab.is-dock-rebound .bookmark-icon {
  opacity: 0.92;
  transform: translateX(0);
  transition: opacity 220ms ease;
}

.bookmark-pull-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
  contain: layout style;
}

.bookmark-pull-overlay.is-dragging {
  pointer-events: auto;
  cursor: grabbing;
}

.bookmark-pull-overlay.is-returning,
.bookmark-pull-overlay.is-settling {
  pointer-events: auto;
}

.bookmark-pull-scrim {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 31, .08);
  opacity: 0;
  will-change: opacity;
}

.bookmark-pull-sheet {
  --sheet-edge-width: 1px;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: -96px;
  background: var(--bg-canvas);
  border-left: var(--sheet-edge-width) solid rgba(0, 47, 167, .14);
  box-shadow: -14px 0 32px rgba(29, 29, 31, .10), -1px 0 6px rgba(29, 29, 31, .04);
  will-change: transform;
}

.bookmark-pull-overlay:not(.is-returning) .bookmark-pull-sheet {
  border-left-color: transparent;
}

.bookmark-pull-overlay.is-returning .bookmark-pull-sheet {
  --dock-x: calc(100% + var(--tab-expanded-width) - var(--tab-tucked-width) - var(--sheet-edge-width));
  right: 0;
  box-shadow: -8px 0 16px rgba(29, 29, 31, .08);
}

.bookmark-pull-handle {
  position: absolute;
  right: 100%;
  top: var(--top-anchor-offset);
  width: var(--tab-expanded-width);
  height: var(--tab-height);
  border-radius: 7px 0 0 7px;
  background: var(--bookmark-klein-blue);
  color: #FFFFFF;
  box-shadow: -3px 4px 14px rgba(0, 47, 167, .22), -1px 2px 4px rgba(0, 0, 0, .07);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  transform-origin: 100% 50%;
  will-change: transform;
}

.bookmark-pull-overlay:not(.is-returning) .bookmark-pull-handle {
  right: calc(100% + var(--sheet-edge-width));
  clip-path: inset(-18px 0 -18px -18px);
}

.bookmark-pull-overlay.is-returning .bookmark-pull-handle {
  border-radius: var(--tab-corner);
  box-shadow: var(--tab-shadow);
}

.bookmark-pull-handle .bookmark-face {
  width: var(--tab-expanded-width);
  height: var(--tab-height);
}

.bookmark-pull-handle .bookmark-icon {
  opacity: 1;
  transform: translateX(0);
  transition: none;
}

.bookmark-pull-content {
  height: 100%;
  margin-left: calc(0px - var(--sheet-edge-width));
  overflow: hidden scroll;
  scrollbar-color: transparent transparent;
}

/* 收藏联动微交互：从紧贴右缘态舒展并向左轻探 5px，克莱因蓝微亮后自然缩回贴边 */
.bookmark-tab.is-bookmark-pulse > .bookmark-face {
  animation: bookmark-save-spring 1100ms cubic-bezier(.22, 1, .36, 1);
}
.bookmark-tab.is-bookmark-pulse .bookmark-icon {
  animation: bookmark-icon-peek 1100ms ease;
}

/* 宽屏卡片内收藏时的短暂探出回馈（不拦截阅读点击） */
.bookmark-tab.is-toast-peeking {
  pointer-events: none;
  opacity: 1;
  transform: none;
}
.bookmark-tab.is-toast-peeking > .bookmark-face {
  animation: bookmark-toast-peek 980ms cubic-bezier(.22, 1, .36, 1) both;
}
.bookmark-tab.is-toast-peeking .bookmark-icon {
  opacity: 1;
  transform: translateX(0);
}

@keyframes bookmark-save-spring {
  0% {
    width: var(--tab-tucked-width);
    padding-right: 0;
    background: var(--bookmark-klein-blue);
    box-shadow: -1px 3px 10px rgba(0, 47, 167, 0.16), -1px 1px 3px rgba(0, 0, 0, 0.06);
  }
  20% {
    width: calc(var(--tab-expanded-width) + 5px);
    padding-right: 5px;
    background: var(--bookmark-klein-blue-bright);
    box-shadow: -4px 5px 18px rgba(0, 47, 167, 0.28), -1px 2px 4px rgba(0, 0, 0, 0.08);
  }
  36% {
    width: var(--tab-expanded-width);
    padding-right: 0;
    background: var(--bookmark-klein-blue-bright);
    box-shadow: -2px 4px 14px rgba(0, 47, 167, 0.22), -1px 2px 4px rgba(0, 0, 0, 0.08);
  }
  64% {
    width: var(--tab-expanded-width);
    padding-right: 0;
    background: var(--bookmark-klein-blue);
    box-shadow: -2px 4px 14px rgba(0, 47, 167, 0.22), -1px 2px 4px rgba(0, 0, 0, 0.08);
  }
  100% {
    width: var(--tab-tucked-width);
    padding-right: 0;
    background: var(--bookmark-klein-blue);
    box-shadow: -1px 3px 10px rgba(0, 47, 167, 0.16), -1px 1px 3px rgba(0, 0, 0, 0.06);
  }
}

@keyframes bookmark-icon-peek {
  0% { opacity: 0; transform: translateX(6px); }
  16% { opacity: 1; transform: translateX(0); }
  66% { opacity: 1; transform: translateX(0); }
  88% { opacity: 0; transform: translateX(6px); }
  100% { opacity: 0; transform: translateX(6px); }
}

@keyframes bookmark-toast-peek {
  0% {
    opacity: 0;
    transform: translateX(100%);
    width: var(--tab-expanded-width);
    padding-right: 0;
    background: var(--bookmark-klein-blue);
    box-shadow: none;
  }
  24% {
    opacity: 1;
    transform: translateX(0);
    width: calc(var(--tab-expanded-width) + 5px);
    padding-right: 5px;
    background: var(--bookmark-klein-blue-bright);
    box-shadow: -4px 5px 18px rgba(0, 47, 167, 0.28), -1px 2px 4px rgba(0, 0, 0, 0.08);
  }
  42% {
    opacity: 1;
    transform: translateX(0);
    width: var(--tab-expanded-width);
    padding-right: 0;
    background: var(--bookmark-klein-blue-bright);
    box-shadow: -2px 4px 14px rgba(0, 47, 167, 0.22), -1px 2px 4px rgba(0, 0, 0, 0.08);
  }
  72% {
    opacity: 1;
    transform: translateX(0);
    width: var(--tab-expanded-width);
    padding-right: 0;
    background: var(--bookmark-klein-blue);
    box-shadow: -2px 4px 14px rgba(0, 47, 167, 0.22), -1px 2px 4px rgba(0, 0, 0, 0.08);
  }
  100% {
    opacity: 0;
    transform: translateX(100%);
    width: var(--tab-expanded-width);
    padding-right: 0;
    background: var(--bookmark-klein-blue);
    box-shadow: none;
  }
}

/* ==========================================================================
   四、收藏页（瑞士精密编目列表） & 设置页
   ========================================================================== */

.collection-screen,
.settings-screen,
.font-usage-screen {
  margin: 0 auto;
  min-height: 100dvh;
  padding: var(--top-anchor-offset) 0 max(72px, var(--safe-bottom));
}
.collection-screen {
  width: 100%;
  padding-inline: max(var(--editorial-page-gutter), calc((100% - 880px) / 2));
  touch-action: pan-y pinch-zoom;
}
.settings-screen {
  width: min(520px, calc(100% - 40px));
}
.font-usage-screen {
  width: min(560px, calc(100% - 40px));
}

.canvas-anchors {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--anchor-row-height);
  margin-bottom: clamp(22px, 4.2vh, 36px);
}

.collection-screen .canvas-anchors {
  margin-block-end: clamp(30px, calc(4.2vh + 8px), 44px);
}

.reader-icon-button {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.reader-icon-button svg {
  display: block;
  width: 20px;
  height: 20px;
}

.anchor-back {
  margin-inline-start: -19.5px;
  color: var(--ink-secondary);
}

.anchor-settings {
  margin-inline-end: -15.5px;
  color: var(--ink-secondary);
}

.settings-sliders-icon .slider-knob {
  fill: var(--bg-canvas);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .settings-sliders-icon .slider-knob {
    transition: transform 240ms cubic-bezier(.22,1,.36,1);
  }
  .anchor-settings:is(:hover, :focus-visible) .slider-knob-top {
    transform: translateX(-2px);
  }
  .anchor-settings:is(:hover, :focus-visible) .slider-knob-bottom {
    transform: translateX(2px);
  }
}

/* 收藏分类菜单 */
.collection-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  width: 196px;
  padding: 6px 0;
  background: #FFFFFF;
  border: 1px solid var(--catalog-rule);
  border-radius: 3px;
  box-shadow: 0 12px 30px rgba(20, 20, 22, 0.08), 0 2px 6px rgba(20, 20, 22, 0.04);
  transform-origin: top right;
  animation: collection-menu-in 160ms cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes collection-menu-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.collection-menu-group {
  padding: 6px 0;
}

.collection-menu-heading {
  padding: 2px 14px 6px;
  font: 400 10px/1.2 var(--app-font);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.collection-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  font: 400 13px/1.3 var(--app-font);
  color: var(--ink-secondary);
  transition: background-color 140ms ease, color 140ms ease;
}

.collection-menu-item:hover,
.collection-menu-item:focus-visible {
  background: var(--bg-subtle);
  color: var(--ink-primary);
  outline: none;
}

.collection-menu-item[aria-checked="true"] {
  color: #141414;
  font-weight: 550;
}

.collection-menu-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  flex: none;
  transition: background-color 140ms ease;
}

.collection-menu-item[aria-checked="true"] .collection-menu-indicator {
  background: var(--klein-blue);
}

/* 收藏页头与分类筛选栏 */
.collection-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--catalog-rule);
}

.collection-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 14px;
}

.collection-title {
  margin: 0;
  font: 600 clamp(1.45rem, 2.5vw, 1.82rem)/1.12 var(--app-font);
  letter-spacing: -.015em;
  color: #141414;
}

.collection-count {
  font: 500 13px/1 var(--app-font);
  letter-spacing: .04em;
  color: var(--klein-blue);
  font-variant-numeric: tabular-nums;
}

.collection-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-bottom: 4px;
}

.collection-filter-btn {
  position: relative;
  width: 44px;
  height: 44px;
  margin-inline-end: -15.5px;
  color: var(--ink-secondary);
}

.collection-filter-btn[aria-expanded="true"] {
  opacity: 1;
  color: var(--ink-primary);
}

.collection-filter-btn.is-filtered {
  color: var(--klein-blue);
}

.collection-filter-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--klein-blue);
  pointer-events: none;
}

/* 收藏紧凑列表 */
.collection-catalog {
  display: flex;
  flex-direction: column;
}

.catalog-row {
  position: relative;
  display: grid;
  grid-template-columns: 120px 62px minmax(0, 1fr) 128px;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--catalog-rule);
  background: transparent;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 180ms ease;
}

.catalog-row::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--klein-blue);
  opacity: 0;
  transform: scaleY(0.55);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.22, 1, .36, 1);
}

.catalog-row:hover,
.catalog-row:focus-visible,
.catalog-row:active {
  background: rgba(255, 255, 255, 0.88);
}

.catalog-row:focus-visible {
  outline: 2px solid var(--klein-blue);
  outline-offset: -2px;
}

.catalog-row:hover::before,
.catalog-row:focus-visible::before,
.catalog-row:active::before {
  opacity: 1;
  transform: scaleY(1);
}

@keyframes catalog-return-bar {
  0%, 20% { opacity: .5; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(.55); }
}
.catalog-name a { text-decoration: none; }
.catalog-row:has(.catalog-name a:focus-visible)::before { opacity: 1; transform: scaleY(1); }
@media (prefers-reduced-motion: no-preference) {
  .catalog-row.is-return-echo:not(:hover):not(:has(:focus-visible))::before {
    animation: catalog-return-bar 240ms ease-out;
  }
}

/* 第 1 列：编号与分类标签（纯黑文字） */
.catalog-col-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}

.catalog-arc {
  font: 400 11px/1.2 var(--app-font);
  letter-spacing: .08em;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.catalog-category {
  display: inline-block;
  padding: 0;
  background: transparent;
  color: #141414;
  font: 500 11.5px/1.3 var(--app-font);
  letter-spacing: .02em;
  white-space: nowrap;
}

/* 第 2 列：字形微型标本框 */
.catalog-col-specimen {
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-specimen-box {
  width: 58px;
  height: 44px;
  padding: 4px;
  border: 1px solid var(--catalog-rule);
  border-radius: 2px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 180ms ease;
}

.catalog-row:hover .catalog-specimen-box,
.catalog-row:focus-visible .catalog-specimen-box {
  border-color: #CFD3DC;
}

.catalog-text-cover {
  padding: 6px;
  color: var(--ink-secondary);
  font: 400 10px/1.3 var(--app-font);
  text-align: center;
}

.catalog-specimen-glyph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--item-face, var(--app-font));
  font-weight: var(--item-weight, 500);
  font-variation-settings: var(--item-var, normal);
  font-size: 21px;
  line-height: 1.02;
  letter-spacing: -.02em;
  color: #111111;
  text-align: center;
  white-space: nowrap;
}

.catalog-specimen-glyph.is-pair {
  font-size: 13px;
  line-height: 1.04;
  letter-spacing: -.01em;
}

.catalog-specimen-glyph.is-wide {
  font-size: 16px;
}

/* 第 3 列：字体名称与单行导读摘要 */
.catalog-col-editorial {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.catalog-name {
  margin: 0;
  font: 600 .94rem/1.3 var(--app-font);
  letter-spacing: -.01em;
  color: #141414;
}

.catalog-summary {
  margin: 0;
  font: 400 .79rem/1.45 var(--app-font);
  color: #525257;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 第 4 列：年份、克莱因蓝协议码与极细右箭头 */
.catalog-col-archive {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.catalog-facts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  text-align: right;
}

.catalog-year {
  font: 400 11.5px/1.2 var(--app-font);
  letter-spacing: .04em;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.catalog-license {
  border: 0;
  background: transparent;
  padding: 2px 0;
  margin: -2px 0;
  font: 500 11px/1.2 var(--app-font);
  letter-spacing: .04em;
  color: var(--klein-blue);
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, opacity 160ms ease;
}

.catalog-license:hover,
.catalog-license:focus-visible {
  border-bottom-color: var(--klein-blue);
  outline: none;
}

.catalog-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-inline-end: -6px;
  flex: none;
  color: var(--ink-tertiary);
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), color 180ms ease;
}

.catalog-arrow svg {
  display: block;
  width: 16px;
  height: 16px;
}

.catalog-row:hover .catalog-arrow,
.catalog-row:focus-visible .catalog-arrow,
.catalog-row:active .catalog-arrow {
  transform: translateX(3px);
  color: var(--klein-blue);
}

/* 空状态 */
.collection-empty-panel {
  padding: clamp(72px, 16vh, 132px) 20px;
  border-bottom: 1px solid var(--catalog-rule);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.collection-empty-text {
  margin: 0;
  font: 400 13px/1.6 var(--app-font);
  letter-spacing: .08em;
  color: var(--ink-tertiary);
}

.collection-empty-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.collection-empty-link {
  border: 0;
  background: transparent;
  padding: 6px 2px;
  font: 450 13px/1.3 var(--app-font);
  letter-spacing: .02em;
  color: var(--klein-blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 57, 154, 0.28);
  transition: opacity 160ms ease, border-color 160ms ease;
}

.collection-empty-link:hover {
  opacity: .78;
  border-bottom-color: var(--klein-blue);
}

/* 设置清单 */
.settings-screen {
  --settings-line: 1.25rem;
  --settings-action-height: max(44px, var(--settings-line));
}
.settings-screen:focus { outline: none; }
.settings-screen .canvas-anchors { margin-block-end: 24px; }

.settings-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(74%);
  align-items: start;
  column-gap: 16px;
  padding-block: 16px;
  border-block-end: 1px solid var(--border-hairline);
}

.settings-label-main {
  grid-area: 1 / 1;
  min-inline-size: 0;
  font: 500 .9375rem/var(--settings-line) var(--app-font);
  color: var(--ink-primary);
  overflow-wrap: anywhere;
}

.settings-support,
.settings-inline-status {
  grid-column: 1 / -1;
  min-inline-size: 0;
  margin: 4px 0 0;
  font: 400 .8125rem/1.125rem var(--app-font);
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
}
.settings-inline-status:empty { margin-block-start: 0; }

.settings-control {
  grid-area: 1 / 2;
  justify-self: end;
  min-inline-size: 0;
  max-inline-size: 100%;
  /* Extend the target into the row padding while aligning its text to the title. */
  margin-block: calc((var(--settings-line) - var(--settings-action-height)) / 2);
}

.settings-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  column-gap: 12px;
}

.settings-choice,
.settings-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-inline-size: 44px;
  min-block-size: var(--settings-action-height);
  font: 400 .875rem/var(--settings-line) var(--app-font);
  text-align: end;
}

.settings-choice {
  position: relative;
  color: var(--ink-secondary);
  cursor: pointer;
}

.settings-choice > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.settings-choice > span::before {
  content: "";
  flex: none;
  inline-size: 4px;
  block-size: 4px;
  border-radius: 50%;
}

.settings-choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.settings-choice input:checked + span {
  color: var(--ink-primary);
}
.settings-choice input:checked + span::before { background: currentColor; }
.settings-choice:hover { color: var(--ink-primary); }

.settings-choice input:focus-visible + span {
  outline: 2px solid var(--link);
  outline-offset: 4px;
}

.settings-inline-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink-primary);
}
.settings-inline-btn:hover { color: var(--klein-blue); }

.settings-import-btn[aria-disabled="true"] {
  cursor: wait;
  color: var(--ink-secondary);
}

.settings-footer {
  margin-block-start: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px 16px;
  font: 400 .75rem/1.125rem var(--app-font);
  color: var(--ink-secondary);
}
.settings-identity {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 10px;
}
.settings-resources { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; }
.settings-footer a {
  display: inline-block;
  padding-block: 3px;
  color: var(--ink-primary);
  text-decoration: none;
}
.settings-footer a:hover { color: var(--klein-blue); }
.font-usage-source {
  display: inline-block;
  padding-block: 3px;
  color: var(--ink-secondary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

#font-usage-title:focus { outline: none; }
#font-usage-title span { display: inline-block; }
.font-usage-screen .license-lead { max-width: 50ch; }
.font-usage-screen .license-lead + .license-lead { margin-top: 14px; }
.font-usage-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 20px;
}
.font-usage-source { font: 400 .82rem/1.5 var(--app-font); }

/* 协议说明独立全屏页 (OFL 1.1 / UFL 1.0 / MiSans License) */
#main[data-screen="license"] {
  width: 100%;
  min-height: 100dvh;
  background: var(--bg-surface);
}

.license-screen {
  width: 100%;
  min-height: 100dvh;
  background: var(--bg-surface);
  padding: var(--top-anchor-offset) clamp(20px, 5vw, 48px) max(76px, calc(48px + var(--safe-bottom)));
}

.license-inner {
  width: min(720px, 100%);
  margin: 0 auto;
}

.license-head {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--catalog-rule);
}

.license-kicker {
  display: inline-block;
  margin-bottom: 10px;
  font: 500 11px/1.2 var(--app-font);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--klein-blue);
}

.license-title {
  margin: 0 0 12px;
  font: 600 clamp(1.5rem, 3.2vw, 2.05rem)/1.22 var(--app-font);
  letter-spacing: -.015em;
  color: #141414;
}

.license-lead {
  margin: 0;
  font: 400 .96rem/1.75 var(--app-font);
  color: #3A3A3E;
  text-wrap: pretty;
}

.license-grid {
  display: flex;
  flex-direction: column;
}

.license-block {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--catalog-rule);
}

.license-block-label {
  margin: 0;
  font: 500 12px/1.5 var(--app-font);
  letter-spacing: .06em;
  color: var(--ink-secondary);
}

.license-block-label.is-accent {
  color: var(--klein-blue);
}

.license-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font: 400 .92rem/1.72 var(--app-font);
  color: #1D1D1F;
}

.license-points li {
  position: relative;
  padding-left: 16px;
}

.license-points li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-tertiary);
  font-family: var(--app-font);
}

.license-prose {
  margin: 0;
  font: 400 .92rem/1.8 var(--app-font);
  color: #3A3A3E;
  text-wrap: pretty;
}

.license-foot {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font: 400 12px/1.5 var(--app-font);
  color: var(--ink-tertiary);
}

.license-foot-link {
  color: var(--klein-blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 57, 154, 0.3);
  padding-bottom: 2px;
  transition: opacity 160ms ease, border-color 160ms ease;
}

.license-foot-link:hover {
  opacity: .78;
  border-bottom-color: var(--klein-blue);
}

/* ==========================================================================
   五、全屏无留边统一故事档案页（收藏 / 探索 / 抽卡折页三端完全一致）
   ========================================================================== */

h1, h2, p { margin-block-start: 0; }

:root:has(#main[data-screen="story"]) {
  font-size: 15px;
}

body:has(#main[data-screen="story"]) {
  background: var(--bg-surface);
}

#main[data-screen="story"] {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  background: var(--bg-surface);
}

@media (max-width: 760px) {
  .collection-screen .anchor-back {
    margin-inline-start: -16px;
  }
  .collection-head {
    align-items: flex-end;
    gap: 12px;
  }
  .collection-heading {
    padding-bottom: 12px;
  }
  .catalog-row {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    grid-template-areas:
      "meta meta archive"
      "specimen editorial editorial";
    align-items: start;
    gap: 8px 12px;
  }
  .catalog-row::before {
    left: -10px;
  }
  .catalog-col-meta {
    grid-area: meta;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .catalog-col-specimen {
    grid-area: specimen;
    justify-content: flex-start;
  }
  .catalog-specimen-box {
    width: 50px;
  }
  .catalog-col-editorial {
    grid-area: editorial;
  }
  .catalog-col-archive {
    grid-area: archive;
    justify-content: flex-end;
    align-self: center;
    gap: 8px;
  }
  .catalog-facts {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
  .license-block {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
