/* Vault only. No imports, framework reset, or styles shared with other routes. */
@font-face { font-family: Vault Display; src: url('./fonts/caslon-display.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Vault Sans; src: url('./fonts/manrope-regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Vault Sans; src: url('./fonts/manrope-medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Vault Sans; src: url('./fonts/manrope-semibold.ttf') format('truetype'); font-weight: 600 800; font-display: swap; }
body.vault-page {
  color-scheme: dark;
  --bg: #030303; --surface: #0c0c0c; --surface-soft: #171717; --raised: #202020;
  --text: #efefec; --muted: #a9a9a5; --faint: #959590;
  --line: #292929; --line-strong: #464646; --brand: #ef675c; --brand-hover: #ff8176;
  --danger: #ff9289; --green: #9cceb1; --green-bg: #14251b;
  --glass: #101010e8; --glass-border: #ffffff20; --glass-shine: #ffffff0c;
  --shadow-lg: 0 24px 70px #0009; --shadow-panel: 0 14px 35px #0004;
  --sans: 'Vault Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Vault Display', Georgia, serif; --reading-font: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --radius-sm: 6px; --radius: 12px; --radius-lg: 18px; --bar-height: 76px;
  --motion-fast: 150ms; --motion: 220ms; --ease: cubic-bezier(.2,.7,.2,1);
  margin: 0; background: var(--bg); color: var(--text); font: 14px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
}
html[data-theme='light'] body.vault-page {
  color-scheme: light; --bg: #f4f3ef; --surface: #fdfdfb; --surface-soft: #ecebe7; --raised: #e3e2dd;
  --text: #191918; --muted: #585852; --faint: #64645d; --line: #d6d5ce; --line-strong: #a6a59c;
  --brand: #a2362f; --brand-hover: #862920; --danger: #a2362f; --green: #286c41; --green-bg: #e3eee4;
  --glass: #f9f8f3ed; --glass-border: #00000020; --glass-shine: #ffffffaa;
  --shadow-lg: 0 24px 70px #21201925; --shadow-panel: 0 14px 35px #2120190e;
}
.vault-page *, .vault-page *::before, .vault-page *::after { box-sizing: border-box; }
.vault-page button, .vault-page input, .vault-page select, .vault-page textarea { font: inherit; }
:where(.vault-page) button { border: 0; background: none; cursor: pointer; color: inherit; }
.vault-page button, .vault-page summary { touch-action: manipulation; }
.vault-page button, .vault-page a, .vault-page input, .vault-page select, .vault-page summary { -webkit-tap-highlight-color: transparent; }
.vault-page button:disabled { opacity: .5; cursor: not-allowed; }
.vault-page a { color: inherit; }
.vault-page :focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.vault-page [hidden] { display: none !important; }
.vault-page h1, .vault-page h2, .vault-page h3, .vault-page p { margin: 0; }
.vault-page h1, .vault-page h2, .vault-page h3 { line-height: 1.2; letter-spacing: -.025em; }
.vault-page ::selection { background: #ef675c42; color: var(--text); }
.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.icon-btn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--muted); }
.btn, .quiet-btn, .text-btn, .text-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn { min-height: 48px; padding: 12px 20px; background: linear-gradient(#282828,#191919); color: #efefec; border: 1px solid #ffffff25 !important; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: inset 0 1px 0 #ffffff0e, 0 3px 5px #0004; white-space: nowrap; }
html[data-theme='light'] .btn { background: linear-gradient(#383836,#222221); }
.btn.small { min-height: 44px; padding: 9px 16px; }
.btn.ghost { color: var(--text); background: var(--surface); border-color: var(--line-strong) !important; box-shadow: none; }
.quiet-btn { min-height: 44px; border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.text-btn { min-height: 44px; padding: 0 3px; font-size: 12px; color: var(--muted); }
.text-link { min-height: 44px; padding: 0; font-size: 13px; color: var(--text); }
.danger, .danger:hover { color: var(--danger); }
.eyebrow { display: block; font-size: 11px; font-weight: 500; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -90px; left: 16px; background: var(--surface); border: 1px solid var(--line); padding: 12px 18px; z-index: 100; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.topbar { position: sticky; top: 0; z-index: 30; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); padding: 0 32px; }
.topbar-inner { max-width: 1260px; margin: auto; min-height: var(--bar-height); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 17px; font-weight: 600; line-height: 1.15; letter-spacing: -.04em; flex-shrink: 0; }
.brand-logo { width: 30px; height: 30px; object-fit: contain; }
html[data-theme='light'] .brand-logo { filter: brightness(.2); }
.brand-subtitle { display: block; font-size: 8px; letter-spacing: .19em; color: var(--muted); font-weight: 500; margin-top: 5px; }
.glass-nav { display: flex; align-items: center; gap: 5px; }
.glass-nav button { min-height: 44px; padding: 9px 20px; border-radius: 22px; color: var(--muted); font-size: 13px; font-weight: 500; }
.glass-nav button[aria-current] { color: var(--text); background: var(--surface-soft); box-shadow: inset 0 1px 0 var(--glass-shine); }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.access-label { font-size: 11px; color: var(--muted); margin-right: 12px; }
.appearance-menu { position: relative; }
.appearance-menu summary { list-style: none; }
.appearance-menu summary::-webkit-details-marker, .card-menu summary::-webkit-details-marker { display: none; }
.appearance-menu .menu-popover { width: 260px; top: 52px; }
.appearance-label { display: block; color: var(--muted); font-size: 11px; letter-spacing: .1em; padding: 9px 10px; }
.appearance-menu small { display: block; color: var(--muted); font-size: 11px; padding: 8px 10px; }
.page, .landing-main { width: min(1320px,100%); padding-inline: 32px; margin: auto; }
.page { padding-block: 38px 80px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.page-head .eyebrow { display: none; }
.page-head h1 { font: 400 48px/1.05 var(--serif); letter-spacing: -.025em; margin: 0 0 10px; }
.page-head p { color: var(--muted); font-size: 13px; }
.library-summary { display: flex; gap: 32px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.library-summary strong { display: block; font-size: 24px; font-weight: 500; color: var(--text); line-height: 1.4; letter-spacing: -.04em; }
.library-tools { position: sticky; top: calc(var(--bar-height) + 12px); z-index: 20; display: flex; align-items: center; gap: 8px; padding: 6px 9px; margin-bottom: 32px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 10px; box-shadow: inset 0 1px 0 var(--glass-shine); }
.vault-search, .category-search, .essay-search { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.vault-search { min-height: 44px; flex: 1; padding: 0 9px; min-width: 0; }
.vault-search input, .category-search input, .essay-search input { min-width: 0; width: 100%; background: none; border: 0; color: var(--text); padding: 11px 0; outline: none; }
input[type='search']::-webkit-search-cancel-button { cursor: pointer; }
input::placeholder { color: var(--faint); opacity: 1; }
.vault-search:focus-within, .category-search:focus-within, .essay-search:focus-within { box-shadow: inset 0 -2px 0 var(--text); }
kbd { border: 1px solid var(--line); border-radius: 4px; padding: 0 7px; font-size: 12px; color: var(--muted); }
.filter-label { display: flex; align-items: center; }
.vault-filter { border: 1px solid var(--line); border-radius: 7px; padding: 9px 10px; min-height: 44px; background: var(--surface); color: var(--text); font-size: 12px; cursor: pointer; }
.tools-rule { width: 1px; height: 24px; background: var(--line); margin: 0 3px; }
.search-scope { font-size: 11px; color: var(--muted); padding-right: 10px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.section-heading h2 { font-size: 17px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.section-note { font-size: 11px; color: var(--muted); text-align: right; }
.count-pill { color: var(--muted); font-size: 11px; font-weight: 400; padding: 2px 7px; background: var(--surface-soft); border-radius: 5px; }
.continue-section, .vault-search-results { margin-bottom: 38px; }
.reading-desk { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.continue-card { display: flex; align-items: center; gap: 18px; min-width: 0; padding: 15px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.continue-card .category-art { width: 84px; height: 84px; border-radius: 7px; flex-shrink: 0; border: 1px solid var(--line); }
.continue-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.continue-top { font-size: 11px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.continue-copy strong { font-size: 15px; font-weight: 500; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.continue-bottom { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.continue-arrow { color: var(--muted); padding-right: 4px; }
.category-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; align-items: stretch; }
.category-card { position: relative; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--glass-shine); }
.category-open { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; text-align: left; border-radius: inherit; }
.category-art { display: block; width: 100%; aspect-ratio: 2/1; flex-shrink: 0; position: relative; overflow: hidden; background: #070707; background-size: cover; background-position: center; border-radius: 11px 11px 0 0; }
.category-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.category-card .category-art { border-bottom: 1px solid var(--line); }
.category-copy { display: flex; flex-direction: column; width: 100%; padding: 24px; flex: 1; }
.card-meta { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 11px; margin-bottom: 12px; }
.category-title { font-size: 22px; font-weight: 500; line-height: 1.3; letter-spacing: -.035em; margin-bottom: 10px; }
.category-title, .category-description, .sidebar h2, .chapter-toggle strong, .essay-item button > span:last-child { overflow-wrap: anywhere; }
.category-description { font-size: 13px; line-height: 1.7; color: var(--muted); margin-bottom: 22px; }
.card-index { display: flex; flex-direction: column; gap: 0; margin-bottom: 18px; border-top: 1px solid var(--line); }
.card-index > span { display: flex; gap: 12px; padding: 8px 0; align-items: baseline; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.card-index small { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }
.card-index > span > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-progress-label { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); margin-top: auto; margin-bottom: 8px; padding-top: 8px; }
.progress { height: 2px; border-radius: 2px; background: var(--line); width: 100%; display: block; overflow: hidden; }
.progress i { display: block; background: #b8b8b1; width: var(--progress,0%); height: 100%; transition: width var(--motion) var(--ease); }
.card-entry { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; font-size: 12px; font-weight: 500; color: var(--text); }
.card-entry .icon { width: 17px; height: 17px; }
.card-menu { position: absolute; top: 8px; right: 8px; z-index: 5; }
.card-menu summary { background: #121212c9; color: #ececea; list-style: none; border: 1px solid #ffffff24; border-radius: 8px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card-menu[open] { z-index: 22; }
.menu-popover, .chapter-context-menu { border: 1px solid var(--line-strong); border-radius: 10px; padding: 5px; background: var(--surface); box-shadow: var(--shadow-lg); min-width: 212px; }
.menu-popover { position: absolute; right: 0; top: 50px; }
.menu-popover button, .chapter-context-menu button { width: 100%; min-height: 44px; text-align: left; padding: 10px; border-radius: 5px; display: flex; gap: 10px; align-items: center; font-size: 12px; }
.chapter-context-menu { position: fixed; z-index: 60; width: 204px; min-width: 204px; }
.results-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.search-result { display: flex; width: 100%; text-align: left; align-items: center; gap: 18px; padding: 20px; border-bottom: 1px solid var(--line); }
.search-result:last-child { border-bottom: 0; }
.result-icon { color: var(--muted); }
.search-result > span:nth-child(2) { flex: 1; min-width: 0; }
.search-result small { display: block; color: var(--muted); font-size: 11px; }
.search-result strong { font-size: 18px; font-weight: 500; display: block; margin: 5px 0; overflow-wrap: anywhere; }
.result-excerpt { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.empty-state { grid-column: 1/-1; padding: 36px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); }
.library-footer { display: flex; justify-content: space-between; gap: 24px; padding: 25px 0; width: min(1256px,calc(100% - 64px)); margin: auto; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
/* Entrance: sculpture is decorative; all editorial information remains HTML. */
.landing-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; min-height: 680px; padding: 56px 0 64px; position: relative; isolation: isolate; }
.landing-hero::before { content: ''; position: absolute; z-index: -1; inset: -10px -32px; pointer-events: none; background: radial-gradient(ellipse at 90% 8%,#ffffff08,transparent 52%); }
.landing-copy { position: relative; z-index: 2; }
.landing-copy h1 { font: 400 clamp(72px,7.3vw,116px)/.98 var(--serif); letter-spacing: -.05em; margin: 0 0 32px; }
.landing-copy > p { color: var(--muted); font-size: 15px; max-width: 400px; line-height: 1.85; margin-bottom: 30px; }
.hero-actions { display: flex; align-items: center; gap: 14px; }
.hero-actions .quiet-btn { color: var(--muted); }
.landing-caption { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); margin-top: 24px; flex-wrap: wrap; }
.landing-caption strong { color: var(--text); font-weight: 500; }
.landing-caption > span { height: 10px; width: 1px; margin: 0 10px; background: var(--line); }
.vault-sculpture { width: 100%; position: relative; }
.vault-sculpture img { display: block; width: 100%; height: auto; mix-blend-mode: lighten; }
html[data-theme='light'] .vault-sculpture img { mix-blend-mode: normal; border-radius: 16px; box-shadow: var(--shadow-panel); }
.entrance-collections { padding-block: 40px 56px; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.entrance-collections .section-heading { margin-bottom: 26px; }
.entrance-collections h2 { font: 400 40px/1.15 var(--serif); margin-top: 10px; }
.entrance-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.spotlight-card { position: relative; display: flex; align-items: center; gap: 24px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--glass-shine); text-align: left; min-width: 0; }
.spotlight-card .category-art { width: 112px; height: 108px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 7px; }
.spotlight-copy { display: flex; flex-direction: column; gap: 9px; min-width: 0; flex: 1; }
.spotlight-copy strong { font-size: 17px; font-weight: 500; line-height: 1.4; letter-spacing: -.03em; overflow-wrap: anywhere; }
.spotlight-copy small { font-size: 11px; color: var(--muted); }
.spotlight-copy > span { color: var(--muted); font-size: 11px; line-height: 1.6; }
.spotlight-card > .icon { width: 17px; color: var(--muted); }
.inside-section { display: grid; grid-template-columns: 170px minmax(0,1fr) 250px; gap: 40px; border-top: 1px solid var(--line); padding: 48px 0 60px; }
.inside-label { display: flex; flex-direction: column; gap: 20px; }
.inside-label > span:last-child { color: var(--muted); font-size: 12px; }
.inside-copy h2 { font: 400 38px/1.16 var(--serif); margin-bottom: 18px; overflow-wrap: anywhere; }
.inside-copy p { font-size: 13px; color: var(--muted); margin-bottom: 18px; line-height: 1.85; }
.inside-chapters { display: grid; align-content: start; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; height: fit-content; }
.inside-chapters .eyebrow { margin-bottom: 18px; }
.inside-chapters > span:not(.eyebrow) { display: flex; gap: 14px; font-size: 11px; color: var(--muted); padding: 12px 0; border-top: 1px solid var(--line); }
.inside-chapters small { color: var(--faint); font-size: 10px; }
.preview-empty { padding: 32px; color: var(--muted); }
/* Reader, writer, and administrative tools share the same document measure. */
.reader { min-height: 100vh; }
.reader-body { display: grid; grid-template-columns: 300px minmax(0,1fr); width: min(1500px,100%); margin: auto; border-inline: 1px solid var(--line); }
.sidebar { padding: 28px 22px; border-right: 1px solid var(--line); background: var(--surface); position: sticky; top: var(--bar-height); height: calc(100dvh - var(--bar-height)); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sidebar h2 { font-size: 22px; font-weight: 500; margin-bottom: 12px; }
.sidebar-identity { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sidebar-identity .category-art { width: 54px; height: 64px; border: 1px solid var(--line); border-radius: 6px; }
.sidebar-identity h2 { font-size: 18px; line-height: 1.4; margin: 0; }
.reader.is-entering :is(.collection-overview,.essay-document) { animation: vault-panel var(--motion) var(--ease); }
@keyframes vault-panel { from { transform: translateY(6px); } to { transform: translateY(0); } }
.collection-hero { display: grid; grid-template-columns: minmax(0,1fr) 160px; gap: 32px; align-items: start; margin-bottom: 36px; }
.collection-title { font: 400 58px/1.06 var(--serif); letter-spacing: -.035em; margin: 14px 0 20px !important; overflow-wrap: anywhere; }
.collection-title:focus-visible { outline: none; }
.collection-hero .category-art { height: 180px; aspect-ratio: auto; border: 1px solid var(--line); border-radius: 10px; }
.collection-hero .lede { font-size: 13px; line-height: 1.9; margin-bottom: 20px; }
.collection-metadata { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 11px; }
.collection-next { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--surface); margin-bottom: 36px; isolation: isolate; }
/* Dot spacing adapted from the 21st.dev Grid Ellipsis technique, not its framework or entrance effects. */
.collection-next::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(var(--line-strong) .65px,transparent .65px); background-size: 24px 24px; mask-image: linear-gradient(90deg,transparent 40%,#000); opacity: .5; }
.collection-next h2 { font: 400 32px/1.2 var(--serif); margin: 13px 0 !important; overflow-wrap: anywhere; }
.collection-next p { color: var(--muted); font-size: 12px; line-height: 1.85; max-width: 500px; margin-bottom: 22px; }
.collection-next > div { display: flex; align-items: center; gap: 20px; }
.collection-next > div > span { color: var(--muted); font-size: 11px; }
.collection-index-heading { margin-bottom: 16px; }
.collection-index { display: grid; gap: 12px; }
.collection-chapter { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.collection-chapter summary { display: flex; align-items: center; gap: 16px; padding: 18px 20px; min-height: 64px; list-style: none; cursor: pointer; border-radius: var(--radius); }
.collection-chapter summary::-webkit-details-marker { display: none; }
.collection-chapter summary strong { flex: 1; font-size: 14px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.collection-chapter summary small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.collection-chapter summary > .icon { width: 15px; color: var(--muted); transition: transform var(--motion); }
.collection-chapter[open] summary > .icon { transform: rotate(90deg); }
.chapter-number, .index-number { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.collection-essay-list { border-top: 1px solid var(--line); padding-inline: 20px; }
.collection-essay-list > button { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; padding: 17px 0; min-height: 60px; border-bottom: 1px solid var(--line); }
.collection-essay-list > button:last-child { border-bottom: 0; }
.collection-essay-list > button > span:nth-child(2) { flex: 1; min-width: 0; }
.collection-essay-list strong { font-size: 13px; font-weight: 500; display: block; overflow-wrap: anywhere; }
.collection-essay-list small { display: block; color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 5px; }
.collection-essay-list > button > .icon { width: 16px; color: var(--muted); }
.index-state { color: var(--muted); font-size: 11px; white-space: nowrap; }
.index-state .icon { width: 15px; color: var(--green); }
.empty-note { color: var(--muted); padding: 16px; font-size: 12px; }
.sidebar-description { font-size: 12px; color: var(--muted); margin-bottom: 20px; line-height: 1.7; }
.sidebar-progress { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); margin-bottom: 20px; }
.sidebar-progress strong { color: var(--text); font-weight: 500; }
.category-search { border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; gap: 8px; }
.category-search .icon { width: 15px; height: 15px; }
.category-search input { font-size: 12px; min-height: 44px; }
.contents-label { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 10px; }
.contents-label > span { font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.chapter { margin-bottom: 10px; }
.chapter-heading { display: flex; align-items: start; }
.chapter-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; flex: 1; min-width: 0; text-align: left; padding: 8px 0; }
.chapter-toggle strong { font-size: 12px; font-weight: 600; line-height: 1.5; flex: 1; }
.chapter-toggle small { font-size: 11px; color: var(--muted); }
.chapter-chevron { display: inline-flex; color: var(--faint); }
.chapter-chevron .icon { width: 14px; height: 14px; transition: transform var(--motion-fast); }
.chapter-chevron.open .icon { transform: rotate(90deg); }
.chapter-menu-btn .icon { width: 16px; height: 16px; }
.essay-list { padding: 2px 0 8px 8px; margin-left: 7px; border-left: 1px solid var(--line); }
.essay-item { border-radius: 6px; margin: 2px 0; }
.essay-item button { display: flex; gap: 8px; text-align: left; width: 100%; padding: 10px; min-height: 44px; font-size: 12px; line-height: 1.55; color: var(--muted); border-radius: 6px; }
.essay-item.active button { background: var(--surface-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.essay-status { width: 15px; height: 19px; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.essay-status > span { width: 3px; height: 3px; background: var(--faint); border-radius: 50%; }
.essay-status .icon { width: 14px; height: 14px; color: var(--green); }
.draft-label { display: inline-block; font: 500 10px/1.5 var(--sans); padding: 2px 6px; border-radius: 4px; background: var(--surface-soft); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.essay-item .draft-label { display: block; width: fit-content; margin: 5px 0 0; }
.add-essay-btn, .new-chapter-btn { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 10px; min-height: 44px; font-size: 12px; border-radius: 6px; }
.add-essay-btn .icon, .new-chapter-btn .icon { width: 15px; height: 15px; }
.new-chapter-btn { border: 1px solid var(--line) !important; width: 100%; justify-content: center; margin-top: 22px; }
.reading { min-width: 0; background: var(--bg); min-height: calc(100vh - var(--bar-height)); }
.reading-inner { max-width: 864px; padding: 50px 48px 100px; margin: auto; }
.essay-breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; margin-bottom: 30px; flex-wrap: wrap; }
.essay-breadcrumb .icon { width: 12px; height: 12px; }
.essay-breadcrumb span:last-child { color: var(--text); }
.document-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.read-time { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.read-time .icon { width: 15px; height: 15px; }
.reading-actions { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.verified { min-height: 44px; border: 1px solid var(--line) !important; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border-radius: 7px; font-size: 11px; white-space: nowrap; }
.verified.done { color: var(--green); background: var(--green-bg); }
.document-title { font: 400 clamp(42px,4.5vw,64px)/1.07 var(--serif); letter-spacing: -.035em; overflow-wrap: anywhere; margin-bottom: 25px; }
.document-title:focus-visible { outline: none; }
.lede { font: 16px/1.9 var(--sans); color: var(--muted); margin-bottom: 30px; }
.essay-cover { width: 100%; max-height: 480px; object-fit: cover; display: block; margin-bottom: 32px; border-radius: 8px; }
.essay-search { border-bottom: 1px solid var(--line); margin: 28px 0 36px; }
.essay-search input { font-size: 12px; min-height: 44px; }
.essay-search .icon { width: 17px; height: 17px; }
.search-hint { font-size: 11px; white-space: nowrap; }
.article { font: 20px/1.9 var(--reading-font); overflow-wrap: anywhere; color: var(--text); }
.article p, .article ul, .article ol { margin: 0 0 1.4em; }
.article p:last-child { margin-bottom: 0; }
.article h2 { font: 500 25px/1.4 var(--sans); letter-spacing: -.025em; margin: 1.7em 0 .7em; }
.article h3 { font: 500 21px/1.45 var(--sans); margin: 1.5em 0 .7em; }
.article blockquote { border-left: 2px solid var(--line-strong); margin: 1.8em 0; padding: 8px 0 8px 24px; color: var(--muted); }
.article a { color: var(--brand); text-underline-offset: 4px; }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.article img { display: block; max-width: 100%; height: auto; margin: 1.5em auto; border-radius: 6px; }
.article iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; display: block; margin: 1.5em 0; }
.article mark { background: #ddd0a0; color: #29250d; padding: 0 2px; }
.essay-pagination { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; padding-top: 30px; border-top: 1px solid var(--line); margin-top: 52px; }
.essay-pagination button { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 0; min-height: 72px; }
.essay-pagination button:last-child { text-align: right; justify-content: flex-end; }
.essay-pagination small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.essay-pagination strong { display: block; font-size: 13px; font-weight: 500; line-height: 1.5; }
.collection-end { text-align: right; font-size: 12px; color: var(--muted); padding: 12px; }
.empty-reader { padding: 70px 0; }
.empty-reader > .icon { width: 35px; height: 35px; color: var(--muted); margin-bottom: 24px; }
.empty-reader h1 { font: 400 44px/1.15 var(--serif); margin: 16px 0; }
.focus-mode .reader-body { grid-template-columns: minmax(0,1fr); }
.focus-mode .sidebar { display: none; }
.contents-toggle, .contents-close, .contents-backdrop { display: none; }
.composer-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
#composer-status { color: var(--muted); font-size: 12px; text-align: right; }
.composer-toolbar { position: sticky; top: calc(var(--bar-height) + 12px); display: flex; align-items: center; flex-wrap: wrap; gap: 2px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 8px; padding: 5px; z-index: 12; margin-bottom: 30px; }
.composer-toolbar button { min-width: 44px; min-height: 44px; padding: 8px; border-radius: 5px; font-size: 15px; display: flex; gap: 7px; align-items: center; justify-content: center; }
.composer-toolbar button span { font-size: 12px; }
.toolbar-divider { width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
[contenteditable] { min-height: 1.3em; cursor: text; }
[contenteditable]:empty::before { content: attr(data-placeholder); color: var(--faint); pointer-events: none; }
[contenteditable]:focus-visible { outline: none; box-shadow: 0 2px 0 var(--line-strong); }
.composer-title { padding: 4px 0; margin-bottom: 14px; }
.composer-lede { margin-bottom: 32px; padding: 4px 0; }
.composer-body { min-height: 360px; padding: 8px 0 40px; }
.composer-footer { border-top: 1px solid var(--line); padding-top: 24px; }
.cover-field { display: block; font-size: 13px; }
.cover-field > span:first-child { color: var(--muted); font-size: 11px; margin-left: 6px; }
.cover-controls { display: flex; align-items: center; gap: 10px; margin: 10px 0 24px; }
.composer-cover { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--bg); color: var(--text); font-size: 13px; }
.cover-controls .icon-btn { border: 1px solid var(--line); }
.composer-actions, .composer-save-actions { display: flex; align-items: center; gap: 10px; }
.composer-actions { justify-content: space-between; flex-wrap: wrap; }
.composer-save-actions { flex-wrap: wrap; }
.composer-tip { color: var(--muted); font-size: 11px; margin-top: 22px; }
.modal-wrap { position: fixed; inset: 0; z-index: 80; background: #000b; padding: 24px; display: grid; place-items: center; overflow: auto; }
.modal { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 36px; max-width: 500px; width: 100%; max-height: calc(100dvh - 48px); overflow: auto; box-shadow: var(--shadow-lg); position: relative; }
.modal-close { position: absolute; right: 12px; top: 12px; }
.modal .eyebrow { padding-right: 30px; }
.modal h2 { margin: 12px 0 28px; font-size: 26px; font-weight: 500; }
.field { display: block; margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.field input { display: block; margin-top: 8px; width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 6px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 28px; }
.toast { position: fixed; z-index: 100; bottom: 24px; left: 50%; transform: translate(-50%,8px); pointer-events: none; opacity: 0; background: var(--text); color: var(--surface); border-radius: 8px; padding: 14px 20px; font-size: 12px; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); transition: opacity var(--motion-fast), transform var(--motion-fast); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.toast.bad { background: var(--surface); color: var(--danger); border: 1px solid var(--line-strong); }
.loading-screen { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; gap: 16px; }
.loading-screen h1 { font: 400 42px/1.15 var(--serif); }
.loading-screen p { color: var(--muted); max-width: 540px; }
.loading-mark { color: var(--brand); font-size: 28px; }
.loading-skeleton { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; width: min(580px,100%); margin-top: 28px; }
.loading-skeleton span { display: block; height: 110px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius); animation: vault-load 1.8s ease-in-out infinite; }
.loading-skeleton span:nth-child(2) { animation-delay: 100ms; }
.loading-skeleton span:nth-child(3) { animation-delay: 200ms; }
.dragging { opacity: .45; }
@keyframes vault-load { 50% { background: var(--raised); } }
/* No scroll reveals or pointer-following light. Interaction feedback only. */
.vault-page :is(button,summary) { transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), box-shadow var(--motion), transform var(--motion-fast) var(--ease); }
.vault-page button:active:not(:disabled), .vault-page summary:active { transform: translateY(1px); }
@media (hover:hover) {
  .btn:hover { background: #303030; box-shadow: inset 0 1px 0 #ffffff1c, 0 4px 8px #0004; }
  .btn.ghost:hover, .icon-btn:hover, .quiet-btn:hover, .glass-nav button:hover, .menu-popover button:hover, .chapter-context-menu button:hover, .essay-item button:hover, .composer-toolbar button:hover, .search-result:hover { background: var(--surface-soft); color: var(--text); }
  .text-link:hover, .text-btn:hover { text-decoration: underline; text-underline-offset: 5px; color: var(--text); }
  .category-card, .spotlight-card, .continue-card { transition: border-color var(--motion), box-shadow var(--motion), transform var(--motion) var(--ease); }
  .category-card:hover, .spotlight-card:hover, .continue-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-panel), inset 0 1px 0 var(--glass-shine); transform: translateY(-2px); }
  .essay-pagination button:hover strong { text-decoration: underline; text-underline-offset: 4px; }
}
html[data-material='solid'] :is(.topbar,.library-tools,.composer-toolbar) { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
@media (max-width: 1100px) {
  .access-label { display: none; } .topbar-inner { gap: 16px; }
  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .landing-hero { min-height: 580px; gap: 24px; } .landing-copy h1 { font-size: 82px; }
  .inside-section { grid-template-columns: 150px minmax(0,1fr); } .inside-chapters { display: none; }
  .reader-body { grid-template-columns: 280px minmax(0,1fr); } .reading-inner { padding: 40px 34px 80px; }
}
@media (max-width: 900px) {
  .glass-nav button { padding-inline: 16px; }
  .landing-hero { min-height: 500px; } .landing-copy h1 { font-size: 66px; } .hero-actions { gap: 6px; }
  .landing-copy > p { font-size: 13px; } .hero-actions .quiet-btn { font-size: 11px; }
  .spotlight-card { gap: 14px; padding: 14px; } .spotlight-card .category-art { width: 80px; height: 86px; }
  .reader-body { display: block; } .contents-toggle, .contents-close { display: inline-flex; }
  .sidebar, .focus-mode .sidebar { display: block; position: fixed; left: 0; top: var(--bar-height); bottom: 0; z-index: 40; width: 340px; max-width: calc(100vw - 32px); transform: translateX(-102%); transition: transform var(--motion) var(--ease), visibility var(--motion); height: calc(100dvh - var(--bar-height)); padding: 24px; visibility: hidden; }
  .contents-open .sidebar { transform: none; visibility: visible; }
  .contents-open .contents-backdrop { display: block; position: fixed; inset: var(--bar-height) 0 0; z-index: 35; background: #0009; }
  .reading-inner { max-width: 820px; padding: 42px 40px 80px; }
}
@media (max-width: 650px) {
  body.vault-page { --bar-height: 120px; }
  .topbar { padding: 8px 20px; } .topbar-inner { flex-wrap: wrap; gap: 4px; min-height: 104px; }
  .brand { font-size: 15px; } .brand-logo { width: 28px; height: 28px; }
  .glass-nav { order: 3; width: 100%; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 7px; }
  .glass-nav button { flex: 1; min-height: 44px; padding: 6px 10px; font-size: 12px; }
  .page, .landing-main { padding-inline: 20px; }
  .landing-hero { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 44px 0 26px; min-height: 0; }
  .landing-hero::before { inset-inline: -20px; }
  .landing-copy h1 { font-size: clamp(60px,16vw,86px); margin-bottom: 24px; }
  .landing-copy > p { font-size: 14px; max-width: 340px; line-height: 1.85; margin-bottom: 24px; }
  .hero-actions { gap: 8px; flex-wrap: wrap; } .hero-actions .quiet-btn { font-size: 12px; }
  .landing-caption { margin-top: 18px; }
  .vault-sculpture { width: min(340px,100%); margin: 8px auto 0; }
  .entrance-collections { padding-block: 30px 36px; } .entrance-collections .section-heading { flex-wrap: wrap; gap: 12px; }
  .entrance-collections h2 { font-size: 34px; } .entrance-grid { grid-template-columns: 1fr; gap: 12px; }
  .spotlight-card .category-art { width: 72px; height: 82px; } .spotlight-copy strong { font-size: 15px; }
  .spotlight-copy > span { display: none; } .spotlight-card { min-height: 112px; }
  .inside-section { display: block; padding: 30px 0 40px; } .inside-label { gap: 8px; margin-bottom: 24px; } .inside-copy h2 { font-size: 34px; }
  .page { padding-block: 28px 48px; } .page-head { flex-wrap: wrap; gap: 20px; margin-bottom: 24px; }
  .page-head h1 { font-size: 40px; } .library-summary { gap: 28px; width: 100%; font-size: 11px; }
  .library-summary strong { font-size: 21px; }
  .library-tools { position: relative; top: auto; flex-wrap: wrap; gap: 6px; padding: 6px; margin-bottom: 26px; }
  .vault-search { flex-basis: 100%; border-bottom: 1px solid var(--line); padding: 0 8px 4px; } .vault-search input { font-size: 16px; }
  .filter-label { flex: 1; } .vault-filter { width: 100%; } .tools-rule, .section-note { display: none; }
  .library-tools .btn { font-size: 11px; padding-inline: 10px; } .search-scope { padding: 4px 8px; }
  .section-heading h2 { font-size: 16px; } .continue-section { margin-bottom: 30px; }
  .reading-desk { grid-template-columns: 1fr; gap: 10px; }
  .continue-card { padding: 12px; gap: 14px; } .continue-card .category-art { width: 58px; height: 64px; }
  .continue-copy strong { font-size: 13px; } .continue-bottom { font-size: 11px; gap: 5px; }
  .category-grid { grid-template-columns: 1fr; gap: 18px; }
  .category-copy { padding: 22px; } .category-title { font-size: 23px; } .category-description { font-size: 13px; }
  .card-meta, .card-progress-label, .card-index > span { font-size: 11px; } .card-entry { font-size: 13px; }
  .library-footer { width: calc(100% - 40px); padding-block: 22px; font-size: 10px; flex-direction: column; gap: 8px; }
  .reader { --bar-height: 70px; } .reader .topbar { padding: 10px 12px; } .reader .topbar-inner { flex-wrap: nowrap; min-height: 50px; gap: 4px; }
  .reader .brand > span { display: none; } .reader .quiet-btn { padding: 8px; font-size: 12px; min-width: 44px; }
  .reader .topbar-actions { gap: 0; } #toggle-focus span, .reader #back span { display: none; }
  .reader .brand-logo { width: 25px; height: 25px; } .reader .appearance-menu .icon-btn { min-width: 44px; }
  .reading-inner { padding: 28px 23px 70px; } .essay-breadcrumb { font-size: 11px; margin-bottom: 22px; }
  .document-tools { gap: 12px; margin-bottom: 28px; } .reading-actions .quiet-btn { padding: 8px; }
  .collection-hero { display: block; margin-bottom: 26px; } .collection-hero > .category-art { display: none; }
  .collection-title { font-size: 46px; } .collection-next { padding: 22px; }
  .collection-next h2 { font-size: 30px; } .collection-next > div { gap: 14px; }
  .collection-chapter summary { padding: 16px; gap: 12px; } .collection-chapter summary small { display: none; }
  .collection-essay-list { padding-inline: 16px; } .collection-essay-list > button { gap: 12px; }
  .collection-essay-list small { display: none; } .collection-essay-list strong { font-size: 12px; }
  .verified { font-size: 11px; padding: 8px; } .document-title { font-size: 44px; margin-bottom: 22px; }
  .lede { font-size: 15px; } .article { font-size: 19px; line-height: 1.85; }
  .article h2 { font-size: 23px; } .article h3 { font-size: 20px; } .search-hint { display: none; }
  .essay-pagination { gap: 16px; } .essay-pagination .icon { width: 15px; } .essay-pagination strong { font-size: 12px; }
  .composer-kicker { flex-wrap: wrap; gap: 8px; } #composer-status { font-size: 11px; }
  .composer-toolbar { gap: 0; padding: 4px; margin: 0 -4px 26px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .composer-toolbar button { flex-shrink: 0; } .composer-toolbar button span, .toolbar-divider { display: none; }
  .composer-actions { gap: 16px; } .composer-save-actions { margin-left: auto; } .composer-body { min-height: 300px; }
  .modal-wrap { padding: 16px; } .modal { padding: 30px 22px; max-height: calc(100dvh - 32px); } .modal h2 { font-size: 23px; }
  .result-icon { display: none; } .search-result { padding: 16px; gap: 12px; } .search-result strong { font-size: 17px; }
}
@media (max-width: 360px) { .brand { font-size: 14px; } .reader .quiet-btn { padding: 6px; } .topbar-actions { gap: 0; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .topbar, .library-tools, .composer-toolbar { background: var(--surface); } }
@media (prefers-reduced-transparency: reduce) { html:not([data-material='glass']) :is(.topbar,.library-tools,.composer-toolbar) { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (prefers-reduced-motion: reduce) { .vault-page *, .vault-page *::before, .vault-page *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (prefers-contrast: more) { body.vault-page { --muted: #d4d4ce; --faint: #c0c0ba; --line: #666660; --line-strong: #99998f; } html[data-theme='light'] body.vault-page { --muted: #33332d; --faint: #42423a; --line: #77776b; --line-strong: #66665a; } }
@media print { .topbar, .sidebar, .essay-search, .document-tools, .essay-pagination, .toast { display: none !important; } .reader-body { display: block; border: 0; } .reading-inner { max-width: none; padding: 0; } .reading { color: #000; background: #fff; } .article { font-size: 12pt; } .article, .lede, .essay-breadcrumb, .document-title { color: #000; } }
