:root {
  --primary: #002fa7;
  --primary-dark: #001b66;
  --primary-soft: #dde5ff;
  --secondary: #5147a5;
  --amber: #b45309;
  --amber-soft: #fff1d6;
  --rose: #b4234d;
  --ink: #182226;
  --muted: #66757c;
  --line: #dbe2e5;
  --surface: #ffffff;
  --surface-alt: #f3f6f7;
  --canvas: #eef1f7;
  --shadow-1: 0 2px 6px rgba(22, 34, 38, .12);
  --shadow-2: 0 10px 30px rgba(22, 34, 38, .18);
  --radius: 8px;
  --bar-height: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--surface-alt); font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(0, 47, 167, .28); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
.material-icons-round { display: inline-block; width: 1em; overflow: hidden; white-space: nowrap; word-wrap: normal; direction: ltr; font-family: "Material Icons Round"; font-size: 22px; font-style: normal; font-weight: normal; line-height: 1; text-transform: none; }

.top-app-bar, .admin-topbar { position: sticky; top: 0; z-index: 30; height: var(--bar-height); display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100% - 1180px) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 148px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius); color: #fff; background: var(--primary); box-shadow: var(--shadow-1); }
.brand > span:last-child { display: flex; align-items: baseline; gap: 8px; }
.brand b { font-size: 20px; }
.brand small { color: var(--muted); font-size: 12px; }
.top-actions, .admin-top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.icon-button:hover { background: rgba(24, 34, 38, .07); }
.text-button, .primary-button, .outlined-button { min-height: 40px; border: 0; border-radius: 4px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.text-button { color: var(--primary); background: transparent; }
.text-button:hover { background: var(--primary-soft); }
.primary-button { color: #fff; background: var(--primary); box-shadow: var(--shadow-1); }
.primary-button:hover { background: var(--primary-dark); box-shadow: 0 4px 10px rgba(21, 94, 89, .25); }
.outlined-button { color: var(--primary); border: 1px solid #92aaa8; background: #fff; }
.full-width { width: 100%; }
.eyebrow { margin: 0 0 5px; color: var(--primary); font-size: 11px; font-weight: 700; text-transform: uppercase; }

.query-band { color: #fff; background: var(--primary-dark); border-bottom: 5px solid #d99a32; }
.query-inner { width: min(1180px, calc(100% - 48px)); min-height: 268px; margin: 0 auto; display: grid; grid-template-columns: .75fr 1.25fr; column-gap: 64px; align-items: center; }
.query-heading .eyebrow { color: #a6e2dc; }
.query-heading h1 { margin: 0 0 10px; font-size: 36px; line-height: 1.25; }
.query-heading p:last-child { margin: 0; color: #c8d8d7; font-size: 15px; }
.query-form { display: grid; grid-template-columns: 260px 132px; gap: 14px 12px; align-items: end; }
.grade-tabs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); width: 284px; height: 40px; padding: 3px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
.grade-tab { border: 0; border-radius: 3px; color: #d9e7e5; background: transparent; cursor: pointer; }
.grade-tab.is-active { color: var(--primary-dark); background: #fff; box-shadow: var(--shadow-1); font-weight: 700; }
.md-field { position: relative; display: flex; flex-direction: column; min-width: 0; }
.md-field > span { margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.md-field input, .md-field select { width: 100%; height: 48px; padding: 0 13px; color: var(--ink); border: 1px solid #a8b5b9; border-radius: 4px; outline: 0; background: #fff; }
.md-field input:focus, .md-field select:focus { border: 2px solid var(--primary); padding: 0 12px; }
.query-form .md-field > span { color: #d9e7e5; }
.query-input input { padding-right: 45px; }
.field-clear { position: absolute; right: 4px; bottom: 4px; color: #7a898e; }
.query-button { height: 48px; background: #dda13a; color: #2a241b; }
.query-button:hover { background: #edb550; }
.form-message { min-height: 22px; margin-top: 8px; color: #b4234d; font-size: 13px; }
.query-inner > .form-message { grid-column: 2; align-self: start; margin-top: -34px; color: #ffd9d9; }

.result-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 52px; scroll-margin-top: calc(var(--bar-height) + 10px); }
.is-hidden { display: none !important; }
.student-summary { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; align-items: center; padding: 22px 0 26px; border-bottom: 1px solid var(--line); }
.student-identity { display: flex; align-items: center; gap: 15px; min-width: 0; }
.avatar { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--secondary); font-size: 19px; font-weight: 700; }
.avatar.small { width: 30px; height: 30px; font-size: 12px; background: var(--primary); }
.student-identity-content { min-width: 0; }.student-identity p { margin: 0 0 2px; color: var(--muted); font-size: 12px; }
.student-identity h2 { margin: 0; font-size: 24px; }
.student-identity span { color: var(--muted); font-size: 13px; }
.student-lock-action { min-height: 32px; display: flex; align-items: center; gap: 8px; margin-top: 7px; }.student-lock-action .text-button { min-height: 30px; padding: 0 8px; margin-left: -8px; font-size: 11px; }.student-lock-action .text-button span { color: inherit; }.student-lock-action .material-icons-round { font-size: 17px; }.score-lock-status { display: inline-flex; align-items: center; gap: 5px; color: #1a6c4d !important; font-size: 10px !important; font-weight: 700; }.score-lock-status span { color: inherit; }
.summary-metrics { display: grid; grid-template-columns: repeat(4, 1fr); }
.summary-metrics > div { min-width: 0; padding: 0 20px; border-left: 1px solid var(--line); }
.summary-metrics span, .summary-metrics small { display: block; color: var(--muted); font-size: 11px; }
.summary-metrics strong { display: inline-block; margin: 4px 0 2px; font-size: 25px; line-height: 1; }
.summary-metrics .primary-metric strong { color: var(--primary); font-size: 30px; }

.result-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); gap: 38px; padding: 36px 0; }
.score-section, .insight-panel, .history-section, .notice-section { min-width: 0; }
.section-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-heading h2, .panel-heading h2 { margin: 0; font-size: 19px; }
.legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; color: var(--muted); font-size: 11px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-personal { background: var(--primary); }.dot-class { background: #d99a32; }.dot-grade { background: #88979c; }
.score-list { border-top: 1px solid var(--line); }
.score-row { width: 100%; min-height: 78px; display: grid; grid-template-columns: 86px 72px minmax(140px, 1fr) 84px 84px 34px; align-items: center; gap: 12px; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.score-row:hover { background: #eaf1f1; }
.subject-name { font-weight: 700; }
.subject-name small { display: block; margin-top: 3px; color: var(--amber); font-size: 10px; font-weight: 600; }
.subject-name small.partial-status { color: #a52245; }
.score-value strong { font-size: 24px; }.score-value small { display: block; color: var(--muted); font-size: 10px; }
.score-bar { position: relative; height: 34px; border-bottom: 1px solid #b9c4c7; }
.score-bar span { position: absolute; bottom: -3px; width: 7px; height: 7px; margin-left: -3px; border-radius: 50%; }
.score-bar span::before { content: ""; position: absolute; left: 3px; bottom: 7px; width: 1px; height: 22px; background: currentColor; opacity: .7; }
.score-bar .personal { color: var(--primary); background: var(--primary); }.score-bar .class { color: #d99a32; background: #d99a32; }.score-bar .grade { color: #88979c; background: #88979c; }
.rank-cell span { display: block; color: var(--muted); font-size: 10px; }.rank-cell strong { font-size: 16px; }
.row-arrow { color: #728187; }
.insight-panel { padding-left: 28px; border-left: 1px solid var(--line); }
.chart-wrap { position: relative; width: 100%; min-width: 0; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.mobile-chart-summary { display: none; border-top: 1px solid var(--line); }
.mobile-comparison-row { min-width: 0; display: grid; grid-template-columns: minmax(56px, 1fr) repeat(3, minmax(0, .9fr)); align-items: center; gap: 8px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.mobile-comparison-row > b { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.mobile-comparison-row > span { min-width: 0; text-align: right; }
.mobile-comparison-row small, .mobile-comparison-row strong { display: block; }
.mobile-comparison-row small { color: var(--muted); font-size: 9px; }
.mobile-comparison-row strong { margin-top: 3px; color: var(--primary); font-size: 14px; }
.chart-overview { height: 325px; }.chart-history { height: 260px; }
.chart-tooltip { position: absolute; z-index: 3; min-width: 132px; padding: 8px 10px; color: #fff; border-radius: 4px; background: rgba(24, 34, 38, .94); box-shadow: var(--shadow-1); font-size: 11px; pointer-events: none; opacity: 0; transform: translate(-50%, -100%); transition: opacity .12s; }
.chart-tooltip.is-visible { opacity: 1; }
.chart-tooltip strong { display: block; margin-bottom: 4px; }.chart-tooltip div { display: flex; align-items: center; gap: 5px; line-height: 1.65; }.chart-tooltip i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.insight-note { display: flex; gap: 11px; margin-top: 15px; padding: 14px; border-radius: var(--radius); background: var(--amber-soft); }
.insight-note[hidden] { display: none; }
.insight-note > span { color: var(--amber); }.insight-note p { margin: 0; font-size: 12px; }.insight-note p span { color: #6c5a3e; }
.history-section, .notice-section { padding: 32px 0; border-top: 1px solid var(--line); }
.segmented-control { height: 36px; display: inline-grid; grid-auto-flow: column; border: 1px solid #9aabad; border-radius: 4px; overflow: hidden; }
.segmented-control button { min-width: 70px; padding: 0 12px; border: 0; border-left: 1px solid #9aabad; color: var(--primary); background: transparent; cursor: pointer; }.segmented-control button:first-child { border-left: 0; }.segmented-control button.is-active { color: #fff; background: var(--primary); }
.history-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, .7fr); gap: 36px; }
.history-list { border-top: 1px solid var(--line); }
.history-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.history-item b { font-size: 13px; }.history-item span, .history-item small { color: var(--muted); font-size: 11px; }.history-item strong { color: var(--primary); font-size: 17px; text-align: right; }.history-item strong small { display: block; font-weight: 400; }
.notice-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; }
.notice-item { padding: 16px 0; border-top: 1px solid var(--line); }.notice-item h3 { margin: 0 0 7px; font-size: 14px; }.notice-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }.notice-item time { display: block; margin-top: 8px; color: #8b999e; font-size: 10px; }
.empty-state { width: min(1180px, calc(100% - 48px)); min-height: 310px; margin: 0 auto; display: grid; place-items: center; align-content: center; color: var(--muted); text-align: center; }.empty-state > span { font-size: 54px; color: #9aabad; }.empty-state h2 { margin: 13px 0 4px; color: var(--ink); font-size: 18px; }.empty-state p { max-width: 440px; margin: 0; font-size: 13px; }
.site-footer { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 0 max(24px, calc((100% - 1180px) / 2)); color: #76868c; border-top: 1px solid var(--line); background: #e7ecee; font-size: 11px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(18, 27, 30, .46); }
.detail-drawer { position: fixed; z-index: 61; top: 0; right: 0; width: min(560px, 100%); height: 100vh; padding: 0; background: #fff; box-shadow: var(--shadow-2); transform: translateX(104%); transition: transform .24s ease; overflow: auto; }
.detail-drawer.is-open { transform: translateX(0); }
.drawer-header { position: sticky; top: 0; z-index: 2; min-height: 78px; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fff; }.drawer-header h2 { margin: 0; font-size: 22px; }
.drawer-body { padding: 24px 22px 40px; }
.drawer-score-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 28px; background: var(--surface-alt); border-radius: var(--radius); }.drawer-score-strip div { padding: 16px; border-left: 1px solid var(--line); }.drawer-score-strip div:first-child { border-left: 0; }.drawer-score-strip span, .drawer-score-strip small { display: block; color: var(--muted); font-size: 10px; }.drawer-score-strip strong { font-size: 24px; }
.drawer-section { margin-top: 26px; }.drawer-section h3 { margin: 0 0 12px; font-size: 15px; }.drawer-chart { height: 250px; }.detail-table { width: 100%; border-collapse: collapse; font-size: 12px; }.detail-table th, .detail-table td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; }.detail-table th { color: var(--muted); font-weight: 500; }.empty-detail-state { min-height: 88px; display: grid; place-items: center; padding: 20px; color: var(--muted); border: 1px dashed #b7c2c5; border-radius: 4px; background: #f7f9fa; font-size: 12px; }.scale-callout { margin-top: 16px; padding: 12px 14px; color: #5d4b2d; border-left: 3px solid var(--amber); background: var(--amber-soft); font-size: 12px; }
.partial-score-callout { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 13px 14px; color: #7d1734; border-left: 3px solid var(--rose); background: #fff4f6; }.partial-score-callout > .material-icons-round { font-size: 20px; }.partial-score-callout b, .partial-score-callout small { display: block; }.partial-score-callout small { margin-top: 3px; color: #7d4353; font-size: 10px; line-height: 1.5; }
.question-score-note { margin: -2px 0 10px; padding: 10px 12px; color: #46565c; border-radius: var(--radius); background: #eef2f4; font-size: 10px; line-height: 1.65; }
.question-table { table-layout: fixed; }
.question-table th:last-child, .question-table td:last-child { width: 42%; text-align: right; }
.question-table td:first-child { color: var(--ink); font-weight: 600; }
.question-table td:last-child { color: var(--primary); font-size: 13px; font-weight: 700; }

@media (min-width: 681px) { .history-item:nth-child(n+5) { display: none; } }

/* Admin */
.admin-page { background: var(--canvas); }
.admin-topbar { padding: 0 22px; box-shadow: var(--shadow-1); }
.account-button { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 7px; border: 0; border-radius: 4px; background: transparent; cursor: pointer; font-size: 12px; }
.admin-shell { min-height: calc(100vh - var(--bar-height)); display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.admin-nav { position: sticky; top: var(--bar-height); height: calc(100vh - var(--bar-height)); display: flex; flex-direction: column; justify-content: space-between; padding: 18px 12px 16px; background: #fff; border-right: 1px solid var(--line); }
.admin-nav nav { display: grid; gap: 4px; }.nav-item { width: 100%; height: 46px; display: flex; align-items: center; gap: 14px; padding: 0 14px; border: 0; border-radius: 4px; color: #4e5d63; background: transparent; cursor: pointer; text-align: left; }.nav-item:hover { background: var(--surface-alt); }.nav-item.is-active { color: var(--primary-dark); background: var(--primary-soft); font-weight: 700; }.nav-item.is-active::before { content: ""; position: absolute; left: 0; width: 3px; height: 28px; background: var(--primary); }
.nav-footer { display: flex; align-items: center; gap: 9px; padding: 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }.nav-footer .material-icons-round { color: var(--primary); }
.admin-main { min-width: 0; padding: 30px 34px 56px; }
.admin-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; max-width: 1320px; margin: 0 auto 26px; }.admin-page-head h1 { margin: 0; font-size: 26px; }.admin-page-head > div > p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.grade-switcher { display: inline-grid; grid-template-columns: repeat(3, 72px); height: 40px; padding: 3px; border-radius: 4px; background: #dce3e5; }.grade-switcher button { border: 0; border-radius: 3px; color: var(--muted); background: transparent; cursor: pointer; }.grade-switcher button.is-active { color: var(--primary-dark); background: #fff; box-shadow: var(--shadow-1); font-weight: 700; }
.admin-view { display: none; max-width: 1320px; margin: 0 auto; }.admin-view.is-active { display: block; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(22, 34, 38, .06); }.stat-strip > div { position: relative; min-height: 116px; padding: 20px 18px 16px 64px; border-left: 1px solid var(--line); }.stat-strip > div:first-child { border-left: 0; }.stat-strip p { margin: 0 0 3px; color: var(--muted); font-size: 11px; }.stat-strip strong { display: block; font-size: 26px; }.stat-strip small { color: var(--muted); font-size: 10px; }.stat-icon { position: absolute; top: 22px; left: 18px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }.stat-icon.teal { color: var(--primary); background: var(--primary-soft); }.stat-icon.amber { color: var(--amber); background: var(--amber-soft); }.stat-icon.blue { color: var(--secondary); background: #e6e9f8; }.stat-icon.rose { color: var(--rose); background: #f8e3e9; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 18px; }.span-2 { grid-column: span 2; }
.admin-section { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 1px 3px rgba(22, 34, 38, .06); }.admin-section .panel-heading { margin-bottom: 14px; }.admin-section .panel-heading h2 { font-size: 16px; }
.data-table-wrap { width: 100%; overflow-x: auto; }.data-table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }.data-table th { padding: 11px 12px; color: var(--muted); border-bottom: 1px solid var(--line); background: #f7f9fa; font-weight: 600; text-align: left; }.data-table td { padding: 13px 12px; border-bottom: 1px solid #e5eaec; }.data-table tbody tr:hover { background: #f4f8f8; }.data-table tbody tr:last-child td { border-bottom: 0; }
.status-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 12px; font-size: 10px; font-weight: 600; }.status-published, .status-success { color: #0b5d43; background: #d9f2e8; }.status-draft { color: #7c5413; background: var(--amber-soft); }.status-failed { color: #9c1d3f; background: #f8e3e9; }
.completeness { display: flex; align-items: center; gap: 8px; }.completeness i { width: 60px; height: 5px; border-radius: 3px; background: #dbe3e5; overflow: hidden; }.completeness i::after { content: ""; display: block; width: var(--value); height: 100%; background: var(--primary); }
.activity-list { display: grid; }.activity-item { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }.activity-item:last-child { border-bottom: 0; }.activity-item > .material-icons-round { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: var(--primary-soft); font-size: 17px; }.activity-item p { margin: 0; font-size: 11px; }.activity-item p b { display: block; margin-bottom: 2px; }.activity-item small { color: var(--muted); }
.toolbar { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }.search-field { width: min(340px, 100%); height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #aab7bb; border-radius: 4px; background: #fff; }.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }.search-field .material-icons-round { color: var(--muted); }
.import-layout { display: grid; grid-template-columns: 1fr; gap: 18px; }.import-form-section { padding: 24px; }.step-heading { display: flex; gap: 13px; margin-bottom: 22px; }.step-heading > span { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--primary); font-size: 12px; font-weight: 700; }.step-heading h2 { margin: 0; font-size: 17px; }.step-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.import-stepper { display: grid; grid-template-columns: repeat(4, 1fr); min-height: 68px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }.import-stepper > div { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 11px; }.import-stepper > div:not(:last-child)::after { content: ""; position: absolute; right: -18%; width: 36%; height: 1px; background: var(--line); }.import-stepper span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #9aa8b2; font-size: 10px; }.import-stepper .is-active { color: var(--primary); }.import-stepper .is-active span, .import-stepper .is-complete span { background: var(--primary); }.import-stepper .is-complete { color: var(--ink); }
.exam-choice-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }.exam-choice { min-height: 82px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; text-align: left; }.exam-choice:hover { border-color: #7290e5; background: #f5f7ff; }.exam-choice.is-selected { border: 2px solid var(--primary); padding: 12px 13px; background: var(--primary-soft); }.exam-choice b, .exam-choice small { display: block; }.exam-choice b { margin-bottom: 7px; font-size: 12px; }.exam-choice small { color: var(--muted); font-size: 9px; }
.subject-choice-list { display: grid; grid-template-columns: repeat(5, minmax(84px, 1fr)); gap: 8px; }.subject-choice { min-height: 46px; padding: 0 12px; border: 1px solid #a7b2c4; border-radius: 4px; background: #fff; cursor: pointer; font-weight: 600; }.subject-choice:hover { border-color: var(--primary); }.subject-choice.is-selected { color: #fff; border-color: var(--primary); background: var(--primary); }
.subject-choice.is-total-choice { min-height: 54px; line-height: 1.35; }.subject-choice.is-total-choice:not(.is-selected) { color: var(--primary); border-color: #7290e5; background: #f5f7ff; }
.subject-batch-config { display: grid; gap: 8px; margin-top: 16px; }.subject-config-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }.subject-config-row:last-child { border-bottom: 1px solid var(--line); }.subject-config-row > div:first-child { display: flex; min-width: 0; align-items: center; gap: 10px; }.subject-config-row > div:first-child > .material-icons-round { color: var(--primary); }.subject-config-row p { margin: 0; }.subject-config-row p b, .subject-config-row p small { display: block; }.subject-config-row p b { font-size: 12px; }.subject-config-row p small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.partial-score-question { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 16px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.partial-score-question > div:first-child { display: flex; min-width: 0; align-items: center; gap: 10px; }.partial-score-question > div:first-child > .material-icons-round { color: var(--primary); }.partial-score-question p { margin: 0; }.partial-score-question p b, .partial-score-question p small { display: block; }.partial-score-question p b { font-size: 12px; }.partial-score-question p small { margin-top: 3px; color: var(--muted); font-size: 9px; }.partial-score-options { display: inline-grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 0; border: 1px solid #8fa1ae; border-radius: 4px; overflow: hidden; }.partial-score-options button { min-height: 42px; padding: 0 13px; border: 0; border-left: 1px solid #8fa1ae; color: #44535a; background: #fff; cursor: pointer; font-weight: 600; }.partial-score-options button:first-child { border-left: 0; }.partial-score-options button .material-icons-round { margin-right: 5px; font-size: 17px; vertical-align: middle; }.partial-score-options button.is-selected { color: #fff; background: var(--primary); }
.parse-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }.parse-actions .form-message { flex: 1; margin: 0; }
.inspection-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; border: 1px solid var(--line); border-radius: 4px; }.inspection-summary > div { padding: 13px; border-left: 1px solid var(--line); }.inspection-summary > div:first-child { border-left: 0; }.inspection-summary span, .inspection-summary small { display: block; color: var(--muted); font-size: 9px; }.inspection-summary strong { display: block; margin: 3px 0; font-size: 20px; }.inspection-summary .has-error strong { color: var(--rose); }
.inspection-table-wrap { max-height: 320px; margin-top: 16px; border: 1px solid var(--line); }.inspection-table-wrap .data-table th { position: sticky; top: 0; z-index: 1; }.secure-note { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 10px; }.secure-note .material-icons-round { color: var(--primary); }
.form-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 16px; }.drop-zone { min-height: 176px; display: grid; place-items: center; align-content: center; gap: 7px; border: 2px dashed #9eb2b3; border-radius: var(--radius); background: #f7faf9; cursor: pointer; text-align: center; }.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--primary); background: #edf7f5; }.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }.upload-symbol { color: var(--primary); font-size: 42px; }.drop-zone strong { font-size: 13px; }.drop-zone small { color: var(--muted); font-size: 10px; }
.student-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 10px; }.student-pagination .icon-button:disabled { opacity: .38; cursor: default; }
.student-lock-list { display: grid; gap: 6px; min-width: 210px; }.student-lock-item { min-height: 38px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; padding: 3px 4px 3px 10px; border: 1px solid #a9b8df; border-radius: 4px; background: #f5f7ff; }.student-lock-item > span { overflow: hidden; color: var(--primary); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; }.student-lock-item > div { display: flex; }.student-lock-item .icon-button { width: 32px; height: 32px; color: var(--primary); }.student-lock-item .material-icons-round { font-size: 18px; }.student-lock-item .lock-delete-button { color: var(--rose); }.student-lock-item .icon-button:disabled { opacity: .45; cursor: wait; }
.query-code-result-content { display: grid; gap: 13px; padding: 28px; }.query-code-result-content h2, .query-code-result-content p { margin: 0; }.query-code-result-content > p:not(.eyebrow) { color: var(--muted); font-size: 11px; line-height: 1.6; }.admin-query-code { padding: 14px; color: var(--primary); border-radius: var(--radius); background: var(--primary-soft); font-size: 28px; font-weight: 800; letter-spacing: 0; text-align: center; }.query-code-result-content textarea { width: 100%; min-height: 92px; padding: 11px; resize: none; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; background: #f7f9fa; font: inherit; font-size: 11px; line-height: 1.7; }
.score-lock-dialog { width: min(440px, calc(100% - 28px)); padding: 0; color: var(--ink); border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-2); }.score-lock-dialog::backdrop { background: rgba(12, 20, 31, .62); }.score-lock-dialog form, .score-lock-step { display: grid; gap: 14px; padding: 28px; }.score-lock-step.is-hidden { display: none; }.score-lock-dialog h2, .score-lock-dialog p { margin: 0; }.score-lock-dialog h2 { font-size: 21px; }.score-lock-dialog p:not(.eyebrow) { color: var(--muted); font-size: 11px; line-height: 1.65; }.score-lock-dialog label { margin: 3px 0 -7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.query-code-group { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }.query-code-digit { width: 100%; min-width: 0; aspect-ratio: 1 / 1.1; padding: 0; color: var(--primary); border: 1px solid #9daabd; border-radius: 4px; outline: 0; background: #fff; font-size: 23px; font-weight: 700; text-align: center; }.query-code-digit:focus { border: 2px solid var(--primary); box-shadow: 0 0 0 3px rgba(0, 47, 167, .12); }
.animated-lock { position: relative; width: 58px; height: 64px; margin-bottom: 2px; }.lock-shackle { position: absolute; top: 1px; left: 14px; width: 31px; height: 38px; border: 7px solid var(--primary); border-bottom: 0; border-radius: 18px 18px 0 0; transform-origin: 5px 31px; }.lock-body { position: absolute; z-index: 2; left: 5px; bottom: 0; width: 50px; height: 38px; display: grid; place-items: center; border-radius: 6px; background: var(--primary); box-shadow: var(--shadow-1); }.lock-body i { position: relative; width: 6px; height: 13px; border-radius: 4px; background: #fff; }.lock-body i::before { content: ""; position: absolute; top: -3px; left: -2px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }.animated-lock.is-open .lock-shackle { transform: translate(7px, -2px) rotate(24deg); }.animated-lock.is-locked .lock-shackle { transform: none; }.animated-lock.is-locking .lock-shackle { animation: lock-shackle-close .7s cubic-bezier(.22, .8, .3, 1) forwards; }.animated-lock.is-unlocking .lock-shackle { animation: lock-shackle-open .65s cubic-bezier(.22, .8, .3, 1) forwards; }.animated-lock.is-locking .lock-body { animation: lock-body-confirm .8s ease; }
@keyframes lock-shackle-close { 0% { transform: translate(7px, -2px) rotate(24deg); } 62% { transform: translate(0, 2px) rotate(0); } 100% { transform: none; } }
@keyframes lock-shackle-open { 0% { transform: none; } 55% { transform: translate(0, -3px) rotate(0); } 100% { transform: translate(7px, -2px) rotate(24deg); } }
@keyframes lock-body-confirm { 0%, 100% { transform: scale(1); } 55% { transform: scale(1.08); } }
.file-list { display: grid; gap: 8px; margin-top: 12px; }.file-item { display: grid; grid-template-columns: 30px minmax(180px, 1fr) minmax(150px, 210px) auto 40px; align-items: center; gap: 10px; min-height: 58px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; }.file-item > .material-icons-round { color: #287e58; }.file-item b { display: block; overflow-wrap: anywhere; font-size: 11px; }.file-item small { color: var(--muted); font-size: 9px; }.file-subject-field { display: grid; gap: 3px; }.file-subject-field > span { color: var(--muted); font-size: 9px; }.file-subject-field select { width: 100%; min-height: 36px; padding: 0 28px 0 9px; border: 1px solid #9eabb0; border-radius: 4px; background: #fff; }.file-tags { display: flex; gap: 5px; flex-wrap: wrap; }.file-tags span { padding: 3px 6px; color: var(--secondary); border-radius: 3px; background: #e7eaf8; font-size: 9px; }.file-remove { color: #7b3949; }
.validation-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }.validation-list > div { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 4px; }.validation-list .success { color: #16805e; }.validation-list .warning { color: #9a6510; }.validation-list .error { color: var(--rose); }.validation-list p { margin: 0; font-size: 11px; }.validation-list b, .validation-list small { display: block; }.validation-list small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.inspection-issues { display: grid; gap: 10px; margin-top: 16px; }.issue-group { padding: 14px 16px; border-left: 4px solid; background: #fff; }.issue-group.is-error { color: #7d1734; border-color: var(--rose); background: #fff4f6; }.issue-group.is-warning { color: #76500e; border-color: var(--amber); background: #fff8e8; }.issue-group h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; }.issue-group h3 .material-icons-round { font-size: 18px; }.issue-group h3 small { margin-left: auto; font-weight: 500; }.issue-group ol { max-height: 180px; margin: 10px 0 0; padding-left: 24px; overflow: auto; }.issue-group li { padding: 3px 0; font-size: 10px; line-height: 1.5; }
.header-mapping-panel { margin-top: 18px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.header-mapping-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }.header-mapping-heading h3 { margin: 2px 0 4px; font-size: 14px; }.header-mapping-heading p:last-child { max-width: 760px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }.header-mapping-table { max-height: 300px; margin-top: 14px; border: 1px solid var(--line); }.header-mapping-table .data-table th { position: sticky; top: 0; z-index: 1; }.source-reference { color: var(--primary); font-family: Consolas, monospace; font-weight: 700; }.mapping-method { display: inline-flex; min-height: 22px; align-items: center; padding: 0 7px; border-radius: 11px; font-size: 9px; font-weight: 700; }.mapping-method.is-system { color: #47555a; background: #e8edef; }.mapping-method.is-auto { color: #0b5d43; background: #d9f2e8; }.mapping-method.is-manual { color: var(--primary); background: var(--primary-soft); }.mapping-method.is-review { color: #8a5200; background: #ffedb8; }.mapping-method.is-unmapped { color: #9c1d3f; background: #f8e3e9; }.mapping-method.is-ignored { color: #5b6268; background: #eceff1; }.manual-alignment { margin-top: 16px; padding: 16px; border-left: 4px solid var(--amber); background: #fff8e8; }.manual-alignment h3 { margin: 0 0 4px; font-size: 13px; }.manual-alignment p { margin: 0; color: #76500e; font-size: 10px; }.subject-alignment-rows { display: grid; gap: 9px; margin-top: 14px; }.alignment-row { display: grid; grid-template-columns: minmax(150px, 1fr) 24px minmax(180px, 1fr); align-items: center; gap: 10px; }.alignment-row.is-review { padding: 10px; border-left: 3px solid var(--amber); background: #fffdf6; }.alignment-row label { display: grid; gap: 3px; font-size: 11px; font-weight: 700; }.alignment-row label small { color: var(--muted); font-size: 9px; font-weight: 400; }.alignment-row label em { color: #8a5200; font-size: 9px; font-style: normal; font-weight: 600; }.alignment-row > .material-icons-round { color: #9a6510; font-size: 18px; }.alignment-row select { width: 100%; min-height: 40px; padding: 0 10px; color: var(--ink); border: 1px solid #9eabb0; border-radius: 4px; background: #fff; }.alignment-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }.alignment-actions .form-message { flex: 1; margin: 0; }
.normalized-target { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.column-source { min-width: 0; }.column-source > span { display: flex; min-width: 0; align-items: center; gap: 8px; overflow-wrap: anywhere; }.column-source b { display: inline-grid; width: 30px; min-width: 30px; height: 26px; place-items: center; color: var(--primary); border: 1px solid #9bb0e9; border-radius: 4px; background: #f4f7ff; font-family: Consolas, monospace; }.alignment-row select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
@media (max-width: 700px) { .manual-alignment { padding: 13px; }.subject-alignment-rows { gap: 0; }.alignment-row { gap: 8px; padding: 13px 0; border-bottom: 1px solid #ead9ad; }.alignment-row:last-child { border-bottom: 0; }.alignment-row > .material-icons-round { justify-self: center; }.alignment-row select { min-height: 46px; font-size: 11px; }.alignment-actions { gap: 10px; margin-top: 10px; }.alignment-actions .outlined-button { min-height: 46px; white-space: normal; } }
@media (max-width: 700px) { .partial-score-question, .subject-config-row { align-items: stretch; flex-direction: column; gap: 12px; }.partial-score-options { width: 100%; grid-template-columns: 1fr; }.partial-score-options button { min-height: 46px; border-left: 0; border-top: 1px solid #8fa1ae; }.partial-score-options button:first-child { border-top: 0; } }
.publish-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }.switch-label { display: flex; align-items: center; gap: 11px; cursor: pointer; }.switch-label input { position: absolute; opacity: 0; }.switch { position: relative; width: 38px; height: 20px; border-radius: 12px; background: #9ba9ad; transition: background .2s; }.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .2s; }.switch-label input:checked + .switch { background: var(--primary); }.switch-label input:checked + .switch::after { transform: translateX(18px); }.switch-label b, .switch-label small { display: block; font-size: 11px; }.switch-label small { color: var(--muted); font-size: 9px; }
.notice-admin-list { display: grid; }.notice-admin-item { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 16px 4px; border-bottom: 1px solid var(--line); }.notice-admin-item:last-child { border-bottom: 0; }.notice-admin-item h3 { margin: 0 0 5px; font-size: 13px; }.notice-admin-item p { margin: 0; color: var(--muted); font-size: 11px; }.notice-admin-item time { color: #87969b; font-size: 10px; }
.login-dialog { width: min(410px, calc(100% - 32px)); padding: 0; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-2); }.login-dialog::backdrop { background: rgba(16, 25, 28, .55); }.login-dialog form { display: grid; gap: 15px; padding: 30px; }.login-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--primary); font-size: 28px; }.login-dialog h2 { margin: 2px 0 -10px; font-size: 21px; }.login-dialog p { margin: 0 0 4px; color: var(--muted); font-size: 11px; }
.md-field textarea { width: 100%; min-height: 112px; padding: 11px 13px; resize: vertical; color: var(--ink); border: 1px solid #a8b5b9; border-radius: 4px; outline: 0; font: inherit; font-size: 12px; }.md-field textarea:focus { border: 2px solid var(--primary); padding: 10px 12px; }.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.exam-count-field { min-width: 0; margin: 0; padding: 0; border: 0; }.exam-count-field legend { margin-bottom: 8px; color: var(--muted); font-size: 10px; }.exam-count-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.exam-count-options label { min-width: 0; cursor: pointer; }.exam-count-options input { position: absolute; opacity: 0; }.exam-count-options span { min-height: 64px; display: grid; align-content: center; padding: 9px 11px; border: 1px solid #a8b5b9; border-radius: 4px; background: #fff; }.exam-count-options b, .exam-count-options small { display: block; }.exam-count-options b { color: var(--ink); font-size: 12px; }.exam-count-options small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }.exam-count-options input:checked + span { padding: 8px 10px; border: 2px solid var(--primary); background: var(--primary-soft); }.compact-select { min-height: 34px; padding: 0 26px 0 8px; color: var(--ink); border: 1px solid #a8b5b9; border-radius: 4px; background: #fff; }
@media (max-width: 520px) { .exam-count-options { grid-template-columns: 1fr; } }
.snackbar { position: fixed; z-index: 90; left: 50%; bottom: 24px; min-width: 280px; max-width: calc(100% - 32px); padding: 12px 16px; color: #fff; border-radius: 4px; background: #263238; box-shadow: var(--shadow-2); opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: .2s; font-size: 12px; }.snackbar.is-visible { opacity: 1; transform: translate(-50%, 0); }
.mobile-only { display: none; }
.danger-button { min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #fff; border: 0; border-radius: 4px; background: var(--rose); box-shadow: var(--shadow-1); font-weight: 700; cursor: pointer; white-space: nowrap; }
.danger-button:hover { background: #8f1738; }
.danger-button:disabled, .primary-button:disabled, .outlined-button:disabled { opacity: .48; box-shadow: none; cursor: not-allowed; }
.academic-layout { display: grid; gap: 18px; }
.panel-heading p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.migration-section { padding: 24px; }
.migration-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.migration-flow > div { min-width: 0; min-height: 82px; display: grid; grid-template-columns: 42px 1fr 24px; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 4px; }
.grade-node { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: var(--primary); font-size: 11px; font-weight: 700; }
.grade-node.graduate { background: #535f64; }
.migration-flow p { min-width: 0; margin: 0; }.migration-flow b, .migration-flow small { display: block; }.migration-flow b { font-size: 12px; }.migration-flow small { margin-top: 4px; color: var(--muted); font-size: 9px; }.migration-flow small strong { display: inline; color: var(--primary); font-size: 13px; }.migration-flow > div > .material-icons-round { color: var(--primary); font-size: 19px; }
.migration-note { display: grid; grid-template-columns: 28px 1fr; gap: 9px; padding: 12px 14px; border-left: 3px solid var(--primary); background: #f2f5ff; }.migration-note > span { color: var(--primary); }.migration-note p { margin: 0; }.migration-note b, .migration-note small { display: block; }.migration-note b { font-size: 11px; }.migration-note small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.subsection-title { margin: 24px 0 10px; font-size: 13px; }
.migration-dialog { width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-2); overflow: auto; }.migration-dialog::backdrop { background: rgba(16, 25, 28, .62); }.migration-dialog > div { padding: 28px; }
.migration-dialog-head { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }.migration-dialog-head > .material-icons-round { width: 46px; height: 46px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: var(--rose); font-size: 26px; }.migration-dialog-head h2 { margin: 0; font-size: 21px; }
.migration-impact { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0; border: 1px solid var(--line); border-radius: 4px; }.migration-impact > div { padding: 12px; border-left: 1px solid var(--line); }.migration-impact > div:first-child { border-left: 0; }.migration-impact span, .migration-impact small { display: block; color: var(--muted); font-size: 9px; }.migration-impact strong { display: block; margin: 3px 0; font-size: 21px; }
.consequence-list { margin: 16px 0; padding: 13px 16px 13px 32px; color: #713044; border: 1px solid #efc7d3; background: #fff6f8; font-size: 11px; line-height: 1.8; }
.confirmation-check { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }.confirmation-check input { position: absolute; opacity: 0; }.confirmation-check > .material-icons-round { color: var(--primary); }.confirmation-check p { margin: 0; }.confirmation-check b, .confirmation-check small { display: block; }.confirmation-check b { font-size: 11px; }.confirmation-check small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.migration-progress { display: grid; margin-top: 16px; }.migration-progress > div { display: grid; grid-template-columns: 32px 1fr; gap: 11px; min-height: 64px; opacity: .45; }.migration-progress > div > span { width: 30px; height: 30px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: #98a5aa; font-size: 10px; font-weight: 700; }.migration-progress p { margin: 1px 0 0; }.migration-progress b, .migration-progress small { display: block; }.migration-progress b { font-size: 11px; }.migration-progress small { margin-top: 3px; color: var(--muted); font-size: 9px; }.migration-progress > div.is-active, .migration-progress > div.is-complete { opacity: 1; }.migration-progress > div.is-active > span { background: var(--primary); animation: migration-pulse 1s infinite alternate; }.migration-progress > div.is-complete > span { background: #16805e; }
.migration-result { min-height: 24px; color: var(--primary); font-size: 12px; font-weight: 600; }
@keyframes migration-pulse { to { box-shadow: 0 0 0 6px rgba(0, 47, 167, .15); } }
@media (max-width: 760px) { .migration-flow { grid-template-columns: 1fr; }.migration-dialog > div { padding: 22px 16px; }.migration-impact { grid-template-columns: 1fr; }.migration-impact > div { border-left: 0; border-top: 1px solid var(--line); }.migration-impact > div:first-child { border-top: 0; }.migration-section .panel-heading { align-items: stretch; flex-direction: column; }.migration-section .danger-button { width: 100%; }.academic-layout .admin-section { padding: 15px; } }

@media (max-width: 980px) {
  .query-inner { grid-template-columns: 1fr; gap: 26px; padding: 34px 0; }.query-inner > .form-message { grid-column: 1; margin-top: -20px; }.query-form { justify-content: start; }
  .student-summary { grid-template-columns: 1fr; }.summary-metrics > div:first-child { border-left: 0; padding-left: 0; }
  .result-layout { grid-template-columns: 1fr; }.insight-panel { padding: 28px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .admin-shell { grid-template-columns: 72px minmax(0, 1fr); }.admin-nav { padding-left: 8px; padding-right: 8px; }.nav-item { justify-content: center; padding: 0; }.nav-item span:last-child, .nav-footer span:last-child { display: none; }.nav-footer { justify-content: center; padding: 12px 0; }
  .admin-main { padding: 26px 24px 48px; }.admin-grid { grid-template-columns: 1fr 1fr; }.span-2 { grid-column: span 2; }.form-grid { grid-template-columns: 1fr 1fr; }.validation-list { grid-template-columns: 1fr; }
  .exam-choice-list { grid-template-columns: repeat(2, 1fr); }.subject-choice-list { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 680px) {
  :root { --bar-height: 58px; }
  .top-app-bar { padding: 0 14px; }.brand small, .top-actions > .icon-button { display: none; }.top-actions .text-button { width: 40px; padding: 0; font-size: 0; }.top-actions .text-button .material-icons-round { font-size: 22px; }
  .query-inner, .result-shell, .empty-state { width: calc(100% - 28px); }.query-heading h1 { font-size: 28px; }.query-inner { min-height: 0; padding: 28px 0 34px; }.query-form { grid-template-columns: 1fr; }.grade-tabs { width: 100%; }.query-button { width: 100%; }.query-inner > .form-message { margin-top: -8px; }
  .student-summary { gap: 20px; }.summary-metrics { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }.summary-metrics > div { padding: 0 12px; }.summary-metrics > div:nth-child(3) { padding-left: 0; border-left: 0; }.summary-metrics strong { font-size: 22px; }
  .result-layout { padding: 28px 0; gap: 28px; }.section-heading { align-items: flex-start; }.legend { max-width: 138px; gap: 5px 9px; }
  .score-row { grid-template-columns: 62px 58px minmax(90px, 1fr) 54px 26px; gap: 7px; }.score-row .rank-cell.grade-rank-cell { display: none; }.score-value strong { font-size: 20px; }.score-bar { min-width: 90px; }.rank-cell strong { font-size: 14px; }
  .insight-panel #chart-mode, .chart-overview, .chart-history, .drawer-chart { display: none; }
  .mobile-chart-summary { display: block; }
  .history-layout { grid-template-columns: 1fr; gap: 0; }.notice-list { grid-template-columns: 1fr; }.site-footer { padding: 16px 14px; flex-direction: column; align-items: flex-start; justify-content: center; }
  .subject-comparison-text { margin-top: 2px; }
  .question-score-note { font-size: 11px; }
  .question-table th, .question-table td { padding: 13px 8px; }
  .drawer-score-strip div { padding: 12px 9px; }.drawer-score-strip strong { font-size: 20px; }
  .admin-topbar { padding: 0 10px; }.mobile-only { display: inline-grid; }.admin-topbar .brand { min-width: 0; }.admin-topbar .brand-mark, .admin-topbar .brand small { display: none; }.account-button > span:not(.avatar) { display: none; }
  .admin-shell { display: block; }.admin-nav { position: fixed; z-index: 45; top: var(--bar-height); left: 0; width: 216px; height: calc(100vh - var(--bar-height)); padding: 16px 10px; transform: translateX(-105%); box-shadow: var(--shadow-2); transition: transform .2s; }.admin-nav.is-open { transform: translateX(0); }.nav-item { justify-content: flex-start; padding: 0 14px; }.nav-item span:last-child, .nav-footer span:last-child { display: inline; }.nav-footer { justify-content: flex-start; padding: 12px; }
  .admin-main { padding: 22px 14px 42px; }.admin-page-head { align-items: flex-start; flex-direction: column; }.grade-switcher { width: 100%; grid-template-columns: repeat(3, 1fr); }.stat-strip { grid-template-columns: 1fr 1fr; }.stat-strip > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }.stat-strip > div:nth-child(4) { border-top: 1px solid var(--line); }.admin-grid { grid-template-columns: 1fr; }.span-2 { grid-column: span 1; }.admin-section { padding: 15px; }.toolbar { align-items: stretch; flex-direction: column; }.search-field { width: 100%; }.toolbar .primary-button, .toolbar .outlined-button { align-self: flex-end; }.form-grid { grid-template-columns: 1fr; }.publish-row { align-items: stretch; flex-direction: column; }.publish-row .primary-button { width: 100%; }.file-item { grid-template-columns: 28px minmax(0, 1fr); align-items: start; }.file-subject-field, .file-tags { grid-column: 2; }.file-remove { grid-column: 1; grid-row: 2; }.file-tags { flex-wrap: wrap; }
  .import-stepper { padding: 0 5px; }.import-stepper > div { flex-direction: column; gap: 3px; text-align: center; }.import-stepper > div:not(:last-child)::after { display: none; }.import-stepper b { font-size: 9px; }.exam-choice-list { grid-template-columns: 1fr; }.subject-choice-list { grid-template-columns: repeat(3, 1fr); }.parse-actions { align-items: stretch; flex-direction: column; }.parse-actions .primary-button { width: 100%; }.inspection-summary { grid-template-columns: repeat(2, 1fr); }.inspection-summary > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }.inspection-summary > div:nth-child(4) { border-top: 1px solid var(--line); }
  .header-mapping-heading, .alignment-actions { align-items: stretch; flex-direction: column; }.alignment-row { grid-template-columns: 1fr; }.alignment-row > .material-icons-round { transform: rotate(90deg); }.alignment-actions .outlined-button { width: 100%; }
}
