:root {
  --night: #071a2f;
  --deep: #0b2746;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --ink: #102033;
  --muted: #64748b;
  --line: rgba(123, 151, 184, 0.28);
  --blue: #2f7dff;
  --blue-dark: #0f4ca8;
  --cyan: #18b6d9;
  --gold: #cfa85b;
  --green: #15b88a;
  --orange: #ef8f2f;
  --red: #bf4343;
  --soft-blue: rgba(47, 125, 255, 0.1);
  --soft-gold: rgba(207, 168, 91, 0.14);
  --glass: blur(22px) saturate(1.22);
  --shadow: 0 28px 80px rgba(7, 26, 47, 0.16);
  --shadow-tight: 0 14px 34px rgba(7, 26, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background: #eef4fb;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -3;
  background:
    radial-gradient(circle at 14% 18%, rgba(47, 125, 255, 0.36), transparent 24%),
    radial-gradient(circle at 86% 5%, rgba(24, 182, 217, 0.28), transparent 28%),
    radial-gradient(circle at 76% 72%, rgba(207, 168, 91, 0.28), transparent 26%),
    linear-gradient(135deg, #051325 0%, #092744 42%, #f3f7fc 43%, #f7fbff 100%);
  background-size: 120% 120%;
  animation: cinematicShift 18s ease-in-out infinite alternate;
}

body::after {
  z-index: -2;
  background:
    linear-gradient(118deg, transparent 0 31%, rgba(255, 255, 255, 0.42) 35%, transparent 41% 68%, rgba(24, 182, 217, 0.22) 71%, transparent 76%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 92px);
  background-size: 260% 100%, 92px 92px, 92px 92px;
  mix-blend-mode: screen;
  opacity: 0.72;
  animation: lightSweep 14s linear infinite;
}

@keyframes cinematicShift {
  0% { transform: scale(1) translate3d(-18px, -12px, 0); filter: hue-rotate(0deg); }
  100% { transform: scale(1.05) translate3d(18px, 16px, 0); filter: hue-rotate(8deg); }
}

@keyframes lightSweep {
  0% { background-position: 170% 0, 0 0, 0 0; }
  100% { background-position: -90% 0, 92px 0, 0 92px; }
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
input {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 30px 0 56px;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 130px -72px auto auto;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  transform: rotate(18deg);
  opacity: 0.32;
  pointer-events: none;
}

.hero,
.panel,
.sources {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 386px;
  gap: 24px;
  align-items: end;
  position: relative;
  min-height: 330px;
  margin-top: 8px;
  padding: 38px 34px 32px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(112deg, rgba(7, 26, 47, 0.94), rgba(8, 42, 74, 0.84) 44%, rgba(247, 250, 255, 0.78) 100%),
    radial-gradient(circle at 80% 12%, rgba(24, 182, 217, 0.24), transparent 38%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 36%, rgba(255, 255, 255, 0.36) 44%, transparent 52%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
  transform: translateX(-55%);
  animation: heroBeam 8.8s ease-in-out infinite;
}

.hero::after {
  right: -54px;
  top: 28px;
  width: 330px;
  height: 230px;
  border: 1px solid rgba(207, 168, 91, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04)),
    repeating-linear-gradient(90deg, rgba(47, 125, 255, 0.16) 0 1px, transparent 1px 38px);
  transform: rotate(-8deg);
}

.hero > * {
  position: relative;
  z-index: 1;
}

@keyframes heroBeam {
  0%, 35% { transform: translateX(-65%); opacity: 0; }
  50% { opacity: 1; }
  78%, 100% { transform: translateX(55%); opacity: 0; }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 790px;
  margin-bottom: 15px;
  color: #f7fbff;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.06;
  letter-spacing: 0;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  overflow-wrap: anywhere;
}

.school-code {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  gap: 12px;
  align-items: center;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 10px 13px;
  border: 1px solid rgba(207, 168, 91, 0.46);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.school-code span,
.school-code em {
  color: rgba(247, 250, 255, 0.82);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.school-code strong {
  color: #fff3cf;
  font-family: "DIN Alternate", "Microsoft YaHei", sans-serif;
  font-size: 32px;
  line-height: 1;
}

.hero-copy {
  max-width: 780px;
  margin-bottom: 0;
  color: rgba(247, 250, 255, 0.82);
  font-size: 16px;
  line-height: 1.8;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.hero-stats div {
  position: relative;
  min-height: 86px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 20px 52px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(16px);
}

.hero-stats div::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--gold), var(--cyan));
}

.hero-stats span,
.mini-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.hero-stats span {
  color: rgba(247, 250, 255, 0.72);
}

.hero-stats strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-family: "DIN Alternate", "Microsoft YaHei", sans-serif;
  font-size: 25px;
  line-height: 1.14;
}

.workbench {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
}

.panel {
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(47, 125, 255, 0.72), rgba(207, 168, 91, 0.64), transparent);
  opacity: 0.78;
}

.input-panel,
.result-panel,
.details-grid .panel,
.table-panel,
.prediction-panel,
.contact-panel {
  padding: 22px;
}

.panel-title {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

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

.panel-title h2 {
  margin-bottom: 4px;
  color: #0c2440;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: 21px;
  line-height: 1.22;
}

.panel-title p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.step-dot {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background:
    linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 12px 24px rgba(47, 125, 255, 0.28);
  font-family: "DIN Alternate", "Microsoft YaHei", sans-serif;
  font-weight: 900;
  font-size: 16px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: #1d334d;
  font-size: 14px;
  font-weight: 900;
}

input,
select {
  width: 100%;
  height: 44px;
  min-width: 0;
  border: 1px solid rgba(105, 124, 148, 0.28);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

input:hover,
select:hover {
  border-color: rgba(47, 125, 255, 0.48);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 125, 255, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

input:disabled {
  color: #7c8796;
  background: rgba(231, 238, 247, 0.88);
}

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

.toggle-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  color: #28405b;
  font-weight: 800;
}

.toggle-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.art-fields {
  display: none;
  margin: 4px 0 14px;
  padding: 13px;
  border: 1px solid rgba(47, 125, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47, 125, 255, 0.08), rgba(24, 182, 217, 0.06)),
    rgba(246, 250, 255, 0.9);
}

.art-fields.is-visible {
  display: block;
}

.formula-note {
  margin-bottom: 11px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.55;
}

button,
.float-consult {
  border: 0;
  background:
    linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 15px 34px rgba(47, 125, 255, 0.32);
  cursor: pointer;
}

button {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  font-weight: 900;
}

button:hover,
.float-consult:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(47, 125, 255, 0.42);
}

button:active,
.float-consult:active {
  transform: translateY(0);
}

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

.result-card div,
.recommendation-columns > div,
.direction-card,
.risk-item,
.prediction-stats article,
.prediction-counts div,
.prediction-major-box,
.prediction-advice,
.contact-card,
.contact-tip {
  border: 1px solid rgba(123, 151, 184, 0.26);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-tight);
}

.result-card div {
  position: relative;
  min-height: 112px;
  padding: 17px;
  overflow: hidden;
}

.result-card div::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(47, 125, 255, 0.16);
  transform: rotate(18deg);
}

.result-card .primary-result {
  background:
    linear-gradient(135deg, rgba(207, 168, 91, 0.24), rgba(255, 255, 255, 0.84)),
    rgba(255, 255, 255, 0.8);
  border-color: rgba(207, 168, 91, 0.34);
}

.result-card strong {
  display: block;
  margin-top: 8px;
  color: #0c3772;
  font-family: "DIN Alternate", "Microsoft YaHei", sans-serif;
  font-size: 30px;
  line-height: 1.06;
}

.insight {
  position: relative;
  margin-bottom: 16px;
  padding: 15px 17px 15px 20px;
  border-left: 4px solid var(--gold);
  background:
    linear-gradient(90deg, rgba(207, 168, 91, 0.2), rgba(255, 255, 255, 0.78));
  color: #4a3717;
  line-height: 1.7;
}

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

.recommendation-columns > div {
  min-height: 188px;
  padding: 15px;
}

.recommendation-columns h3 {
  margin-bottom: 10px;
  color: #0c3772;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: 17px;
}

ul {
  margin: 0;
  padding-left: 18px;
}

li {
  margin-bottom: 9px;
  line-height: 1.5;
}

.major-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.empty-recommendation {
  padding: 10px 0;
  color: var(--red);
}

.empty-recommendation .major-meta {
  margin-top: 5px;
  color: #806037;
}

.prediction-panel {
  margin-top: 18px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(238, 247, 255, 0.86)),
    radial-gradient(circle at 100% 0, rgba(47, 125, 255, 0.14), transparent 34%);
}

.prediction-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 188px;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.prediction-hero h2 {
  margin-bottom: 8px;
  color: #0c2440;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: 29px;
  line-height: 1.18;
}

.prediction-hero p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

.prediction-score-card {
  min-height: 142px;
  padding: 18px;
  border: 1px solid rgba(207, 168, 91, 0.32);
  background:
    linear-gradient(145deg, rgba(7, 26, 47, 0.98), rgba(14, 60, 104, 0.9));
  box-shadow: 0 22px 52px rgba(7, 26, 47, 0.22);
  color: #fff;
}

.prediction-score-card span,
.prediction-score-card em {
  display: block;
  color: rgba(247, 250, 255, 0.74);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.prediction-score-card strong {
  display: block;
  margin: 10px 0;
  color: #fff3cf;
  font-family: "DIN Alternate", "Microsoft YaHei", sans-serif;
  font-size: 40px;
  line-height: 1;
}

.prediction-score-card em {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  padding: 0 12px;
  background: rgba(47, 125, 255, 0.92);
  color: #fff;
}

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

.prediction-stats article {
  min-height: 118px;
  padding: 16px;
}

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

.prediction-stats strong {
  display: block;
  margin: 8px 0 7px;
  color: #0c3772;
  font-family: "DIN Alternate", "Microsoft YaHei", sans-serif;
  font-size: 26px;
  line-height: 1.14;
}

.prediction-stats em {
  display: block;
  color: #718096;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.prediction-body {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr) 338px;
  gap: 12px;
  align-items: stretch;
}

.prediction-counts {
  display: grid;
  gap: 10px;
}

.prediction-counts div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
}

.prediction-counts b {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  font-size: 20px;
}

.prediction-counts .orange { background: linear-gradient(135deg, var(--orange), #b95a12); }
.prediction-counts .blue { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.prediction-counts .green { background: linear-gradient(135deg, var(--green), #087758); }

.prediction-counts span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.prediction-counts strong {
  color: #0c3772;
  font-family: "DIN Alternate", "Microsoft YaHei", sans-serif;
  font-size: 30px;
}

.prediction-major-box,
.prediction-advice {
  padding: 16px;
}

.prediction-major-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.prediction-major-head h3,
.prediction-advice h3 {
  margin-bottom: 0;
  color: #0c2440;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: 19px;
}

.prediction-major-head span {
  color: var(--muted);
  font-size: 12px;
}

#predictionMajorList {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

#predictionMajorList li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin-bottom: 0;
  padding: 11px;
  border: 1px solid rgba(123, 151, 184, 0.22);
  background: rgba(248, 251, 255, 0.9);
}

#predictionMajorList span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--soft-blue);
  color: var(--blue-dark);
  font-family: "DIN Alternate", "Microsoft YaHei", sans-serif;
  font-weight: 900;
}

#predictionMajorList strong {
  display: block;
  color: var(--ink);
}

#predictionMajorList em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.prediction-advice li {
  margin-bottom: 10px;
  color: #334155;
  font-size: 13px;
  line-height: 1.58;
}

.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 18px;
  margin-top: 18px;
}

.direction-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.direction-card,
.risk-item {
  padding: 15px;
  background: rgba(255, 255, 255, 0.76);
}

.direction-card h3 {
  margin-bottom: 8px;
  color: #0c2440;
  font-size: 16px;
}

.direction-card p,
.risk-item p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

.risk-item {
  margin-bottom: 10px;
}

.risk-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
}

.contact-panel {
  margin-top: 18px;
  background:
    linear-gradient(135deg, rgba(7, 26, 47, 0.96), rgba(11, 48, 83, 0.9));
  color: #fff;
}

.contact-panel::before {
  background: linear-gradient(90deg, transparent, var(--gold), var(--cyan), transparent);
}

.contact-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.contact-head h2 {
  margin-bottom: 8px;
  color: #fff;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: 28px;
  line-height: 1.22;
}

.contact-head p {
  max-width: 820px;
  margin-bottom: 0;
  color: rgba(247, 250, 255, 0.74);
  font-size: 15px;
  line-height: 1.7;
}

.contact-badge {
  padding: 10px 14px;
  border: 1px solid rgba(207, 168, 91, 0.48);
  background: rgba(207, 168, 91, 0.14);
  color: #fff3cf;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

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

.contact-card {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.contact-card img {
  display: block;
  width: 126px;
  height: 164px;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: #fff;
}

.contact-card h3 {
  margin-bottom: 5px;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.contact-card strong {
  display: inline-block;
  margin-bottom: 9px;
  color: #fff3cf;
  font-size: 13px;
}

.contact-card p {
  margin-bottom: 0;
  color: rgba(247, 250, 255, 0.7);
  font-size: 13px;
  line-height: 1.62;
}

.contact-tip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 13px 15px;
  border-color: rgba(21, 184, 138, 0.34);
  background: rgba(21, 184, 138, 0.12);
}

.contact-tip span {
  color: #7ff0cf;
  font-weight: 900;
  white-space: nowrap;
}

.contact-tip p {
  margin-bottom: 0;
  color: rgba(247, 250, 255, 0.74);
  font-size: 13px;
  line-height: 1.58;
}

.float-consult {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: inline-grid;
  place-items: center;
  min-width: 104px;
  height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.table-panel {
  margin-top: 18px;
}

.table-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
}

.table-toolbar h2 {
  margin-bottom: 4px;
  color: #0c2440;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: 21px;
}

.table-toolbar p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  max-height: 480px;
  overflow: auto;
  border: 1px solid rgba(123, 151, 184, 0.22);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.96);
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(123, 151, 184, 0.2);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.45;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #0c3772;
  background: linear-gradient(180deg, #edf5ff, #dfeaf7);
}

.tag {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue-dark);
  font-weight: 800;
  font-size: 12px;
}

.sources {
  margin-top: 18px;
  padding: 16px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.sources a {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
}

.sources a:hover {
  text-decoration: underline;
}

@media (max-width: 1080px) {
  .hero,
  .workbench,
  .details-grid,
  .prediction-body {
    grid-template-columns: 1fr;
  }

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

  .prediction-stats,
  .contact-grid,
  .result-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body::before {
    background:
      radial-gradient(circle at 18% 8%, rgba(47, 125, 255, 0.32), transparent 24%),
      radial-gradient(circle at 88% 4%, rgba(24, 182, 217, 0.2), transparent 28%),
      linear-gradient(180deg, #071a2f 0%, #12375c 310px, #eef4fb 311px, #f7fbff 100%);
  }

  body::after {
    opacity: 0.42;
    background-size: 220% 100%, 52px 52px, 52px 52px;
  }

  .app-shell {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 10px 10px 62px 8px;
  }

  .app-shell::before {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
    margin-top: 0;
    width: 100%;
    max-width: calc(100vw - 18px);
    padding: 23px 15px 17px;
  }

  .hero::after {
    right: -170px;
    top: 10px;
  }

  h1 {
    font-size: 29px;
    line-height: 1.14;
  }

  .hero-copy,
  .panel-title p,
  .prediction-hero p,
  .contact-head p,
  .sources,
  .insight,
  .major-meta,
  #predictionMajorList em,
  .prediction-advice li {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero-copy {
    display: block;
    width: 100%;
    max-width: 100%;
    word-break: break-all;
  }

  .school-code {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 6px;
  }

  .school-code strong {
    font-size: 30px;
  }

  .hero-stats,
  .result-card,
  .recommendation-columns,
  .direction-cards,
  .prediction-hero,
  .prediction-stats,
  .contact-head,
  .contact-grid,
  .table-toolbar,
  #predictionMajorList {
    grid-template-columns: 1fr;
  }

  .workbench {
    width: 100%;
    max-width: calc(100vw - 18px);
    gap: 12px;
    margin-top: 12px;
  }

  .input-panel,
  .result-panel,
  .details-grid .panel,
  .table-panel,
  .prediction-panel,
  .contact-panel {
    padding: 14px;
  }

  .panel {
    width: 100%;
    max-width: calc(100vw - 18px);
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .panel-title {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .panel-title h2 {
    font-size: 19px;
  }

  input,
  select,
  button {
    min-width: 0;
    max-width: 100%;
  }

  .result-card div {
    min-height: 92px;
  }

  .prediction-score-card {
    min-height: 0;
  }

  .prediction-hero h2 {
    font-size: 22px;
  }

  .prediction-stats article {
    min-height: 94px;
  }

  .prediction-counts div {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .prediction-major-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .contact-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .contact-card img {
    width: 96px;
    height: 126px;
  }

  .contact-tip {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
  }

  .float-consult {
    left: 16px;
    right: 16px;
    bottom: 12px;
    width: auto;
    min-width: 0;
    height: 42px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 7px;
    padding-right: 8px;
  }

  .hero,
  .input-panel,
  .result-panel,
  .details-grid .panel,
  .table-panel,
  .prediction-panel,
  .contact-panel {
    padding-left: 12px;
    padding-right: 12px;
  }

  h1 {
    font-size: 26px;
  }

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

  .contact-card img {
    width: min(100%, 250px);
    height: auto;
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .hero::before {
    animation: none;
  }
}
