:root {
  --bg: #faf5ec;
  --panel: #fffdf7;
  --line: #e6ddc8;
  --line-strong: #d3c5a7;
  --ink: #241f1b;
  --ink-deep: #171310;
  --muted: #5f5343;
  --primary: #a43024;
  --primary-deep: #7e241c;
  --primary-soft: #f9e7e1;
  --gold: #c49a4d;
  --gold-bright: #d2b36b;
  --gold-soft: #f5ecd3;
  --amber: #a05f12;
  --amber-soft: #f8ecd8;
  --green: #2c6a4c;
  --green-soft: #e6f2ea;
  --danger: #a9312a;
  --surface-2: #f8f2e7;
  --surface-3: #fdf9f1;
  --field-bg: #fffdf7;
  --hover-bg: rgba(164, 48, 36, 0.07);
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(60, 40, 30, 0.06), 0 1px 4px rgba(60, 40, 30, 0.05);
  --shadow: 0 1px 2px rgba(60, 40, 30, 0.05), 0 14px 36px rgba(60, 40, 30, 0.11);
  --ring: #7e241c;
  --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --font-display: "Songti SC", "STSong", "Noto Serif SC", "SimSun", "Microsoft YaHei", serif;
  --font-data: "Cascadia Mono", "JetBrains Mono", ui-monospace, Consolas, "Microsoft YaHei", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--primary);
}

::selection {
  background: rgba(168, 122, 47, 0.22);
}

::placeholder {
  color: var(--muted);
  opacity: 1;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.disclaimer-bar {
  background: linear-gradient(90deg, #2a1a16, #7a2a1e);
  color: #f4ecd9;
  text-align: center;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid rgba(244, 236, 217, 0.18);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(18, 32, 27, 0.08);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(18, 32, 27, 0.03);
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--ink);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  box-shadow: inset 0 0 0 2px rgba(244, 236, 217, 0.42), 0 0 0 1px rgba(168, 122, 47, 0.45), 0 4px 10px rgba(7, 71, 61, 0.25);
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.nav-btn:hover {
  color: var(--ink);
  background: var(--bg);
}

.nav-btn.active {
  color: var(--primary-deep);
  background: linear-gradient(180deg, #f9ece7, #f3ddd6);
  box-shadow: inset 0 -2px 0 var(--primary);
  font-weight: 600;
}

.nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-band {
  background:
    radial-gradient(1200px 420px at 18% -10%, rgba(255, 246, 220, 0.16), transparent 60%),
    linear-gradient(135deg, #2b1512 0%, #6b1f18 52%, #a43024 100%);
  color: #fff;
  border-bottom: 1px solid rgba(210, 179, 107, 0.5);
}

.hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 20px 40px;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(520px, 1.4fr);
  gap: 32px;
  align-items: start;
}

.hero-copy h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy h1.seal-title {
  font-family: "FZXiaoZhuanTi", "方正小篆体", "华文篆书", "STXingkai", "华文行楷", "KaiTi", serif;
  font-size: 42px;
  font-weight: 400;
  color: #f7f0dd;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3), 0 0 2px rgba(244, 236, 217, 0.18);
}

.hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  max-width: 36ch;
}

.profile-form {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold-bright);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: var(--field-bg);
  color: var(--ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(164, 48, 36, 0.22);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(164, 48, 36, 0.08);
}

.voice-wrap {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.voice-wrap input,
.voice-wrap select {
  flex: 1;
  min-width: 0;
}

.voice-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.voice-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.voice-btn.listening {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.voice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.profile-form .field:nth-child(1),
.profile-form .field:nth-child(2),
.profile-form .field:nth-child(3),
.profile-form .field:nth-child(4),
.profile-form .field:nth-child(5),
.profile-form .field:nth-child(6),
.profile-form .field:nth-child(7),
.profile-form .field:nth-child(8) {
  grid-column: span 2;
}

.profile-form .btn {
  grid-column: span 2;
  margin-top: 22px;
}

.btn {
  min-height: 38px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  font-weight: 600;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(135deg, #a43024, #8a2a20);
  color: #fff;
  box-shadow: 0 4px 12px rgba(126, 36, 28, 0.24);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #8a2a20, #6f2018);
  box-shadow: 0 6px 16px rgba(126, 36, 28, 0.28);
}

.btn.ghost {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn.ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: #f9f2e2;
}

.btn.ghost.danger {
  color: var(--danger);
}

.btn.ghost.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: #fdf1f0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex: none;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.2;
}

.stat-value small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-head h2,
.plan-toolbar h2 {
  margin: 0;
  font-size: 18px;
  font-family: var(--font-display);
  letter-spacing: 0;
  position: relative;
  padding-left: 10px;
}

.panel-head h2::before,
.plan-toolbar h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
}

.summary-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.control-line {
  padding: 8px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--gold-soft);
  color: #7d5d22;
  font-size: 13px;
  font-weight: 600;
}

.emp-overview {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface-2);
}

.emp-title {
  font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 8px;
  letter-spacing: 0;
}

.emp-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.emp-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.proscons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 14px 18px;
}

.proscons-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface-2);
}

.proscons-card.pros {
  background: var(--green-soft);
}

.proscons-card.cons {
  background: var(--amber-soft);
}

.proscons-title {
  font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 8px;
  letter-spacing: 0;
}

.proscons-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.chip {
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chip strong {
  color: var(--ink);
}

.chip.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.chip.risk-filter {
  border: 1px solid transparent;
  background: var(--bg);
  cursor: pointer;
  font: inherit;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.chip.risk-filter:hover {
  border-color: var(--line-strong);
}

.chip.risk-filter.active {
  background: linear-gradient(135deg, #7e241c, #5f1b14);
  color: #f7f0dd;
  box-shadow: 0 3px 8px rgba(126, 36, 28, 0.22);
}

.chip.risk-filter.active strong {
  color: #f7f0dd;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-bottom: 2px solid rgba(164, 48, 36, 0.22);
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table tbody tr {
  transition: background-color 0.12s ease;
}

.data-table tbody tr:hover {
  background: var(--hover-bg);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.th-action {
  width: 88px;
  text-align: right;
}

#recommendTable {
  min-width: 0;
}

#recommendTable th,
#recommendTable td {
  padding: 8px 9px;
  font-size: 12.5px;
  white-space: normal;
}

#recommendTable .cell-major {
  white-space: normal;
}

#recommendTable .th-action,
#recommendTable .risk-badge,
#recommendTable .cold-cell,
#recommendTable .badge {
  white-space: nowrap;
}

.recommend-cards {
  display: none;
}

.catalog-cards {
  display: none;
}

.cell-school {
  font-weight: 700;
}

.cell-major {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.major-link {
  cursor: pointer;
  color: var(--primary);
}

.major-link:hover {
  text-decoration: underline;
}

.history-cell {
  font-size: 12px;
  line-height: 1.7;
}

.history-line {
  display: block;
}

.spark {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  margin-left: 6px;
  vertical-align: middle;
  cursor: pointer;
}

.spark i {
  display: block;
  width: 6px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

.spark-help p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.trend-chart {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface-2);
}

.trend-label {
  font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 10px;
  letter-spacing: 0;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 120px;
}

.trend-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.trend-bar i {
  display: block;
  width: 100%;
  max-width: 34px;
  background: linear-gradient(180deg, var(--primary), var(--primary-deep));
  border-radius: 4px 4px 0 0;
}

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

.trend-bar em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.field-hint {
  display: block;
  font-size: 12px;
  color: #8a6425;
  font-weight: 600;
  margin-top: 4px;
  min-height: 16px;
  white-space: nowrap;
}

.field.invalid input,
.field.invalid select {
  border-color: var(--danger);
}

.field-error {
  display: block;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.profile-form .province-industry {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold-bright);
  border-radius: var(--radius);
  background: var(--gold-soft);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink);
}

.province-industry-title {
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0;
  margin-bottom: 4px;
}

.province-industry-row {
  display: flex;
  gap: 8px;
}

.province-industry-row > span {
  flex: none;
  color: var(--primary-deep);
  font-weight: 700;
  min-width: 72px;
}

.compare-remove {
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  min-width: 24px;
  min-height: 24px;
}

.compare-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  margin-bottom: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}

.compare-bar.hidden {
  display: none;
}

.compare-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8e5df;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}

.cell-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.province-industry-mini {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}

.province-industry-modal {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--gold-soft);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.7;
}

.province-industry-modal-title {
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0;
  margin-bottom: 4px;
}

#schoolBody .cell-school,
#schoolBody .cell-sub {
  white-space: normal;
  word-break: break-word;
}

.badge {
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.risk-冲,
.badge.chong {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.risk-稳,
.badge.wen {
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.badge.risk-保,
.badge.bao {
  background: var(--green-soft);
  color: var(--green);
}

.badge.tier-985 {
  background: var(--gold-soft);
  color: #7d5d22;
}

.badge.tier-211 {
  background: #eef3f8;
  color: #2d5d8c;
}

.badge.tier-普通 {
  background: var(--bg);
  color: var(--muted);
}

.cold-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 96px;
}

.cold-bar {
  width: 54px;
  height: 6px;
  border-radius: 3px;
  background: #e8ddc4;
  overflow: hidden;
  flex: none;
}

.cold-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}

.reasons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.reason-tag {
  padding: 1px 7px;
  border-radius: 4px;
  background: #f3ece0;
  color: #62594a;
  font-size: 11px;
}

.reason-tag.warn {
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 600;
}

.btn.small {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.empty {
  padding: 40px 18px;
  text-align: center;
  color: var(--muted);
  background: var(--surface-2);
}

.filter-bar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
}

.filter-bar .field.compact input,
.filter-bar .field.compact select {
  min-height: 34px;
}

.pager {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.pager-actions {
  display: flex;
  gap: 8px;
}

.plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.plan-advice {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 13px;
}

.plan-sim {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 13px;
  line-height: 1.6;
}

.plan-sim-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.plan-sim-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.plan-sim-item {
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--primary-soft);
}

.plan-sim-item strong {
  display: block;
  font-size: 14px;
}

.plan-sim-detail {
  margin-top: 8px;
  color: var(--ink);
}

.print-area {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }

  #printArea,
  #printArea * {
    visibility: visible;
  }

  #printArea {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 20px;
    background: #fff;
    color: #111;
  }

  #printArea h2 {
    font-family: var(--font-display);
  }
}

.plan-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.plan-col-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0;
}

.plan-col-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
}

.plan-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface-3);
}

.plan-item-title {
  font-weight: 700;
}

.plan-item-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.plan-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.plan-item-actions {
  display: inline-flex;
  gap: 4px;
  flex: none;
}

.plan-item-actions .btn {
  min-height: 28px;
  padding: 3px 7px;
}

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

.plan-empty {
  color: var(--muted);
  text-align: center;
  padding: 28px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(30, 18, 15, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
}

.modal-backdrop.hidden {
  display: none;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 14, 12, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.access-gate.hidden {
  display: none;
}

.access-gate-card {
  width: min(360px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.access-gate-card h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0;
}

.access-gate-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.access-gate-card input {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: var(--field-bg);
  color: var(--ink);
}

.access-gate-error {
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  min-height: 16px;
}

.modal {
  width: min(920px, 100%);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.modal-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-family: var(--font-display);
  letter-spacing: 0;
}

.modal-body {
  padding: 18px;
  max-height: 70vh;
  overflow-y: auto;
}

.school-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.meta-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface-2);
}

.meta-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.meta-box strong {
  font-size: 15px;
}

.compare-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: stretch;
}

.compare-panel {
  display: flex;
  flex-direction: column;
}

.compare-items {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 460px;
  overflow-y: auto;
}

.compare-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  background: var(--surface-3);
}

.compare-item-title {
  font-weight: 700;
}

.compare-item-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.compare-item-empty {
  color: var(--muted);
  text-align: center;
  padding: 26px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

#externalAiText {
  margin: 12px;
  min-height: 260px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
  color: var(--ink);
  background: var(--field-bg);
}

#externalAiText:focus {
  outline: 2px solid rgba(164, 48, 36, 0.22);
  border-color: var(--primary);
}

.ai-file-status {
  margin: 0 12px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.compare-actions {
  padding: 0 12px 12px;
}

.ai-result {
  margin-top: 16px;
}

.ai-result.hidden {
  display: none;
}

.ai-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ai-section {
  margin-top: 14px;
}

.ai-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0;
}

.mindmap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.mind-center {
  max-width: 320px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--primary-deep);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 6px 18px rgba(126, 36, 28, 0.22);
}

.mind-branches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  width: 100%;
}

.mind-branch {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface-3);
}

.mind-industry {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.mind-positions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mind-position {
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .profile-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-form .field:nth-child(1),
  .profile-form .field:nth-child(2),
  .profile-form .field:nth-child(3),
  .profile-form .field:nth-child(4),
  .profile-form .field:nth-child(5),
  .profile-form .field:nth-child(6),
  .profile-form .field:nth-child(7),
  .profile-form .field:nth-child(8),
  .profile-form .btn {
    grid-column: span 1;
  }

  .filter-bar {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .hero-inner {
    padding: 26px 16px 30px;
  }

  .hero-copy h1 {
    font-size: 28px;
  }

  .hero-copy h1.seal-title {
    font-size: 30px;
  }

  .profile-form {
    grid-template-columns: 1fr 1fr;
  }

  .profile-form .field:nth-child(1),
  .profile-form .field:nth-child(2),
  .profile-form .field:nth-child(3),
  .profile-form .field:nth-child(4),
  .profile-form .field:nth-child(5),
  .profile-form .field:nth-child(6),
  .profile-form .field:nth-child(7),
  .profile-form .field:nth-child(8),
  .profile-form .btn {
    grid-column: span 1;
  }

  .page {
    padding: 16px 12px 40px;
  }

  .overview-strip,
  .plan-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-sim-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-columns {
    grid-template-columns: 1fr;
  }

  .school-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ai-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-toolbar {
    align-items: flex-start;
  }

  #recommendTableScroll {
    display: none;
  }

  .recommend-cards {
    display: grid;
    gap: 12px;
  }

  .rec-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 12px;
    box-shadow: var(--shadow-sm);
  }

  .rec-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }

  .rec-card-title {
    font-weight: 700;
  }

  .rec-card-major {
    display: block;
    margin-top: 2px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
  }

  .rec-card-badges {
    display: flex;
    gap: 6px;
    flex: none;
  }

  .rec-card-sub {
    color: var(--muted);
    font-size: 12px;
  }

  .rec-card-industry {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
  }

  .rec-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .rec-card-grid > div {
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 7px 8px;
    min-width: 0;
  }

  .rec-card-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 2px;
  }

  .rec-card-grid strong {
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    word-break: break-word;
  }

  .rec-card-grid em {
    font-style: normal;
    color: var(--gold);
    font-size: 11px;
  }

  .rec-card-history {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
  }

  .rec-card-action .btn {
    width: 100%;
  }

  #schoolTableScroll,
  #majorTableScroll {
    display: none;
  }

  .catalog-cards {
    display: grid;
    gap: 12px;
  }

  .list-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 12px;
    box-shadow: var(--shadow-sm);
  }

  .list-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }

  .list-card-title {
    font-weight: 700;
  }

  .list-card-title .major-link {
    color: var(--primary);
    cursor: pointer;
  }

  .list-card-sub {
    color: var(--muted);
    font-size: 12px;
  }

  .list-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .list-card-grid > div {
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 7px 8px;
    min-width: 0;
  }

  .list-card-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 2px;
  }

  .list-card-grid strong {
    font-size: 13px;
    word-break: break-word;
  }

  .list-card-actions {
    display: flex;
    gap: 8px;
  }

  .list-card-actions .btn {
    flex: 1;
  }
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 18px 16px 26px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.beian-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.beian-row a {
  color: var(--muted);
  text-decoration: none;
}

.beian-row a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.gongan-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gongan-link img {
  width: 16px;
  height: 16px;
  flex: none;
}

.footer-note {
  margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
