:root {
  color-scheme: light;
  --paper: #fffef9;
  --ink: #18211d;
  --muted: #69736e;
  --line: #d9ddd6;
  --line-strong: #bbc5bb;
  --forest: #315f4e;
  --forest-deep: #173f36;
  --forest-soft: #e7efea;
  --cream: #f0e7cf;
  --gold: #a9823e;
  --seal: #9d3127;
  --error: #a94338;
  --soft: #f3f3ee;
  --shadow: 0 22px 60px rgba(21, 46, 36, 0.12);
}

* { box-sizing: border-box; }
html { height: 100%; overflow: hidden; }
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, summary { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid rgba(49, 95, 78, 0.2);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }

.loading-screen { display: grid; height: 100dvh; overflow-y: auto; place-items: center; background: #f5f3eb; }
.loading-screen img { width: 54px; height: 72px; object-fit: contain; }
.login-layout { display: grid; height: 100dvh; min-width: 0; overflow-y: auto; grid-template-columns: minmax(300px, 42fr) minmax(420px, 58fr); }
.brand-panel { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 64px; background: linear-gradient(145deg, #326653 0%, #225344 46%, #194639 100%); color: white; }
.brand-panel::before { position: absolute; z-index: 0; top: -2%; left: -8%; width: 116%; height: 70%; background: url("/botanical-wall-shadow.jpg") center top / cover no-repeat; content: ""; filter: invert(1) sepia(.72) saturate(.72) brightness(1.05) contrast(1.08); mix-blend-mode: screen; opacity: .17; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 96%); mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 96%); }
:root[data-solar-phase="day"] .brand-panel::before { filter: sepia(.18) saturate(.7) hue-rotate(92deg) brightness(.44) contrast(1.18); mix-blend-mode: multiply; opacity: .3; }
.brand-panel::after { position: absolute; z-index: 2; inset: 0; background-image: repeating-linear-gradient(94deg, rgba(255,255,255,.018) 0, rgba(255,255,255,.018) 1px, transparent 1px, transparent 8px); content: ""; pointer-events: none; }
.brand-mark { position: relative; z-index: 3; width: 66px; height: 72px; overflow: hidden; border: 0; border-radius: 56% 44% 48% 52% / 45% 54% 46% 55%; background: var(--seal) url("/muhe-wax-texture.jpg") center / 175% no-repeat; background-blend-mode: multiply; box-shadow: inset 7px 8px 13px rgba(255,219,194,.18), inset -8px -10px 14px rgba(74,10,10,.36), 4px 8px 12px rgba(4,24,18,.2), -2px -2px 5px rgba(255,234,211,.16); transform: rotate(-4deg); }
.brand-mark::before { position: absolute; z-index: 0; inset: 0; border-radius: inherit; background: radial-gradient(ellipse at 30% 22%, rgba(255,237,220,.14), transparent 42%), radial-gradient(ellipse at 70% 78%, rgba(63,6,9,.26), transparent 56%); content: ""; opacity: .58; }
.brand-mark img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1) drop-shadow(1px 2px 1px rgba(70,9,10,.56)) drop-shadow(-.6px -.7px 0 rgba(255,228,207,.38)); transform: rotate(4deg) scale(.88); }
.brand-scene { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; pointer-events: none; }
.brand-window { position: relative; width: min(54%, 360px); aspect-ratio: 3 / 4; margin: 0; border: 1px solid rgba(240,231,207,.42); border-radius: 3px; background: #315446; padding: 10px; box-shadow: 0 24px 52px rgba(5,23,18,.2), inset 0 0 0 4px rgba(240,231,207,.1), 0 0 58px rgba(240,231,207,.1); }
.brand-window::before { position: absolute; inset: -8px; border: 1px solid rgba(240,231,207,.13); content: ""; }
.brand-window::after { position: absolute; right: -14px; bottom: -12px; left: -14px; height: 10px; border-top: 1px solid rgba(240,231,207,.38); background: rgba(8,39,31,.78); content: ""; box-shadow: 0 8px 18px rgba(3,18,14,.22); }
.brand-window video { display: block; width: 100%; height: 100%; border: 1px solid rgba(255,255,255,.12); object-fit: cover; filter: saturate(.88) contrast(1.03) brightness(.92); }
.brand-name { position: relative; z-index: 3; width: min(100%, 480px); margin: 0; line-height: 0; }
.brand-name img { display: block; width: 100%; height: auto; opacity: .96; filter: drop-shadow(0 3px 10px rgba(2,24,18,.2)); }
.login-region { display: grid; width: 100%; min-width: 0; min-height: 100vh; place-items: center; padding: 40px; background-color: #f5f3eb; background-image: repeating-linear-gradient(0deg, rgba(23,63,54,.018) 0, rgba(23,63,54,.018) 1px, transparent 1px, transparent 7px), repeating-linear-gradient(90deg, rgba(169,130,62,.014) 0, rgba(169,130,62,.014) 1px, transparent 1px, transparent 11px); }
.auth-form { width: 100%; max-width: 420px; min-width: 0; padding: 38px; border: 1px solid #d5d8d0; border-radius: 6px; background: var(--paper); box-shadow: 0 24px 64px rgba(35,55,45,.11); }
.form-heading { margin-bottom: 32px; }
.form-heading h1 { margin: 0; font-size: 27px; line-height: 1.3; }
.form-heading p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.auth-form > label { display: block; margin: 18px 0 8px; color: var(--muted); font-size: 14px; font-weight: 650; }
.auth-form input { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); padding: 0 13px; }
.password-input { position: relative; display: block; min-width: 0; }
.password-input input { padding-right: 48px !important; }
.password-toggle { position: absolute; top: 50%; right: 4px; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--muted); padding: 0; transform: translateY(-50%); }
.password-toggle:hover { background: var(--soft); color: var(--forest-deep); }
.password-eye { position: relative; display: block; width: 17px; height: 17px; border: 1.6px solid currentColor; border-radius: 72% 28% 72% 28%; transform: rotate(45deg); }
.password-eye::before { position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; transform: translate(-50%, -50%); }
.password-toggle.is-visible .password-eye::after { position: absolute; top: 7px; left: -3px; width: 21px; height: 1.5px; background: currentColor; box-shadow: 0 0 0 2px white; content: ""; transform: rotate(-45deg); }
.auth-secondary-action { display: block; margin: 10px auto 0; color: var(--forest-deep); font-weight: 650; text-decoration: underline; text-decoration-color: rgba(23, 63, 54, .3); text-underline-offset: 3px; }
.field-note { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.permission-role-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: end; padding: 12px; border: 1px solid #cad7d0; background: #f4f7f5; }
.permission-role-field[hidden] { display: none; }
.permission-role-field p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.form-message, .dialog-message, .workspace-message { min-height: 20px; margin: 12px 0 8px; color: var(--error); font-size: 13px; }

.primary-button, .secondary-button, .text-button, .privacy-button, .account-button, .brand-button, .close-button, .text-link {
  border-radius: 6px; font-size: 14px; font-weight: 650;
}
.primary-button, .secondary-button { min-height: 40px; padding: 0 16px; }
.primary-button { border: 1px solid var(--forest); background: var(--forest); color: white; }
.primary-button:hover { border-color: var(--forest-deep); background: var(--forest-deep); }
.primary-button:disabled { cursor: not-allowed; border-color: var(--line-strong); background: #aeb9b3; color: white; }
.secondary-button { border: 1px solid var(--line-strong); background: #fbfdfc; color: var(--ink); }
.secondary-button:hover { border-color: var(--line-strong); background: var(--soft); }
.danger-button { min-height: 40px; border: 1px solid var(--error); border-radius: 6px; background: var(--error); color: white; padding: 0 16px; font-size: 14px; font-weight: 700; }
.danger-button:hover { background: #8f3028; }
.compact-button { min-height: 34px; padding: 0 12px; font-size: 13px; }
.full-button { width: 100%; height: 46px; }
.text-button, .privacy-button { border: 0; background: transparent; color: var(--forest); padding: 6px 2px; }
.text-link { color: var(--forest); padding: 6px 2px; text-decoration: none; }
.privacy-button { color: var(--gold); font-size: 12px; }
.locked-label { color: #929995; font-size: 12px; }
.close-button { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 0; background: transparent; color: var(--muted); font-size: 24px; font-weight: 400; }
.close-button:hover { background: var(--soft); }
.close-button.inverse { color: white; }
.close-button.inverse:hover { background: rgba(255,255,255,.12); }

.workspace-shell { height: 100dvh; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; background-color: var(--soft); background-image: repeating-linear-gradient(0deg, rgba(23,63,54,.014) 0, rgba(23,63,54,.014) 1px, transparent 1px, transparent 8px); -webkit-overflow-scrolling: touch; }
.workspace-header { position: sticky; top: 0; z-index: 20; display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: rgba(255,254,249,.96); padding: 0 48px; backdrop-filter: blur(10px); }
.brand-button { display: flex; align-items: center; gap: 11px; border: 0; background: transparent; color: var(--ink); padding: 0; font-weight: 750; }
.workspace-brand-mark { display: grid; width: 35px; height: 38px; overflow: hidden; place-items: center; border: 0; border-radius: 56% 44% 48% 52% / 45% 54% 46% 55%; background: var(--seal) url("/muhe-wax-texture.jpg") center / 175% no-repeat; padding: 4px 3px; box-shadow: inset 3px 4px 7px rgba(255,219,194,.14), inset -4px -5px 8px rgba(74,10,10,.32), 2px 4px 6px rgba(4,24,18,.16); transform: rotate(-3deg); }
.workspace-brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); }
.account-area { display: flex; align-items: center; gap: 10px; }
.account-button { display: flex; align-items: center; gap: 9px; border: 1px solid transparent; background: transparent; color: var(--ink); padding: 5px 8px 5px 5px; }
.account-button:hover { background: var(--soft); }
.account-avatar, .avatar-preview { position: relative; display: grid; flex: 0 0 auto; place-items: center; overflow: hidden; border: 1px solid #a9bdb4; border-radius: 50%; background: var(--forest-soft); color: var(--forest-deep); font-family: "Songti SC", "STSong", serif; font-weight: 750; }
.account-avatar { width: 34px; height: 34px; font-size: 14px; }
.account-avatar img, .avatar-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-avatar .default-avatar-image, .avatar-preview .default-avatar-image { inset: 16%; width: 68%; height: 68%; object-fit: contain; }
.account-copy { display: grid; gap: 1px; text-align: left; }
.account-button #role-label { color: var(--gold); font-size: 12px; font-weight: 600; }
.workspace-main { width: min(calc(100% - 40px), 1240px); margin: 0 auto; padding: 44px 0 80px; }
.workspace-title-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.workspace-title-row h1 { margin: 0; font-size: 28px; line-height: 1.25; }
.workspace-title-row p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.workspace-message { margin: 0; }

.member-insights { border: 1px solid var(--line); background: white; }
.member-insights-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); padding: 24px 28px 20px; }
.member-insights-head h1 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 25px; }
.member-insights-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.member-insights-tools { display: flex; align-items: center; gap: 6px; }
.member-insights-tools button { min-height: 34px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--muted); padding: 0 11px; font-size: 12px; font-weight: 650; }
.member-insights-tools button.active { border-color: #8ea99b; background: var(--forest-soft); color: var(--forest-deep); box-shadow: inset 0 -2px 0 var(--forest); }
.member-section { border-bottom: 1px solid var(--line); padding: 22px 28px 26px; }
.member-section:last-child { border-bottom: 0; }
.member-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.member-section h2 { margin: 0; font-size: 16px; }
.member-section header p { margin: 0; color: var(--muted); font-size: 11px; }
.member-table-scroll { max-width: 100%; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.member-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.member-table th, .member-table td { border-bottom: 1px solid #e5e9e5; padding: 11px 10px; text-align: left; font-size: 12px; vertical-align: middle; }
.member-table th { color: var(--muted); background: #f8faf8; font-size: 10px; font-weight: 700; }
.member-table tbody tr:hover { background: #fbfcfb; }
.member-cell { display: flex; min-width: 220px; align-items: center; gap: 10px; }
.member-cell-avatar { position: relative; display: grid; width: 34px; height: 34px; flex: 0 0 auto; overflow: hidden; place-items: center; border: 1px solid #a9bdb4; border-radius: 50%; background: var(--forest-soft); }
.member-cell-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-cell-avatar img.default-avatar-image { width: 68%; height: 68%; object-fit: contain; }
.member-cell-copy { display: grid; min-width: 0; gap: 2px; }
.member-cell-copy strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.member-cell-copy small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.member-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.member-status::before { width: 7px; height: 7px; border-radius: 50%; background: #78817d; content: ""; }
.member-status.is-online, .member-status.is-active { color: #315f4e; }
.member-status.is-online::before, .member-status.is-active::before { background: #3f7b5b; }
.member-status.is-disabled { color: var(--error); }
.member-status.is-disabled::before { background: var(--error); }
.member-role-coordinator { color: var(--gold); font-weight: 700; }
.member-role-superadmin { color: var(--seal); font-weight: 700; }
.member-table-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.member-table-actions button { border: 0; background: transparent; color: var(--forest); padding: 6px 0; font-size: 12px; font-weight: 700; }
.member-table-actions button[data-member-active="false"] { color: var(--error); }
.member-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.member-metrics div { min-width: 0; border-right: 1px solid var(--line); padding: 14px 16px; }
.member-metrics div:last-child { border-right: 0; }
.member-metrics dt { color: var(--muted); font-size: 10px; }
.member-metrics dd { overflow: hidden; margin: 5px 0 0; color: var(--forest-deep); font-size: 20px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.usage-rankings { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.usage-figure { min-width: 0; margin: 0; padding: 20px 22px 24px; }
.usage-figure + .usage-figure { border-left: 1px solid var(--line); }
.usage-figure figcaption { margin-bottom: 15px; font-size: 14px; font-weight: 750; }
.usage-ranking { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.usage-ranking li { display: grid; grid-template-columns: minmax(86px, .7fr) minmax(120px, 1.4fr) auto; align-items: center; gap: 10px; min-width: 0; }
.usage-ranking strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.usage-bar { height: 8px; overflow: hidden; border-radius: 2px; background: #edf1ed; }
.usage-bar::before { display: block; width: 0; height: 100%; background: var(--forest); content: ""; }
.usage-bar[data-level="1"]::before { width: 10%; }
.usage-bar[data-level="2"]::before { width: 20%; }
.usage-bar[data-level="3"]::before { width: 30%; }
.usage-bar[data-level="4"]::before { width: 40%; }
.usage-bar[data-level="5"]::before { width: 50%; }
.usage-bar[data-level="6"]::before { width: 60%; }
.usage-bar[data-level="7"]::before { width: 70%; }
.usage-bar[data-level="8"]::before { width: 80%; }
.usage-bar[data-level="9"]::before { width: 90%; }
.usage-bar[data-level="10"]::before { width: 100%; }
.usage-ranking.modules .usage-bar::before { background: var(--gold); }
.usage-ranking span:last-child { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.usage-empty { margin: 18px 0; color: var(--muted); font-size: 12px; text-align: center; }
.hourly-figure { margin: 0; padding: 20px 22px 24px; }
.hourly-figure figcaption { margin-bottom: 14px; font-size: 14px; font-weight: 750; }
.hourly-scroll { max-width: 100%; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.hourly-heat { display: grid; min-width: 890px; grid-template-columns: repeat(24, minmax(30px, 1fr)); gap: 4px; }
.hour-cell { display: grid; min-height: 62px; align-content: space-between; border: 1px solid rgba(169,130,62,.2); border-radius: 3px; background: #fffdf8; padding: 6px 3px; text-align: center; }
.hour-cell[data-level="1"] { background: #faf6e9; }
.hour-cell[data-level="2"] { background: #f7f0dc; }
.hour-cell[data-level="3"] { background: #f3e9cd; }
.hour-cell[data-level="4"] { background: #eee0bc; }
.hour-cell[data-level="5"] { background: #e7d5a7; }
.hour-cell[data-level="6"] { background: #dfc890; }
.hour-cell[data-level="7"] { background: #d4b874; }
.hour-cell[data-level="8"] { background: #c7a357; }
.hour-cell[data-level="9"] { background: #b88e3f; }
.hour-cell[data-level="10"] { background: #a9823e; }
.hour-cell[data-level="8"] strong, .hour-cell[data-level="8"] span,
.hour-cell[data-level="9"] strong, .hour-cell[data-level="9"] span,
.hour-cell[data-level="10"] strong, .hour-cell[data-level="10"] span { color: white; }
.hour-cell strong { color: #6f5728; font-size: 10px; font-variant-numeric: tabular-nums; }
.hour-cell span { color: var(--muted); font-size: 9px; }
.member-detail-modules { border-top: 1px solid var(--line); }
.member-detail-row { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; gap: 16px; border-bottom: 1px solid var(--line); padding: 12px 2px; font-size: 12px; }
.member-detail-row span { color: var(--muted); }
.member-access-copy { margin: 0; border-left: 3px solid var(--error); background: #fff7f5; padding: 12px 14px; color: #71332d; font-size: 13px; line-height: 1.65; }

.project-group + .project-group { margin-top: 48px; }
.group-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; border-bottom: 1px solid var(--line-strong); padding-bottom: 10px; }
.group-heading h2 { margin: 0; font-size: 17px; }
.group-heading span { color: var(--muted); font-size: 12px; }
.book-type-group + .book-type-group { margin-top: 28px; }
.book-type-group > h3 { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.project-panel { border: 1px solid var(--line); border-radius: 8px; background: white; overflow: hidden; }
.project-panel + .project-panel { margin-top: 10px; }
.project-panel > summary { display: grid; min-height: 78px; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; background: #fbfdfc; list-style: none; }
.project-panel > summary::-webkit-details-marker { display: none; }
.project-panel > summary:hover { background: #fafcfb; }
.disclosure { width: 9px; height: 9px; border-right: 1.5px solid var(--forest); border-bottom: 1.5px solid var(--forest); transform: rotate(-45deg); transition: transform 160ms ease; }
.project-panel[open] .disclosure { transform: rotate(45deg) translate(-2px,-2px); }
.project-identity { display: grid; min-width: 0; gap: 5px; }
.project-identity strong { overflow: hidden; color: var(--ink); font-family: "Songti SC", "STSong", serif; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.project-identity small { overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.project-meta { color: var(--gold); font-size: 12px; font-weight: 650; }
.project-detail { border-top: 1px solid var(--line); }
.loading-row, .inline-error { margin: 0; padding: 28px; color: var(--muted); font-size: 14px; }
.inline-error { color: var(--error); }
.project-toolbar { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding: 0 18px; }
.module-tabs { display: flex; min-width: 0; align-self: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.module-tabs button { flex: 0 0 auto; align-self: center; min-height: 34px; border: 1px solid transparent; border-radius: 5px; background: #f7faf8; color: var(--muted); padding: 0 12px; font-size: 13px; font-weight: 650; }
.module-tabs button:hover { color: var(--forest); }
.module-tabs button.active { border-color: #9fb7ac; background: var(--forest-soft); color: var(--forest-deep); box-shadow: inset 0 -2px 0 var(--forest); }
.admin-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.status-select { height: 34px; border: 1px solid #9fb7ac; border-radius: 6px; background: #f4f8f6; padding: 0 8px; color: var(--ink); font-size: 13px; font-weight: 650; }
.module-content { min-height: 240px; }

.project-overview { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding: 30px 28px 24px; }
.project-overview h3 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 25px; }
.project-overview p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.project-counts { display: flex; margin: 0; }
.project-counts div { min-width: 88px; border-left: 1px solid var(--line); padding-left: 18px; }
.project-counts dt { color: var(--muted); font-size: 11px; }
.project-counts dd { margin: 5px 0 0; color: var(--forest-deep); font-size: 21px; font-weight: 750; }
.review-summary { padding: 0 28px 30px; }
.review-summary-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding: 24px 0 14px; }
.review-summary-head h3 { margin: 0; font-size: 20px; }
.review-summary-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.feedback-range { display: flex; flex: 0 0 auto; border: 1px solid #9fb7ac; border-radius: 6px; background: #f4f7f5; padding: 3px; }
.feedback-range button { height: 30px; border: 0; border-radius: 4px; background: transparent; color: var(--forest-deep); padding: 0 12px; font-size: 11px; font-weight: 700; }
.feedback-range button.active { background: var(--forest); color: white; }
.feedback-cv-rail { display: flex; align-items: center; gap: 7px; overflow-x: auto; border-bottom: 1px solid var(--line); padding: 13px 0 12px; scrollbar-width: thin; }
.feedback-cv-rail > span { flex: 0 0 auto; color: var(--muted); font-size: 10px; font-weight: 700; }
.feedback-cv-rail button { display: inline-flex; height: 34px; align-items: center; gap: 7px; flex: 0 0 auto; border: 1px solid #c8d4ce; border-radius: 5px; background: white; color: var(--ink); padding: 0 11px; font-size: 11px; font-weight: 700; }
.feedback-cv-rail button:hover { border-color: #89a99a; background: #f5f9f7; }
.feedback-cv-rail button.active { border-color: var(--forest); background: var(--forest); color: white; }
.feedback-cv-rail small { color: var(--muted); font-size: 9px; }
.feedback-cv-rail button.active small { color: #dce9e3; }
.feedback-summary-line { margin: 0; border-bottom: 1px solid var(--line); padding: 17px 0; font-family: "Songti SC", "STSong", serif; font-size: 16px; font-weight: 700; }
.review-issue-form { display: grid; grid-template-columns: 1fr 1fr 1.2fr 86px 1.8fr 1.2fr auto; align-items: end; gap: 8px; border-bottom: 1px solid var(--line); padding: 16px 0; }
.review-issue-form label { display: grid; min-width: 0; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.review-issue-form input, .review-issue-form select { min-width: 0; height: 36px; border: 1px solid #a7bbb2; border-radius: 6px; background: #fbfdfc; color: var(--ink); padding: 0 9px; }
.review-issue-form select:disabled { border-color: var(--line); background: #f2f4f3; color: #969d99; }
.review-form-actions, .review-row-actions { display: flex; align-items: center; gap: 7px; }
.review-row-actions { justify-self: end; }
.feedback-analysis-empty { display: grid; min-height: 130px; place-items: center; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.feedback-matrix-scroll { width: 100%; overflow-x: auto; border-bottom: 1px solid var(--line); }
.feedback-matrix { min-width: 820px; }
.feedback-matrix.all-time { width: max-content; min-width: 100%; }
.feedback-matrix-head, .feedback-matrix-row { display: grid; grid-template-columns: minmax(170px, 1.15fr) minmax(138px, .8fr) minmax(330px, 2.4fr) minmax(125px, .8fr); align-items: center; }
.feedback-matrix.all-time .feedback-matrix-head, .feedback-matrix.all-time .feedback-matrix-row { grid-template-columns: 170px 138px max-content 125px; }
.feedback-matrix-head { min-height: 54px; background: #f5f8f6; color: var(--muted); font-size: 10px; font-weight: 700; }
.feedback-matrix-head > span { padding: 0 10px; }
.feedback-period-heads, .feedback-periods { display: grid; min-width: 0; grid-auto-flow: column; grid-auto-columns: minmax(52px, 1fr); align-items: center; gap: 5px; }
.feedback-matrix.all-time .feedback-period-heads, .feedback-matrix.all-time .feedback-periods { grid-auto-columns: 60px; }
.feedback-period-heads > span { text-align: center; white-space: nowrap; }
.feedback-matrix-group { display: flex; min-height: 36px; align-items: center; gap: 8px; background: #f7f4e9; color: #6f624a; padding: 0 12px; font-size: 11px; }
.feedback-matrix-group span { color: #9b8b70; }
.feedback-matrix-row { width: 100%; min-height: 68px; border: 0; border-top: 1px solid #e8eeea; background: white; color: var(--ink); padding: 0; text-align: left; }
.feedback-matrix-row:hover { background: #f7faf8; }
.feedback-matrix-row.selected { background: #f5f8f1; box-shadow: inset 3px 0 0 var(--gold); }
.feedback-matrix-issue, .feedback-matrix-rank, .feedback-trend { margin: 0 10px; }
.feedback-matrix-issue strong { display: block; font-size: 13px; }
.feedback-matrix-issue small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.feedback-matrix-rank { display: grid; grid-template-columns: minmax(44px, 1fr) auto; align-items: center; gap: 8px; }
.feedback-matrix-rank progress { width: 100%; height: 6px; overflow: hidden; appearance: none; border: 0; border-radius: 5px; background: #e3e9e5; }
.feedback-matrix-rank progress::-webkit-progress-bar { border-radius: inherit; background: #e3e9e5; }
.feedback-matrix-rank progress::-webkit-progress-value { border-radius: inherit; background: var(--forest); }
.feedback-matrix-rank b { font-size: 10px; white-space: nowrap; }
.feedback-period { display: grid; justify-items: center; }
.feedback-period > small { display: none; color: var(--muted); font-size: 8px; white-space: nowrap; }
.feedback-period > b { display: grid; width: 34px; height: 32px; place-items: center; border-radius: 5px; background: #edf2ef; color: #7c8982; font-size: 11px; }
.feedback-period > b.level-1 { background: #d8e7df; color: #285947; }
.feedback-period > b.level-2 { background: #74a991; color: #173f32; }
.feedback-period > b.level-3 { background: var(--forest); color: white; }
.feedback-trend { display: inline-flex; min-height: 28px; align-items: center; justify-content: center; justify-self: center; border-radius: 14px; padding: 0 9px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.feedback-trend.down { background: #e3f0e9; color: #2f745b; }
.feedback-trend.up, .feedback-trend.new { background: #f4e7df; color: #a25e36; }
.feedback-trend.steady { background: #eee9dd; color: #7a663e; }
.feedback-trend.quiet, .feedback-trend.collecting { background: #eef1ef; color: #78847e; }
.feedback-method-note { display: flex; justify-content: space-between; gap: 18px; margin: 0; color: var(--muted); padding: 11px 2px; font-size: 10px; }
.feedback-evidence { border-top: 1px solid var(--line); padding: 20px 0 8px; outline: none; }
.feedback-evidence header { display: flex; justify-content: space-between; gap: 18px; }
.feedback-evidence h4, .feedback-entry h4 { margin: 0; font-size: 16px; }
.feedback-evidence header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.feedback-evidence ul { margin: 10px 0 0; padding: 0; list-style: none; }
.feedback-evidence li { border-top: 1px solid #edf2ef; padding: 9px 0; font-size: 12px; }
.review-evidence-main { display: grid; grid-template-columns: 72px minmax(120px, max-content) minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; }
.review-evidence-meta { margin: 5px 0 0 82px; color: var(--muted); font-size: 10px; }
.review-evidence-meta small { font-size: inherit; }
.feedback-evidence-section { margin-top: 12px; }
.feedback-evidence-section h5 { margin: 0; color: var(--forest-deep); font-size: 11px; }
.feedback-evidence-section.is-discussed { border-top: 1px solid #e8e3d6; margin-top: 16px; }
.feedback-evidence-section.is-discussed summary { cursor: pointer; padding: 10px 0 4px; color: #7a7669; font-size: 11px; font-weight: 700; }
.feedback-evidence-section.is-discussed li.is-discussed { background: #fbfaf6; color: #747871; }
.feedback-evidence-empty { display: block !important; color: var(--muted); font-size: 11px; }
.feedback-evidence q { color: #39443f; quotes: "“" "”"; }
.feedback-evidence-source { width: max-content; max-width: 220px; overflow: hidden; border-radius: 3px; background: var(--forest-soft); color: var(--forest-deep); padding: 3px 7px; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.review-pia-status { color: #7a7669; font-size: 10px; white-space: nowrap; }
.feedback-entry { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.review-episode { color: var(--gold); font-size: 11px; font-weight: 700; white-space: nowrap; }
.review-delete { color: var(--error); }
.reply-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.reply-form textarea { min-width: 0; resize: vertical; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.comment-thread + .comment-thread { border-top: 1px solid var(--line); }
.comment-thread .comment { border-top: 0; }
.comment-replies { margin-left: 18px; border-left: 2px solid #dce7e1; padding-left: 12px; }
.comment-replies .comment-thread { border-top: 0; }
.comment-reply-context { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 7px; margin: 8px 0 0; border-left: 2px solid var(--gold); background: #f7f5ef; padding: 7px 9px; color: var(--muted); font-size: 10px; }
.comment-reply-context span { color: var(--forest-deep); font-weight: 700; white-space: nowrap; }
.comment-reply-context q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-button { position: relative; min-height: 34px; border: 1px solid transparent; border-radius: 5px; background: #f7faf8; color: var(--forest-deep); padding: 0 10px; font-size: 12px; font-weight: 700; }
.notification-button:hover { border-color: #9fb7ac; background: var(--forest-soft); }
.notification-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--error); color: white; padding: 0 4px; font-size: 10px; line-height: 17px; }
.notification-dialog { max-height: min(80vh, 620px); padding: 0; }
.notification-dialog .dialog-header { margin: 0; padding: 24px 24px 18px; }
.notification-list { max-height: min(54vh, 360px); overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0 24px; }
.notification-list.is-empty { max-height: none; overflow: visible; background: #fbfdfc; padding: 0 24px; }
.notification-empty { display: grid; min-height: 104px; place-content: center; justify-items: center; gap: 5px; margin: 0; color: var(--muted); padding: 24px 12px; text-align: center; }
.notification-empty strong { color: var(--ink); font-size: 13px; }
.notification-empty span { font-size: 11px; }
.notification-dialog .dialog-actions { margin: 0; padding: 18px 24px 22px; }
.notification-row { display: grid; width: 100%; gap: 4px; border: 0; border-bottom: 1px solid var(--line); background: white; color: var(--ink); padding: 13px 4px; text-align: left; }
.notification-row:hover { background: #f5f9f6; }
.notification-row strong { font-size: 13px; }
.notification-row span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.notification-row small { color: var(--muted); font-size: 10px; }
.notification-row.unread strong { color: var(--forest-deep); }
.notification-row.unread { border-left: 3px solid var(--gold); padding-left: 9px; }
.role-summary-section { border-bottom: 1px solid var(--line); padding: 22px 28px 18px; }
.role-summary-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.role-summary-header h4 { margin: 0; font-size: 15px; }
.role-summary-header span { color: var(--muted); font-size: 11px; }
.refresh-state { display: flex; min-height: 112px; align-items: center; justify-content: center; gap: 12px; color: var(--muted); padding: 24px; font-size: 13px; }
.refresh-state .secondary-button { display: inline-flex; align-items: center; gap: 3px; }
.coordinator-board { border: 1px solid var(--line); background: white; }
.coordinator-board > header { border-bottom: 1px solid var(--line); background: #f7faf8; padding: 18px 22px; }
.coordinator-board > header h3 { margin: 0; font-size: 18px; }
.coordinator-board > header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.coordinator-board-filters { display: grid; grid-template-columns: minmax(170px, 1.4fr) repeat(4, minmax(108px, .7fr)) auto; gap: 8px; border-bottom: 1px solid var(--line); background: #fbfcfb; padding: 12px 16px; }
.coordinator-board-filters label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.coordinator-board-filters input, .coordinator-board-filters select { width: 100%; height: 34px; border: 1px solid #b9c9c0; border-radius: 5px; background: white; color: var(--ink); padding: 0 9px; font: inherit; font-size: 12px; }
.coordinator-board-filters button { align-self: end; }
.coordinator-board-count { margin: 0; border-bottom: 1px solid var(--line); background: #f8faf9; color: var(--muted); padding: 9px 16px; font-size: 11px; }
.coordinator-board-table { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.coordinator-board-table table { width: 100%; min-width: 860px; border-collapse: collapse; }
.coordinator-board-table th, .coordinator-board-table td { border-bottom: 1px solid var(--line); padding: 11px 13px; text-align: left; font-size: 12px; }
.coordinator-board-table th { color: var(--muted); background: #f5f8f6; font-size: 10px; }
.coordinator-board-table .number { text-align: right; font-variant-numeric: tabular-nums; }
.coordinator-board-table tr[hidden] { display: none; }
.tier-role-groups { border-top: 1px solid var(--line); }
.tier-role-group { border-bottom: 1px solid var(--line); }
.tier-role-group > summary { display: grid; min-height: 58px; grid-template-columns: 36px minmax(120px, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; list-style: none; }
.tier-role-group > summary::-webkit-details-marker { display: none; }
.tier-role-group > summary > strong { font-size: 14px; }
.tier-role-group > summary > span:last-child { color: var(--muted); font-size: 11px; }
.tier-section-name { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 4px; background: var(--forest-soft); color: var(--forest-deep); font-size: 13px; font-weight: 800; }
.tier-role-group[open] .tier-section-name { background: var(--forest); color: white; }
.tier-role-body { border-top: 1px solid var(--line); background: #fbfcfb; padding: 0 14px 12px 46px; }
.cv-role-group { padding: 4px 0; }
.cv-role-group + .cv-role-group { border-top: 1px solid var(--line); }
.cv-role-group > summary { display: grid; min-height: 38px; grid-template-columns: 18px minmax(120px, 1fr) auto; align-items: center; gap: 7px; cursor: pointer; list-style: none; padding: 4px 2px; }
.cv-role-group > summary::-webkit-details-marker { display: none; }
.cv-role-group > summary::before { content: "›"; color: var(--muted); font-size: 18px; line-height: 1; transform-origin: center; transition: transform .15s ease; }
.cv-role-group[open] > summary::before { transform: rotate(90deg); }
.cv-role-group > summary strong { color: var(--forest-deep); font-size: 13px; }
.cv-role-group > summary span { color: var(--gold); font-size: 10px; font-weight: 700; }
.cv-role-group > div { padding-left: 25px; }
.tier-role-item { display: grid; grid-template-columns: minmax(90px, .45fr) minmax(180px, 1.55fr) auto; align-items: baseline; gap: 12px; border-top: 1px solid #e8eeeb; padding: 8px 0; }
.tier-role-item > strong { font-size: 12px; }
.tier-role-item > span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.tier-role-item > small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.tier-counts { display: flex; gap: 8px; }
.tier-count { display: inline-flex; min-width: 42px; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--soft); padding: 5px 8px; color: var(--muted); font-size: 11px; }
.tier-count b { color: var(--forest-deep); font-size: 13px; }
.role-summary-list { border-top: 1px solid var(--line); }
.role-summary-row { display: grid; grid-template-columns: 28px minmax(100px, 1fr) minmax(120px, .8fr) minmax(180px, 1.8fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 9px 0; font-size: 12px; }
.tier-badge { display: inline-grid; width: 24px; height: 24px; place-items: center; border-radius: 4px; background: var(--forest-soft); color: var(--forest-deep); font-size: 11px; font-weight: 750; }
.role-link { justify-self: start; border: 0; background: transparent; color: var(--forest-deep); cursor: pointer; padding: 0; font-size: 13px; font-weight: 700; text-align: left; }
.role-link:hover { text-decoration: underline; }
.role-summary-cv, .role-summary-voice, .role-summary-stats { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.role-name { min-width: 0; overflow: hidden; color: var(--forest-deep); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.personal-board { border-bottom: 1px solid var(--line); }
.personal-board-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 28px 16px; }
.personal-board-heading h4 { margin: 0; font-size: 16px; }
.personal-board-heading span { color: var(--muted); font-size: 11px; }
.personal-block-nav { display: flex; min-width: 0; align-items: center; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbfcfb; padding: 9px 16px; }
.personal-block-nav > span { flex: 0 0 auto; color: var(--muted); font-size: 10px; font-weight: 700; }
.personal-block-nav > div { display: flex; min-width: 0; gap: 6px; overflow-x: auto; padding: 1px 0 3px; scrollbar-width: thin; }
.personal-block-nav button { min-height: 30px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--muted); padding: 0 11px; font-size: 11px; font-weight: 650; }
.personal-block-nav button:hover { border-color: #a8bdb2; color: var(--forest-deep); }
.personal-block-nav button.active { border-color: #8ea99b; background: var(--forest-soft); color: var(--forest-deep); box-shadow: inset 0 -2px 0 var(--forest); }
.personal-board-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
.personal-role-list { min-width: 0; border-right: 1px solid var(--line); background: #fbfcfb; }
.personal-role-list > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 15px 16px 11px; }
.personal-role-list h5, .personal-relations h5 { margin: 0; font-size: 13px; }
.personal-role-list header span { color: var(--muted); font-size: 10px; }
.personal-role-list > div { padding: 6px; }
.personal-role-list button { display: flex; width: 100%; min-width: 0; align-items: center; gap: 9px; border: 1px solid transparent; border-radius: 5px; background: transparent; padding: 9px 8px; text-align: left; }
.personal-role-list button:hover { background: #f1f6f3; }
.personal-role-list button.active { border-color: #a8bdb2; background: var(--forest-soft); }
.personal-role-list button > span:last-child { display: grid; min-width: 0; gap: 3px; }
.personal-role-list button strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.personal-role-list button small { color: var(--muted); font-size: 10px; }
.personal-role-card { min-width: 0; padding: 24px 26px 28px; }
.personal-role-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 17px; }
.personal-role-card > header > div:first-child { display: flex; min-width: 0; align-items: flex-start; gap: 11px; }
.personal-role-card > header h4 { overflow-wrap: anywhere; margin: 0; color: var(--forest-deep); font-family: "Songti SC", "STSong", serif; font-size: 24px; line-height: 1.2; }
.personal-role-card > header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.personal-role-card > header dl { display: flex; flex: 0 0 auto; gap: 16px; margin: 0; }
.personal-role-card > header dt { color: var(--muted); font-size: 10px; }
.personal-role-card > header dd { margin: 4px 0 0; color: var(--forest-deep); font-size: 16px; font-weight: 750; }
.block-role-note { margin-top: 16px; border-left: 3px solid var(--gold); background: #fcfaf2; padding: 10px 12px; }
.block-role-note strong { color: var(--gold); font-size: 11px; }
.block-role-note p { margin: 5px 0 0; color: #5a5140; font-size: 12px; line-height: 1.7; }
.personal-role-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin: 14px 0 0; }
.personal-role-fields div { min-width: 0; border-bottom: 1px solid var(--line); padding: 11px 0; }
.personal-role-fields .wide { grid-column: 1 / -1; }
.personal-role-fields dt { color: var(--muted); font-size: 10px; }
.personal-role-fields dd { overflow-wrap: anywhere; margin: 5px 0 0; color: var(--ink); font-size: 12px; line-height: 1.65; }
.personal-relations { grid-column: 2 / -1; min-width: 0; border-top: 1px solid var(--line); padding: 20px 26px 28px; }
.personal-relations > header { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.personal-relations > header span { color: var(--muted); font-size: 11px; }
.relation-map { display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: start; gap: 20px; margin-top: 14px; }
.relation-center { display: grid; min-height: 88px; place-content: center; justify-items: center; gap: 4px; border: 1px solid #a8bdb2; border-radius: 5px; background: var(--forest-soft); text-align: center; }
.relation-center span { color: var(--gold); font-size: 10px; font-weight: 700; }
.relation-center strong { color: var(--forest-deep); font-family: "Songti SC", "STSong", serif; font-size: 17px; }
.relation-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.relation-node { min-width: 0; border: 1px solid var(--line); border-radius: 5px; background: white; padding: 11px 12px; }
.relation-node header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.relation-node strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.relation-node header span { flex: 0 0 auto; color: var(--gold); font-size: 10px; }
.relation-node p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.personal-board-empty { grid-column: 2 / -1; padding: 46px 28px; color: var(--muted); text-align: center; }
.home-primary-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .55fr); align-items: start; border-bottom: 1px solid var(--line); }
.home-relation-graph-section { border-bottom: 1px solid var(--line); padding: 0 28px 24px; }
.home-relation-graph-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; padding: 22px 0 14px; }
.home-relation-graph-section > summary::-webkit-details-marker { display: none; }
.home-relation-graph-section > summary h4 { margin: 0; font-size: 15px; }
.home-relation-graph-section > summary span { color: var(--muted); font-size: 11px; }
.relation-toggle-label { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; color: var(--forest-deep)!important; background: var(--forest-soft); font-size: 11px!important; }
.relation-toggle-closed { display: none; }
.home-relation-graph-section:not([open]) .relation-toggle-open { display: none; }
.home-relation-graph-section:not([open]) .relation-toggle-closed { display: inline; }
.home-relation-graph-body { display: grid; gap: 12px; }
.home-relation-graph-actions { display: flex; justify-content: flex-end; }
.home-relation-graph { display: grid; gap: 14px; }
.relation-snapshot-thumb { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfb; }
.relation-snapshot-frame { display: block; width: 100%; height: 360px; border: 0; background: #fbfcfb; }
.relation-dialog-content .relation-snapshot-frame { height: calc(84vh - 110px); min-height: 520px; }
.relation-graph-visual { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(180deg, #fff, #fbfcfb); padding: 10px; }
.relation-graph-svg { display: block; width: 100%; min-width: 680px; height: auto; }
.relation-graph-edge { fill: none; stroke-width: 2.1; opacity: .62; }
.relation-graph-edge-dot { opacity: .8; }
.relation-graph-zone rect { fill: #fbfcfb; stroke: #d7e0db; stroke-dasharray: 5 4; }
.relation-graph-zone text { fill: var(--muted); font-size: 11px; font-weight: 750; }
.relation-graph-node rect { fill: #f4f8f6; stroke: #8ea99d; stroke-width: 1.2; }
.relation-graph-node:nth-child(3n + 1) rect { fill: #fbf4e6; stroke: #c69b58; }
.relation-graph-node:nth-child(3n + 2) rect { fill: #f6edf0; stroke: #bf8f9d; }
.relation-graph-node-name { fill: var(--ink); font-size: 12px; font-weight: 750; }
.relation-graph-node-meta { fill: var(--muted); font-size: 10px; }
.relation-graph-list { border-top: 1px solid var(--line); padding-top: 12px; }
.relation-graph-list > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.relation-graph-list > header strong { font-size: 13px; }
.relation-graph-list > header span { color: var(--muted); font-size: 11px; }
.relation-graph-table-wrap { overflow-x: auto; }
.relation-graph-table { width: 100%; min-width: 620px; border-collapse: collapse; background: #fff; }
.relation-graph-table th, .relation-graph-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; font-size: 11px; vertical-align: top; }
.relation-graph-table th { color: var(--muted); background: #f7faf8; font-size: 10px; font-weight: 700; }
.relation-dialog { width: min(1100px, calc(100vw - 32px)); height: min(84vh, 780px); padding: 0; }
.relation-dialog-content { overflow: auto; height: calc(100% - 62px); padding: 24px 28px 32px; }
.relation-dialog-content .home-relation-graph { gap: 24px; }
.relation-dialog-content .relation-graph-svg { min-width: 920px; }
.relation-dialog-content .relation-graph-list-row { padding: 10px 12px; }
.personal-narration-card { margin: 0 26px 14px; border: 1px solid #cbd9d1; border-radius: 7px; background: #f6faf7; padding: 13px 15px; }
.personal-narration-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.personal-narration-card header strong { color: var(--forest-deep); font-size: 13px; }
.personal-narration-card header span { color: var(--muted); font-size: 11px; }
.personal-narration-card dl { display: flex; gap: 28px; margin: 10px 0 0; }
.personal-narration-card dt { color: var(--muted); font-size: 10px; }
.personal-narration-card dd { margin: 3px 0 0; color: var(--forest-deep); font-size: 16px; font-weight: 750; }
.home-role-column, .home-comments-column { min-width: 0; }
.home-comments-column { border-left: 1px solid var(--line); }
.home-comments-column .comments-section { position: sticky; top: 0; max-height: min(78vh, 860px); overflow-y: auto; }
.home-primary-grid .role-summary-section, .home-primary-grid .personal-board { border-bottom: 0; }
.home-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-bottom: 1px solid var(--line); }
.open-section { min-width: 0; padding: 26px 28px; }
.open-section + .open-section { border-left: 1px solid var(--line); }
.open-section > header, .comments-section > header, .module-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.open-section h4, .comments-section h4, .pia-resources h4 { margin: 0; font-size: 15px; }
.open-section header span, .comments-section header span { color: var(--muted); font-size: 11px; }
.resource-row { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; margin: 0 -8px; border-top: 1px solid var(--line); border-radius: 5px; padding: 10px 8px; }
.resource-row:hover { background: #f4f8f6; }
.resource-row > div:first-child { display: grid; min-width: 0; gap: 4px; }
.resource-row strong { overflow-wrap: anywhere; font-size: 13px; }
.resource-row small { color: var(--muted); font-size: 11px; }
.resource-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.empty-inline { margin: 18px 0 0; color: var(--muted); font-size: 13px; }

.comments-section { padding: 26px 28px 30px; }
.comment-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.comment-form textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; color: var(--ink); line-height: 1.5; }
.comment-list { margin-top: 18px; }
.comment { border-top: 1px solid var(--line); padding: 14px 0; }
.comment header { display: flex; align-items: baseline; gap: 10px; }
.comment header strong { font-size: 13px; }
.comment header span { color: var(--gold); font-size: 11px; }
.comment time { margin-left: auto; color: var(--muted); font-size: 10px; }
.comment p { margin: 7px 0 0; color: #39443f; font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
.comment-actions { display: flex; gap: 12px; margin-top: 4px; }
.comment-actions .danger-button { color: var(--error); }
.comment.is-deleted { border: 1px dashed #c8cec8; background: #f6f6f2; padding: 13px 14px; }
.comment.is-deleted + .comment { border-top: 0; }
.comment.is-deleted > p:not(.comment-deleted-note) { color: #58605c; }
.comment-deleted-note { color: var(--error) !important; font-size: 10px !important; font-weight: 650; }

.module-section { padding: 28px; }
.sync-module { min-width: 0; padding: 28px; }
.sync-module > header { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.sync-module h3, .sync-module h4 { margin: 0; }
.sync-module > header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.sync-status { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; color: var(--muted); font-size: 11px; }
.sync-status-ok { border-color: #9dbcae; background: #f2f8f3; color: var(--forest-deep); }
.sync-status-review_required { border-color: #dcc88f; background: #fffbef; color: #78612d; }
.sync-status-error { border-color: #d6aaa5; background: #fff6f4; color: var(--error); }
.sync-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 18px 0; border: 1px solid var(--line); }
.analytics-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sync-metrics > div { min-width: 0; border-right: 1px solid var(--line); padding: 14px 16px; }
.sync-metrics > div:last-child { border-right: 0; }
.sync-metrics span { display: block; color: var(--muted); font-size: 11px; }
.sync-metrics strong { display: block; overflow: hidden; margin-top: 5px; color: var(--forest-deep); font-size: 22px; text-overflow: ellipsis; white-space: nowrap; }
.sync-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); }
.sync-table-wrap table { min-width: 620px; width: 100%; border-collapse: collapse; }
.sync-table-wrap th, .sync-table-wrap td { border-bottom: 1px solid var(--line); padding: 11px 13px; text-align: left; font-size: 12px; }
.sync-table-wrap th { color: var(--muted); background: #fbfcfb; font-size: 11px; }
.sync-chart { margin-top: 20px; border: 1px solid var(--line); padding: 16px; }
.sync-chart header { margin-bottom: 14px; }.sync-chart h4, .sync-distributions h4 { font-size: 13px; }
.sync-bars { display: flex; min-height: 156px; align-items: end; gap: 7px; overflow-x: auto; }
.sync-bars > div { display: grid; flex: 0 0 42px; height: 156px; grid-template-rows: auto 1fr auto; align-items: end; gap: 5px; text-align: center; }
.sync-bars span, .sync-bars small { color: var(--muted); font-size: 10px; }.sync-bars i { display: block; width: 100%; min-height: 2px; background: var(--forest); }
.sync-distributions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }.sync-distributions section { min-width: 0; border: 1px solid var(--line); padding: 16px; }
.sync-distribution-row { display: grid; grid-template-columns: 74px minmax(40px, 1fr) 34px; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; }.sync-distribution-row i { display: block; height: 7px; background: #e8eeea; }.sync-distribution-row b { display: block; height: 100%; min-width: 2px; background: var(--gold); }.sync-distribution-row strong { text-align: right; color: var(--muted); font-size: 11px; }
.sync-config-form { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 10px; }.sync-config-form label, .sync-device-form > label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }.sync-config-form input, .sync-device-form input { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; padding: 0 10px; color: var(--ink); }.sync-config-form small { min-height: 16px; color: var(--muted); font-size: 10px; }.sync-config-form small[data-state="recognized"] { color: var(--forest-deep); font-weight: 650; }.sync-config-form small[data-state="unknown"] { color: var(--error); }
.sync-helper-state { margin: 12px 0 0; border-left: 3px solid var(--line-strong); background: #f7f9f7; padding: 8px 10px; color: var(--muted); font-size: 11px; }.sync-helper-state[data-state="ready"] { border-left-color: #84a794; color: var(--forest-deep); }.sync-helper-state[data-state="offline"] { border-left-color: #c99c8f; color: var(--error); }
.sync-source-list { display: grid; gap: 8px; margin-top: 12px; }.sync-source-row { display: grid; min-width: 0; gap: 9px; border: 1px solid var(--line); padding: 12px; }.sync-source-main { display: flex; align-items: center; justify-content: space-between; gap: 18px; }.sync-source-main > div { display: grid; min-width: 0; gap: 3px; }.sync-source-main > div:last-child { justify-items: end; }.sync-source-row strong { font-size: 13px; }.sync-source-row span:not(.sync-status), .sync-source-row small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.sync-source-actions { display: flex; flex-wrap: wrap; gap: 7px; }.sync-local-status { margin: 0; border-left: 2px solid #a7b9b0; background: #f6f8f6; padding: 7px 9px; color: var(--muted); font-size: 11px; line-height: 1.55; }.sync-local-status.is-error { border-left-color: #c56d5f; background: #fff7f5; color: #8e3f34; }.sync-review-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 9px; }.sync-review-row > div { display: flex; gap: 6px; }.sync-review-row span { white-space: normal!important; }.sync-rollback { justify-self: start; }
.sync-device-form { display: grid; grid-template-columns: minmax(200px, .7fr) minmax(320px, 1.3fr) auto; align-items: end; gap: 12px; }.sync-device-scope { display: grid; min-width: 0; gap: 6px; }.sync-device-scope > span { color: var(--muted); font-size: 11px; }.sync-device-scope > div { display: flex; min-height: 38px; align-items: center; flex-wrap: wrap; gap: 6px; border: 1px solid var(--line); border-radius: 5px; background: #f8faf8; padding: 6px 8px; }.sync-device-scope b { border: 1px solid #b9cbc1; border-radius: 999px; background: white; padding: 3px 7px; color: var(--forest-deep); font-size: 10px; }.sync-device-scope em { color: var(--muted); font-size: 10px; font-style: normal; }
.embedded-module { height: min(78vh, 920px); min-height: 620px; }
.embedded-module iframe { display: block; width: 100%; height: 100%; border: 0; background: white; }
.board-data-tools { border-bottom: 1px solid var(--line); background: #fbfdfc; padding: 14px 18px; }
.board-data-tools > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.board-data-tools h3 { margin: 0; font-size: 16px; }
.board-data-tools p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.board-import-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.board-assignment-list { display: flex; gap: 6px; margin-top: 12px; overflow-x: auto; padding-bottom: 3px; }
.board-assignment-list > span { display: grid; min-width: 132px; gap: 3px; border: 1px solid var(--line); border-radius: 5px; background: white; padding: 8px 10px; }
.board-assignment-list strong { font-size: 12px; }
.board-assignment-list small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.plot-viewer { min-height: 640px; }
.plot-viewer > header { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: #fbfcfb; padding: 10px 18px; }
.plot-viewer h3 { margin: 0; font-size: 18px; }
.plot-viewer header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.plot-viewer label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.plot-viewer select { min-width: 300px; height: 36px; border: 1px solid #9fb7ac; border-radius: 6px; background: #f4f8f6; padding: 0 8px; font-weight: 650; }
.plot-viewer iframe { display: block; width: 100%; height: min(78vh, 900px); border: 0; background: white; }
.module-section h3 { margin: 0; font-size: 20px; }
.module-section header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.resource-list, .item-list { border-bottom: 1px solid var(--line); }
.data-item { border-top: 1px solid var(--line); padding: 15px 0; }
.data-item header { display: flex; justify-content: space-between; gap: 16px; }
.data-item header strong { font-size: 14px; }
.data-item header span { color: var(--gold); font-size: 11px; }
.data-item p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.empty-state { margin: 0; border: 1px dashed var(--line-strong); color: var(--muted); padding: 44px; text-align: center; }
.compact-empty { margin: 28px; }

.pia-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr); min-height: 350px; }
.pia-stage, .pia-resources { padding: 30px 28px; }
.pia-stage { border-right: 1px solid var(--line); background: #fbfcfb; }
.pia-stage > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.pia-stage h3 { margin: 0; font-size: 20px; }
.pia-stage header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.follow-control { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; color: var(--forest); font-size: 12px; }
.pia-position { display: grid; margin-top: 46px; place-items: center; }
.pia-position span { color: var(--muted); font-size: 12px; }
.pia-position strong { margin-top: 4px; color: var(--forest-deep); font-family: "Songti SC", "STSong", serif; font-size: 72px; line-height: 1; }
.pia-controls { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.pia-resources > h4 { margin-bottom: 12px; }

.reading-room { min-height: 640px; }
.reading-toolbar { display: flex; min-height: 64px; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); background: #fbfcfb; padding: 10px 18px; }
.reading-toolbar > div:first-child { min-width: 150px; margin-right: auto; }
.reading-toolbar h3 { margin: 0; font-size: 18px; }
.reading-toolbar p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.reading-toolbar > label:not(.follow-control) { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.reading-toolbar select { min-width: 220px; height: 34px; border: 1px solid #9fb7ac; border-radius: 6px; background: #f4f8f6; padding: 0 8px; font-weight: 650; }
.compact-pia { display: flex; align-items: center; gap: 7px; }
.compact-pia span { color: var(--muted); font-size: 12px; }
.compact-pia strong { color: var(--forest-deep); font-size: 16px; }
.reading-frame { display: block; width: 100%; height: min(78vh, 900px); border: 0; background: white; }

.reader-shell { height: min(78vh, 860px); min-height: 520px; overflow: auto; background: white; scroll-behavior: smooth; }
.reader-empty { display: grid; min-height: 320px; place-content: center; justify-items: center; gap: 16px; padding: 28px; }
.reader-controls { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.3fr) auto; align-items: start; gap: 10px; border-bottom: 1px solid var(--line); background: #f9fbfa; padding: 14px 18px; }
.reader-controls.bottom { border-top: 1px solid var(--line); border-bottom: 0; }
.reader-search { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.reader-search input, .reader-controls select { width: 100%; height: 38px; border: 1px solid #a7bbb2; border-radius: 6px; background: #fbfdfc; color: var(--ink); padding: 0 10px; font-size: 13px; }
.reader-search .secondary-button { min-height: 38px; padding: 0 11px; }
.chapter-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.chapter-navigation.with-upload { grid-template-columns: repeat(3, auto); }
.reader-controls .chapter-navigation { margin-top: 0; }
.chapter-navigation .secondary-button { min-height: 36px; padding: 0 8px; font-size: 12px; }
.reader-results { grid-column: 1 / -1; }
.reader-results button { display: grid; width: 100%; gap: 4px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); padding: 10px 2px; text-align: left; }
.reader-results button:hover { color: var(--forest); }
.reader-results strong { font-size: 12px; }
.reader-results span, .reader-results p { color: var(--muted); font-size: 11px; line-height: 1.55; }
.reader-page { background: white; padding: 48px max(36px, 8%); }
.reader-page > header { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.reader-page h3 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 26px; }
.reader-page header span { color: var(--muted); font-size: 11px; }
.novel-text { width: min(100%, 760px); margin: 30px auto 80px; font-family: "Songti SC", "STSong", serif; font-size: 18px; line-height: 2; }
.novel-text p { margin: 0 0 1.25em; text-align: justify; }

.workspace-dialog { width: min(92vw, 540px); max-height: 88vh; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); padding: 0; box-shadow: 0 24px 70px rgba(21,46,36,.2); }
.workspace-dialog::backdrop, .viewer-dialog::backdrop { background: rgba(9, 27, 21, .5); backdrop-filter: blur(3px); }
.wide-dialog { width: min(94vw, 760px); }
.dialog-body { padding: 24px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.dialog-header h2 { margin: 0; font-size: 21px; }
.dialog-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.dialog-body > label, .two-column-fields label { display: grid; gap: 7px; margin-top: 14px; color: var(--muted); font-size: 13px; font-weight: 650; }
.dialog-body input:not([type="checkbox"]), .dialog-body select { width: 100%; height: 42px; border: 1px solid #a7bbb2; border-radius: 6px; background: #fbfdfc; color: var(--ink); padding: 0 11px; }
.folder-picker { display: grid; width: 100%; min-height: 92px; gap: 7px; place-content: center; margin-top: 8px; border: 2px solid #9fb7ac; border-radius: 7px; background: var(--forest-soft); color: var(--forest-deep); padding: 18px; text-align: center; }
.folder-picker:hover { border-color: var(--forest); background: #e2ede7; }
.folder-picker strong { font-size: 15px; }
.folder-picker span { color: var(--muted); font-size: 12px; font-weight: 500; }
.import-example-link { margin-top: 7px; }
.avatar-settings { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 18px; }
.avatar-preview { width: 72px; height: 72px; font-size: 24px; }
.avatar-settings strong { font-size: 14px; }
.avatar-settings p { margin: 5px 0 9px; color: var(--muted); font-size: 12px; }
.avatar-actions { display: flex; align-items: center; gap: 12px; }
.dialog-divider { height: 1px; margin: 22px 0 2px; background: var(--line); }
.two-column-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.capability-table { border-top: 1px solid var(--line); }
.capability-head, .capability-row { display: grid; grid-template-columns: minmax(160px, 1fr) repeat(3, 64px); align-items: center; border-bottom: 1px solid var(--line); padding: 10px 4px; }
.capability-head { color: var(--muted); font-size: 11px; font-weight: 700; }
.capability-head span:not(:first-child) { text-align: center; }
.capability-row strong { font-size: 13px; }
.capability-row label { display: grid; place-items: center; }
.capability-row label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.capability-row input { width: 18px; height: 18px; accent-color: var(--forest); filter: drop-shadow(0 0 0.5px var(--forest-deep)); }
.capability-row.locked-row { color: var(--muted); background: #fafbfa; }
.split-actions { display: grid; grid-template-columns: auto 1fr auto auto; }
.invite-default-note { margin: 18px 0 0; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); color: var(--muted); padding: 12px 14px; font-size: 12px; line-height: 1.6; }
.invite-defaults, .member-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; margin: 20px 0 0; border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.invite-defaults legend, .member-checks legend { color: var(--muted); font-size: 12px; font-weight: 650; padding: 0 5px; }
.invite-defaults label, .member-checks label { color: var(--ink); font-size: 13px; }
.invite-result { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; margin-top: 16px; }
.invite-result label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.invite-result-summary, .invite-result-note { grid-column: 1 / -1; }
.invite-result-summary { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 10px; border: 1px solid #cad7d0; border-radius: 6px; background: #f4f7f5; padding: 12px 14px; }
.invite-result-summary span { color: var(--muted); font-size: 11px; }
.invite-result-summary strong { color: var(--forest-deep); font-size: 14px; }
.invite-result-summary small { grid-column: 2; color: var(--muted); font-size: 11px; }
.invite-result-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.password-reset-request-list { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); padding: 12px 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.password-reset-request-list:empty { display: none; }
.password-reset-request-list button { display: flex; width: 100%; justify-content: space-between; gap: 12px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); padding: 8px 0; text-align: left; }
.password-reset-request-list button:first-child { border-top: 0; }
.password-reset-request-list time { color: var(--muted); font-size: 11px; }

.viewer-dialog { width: min(96vw, 1380px); height: min(94vh, 940px); border: 0; border-radius: 8px; background: white; padding: 0; box-shadow: 0 24px 70px rgba(0,0,0,.32); }
.viewer-header { display: flex; height: 54px; align-items: center; justify-content: space-between; gap: 16px; background: var(--forest-deep); color: white; padding: 0 16px 0 20px; }
.viewer-header h2 { overflow: hidden; margin: 0; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.viewer-dialog iframe { display: block; width: 100%; height: calc(100% - 54px); border: 0; background: white; }

.workspace-shell.project-focus .workspace-header { min-height: 52px; }
.workspace-shell.project-focus .workspace-brand-mark { width: 30px; height: 30px; font-size: 15px; }
.workspace-shell.project-focus .workspace-main { width: min(calc(100% - 24px), 1460px); padding: 10px 0 24px; }
.workspace-shell.project-focus .workspace-title-row,
.workspace-shell.project-focus .workspace-message:empty,
.workspace-shell.project-focus .group-heading,
.workspace-shell.project-focus .book-type-group > h3,
.workspace-shell.project-focus .project-panel:not(.is-focused),
.workspace-shell.project-focus .project-group:not(.has-focused),
.workspace-shell.project-focus .book-type-group:not(.has-focused) { display: none; }
.workspace-shell.project-focus .project-group:has(.project-panel.is-focused),
.workspace-shell.project-focus .book-type-group:has(.project-panel.is-focused) { display: block; }
.workspace-shell.project-focus .project-group,
.workspace-shell.project-focus .book-type-group { margin: 0; }
.workspace-shell.project-focus { min-height: 0; overflow-y: auto; padding-bottom: max(32px, env(safe-area-inset-bottom)); }
.workspace-shell.project-focus .project-panel.is-focused { overflow: visible; border-color: var(--line-strong); }
.workspace-shell.project-focus .project-panel.is-focused > summary { min-height: 44px; padding: 5px 14px; }
.workspace-shell.project-focus .project-panel.is-focused .project-identity { gap: 0; }
.workspace-shell.project-focus .project-panel.is-focused .project-identity strong { font-size: 16px; }
.workspace-shell.project-focus .project-panel.is-focused .project-identity small { display: none; }
.workspace-shell.project-focus .project-toolbar { min-height: 48px; padding: 0 10px; }
.workspace-shell.project-focus .project-overview { align-items: center; justify-content: flex-start; padding: 9px 20px; }
.workspace-shell.project-focus .project-overview > div:first-child { display: none; }
.workspace-shell.project-focus .project-counts dd { font-size: 18px; }
.workspace-shell.project-focus .embedded-module,
.workspace-shell.project-focus .reading-frame,
.workspace-shell.project-focus .plot-viewer iframe { height: calc(100vh - 158px); min-height: 480px; }
.workspace-shell.project-focus .reader-shell { height: calc(100vh - 158px); min-height: 480px; }
.workspace-shell.project-focus .project-detail,
.workspace-shell.project-focus .module-content { height: auto; min-height: 0; overflow: visible; }

@media (max-width: 900px) {
  .workspace-header { padding: 0 20px; }
  .project-toolbar { align-items: stretch; flex-direction: column; gap: 0; padding: 0; }
  .module-tabs { min-height: 50px; padding: 0 8px; }
  .admin-actions { border-top: 1px solid var(--line); padding: 10px 16px; }
  .home-primary-grid, .home-columns, .pia-layout { grid-template-columns: 1fr; }
  .home-comments-column { border-top: 1px solid var(--line); border-left: 0; }
  .home-comments-column .comments-section { position: static; max-height: none; overflow: visible; }
  .role-summary-row { grid-template-columns: 28px minmax(100px, 1fr) minmax(120px, 1fr); }
  .role-summary-voice, .role-summary-stats { grid-column: 2 / -1; }
  .personal-board-grid { grid-template-columns: 1fr; }
  .personal-role-list { grid-column: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .personal-role-list > div { display: flex; gap: 6px; overflow-x: auto; }
  .personal-role-list button { width: auto; min-width: 148px; }
  .personal-relations { grid-column: auto; }
  .personal-board-empty { grid-column: auto; }
  .relation-map { grid-template-columns: 130px minmax(0, 1fr); gap: 14px; }
  .review-issue-form { grid-template-columns: 1fr 1fr; }
  .analytics-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .review-issue-form select, .review-issue-form input[name="quote"], .review-issue-form input[name="note"] { grid-column: 1 / -1; }
  .open-section + .open-section, .pia-stage { border-left: 0; border-top: 1px solid var(--line); border-right: 0; }
  .reader-page { padding: 38px 30px; }
  .reading-toolbar { flex-wrap: wrap; }
  .compact-pia { width: 100%; }
  .workspace-shell.project-focus .project-toolbar { min-height: 0; padding: 0; }
  .workspace-shell.project-focus .embedded-module,
  .workspace-shell.project-focus .reading-frame,
  .workspace-shell.project-focus .plot-viewer iframe,
  .workspace-shell.project-focus .reader-shell { height: calc(100vh - 202px); min-height: 420px; }
  .usage-rankings { grid-template-columns: 1fr; }
  .usage-figure + .usage-figure { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 700px) {
  .login-layout { grid-template-columns: 1fr; }
  .brand-panel { min-height: 28vh; padding: 26px; }
  .brand-panel::before { top: -12%; left: -20%; width: 140%; height: 120%; opacity: .28; }
  .brand-scene { opacity: .75; }
  .brand-window { width: 50%; transform: translateX(36px); }
  .brand-name { width: min(78vw, 390px); }
  .login-region { min-height: 72vh; padding: 24px 18px 40px; }
  .auth-form { max-width: none; padding: 26px 22px; box-shadow: none; }
  .workspace-header { min-height: 62px; padding: 0 14px; }
  .account-area { gap: 6px; }
  #member-insights-button, #admin-password-reset-button { min-height: 44px; padding: 0 10px; }
  .brand-button > span:last-child { display: none; }
  .account-button { gap: 6px; }
  .account-copy { display: none; }
  .workspace-main { width: min(calc(100% - 24px), 1240px); padding: 28px 0 60px; }
  .member-insights-head { align-items: flex-start; flex-direction: column; padding: 20px 18px 16px; }
  .member-insights-tools { width: 100%; overflow-x: auto; }
  .member-insights-tools button { min-height: 44px; flex: 1 0 auto; }
  .member-section { padding: 20px 18px 24px; }
  .member-section > header { align-items: flex-start; flex-direction: column; gap: 5px; }
  .member-metrics { grid-template-columns: 1fr 1fr; }
  .member-metrics div:nth-child(2n) { border-right: 0; }
  .member-metrics div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .coordinator-board-filters { grid-template-columns: 1fr 1fr; }
  .coordinator-board-filters label:first-child { grid-column: 1 / -1; }
  .coordinator-board-filters button { min-height: 44px; }
  .usage-figure, .hourly-figure { padding: 18px 14px 22px; }
  .usage-ranking li { grid-template-columns: minmax(76px, .7fr) minmax(86px, 1.2fr) auto; }
  .member-table-actions button { min-height: 44px; }
  .workspace-title-row { margin-bottom: 20px; }
  .project-panel > summary { min-height: 72px; padding: 12px 14px; }
  .project-identity strong { font-size: 16px; }
  .project-identity small { max-width: 68vw; }
  .project-overview { align-items: stretch; flex-direction: column; padding: 24px 18px 18px; }
  .project-counts { width: 100%; }
  .project-counts div { min-width: 0; flex: 1; padding-left: 12px; }
  .project-counts dd { font-size: 18px; }
  .review-summary { padding: 0 18px 24px; }
  .review-summary-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .feedback-range { width: 100%; }
  .feedback-range button { flex: 1; }
  .feedback-cv-rail { margin-right: -18px; margin-left: -18px; padding-right: 18px; padding-left: 18px; }
  .feedback-summary-line { padding: 14px 0; font-size: 15px; line-height: 1.6; }
  .feedback-matrix-scroll { overflow: visible; }
  .feedback-matrix, .feedback-matrix.all-time { width: 100%; min-width: 0; }
  .feedback-matrix-head { display: none; }
  .feedback-matrix-group { min-height: 32px; margin-top: 6px; }
  .feedback-matrix-row, .feedback-matrix.all-time .feedback-matrix-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; min-height: 0; padding: 12px 10px; }
  .feedback-matrix-issue { grid-column: 1; margin: 0; }
  .feedback-matrix-rank { grid-column: 1 / -1; grid-row: 3; margin: 0; }
  .feedback-periods { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; padding: 2px 0; }
  .feedback-matrix:not(.all-time) .feedback-periods { grid-auto-columns: 68px; }
  .feedback-matrix.all-time .feedback-periods { grid-auto-columns: 52px; }
  .feedback-period { gap: 3px; }
  .feedback-period > small { display: block; }
  .feedback-period > b { width: 32px; height: 30px; }
  .feedback-trend { grid-column: 2; grid-row: 1; align-self: start; margin: 0; }
  .feedback-method-note { align-items: flex-start; flex-direction: column; gap: 4px; }
  .feedback-evidence header { align-items: flex-start; flex-direction: column; }
  .review-evidence-main { grid-template-columns: auto minmax(0, 1fr); gap: 7px 8px; }
  .review-evidence-meta { margin-left: 0; }
  .feedback-evidence-source { max-width: 100%; }
  .review-evidence-main q, .review-evidence-main .review-row-actions { grid-column: 1 / -1; }
  .feedback-evidence .review-row-actions { justify-self: start; }
  .review-issue-form { grid-template-columns: 1fr; }
  .review-issue-form input:nth-of-type(n) { grid-column: auto; }
  .review-issue-form button { justify-self: start; }
  .review-form-actions { justify-content: flex-start; }
  .reply-form { grid-template-columns: 1fr; }
  .comment-replies { margin-left: 8px; padding-left: 8px; }
  .comment-reply-context { grid-template-columns: 1fr; }
  .notification-dialog { width: calc(100vw - 24px); padding: 0; }
  .notification-dialog .dialog-header { padding: 20px 18px 16px; }
  .notification-list, .notification-list.is-empty { padding-right: 18px; padding-left: 18px; }
  .notification-dialog .dialog-actions { padding: 16px 18px 18px; }
  .role-summary-section { padding: 20px 18px 16px; }
  .role-summary-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .role-summary-row { grid-template-columns: 24px minmax(90px, 1fr) minmax(90px, 1fr); }
  .tier-role-group > summary { grid-template-columns: 32px minmax(100px, 1fr); }
  .tier-role-group > summary > span:last-child { grid-column: 2; }
  .tier-role-body { padding-right: 0; padding-left: 32px; }
  .tier-role-item { grid-template-columns: 1fr; gap: 4px; padding: 9px 0; }
  .tier-role-item > small { white-space: normal; }
  .personal-board-heading { align-items: flex-start; flex-direction: column; gap: 9px; padding: 20px 18px 14px; }
  .home-relation-graph-section { padding: 0 18px 22px; }
  .home-relation-graph-section > summary { align-items: flex-start; gap: 9px; }
  .home-relation-graph-section .secondary-button { align-self: flex-start; }
  .relation-snapshot-frame { height: 300px; }
  .relation-dialog-content { padding: 20px 18px 26px; }
  .personal-narration-card { margin-right: 18px; margin-left: 18px; }
  .personal-block-nav { align-items: flex-start; flex-direction: column; gap: 7px; padding: 9px 12px; }
  .personal-block-nav > div { width: 100%; }
  .personal-board-grid { grid-template-columns: 1fr; }
  .personal-role-list { grid-column: auto; }
  .personal-role-list > header { padding-left: 18px; padding-right: 18px; }
  .personal-role-list button { min-width: 138px; }
  .personal-role-card { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px 18px 24px; }
  .personal-role-card > header { flex-direction: column; gap: 12px; }
  .personal-role-card > header dl { width: 100%; justify-content: flex-start; }
  .personal-role-fields { grid-template-columns: 1fr; }
  .personal-role-fields .wide { grid-column: auto; }
  .personal-relations { grid-column: auto; padding: 20px 18px 24px; }
  .relation-map { grid-template-columns: 1fr; gap: 12px; }
  .relation-center { min-height: 70px; }
  .relation-list { grid-template-columns: 1fr; }
  .personal-board-empty { grid-column: auto; padding: 36px 18px; }
  .open-section, .comments-section, .module-section, .pia-stage, .pia-resources { padding: 22px 18px; }
  .resource-row { align-items: flex-start; }
  .resource-actions { align-items: flex-end; flex-direction: column; gap: 2px; }
  .comment-form { grid-template-columns: 1fr; }
  .sync-module { padding: 22px 18px; }
  .sync-metrics, .analytics-metrics { grid-template-columns: 1fr 1fr; }
  .sync-metrics > div:nth-child(2n) { border-right: 0; }
  .sync-metrics > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .sync-distributions { grid-template-columns: 1fr; }
  .sync-config-form, .sync-device-form { grid-template-columns: 1fr; }
  .comment-form .primary-button { justify-self: end; }
  .comment header { align-items: flex-start; flex-wrap: wrap; }
  .comment time { width: 100%; margin-left: 0; }
  .embedded-module { height: 76vh; min-height: 540px; }
  .board-data-tools > header { align-items: stretch; flex-direction: column; }
  .board-import-actions { width: 100%; }
  .board-import-actions button { flex: 1; }
  .reader-shell { height: 76vh; min-height: 0; }
  .reader-controls { grid-template-columns: 1fr; padding: 12px; }
  .reader-controls select, .reader-results { grid-column: 1; }
  .reader-page { padding: 30px 20px; }
  .reader-page > header { align-items: flex-start; flex-direction: column; gap: 7px; }
  .reader-page h3 { font-size: 22px; }
  .novel-text { font-size: 17px; line-height: 1.95; }
  .pia-stage > header { flex-direction: column; }
  .pia-position { margin-top: 32px; }
  .pia-position strong { font-size: 60px; }
  .reading-room { min-height: 0; }
  .reading-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .reading-toolbar > div:first-child { margin-right: 0; }
  .reading-toolbar select { width: 100%; min-width: 0; }
  .reading-frame { height: 76vh; }
  .plot-viewer > header { align-items: stretch; flex-direction: column; }
  .plot-viewer select { width: 100%; min-width: 0; }
  .plot-viewer iframe { height: 76vh; }
  .two-column-fields { grid-template-columns: 1fr; gap: 0; }
  .capability-head, .capability-row { grid-template-columns: minmax(116px, 1fr) repeat(3, 50px); }
  .invite-defaults, .member-checks { grid-template-columns: 1fr; }
  .invite-result { grid-template-columns: 1fr; }
  .split-actions { display: flex; flex-wrap: wrap; }
  .split-actions span { display: none; }
  .viewer-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; border-radius: 0; }
  .workspace-shell.project-focus .workspace-main { width: calc(100% - 12px); padding-top: 6px; }
  .workspace-shell.project-focus .project-panel.is-focused > summary { min-height: 42px; padding: 4px 10px; }
  .workspace-shell.project-focus .project-meta { display: none; }
  .workspace-shell.project-focus .project-toolbar { min-height: 0; }
  .workspace-shell.project-focus .module-tabs { min-height: 44px; }
  .workspace-shell.project-focus .admin-actions { padding: 7px 10px; }
  .workspace-shell.project-focus .project-overview { align-items: center; flex-direction: row; padding: 8px 14px; }
  .workspace-shell.project-focus .project-counts { width: 100%; }
  .workspace-shell.project-focus .embedded-module,
  .workspace-shell.project-focus .reading-frame,
  .workspace-shell.project-focus .plot-viewer iframe,
  .workspace-shell.project-focus .reader-shell { height: calc(100vh - 196px); min-height: 360px; }
  .avatar-settings { grid-template-columns: 60px 1fr; gap: 14px; }
  .avatar-preview { width: 60px; height: 60px; }
}
