@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root { color-scheme: light; --ink: #202838; --muted: #6b7485; --line: #e4e7ef; --page: #f7f8fb; --navy: #121827; --blue: #3859de; --amber: #f3c674; font-family: 'DM Sans', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 16px; color: var(--ink); background: var(--page); }
:root[data-theme="dark"] { color-scheme: dark; --ink: #e8edf7; --muted: #a8b3c7; --line: #344159; --page: #101522; --blue: #a6b8ff; }
:lang(zh) { font-family: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', 'Noto Sans KR', sans-serif; letter-spacing: 0; }
* { box-sizing: border-box; }
body { margin: 0; }
button, select, input { font: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; vertical-align: middle; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #526eee; outline-offset: 4px; }
button, a { touch-action: manipulation; }
p { line-height: 1.75; }
mark { background: transparent; color: inherit; font-weight: 500; text-decoration: underline; text-decoration-color: #8a99b1; text-underline-offset: 4px; text-decoration-thickness: 1px; }
#app { min-height: 100vh; }
.sidebar { width: 228px; position: fixed; inset: 0 auto 0 0; background: var(--navy); color: #c4cad8; padding: 36px 20px 24px; display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; color: white; font-size: 2rem; letter-spacing: -1.5px; font-weight: 700; padding: 0 12px; }
.brand-icon { background: var(--amber); width: 34px; height: 34px; border-radius: 10px; color: var(--navy); font-family: Georgia, serif; font-size: 3rem; line-height: 1.28; text-align: center; }
.brand-dot { color: var(--amber); }
.sidebar-caption { padding: 13px 12px 38px; font-size: .875rem; color: #9aa4ba; }
.sidebar nav { display: grid; gap: 9px; }
.nav-item { cursor: pointer; word-break: keep-all; display: flex; align-items: center; gap: 12px; min-height: 49px; padding: 12px 14px; border-radius: 9px; font-size: .9375rem; font-weight: 500; }
.nav-item > * { pointer-events: none; }
.nav-item:hover { background: #20283b; color: white; }
.nav-item.active { background: #2b3448; color: var(--amber); }
.nav-count { margin-left: auto; font-size: .8125rem; min-width: 20px; text-align: center; color: #b9c2d6; }
.sidebar-bottom { margin-top: auto; padding: 36px 12px 0; }
.progress-head { display: flex; justify-content: space-between; gap: 6px; align-items: center; font-size: .875rem; }
.progress-head strong { color: white; }
.progress-head strong span { color: #929eb4; font-weight: 400; }
progress { height: 4px; width: 100%; border: 0; border-radius: 4px; margin: 16px 0 4px; background: #354058; overflow: hidden; }
progress::-webkit-progress-bar { background: #354058; }
progress::-webkit-progress-value { background: var(--amber); border-radius: 4px; }
progress::-moz-progress-bar { background: var(--amber); }
.sidebar-bottom p { font-size: .8125rem; color: #a7b1c5; line-height: 1.7; }
.workspace { margin-left: 228px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 56px; padding: 4px 44px; background: #fff; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: flex-end; }
.preferences { display: flex; align-items: center; gap: 22px; margin-left: auto; flex-shrink: 0; }
.language-field { display: flex; align-items: center; gap: 11px; min-width: 0; }
.language-label { font-size: .875rem; color: var(--muted); white-space: nowrap; }
.language-picker { position: relative; }
.language-trigger { display: flex; align-items: center; gap: 9px; min-height: 44px; min-width: 143px; padding: 8px 11px; border: 1px solid #e0e5ef; border-radius: 10px; background: #fff; color: #303d56; list-style: none; cursor: pointer; font-size: .9375rem; font-weight: 500; box-shadow: 0 1px 2px #17233a05; transition: border-color .15s, box-shadow .15s; }
.language-trigger::-webkit-details-marker { display: none; }
.language-trigger:hover { border-color: #b8c5e4; background: #fcfdff; }
.language-trigger:focus-visible { outline: 2px solid #5975e7; outline-offset: 3px; }
.language-picker[open] .language-trigger { border-color: #8b9ee4; box-shadow: 0 0 0 3px #eef2ff; }
.language-mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 7px; background: #f0f3f9; color: #6a7894; font-family: 'DM Sans', sans-serif; font-size: .6875rem; font-weight: 600; letter-spacing: .3px; }
.language-chevron { width: 15px; height: 15px; margin-left: auto; color: #8590a6; transition: transform .15s; }
.language-picker[open] .language-chevron { transform: rotate(180deg); color: #4964bf; }
.language-menu { position: absolute; top: calc(100% + 9px); right: 0; z-index: 25; min-width: 184px; padding: 6px; border: 1px solid #e4e9f3; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px #1c2f5214, 0 3px 7px #1c2f5208; }
.language-option { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: #4b5972; text-align: left; font-size: .9375rem; }
.language-option + .language-option { margin-top: 3px; }
.language-option:hover { background: #f5f7fc; }
.language-option[aria-checked="true"] { background: #eef2ff; color: #3656bf; font-weight: 600; }
.language-option[aria-checked="true"] .language-mark { background: #e0e7fd; color: #4261c2; }
.language-option:focus-visible { background: #eef2ff; outline: 2px solid #8095df; outline-offset: -2px; }
.language-check { display: flex; align-items: center; justify-content: center; width: 18px; margin-left: auto; color: #4261c2; }
.language-check svg { width: 17px; height: 17px; }
.setting-divider { width: 1px; height: 24px; background: var(--line); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #53627b; }
.theme-toggle:hover { background: #eef2ff; border-color: #8b9ee4; }
main { max-width: 1240px; width: 100%; margin: 0 auto; padding: 28px 44px 40px; flex: 1; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-heading h1 { font-size: 1.5rem; margin: 6px 0; }
.eyebrow { display: flex; align-items: center; gap: 7px; font-size: .8125rem; color: var(--muted); font-weight: 500; }
.eyebrow svg { width: 15px; height: 15px; }
h1 { font-size: 1.875rem; font-weight: 700; line-height: 1.4; margin: 11px 0 10px; letter-spacing: -.8px; }
.page-heading p { margin: 0; font-size: .875rem; color: var(--muted); }
.heading-label { display: flex; gap: 8px; white-space: nowrap; border: 1px solid var(--line); background: white; border-radius: 20px; font-size: .8125rem; color: #59657b; padding: 9px 13px; }
.featured { border: 1px solid var(--line); border-left: 3px solid var(--work-color); border-radius: 10px; background: white; }
.featured-content { padding: 18px 22px; }
.featured-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.feature-kicker { display: flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: var(--muted); }
.feature-kicker svg { width: 16px; height: 16px; }
.featured-work { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: .8125rem; color: var(--muted); flex-wrap: wrap; }
.featured-work:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.featured-work > span:first-child { color: var(--ink); font-weight: 500; }
.featured-reading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.featured-copy { min-width: 0; }
.featured-reading > .button { flex-shrink: 0; }
.badge-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; border: 1px solid #dce2ee; padding: 5px 9px; font-size: .75rem; font-weight: 500; color: #63708a; border-radius: 5px; }
.featured .badge { color: var(--muted); border-color: var(--line); }
.featured h2 { font-size: 1.0625rem; line-height: 1.5; margin: 0 0 6px; letter-spacing: -.3px; }
.featured blockquote { font-size: 1.375rem; line-height: 1.55; font-weight: 500; margin: 0 0 8px; overflow-wrap: anywhere; }
.featured-copy > p { margin: 0; font-size: .875rem; line-height: 1.65; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 7px; border: 1px solid transparent; padding: 11px 17px; font-size: .875rem; font-weight: 600; min-height: 44px; line-height: 1.5; transition: background-color .15s ease, border-color .15s ease; }
.button-primary { background: var(--blue); color: white; }
.button-primary:hover { background: #2948c9; }
.button-outline { background: white; border-color: #d9dfeb; color: #53627b; }
.button-outline:hover { background: #edf1fc; }
.button-saved { background: #e9efff; color: #344ab0; border-color: #c8d4f7; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 33px 0 17px; }
.section-heading h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.text-link { font-size: .875rem; color: var(--blue); font-weight: 500; }
.text-link, .back-link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color .15s ease; }
.text-link:hover, .back-link:hover { text-decoration-color: currentColor; }
.scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.scene-card { display: flex; align-items: center; gap: 18px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 10px; transition: background .15s, border-color .15s; }
.scene-card:hover { background: #f4f6fb; border-color: #c2cce0; }
.scene-card:focus-visible { outline-offset: -3px; }
.scene-card-body { flex: 1; min-width: 0; }
.scene-card h3 { margin: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.preview-line { margin: 7px 0 0; font-size: .9375rem; line-height: 1.6; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: .75rem; color: var(--muted); }
.scene-card .badge-row { gap: 0; }
.scene-card .badge { border: 0; padding: 0; font-weight: 400; }
.scene-card .badge + .badge::before { content: '·'; margin: 0 8px; }
.scene-card .read-badge { margin-left: 12px; }
.scene-position { flex-shrink: 0; align-self: flex-start; width: 24px; padding-top: 4px; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.scene-card-action { display: flex; align-items: center; gap: 7px; flex-shrink: 0; color: var(--blue); font-size: .8125rem; white-space: nowrap; }
.scene-card-action svg { width: 18px; height: 18px; }
.read-badge { color: #3a56bb; font-size: .75rem; display: inline-flex; align-items: center; gap: 4px; }
.read-badge svg { width: 13px; height: 13px; }
.work-scenes .section-heading { margin-top: 26px; margin-bottom: 12px; }
.work-scenes .section-heading h2 { font-size: .875rem; color: var(--muted); font-weight: 500; }
.library-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin: 29px 0; }
.type-filters { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--line); background: #e9edf4; border-radius: 8px; padding: 4px; }
.type-filters button { white-space: nowrap; border: 0; background: transparent; padding: 8px 15px; color: #626d82; border-radius: 5px; font-size: .875rem; min-height: 37px; }
.type-filters .selected { background: white; color: #273750; box-shadow: 0 1px 4px #24345515; font-weight: 600; }
.search-field { display: flex; align-items: center; gap: 9px; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; width: 290px; }
.search-field svg { color: #7b879e; width: 18px; height: 18px; }
.search-field input { min-width: 0; width: 100%; border: 0; background: transparent; outline: none; font-size: .875rem; padding: 2px 0; color: var(--ink); }
.search-field:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.format-field { display: flex; align-items: center; gap: 12px; max-width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); font-size: .75rem; white-space: nowrap; transition: border-color .15s; }
.format-field:hover { border-color: var(--muted); }
.format-field:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.format-field select { appearance: none; flex: 1; min-width: 0; min-height: 44px; max-width: 100%; padding: 8px 24px 8px 0; border: 0; border-radius: 0; color: var(--ink); font-size: .875rem; font-weight: 500; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238590a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right center; }
.format-field select:focus-visible { outline: none; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.work-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-left: 3px solid var(--work-color); border-radius: 10px; background: white; transition: box-shadow .15s; }
.work-card:hover { box-shadow: 0 7px 22px #20385215; }
.work-poster-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .75rem; }
.work-poster-meta > span:last-child { margin-left: auto; }
.work-card h2 { margin: 0; font-size: 1.125rem; line-height: 1.5; overflow-wrap: anywhere; }
.work-local-title { margin: 0; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.work-card-info { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: auto; }
.work-card-info p { color: var(--muted); font-size: .8125rem; margin: 0; line-height: 1.6; }
.work-card-info > span { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.back-link { font-size: .875rem; color: #64718b; }
.work-detail { display: grid; gap: 4px; margin-top: 12px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.work-detail h1 { font-size: 1.5rem; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.work-detail p { color: var(--muted); margin: 0; font-size: .8125rem; }
.reader-navigation { display: flex; flex: 1 1 260px; min-width: 0; gap: 12px; align-items: center; margin-right: auto; }
.reader-navigation > .button { flex-shrink: 0; }
.reader-breadcrumb { display: flex; flex: 1; min-width: 0; gap: 8px; align-items: center; font-size: .875rem; color: #8a94a8; }
.reader-breadcrumb .back-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.reader-heading h1 { margin: 0; }
.reader-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.dialogue-card, .insight-card { background: white; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.context-box { padding: 16px 20px; background: #e8ecf1; border-bottom: 1px solid #d2dae5; }
.context-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.context-heading > span { color: #4d618d; font-size: .8125rem; font-weight: 600; }
.context-box p { margin: 6px 0 0; font-size: .875rem; line-height: 1.6; color: #52617c; }
.translation-toggle { display: flex; align-items: center; gap: 5px; font-size: .8125rem; color: #65738c; padding: 3px 0; }
.translation-toggle input { accent-color: var(--blue); width: 16px; height: 16px; }
.dialogue-lines { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 24px; background: #e9edf2; }
.dialogue-line { display: flex; flex-direction: column; align-items: flex-start; align-self: flex-start; max-width: 88%; gap: 5px; }
.dialogue-line.speaker-right { align-self: flex-end; align-items: flex-end; }
.expression-reader .dialogue-line { width: 100%; max-width: 100%; }
.expression-reader .speaker { display: none; }
.expression-reader .line-button { width: 100%; border-radius: 8px; }
.line-button { position: relative; display: block; max-width: 100%; min-height: 44px; color: var(--ink); background: #fff; border: 1px solid #c4ccd7; padding: 10px 14px; text-align: left; border-radius: 14px 14px 14px 4px; box-shadow: 0 1px 2px #253a5b0d; }
.line-button.is-saved { margin-top: 20px; }
.line-saved-tab { position: absolute; bottom: 100%; left: 18px; padding: 3px 10px 4px; border-radius: 9px 9px 0 0; background: var(--amber); color: var(--navy); font-size: .75rem; font-weight: 700; line-height: 1.2; white-space: nowrap; pointer-events: none; }
.speaker-right .line-button { color: #fff; background: #2c4263; border-color: #2c4263; border-radius: 14px 14px 4px 14px; }
.line-button:hover { border-color: #7285a0; }
.dialogue-line.is-selected .line-button { border-color: #607be2; box-shadow: 0 0 0 2px #607be226; }
.line-number { font-size: .6875rem; color: #687287; font-weight: 400; }
.speaker { display: flex; align-items: center; gap: 7px; padding: 0 4px; font-size: .8125rem; color: #344155; font-weight: 600; }
.line-text { display: block; font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.inline-translation { padding: 2px 5px 0; margin: 0; max-width: 100%; font-size: .8125rem; line-height: 1.6; color: #455268; }
.prose-reader .dialogue-lines { gap: 12px; padding: 22px 20px; background: transparent; }
.prose-reader .dialogue-line { width: 100%; max-width: 100%; gap: 0; border: 1px solid transparent; border-radius: 8px; transition: background-color .15s ease, border-color .15s ease; }
.prose-reader .line-button { width: 100%; border-radius: 5px; border-color: transparent; background: transparent; box-shadow: none; }
.prose-reader .line-text { font-size: 1.125rem; line-height: 1.75; white-space: pre-line; }
.prose-reader .inline-translation { width: 100%; padding: 0 16px 14px; font-size: .9375rem; line-height: 1.7; color: #53617a; white-space: pre-line; }
.has-translations .prose-reader .dialogue-lines { gap: 22px; }
.has-translations .prose-reader .dialogue-line { border-color: var(--line); background: #fafbfd; }
.has-translations .prose-reader .line-button { padding: 14px 16px 10px; }
.prose-reader .dialogue-line:hover { background: #f4f6fa; }
.prose-reader .dialogue-line.is-selected { border-color: var(--blue); background: #f2f5ff; }
.has-translations .insight-label, .has-translations .insight-label + h2 { display: none; }
.has-translations .insight-label + h2 + .insight-section { margin-top: 0; }
.email-subject { padding: 0 14px 14px; border-bottom: 1px solid var(--line); }
.email-subject > span { font-size: .8125rem; color: var(--muted); }
.email-subject h2 { font-size: 1.0625rem; line-height: 1.6; margin: 4px 0 0; }
.email-subject p { font-size: .875rem; margin: 4px 0 0; color: var(--muted); }
.practice-prompt { padding: 18px 26px; border-top: 1px solid var(--line); }
.practice-prompt h2 { font-size: .9375rem; margin: 0 0 6px; }
.practice-prompt p { font-size: .875rem; margin: 0; color: var(--muted); }
.source-line { display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--line); padding: 18px 26px; background: #fafbfd; font-size: .75rem; }
.source-line > span { color: #8190a6; }
.source-line p { margin: 0; color: #576b96; }
.source-line a { color: #576b96; line-height: 1.7; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; }
.insight-card { padding: 22px; scroll-margin-top: 24px; }
@media (min-width: 901px) { .insight-card { position: sticky; top: 24px; } }
.insight-placeholder { min-height: 310px; display: flex; align-items: center; justify-content: center; text-align: center; flex-direction: column; }
.insight-placeholder > svg { width: 38px; height: 38px; color: #9aa9c9; margin-bottom: 12px; }
.insight-placeholder h2 { font-size: 1.125rem; margin: 12px 0 4px; }
.insight-placeholder p { color: var(--muted); font-size: .9375rem; max-width: 250px; }
.insight-label { font-size: .8125rem; color: var(--blue); font-weight: 600; }
.insight-card h2 { font-size: 1.125rem; line-height: 1.6; margin: 10px 0 18px; }
.insight-section { margin: 18px 0; }
.insight-section h3, .example-box h3 { font-size: .8125rem; color: #455268; font-weight: 500; margin: 0 0 10px; }
.expression-chip { font-size: 1rem; font-weight: 600; color: #3655be; background: #eff2ff; display: inline-block; padding: 7px 10px; border-radius: 5px; }
.insight-section p { font-size: .9375rem; color: #3f4d64; margin: 12px 0 0; }
.insight-section .tone-text { font-size: .875rem; }
.example-box { border-left: 2px solid var(--line); background: #f8f9fc; padding: 14px; margin: 18px 0; border-radius: 0 5px 5px 0; }
.example-box p { font-size: .875rem; color: #536179; margin: 7px 0 0; }
.example-box .example-original { font-size: 1rem; color: #354762; }
.save-button { width: 100%; }
.reader-bottom { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin: 28px 0 0; }
.saved-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.saved-card { background: white; border: 1px solid var(--line); border-radius: 11px; padding: 23px; }
.saved-card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #7a879d; font-size: .8125rem; margin-bottom: 22px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid #dce4f9; border-radius: 7px; background: #f4f6ff; color: var(--blue); }
.saved-original { font-size: 1.25rem; line-height: 1.7; }
.saved-card > a > p { font-size: .9375rem; color: #6c7b96; margin: 14px 0 23px; }
.empty-state { border: 1px dashed #d6ddea; background: #fff; text-align: center; padding: 65px 24px; border-radius: 13px; }
.empty-state > svg { width: 37px; height: 37px; color: #92a2c3; margin-bottom: 10px; }
.empty-state h2 { font-size: 1.25rem; line-height: 1.6; }
.empty-state p { color: var(--muted); font-size: .9375rem; }
.empty-state .button { margin-top: 12px; }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #79849a; font-size: .75rem; padding: 22px 44px; border-top: 1px solid var(--line); }
.page-footer > span:first-child { font-size: 1rem; font-weight: 600; color: #78849a; }
#toast { position: fixed; bottom: 25px; left: calc(50% + 100px); transform: translate(-50%, 14px); opacity: 0; background: #202b42; color: white; padding: 14px 20px; border-radius: 9px; box-shadow: 0 5px 20px #18293d26; font-size: .875rem; z-index: 30; pointer-events: none; transition: opacity .15s, transform .15s; max-width: calc(100vw - 40px); }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
:root[data-theme="dark"] :is(.topbar, .featured, .language-trigger, .language-menu, .heading-label, .scene-card, .work-card, .search-field, .format-field, .dialogue-card, .insight-card, .saved-card, .empty-state, .theme-toggle) { background: #1a2233; }
:root[data-theme="dark"] :is(.language-trigger, .language-menu, .button-outline, .badge, .icon-button, .empty-state) { border-color: var(--line); }
:root[data-theme="dark"] .scene-card:hover { background: #202b3e; }
:root[data-theme="dark"] .badge { color: var(--muted); }
:root[data-theme="dark"] :is(.language-trigger, .language-option, .heading-label, .context-box p, .insight-section p, .example-box .example-original, .button-outline) { color: #c3cde0; }
:root[data-theme="dark"] :is(.language-chevron, .back-link, .reader-breadcrumb, .translation-toggle, .speaker, .line-number, .inline-translation, .source-line > span, .insight-section h3, .example-box h3, .example-box p, .saved-card-title, .saved-card > a > p, .page-footer, .page-footer > span:first-child, .type-filters button, .theme-toggle) { color: var(--muted); }
:root[data-theme="dark"] :is(.language-mark, .type-filters, .context-box, .dialogue-lines, .source-line, .example-box) { background: #151d2c; }
:root[data-theme="dark"] .language-mark { color: #b2bfd8; }
:root[data-theme="dark"] :is(.language-trigger:hover, .language-option:hover, .button-outline:hover, .theme-toggle:hover) { background: #25324a; }
:root[data-theme="dark"] :is(.language-option[aria-checked="true"], .language-option:focus-visible, .expression-chip, .button-saved, .icon-button) { background: #293858; color: #b8c7ff; }
:root[data-theme="dark"] .language-option[aria-checked="true"] .language-mark { background: #354a73; color: #d0dbff; }
:root[data-theme="dark"] :is(.language-check, .language-picker[open] .language-chevron, .read-badge, .context-heading > span, .source-line p, .source-line a) { color: #b8c7ff; }
:root[data-theme="dark"] .language-picker[open] .language-trigger { border-color: #8b9ee4; box-shadow: 0 0 0 3px #a6b8ff20; }
:root[data-theme="dark"] :is(.context-box, .dialogue-lines) { border-color: var(--line); }
:root[data-theme="dark"] .type-filters .selected { background: #2b3953; color: var(--ink); }
:root[data-theme="dark"] .search-field input::placeholder { color: var(--muted); }
:root[data-theme="dark"] .button-outline { background: #1a2233; }
:root[data-theme="dark"] .button-outline:hover { background: #25324a; }
:root[data-theme="dark"] .button-primary { background: #3859de; }
:root[data-theme="dark"] .button-primary:hover { background: #2948c9; }
:root[data-theme="dark"] .button-saved { border-color: #506595; }
:root[data-theme="dark"] .line-button { color: var(--ink); background: #25324a; border-color: #465772; }
:root[data-theme="dark"] .speaker-right .line-button { background: #283a60; border-color: #4d6492; }
:root[data-theme="dark"] .line-button:hover { border-color: #a6b8ff; }
:root[data-theme="dark"] .dialogue-line.is-selected .line-button { border-color: #a6b8ff; box-shadow: 0 0 0 2px #a6b8ff40; }
:root[data-theme="dark"] .has-translations .prose-reader .dialogue-line { background: #1e2738; }
:root[data-theme="dark"] .prose-reader .dialogue-line:hover { background: #222d40; }
:root[data-theme="dark"] .prose-reader .dialogue-line.is-selected { border-color: var(--blue); background: #243149; }
:root[data-theme="dark"] .prose-reader .inline-translation { color: #bcc6d8; }
:root .prose-reader .dialogue-line .line-button, :root .prose-reader .dialogue-line.is-selected .line-button { background: transparent; border-color: transparent; box-shadow: none; }
:root[data-theme="dark"] :is(button, a, select, input):focus-visible { outline-color: #a6b8ff; }
:root[data-theme="dark"] .language-trigger:focus-visible { outline-color: #a6b8ff; }
@media (max-width: 1150px) { .sidebar { width: 205px; padding-left: 14px; padding-right: 14px; } .workspace { margin-left: 205px; } main { padding: 30px; } .topbar { padding: 4px 30px; } .heading-label { display: none; } .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .reader-layout { gap: 18px; } .insight-card { padding: 22px; } }
@media (max-width: 900px) { .sidebar { width: 185px; padding-left: 10px; padding-right: 10px; } .workspace { margin-left: 185px; } .brand { font-size: 1.75rem; } .nav-item { gap: 9px; padding-left: 12px; padding-right: 12px; } .preferences { gap: 12px; } .language-field { gap: 7px; } main { padding: 28px 24px; } .topbar { padding: 4px 24px; } .reader-layout { grid-template-columns: 1fr; } .insight-placeholder { min-height: 170px; } .reader-heading { align-items: start; flex-direction: column; } .library-controls { flex-wrap: wrap; } .saved-list { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .sidebar { position: static; width: 100%; padding: 18px 18px 12px; } .brand { font-size: 1.65rem; padding: 0; width: fit-content; } .brand-icon { width: 29px; height: 29px; font-size: 2.6rem; border-radius: 8px; } .sidebar-caption, .sidebar-bottom { display: none; } .sidebar nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 18px; } .nav-item { justify-content: center; gap: 6px; font-size: .875rem; padding: 9px 5px; min-height: 44px; } .nav-item svg { width: 17px; height: 17px; } .nav-count { display: none; } .workspace { margin-left: 0; } .topbar { min-height: 0; padding: 4px 18px; } .preferences { width: 100%; margin: 0; gap: 15px; align-items: stretch; } .language-field { flex-direction: column; align-items: stretch; flex: 1; gap: 4px; } .language-label { font-size: .8125rem; } .language-trigger { width: 100%; min-width: 0; } .language-menu { width: 100%; min-width: 0; } .language-option { gap: 8px; padding: 8px 6px; } .language-option .language-mark { width: 24px; height: 24px; } .setting-divider { display: none; } main { padding: 27px 18px 35px; } h1 { font-size: 1.625rem; } .page-heading { margin-bottom: 24px; } .page-heading p { font-size: .875rem; } .scene-grid { grid-template-columns: 1fr; gap: 16px; } .section-heading { margin-top: 27px; } .section-heading h2 { font-size: 1.0625rem; } .work-grid { gap: 14px; } .library-controls { margin: 20px 0; gap: 16px; } .search-field { width: 100%; } .type-filters { width: 100%; } .type-filters button { flex: 1; } .work-detail h1 { font-size: 1.25rem; } .reader-heading h1 { font-size: 1.5rem; } .context-box { padding: 15px 16px; } .dialogue-line { max-width: 92%; } .line-button { padding: 10px 12px; } .dialogue-lines { padding: 16px 12px 20px; } .source-line { padding: 17px 22px; } .reader-bottom { flex-wrap: wrap; } .reader-bottom .button { width: 100%; } .page-footer { padding: 21px 18px; font-size: .75rem; align-items: start; } .page-footer > span:last-child { max-width: 240px; text-align: right; } #toast { left: 50%; width: max-content; } }
@media (max-width: 680px) { .featured-content { padding: 16px; } .featured-meta { gap: 8px; } .featured-work { width: 100%; margin-left: 0; } .featured-reading { align-items: flex-start; flex-direction: column; gap: 14px; } .featured blockquote { font-size: 1.25rem; } }
@media (max-width: 900px) { .scene-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) { .scene-card { padding: 16px; gap: 12px; } .scene-position { width: 18px; } .scene-card-action > span { display: none; } .preview-line { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; } .work-grid { grid-template-columns: minmax(0, 1fr); } .work-card { padding: 16px; } }
@media (max-width: 380px) { .nav-item { font-size: .8125rem; } .nav-item svg { display: none; } }
@media (min-width: 681px) and (max-width: 900px) { .language-field { flex-direction: column; align-items: stretch; } .theme-toggle { align-self: flex-end; } }
@media (max-width: 680px) { .theme-toggle { align-self: flex-end; } .language-menu { min-width: 160px; } .language-picker[data-kind="native"] .language-menu { left: 0; right: auto; } }
@media (max-width: 380px) { .language-trigger > .language-mark { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
