:root {
  color-scheme: light;
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --ink: #172033;
  --muted: #657084;
  --line: #d9e2ef;
  --blue: #1d4ed8;
  --blue-soft: #dbeafe;
  --green: #047857;
  --green-soft: #d1fae5;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --rose: #be123c;
  --rose-soft: #ffe4e6;
  --teal: #0f766e;
  --shadow: 0 18px 40px rgba(18, 30, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(29, 78, 216, 0.12), transparent 28rem),
    radial-gradient(circle at 92% 20%, rgba(4, 120, 87, 0.11), transparent 22rem),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 48%, #edf4f1 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 12px clamp(16px, 2.4vw, 30px);
  border-bottom: 1px solid rgba(217, 226, 239, 0.86);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #ffffff;
  font-size: 23px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 12px 22px rgba(29, 78, 216, 0.22);
}

.brand h1,
.panel h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.source-link,
.text-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  white-space: nowrap;
}

.source-link:hover,
.text-button:hover,
.icon-button:hover {
  border-color: rgba(29, 78, 216, 0.42);
  background: #eff6ff;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 18px;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(260px, 310px) minmax(460px, 1fr) minmax(300px, 360px);
  gap: 14px;
  min-height: calc(100vh - 70px);
  padding: 14px;
}

.panel {
  min-width: 0;
  border: 1px solid rgba(217, 226, 239, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(18, 30, 51, 0.07);
}

.app-layout > * {
  min-width: 0;
}

.profile-panel,
.side-column {
  align-self: start;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 98px);
  overflow: auto;
}

.profile-panel,
.recommend-panel,
.riasec-panel,
.major-panel,
.basket-panel {
  padding: 16px;
}

.side-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-heading,
.map-toolbar,
.list-head,
.panel-heading.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2,
.map-toolbar h2 {
  overflow-wrap: anywhere;
}

.panel-heading {
  align-items: flex-start;
  margin-bottom: 14px;
}

.panel-heading.compact {
  margin-bottom: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.score-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff, #eff8f4);
}

.score-card label,
.field-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.score-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.score-row input {
  width: 116px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 38px;
  line-height: 1;
  font-weight: 850;
  outline: none;
}

.score-row span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.range {
  width: 100%;
  accent-color: var(--blue);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 14px;
}

select,
input[type="search"],
input[type="number"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 8px 10px;
  outline: none;
}

select:focus,
input:focus {
  border-color: rgba(29, 78, 216, 0.62);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.preference-block {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.preference-head,
.risk-scale {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.preference-head output {
  color: var(--blue);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.quick-stats div {
  min-width: 0;
  padding: 11px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.quick-stats strong,
.quick-stats span {
  display: block;
}

.quick-stats strong {
  font-size: 19px;
}

.quick-stats span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.data-note {
  margin: 13px 0 0;
  padding: 11px;
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  color: #5d4a1e;
  background: var(--amber-soft);
  font-size: 12px;
  line-height: 1.55;
}

.admission-block {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #cfdbe9;
  border-radius: 8px;
  background: #f8fbff;
}

.admission-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admission-head span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.admission-head strong {
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
}

.admission-block p,
.admission-official,
.admission-source {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.admission-official {
  padding: 8px 9px;
  border-radius: 6px;
  color: #36506b;
  background: #eef6ff;
}

.admission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admission-actions input[type="file"] {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(29, 78, 216, 0.18);
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.upload-button:hover {
  background: #173ea8;
}

.map-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(260px, 1fr);
  height: calc(100vh - 98px);
  min-height: 620px;
  overflow: hidden;
}

.map-panel.map-collapsed {
  grid-template-rows: auto 0 auto minmax(420px, 1fr);
}

.map-toolbar {
  padding: 16px 16px 12px;
}

.map-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(520px, 58%);
}

.map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: #ffffff;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 850;
}

.map-toggle:hover {
  border-color: rgba(29, 78, 216, 0.42);
  background: #eff6ff;
}

.toggle-icon {
  display: inline-block;
  width: 14px;
  text-align: center;
  transition: transform 160ms ease;
}

.map-panel.map-collapsed .toggle-icon {
  transform: rotate(180deg);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
}

.search-box input {
  border: 0;
  border-radius: 0;
  padding-left: 0;
}

.search-box input:focus {
  box-shadow: none;
}

.atlas {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 220px;
  gap: 12px;
  max-height: 380px;
  overflow: hidden;
  padding: 0 16px 14px;
  opacity: 1;
  transition: max-height 220ms ease, opacity 160ms ease, padding 220ms ease;
}

.map-panel.map-collapsed .atlas {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.atlas-map {
  position: relative;
  height: 345px;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid #cfdbe9;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(23, 32, 51, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 32, 51, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 64% 52%, rgba(29, 78, 216, 0.13), transparent 16rem),
    radial-gradient(circle at 36% 66%, rgba(4, 120, 87, 0.12), transparent 15rem),
    #f8fbff;
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
}

.atlas-map::before {
  content: "";
  position: absolute;
  inset: 35px 34px 25px 46px;
  border: 1px dashed rgba(23, 32, 51, 0.16);
  border-radius: 42% 58% 48% 52% / 36% 39% 61% 64%;
  transform: rotate(-8deg);
}

.province-node {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 7px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(29, 78, 216, 0.28);
  border-radius: 999px;
  color: #17326f;
  background: rgba(219, 234, 254, 0.88);
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.14);
  font-size: 11px;
  font-weight: 850;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.province-node:hover,
.province-node.active {
  z-index: 2;
  transform: translate(-50%, -50%) scale(1.12);
  border-color: rgba(4, 120, 87, 0.58);
  color: #073f37;
  background: rgba(209, 250, 229, 0.96);
}

.province-node::after {
  content: attr(data-count);
  position: absolute;
  top: -9px;
  right: -8px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  font-size: 9px;
  line-height: 1;
}

.atlas-side {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}

.province-summary {
  padding: 16px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  box-shadow: var(--shadow);
}

.province-summary span,
.province-summary small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.province-summary strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 42px;
  line-height: 1;
}

.bars {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.bars div {
  display: grid;
  grid-template-columns: 40px 1fr 42px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf6;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--green);
}

.bars div:first-child .bar i {
  background: var(--blue);
}

.bars em {
  color: var(--ink);
  font-style: normal;
  text-align: right;
}

.map-legend {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}

.dot.mid {
  background: var(--green);
}

.dot.low {
  background: var(--amber);
}

.list-head {
  padding: 0 16px 11px;
  border-bottom: 1px solid var(--line);
}

.list-head strong {
  font-size: 20px;
}

.list-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.list-head select {
  max-width: 170px;
}

.school-list {
  overflow: auto;
  padding: 12px 16px 16px;
}

.school-card,
.recommend-card,
.major-card,
.basket-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.school-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px;
  margin-bottom: 10px;
}

.school-card:hover,
.recommend-card:hover,
.major-card:hover {
  border-color: rgba(29, 78, 216, 0.36);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.08);
}

.school-main {
  min-width: 0;
}

.school-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.school-name button {
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  font-weight: 850;
  text-align: left;
}

.school-meta,
.school-tags,
.recommend-meta,
.major-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344055;
  font-size: 11px;
  font-weight: 800;
}

.pill.blue {
  color: #17326f;
  background: var(--blue-soft);
}

.pill.green {
  color: #065f46;
  background: var(--green-soft);
}

.pill.amber {
  color: #814707;
  background: var(--amber-soft);
}

.pill.rose {
  color: #9f1239;
  background: var(--rose-soft);
}

.score-chip {
  display: grid;
  place-items: center;
  width: 72px;
  min-height: 72px;
  border-radius: 8px;
  color: var(--blue);
  background: #eff6ff;
  font-weight: 850;
}

.score-chip.real {
  color: var(--green);
  background: #ecfdf5;
}

.score-chip small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.card-actions {
  display: flex;
  gap: 7px;
  margin-top: 11px;
}

.mini-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-strong);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
}

.mini-button.primary {
  border-color: rgba(29, 78, 216, 0.18);
  color: #ffffff;
  background: var(--blue);
}

.segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.segment button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
}

.segment button.active {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.2);
}

.strategy-meter {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
  height: 10px;
  margin: 12px 0;
}

.strategy-meter span {
  border-radius: 999px;
  background: #e7edf6;
}

#rushMeter.active,
#rushMeter.filled {
  background: var(--rose);
}

#steadyMeter.active,
#steadyMeter.filled {
  background: var(--blue);
}

#safeMeter.active,
#safeMeter.filled {
  background: var(--green);
}

.recommend-list {
  display: grid;
  gap: 9px;
}

.recommend-card {
  padding: 11px;
}

.recommend-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.recommend-top strong {
  font-size: 14px;
}

.fit-score {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
}

.recommend-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.major-summary {
  margin-bottom: 10px;
  padding: 11px;
  border-radius: 8px;
  color: #123c35;
  background: var(--green-soft);
  font-size: 12px;
  line-height: 1.55;
}

.major-summary strong {
  display: block;
  margin-bottom: 4px;
  color: #064e3b;
  font-size: 14px;
}

.major-list {
  display: grid;
  gap: 9px;
}

.major-card {
  padding: 11px;
}

.major-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.major-top strong {
  font-size: 14px;
  line-height: 1.35;
}

.major-score {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
}

.major-meta {
  margin-top: 7px;
}

.major-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.major-schools {
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  color: #345;
  background: var(--surface-strong);
  font-size: 12px;
  line-height: 1.45;
}

.major-evidence {
  display: grid;
  gap: 7px;
  margin-top: 9px;
  padding: 8px;
  border-radius: 8px;
  color: #345;
  background: var(--surface-strong);
  font-size: 12px;
  line-height: 1.45;
}

.major-evidence-row {
  display: grid;
  gap: 2px;
}

.major-evidence-row strong {
  color: var(--ink);
  font-size: 12px;
}

.major-evidence-row span,
.major-evidence-row small {
  color: var(--muted);
}

.riasec-grid {
  display: grid;
  gap: 10px;
}

.riasec-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.riasec-item label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.riasec-item small {
  color: var(--muted);
  font-weight: 700;
}

.riasec-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  color: #123c35;
  background: var(--green-soft);
  font-size: 12px;
  line-height: 1.55;
}

.riasec-result strong {
  display: block;
  margin-bottom: 5px;
  color: #064e3b;
  font-size: 14px;
}

.basket-list {
  display: grid;
  gap: 8px;
}

.basket-empty {
  display: grid;
  place-items: center;
  min-height: 94px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 13px;
  text-align: center;
}

.basket-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
}

.basket-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.basket-item span {
  color: var(--muted);
  font-size: 12px;
}

.basket-item button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--rose);
  background: #ffffff;
}

.school-dialog {
  width: min(620px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.school-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 22px;
}

.dialog-content {
  padding: 20px;
}

.dialog-content h3 {
  margin: 0 36px 8px 0;
  font-size: 22px;
}

.dialog-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.dialog-stats div {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.dialog-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.dialog-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.history-box {
  display: grid;
  gap: 9px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #cfdbe9;
  border-radius: 8px;
  background: #f8fbff;
}

.history-box.muted {
  color: var(--muted);
  background: var(--surface-strong);
}

.history-box strong {
  color: var(--ink);
  font-size: 13px;
}

.history-box span {
  color: var(--muted);
  font-size: 12px;
}

.history-table {
  display: grid;
  gap: 6px;
}

.history-table div {
  display: grid;
  grid-template-columns: 50px 56px 1fr 64px minmax(76px, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.history-table div span:first-child {
  color: var(--ink);
  font-weight: 850;
}

.history-table a {
  color: var(--blue);
  text-decoration: none;
}

.history-table a:hover {
  text-decoration: underline;
}

.program-score-box {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #cfdbe9;
  border-radius: 8px;
  background: #fbfdff;
}

.program-score-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.program-score-head strong {
  font-size: 13px;
}

.program-score-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.program-score-list {
  display: grid;
  gap: 8px;
}

.program-score-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.program-score-item strong,
.program-score-item span,
.program-score-item small {
  display: block;
}

.program-score-item > div:first-child {
  min-width: 0;
}

.program-score-item > div:first-child strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.program-score-item span,
.program-score-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.program-score-value {
  display: grid;
  justify-items: end;
}

.program-score-value strong {
  color: var(--teal);
  font-size: 19px;
}

.program-score-value span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.advice-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.advice-list li {
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  transform: translateX(-50%);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.92);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

@media (max-width: 1180px) {
  .app-layout {
    grid-template-columns: 280px minmax(420px, 1fr);
  }

  .side-column {
    grid-column: 1 / -1;
    position: static;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
  }

  .brand p {
    white-space: normal;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .profile-panel {
    position: static;
    max-height: none;
  }

  .map-panel {
    height: auto;
    min-height: auto;
  }

  .atlas,
  .side-column {
    grid-template-columns: 1fr;
  }

  .atlas-map {
    height: 320px;
  }

  .search-box {
    width: 100%;
  }

  .map-tools {
    width: 100%;
    min-width: 0;
  }

  .map-toggle {
    width: 92px;
    justify-content: center;
  }

  .map-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .topbar {
    position: static;
    flex-direction: column;
  }

  .topbar-actions,
  .brand {
    width: 100%;
  }

  .topbar-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .panel-heading {
    flex-wrap: wrap;
  }

  .app-layout {
    padding: 10px;
  }

  .field-grid,
  .quick-stats,
  .dialog-stats {
    grid-template-columns: 1fr;
  }

  .school-card {
    grid-template-columns: 1fr;
  }

  .score-chip {
    width: 100%;
    min-height: 52px;
    grid-auto-flow: column;
    justify-content: center;
    gap: 8px;
  }

  .history-table div {
    grid-template-columns: 48px 56px 1fr;
  }

  .history-table div span:last-child {
    grid-column: 1 / -1;
  }

  .program-score-item {
    grid-template-columns: 1fr;
  }

  .program-score-value {
    grid-auto-flow: column;
    justify-content: space-between;
    justify-items: start;
  }

  .atlas {
    padding-left: 12px;
    padding-right: 12px;
  }

  .atlas-map {
    height: 280px;
  }

  .province-node {
    min-width: 28px;
    height: 28px;
    padding: 0 5px;
    font-size: 10px;
  }
}
