:root {
  color-scheme: light;
  --blue: #0b5cff;
  --blue-strong: #0646c8;
  --navy: #17233d;
  --ink: #24324a;
  --muted: #68758b;
  --line: #dfe5ee;
  --soft: #f4f7fb;
  --green: #11855b;
  --green-soft: #e8f7f0;
  --amber: #bd6b00;
  --amber-soft: #fff4dc;
  --red: #c33b45;
  --red-soft: #fff0f1;
  --white: #fff;
  --shadow: 0 18px 50px rgba(30, 52, 86, 0.09);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: #edf2f8; color: var(--ink); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
.skip-link { position: fixed; left: 12px; top: -60px; padding: 10px 14px; background: var(--navy); color: white; z-index: 100; }
.skip-link:focus { top: 12px; }

.topbar { height: 70px; padding: 0 max(24px, calc((100vw - 1440px) / 2)); display: flex; align-items: center; gap: 18px; background: #101c33; color: white; position: sticky; top: 0; z-index: 30; box-shadow: 0 4px 22px rgba(8, 18, 36, .2); }
.brand { flex: 0 0 auto; display: flex; gap: 11px; align-items: center; text-decoration: none; }
.brand-mark { width: 39px; height: 39px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #1b70ff, #7cf0c5); font-weight: 900; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 2px; color: #aebbd1; font-size: 11px; }
.global-nav { min-width: 0; margin-left: auto; display: flex; align-items: center; justify-content: center; gap: 3px; }
.global-nav a { flex: 0 0 auto; padding: 9px 10px; border: 1px solid transparent; border-radius: 9px; color: #cbd6e9; font-size: 13px; font-weight: 750; line-height: 1; text-decoration: none; white-space: nowrap; transition: color .18s ease, background .18s ease, border-color .18s ease; }
.global-nav a:hover, .global-nav a:focus-visible { color: white; background: rgba(255,255,255,.09); }
.global-nav a[aria-current="page"] { color: white; border-color: rgba(124,240,197,.34); background: rgba(27,112,255,.28); }
.global-nav .external-link::after { content: "↗"; margin-left: 4px; color: #7cf0c5; font-size: 10px; }
.topbar-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; color: #b8c3d6; font-size: 13px; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; background: #49d7a3; border-radius: 50%; box-shadow: 0 0 0 4px rgba(73, 215, 163, .14); }
.text-button { border: 0; padding: 5px 8px; background: transparent; color: #d8e2f3; text-decoration: underline; }

.app-shell { max-width: 1440px; margin: 0 auto; padding: 24px; }
.intro-strip { background: linear-gradient(125deg, #0d5cf0, #173d89); color: white; border-radius: 20px; padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; box-shadow: var(--shadow); }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: #a9f5db; }
.intro-strip h1 { margin: 8px 0 7px; font-size: clamp(26px, 3vw, 40px); letter-spacing: -.035em; }
.intro-strip p { margin: 0; color: #dbe7ff; }
.intro-actions, .analysis-actions, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
button { border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 700; }
.primary-button { background: var(--blue); color: white; box-shadow: 0 8px 20px rgba(11, 92, 255, .24); }
.intro-strip .primary-button { background: white; color: var(--blue-strong); }
.ghost-button { background: white; color: var(--ink); border: 1px solid var(--line); }
.button-link { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; padding: 11px 16px; font-weight: 700; text-decoration: none; }
.intro-strip .ghost-button { color: white; border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.1); }
.danger-button { background: var(--red-soft); color: var(--red); }
button:hover { transform: translateY(-1px); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .brand:focus-visible, .global-nav a:focus-visible { outline: 3px solid rgba(124, 240, 197, .42); outline-offset: 2px; }

.starter-guide { margin-top: 16px; padding: 20px 22px; border: 1px solid #cfe0ff; border-radius: 16px; background: linear-gradient(135deg, #f5f9ff, #fff); box-shadow: 0 9px 28px rgba(30, 72, 145, .055); }
.starter-guide-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.starter-guide h2 { margin: 3px 0 0; color: var(--navy); font-size: 19px; }
.guide-kicker { color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.guide-start-button { padding: 9px 13px; color: var(--blue); background: #eaf1ff; }
.guide-step-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 15px; }
.guide-step-grid button { min-width: 0; padding: 12px; display: flex; align-items: flex-start; gap: 9px; text-align: left; color: var(--ink); background: white; border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(31, 55, 91, .035); }
.guide-step-grid b { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; color: white; background: var(--blue); border-radius: 50%; font-size: 12px; }
.guide-step-grid span, .guide-step-grid strong, .guide-step-grid small { display: block; min-width: 0; }
.guide-step-grid strong { color: var(--navy); font-size: 13px; line-height: 1.35; }
.guide-step-grid small { margin-top: 4px; color: var(--muted); font-weight: 500; line-height: 1.45; }
.guide-rules { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px 14px; align-items: center; color: #56647a; font-size: 12px; }
.guide-rules strong { color: var(--navy); }
.guide-rules span::before { content: "✓"; margin-right: 5px; color: var(--green); font-weight: 900; }

.workflow-guide { margin-top: 16px; padding: 18px 20px; border: 1px solid #cfe0ff; border-radius: 16px; background: linear-gradient(135deg, #f5f9ff, #fff); box-shadow: 0 9px 28px rgba(30, 72, 145, .055); }
.workflow-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.workflow-guide h2 { margin: 3px 0 4px; color: var(--navy); font-size: 19px; }
.workflow-guide p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.workflow-steps { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.workflow-steps button { min-width: 0; padding: 11px 12px; display: flex; align-items: center; gap: 9px; text-align: left; color: #607089; background: white; border: 1px solid var(--line); box-shadow: none; }
.workflow-steps button.active { color: var(--blue); border-color: #9ebdff; background: #f3f7ff; }
.workflow-steps button.done { color: var(--green); border-color: #bfe4d5; background: #f4fbf8; }
.workflow-steps b { flex: 0 0 26px; width: 26px; height: 26px; display: grid; place-items: center; color: white; background: #9ba8ba; border-radius: 50%; font-size: 12px; }
.workflow-steps button.active b { background: var(--blue); }
.workflow-steps button.done b { background: var(--green); }
.workflow-steps span, .workflow-steps strong, .workflow-steps small { display: block; min-width: 0; }
.workflow-steps strong { color: var(--navy); font-size: 13px; }
.workflow-steps small { margin-top: 2px; font-weight: 600; line-height: 1.35; }

.workspace-switch { margin-top: 16px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #d8e0ec; border-radius: 15px; background: white; }
.workspace-switch > div:first-child strong { display: block; margin-top: 4px; color: var(--navy); font-size: 15px; }
.workspace-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; width: min(890px, 70%); padding: 4px; background: #eef2f7; border-radius: 12px; }
.workspace-tabs button { padding: 10px 14px; text-align: left; color: #617087; background: transparent; box-shadow: none; }
.workspace-tabs button.active { color: var(--blue); background: white; box-shadow: 0 4px 14px rgba(28, 50, 82, .09); }
.workspace-tabs span, .workspace-tabs small { display: block; }
.workspace-tabs span { font-size: 13px; }
.workspace-tabs small { margin-top: 2px; font-weight: 500; }

.direction-workspace { margin-top: 16px; padding: 24px; border: 1px solid #dce4ef; border-radius: 17px; background: white; box-shadow: 0 10px 34px rgba(30, 52, 86, .06); }
.direction-hero, .direction-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.direction-hero h2, .direction-result-head h2 { margin: 4px 0 7px; color: var(--navy); font-size: 23px; }
.direction-hero p, .direction-result-head p { max-width: 820px; margin: 0; color: var(--muted); line-height: 1.6; }
.direction-result-actions { display: grid; flex: 0 0 auto; gap: 9px; justify-items: stretch; }
.direction-risk-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 11px; background: #eef2f7; }
.direction-risk-switch button { min-width: 62px; padding: 8px 12px; color: #617087; background: transparent; box-shadow: none; }
.direction-risk-switch button.active { color: var(--blue); background: white; box-shadow: 0 3px 12px rgba(28, 50, 82, .11); }
.direction-risk-switch button:disabled { cursor: progress; opacity: .65; }
.direction-form { margin-top: 20px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; }
.direction-form label > small { min-height: 16px; color: var(--muted); font-weight: 500; line-height: 1.35; }
#directionForm { grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: start; }
#directionForm > label { grid-template-rows: minmax(16px, auto) 42px minmax(32px, auto); align-content: start; }
#directionForm > label > small { min-height: 32px; }
.direction-submit { grid-column: 1 / -1; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 12px; background: #f3f7ff; }
.direction-submit p { margin: 0; }
.direction-submit p strong, .direction-submit p span { display: block; }
.direction-submit p strong { color: var(--navy); font-size: 13px; }
.direction-submit p span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.target-form > label { grid-template-rows: 16px 42px minmax(16px, auto); align-content: start; }
.direction-result { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 82px; }
.direction-stats { margin-top: 17px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.direction-stat { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f9fbfe; }
.direction-stat span, .direction-stat strong, .direction-stat small { display: block; }
.direction-stat span { color: var(--muted); font-size: 11px; }
.direction-stat strong { margin-top: 4px; color: var(--navy); font-size: 21px; }
.direction-stat small { margin-top: 3px; color: var(--muted); line-height: 1.4; }
.direction-groups { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.direction-group { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.direction-group-head { padding: 13px 15px; background: #f3f7fd; border-bottom: 1px solid var(--line); }
.direction-group-head strong, .direction-group-head small { display: block; }
.direction-group-head strong { color: var(--navy); }
.direction-group-head small { margin-top: 3px; color: var(--muted); }
.direction-school { padding: 11px 13px; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; border-bottom: 1px solid #edf0f4; }
.direction-school:last-child { border-bottom: 0; }
.direction-position { color: #617087; font-size: 11px; font-weight: 800; }
.direction-school strong, .direction-school small { display: block; }
.direction-school strong { color: var(--navy); font-size: 13px; }
.direction-school small { margin-top: 3px; color: var(--muted); line-height: 1.4; }
.same-district-badge { margin-left: 7px; padding: 3px 6px; display: inline-block; color: var(--green); background: var(--green-soft); border-radius: 999px; font-size: 9px; font-style: normal; vertical-align: 1px; }
.direction-chance { min-width: 74px; text-align: right; }
.direction-chance b, .direction-chance span { display: block; }
.direction-chance b { color: var(--blue); }
.direction-chance span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.direction-notice { margin-top: 14px; padding: 13px 15px; display: flex; gap: 10px; color: #6c5225; background: var(--amber-soft); border-radius: 11px; font-size: 12px; line-height: 1.55; }
.direction-notice strong { flex: 0 0 auto; color: #71490d; }
.target-school-field { grid-column: span 2; }
.target-detail-grid { margin-top: 16px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 14px; }
.target-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; }
.target-card-head { padding: 13px 15px; background: #f3f7fd; border-bottom: 1px solid var(--line); }
.target-card-head strong, .target-card-head small { display: block; }
.target-card-head strong { color: var(--navy); }
.target-card-head small { margin-top: 3px; color: var(--muted); }
.target-history-row { padding: 10px 14px; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid #edf0f4; font-size: 12px; }
.target-history-row:last-child { border-bottom: 0; }
.target-history-row span { color: var(--muted); }
.target-history-row strong { color: var(--navy); }
.target-history-row b { color: var(--blue); }
.target-advice { margin: 0; padding: 8px 18px 12px 38px; }
.target-advice li { padding: 8px 4px; color: #425068; line-height: 1.6; border-bottom: 1px solid #edf0f4; }
.target-advice li:last-child { border-bottom: 0; }

.step-nav { margin: 16px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); background: var(--line); border-radius: 14px; }
.step-nav a { background: white; text-decoration: none; padding: 13px 16px; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; font-weight: 700; }
.step-nav b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #eaf1ff; color: var(--blue); }

.panel { margin-top: 16px; background: white; border: 1px solid #e2e7ef; border-radius: 16px; padding: 22px; box-shadow: 0 9px 32px rgba(30, 52, 86, .055); scroll-margin-top: 88px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { margin: 3px 0 0; font-size: 20px; color: var(--navy); }
.step-label { font-size: 10px; color: var(--blue); font-weight: 900; letter-spacing: .12em; }
.privacy-chip { padding: 7px 10px; background: var(--green-soft); color: var(--green); border-radius: 999px; font-size: 12px; font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; }

.profile-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.profile-essentials { align-items: start; }
.profile-confirmations { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-confirmations .checkbox-field { min-height: 62px; padding: 11px 13px; align-items: flex-start; border: 1px solid #d8e5f8; border-radius: 11px; background: #f7faff; }
.profile-confirmations .checkbox-field input { margin-top: 2px; }
.profile-confirmations span, .profile-confirmations strong, .profile-confirmations small { display: block; }
.profile-confirmations strong { color: var(--navy); font-size: 13px; }
.profile-confirmations small { margin-top: 3px; color: var(--muted); font-weight: 500; line-height: 1.4; }
.quota-details { margin-top: 10px; padding: 13px 14px; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.4fr); gap: 16px; align-items: end; border: 1px solid #b9d1ff; border-radius: 11px; background: #eef5ff; }
.quota-details > div > strong, .quota-details > div > small { display: block; }
.quota-details > div > strong { margin-top: 3px; color: var(--navy); font-size: 14px; }
.quota-details > div > small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.advanced-profile { margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.advanced-profile summary { padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.advanced-profile summary::-webkit-details-marker { display: none; }
.advanced-profile summary span, .advanced-profile summary strong, .advanced-profile summary small { display: block; }
.advanced-profile summary strong { color: var(--navy); font-size: 13px; }
.advanced-profile summary small { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }
.advanced-profile summary b { flex: 0 0 auto; color: var(--blue); font-size: 11px; }
.advanced-profile[open] summary { border-bottom: 1px solid var(--line); background: #f4f7fb; }
.advanced-profile-grid { padding: 14px; }
label { display: grid; gap: 7px; color: #4e5b70; font-size: 12px; font-weight: 700; }
input, select { width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid #d6dde8; border-radius: 9px; background: white; color: var(--ink); }
input:hover, select:hover { border-color: #9eb7e9; }
.checkbox-field { display: flex; align-items: center; gap: 9px; padding: 24px 0 0; }
.checkbox-field input { width: 18px; height: 18px; }
.policy-banner { margin-top: 16px; border-left: 4px solid var(--amber); background: var(--amber-soft); padding: 11px 13px; color: #7d4b0b; font-size: 13px; }

.filter-row { display: grid; grid-template-columns: 2fr repeat(3, minmax(130px, .75fr)); gap: 12px; margin-bottom: 15px; }
.school-selection-status { display: flex; align-items: center; gap: 10px; }
.school-selection-status button { padding: 8px 11px; color: var(--blue); }
.school-table-wrap { overflow: auto; max-height: 520px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; z-index: 2; background: #f7f9fc; color: #526079; text-align: left; font-size: 12px; }
th, td { padding: 12px 13px; border-bottom: 1px solid #e7ebf1; vertical-align: middle; }
td { font-size: 13px; }
td strong { color: var(--navy); }
.school-table td:nth-child(3), .school-table td:nth-child(4), .school-table td:nth-child(5) { white-space: nowrap; }
.add-school { padding: 7px 10px; background: #eaf1ff; color: var(--blue); font-size: 12px; }
.add-school:disabled { cursor: default; color: var(--green); background: var(--green-soft); opacity: 1; transform: none; }
.table-note { margin: 11px 0 0; color: var(--muted); font-size: 12px; }

.legend { display: flex; gap: 6px; }
.legend span, .tier-badge { border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; }
.reach { color: var(--red); background: var(--red-soft); }
.match { color: var(--amber); background: var(--amber-soft); }
.safe { color: var(--green); background: var(--green-soft); }
.batch-forms { display: grid; gap: 14px; }
.plan-coach { margin: 0 0 14px; padding: 14px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(360px, 2fr) auto; gap: 14px; align-items: center; border: 1px solid #d9e5f8; border-radius: 12px; background: #f7faff; }
.coach-summary span, .coach-summary strong, .coach-summary small { display: block; }
.coach-summary span { color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.coach-summary strong { margin-top: 3px; color: var(--navy); }
.coach-summary small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.coach-checklist { display: flex; flex-wrap: wrap; gap: 7px; }
.coach-check { padding: 6px 9px; border-radius: 999px; color: #6d7787; background: #edf1f6; font-size: 11px; font-weight: 700; }
.coach-check.done { color: var(--green); background: var(--green-soft); }
.coach-check.warn { color: var(--amber); background: var(--amber-soft); }
.batch-card { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.batch-card summary { cursor: pointer; list-style: none; }
.batch-card summary::-webkit-details-marker { display: none; }
.batch-card-optional:not([open]) .batch-head { border-bottom: 0; }
.batch-card-optional .batch-head::after { content: "展开填写"; flex: 0 0 auto; padding: 5px 8px; color: var(--blue); background: #eaf1ff; border-radius: 999px; font-size: 10px; font-weight: 800; }
.batch-card-optional[open] .batch-head::after { content: "收起"; }
.batch-head { padding: 13px 15px; display: flex; justify-content: space-between; gap: 15px; align-items: center; background: #f5f8fd; border-bottom: 1px solid var(--line); }
.batch-head strong { color: var(--navy); }
.batch-head span { color: var(--muted); font-size: 12px; }
.volunteer-row { display: grid; grid-template-columns: 88px minmax(260px, 1fr) 190px 105px; gap: 12px; align-items: center; min-height: 59px; padding: 8px 13px; border-bottom: 1px solid #edf0f4; }
.volunteer-row:last-child { border-bottom: 0; }
.volunteer-row.dragging { opacity: .45; background: #eaf1ff; }
.volunteer-label { display: flex; align-items: center; gap: 7px; color: #5b6880; font-weight: 800; font-size: 12px; }
.drag-handle { cursor: grab; color: #9aa7ba; font-size: 16px; }
.slot-meta { color: var(--muted); font-size: 12px; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.row-actions button { width: 30px; height: 30px; padding: 0; background: #f1f4f8; color: #66758c; }
.form-actions { margin-top: 16px; justify-content: flex-end; }

.analysis-panel { border-top: 4px solid var(--blue); }
.score-overview { display: grid; grid-template-columns: 145px 1fr 1.7fr; align-items: center; gap: 24px; padding: 20px; background: linear-gradient(120deg, #f0f5ff, #f7fbff); border-radius: 14px; }
.score-ring { --score: 0; width: 116px; height: 116px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle closest-side, #fff 76%, transparent 77% 99%), conic-gradient(var(--blue) calc(var(--score) * 1%), #dce4f0 0); }
.score-ring strong { display: block; color: var(--navy); font-size: 35px; line-height: 1; }
.score-ring span { color: var(--muted); font-size: 11px; margin-top: 6px; }
.score-summary h3 { margin: 10px 0 6px; color: var(--navy); }
.score-summary p { margin: 0; color: var(--muted); font-size: 13px; }
.grade-badge { background: var(--blue); color: white; padding: 5px 9px; border-radius: 6px; font-size: 12px; font-weight: 800; }
.dimension-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.dimension-card { padding: 11px; border: 1px solid #dce5f2; background: white; border-radius: 9px; text-align: center; }
.dimension-card strong, .dimension-card span { display: block; }
.dimension-card strong { font-size: 20px; color: var(--blue); }
.dimension-card span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.improvement-section { margin-top: 18px; padding: 18px; border: 1px solid #d8e5fb; border-radius: 14px; background: #f7faff; }
.improvement-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.improvement-head span { color: var(--blue); font-size: 11px; font-weight: 800; }
.improvement-head h3 { margin: 3px 0 0; color: var(--navy); font-size: 17px; }
.improvement-head > strong { flex: 0 0 auto; padding: 7px 10px; border-radius: 8px; color: #0b5fd7; background: #e5efff; font-size: 13px; }
.score-caps { margin-top: 12px; display: grid; gap: 7px; }
.score-cap { padding: 10px 12px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #f0c7be; border-radius: 9px; background: #fff4f1; }
.score-cap b { flex: 0 0 auto; color: #aa3825; font-size: 12px; }
.score-cap span { color: #713d34; font-size: 12px; line-height: 1.5; }
.improvement-list { margin-top: 13px; display: grid; gap: 9px; }
.improvement-card { padding: 12px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 11px; align-items: center; border: 1px solid #dce5f2; border-radius: 11px; background: white; }
.improvement-rank { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-size: 12px; font-weight: 800; }
.improvement-copy > div { display: flex; align-items: center; gap: 8px; }
.improvement-copy strong { color: var(--navy); font-size: 14px; }
.improvement-copy span { color: var(--muted); font-size: 11px; }
.improvement-copy p { margin: 4px 0 0; color: #536177; font-size: 12px; line-height: 1.55; }
.improvement-points { display: grid; justify-items: end; gap: 5px; }
.improvement-points b { color: #0b7a50; font-size: 13px; }
.improvement-points button { padding: 6px 10px; color: var(--blue); background: #eaf2ff; box-shadow: none; font-size: 11px; white-space: nowrap; }
.improvement-complete { padding: 13px; display: flex; gap: 9px; border-radius: 10px; color: #205d46; background: #eaf8f2; font-size: 12px; }
.improvement-complete b { flex: 0 0 auto; }
.improvement-note { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.analysis-grid { display: grid; grid-template-columns: 1.35fr .8fr; gap: 18px; margin-top: 20px; }
.analysis-grid h3, .advice-section h3 { margin: 0 0 12px; color: var(--navy); font-size: 16px; }
.chance-list, .outcome-list { display: grid; gap: 8px; }
.chance-row, .outcome-row { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.chance-row-head, .outcome-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.chance-row small { display: block; color: var(--muted); margin-top: 3px; }
.chance-value { font-weight: 900; color: var(--navy); white-space: nowrap; }
.chance-track { margin-top: 8px; height: 6px; background: #e8edf4; border-radius: 999px; overflow: hidden; }
.chance-track i { display: block; height: 100%; width: calc(var(--chance) * 1%); background: var(--blue); border-radius: inherit; }
.outcome-row b { color: var(--blue); }
.advice-section { margin-top: 18px; padding: 16px; border-radius: 12px; background: #fff9ec; border: 1px solid #f2dfb3; }
.advice-section ol { margin: 0; padding-left: 23px; }
.advice-section li { margin: 7px 0; line-height: 1.55; }
.method-details { margin-top: 15px; color: var(--muted); font-size: 13px; }
.method-details summary { cursor: pointer; font-weight: 700; color: #4b5971; }
.method-details ul { line-height: 1.7; }

.disclaimer { margin: 18px 0 0; padding: 17px 19px; border-radius: 12px; color: #5d6676; background: #f7f8fa; border: 1px solid #dfe3e8; }
.disclaimer strong { color: #353f50; }
.disclaimer p { margin: 7px 0 0; font-size: 12px; line-height: 1.7; }
footer { max-width: 1440px; margin: 0 auto; padding: 10px 24px 28px; display: flex; justify-content: space-between; color: #657187; font-size: 12px; }

dialog { width: min(760px, calc(100vw - 32px)); max-height: 80vh; border: 0; border-radius: 16px; padding: 0; box-shadow: 0 28px 80px rgba(20, 36, 66, .32); }
dialog::backdrop { background: rgba(11, 22, 43, .58); }
.dialog-head { padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 19px; }
.dialog-head button { background: #eef2f7; width: 34px; height: 34px; padding: 0; }
#sourceContent { padding: 19px 20px; overflow: auto; max-height: calc(80vh - 70px); }
#sourceContent a { color: var(--blue); word-break: break-all; }
.source-row { padding: 9px 0; border-bottom: 1px solid var(--line); }
.source-row small { display: block; color: var(--muted); margin-top: 3px; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 380px; background: #15223a; color: white; border-radius: 10px; padding: 12px 15px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translateY(0); }
.error-box { color: var(--red); background: var(--red-soft); border-radius: 10px; padding: 12px; }

@media (max-width: 1100px) {
  .topbar-meta #dataVersion { display: none; }
  .workflow-steps { grid-template-columns: repeat(2, 1fr); }
  .guide-step-grid { grid-template-columns: repeat(3, 1fr); }
  .direction-form { grid-template-columns: repeat(3, 1fr); }
  #directionForm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .direction-stats { grid-template-columns: 1fr 1fr; }
  .target-detail-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: repeat(3, 1fr); }
  .plan-coach { grid-template-columns: 1fr 1.7fr; }
  .plan-coach > button { grid-column: 1 / -1; justify-self: end; }
  .score-overview { grid-template-columns: 120px 1fr; }
  .dimension-grid { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .topbar { height: auto; min-height: 70px; padding: 10px 18px 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .global-nav { grid-column: 1 / -1; width: calc(100% + 36px); margin: 0 -18px -8px; padding: 0 18px 8px; justify-content: flex-start; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
  .global-nav::-webkit-scrollbar { display: none; }
  .global-nav a { padding: 8px 10px; }
}

@media (max-width: 760px) {
  .topbar { min-height: 66px; padding: 10px 15px 8px; }
  .global-nav { width: calc(100% + 30px); margin-right: -15px; margin-left: -15px; padding-right: 15px; padding-left: 15px; }
  .topbar-meta #dataVersion { display: none; }
  .app-shell { padding: 12px; }
  .intro-strip { padding: 22px 18px; align-items: flex-start; flex-direction: column; }
  .intro-actions { width: 100%; }
  .intro-actions button { flex: 1; min-width: 110px; }
  .starter-guide { padding: 17px 14px; }
  .workflow-guide { padding: 16px 14px; }
  .workflow-guide-head { align-items: stretch; flex-direction: column; }
  .workflow-guide-head .guide-start-button { width: 100%; }
  .workspace-switch { align-items: stretch; flex-direction: column; }
  .workspace-tabs { width: 100%; }
  .direction-workspace { padding: 18px 14px; }
  .direction-hero, .direction-result-head { flex-direction: column; }
  .direction-form { grid-template-columns: 1fr 1fr; }
  #directionForm { grid-template-columns: 1fr 1fr; }
  .target-school-field { grid-column: 1 / -1; }
  .direction-submit { align-items: stretch; flex-direction: column; }
  .direction-submit button, .direction-result-head button { width: 100%; }
  .direction-result-actions, .direction-risk-switch { width: 100%; }
  .direction-risk-switch button { min-width: 0; }
  .direction-groups { grid-template-columns: 1fr; }
  .starter-guide-head { align-items: flex-start; }
  .guide-step-grid { grid-template-columns: 1fr 1fr; }
  .guide-rules { align-items: flex-start; flex-direction: column; }
  .step-nav { grid-template-columns: repeat(5, minmax(68px, 1fr)); overflow-x: auto; }
  .step-nav a { padding: 10px 4px; display: grid; justify-items: center; font-size: 10px; }
  .panel { padding: 16px 13px; }
  .panel-heading { align-items: flex-start; }
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-confirmations { grid-template-columns: 1fr; }
  .quota-details { grid-template-columns: 1fr; }
  .school-selection-status { align-items: flex-end; flex-direction: column; gap: 5px; }
  .filter-row { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .school-table th:nth-child(4), .school-table td:nth-child(4), .school-table th:nth-child(5), .school-table td:nth-child(5) { display: none; }
  .volunteer-row { grid-template-columns: 76px minmax(0, 1fr) 72px; gap: 7px; }
  .plan-coach { grid-template-columns: 1fr; }
  .plan-coach > button { grid-column: auto; width: 100%; }
  .slot-meta { grid-column: 2; }
  .row-actions { grid-column: 3; grid-row: 1 / 3; }
  .score-overview { padding: 15px; grid-template-columns: 100px 1fr; gap: 13px; }
  .score-ring { width: 94px; height: 94px; }
  .dimension-grid { grid-template-columns: repeat(2, 1fr); }
  .improvement-card { grid-template-columns: 28px minmax(0, 1fr); }
  .improvement-points { grid-column: 2; display: flex; align-items: center; justify-content: space-between; }
  .analysis-grid { grid-template-columns: 1fr; }
  .analysis-actions { width: 100%; }
  .analysis-actions button { flex: 1; }
  footer { padding: 8px 15px 22px; gap: 10px; flex-direction: column; }
}

@media (max-width: 430px) {
  .brand strong { font-size: 14px; }
  .brand small { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .global-nav a { padding: 8px 9px; font-size: 12px; }
  .profile-grid { grid-template-columns: 1fr; }
  .workflow-steps { grid-template-columns: 1fr 1fr; }
  .workflow-steps button { padding: 9px; }
  .starter-guide-head { display: grid; }
  .workspace-tabs { grid-template-columns: 1fr; }
  .direction-form, .direction-stats { grid-template-columns: 1fr; }
  #directionForm { grid-template-columns: 1fr; }
  .direction-school { grid-template-columns: 50px minmax(0, 1fr); }
  .direction-chance { grid-column: 2; text-align: left; }
  .direction-notice { display: grid; }
  .guide-start-button { width: 100%; }
  .guide-step-grid { grid-template-columns: 1fr; }
  .checkbox-field { padding-top: 4px; }
  .filter-row { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .school-table th:nth-child(2), .school-table td:nth-child(2) { display: none; }
  .volunteer-row { grid-template-columns: 70px minmax(0, 1fr); }
  .row-actions { grid-column: 1 / -1; grid-row: auto; justify-content: flex-end; }
  .score-overview { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .improvement-head, .score-cap, .improvement-complete { align-items: flex-start; flex-direction: column; }
}

@media print {
  body { background: white; }
  .topbar, .intro-actions, .workspace-switch, #directionWorkspace, #targetWorkspace, .step-nav, #profile, #schoolExplorer, #volunteerForm .form-actions, .analysis-actions, footer, .toast { display: none !important; }
  .app-shell { max-width: none; padding: 0; }
  .intro-strip { color: #111; background: white; box-shadow: none; padding: 0 0 14px; }
  .intro-strip p, .eyebrow { color: #333; }
  .panel { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  #analysis { display: block !important; }
  .disclaimer { break-inside: avoid; }
}
