:root {
  --bg: #f4f7fb;
  --panel: rgba(255,255,255,.9);
  --text: #182230;
  --muted: #667085;
  --line: #e4eaf3;
  --brand: #334155;
  --brand-2: #64748b;
  --brand-soft: #eef2f7;
  --soft: #f6f9fe;
  --ok: #027a48;
  --warn: #175cd3;
  --danger: #b42318;
  --shadow: 0 20px 48px rgba(15,23,42,.08);
  --shadow-soft: 0 10px 24px rgba(15,23,42,.05);
  --radius: 28px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(51,65,85,.08), transparent 24%),
    radial-gradient(circle at top right, rgba(100,116,139,.08), transparent 20%),
    linear-gradient(180deg, #edf4ff 0px, #f4f7fb 280px);
}
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 18px 64px; }
.hero, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}
.hero {
  padding: 34px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(100,116,139,.10), transparent 28%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid rgba(31,36,48,.08);
  background: rgba(255,255,255,.92);
}
h1 { margin: 16px 0 12px; font-size: 44px; line-height: 1.06; letter-spacing: -.05em; }
p { color: var(--muted); line-height: 1.8; }
.grid, .stats, .nav-grid, .form-grid, .recommend-grid, .score-grid, .summary-grid, .page-grid, .mini-grid, .hero-grid {
  display: grid;
  gap: 18px;
}
.stats { grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 22px; }
.nav-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  margin-top: 12px;
  gap: 10px;
  align-items: stretch;
}
.form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid .field:nth-child(1),
.form-grid .field:nth-child(2) { grid-column: span 1; }
.form-grid .field:nth-child(3),
.form-grid .field:nth-child(4),
.form-grid .field:nth-child(5),
.form-grid .field:nth-child(6) { grid-column: span 1; }
.form-grid .field:has(.age-select-row) { grid-column: 1 / -1; }
.recommend-grid { grid-template-columns: repeat(3, minmax(0,1fr)); align-items: stretch; }
.score-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.page-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.mini-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.hero-grid { grid-template-columns: 1.2fr .8fr; align-items: start; }
.card { padding: 22px; }
.card h2, .card h3, .card h4 { margin: 0; }
.card-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; margin-bottom: 14px; }
.card-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-head-actions .btn { min-height: 40px; padding: 10px 14px; border-radius: 14px; font-size: 13px; }
.card-head-actions.save-stack {
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.inline-save-note {
  display: none;
  color: #027a48;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}
.stat .k, .mini { color: var(--muted); font-size: 13px; }
.stat .v { margin-top: 8px; font-size: 34px; font-weight: 800; letter-spacing: -.04em; }
.stat .s { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.badge, .tag, .pill {
  display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; border: 1px solid #dbe7ff; background: var(--brand-soft); color: var(--brand);
}
.pill { background: var(--soft); color: #475467; border-color: var(--line); }
.field { margin-bottom: 14px; }
.choice-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
.choice-chips.multi {
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.vertical-choice-chips {
  grid-template-columns: 1fr;
}
.compact-choice-chips {
  grid-template-columns: repeat(2, minmax(0,1fr));
}
.compact-choice-chips .choice-chip {
  min-height: 54px;
  padding: 14px 16px;
}
.choice-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 18px 18px;
  border-radius: 18px;
  border: 1px solid #d8dee9;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: .18s ease;
  box-shadow: var(--shadow-soft);
}
.choice-chip.active {
  border-color: #1d4ed8;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37,99,235,.18), 0 14px 26px rgba(29,78,216,.20);
}
.choice-group-stack {
  display: grid;
  gap: 16px;
}
.choice-group {
  display: grid;
  gap: 10px;
}
.choice-group-title {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: #344054; }
input, textarea, select {
  width: 100%; padding: 15px 16px; border-radius: 16px; border: 1px solid #d8dee9; background: #fff;
  color: var(--text); font-size: 14px; outline: none; resize: vertical; transition: .18s ease;
}
select {
  height: 52px;
  min-height: 52px;
  line-height: 22px;
  padding-top: 14px;
  padding-bottom: 14px;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #98a2b3 50%), linear-gradient(135deg, #98a2b3 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
input::placeholder, textarea::placeholder { color: #98a2b3; }
input:focus, textarea:focus, select:focus { border-color: rgba(51,65,85,.35); box-shadow: 0 0 0 4px rgba(51,65,85,.08); }
select.select-touched,
select.select-filled {
  border-color: #2563eb;
  background-color: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}
select.select-touched:focus,
select.select-filled:focus {
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
input[readonly].locked-input {
  background: #f6f9fe;
  color: #344054;
  border-color: #dbe4f0;
  font-weight: 700;
  cursor: default;
}
input[readonly].locked-input:focus {
  box-shadow: none;
  border-color: #dbe4f0;
}
textarea { min-height: 100px; }
.age-inline-field { min-width: 0; }
.age-right-row { display: flex; align-items: center; gap: 8px; justify-content: flex-end; width: 100%; }
.age-right-row select,
.age-right-row input { min-width: 0; height: 44px; padding-left: 10px; padding-right: 10px; font-size: 13px; }
.age-right-row select { width: 72px; }
.age-right-row input { width: 120px; }
.age-right-row input[readonly] { background: #f8fbff; text-align: center; }
.note, .field-note { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.btn-row, .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.hero-tips { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.hero-tip-card { padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.78); border: 1px solid #e3ebf7; box-shadow: var(--shadow-soft); }
.hero-tip-card strong { display: block; margin-bottom: 6px; font-size: 14px; }
.hero-tip-card span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 13px 18px; border-radius: 16px;
  text-decoration: none; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 700; box-shadow: 0 14px 28px rgba(51,65,85,.16);
}
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost { background: rgba(255,255,255,.85); color: var(--brand); border: 1px solid #dbe7ff; box-shadow: none; }
.file-action-btn input { display: none; }
.btn.save-primary {
  font-size: 16px;
  font-weight: 800;
  min-width: 108px;
}
.btn:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }
.save-success-note {
  margin-top: 10px;
  color: #027a48;
  font-size: 14px;
  font-weight: 700;
}
.nav-card { text-decoration: none; color: inherit; display: block; }
.nav-card .card {
  height: 100%;
  min-height: 86px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.nav-card .card h3 {
  font-size: 15px;
  margin-top: 8px;
  line-height: 1.25;
}
.nav-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nav-current-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 20px rgba(51,65,85,.14);
}
.nav-card:hover .card { transform: translateY(-2px); box-shadow: var(--shadow); }
.nav-card.active .card {
  border-color: rgba(51,65,85,.40);
  background: linear-gradient(180deg, #f1f5f9, #ffffff);
  box-shadow: 0 0 0 4px rgba(51,65,85,.08), 0 18px 34px rgba(51,65,85,.08);
}
.nav-card.active .mini {
  color: var(--brand);
  font-weight: 800;
}
.nav-card.active .card h3 {
  color: var(--brand);
}
.status { margin-top: 12px; font-weight: 600; padding: 12px 14px; border-radius: 14px; background: #f8fbff; border: 1px solid #e1ebfb; }
.status-ok { color: var(--ok); }
.status-error { color: var(--danger); }
.status-busy { color: var(--warn); }
.score-box, .summary-box, .mini-panel {
  padding: 16px; border-radius: 18px; background: #fbfcfe; border: 1px solid var(--line);
}
.culture-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.culture-context-item {
  min-height: 76px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #dfe9f8;
}
.culture-context-item.full {
  grid-column: 1 / -1;
}
.culture-context-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.culture-context-item strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
.form-section {
  margin-top: 18px; padding-top: 18px; border-top: 1px dashed #dbe4f0;
}
.form-section:first-of-type {
  margin-top: 0; padding-top: 0; border-top: 0;
}
.form-section-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px;
}
.form-section-title h3 { margin: 0; font-size: 18px; }
.form-section-title p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.section-divider {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.junior-score-layout {
  display: grid;
  gap: 14px;
}
.junior-score-combined {
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fbfdff, #f7faff);
  border: 1px solid #e3ecfb;
}
.junior-score-combined-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}
.junior-score-combined-head h3 {
  margin: 0;
  font-size: 16px;
}
.junior-score-combined-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.junior-score-combined-head .btn {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
}
.junior-score-columns {
  display: grid;
  grid-template-columns: 365px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.score-group {
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fbfdff, #f7faff);
  border: 1px solid #e3ecfb;
}
.score-group-compact {
  padding: 12px;
  border-radius: 18px;
  width: 100%;
  max-width: 100%;
  background: rgba(255,255,255,.78);
}
.score-group-compact .score-group-head {
  margin-bottom: 8px;
  align-items: center;
}
.score-group-compact .score-group-head h3 {
  font-size: 15px;
}
.score-group-compact .score-group-head p {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
}
.score-group-compact .card-head-actions .btn {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.score-group-compact .card-head-actions .pill {
  padding: 6px 9px;
}
.score-group-side {
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
}
.score-group-side .score-group-head {
  margin-bottom: 8px;
}
.score-group-side .score-group-head h3 {
  font-size: 15px;
}
.score-group-side .score-group-head p {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
}
.score-group-side .card-head-actions .btn {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.score-subsection-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 10px 0 8px;
  padding-top: 10px;
  border-top: 1px solid #e3ecfb;
}
.score-subsection-head:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.score-subsection-head h3 {
  margin: 0;
  font-size: 14px;
}
.score-subsection-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.score-group-side .compact-grid {
  gap: 8px;
  align-items: end;
}
.score-group-side .score-grid-four {
  grid-template-columns: repeat(4, minmax(92px, 1fr));
}
.score-group-side .score-grid-two {
  grid-template-columns: repeat(2, minmax(150px, max-content));
}
.score-group-side .score-grid-one {
  grid-template-columns: minmax(150px, max-content);
}
.score-group-side .field {
  min-width: 0;
  margin-bottom: 6px;
}
.score-group-side label {
  margin-bottom: 5px;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}
.score-group-side input {
  width: 76px;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 10px;
  text-align: center;
}
.score-group-total {
  background: linear-gradient(135deg, #f1f5f9, #f8fbff);
  border-color: #dbe7ff;
  padding: 14px;
}
.score-group-total .score-group-head {
  margin-bottom: 10px;
}
.score-group-total .score-group-head h3 {
  font-size: 15px;
}
.score-group-total .score-group-head p {
  font-size: 12px;
  line-height: 1.5;
}
.score-synthesis-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(5, minmax(76px, 1fr));
  gap: 8px;
  align-items: stretch;
}
.score-synthesis-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  border: 1px solid #dfe8f7;
}
.score-synthesis-item.primary {
  background: #175cd3;
  border-color: #175cd3;
}
.score-synthesis-item label {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}
.score-synthesis-item.primary label {
  color: #fff;
}
.score-synthesis-item label span {
  color: #667085;
  font-weight: 800;
}
.score-synthesis-item.primary label span {
  color: rgba(255,255,255,.82);
}
.score-synthesis-item input {
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
}
.score-synthesis-item.primary input[readonly].locked-input {
  background: #fff;
  color: #175cd3;
  border-color: #fff;
}
.score-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}
.score-group-head h3 {
  margin: 0;
  font-size: 16px;
}
.score-group-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.compact-grid {
  gap: 12px;
}
.subject-conversion-grid {
  display: grid;
  gap: 7px;
}
.subject-conversion-head,
.subject-conversion-row {
  display: grid;
  grid-template-columns: 64px 72px 72px 72px;
  gap: 8px;
  align-items: center;
  justify-content: start;
}
.subject-conversion-head {
  padding: 0 4px 2px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.subject-conversion-row input {
  width: 72px;
  min-height: 38px;
  padding: 9px 8px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.2;
}
.subject-name {
  font-size: 14px;
  font-weight: 800;
  color: #344054;
}
.subject-conversion-row input[readonly] {
  text-align: center;
}
.subject-conversion-row input:not([readonly]) {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  text-align: center;
}
.score-preset-panel {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e3ecfb;
}
.score-preset-title {
  margin-bottom: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}
.score-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.score-preset-btn {
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid #dbe7ff;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.score-preset-btn:hover,
.score-preset-btn.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}
.junior-validation {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.junior-validation.ok {
  color: var(--ok);
  border-color: rgba(2,122,72,.18);
  background: rgba(2,122,72,.05);
}
.junior-validation.warn {
  color: #b54708;
  border-color: rgba(181,71,8,.18);
  background: rgba(181,71,8,.05);
}
.result-highlight {
  padding: 18px; border-radius: 20px; background: linear-gradient(135deg, #f2f7ff, #f9fbff); border: 1px solid #dbe7ff;
}
.result-highlight strong { display: block; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.result-highlight .big { font-size: 28px; font-weight: 800; letter-spacing: -.04em; color: var(--text); }
.result-highlight .sub { margin-top: 6px; font-size: 13px; color: var(--muted); }
.result-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.result-summary-item { padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.result-summary-item .k { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.result-summary-item .v { font-size: 16px; font-weight: 800; }
.score-box strong, .summary-box strong, .mini-panel strong { display: block; margin-bottom: 8px; }
.score-value, .score-chip { display: inline-flex; padding: 7px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; }
.school-card {
  min-height: 280px;
  display: grid;
  grid-template-rows: auto minmax(48px, auto) 46px 58px 1fr;
  gap: 10px;
  padding: 18px;
}
.school-card .tag-row {
  min-height: 30px;
  align-content: start;
}
.school-card h3 {
  min-height: 48px;
  font-size: 20px;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.school-meta {
  min-height: 46px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.school-card-detail {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #e3ecfb;
  background: #f8fbff;
  min-height: 58px;
}
.school-card-detail span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.school-card-detail strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.school-card-detail.feature {
  min-height: 82px;
}
.school-card-detail.feature strong {
  -webkit-line-clamp: 3;
}
.school-score-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.school-score-item { padding: 12px; border-radius: 16px; background: #f8fbff; border: 1px solid #e3ecfb; }
.school-score-item .k { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.school-score-item .v { font-size: 18px; font-weight: 800; }
.risk-low { color: #027a48; }
.risk-mid { color: #175cd3; }
.risk-high { color: #b54708; }
.empty-state { padding: 28px; border-radius: 24px; background: rgba(255,255,255,.72); border: 1px dashed #cfd8e6; color: var(--muted); text-align: center; }
.full { grid-column: 1 / -1; }
.sticky { position: sticky; top: 20px; }
.section-head { margin: 30px 0 14px; }
.section-head h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.03em; }
.section-head p { margin: 0; color: var(--muted); line-height: 1.8; }
.sidebar-section-title {
  margin-top: 18px;
}
.sidebar-result-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #dbe7ff;
}
.sidebar-result-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.sidebar-result-box strong {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  background: #175cd3;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  box-shadow: 0 10px 22px rgba(23,92,211,.18);
}
.sidebar-result-box p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.metric-list { display: grid; gap: 12px; margin-top: 14px; }
.metric-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #fbfcff; border: 1px solid var(--line); }
.metric-row span { color: var(--muted); font-size: 13px; }
.metric-row strong { font-size: 14px; }
.locked-client-chip {
  padding: 14px 16px;
  border-radius: 16px;
  background: #175cd3;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 12px 28px rgba(23,92,211,.22);
}
.student-core-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin-top: 12px;
}
.student-core-chip {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 12px;
  border-radius: 14px;
  background: #175cd3;
  color: #fff;
  box-shadow: 0 10px 22px rgba(23,92,211,.18);
}
.student-core-chip.full {
  grid-column: 1 / -1;
}
.student-core-chip span {
  font-size: 12px;
  font-weight: 700;
  opacity: .82;
}
.student-core-chip strong {
  font-size: 14px;
  line-height: 1.35;
}
.split-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.action-card { padding-top: 18px; }
.action-card .split-actions { margin-top: 0; }
.action-card .save-success-note { margin-top: 12px; }
.task-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--text); }
.task-list li { line-height: 1.8; color: var(--text); }
.plan-section-label {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f2f6ff, #f7f4ff);
  color: #5b6b8c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.plan-shell { display: grid; gap: 22px; }
.plan-header {
  padding: 34px 34px 30px;
  border-radius: 32px;
  background: linear-gradient(135deg, #ffffff 0%, #f6f8ff 48%, #f3f7ff 100%);
  border: 1px solid #dbe7ff;
  box-shadow: 0 24px 70px rgba(15,23,42,.08);
  position: relative;
  overflow: hidden;
}
.plan-header::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(51,65,85,.10), rgba(51,65,85,0));
}
.plan-header-top {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}
.plan-kicker { font-size: 13px; color: #6b7280; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.plan-title { margin: 12px 0 10px; font-size: 46px; line-height: 1.02; letter-spacing: -.06em; max-width: 12ch; }
.plan-subtitle { margin: 0; max-width: 760px; font-size: 15px; }
.plan-student-badge {
  min-width: 280px;
  padding: 20px 22px;
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  border: 1px solid #dbe7ff;
  box-shadow: var(--shadow-soft);
}
.plan-student-badge strong { display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.plan-student-badge .name { font-size: 28px; font-weight: 800; letter-spacing: -.04em; }
.plan-student-badge .sub { margin-top: 6px; color: var(--muted); }
.plan-overview {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 18px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}
.plan-focus {
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(135deg, #eff4ff, #ffffff);
  border: 1px solid #dbe7ff;
}
.plan-focus strong { display: block; margin-bottom: 10px; color: #6b7280; font-size: 13px; }
.plan-focus .big { font-size: 34px; font-weight: 800; line-height: 1.18; letter-spacing: -.05em; }
.plan-focus .sub { margin-top: 10px; color: var(--muted); font-size: 14px; }
.plan-mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.sticky > .plan-mini-grid { grid-template-columns: 1fr; }
.plan-mini-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.92);
  border: 1px solid #e4eaf3;
  box-shadow: var(--shadow-soft);
}
.plan-mini-card .k { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.plan-mini-card .v { font-size: 16px; font-weight: 800; line-height: 1.5; }
.plan-board { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 18px; align-items: start; }
.plan-board.study-plan-main-board { grid-template-columns: 1fr; }
.study-plan-main-board .plan-side-grid { grid-template-columns: 1fr; }
.timeline-card {
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,249,255,.99));
  border: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(15,23,42,.07);
  position: relative;
}
.timeline-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 22px;
  border: 1px dashed rgba(51,65,85,.08);
  pointer-events: none;
}
.timeline-card > * { position: relative; z-index: 1; }
.timeline-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 8px; position: relative; }
.timeline-list::before { display: none; }
.timeline-list > .poster-plan {
  grid-column: 1 / -1;
  width: 100%;
}
.timeline-stage-column {
  display: grid;
  align-content: start;
  gap: 14px;
}
.timeline-stage-title {
  padding: 10px 14px;
  border-radius: 16px;
  background: #182230;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}
.timeline-item {
  display: grid;
  grid-template-columns: 88px minmax(0,1fr);
  gap: 14px;
  align-items: start;
  position: relative;
}
.timeline-phase {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #eef2f7, #f1f5f9);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px rgba(244,247,251,.95);
}
.timeline-content {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fbfcff, #ffffff);
  border: 1px solid #e4eaf3;
  box-shadow: 0 10px 26px rgba(15,23,42,.04);
}
.timeline-item strong { display: block; margin-bottom: 6px; font-size: 16px; }
.timeline-item div { line-height: 1.8; color: #344054; }
.timeline-copy {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.timeline-copy-block {
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e7edf5;
}
.timeline-copy-label {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #1d4ed8;
}
.poster-timeline {
  display: block;
}
.poster-plan {
  position: relative;
  overflow: hidden;
  min-height: 980px;
  padding: 28px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 66% 58%, rgba(255, 128, 107, .16), transparent 34%),
    radial-gradient(circle at 24% 48%, rgba(255, 128, 107, .13), transparent 38%),
    linear-gradient(180deg, #fff8ef, #fff3e7);
  border: 1px solid #f4d5c8;
}
.poster-plan-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: space-between;
  column-gap: 24px;
  row-gap: 12px;
}
.dual-plan .poster-plan-head {
  margin-bottom: 18px;
}
.poster-plan-title-group {
  display: grid;
  justify-items: end;
  align-items: start;
  gap: 4px;
  color: #446da9;
  text-align: right;
}
.poster-plan-code {
  min-width: 0;
  max-width: 168px;
  padding: 7px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1f5a91, #4f76ad);
  color: #fff;
  text-align: left;
  box-shadow: 0 10px 22px rgba(31,90,145,.16);
}
.poster-plan-code span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.poster-plan-code strong {
  display: block;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 900;
  word-break: break-word;
}
.poster-plan-code-inline {
  margin-top: 4px;
}
.poster-plan-name {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 900;
}
.poster-plan-sub {
  margin-top: 0;
  color: #9dc4ec;
  font-size: 24px;
  font-weight: 800;
}
.poster-plan-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: max-content;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ff765d;
  color: #fff;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 -6px 0 rgba(255,255,255,.22);
}
.poster-plan-meta {
  margin: 12px 0 26px;
  display: grid;
  justify-content: center;
  gap: 4px;
  color: #446da9;
  text-align: center;
  font-size: 24px;
  line-height: 1.25;
}
.poster-plan-meta-head {
  margin: 0;
  align-self: start;
  gap: 6px;
}
.poster-plan-meta-left {
  justify-content: start;
  justify-items: start;
  text-align: left;
  max-width: 420px;
}
.poster-plan-meta strong {
  display: block;
  color: #446da9;
  font-size: 22px;
  line-height: 1.2;
}
.poster-plan-meta-target {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 6px;
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f5a91, #4f76ad);
  box-shadow: 0 12px 24px rgba(31,90,145,.18);
}
.poster-plan-meta-target-label {
  white-space: nowrap;
  color: rgba(255,255,255,.86);
}
.poster-plan-meta-target-value {
  display: block;
  color: #fff;
  text-align: left;
  line-height: 1.35;
}
.poster-plan-grid {
  position: relative;
  display: grid;
  gap: 0;
  padding: 54px 0 18px;
}
.poster-plan-grid::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 0;
  left: 50%;
  width: 12px;
  border-radius: 999px;
  background: #d9d2ca;
  transform: translateX(-50%);
}
.poster-plan-grid::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #d9d2ca;
  transform: translateX(-50%);
}
.poster-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
}
.poster-row + .poster-row {
  margin-top: -58px;
}
.poster-col {
  min-width: 0;
}
.poster-col-left {
  display: flex;
  justify-content: flex-end;
}
.poster-col-right {
  display: flex;
  justify-content: flex-start;
}
.poster-col-axis {
  position: relative;
  display: flex;
  justify-content: center;
}
.poster-side-group {
  display: grid;
  align-content: center;
  gap: 8px;
  width: min(430px, 100%);
}
.poster-side-group.side-left {
  justify-items: end;
  text-align: left;
}
.poster-side-group.side-right {
  justify-items: start;
  text-align: left;
}
.poster-axis-group {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100%;
}
.poster-axis-node {
  margin-top: 9px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffff;
  border: 10px solid #1f5a91;
  z-index: 3;
}
.poster-row.warm .poster-axis-node { border-color: #ff765d; }
.poster-row.strong .poster-axis-node { border-color: #f04f4f; }
.poster-row.deep .poster-axis-node { border-color: #d60000; }
.poster-copy {
  color: #446da9;
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(79,118,173,.22);
  box-shadow: 0 10px 24px rgba(68,109,169,.08);
  width: 100%;
  z-index: 2;
}
.poster-copy p {
  margin: 0;
}
.poster-copy p + p {
  margin-top: 4px;
}
.poster-row.left .poster-copy {
  text-align: left;
}
.poster-row.right .poster-copy {
  color: #ef5e4c;
  border-color: rgba(255,118,93,.26);
  box-shadow: 0 10px 24px rgba(239,94,76,.08);
}
.poster-axis-tag {
  position: relative;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: #4f76ad;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  min-width: 180px;
  z-index: 3;
}
.poster-row.warm .poster-axis-tag { background: #ff765d; }
.poster-row.strong .poster-axis-tag { background: #f04f4f; }
.poster-row.deep .poster-axis-tag { background: #d60000; }
.poster-row.left .poster-axis-tag {
  clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 50%, calc(100% - 44px) 100%, 0 100%);
  padding-right: 46px;
}
.poster-row.right .poster-axis-tag {
  clip-path: polygon(44px 0, 100% 0, 100% 100%, 44px 100%, 0 50%);
  padding-left: 46px;
}
.dual-plan {
  min-height: 0;
  padding-bottom: 22px;
  width: 100%;
}
.dual-plan-board {
  position: relative;
  width: 100%;
  padding-top: 18px;
}
.dual-plan-side-title {
  position: absolute;
  top: 0;
  color: #4f76ad;
  font-size: 18px;
  font-weight: 900;
}
.dual-plan-side-title-left { left: 10px; }
.dual-plan-side-title-right { right: 10px; }
.dual-plan-track {
  position: relative;
  display: grid;
  gap: 0;
  padding: 34px 0 16px;
}
.dual-plan-track::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 0;
  left: 50%;
  width: 10px;
  border-radius: 999px;
  background: #d9d2ca;
  transform: translateX(-50%);
}
.dual-plan-track::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #d9d2ca;
  transform: translateX(-50%);
}
.dual-plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
}
.dual-plan-row + .dual-plan-row {
  margin-top: -2px;
}
.dual-plan-left,
.dual-plan-right {
  min-width: 0;
  display: grid;
  gap: 6px;
  max-width: none;
}
.dual-plan-left {
  justify-items: end;
  text-align: left;
  padding-top: 0;
}
.dual-plan-right {
  justify-items: start;
  text-align: left;
  padding-top: 0;
}
.dual-plan-axis {
  display: flex;
  justify-content: center;
  padding-top: 13px;
}
.dual-plan-node {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid #1f5a91;
  z-index: 2;
}
.dual-plan-row.warm .dual-plan-node { border-color: #ff765d; }
.dual-plan-row.strong .dual-plan-node { border-color: #f04f4f; }
.dual-plan-row.deep .dual-plan-node { border-color: #d60000; }
.dual-plan-tag-wrap {
  display: flex;
}
.dual-plan-tag-wrap-left {
  justify-content: flex-end;
}
.dual-plan-tag-wrap-right {
  justify-content: flex-start;
}
.dual-plan-tag {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  background: #4f76ad;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}
.dual-plan-row.warm .dual-plan-tag { background: #ff765d; }
.dual-plan-row.strong .dual-plan-tag { background: #f04f4f; }
.dual-plan-row.deep .dual-plan-tag { background: #d60000; }
.dual-plan-tag-left {
  clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%);
  padding-right: 34px;
}
.dual-plan-tag-right {
  clip-path: polygon(36px 0, 100% 0, 100% 100%, 36px 100%, 0 50%);
  padding-left: 34px;
}
.dual-plan-copy {
  max-width: none;
  width: 100%;
  font-size: 13px;
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(79,118,173,.20);
  box-shadow: 0 10px 24px rgba(68,109,169,.08);
}
.dual-plan-copy p {
  margin: 0;
}
.dual-plan-copy-left {
  color: #4f76ad;
  text-align: left;
}
.dual-plan-copy-right {
  color: #ef5e4c;
  text-align: left;
  border-color: rgba(239,94,76,.22);
  box-shadow: 0 10px 24px rgba(239,94,76,.08);
}
.plan-board .card h2,
.timeline-card h2 { font-size: 24px; letter-spacing: -.03em; }
.plan-board .card p,
.timeline-card p { font-size: 14px; }
.plan-side-grid { display: grid; gap: 18px; }
.plan-side-grid .card { min-height: 100%; }
.plan-side-grid .card,
.plan-note {
  position: relative;
  overflow: hidden;
}
.plan-side-grid .card::before,
.plan-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(51,65,85,.72), rgba(100,116,139,.35));
}
.plan-side-grid .card > *,
.plan-note > * { position: relative; z-index: 1; }
.plan-note {
  padding: 20px 20px 20px 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff8ef, #fff);
  border: 1px solid #fde7c2;
  line-height: 1.8;
}
.plan-note strong { display: block; margin-bottom: 8px; }
.step-tip { margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, #edf3ff, #f8fbff); border: 1px solid #dbe7ff; color: #1849a9; font-weight: 600; line-height: 1.8; }
.dashboard-entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.entry-qr-card {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #dbe7ff;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.entry-qr-copy {
  display: grid;
  gap: 4px;
}
.entry-qr-copy strong {
  color: #15315b;
  font-size: 16px;
  font-weight: 900;
}
.entry-qr-copy span {
  color: #61738d;
  font-size: 13px;
  line-height: 1.7;
}
.entry-qr-media {
  display: flex;
  justify-content: center;
}
.entry-qr-media img {
  width: min(220px, 100%);
  height: auto;
  display: block;
  border-radius: 18px;
  border: 1px solid #dbe7ff;
  background: #fff;
  padding: 10px;
  box-shadow: var(--shadow-soft);
}
.entry-qr-link {
  color: #175cd3;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.entry-qr-link:hover {
  text-decoration: underline;
}
.data-hub-section {
  padding: 24px;
}
.data-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.data-hub-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid #dbe7ff;
  background: linear-gradient(180deg, #fbfdff, #f5f9ff);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.data-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(51,65,85,.28);
}
.data-hub-top, .data-hub-tags, .admin-action-grid, .toolbar-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.data-hub-card h3 {
  margin: 14px 0 8px;
  font-size: 24px;
  letter-spacing: -.03em;
}
.data-hub-card p {
  margin: 0;
}
.data-hub-tags {
  margin-top: 16px;
}
.admin-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
}
.upload-dropzone {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed #bfd3ff;
  background: linear-gradient(135deg, #f7faff, #ffffff);
  cursor: pointer;
}
.upload-dropzone input {
  display: none;
}
.upload-dropzone strong {
  font-size: 15px;
}
.rule-edit-list {
  display: grid;
  gap: 14px;
  margin: 12px 0 18px;
}
.rule-axis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.rule-axis-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #dbe6f6;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.rule-axis-title {
  color: #15315b;
  font-size: 16px;
  font-weight: 900;
}
.rule-axis-list {
  display: grid;
  gap: 10px;
}
.rule-axis-list-horizontal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.rule-axis-item {
  display: grid;
  gap: 4px;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid #dbe6f6;
  background: #fff;
}
.rule-axis-item strong {
  color: #15315b;
  font-size: 14px;
  font-weight: 900;
}
.rule-axis-item span {
  color: #61738d;
  font-size: 13px;
  line-height: 1.55;
}
.rule-matrix-shell {
  overflow: auto;
  border: 1px solid #dbe6f6;
  border-radius: 20px;
  background: #fff;
}
.rule-matrix-grid {
  display: grid;
  grid-template-columns: 148px repeat(4, minmax(180px, 1fr));
  min-width: 880px;
}
.rule-matrix-corner,
.rule-matrix-colhead,
.rule-matrix-rowhead,
.rule-matrix-cell {
  padding: 16px 16px 18px;
  border-right: 1px solid #e5edf8;
  border-bottom: 1px solid #e5edf8;
}
.rule-matrix-corner {
  display: grid;
  gap: 6px;
  background: linear-gradient(135deg, #edf4ff 0%, #f9fbff 100%);
}
.rule-matrix-corner span {
  color: #5f718b;
  font-size: 12px;
  font-weight: 800;
}
.rule-matrix-corner strong {
  color: #15315b;
  font-size: 18px;
  line-height: 1.2;
}
.rule-matrix-colhead {
  background: #f7fbff;
  color: #15315b;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}
.rule-matrix-rowhead {
  display: grid;
  gap: 5px;
  align-content: center;
  background: #f7fbff;
}
.rule-matrix-rowhead strong {
  color: #15315b;
  font-size: 17px;
  font-weight: 900;
}
.rule-matrix-rowhead span {
  color: #61738d;
  font-size: 13px;
  font-weight: 700;
}
.rule-matrix-cell {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 202px;
  background: #fff;
}
.rule-matrix-split {
  display: grid;
  gap: 8px;
  padding: 12px 12px 13px;
  border-radius: 16px;
  background: #f8fafc;
}
.rule-matrix-split .field {
  margin-bottom: 0;
}
.rule-matrix-split .field label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  margin-bottom: 6px;
  color: #5f718b;
  font-size: 11px;
  font-weight: 900;
}
.rule-matrix-editor {
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 20px;
  border: 2px solid #d9e4f7;
  background: #ffffff;
  color: #15315b;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03);
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rule-matrix-editor:empty::before {
  content: attr(data-placeholder);
  color: #9aa8bd;
}
.rule-matrix-editor:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.rule-matrix-split + .rule-matrix-split {
  border-top: 1px dashed #d6dfef;
  padding-top: 14px;
}
.rule-matrix-cell-active,
.rule-matrix-cell-empty {
  background: #fcfdff;
}
.rule-matrix-split-overseas {
  background: linear-gradient(180deg, #f7f7ff 0%, #fbfbff 100%);
}
.rule-matrix-split-filled {
  background: linear-gradient(180deg, #1e3a8a 0%, #2563eb 100%);
  border: 2px solid #dbeafe;
  box-shadow: 0 16px 32px rgba(37, 99, 235, .22);
}
.rule-matrix-split-filled .field label {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.rule-matrix-editor-filled {
  border-color: rgba(255,255,255,.42) !important;
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
  box-shadow: none;
}
.rule-matrix-editor-filled:empty::before {
  color: rgba(255,255,255,.72);
}
.rule-matrix-editor-filled:focus {
  border-color: #fff !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,.18);
}
.rule-matrix-grid > :nth-child(5n) {
  border-right: 0;
}
.rule-matrix-grid > :nth-last-child(-n + 5) {
  border-bottom: 0;
}

.rule-edit-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fbfdff;
}
.rule-edit-card textarea {
  min-height: 88px;
}
.upload-dropzone span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-top: 16px;
  background: #fff;
}
.district-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.subtype-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
}
.subtype-tabs .district-tab {
  width: 100%;
  min-height: 118px;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  padding: 18px 20px;
  border-radius: 14px;
}
.subtype-tabs .district-tab span {
  min-width: 0;
  line-height: 1.45;
  white-space: normal;
  word-break: keep-all;
}
.subtype-tabs .district-tab strong {
  flex: 0 0 auto;
  min-width: 44px;
  margin-top: 12px;
  font-size: 16px;
}
.district-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #d7e2f2;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
}
.district-panel-title {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}
.district-panel-meta {
  color: #2457b8;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.district-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid #d7e2f2;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16, 24, 40, .04);
}
.district-tab strong {
  min-width: 34px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  text-align: center;
  font-size: 13px;
}
.district-tab.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 24px rgba(30, 102, 245, .22);
}
.district-tab.is-active strong {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}
.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}
.data-table th {
  background: #f8fbff;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
.school-art-name {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1f5eff;
  font-weight: 800;
}
.school-art-type {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff3df;
  color: #b76a00;
  font-weight: 800;
}
.school-note-box {
  display: inline-block;
  width: 8em;
  max-width: 8em;
  line-height: 1.45;
  white-space: normal;
  word-break: break-all;
}
.junior-cell-box {
  display: inline-block;
  min-width: 12em;
  max-width: 15em;
  color: #1f2a37;
  font-size: 14px;
  line-height: 1.55;
  white-space: normal;
  word-break: break-all;
}
.school-art-row td:last-child {
  color: #243b7a;
  font-weight: 700;
}
.upload-preview {
  min-height: 160px;
  padding: 16px;
  border-radius: 18px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.8;
  white-space: pre-wrap;
}
.preview-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.preview-table th,
.preview-table td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  font-size: 12px;
  text-align: left;
}
@media (max-width: 980px) {
  .stats, .recommend-grid, .score-grid, .summary-grid, .school-score-grid, .mini-grid, .result-summary-grid, .plan-mini-grid, .data-hub-grid, .dashboard-entry-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-grid, .plan-overview, .plan-board, .admin-layout { grid-template-columns: 1fr; }
  .page-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .rule-axis-grid { grid-template-columns: 1fr; }
  .rule-axis-list-horizontal { grid-template-columns: 1fr; }
  .junior-score-columns { grid-template-columns: 1fr; }
  .score-group-compact { width: auto; }
  .plan-header-top { display: grid; grid-template-columns: 1fr; }
  .plan-title { max-width: none; }
  .sticky { position: sticky; }
}
@media (max-width: 860px) {
  .page-grid { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 760px) {
  .wrap { padding: 16px 12px 44px; }
  .hero, .card { border-radius: 22px; }
  .hero { padding: 22px 18px; }
  h1 { font-size: 32px; }
  .stats, .form-grid, .recommend-grid, .score-grid, .summary-grid, .school-score-grid, .mini-grid, .hero-tips, .result-summary-grid, .plan-mini-grid, .data-hub-grid, .dashboard-entry-grid { grid-template-columns: 1fr; }
  .district-tabs { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .subtype-tabs { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .district-panel-head { align-items: flex-start; flex-direction: column; }
  .district-panel-title { font-size: 18px; }
  .nav-grid {
    grid-template-columns: repeat(6, minmax(116px,1fr));
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .nav-grid::-webkit-scrollbar { height: 6px; }
  .nav-grid::-webkit-scrollbar-thumb { background: #cfd8e6; border-radius: 999px; }
  .nav-card .card { min-height: 108px; }
  .plan-title { font-size: 32px; }
  .plan-header { padding: 22px 18px; }
  .plan-student-badge { min-width: 0; }
  .timeline-list { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-phase { justify-self: center; box-shadow: 0 0 0 6px rgba(244,247,251,.95); }
  .poster-plan { min-height: 0; padding: 18px; }
  .poster-plan-head { display: grid; justify-content: stretch; text-align: center; }
  .poster-plan-title-group { justify-items: center; }
  .poster-plan-code {
    min-width: 0;
    max-width: none;
    text-align: center;
  }
  .poster-plan-code strong { font-size: 13px; }
  .poster-plan-name { font-size: 26px; }
  .poster-plan-sub { font-size: 18px; }
  .poster-plan-title { font-size: 24px; letter-spacing: 0; }
  .poster-plan-meta { font-size: 18px; }
  .poster-plan-grid { gap: 12px; padding: 18px 0 10px; }
  .poster-row + .poster-row { margin-top: 0; }
  .poster-plan-grid::before { top: 16px; left: 18px; width: 8px; transform: none; }
  .poster-plan-grid::after {
    top: 0;
    left: 18px;
    width: 30px;
    height: 30px;
    transform: translateX(-50%);
  }
  .poster-row {
    grid-template-columns: 36px minmax(0,1fr);
    gap: 10px;
  }
  .poster-col-left,
  .poster-col-right,
  .poster-col-axis {
    grid-column: 1 / -1;
  }
  .poster-col-left,
  .poster-col-right {
    justify-content: stretch;
  }
  .poster-side-group,
  .poster-side-group.side-left,
  .poster-side-group.side-right {
    gap: 10px;
    width: auto;
    justify-items: start;
  }
  .poster-row.left .poster-axis-tag,
  .poster-row.right .poster-axis-tag {
    clip-path: none;
    border-radius: 12px;
    padding: 10px 14px;
  }
  .poster-axis-tag { font-size: 18px; min-width: 0; min-height: 0; }
  .poster-copy,
  .poster-row.left .poster-copy,
  .poster-row.right .poster-copy {
    width: auto;
    text-align: left;
    font-size: 14px;
    margin: 0;
    padding: 12px 14px;
  }
  .poster-axis-node {
    width: 30px;
    height: 30px;
    border-width: 6px;
    margin-top: 4px;
  }
  .dual-plan-side-title {
    position: static;
    text-align: center;
    font-size: 18px;
    margin-bottom: 10px;
  }
  .dual-plan-board { padding-top: 0; }
  .dual-plan-track {
    padding: 28px 0 10px;
    gap: 12px;
  }
  .dual-plan-track::before { left: 14px; width: 8px; transform: none; }
  .dual-plan-track::after {
    left: 14px;
    width: 24px;
    height: 24px;
    transform: translateX(-50%);
  }
  .dual-plan-row,
  .dual-plan-row + .dual-plan-row {
    grid-template-columns: 28px minmax(0, 1fr);
    margin-top: 0;
    gap: 8px;
  }
  .dual-plan-left,
  .dual-plan-axis,
  .dual-plan-right {
    grid-column: 1 / -1;
  }
  .dual-plan-left,
  .dual-plan-right {
    justify-items: start;
  }
  .dual-plan-axis {
    justify-content: flex-start;
  }
  .dual-plan-node {
    width: 24px;
    height: 24px;
    border-width: 5px;
  }
  .dual-plan-tag {
    min-height: 0;
    font-size: 18px;
    clip-path: none;
    border-radius: 10px;
    padding: 10px 14px;
  }
  .dual-plan-copy-left,
  .dual-plan-copy-right {
    font-size: 13px;
  }
  .card-head { flex-direction: column; }
  .subject-conversion-head, .subject-conversion-row { grid-template-columns: 50px minmax(90px, 1fr) 72px 72px; gap: 8px; }
  .btn-row, .hero-actions, .split-actions, .admin-action-grid, .toolbar-row { flex-direction: column; align-items: stretch; }
  .data-table { min-width: 680px; }
}

.page-number-badge {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 9999;
  border-radius: 4px;
  padding: 3px 6px;
  background: rgba(15, 23, 42, .7);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .18);
}
@media print {
  .page-number-badge { display: none; }
}
.art-stage-high { display: none; }


.rule-matrix-actions {
  margin-top: 18px;
}
.rule-admin-legacy-actions {
  display: none;
}


.rule-matrix-split-filled {
  background: linear-gradient(180deg, #1e3a8a 0%, #2563eb 100%);
  border: 2px solid #dbeafe;
  box-shadow: 0 16px 32px rgba(37, 99, 235, .34);
}
.rule-matrix-split-filled .field label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}
.rule-matrix-split-filled input,
.rule-matrix-split.rule-matrix-split-filled input[type="text"] {
  min-height: 44px;
  border: 2px solid rgba(255,255,255,.58) !important;
  background: rgba(255,255,255,.16) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  box-shadow: none;
}
.rule-matrix-split-filled input:focus,
.rule-matrix-split.rule-matrix-split-filled input[type="text"]:focus {
  outline: none;
  border-color: #fff !important;
  background: rgba(255,255,255,.18) !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,.22);
}
.rule-matrix-split-filled input::placeholder,
.rule-matrix-split.rule-matrix-split-filled input[type="text"]::placeholder {
  color: rgba(255,255,255,.76) !important;
  -webkit-text-fill-color: rgba(255,255,255,.76);
}


.rule-matrix-target-input::-webkit-contacts-auto-fill-button,
.rule-matrix-target-input::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
  position: absolute;
  right: 0;
}
.rule-matrix-target-input::-ms-reveal,
.rule-matrix-target-input::-ms-clear {
  display: none;
}


.rule-template-section {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #e5edf8;
}
.rule-template-head {
  align-items: start;
}
.rule-template-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rule-template-tab {
  border: 1px solid #cfe0f6;
  background: #f8fbff;
  color: #15315b;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: .18s ease;
}
.rule-template-tab.active {
  background: linear-gradient(180deg, #1e3a8a 0%, #2563eb 100%);
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .22);
}
.rule-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.rule-template-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #dbe6f6;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.rule-template-card-head {
  display: grid;
  gap: 4px;
}
.rule-template-card-head strong {
  color: #15315b;
  font-size: 15px;
  font-weight: 900;
}
.rule-template-card-head span {
  color: #61738d;
  font-size: 12px;
  font-weight: 700;
}
.rule-template-card .field {
  margin-bottom: 0;
}
.rule-template-card textarea {
  min-height: 108px;
  resize: vertical;
}
@media (max-width: 960px) {
  .rule-template-grid {
    grid-template-columns: 1fr;
  }
}


.student-admin-list {
  display: grid;
  gap: 14px;
}
.student-admin-card {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid #dbe4f0;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.student-admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.student-admin-title {
  font-size: 16px;
  font-weight: 800;
  color: #101828;
}
.student-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.student-admin-item {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.student-admin-item span {
  font-size: 12px;
  color: var(--muted);
}
.student-admin-item strong {
  font-size: 14px;
  color: #101828;
  line-height: 1.6;
  font-weight: 800;
}
.student-admin-item em {
  font-style: normal;
  font-size: 13px;
  color: #1d4ed8;
  font-weight: 700;
}
.student-admin-item.full {
  grid-column: 1 / -1;
}
.student-admin-empty {
  padding: 24px 18px;
  border-radius: 18px;
  border: 1px dashed #d0d7e5;
  color: var(--muted);
  background: #f8fbff;
}
@media (max-width: 820px) {
  .student-admin-grid {
    grid-template-columns: 1fr;
  }
}


.student-admin-shell {
  display: grid;
  gap: 18px;
}
.student-admin-tools,
.student-admin-table-card {
  width: 100%;
}
.student-admin-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.student-admin-table-head {
  align-items: flex-start;
}
.student-admin-toolbar {
  grid-template-columns: minmax(280px, 1.4fr) 180px 220px;
  margin-bottom: 14px;
}
.student-admin-table-wrap {
  overflow: auto;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #fff;
}
.student-admin-table {
  width: 100%;
  min-width: 1600px;
  border-collapse: separate;
  border-spacing: 0;
}
.student-admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbff;
  color: #48607d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid #dbe4f0;
  white-space: nowrap;
}
.student-admin-table tbody td {
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid #edf2f8;
  color: #101828;
  font-size: 13px;
  line-height: 1.55;
  background: #fff;
}
.student-admin-table tbody tr:nth-child(even) td {
  background: #fcfdff;
}
.student-admin-table tbody tr:hover td {
  background: #f6f9ff;
}
.student-cell-code strong,
.student-cell-dual strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.student-cell-dual span,
.student-cell-text,
.student-cell-wide,
.student-admin-table .table-note {
  display: block;
  margin-top: 4px;
}
.student-cell-dual span {
  color: #60758f;
  font-size: 12px;
}
.student-cell-text,
.student-cell-wide {
  color: #334155;
}
.student-admin-table .table-note {
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}
.student-admin-table .score-chip {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
}
.student-admin-table th:nth-child(1),
.student-admin-table td:nth-child(1) { min-width: 132px; }
.student-admin-table th:nth-child(2),
.student-admin-table td:nth-child(2) { min-width: 152px; }
.student-admin-table th:nth-child(3),
.student-admin-table td:nth-child(3) { min-width: 126px; }
.student-admin-table th:nth-child(4),
.student-admin-table td:nth-child(4) { min-width: 196px; }
.student-admin-table th:nth-child(5),
.student-admin-table td:nth-child(5) { min-width: 270px; }
.student-admin-table th:nth-child(6),
.student-admin-table td:nth-child(6) { min-width: 220px; }
.student-admin-table th:nth-child(7),
.student-admin-table td:nth-child(7) { min-width: 150px; }
.student-admin-table th:nth-child(8),
.student-admin-table td:nth-child(8) { min-width: 190px; }
.student-admin-table th:nth-child(9),
.student-admin-table td:nth-child(9) { min-width: 220px; }
.student-admin-table th:nth-child(10),
.student-admin-table td:nth-child(10) { min-width: 148px; }
@media (max-width: 1100px) {
  .student-admin-action-grid,
  .student-admin-toolbar {
    grid-template-columns: 1fr;
  }
}

.student-cell-action {
  padding-top: 12px;
}
.student-link-entry {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d7e5ff;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.student-link-entry strong {
  display: block;
  color: #123b7a;
  font-size: 13px;
  font-weight: 800;
}
.student-link-entry span {
  display: block;
  margin-top: 4px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}
.student-link-entry em {
  display: inline-flex;
  margin-top: 8px;
  font-style: normal;
  color: #0f5bd6;
  font-size: 12px;
  font-weight: 800;
}
.student-link-entry:hover {
  border-color: #9fc0ff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.student-link-plan {
  border-color: #cfe2ff;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}
.student-link-plan strong {
  color: #0f3f87;
}
.student-link-plan span {
  color: #5b6f8f;
}
.student-link-plan em {
  color: #1d4ed8;
}

.art-upload-panel {
  display: grid;
  gap: 12px;
}
.art-comment-helper {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fbff;
}
.art-comment-helper-copy {
  font-size: 13px;
  line-height: 1.7;
  color: #475467;
}
.art-comment-helper-meta {
  font-size: 12px;
  line-height: 1.6;
  color: #5b6f8f;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.82);
  border: 1px solid #e3ebf7;
}
.art-comment-mode-hint {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dbe4f0;
  background: #fff;
}
.art-comment-mode-hint strong {
  font-size: 12px;
  font-weight: 800;
  color: #123b7a;
}
.art-comment-mode-hint span {
  font-size: 12px;
  line-height: 1.6;
  color: #5b6f8f;
}
.art-comment-mode-hint.is-llm {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}
.art-comment-mode-hint.is-llm strong {
  color: #1d4ed8;
}
.art-comment-mode-hint.is-fallback {
  border-color: #dbe4f0;
  background: #ffffff;
}
.art-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.art-analysis-grid:empty {
  display: none;
}
.art-analysis-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dbe4f0;
  background: #ffffff;
}
.art-analysis-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.art-analysis-bar-card .art-analysis-card-value {
  min-height: 66px;
}
.art-analysis-bar-score {
  min-width: 38px;
  text-align: right;
  font-size: 18px;
  font-weight: 800;
  color: #1d4ed8;
}
.art-analysis-bar-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e8eef8;
  overflow: hidden;
  margin-top: 10px;
}
.art-analysis-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
}
.art-analysis-bar-fill[data-band="A1"],
.art-analysis-bar-fill[data-band="A2"],
.art-analysis-bar-fill[data-band="A3"] {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}
.art-analysis-bar-fill[data-band="B1"],
.art-analysis-bar-fill[data-band="B2"],
.art-analysis-bar-fill[data-band="B3"] {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}
.art-analysis-bar-fill[data-band="C1"],
.art-analysis-bar-fill[data-band="C2"],
.art-analysis-bar-fill[data-band="C3"] {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}
.art-analysis-bar-fill[data-band="D"] {
  background: linear-gradient(90deg, #f97316 0%, #dc2626 100%);
}
.art-analysis-slider {
  width: 100%;
  margin-top: 10px;
  accent-color: #2563eb;
}
.art-analysis-card.is-wide {
  grid-column: 1 / -1;
}
.art-analysis-card-label {
  font-size: 12px;
  font-weight: 800;
  color: #123b7a;
  margin-bottom: 6px;
}
.art-analysis-card-value {
  font-size: 13px;
  line-height: 1.7;
  color: #475467;
}
.art-comment-helper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.art-upload-dropzone {
  min-height: 0;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.art-upload-dropzone.is-dragover {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}
.art-upload-dropzone.is-disabled {
  opacity: 0.68;
  cursor: not-allowed;
}
.art-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.art-upload-empty {
  padding: 18px;
  border: 1px dashed #d6dfef;
  border-radius: 14px;
  color: #6b7280;
  background: #f8fbff;
  font-size: 13px;
}
.art-work-card {
  position: relative;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.art-work-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: calc(100% - 16px);
}
.art-work-move,
.art-work-remove {
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 8px 10px;
  cursor: pointer;
}
.art-work-move {
  background: rgba(37, 99, 235, 0.9);
}
.art-work-move.is-disabled,
.art-work-remove.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.art-work-card a {
  display: block;
  aspect-ratio: 1 / 1;
  background: #f3f6fb;
}
.art-work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.art-work-meta {
  padding: 10px 12px;
  font-size: 12px;
  color: #475467;
  border-top: 1px solid #eef2f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.art-work-note-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 0 12px 12px;
}
.art-work-note-input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8e2f0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  color: #334155;
  background: #fff;
}
.art-work-note-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.art-work-note-save {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.art-work-note-save:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.art-work-card.is-uploading {
  border-style: dashed;
  background: #f8fbff;
}
.art-work-card.is-uploading a {
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
}
.art-work-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255,255,255,0.66);
  backdrop-filter: blur(1px);
}
.art-work-placeholder::after {
  content: '';
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 3px solid rgba(37, 99, 235, 0.18);
  border-top-color: #2563eb;
  animation: art-upload-spin .8s linear infinite;
}
.art-work-placeholder-label {
  position: absolute;
  bottom: 14px;
  left: 12px;
  right: 12px;
  text-align: center;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
@keyframes art-upload-spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 900px) {
  .art-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .art-upload-grid {
    grid-template-columns: 1fr;
  }
}
