:root { color-scheme: light; --paper: #f8f6f1; --ink: #303a36; --muted: #6e766e; --rule: #dcded3; --accent: #375c4c; }
* { box-sizing: border-box; }
html { scroll-padding-top: 30px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; }
a { color: inherit; text-underline-offset: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.site-header { max-width: 1080px; margin: auto; padding: 28px 36px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--rule); gap: 20px; }
.brand { text-decoration: none; font-size: 19px; font-weight: 600; letter-spacing: -.5px; }
.brand span { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.chapters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chapters a { padding: 9px 16px; font-size: 14px; border-radius: 5px; text-decoration: none; color: var(--muted); }
.chapters a[aria-current], .chapters a:hover { background: #e7ebe1; color: var(--accent); }
.chapters .reference-nav { border-left: 1px solid var(--rule); border-radius: 0; padding-inline: 10px; color: var(--accent); }
.chapters .reference-nav[aria-current] { border-radius: 5px; }
.logout-form { margin: 0; }
.logout-form button { border: 1px solid var(--rule); border-radius: 5px; padding: 8px 11px; background: transparent; color: var(--muted); font-size: 12px; }
.logout-form button:hover { background: #e7ebe1; color: var(--accent); }
main { max-width: 880px; padding: 0 40px; margin: auto; }
.chapter-heading { margin: 66px 0 35px 100px; }
.eyebrow { font-size: 11px; letter-spacing: 2.5px; color: var(--accent); margin: 0 0 22px; }
h1 { font-family: "Iowan Old Style", "AppleMyungjo", "Batang", serif; font-weight: 500; font-size: 36px; letter-spacing: -1px; margin: 0 0 20px; line-height: 1.45; word-break: keep-all; }
.reading-note { font-size: 12px; line-height: 1.9; color: var(--muted); word-break: keep-all; }
.reading-tools { margin-left: 100px; display: flex; gap: 14px; align-items: center; justify-content: space-between; border-block: 1px solid var(--rule); padding: 13px 0; flex-wrap: wrap; }
.scenes { display: flex; gap: 16px; flex-wrap: wrap; }
.scenes a { font-size: 12px; text-decoration: none; color: var(--accent); }
.find { display: flex; gap: 6px; }
.find input { background: transparent; border: 1px solid var(--rule); padding: 7px 9px; width: 105px; border-radius: 4px; color: var(--ink); font-size: 12px; }
button { font: inherit; cursor: pointer; }
.find button { border: 0; border-radius: 4px; padding: 7px 10px; background: #e7ebe1; color: var(--accent); font-size: 12px; }
.scene-heading { display: flex; align-items: center; gap: 12px; margin: 38px 0 28px 100px; font-size: 12px; font-weight: 400; color: var(--muted); }
.scene-heading span { font-size: 10px; letter-spacing: 1px; border: 1px solid var(--rule); padding: 5px 7px; }
.scene + .scene { margin-top: 64px; }
.paragraph { display: grid; grid-template-columns: 82px minmax(0, 1fr); column-gap: 18px; border-radius: 4px; scroll-margin-top: 28px; }
.paragraph p { font-family: "AppleMyungjo", "Batang", "Noto Serif KR", serif; font-size: 19px; line-height: 2.05; letter-spacing: -.25px; margin: 0 0 22px; word-break: keep-all; overflow-wrap: break-word; }
.reference { border: 0; padding: 0; background: transparent; cursor: pointer; align-self: start; margin-top: 10px; font-family: ui-monospace, Menlo, monospace; font-size: 11px; text-decoration: none; color: #757e72; text-align: right; white-space: nowrap; }
.reference:hover { color: var(--accent); text-decoration: underline; }
.paragraph.is-bookmarked { background: #e9eddf; box-shadow: 0 0 0 9px #e9eddf; }
.note-link { font-family: sans-serif; color: var(--accent); padding: 0 3px; font-size: 12px; }
sup { line-height: 0; }
.footnotes { margin: 55px 0 35px 100px; border-top: 1px solid var(--rule); padding-top: 24px; }
.footnotes h2 { font-size: 14px; font-weight: 500; }
.footnotes ol { padding-left: 21px; }
.footnotes li { font-size: 13px; color: var(--muted); line-height: 1.9; margin: 12px 0; scroll-margin-top: 28px; }
.footnotes li:target { background: #e9eddf; }
.page-turn { display: flex; justify-content: space-between; gap: 24px; margin: 45px 0 0 100px; border-top: 1px solid var(--rule); padding-top: 28px; }
.page-turn a { display: block; font-size: 17px; color: var(--accent); text-decoration: none; }
.page-turn div:last-child { text-align: right; }
.page-turn span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 9px; }
.page-turn p { font-size: 13px; color: var(--muted); }
footer { margin: 65px 0 40px 100px; color: var(--muted); font-size: 11px; line-height: 1.9; }
.notice { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 7px; font-size: 13px; box-shadow: 0 4px 20px #0002; width: max-content; max-width: calc(100% - 32px); }
.memo-float { position: fixed; bottom: 22px; left: 22px; z-index: 8; border: 1px solid #375c4c55; border-radius: 999px; padding: 12px 18px; background: #e7ebe1bb; color: var(--accent); font-size: 13px; font-weight: 600; box-shadow: 0 4px 18px #303a361c; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.memo-float:hover { background: #e7ebe1ee; }
.memo-dialog { width: min(480px, calc(100vw - 28px)); max-height: min(720px, calc(100vh - 28px)); padding: 0; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: 0 18px 70px #26352a40; }
.memo-dialog::backdrop { background: #26352a70; }
.memo-panel { padding: 22px; overflow-y: auto; max-height: min(720px, calc(100vh - 28px)); }
.memo-header, .memo-list-heading, .memo-form-actions, .memo-pages { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.memo-header { margin-bottom: 18px; }
.memo-header h2 { margin: 0; font-family: "Iowan Old Style", "AppleMyungjo", "Batang", serif; font-size: 24px; font-weight: 500; }
.memo-close { border: 0; background: transparent; color: var(--muted); font-size: 25px; line-height: 1; padding: 2px 6px; }
#memo-form label { display: block; margin-bottom: 8px; color: var(--accent); font-size: 13px; font-weight: 600; }
#memo-content { display: block; width: 100%; min-height: 110px; resize: vertical; border: 1px solid var(--rule); border-radius: 6px; padding: 12px; background: #fffefa; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.6; }
.memo-form-actions { justify-content: flex-end; margin-top: 10px; }
.memo-form-actions button, .memo-pages button { border: 1px solid var(--rule); border-radius: 5px; padding: 8px 12px; background: #e7ebe1; color: var(--accent); font-size: 12px; }
.memo-form-actions #memo-save { background: var(--accent); color: white; border-color: var(--accent); }
.memo-form-actions button:disabled, .memo-pages button:disabled { opacity: .4; cursor: default; }
.memo-list-heading { margin-top: 24px; border-top: 1px solid var(--rule); padding-top: 16px; }
.memo-list-heading h3 { margin: 0; font-size: 14px; font-weight: 600; }
.memo-list-heading span, .memo-pages { font-size: 12px; color: var(--muted); }
#memo-status { min-height: 18px; margin: 10px 0 0; color: var(--accent); font-size: 12px; }
#memo-status.is-error { color: #a04436; }
.memo-list { list-style: none; margin: 4px 0 0; padding: 0; }
.memo-item { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--rule); }
.memo-preview { min-width: 0; flex: 1; border: 0; background: transparent; color: var(--ink); padding: 11px 2px; text-align: left; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memo-preview:hover { color: var(--accent); }
.memo-delete { border: 0; background: transparent; color: var(--muted); font-size: 11px; padding: 7px; }
.memo-delete:hover { color: #a04436; }
.memo-empty { padding: 17px 2px; color: var(--muted); font-size: 13px; }
.memo-pages { justify-content: center; margin-top: 17px; }
.skip { position: fixed; top: -100px; left: 20px; padding: 12px; background: var(--paper); z-index: 10; }
.skip:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.missing { padding-top: 70px; }
.document-page main { max-width: 900px; }
.document-heading { margin: 52px 0 25px; }
.document-heading .eyebrow { margin-bottom: 12px; }
.document-heading h1 { margin-bottom: 8px; }
.document-heading > p:last-child { font-size: 13px; color: var(--muted); }
.document-links { display: flex; flex-wrap: wrap; gap: 7px; border-block: 1px solid var(--rule); padding: 12px 0; }
.document-links a { padding: 7px 11px; border-radius: 5px; font-size: 13px; text-decoration: none; color: var(--accent); }
.document-links a[aria-current], .document-links a:hover { background: #e7ebe1; }
.document-links .edit-document-link { margin-left: auto; background: #e7ebe1; font-weight: 600; }
.document-saved, .document-edit-error { margin: 22px 0 0; padding: 12px 16px; border-radius: 5px; font-size: 13px; line-height: 1.7; }
.document-saved { background: #e7ebe1; color: var(--accent); }
.document-edit-error { background: #f5e8df; color: #6b3424; }
.document-edit-error p { margin: 0 0 5px; }
.document-edit-error a { color: inherit; }
.document-edit-page main { max-width: 1100px; }
.document-editor { margin: 28px 0 80px; }
.document-edit-actions { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 0; background: var(--paper); }
.document-edit-actions label { color: var(--accent); font-size: 13px; font-weight: 600; }
.document-edit-actions > div { display: flex; align-items: center; gap: 14px; }
.document-edit-actions a { color: var(--muted); font-size: 12px; }
.document-edit-actions button { border: 0; border-radius: 5px; padding: 9px 14px; background: var(--accent); color: white; font-size: 12px; font-weight: 600; }
.document-editor textarea { display: block; width: 100%; min-height: 480px; height: 70vh; resize: vertical; padding: 20px; border: 1px solid var(--rule); border-radius: 6px; background: #fffefa; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.65; tab-size: 2; }
.document-edit-hint { color: var(--muted); font-size: 12px; line-height: 1.7; }
.document-body { padding: 15px 0 85px; font-size: 15px; line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.document-body h1, .document-body h2, .document-body h3 { margin: 38px 0 14px; line-height: 1.45; }
.document-body h1 { font-size: 25px; }
.document-body h2 { font-size: 21px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.document-body h3 { font-size: 17px; }
.document-body p, .document-body ul, .document-body ol { margin: 0 0 15px; }
.document-body li { margin: 4px 0; }
.document-body code { font-size: .9em; background: #e9eddf; padding: 1px 4px; border-radius: 3px; }
.document-body pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #eff0e9; padding: 16px; border-radius: 5px; font-size: 13px; }
.document-body pre code { background: transparent; padding: 0; }
.document-body table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
.document-body th, .document-body td { border: 1px solid var(--rule); padding: 7px 9px; text-align: left; vertical-align: top; }
.document-body blockquote { border-left: 3px solid var(--rule); margin: 18px 0; padding-left: 17px; color: var(--muted); }
.print-actions { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 12px 20px; background: #eef0e9; border-bottom: 1px solid var(--rule); }
.print-actions p { margin: 0; font-size: 13px; color: var(--muted); }
.print-actions button { border: 1px solid var(--rule); border-radius: 5px; padding: 9px 14px; background: var(--accent); color: white; font-size: 13px; }
.print-book .print-chapter + .print-chapter { margin-top: 90px; }
.editor-page .site-header { max-width: 1760px; padding-inline: 28px; }
.editor-page main { max-width: 1760px; padding: 0 28px 90px; }
.editor-tabs { max-width: 1760px; margin: 0 auto; padding: 12px 28px; display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); }
.editor-page .document-heading { margin: 34px 0 20px; }
.editor-page .document-heading h1 { font-size: 32px; }
.editor-tabs a, .expression-kind-tabs a { padding: 9px 14px; border-radius: 5px; color: var(--accent); text-decoration: none; font-size: 13px; }
.editor-tabs a[aria-current], .editor-tabs a:hover, .expression-kind-tabs a[aria-current], .expression-kind-tabs a:hover { background: #e7ebe1; font-weight: 600; }
.chapter-outline { list-style: none; padding: 0; margin: 30px 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.outline-card { min-height: 115px; display: flex; gap: 15px; padding: 18px; border: 1px solid var(--rule); border-radius: 7px; background: #fffefa; }
.outline-card.is-finale { border-color: #8ba498; background: #edf1e9; }
.outline-number { padding-top: 3px; color: var(--accent); font: 13px ui-monospace, Menlo, monospace; }
.outline-status { margin: 0 0 7px; color: var(--muted); font-size: 11px; }
.outline-card h2 { margin: 0; font-family: "AppleMyungjo", "Batang", serif; font-size: 18px; font-weight: 500; line-height: 1.5; word-break: keep-all; }
.outline-description { margin: 8px 0 0; color: var(--accent); font-size: 13px; }
.editor-footnote { border-top: 1px solid var(--rule); padding-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.expression-kind-tabs { display: flex; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.expression-kind-tabs a { min-width: 76px; text-align: center; }
.category-guide { margin: 23px 0 25px; padding: 18px 21px; background: #eff1e9; border-radius: 7px; }
.category-guide-heading { margin: 0 0 12px; font-size: 13px; color: var(--accent); font-weight: 600; }
.category-guide div { display: flex; flex-wrap: wrap; gap: 7px; }
.category-guide span { border: 1px solid #ccd9c8; border-radius: 20px; padding: 5px 9px; color: var(--accent); font-size: 12px; background: #fffefa; }
.category-guide > p:last-child { margin: 14px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.library-compose { margin: 26px 0; padding: 0 20px; border: 1px solid var(--rule); border-radius: 7px; background: #fffefa; }
.library-compose > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; padding: 15px 0; }
.library-form { display: grid; gap: 14px; padding: 8px 0 20px; }
.library-form label { display: grid; gap: 6px; min-width: 0; color: var(--accent); font-size: 12px; font-weight: 600; }
.library-form input, .library-form textarea, .library-form select,
.library-search input, .library-search select { width: 100%; min-width: 0; border: 1px solid var(--rule); border-radius: 5px; padding: 9px 11px; background: #fffefa; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.6; }
.library-form textarea { resize: vertical; }
.library-form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.library-form button, .library-search button { width: max-content; border: 0; border-radius: 5px; padding: 9px 15px; background: var(--accent); color: white; font-size: 12px; }
.library-search { margin: 28px 0 10px; display: flex; gap: 8px; align-items: center; }
.context-search-page .library-search input { flex: 1; }
.context-search-page .library-search select { width: 155px; }
.context-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.context-result { min-width: 0; padding: 17px 20px; border: 1px solid var(--rule); border-radius: 7px; background: #fffefa; }
.context-result-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.context-result h2 { margin: 12px 0 8px; font-family: "AppleMyungjo", "Batang", serif; font-size: 18px; font-weight: 500; }
.context-result h2 a { text-decoration: none; color: var(--accent); }
.context-result p { margin: 0 0 12px; white-space: pre-wrap; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.context-result small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
@media (max-width: 760px) { .context-results { grid-template-columns: 1fr; } .context-search-page .library-search { flex-wrap: wrap; } }
.library-search input { flex: 1; }
.library-search select { max-width: 180px; }
.library-count { font-size: 12px; color: var(--muted); margin: 14px 0 8px; }
.library-results { display: grid; gap: 13px; }
.library-card { padding: 20px 22px; border: 1px solid var(--rule); border-radius: 7px; background: #fffefa; overflow-wrap: anywhere; }
.library-card-meta { margin: 0 0 11px; font-size: 11px; color: var(--accent); }
.library-card h2 { margin: 0 0 12px; font-family: "AppleMyungjo", "Batang", serif; font-size: 21px; font-weight: 500; }
.library-prose { margin: 0 0 12px; font-family: "AppleMyungjo", "Batang", serif; font-size: 16px; line-height: 1.85; white-space: pre-wrap; word-break: keep-all; }
.library-sentence { font-size: 19px; }
.library-meaning { margin: 0 0 12px; font-size: 14px; line-height: 1.7; }
.library-note { margin: 10px 0 0; padding-left: 10px; border-left: 2px solid var(--rule); color: var(--muted); font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.library-source { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.library-card-actions { display: flex; align-items: start; gap: 18px; border-top: 1px solid var(--rule); margin-top: 17px; padding-top: 11px; }
.library-card-actions details { flex: 1; min-width: 0; }
.library-card-actions summary { cursor: pointer; color: var(--accent); font-size: 12px; width: max-content; }
.library-card-actions .library-form { padding-top: 20px; }
.library-delete { border: 0; background: transparent; color: #96564b; font-size: 12px; padding: 0; }
.library-empty { padding: 30px 0; color: var(--muted); font-size: 13px; }
.library-pagination { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 25px 0; font-size: 12px; color: var(--muted); }
.library-pagination a { color: var(--accent); }
.library-page .category-guide { margin: 12px 0; padding: 12px 16px; }
.library-page .category-guide summary { cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 600; }
.library-page .category-guide div { margin-top: 13px; }
.library-page .library-compose { margin: 12px 0; }
.library-page .library-search { margin: 16px 0 6px; }
.library-page .library-count { margin: 9px 0; }
.expression-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.expression-grid .library-empty { grid-column: 1 / -1; }
.expression-card { position: relative; min-width: 0; padding: 10px 12px; }
.expression-card:has(.expression-edit[open]) { grid-column: span 2; }
.expression-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; padding-right: 28px; }
.expression-tag { max-width: 100%; padding: 4px 7px; border-radius: 4px; font-size: 10px; line-height: 1.3; overflow-wrap: anywhere; }
.expression-tag-category { background: #e7ebe1; color: var(--accent); }
.expression-tag-topic { border: 1px solid var(--rule); color: var(--muted); }
.expression-tag-fictional-date { border: 1px solid #c9d3c2; background: #f2f5ec; color: var(--accent); }
.library-ref-tag { border: 1px solid #b8cabd; background: #edf2e8; color: var(--accent); font: 600 10px/1.3 ui-monospace, Menlo, monospace; white-space: nowrap; cursor: pointer; }
.library-ref-tag:hover, .library-ref-tag:focus-visible { background: #dce8da; border-color: var(--accent); }
.expression-card h2 { margin: 0 0 4px; font-size: 20px; line-height: 1.45; }
.expression-card .library-sentence { margin: 0; font-size: 16px; line-height: 1.55; }
.expression-card .library-meaning { margin: 0; font-size: 12px; line-height: 1.5; }
.chapter-idea-card h2 { font-size: 19px; line-height: 1.45; }
.chapter-idea-card .library-prose { margin: 0; font-size: 15px; line-height: 1.7; }
.chapter-idea-card .library-note { font-size: 12px; line-height: 1.5; }
.chapter-idea-card .library-source { font-size: 11px; }
.expression-edit > summary { position: absolute; top: 11px; right: 11px; width: 28px; height: 28px; display: grid; place-items: center; list-style: none; border: 1px solid transparent; border-radius: 5px; color: var(--accent); cursor: pointer; }
.expression-edit > summary::-webkit-details-marker { display: none; }
.expression-edit > summary:hover, .expression-edit[open] > summary { border-color: var(--rule); background: #e7ebe1; }
.expression-edit-panel { border-top: 1px solid var(--rule); margin-top: 14px; padding-top: 14px; }
.expression-edit-panel .library-form { gap: 10px; padding: 0; }
.expression-edit-panel .library-form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.expression-delete-form { margin-top: 12px; text-align: right; }
@media (max-width: 1499px) { .expression-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1249px) { .expression-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 999px) { .expression-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 749px) { .expression-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .expression-grid { grid-template-columns: 1fr; } .expression-card:has(.expression-edit[open]) { grid-column: span 1; } }
.chapter-library-page .expression-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .chapter-library-page .expression-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .chapter-library-page .expression-grid { grid-template-columns: 1fr; } .chapter-idea-card:has(.expression-edit[open]) { grid-column: span 1; } }
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.login-main { width: min(420px, calc(100% - 36px)); padding: 42px; border: 1px solid var(--rule); border-radius: 10px; background: #fffefa; }
.login-main h1 { margin-bottom: 30px; text-align: center; font-size: 38px; letter-spacing: -.8px; }
.login-intro, .login-note { color: var(--muted); line-height: 1.7; font-size: 13px; }
.login-intro { margin: 0 0 30px; }
.login-note { margin: 22px 0 0; font-size: 12px; }
.login-form, .password-form { display: grid; gap: 10px; }
.login-form label, .password-form label { color: var(--accent); font-size: 13px; font-weight: 600; }
.login-form input, .password-form input { width: 100%; border: 1px solid var(--rule); border-radius: 5px; padding: 11px 12px; background: white; color: var(--ink); font: inherit; font-size: 15px; }
.login-form button, .password-form button { margin-top: 13px; border: 0; border-radius: 5px; padding: 12px 16px; background: var(--accent); color: white; font-size: 14px; font-weight: 600; }
.password-page main { max-width: 1760px; }
.password-page .document-heading { max-width: 560px; margin: 34px auto 20px; text-align: center; }
.password-page .document-heading > p:last-child { line-height: 1.7; }
.password-form { width: 100%; max-width: 560px; margin: 0 auto; padding: 30px; border: 1px solid var(--rule); border-radius: 10px; background: #fffefa; gap: 11px; }
.password-form label { margin-top: 8px; }
.password-form label span { color: var(--muted); font-size: 11px; font-weight: 400; }
@media (max-width: 650px) {
  .site-header { padding: 20px; flex-wrap: wrap; }
  .brand { font-size: 18px; }
  .chapters { gap: 2px; }
  .chapters a { padding: 8px 10px; font-size: 13px; }
  .chapters .reference-nav { padding-inline: 8px; }
  main { padding: 0 23px; }
  .chapter-heading { margin: 44px 0 26px; }
  h1 { font-size: 30px; }
  .reading-tools, .scene-heading, .footnotes, .page-turn, footer { margin-left: 0; }
  .paragraph { display: block; margin-bottom: 22px; }
  .reference { display: inline-block; margin: 0 0 7px; font-size: 10px; }
  .paragraph p { font-size: 18px; line-height: 1.95; margin: 0; }
  .scene + .scene { margin-top: 46px; }
  .document-heading { margin-top: 38px; }
  .document-body { font-size: 14px; }
  .editor-tabs { padding: 10px 20px; }
  .editor-page .site-header { padding-inline: 16px; }
  .chapter-outline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outline-card { min-height: 100px; padding: 13px; gap: 9px; }
  .outline-card h2 { font-size: 15px; }
  .library-form-row { grid-template-columns: 1fr; }
  .library-search { flex-wrap: wrap; }
  .library-search select { max-width: none; }
  .editor-page main { padding-inline: 16px; }
  .editor-page .editor-tabs { padding-inline: 16px; }
  .expression-card { padding: 10px; }
  .expression-edit-panel .library-form-row { grid-template-columns: 1fr; }
  .login-main { padding: 28px; }
  .password-page .document-heading { margin-top: 34px; }
  .password-form { padding: 23px; }
}
@media (max-width: 420px) {
  .chapter-outline { grid-template-columns: 1fr; }
}
@page { size: A4; margin: 9mm 10mm 10mm; }
@media print {
  .site-header, .editor-tabs, .reading-tools, .reading-note, .page-turn, .notice, .skip, footer, .print-actions, .memo-float, .memo-dialog { display: none !important; }
  html { scroll-padding-top: 0; }
  body { background: white; color: black; font-size: 9pt; }
  main { max-width: none; padding: 0; margin: 0; }
  .chapter-heading { margin: 0 0 5mm 19mm; }
  .eyebrow { margin: 0 0 1.5mm; font-size: 7pt; letter-spacing: 1.5pt; color: #444; }
  h1 { margin: 0; font-size: 18pt; line-height: 1.25; letter-spacing: -.4pt; }
  .scene + .scene { margin-top: 5mm; }
  .scene-heading { margin: 4mm 0 2.5mm 19mm; font-size: 7.5pt; color: #555; break-after: avoid; }
  .paragraph { grid-template-columns: 16mm minmax(0, 1fr); column-gap: 3mm; border-radius: 0; }
  .paragraph p { margin: 0 0 2.2mm; font-size: 9.5pt; line-height: 1.55; letter-spacing: 0; word-break: keep-all; orphans: 2; widows: 2; }
  .reference { margin-top: 1.3mm; font-size: 6.5pt; color: #555; }
  .paragraph.is-bookmarked { background: transparent; box-shadow: none; }
  .note-link { color: black; font-size: 7pt; }
  .footnotes { margin: 6mm 0 0 19mm; padding-top: 3mm; border-color: #999; }
  .footnotes h2 { margin: 0 0 2mm; font-size: 9pt; }
  .footnotes ol { margin: 0; padding-left: 5mm; }
  .footnotes li { margin: 1.5mm 0; font-size: 7.5pt; line-height: 1.5; color: black; }
  .print-book .print-chapter + .print-chapter { margin-top: 0; break-before: page; page-break-before: always; }
  .print-documents .print-document + .print-document { break-before: page; page-break-before: always; }
  .print-documents .document-heading { margin: 0 0 5mm; }
  .print-documents .document-heading h1 { font-size: 18pt; margin: 0 0 1mm; }
  .print-documents .document-heading > p:last-child { margin: 0; font-size: 8pt; }
  .print-documents .document-body { padding: 0; font-size: 9pt; line-height: 1.52; word-break: normal; }
  .print-documents .document-body h1, .print-documents .document-body h2,
  .print-documents .document-body h3 { margin: 4mm 0 1.5mm; break-after: avoid; }
  .print-documents .document-body h1 { font-size: 14pt; }
  .print-documents .document-body h2 { font-size: 11pt; }
  .print-documents .document-body h3 { font-size: 9.5pt; }
  .print-documents .document-body p, .print-documents .document-body ul,
  .print-documents .document-body ol { margin: 0 0 2mm; }
  .print-documents .document-body li { margin: 0; }
  .print-documents .document-body code { background: none; }
  .print-documents .document-body pre { background: none; font-size: 8pt; padding: 1mm 0; }
  .print-documents .document-body table { display: table; width: 100%; font-size: 7pt; }
  .print-documents .document-body th, .print-documents .document-body td { padding: 1mm; }
  .print-documents .document-body tr { break-inside: avoid; }
  a { text-decoration: none; }
}

#resume-reading, .print-pdf { border: 1px solid var(--rule); border-radius: 5px; padding: 9px 12px; background: transparent; color: var(--accent); font-size: 13px; }
.chapters .print-pdf { background: #e7ebe1; text-decoration: none; font-size: 11px; font-weight: 600; letter-spacing: .3px; padding: 7px 9px; }
#resume-reading:disabled { opacity: .45; cursor: default; }
