:root { --ink: #1d2421; --muted: #718079; --paper: #f6f3ec; --line: #d8d4ca; --green: #173f35; --green-2: #245b4b; --gold: #c9a86a; --white: #fffdf8; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Noto Serif SC", "Songti SC", serif; line-height: 1.75; }
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(246, 243, 236, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { text-decoration: none; font-weight: 700; letter-spacing: .08em; }
nav { display: flex; gap: 24px; font-size: 14px; }
nav a { text-decoration: none; color: var(--muted); }
.intro { padding: 108px 0 86px; max-width: 1180px; }
.home-hero { padding: 126px 0 112px; border-bottom: 1px solid var(--line); }
.home-hero h1 { max-width: 760px; }
.primary-link, .primary-button { display: inline-block; margin-top: 30px; padding: 11px 16px; color: var(--white); background: var(--green-2); border: 1px solid var(--green-2); text-decoration: none; font: 14px ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.directory-section { padding: 82px 0 110px; }
.directory-section .section-heading > p:last-child { color: var(--muted); }
.add-card { display: flex; flex-direction: column; justify-content: center; gap: 8px; color: var(--green-2); text-decoration: none; background: transparent; }
.add-card strong { font-size: 20px; font-weight: 600; }
.add-card span:last-child { color: var(--muted); font: 12px ui-sans-serif, system-ui, sans-serif; }
.add-symbol { font: 42px/1 ui-sans-serif, system-ui, sans-serif; color: var(--gold); }
.home-note { padding: 42px 0; color: var(--white); background: var(--green); }
.home-note p:last-child { max-width: 720px; margin: 0; color: #b7c8bf; }
.eyebrow { margin: 0 0 12px; color: var(--green-2); font: 600 11px/1.2 ui-sans-serif, system-ui, sans-serif; letter-spacing: .16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 20px; font-size: clamp(36px, 6vw, 76px); line-height: 1.12; letter-spacing: 0; font-weight: 600; }
.intro-copy { max-width: 640px; margin-bottom: 0; color: var(--muted); font-size: 18px; }
.section-heading { margin-bottom: 28px; }
.section-heading h2 { margin-bottom: 0; font-size: 40px; line-height: 1.2; font-weight: 600; }
.family-index { padding-bottom: 112px; }
.family-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.family-card { min-height: 250px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.family-card-active { background: #edf1e9; }
.family-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 56px; font: 11px ui-sans-serif, system-ui, sans-serif; }
.family-number { color: var(--green-2); letter-spacing: .12em; }
.status { color: var(--muted); }
.family-card h3 { margin-bottom: 8px; font-size: 27px; font-weight: 600; }
.family-card p { min-height: 56px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.text-link { display: inline-block; color: var(--green-2); font-size: 14px; text-decoration: none; border-bottom: 1px solid currentColor; }
.text-link-muted { color: #a4aaa3; border-bottom-color: #c7cbc4; }
.fan-section { padding: 88px 0 110px; color: var(--white); background: var(--green); }
.section-heading-light .eyebrow { color: var(--gold); }
.section-heading-light h2 { margin-bottom: 12px; }
.section-heading-light > p:last-child { max-width: 720px; margin-bottom: 0; color: #b7c8bf; font-size: 15px; }
.module-tabs { display: flex; gap: 8px; margin: 44px 0 20px; overflow-x: auto; border-bottom: 1px solid #416b5d; }
.module-tab { flex: 0 0 auto; padding: 13px 16px; color: #a9c0b4; background: transparent; border: 0; border-bottom: 2px solid transparent; font: inherit; font-size: 14px; cursor: pointer; }
.module-tab.is-active { color: var(--white); border-bottom-color: var(--gold); }
.module-panel { min-height: 520px; }
.reader-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 20px 0; }
.search-field { display: grid; gap: 5px; color: #a9c0b4; font: 12px ui-sans-serif, system-ui, sans-serif; }
.search-field input { width: min(420px, 60vw); padding: 11px 13px; border: 1px solid #547869; border-radius: 0; color: var(--white); background: #12362e; font: inherit; }
.search-field input:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.download-button { padding: 10px 14px; color: var(--white); border: 1px solid #718f81; text-decoration: none; font: 13px ui-sans-serif, system-ui, sans-serif; }
.reader-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 580px; border: 1px solid #416b5d; }
.volume-nav { padding: 20px 10px; border-right: 1px solid #416b5d; background: #143a31; }
.volume-nav-title { padding: 0 10px 12px; color: var(--gold); font: 600 11px ui-sans-serif, system-ui, sans-serif; letter-spacing: .14em; }
.volume-list { display: grid; gap: 2px; max-height: 680px; overflow: auto; }
.volume-button { padding: 8px 10px; color: #a9c0b4; background: transparent; border: 0; text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.volume-button:hover, .volume-button.is-active { color: var(--white); background: #245b4b; }
.reader { min-width: 0; background: var(--white); color: var(--ink); }
.reader-status { padding: 15px 24px; color: var(--muted); border-bottom: 1px solid var(--line); font: 12px ui-sans-serif, system-ui, sans-serif; }
.reader-content { margin: 0; padding: 30px 34px 50px; min-height: 520px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 16px/2.15 "Noto Serif SC", "Songti SC", serif; }
mark { padding: 0 2px; color: var(--ink); background: #f3d68c; }
.loading { padding: 10px; color: #8da79a; font-size: 12px; }
.placeholder-panel { display: flex; gap: 22px; padding: 38px 28px; border: 1px solid #416b5d; background: #143a31; }
.placeholder-index { color: var(--gold); font: 24px ui-sans-serif, system-ui, sans-serif; }
.placeholder-panel h3 { margin-bottom: 8px; font-size: 24px; }
.placeholder-panel p { margin-bottom: 0; color: #b7c8bf; }
.rules-list { display: grid; gap: 8px; margin-top: 18px; }
.rules-list a { color: #e4d0a0; font-size: 14px; }
.family-document-section { padding: 88px 0; background: var(--white); }
.family-document-section-alt { background: #e8eee8; }
.family-document-section .section-heading { max-width: 760px; }
.family-document-section .section-heading h2 { margin-bottom: 12px; }
.family-document-section .section-heading > p:last-child { color: var(--muted); }
.document-index { padding: 26px 28px; border: 1px solid var(--line); background: var(--paper); }
.document-index a { color: var(--green-2); font-size: 16px; }
.document-dialog { width: min(960px, calc(100% - 32px)); max-height: min(86vh, 900px); padding: 0; color: var(--ink); background: var(--white); border: 1px solid var(--line); box-shadow: 0 24px 80px rgba(20, 45, 36, .28); }
.document-dialog::backdrop { background: rgba(12, 28, 22, .58); }
.document-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--paper); }
.document-dialog-header h2 { margin: 0; font-size: 24px; font-weight: 600; }
.document-dialog-header button { padding: 8px 12px; color: var(--green-2); background: transparent; border: 1px solid var(--green-2); cursor: pointer; }
.document-status { padding: 12px 24px; color: var(--muted); border-bottom: 1px solid var(--line); font: 12px ui-sans-serif, system-ui, sans-serif; }
.document-content { max-height: calc(86vh - 124px); margin: 0; padding: 28px 32px 42px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 16px/2 "Noto Serif SC", "Songti SC", serif; }
.site-footer { padding: 24px 0; color: var(--muted); background: var(--paper); font: 12px ui-sans-serif, system-ui, sans-serif; }
.site-footer .shell { display: flex; justify-content: space-between; }
.detail-hero { padding: 70px 0 74px; color: var(--white); background: var(--green); }
.back-link { display: inline-block; margin-bottom: 36px; color: var(--green-2); font: 13px ui-sans-serif, system-ui, sans-serif; text-decoration: none; }
.detail-hero .back-link { color: #cbd9d1; }
.detail-hero h1 { margin-bottom: 16px; font-size: clamp(38px, 6vw, 66px); }
.detail-intro { max-width: 700px; margin: 0; color: #b7c8bf; font-size: 17px; }
.detail-body { padding: 78px 0 110px; }
.detail-modules { display: grid; gap: 14px; }
.module-card { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 26px 28px; border: 1px solid var(--line); background: var(--white); }
.module-card h3 { margin: 0 0 8px; font-size: 24px; font-weight: 600; }
.module-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 14px; }
.module-card .eyebrow { margin-bottom: 10px; }
.module-card-reserved { background: #eef0ea; }
.module-reserved { color: var(--muted); font: 12px ui-sans-serif, system-ui, sans-serif; }
.module-documents { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.module-open, .secondary-button { padding: 9px 13px; color: var(--green-2); background: transparent; border: 1px solid var(--green-2); font: 13px ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.family-reader { margin-top: 30px; border: 1px solid #416b5d; background: var(--green); }
.light-search { color: #a9c0b4; }
.reader-toolbar .reader-status-inline { padding-bottom: 11px; color: #b7c8bf; font: 12px ui-sans-serif, system-ui, sans-serif; }
.family-document { min-height: 520px; color: var(--ink); background: var(--white); }
.collection-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 560px; }
.collection-document .volume-nav { border-right: 1px solid var(--line); }
.family-document:not(.collection-document) { padding: 34px 38px 52px; }
.family-document h2, .family-document h3, .family-document h4 { margin: 1.4em 0 .5em; line-height: 1.35; font-weight: 600; }
.family-document h2 { font-size: 27px; }
.family-document h3 { font-size: 22px; }
.family-document h4 { font-size: 18px; }
.family-document p { margin: 0 0 1em; white-space: pre-wrap; line-height: 2; }
.family-document ul, .family-document ol { margin: 0 0 1em; padding-left: 2em; line-height: 2; }
.family-document blockquote { margin: 1em 0; padding-left: 1em; color: var(--muted); border-left: 3px solid var(--gold); }
.family-document hr { border: 0; border-top: 1px solid var(--line); }
.plain-document { margin: 0; padding: 30px 34px 50px; max-height: 680px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 16px/2.15 "Noto Serif SC", "Songti SC", serif; }
.editor-page { padding: 68px 0 110px; }
.editor-page .section-heading { max-width: 720px; }
.editor-form { display: grid; gap: 18px; max-width: 820px; padding: 30px; border: 1px solid var(--line); background: var(--white); }
.editor-form label { display: grid; gap: 7px; color: var(--muted); font: 13px ui-sans-serif, system-ui, sans-serif; }
.editor-form input, .editor-form select, .editor-form textarea { width: 100%; padding: 11px 12px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); font: 15px/1.7 "Noto Serif SC", "Songti SC", serif; }
.editor-form textarea { resize: vertical; }
.editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.editor-actions .primary-button { margin: 0; }
.secondary-button { color: var(--muted); border-color: var(--line); }
.save-status { color: var(--muted); font: 12px ui-sans-serif, system-ui, sans-serif; }
.draft-list-section { margin-top: 70px; }
.draft-list { display: grid; gap: 10px; max-width: 820px; }
.draft-item { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); background: var(--white); }
.draft-item span, .draft-item small { color: var(--muted); }
.draft-item button { padding: 6px 9px; color: var(--green-2); background: transparent; border: 1px solid var(--line); cursor: pointer; }
.empty-state { color: var(--muted); }
.back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 20; display: none; padding: 10px 13px; color: var(--white); background: var(--green-2); border: 0; box-shadow: 0 6px 20px rgba(23, 63, 53, .2); cursor: pointer; font: 13px ui-sans-serif, system-ui, sans-serif; }
.back-to-top.is-visible { display: block; }
@media (max-width: 800px) { .shell { width: min(100% - 28px, 680px); } .intro, .home-hero { padding: 72px 0 64px; } .family-grid { grid-template-columns: repeat(2, 1fr); } .reader-layout, .collection-layout { grid-template-columns: 1fr; } .volume-nav { border-right: 0; border-bottom: 1px solid #416b5d; } .volume-list { display: flex; max-height: none; overflow-x: auto; } .volume-button { white-space: nowrap; } .reader-content, .plain-document { padding: 24px 18px 40px; font-size: 15px; } .reader-toolbar { align-items: stretch; flex-direction: column; } .search-field input { width: 100%; } .download-button { align-self: flex-start; } .module-card { display: block; } .module-open, .module-documents { margin-top: 18px; } .module-documents { justify-content: start; } .family-document:not(.collection-document) { padding: 24px 18px 38px; } }
@media (max-width: 520px) { .header-inner { min-height: 58px; } nav { gap: 12px; } .intro-copy { font-size: 16px; } .section-heading h2 { font-size: 32px; } .family-grid { grid-template-columns: 1fr; } .family-card { min-height: 210px; } .family-card-top { margin-bottom: 38px; } .site-footer .shell { gap: 8px; flex-direction: column; } .document-dialog-header { padding: 14px 16px; } .document-dialog-header h2 { font-size: 19px; } .document-content { padding: 22px 16px 32px; font-size: 15px; } .draft-item { grid-template-columns: 1fr 1fr; } .detail-hero { padding: 48px 0 54px; } }
