:root {
  --night: #0d1214;
  --night-2: #151d20;
  --paper: #f1eadc;
  --paper-deep: #e3d6bf;
  --ink: #242522;
  --muted: #766f63;
  --line: rgba(54, 51, 44, .16);
  --cinnabar: #8d2f2d;
  --cinnabar-bright: #b5493f;
  --sky: #9fcad0;
  --gold: #b89b5f;
  --shadow: 0 28px 70px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--night);
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  min-height: 100vh;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.sky-grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 82% 12%, rgba(159, 202, 208, .12), transparent 27%),
    radial-gradient(circle at 10% 90%, rgba(141, 47, 45, .14), transparent 30%),
    repeating-linear-gradient(115deg, transparent 0 34px, rgba(255,255,255,.015) 35px 36px);
}

/* login */
.login-shell {
  position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center;
  padding: 28px;
}
.login-card {
  width: min(460px, 100%); position: relative; overflow: hidden;
  padding: 62px 58px 44px; color: #2b2a26;
  background:
    linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,.05)),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(80,60,30,.018) 6px),
    var(--paper);
  border: 1px solid rgba(218, 199, 165, .65); box-shadow: var(--shadow);
}
.login-card::before, .login-card::after {
  content: ""; position: absolute; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.login-card::before { top: 24px; }.login-card::after { bottom: 24px; }
.seal {
  position: absolute; right: 34px; top: 34px; width: 52px; height: 52px;
  display: grid; place-items: center; color: var(--cinnabar); transform: rotate(3deg);
  border: 2px solid var(--cinnabar); outline: 1px solid rgba(141,47,45,.45); outline-offset: 3px;
}
.seal span { font-family: "Kaiti SC", "STKaiti", serif; font-size: 28px; font-weight: 700; }
.kicker { margin: 0; color: var(--cinnabar); font-size: 11px; font-weight: 700; letter-spacing: .22em; }
.login-card h1 { margin: 16px 0 8px; font-family: "Kaiti SC", "STKaiti", serif; font-size: 42px; letter-spacing: .12em; }
.login-lede { margin: 0 0 34px; color: var(--muted); line-height: 1.8; font-size: 14px; }
.protocol-notice { margin: -12px 0 24px; padding: 13px 14px; color: #6f2825; background: #ead2c5; border-left: 3px solid var(--cinnabar); }
.protocol-notice strong, .protocol-notice span, .protocol-notice a { display: block; }
.protocol-notice strong { font-size: 13px; }.protocol-notice span { margin: 5px 0 9px; color: #765e54; font-size: 11px; line-height: 1.55; }
.protocol-notice a { color: var(--cinnabar); font-size: 12px; font-weight: 700; text-decoration: none; }
.protocol-notice a:hover { text-decoration: underline; }
.file-mode .login-card form { display: none; }
.login-card label { display: block; margin: 17px 0; color: var(--muted); font-size: 12px; letter-spacing: .12em; }
.login-card input {
  display: block; width: 100%; margin-top: 8px; padding: 12px 2px;
  color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid #a69983; outline: 0;
  font-size: 17px; letter-spacing: .04em;
}
.login-card input:focus { border-color: var(--cinnabar); box-shadow: 0 1px var(--cinnabar); }
.ink-button {
  width: 100%; margin-top: 22px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between;
  color: #f8f1e4; background: #202927; border: 0; letter-spacing: .16em;
  transition: transform .2s ease, background .2s ease;
}
.ink-button:hover { background: var(--cinnabar); transform: translateY(-2px); }
.ink-button b { font-size: 20px; font-weight: 400; }
.form-error { color: var(--cinnabar); margin: 10px 0 0; font-size: 13px; }
.login-foot { margin: 30px 0 0; text-align: center; color: #998e7b; font-size: 11px; letter-spacing: .24em; }

/* era entrance and multi-document library */
.era-app, .library-app { position: relative; z-index: 1; min-height: 100vh; color: #e6e0d3; }
.era-shell, .library-shell { width: min(1500px, calc(100% - 48px)); margin: 0 auto; padding: 58px 0 100px; }
.era-hero { min-height: 215px; display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: 12px 0 44px; border-bottom: 1px solid rgba(184,155,95,.28); }
.era-hero h1 { margin: 15px 0 12px; color: #eee7d9; font: 500 clamp(42px, 5vw, 70px)/1.08 "Kaiti SC", "STKaiti", serif; letter-spacing: .08em; }
.era-hero p:last-child { max-width: 620px; margin: 0; color: #7f8c89; font-size: 13px; line-height: 1.9; letter-spacing: .05em; }
.era-seal { flex: 0 0 76px; height: 76px; display: grid; place-items: center; color: #b44a41; border: 2px solid #9a3d36; outline: 1px solid rgba(154,61,54,.45); outline-offset: 5px; font: 600 19px/1.15 "Kaiti SC", serif; text-align: center; transform: rotate(3deg); }
.era-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.era-card { min-height: 365px; display: grid; grid-template-columns: minmax(230px, 42%) 1fr; overflow: hidden; background: #11191b; border: 1px solid #2e3c3f; transition: transform .2s ease, border-color .2s ease; }
.era-card:not(.is-disabled):hover { transform: translateY(-4px); border-color: #7a6844; }
.era-card-visual { min-height: 365px; display: grid; grid-template-columns: repeat(2, 1fr); overflow: hidden; background: #090e0f; }
.era-card-visual img { width: 100%; height: 100%; min-width: 0; object-fit: cover; object-position: 50% 24%; filter: saturate(.8) contrast(1.05); }
.era-card-visual img:only-child { grid-column: 1 / -1; }
.era-card-visual span { grid-column: 1 / -1; display: grid; place-items: center; color: #8e7542; font: 500 30px "Kaiti SC", serif; letter-spacing: .2em; background: radial-gradient(circle at 50% 38%, #192325, #080d0e 68%); }
.era-card-info { position: relative; display: flex; flex-direction: column; padding: 38px 34px 30px; }
.era-card-info::after { content: attr(data-index); position: absolute; right: 14px; bottom: -12px; color: rgba(159,202,208,.045); font: 700 100px/1 ui-monospace, monospace; }
.era-card-info > p:first-child { margin: 0; color: #a78648; font: 700 10px ui-monospace, monospace; letter-spacing: .18em; }
.era-card-info h2 { margin: 32px 0 10px; color: #f0e9dc; font: 500 38px/1.15 "Kaiti SC", serif; letter-spacing: .08em; }
.era-card-info > p:nth-of-type(2) { margin: 0; color: #788684; font-size: 12px; line-height: 1.7; }
.era-card-info footer { position: relative; z-index: 1; margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #71807d; font-size: 11px; }
.era-card-info button { padding: 10px 14px; color: #f4ecdc; background: #8d2f2d; border: 1px solid #8d2f2d; }
.era-card-info button:hover { background: #a33b36; }.era-card-info button:disabled { cursor: default; color: #6e7775; background: transparent; border-color: #334044; }
.era-card.is-disabled { opacity: .62; }
.library-hero { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding: 0 0 32px; border-bottom: 1px solid rgba(184,155,95,.25); }
.library-hero h1 { margin: 10px 0 4px; font: 500 clamp(42px, 6vw, 72px)/1 "Kaiti SC", "STKaiti", serif; letter-spacing: .12em; }
.library-hero p:last-child { margin: 14px 0 0; color: #879391; font-size: 13px; letter-spacing: .06em; }
.library-stat { min-width: 124px; padding: 18px 20px; text-align: right; border: 1px solid #344145; background: rgba(17,24,26,.7); }
.library-stat strong, .library-stat span { display: block; }.library-stat strong { color: var(--sky); font: 500 38px/1 ui-monospace, monospace; }.library-stat span { margin-top: 8px; color: #788684; font-size: 10px; letter-spacing: .14em; }
.library-toolbar { display: flex; justify-content: space-between; gap: 24px; margin: 28px 0 20px; }
.library-filters { display: flex; flex-wrap: wrap; gap: 6px; }.library-filters button { --filter-color: #536165; padding: 9px 15px; color: #7e8b89; background: transparent; border: 1px solid #2b373a; border-top: 3px solid var(--filter-color); }.library-filters button[data-filter="not_started"] { --filter-color: #e9e5db; }.library-filters button[data-filter="ai_written"] { --filter-color: #e98aaa; }.library-filters button[data-filter="editing"] { --filter-color: #58a9c6; }.library-filters button[data-filter="finalized"] { --filter-color: #caa652; }.library-filters button:hover, .library-filters button.active { color: #f1eadc; background: #242d2f; border-right-color: #536165; border-bottom-color: #536165; border-left-color: #536165; }
.library-toolbar input { width: min(320px, 42vw); padding: 9px 13px; color: #e8e2d6; background: #0d1315; border: 1px solid #2b383a; outline: 0; }.library-toolbar input:focus { border-color: #627c7f; }
.document-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.document-card { --status-color: #e9e5db; position: relative; min-height: 490px; overflow: hidden; background: linear-gradient(145deg, rgba(28,38,40,.98), rgba(15,22,24,.98)); border: 1px solid #2b383b; border-top: 4px solid var(--status-color); transition: transform .18s, border-color .18s; }
.document-card.status-not_started { --status-color: #e9e5db; }.document-card.status-ai_written { --status-color: #e98aaa; }.document-card.status-editing { --status-color: #58a9c6; }.document-card.status-finalized { --status-color: #caa652; }
.document-card.is-generating { border-top-color: rgba(233,138,170,.18); }
.document-card.is-generating::before { content: ""; position: absolute; z-index: 4; top: 0; left: 0; width: var(--job-progress, 0%); height: 4px; background: #e98aaa; box-shadow: 0 0 12px rgba(233,138,170,.7); transition: width .45s ease; }
.document-card::after { content: attr(data-index); position: absolute; right: 13px; bottom: -13px; color: rgba(159,202,208,.055); font: 700 84px/1 ui-monospace, monospace; }
.document-card:hover { transform: translateY(-3px); border-right-color: #526368; border-bottom-color: #526368; border-left-color: #526368; }
.portrait-montage { height: 300px; display: grid; margin: 0; overflow: hidden; background: #080d0e; border-bottom: 1px solid #263235; }
.portrait-montage img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; object-position: 50% 22%; }
.portrait-montage.portrait-count-2 { grid-template-columns: repeat(2, 1fr); }.portrait-montage.portrait-count-3 { grid-template-columns: repeat(3, 1fr); }
.era-card-visual, .portrait-montage { background: linear-gradient(110deg, #080d0e 25%, #152022 42%, #080d0e 60%); background-size: 240% 100%; animation: media-skeleton 1.7s ease-in-out infinite; }
.optimized-media { opacity: 0; transition: opacity .24s ease; }.optimized-media.is-loaded { opacity: 1; }
.era-card-visual:has(.optimized-media.is-loaded), .portrait-montage:has(.optimized-media.is-loaded) { animation: none; background: #080d0e; }
.document-card-body { padding: 18px 18px 20px; }
.document-card header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.status-pill { padding: 4px 7px; color: var(--status-color); border: 1px solid color-mix(in srgb, var(--status-color) 55%, #283437); font-size: 9px; letter-spacing: .08em; }
.document-card h2 { min-height: 58px; margin: 18px 0 5px; color: #f0eadd; font: 500 24px/1.25 "Kaiti SC", "STKaiti", serif; letter-spacing: .04em; }.document-card .card-subtitle { min-height: 20px; margin: 0; color: #c39f57; font-size: 12px; }.card-domain { min-height: 34px; margin: 9px 0 0; color: #6f7d7a; font-size: 10px; line-height: 1.65; }
.document-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; color: #6e7b79; font-size: 10px; }.document-meta b { color: #aeb9b6; font-weight: 500; }
.document-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 21px; }.document-actions button { padding: 7px 10px; color: #b8c3c0; background: transparent; border: 1px solid #3a494c; font-size: 10px; }.document-actions .open-document { color: #fff7e9; background: var(--cinnabar); border-color: var(--cinnabar); }.document-actions button:hover { border-color: var(--sky); color: #fff; }
.document-actions .open-document:disabled { cursor: default; color: #6f7b79; background: transparent; border-color: #334144; }
.library-empty { padding: 72px 20px; text-align: center; border: 1px dashed #314044; color: #667472; }.library-empty span { color: var(--gold); font-size: 30px; }.library-empty h2 { color: #aeb8b4; font: 500 24px "Kaiti SC", serif; }
.role-chip { color: var(--gold); font-size: 10px; letter-spacing: .12em; }
.back-button { padding-right: 12px; border-right: 1px solid #334246; }

/* app shell */
.review-app { position: relative; z-index: 1; min-height: 100vh; }
.topbar {
  height: 68px; position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  color: #efe8da; background: rgba(13, 18, 20, .94); border-bottom: 1px solid rgba(184,155,95,.25);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--cinnabar-bright); color: #d66d62; }
.brand b, .brand small { display: block; }.brand b { font-size: 14px; letter-spacing: .14em; }.brand small { color: #89979a; font-size: 9px; margin-top: 3px; letter-spacing: .18em; }
.top-status { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.save-status { color: #aab6b3; }.save-status i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #819b80; }
.save-status.saving i { background: var(--gold); animation: pulse 1s infinite; }.save-status.error i { background: #d56358; }
.collaboration-status { padding: 5px 9px; border: 1px solid #314145; color: #98aaa7; font-size: 11px; }
.remote-update-banner { position: fixed; z-index: 25; top: 54px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; max-width: min(720px, calc(100vw - 32px)); padding: 10px 14px; background: #352820; border: 1px solid #9d7442; color: #f0dfc3; box-shadow: 0 12px 35px rgba(0,0,0,.3); font-size: 12px; }
.remote-update-banner[hidden] { display: none; }.remote-update-banner button { border: 1px solid #c69d5a; padding: 6px 10px; color: #f3e7cd; background: #5a3d29; cursor: pointer; white-space: nowrap; }
.account-chip { padding: 5px 10px; border: 1px solid #334246; color: var(--sky); }
.text-button { color: #8e9a9b; background: transparent; border: 0; }.text-button:hover { color: #fff; }

.review-layout { display: grid; grid-template-columns: 210px minmax(560px, 1fr) 350px; max-width: 1700px; min-height: calc(100vh - 68px); margin: 0 auto; }
.chapter-rail, .feedback-rail { position: sticky; top: 68px; height: calc(100vh - 68px); overflow: auto; }
.chapter-rail { padding: 34px 22px; color: #b8c0bd; border-right: 1px solid #273236; background: rgba(15,21,23,.78); }
.rail-label { margin: 0; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.chapter-rail nav { display: grid; gap: 2px; margin-top: 18px; }
.chapter-rail a { position: relative; padding: 8px 4px 8px 26px; color: #879391; text-decoration: none; font-size: 12px; line-height: 1.4; }
.chapter-rail a::before { content: attr(data-index); position: absolute; left: 0; top: 9px; color: #596866; font-size: 9px; }
.chapter-rail a:hover, .chapter-rail a.active { color: #e7dfd0; }.chapter-rail a.active::after { content: ""; position: absolute; left: -22px; top: 7px; bottom: 7px; width: 2px; background: var(--cinnabar-bright); }
.assignment-card { margin-top: 32px; padding: 14px; border: 1px solid #2b383b; background: #101719; }
.assignment-card span, .assignment-card strong, .assignment-card small { display: block; }.assignment-card span, .assignment-card small { color: #667573; font-size: 10px; }.assignment-card strong { margin: 6px 0; color: var(--sky); font-size: 12px; }
.assignment-card .sentence-total { margin-top: 12px; padding-top: 11px; border-top: 1px solid #273437; }.assignment-card .sentence-total b { color: #d9d2c5; font-size: 12px; font-weight: 500; }

.manuscript { min-height: 100%; padding: 74px clamp(36px, 6vw, 96px) 100px; background: var(--paper); box-shadow: inset 18px 0 40px rgba(63,48,27,.04), inset -18px 0 40px rgba(63,48,27,.04); }
.manuscript-head { display: flex; justify-content: space-between; gap: 28px; padding-bottom: 34px; border-bottom: 1px solid #cfc2ac; }
.manuscript-head h1 { margin: 16px 0 5px; font-family: "Kaiti SC", "STKaiti", serif; font-size: clamp(36px, 4.2vw, 62px); font-weight: 600; letter-spacing: .08em; }
.subtitle { margin: 0; color: var(--muted); font-size: 17px; letter-spacing: .18em; }
.folio-stamp { flex: 0 0 70px; height: 70px; display: grid; place-items: center; border: 2px solid var(--cinnabar); color: var(--cinnabar); transform: rotate(2deg); }
.folio-stamp span { font-family: "Kaiti SC", "STKaiti", serif; text-align: center; font-size: 16px; line-height: 1.25; }
.locked-banner { margin: 28px 0; padding: 13px 16px; display: flex; gap: 14px; color: #6f2825; background: #ead2c5; border-left: 3px solid var(--cinnabar); font-size: 13px; }.locked-banner span { color: #765e54; }
.editing-guide { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 22px 0 -22px; padding: 10px 13px; color: #817767; background: rgba(255,255,255,.24); border: 1px solid rgba(111,96,72,.12); font-size: 10px; letter-spacing: .04em; }.editing-guide span { white-space: nowrap; }.editing-guide b { margin-right: 4px; color: var(--cinnabar); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
.document-body { counter-reset: section; }
.copy-section { scroll-margin-top: 92px; margin-top: 58px; counter-increment: section; }
.section-heading { display: grid; grid-template-columns: 46px 1fr; gap: 15px; align-items: end; margin-bottom: 22px; }
.section-heading::before { content: counter(section, decimal-leading-zero); color: var(--cinnabar); font-size: 13px; font-weight: 700; letter-spacing: .05em; border-bottom: 2px solid var(--cinnabar); padding-bottom: 6px; }
.section-heading h2 { margin: 0; font-family: "Kaiti SC", "STKaiti", serif; font-size: 26px; font-weight: 600; letter-spacing: .05em; }.section-heading time { display: block; margin-top: 5px; color: #8e8577; font-size: 11px; letter-spacing: .12em; }
.copy-block { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 62px; gap: 10px; align-items: start; margin: 0 -18px; padding: 8px 8px 8px 0; border-left: 2px solid transparent; transition: background .18s ease, border-color .18s ease; }
.copy-block:hover, .copy-block:focus-within { background: rgba(255,255,255,.32); border-left-color: #cab999; }
.copy-block.changed { background: rgba(159,202,208,.12); border-left-color: #77aeb6; }
.copy-block.has-comment { box-shadow: inset 0 -1px rgba(181,73,63,.22); }
.sentence-number { padding-top: 6px; color: #a7423d; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-align: right; user-select: none; }
.copy-text { margin: 0; outline: 0; color: #35342f; font-size: 16px; line-height: 2.04; letter-spacing: .012em; }
.copy-text[contenteditable="true"]:focus { color: #171915; }
.sentence-tools { display: flex; gap: 5px; opacity: .34; transition: opacity .15s; }
.copy-block:hover .sentence-tools, .copy-block:focus-within .sentence-tools, .copy-block.has-comment .sentence-tools { opacity: 1; }
.comment-trigger, .sentence-delete { width: 27px; height: 27px; padding: 0; color: #7c6d57; background: transparent; border: 1px solid #b9aa90; border-radius: 50%; transition: color .15s, border-color .15s, background .15s; }
.comment-trigger:hover { color: var(--cinnabar); border-color: var(--cinnabar); }.sentence-delete:hover { color: #fff8ee; background: var(--cinnabar); border-color: var(--cinnabar); }
.comment-trigger:disabled, .sentence-delete:disabled, .insert-trigger:disabled { cursor: default; opacity: .32; }
.insert-slot { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 62px; gap: 10px; align-items: center; min-height: 18px; margin: 0 -18px; }
.insert-slot::after { content: ""; position: absolute; left: 48px; right: 72px; top: 50%; height: 1px; background: linear-gradient(90deg, rgba(141,47,45,.25), transparent); opacity: 0; transition: opacity .16s; }
.insert-slot:hover::after, .insert-slot:focus-within::after { opacity: 1; }
.insert-trigger { position: relative; z-index: 1; grid-column: 1; justify-self: end; width: 20px; height: 20px; padding: 0; display: grid; place-items: center; color: #9b8e7a; background: var(--paper); border: 1px solid #c8b99f; border-radius: 50%; opacity: .62; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 14px; line-height: 1; transition: opacity .16s, transform .16s, color .16s, border-color .16s; }
.insert-slot:hover .insert-trigger, .insert-trigger:focus-visible { color: var(--cinnabar); border-color: var(--cinnabar); opacity: 1; transform: rotate(90deg) scale(1.08); }
.insert-slot.is-open { min-height: 92px; margin: 8px -18px; }
.insert-slot.is-open::after { display: none; }
.insert-panel { grid-column: 2 / 4; padding: 12px; background: #e7ddcb; border: 1px solid #c9baa1; box-shadow: 0 10px 24px rgba(78,60,34,.09); }
.insert-panel textarea { width: 100%; resize: vertical; padding: 10px 12px; color: var(--ink); background: #f8f2e7; border: 1px solid #cabcaa; outline: 0; line-height: 1.65; }.insert-panel textarea:focus { border-color: var(--cinnabar); box-shadow: 0 0 0 2px rgba(141,47,45,.08); }
.insert-panel div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }.insert-panel button { padding: 7px 13px; border: 0; }.insert-cancel { color: #766e62; background: transparent; }.insert-confirm { color: #fff8ed; background: #26302e; }.insert-confirm:hover { background: var(--cinnabar); }
.manuscript-end { margin-top: 74px; display: flex; justify-content: center; gap: 14px; color: #a49986; font-size: 12px; letter-spacing: .28em; }

.feedback-rail { padding: 28px 20px 24px; color: #d9d8d1; border-left: 1px solid #273236; background: #12191b; }
.feedback-head { display: flex; justify-content: space-between; align-items: start; padding-bottom: 18px; border-bottom: 1px solid #2b373a; }.feedback-head h2 { margin: 7px 0 0; font-family: "Kaiti SC", "STKaiti", serif; font-size: 24px; font-weight: 500; }.count-badge { display: grid; place-items: center; min-width: 27px; height: 27px; border: 1px solid #405053; color: var(--sky); font-size: 12px; }
.composer { margin: 16px 0; padding: 14px; background: #f0e7d7; color: var(--ink); box-shadow: 0 12px 35px rgba(0,0,0,.22); }
.composer-meta { display: flex; justify-content: space-between; color: var(--cinnabar); font-size: 11px; }.composer-meta button { border: 0; background: transparent; color: #84796b; font-size: 18px; }
.composer blockquote { margin: 10px 0; padding-left: 10px; border-left: 2px solid var(--gold); color: #6f6659; font-size: 12px; line-height: 1.6; max-height: 72px; overflow: auto; }
.composer textarea, .submit-box textarea { width: 100%; resize: vertical; outline: 0; }
.composer textarea { padding: 10px; color: var(--ink); background: #fffdf8; border: 1px solid #d4c8b4; }
.small-primary { width: 100%; margin-top: 8px; padding: 9px; color: white; background: #27312f; border: 0; }.small-primary:hover { background: var(--cinnabar); }
.feedback-empty { padding: 52px 24px; text-align: center; color: #657371; }.feedback-empty span { color: var(--gold); font-size: 28px; }.feedback-empty p { font-size: 12px; line-height: 1.7; }
.feedback-list { display: grid; gap: 10px; margin: 14px 0 24px; }
.feedback-card { padding: 12px; background: #172022; border: 1px solid #293739; border-left: 2px solid var(--gold); }
.feedback-card.edited { border-left-color: var(--sky); }.feedback-card.inserted { border-left-color: #7fa47b; }.feedback-card.deleted { border-left-color: #a55a50; }.feedback-card.comment { border-left-color: var(--cinnabar-bright); }
.feedback-card header { display: flex; justify-content: space-between; gap: 10px; color: #7f8d8b; font-size: 10px; }.feedback-card button { color: #6f7c7b; background: transparent; border: 0; }.feedback-card button:hover { color: #e4776c; }
.feedback-card blockquote { margin: 8px 0; color: #bfc3bd; font-size: 11px; line-height: 1.55; }.feedback-card p { margin: 8px 0 0; color: #ece7db; font-size: 12px; line-height: 1.55; }
.diff-before { color: #8d7774; text-decoration: line-through; }.diff-after { color: #bcd9db; }
.submit-box { position: sticky; bottom: -24px; margin: 18px -20px -24px; padding: 18px 20px 24px; background: linear-gradient(transparent, #12191b 14px, #12191b); }
.submit-box label { display: block; margin-bottom: 7px; color: #73817f; font-size: 10px; letter-spacing: .15em; }.submit-box textarea { padding: 10px; color: #e7e3d9; background: #0d1315; border: 1px solid #2b383a; }.submit-box textarea:focus { border-color: #627c7f; }
.submit-button { width: 100%; margin-top: 10px; padding: 13px 14px; display: flex; justify-content: space-between; align-items: center; color: #f4ebdc; background: var(--cinnabar); border: 0; letter-spacing: .08em; }.submit-button:hover { background: #a53b36; }.submit-button:disabled { cursor: not-allowed; opacity: .5; }.submit-button b { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.3); font-family: "Kaiti SC", "STKaiti", serif; font-weight: 400; }
.submit-hint { margin: 8px 0 0; color: #5f6c6b; font-size: 10px; line-height: 1.5; }.download-link { display: block; margin-top: 10px; padding: 10px; text-align: center; color: var(--sky); border: 1px solid #365055; text-decoration: none; font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 60; transform: translate(-50%, 20px); padding: 10px 16px; color: #f2ecdf; background: #202927; border: 1px solid #415154; box-shadow: 0 16px 40px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; font-size: 12px; }.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes pulse { 50% { opacity: .35; } }
@keyframes media-skeleton { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (max-width: 1380px) {
  .document-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .document-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .era-card { grid-template-columns: 1fr; }.era-card-visual { min-height: 280px; height: 280px; }
  .review-layout { grid-template-columns: 1fr 330px; }.chapter-rail { display: none; }
}
@media (max-width: 820px) {
  .era-shell, .library-shell { width: min(100% - 28px, 640px); padding-top: 34px; }.era-hero { align-items: flex-start; }.era-seal { display: none; }.era-grid { grid-template-columns: 1fr; }.library-hero { align-items: start; }.library-stat { min-width: 90px; }.library-toolbar { display: grid; }.library-toolbar input { width: 100%; }.document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.portrait-montage { height: 250px; }
  .topbar { padding: 0 14px; }.save-status, .collaboration-status { display: none; }
  .review-layout { display: block; }.manuscript { padding: 46px 22px 70px; }.feedback-rail { position: relative; top: auto; height: auto; border-left: 0; border-top: 1px solid #273236; }.manuscript-head h1 { font-size: 38px; }.folio-stamp { width: 58px; flex-basis: 58px; height: 58px; }.copy-block, .insert-slot { grid-template-columns: 38px minmax(0, 1fr) 62px; gap: 7px; }.copy-text { font-size: 15px; }.sentence-tools { opacity: 1; }.insert-slot::after { left: 38px; }.submit-box { bottom: 0; }
}
@media (max-width: 540px) {
  .document-grid { grid-template-columns: 1fr; }.portrait-montage { height: 380px; }.library-filters button { flex: 1 1 calc(50% - 6px); }.library-stat { display: none; }.brand small, .top-status .role-chip { display: none; }
}
