:root {
  --ink: #101828;
  --sub: #475467;
  --soft: #667085;
  --line: rgba(16, 24, 40, 0.12);
  --bg: #f6f8fb;
  --white: #ffffff;
  --blue: #1664ff;
  --blue-dark: #0b3b8c;
  --teal: #00b8a9;
  --orange: #d97706;
  --rose: #e11d48;
  --violet: #7c3aed;
  --shadow: 0 16px 42px rgba(16, 24, 40, 0.08);
  --shadow-strong: 0 24px 70px rgba(16, 24, 40, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.65;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
[tabindex]:focus-visible,
.editable:focus-visible {
  outline: 3px solid rgba(22, 100, 255, 0.34);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(22, 100, 255, 0.1);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
  overflow-wrap: anywhere;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 230px minmax(420px, 1fr) auto;
  align-items: center;
  min-height: 68px;
  padding: 0 clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-logo {
  color: var(--blue);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-cn {
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 2px;
  font-size: 14px;
  white-space: nowrap;
}

.site-nav a,
.site-nav button {
  height: 68px;
  padding: 0 9px;
  color: #374151;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-weight: 800;
}

.site-nav a:hover,
.site-nav a.active,
.site-nav button:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.ai-picker-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  max-width: 310px;
  padding: 8px 12px 8px 14px;
  overflow: hidden;
  color: #0f172a;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(120deg, #1664ff, #14b8a6, #f59e0b) border-box;
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.1);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.ai-picker-link::before {
  position: absolute;
  inset: 0;
  width: 70px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: translateX(-110%);
  animation: aiPickerShine 3.2s ease-in-out infinite;
}

.ai-picker-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(22, 100, 255, 0.17);
}

.ai-picker-copy {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.ai-picker-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 7px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  background: #ef4444;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28);
  animation: aiBadgePop 1.7s ease-in-out infinite;
}

.scroll-progress {
  position: fixed;
  top: 68px;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 3px;
  background: rgba(22, 100, 255, 0.1);
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #00b8a9);
  transition: width 0.25s ease;
}

.button,
.primary-button,
.detail-actions button,
.drawer-actions button,
.tour-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.button:hover,
.primary-button:hover,
.detail-actions button:hover,
.drawer-actions button:hover,
.tour-actions button:hover {
  transform: translateY(-1px);
}

.button.primary,
.primary-button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 12px 30px rgba(22, 100, 255, 0.22);
}

@keyframes aiPickerShine {
  0%,
  54% {
    transform: translateX(-120%);
  }
  72%,
  100% {
    transform: translateX(520%);
  }
}

@keyframes aiBadgePop {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.08);
  }
}

.button.ghost,
.tour-actions button,
.drawer-actions button,
.detail-actions button {
  color: var(--blue);
  background: white;
  border-color: #cfe0ff;
}

.primary-button span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 7px;
  color: var(--blue);
  background: #fff;
  border-radius: 999px;
  font-size: 12px;
}

.data-timestamp {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  color: var(--blue-dark);
  background: #eff6ff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  max-width: 132px;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--blue-dark);
  background: #fff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(22, 100, 255, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.account-chip:hover {
  border-color: #9dbbff;
  box-shadow: 0 14px 30px rgba(22, 100, 255, 0.14);
  transform: translateY(-1px);
}

.account-chip.logged-in {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.account-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-page {
  height: calc(100vh - 68px + 180px);
  min-height: 900px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 24px clamp(20px, 5vw, 72px) 44px;
  background:
    radial-gradient(circle at 12% 0%, rgba(22, 100, 255, 0.11), transparent 27%),
    radial-gradient(circle at 90% 12%, rgba(0, 184, 169, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 42%, #ffffff 100%);
}

.app-shell[data-active-region="英国"] .workspace-page {
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.command-center {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 20px;
  align-items: center;
}

.overline {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
  font-size: clamp(30px, 3.8vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  font-size: 16px;
  line-height: 1.35;
}

.search-wrap {
  position: relative;
}

.search-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 44px;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 16px 42px rgba(16, 24, 40, 0.07);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-wrap input:focus {
  border-color: #9dbbff;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(22, 100, 255, 0.11), 0 12px 30px rgba(17, 24, 39, 0.08);
}

.search-wrap input:focus-visible {
  outline-offset: 3px;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 17px;
  transform: translateY(-50%);
  color: var(--soft);
  font-size: 22px;
}

#clearSearch,
#closePlan {
  border: 0;
  background: transparent;
  color: var(--soft);
  font-size: 24px;
}

#clearSearch {
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.summary-card {
  position: relative;
  min-height: 92px;
  padding: 18px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.055);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.summary-card::after {
  position: absolute;
  right: -18px;
  bottom: -36px;
  color: rgba(22, 100, 255, 0.06);
  content: "DATA";
  font-size: 54px;
  font-weight: 900;
  line-height: 1;
}

.summary-card:hover {
  border-color: rgba(22, 100, 255, 0.22);
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.09);
  transform: translateY(-2px);
}

.summary-card span {
  position: relative;
  z-index: 1;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.summary-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.15;
}

.region-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.uk-list-tool-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  margin-bottom: 2px;
  padding: 18px 20px;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(120deg, #dc2626, #1664ff, #14b8a6) border-box;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.08);
  position: relative;
  z-index: 2;
}

.app-shell[data-active-region="英国"] .uk-list-tool-banner {
  display: flex;
}

.uk-list-tool-banner.open {
  align-items: stretch;
}

.uk-list-tool-banner h2 {
  margin-top: 2px;
  font-size: 21px;
}

.uk-list-tool-banner p:not(.overline) {
  margin-top: 4px;
  color: var(--sub);
  font-size: 14px;
}

.uk-list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.button.ghost {
  color: var(--blue);
  background: #fff;
  border-color: rgba(22, 100, 255, 0.22);
}

.region-tabs::-webkit-scrollbar,
.school-list::-webkit-scrollbar,
.program-list::-webkit-scrollbar,
#programDetailBody::-webkit-scrollbar,
.plan-table::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.region-tabs::-webkit-scrollbar-thumb,
.school-list::-webkit-scrollbar-thumb,
.program-list::-webkit-scrollbar-thumb,
#programDetailBody::-webkit-scrollbar-thumb,
.plan-table::-webkit-scrollbar-thumb {
  background: #c8d4e5;
  border-radius: 999px;
}

.region-tab {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.region-tab:hover {
  transform: translateY(-1px);
  border-color: #bcd0ff;
  box-shadow: 0 8px 20px rgba(22, 100, 255, 0.12);
}

.region-tab.active {
  color: #fff;
  border-color: transparent;
}

.workspace {
  min-height: 0;
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.school-panel,
.detail-panel,
.program-panel,
.program-detail {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.school-panel {
  min-height: 0;
  min-height: 760px;
  display: flex;
  flex-direction: column;
}

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

.panel-heading p {
  margin-top: 3px;
  color: var(--soft);
  font-size: 12px;
}

select {
  height: 34px;
  max-width: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #374151;
  outline: none;
}

select:focus-visible {
  border-color: #9dbbff;
  box-shadow: 0 0 0 4px rgba(22, 100, 255, 0.12);
}

.school-list,
.program-list {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  overflow-y: auto;
}

.school-list {
  flex: 1;
}

.school-card,
.program-card,
.case-card,
.info-block,
.admission-card,
.service-notice-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.school-card {
  padding: 14px;
  text-align: left;
}

.school-card:hover,
.school-card.active {
  border-color: var(--school-color);
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.1);
  transform: translateY(-2px);
}

.school-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.abbr {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  color: #fff;
  background: var(--school-color);
  font-size: 12px;
  font-weight: 900;
}

.school-card h3 {
  font-size: 15px;
  line-height: 1.3;
}

.school-card p {
  margin-top: 4px;
  color: var(--soft);
  font-size: 12px;
}

.school-stats,
.tag-row,
.facts,
.hero-meta,
.direction-chips,
.detail-actions,
.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.school-stats {
  margin-top: 10px;
}

.badge,
.fact,
.hero-meta span,
.direction-chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(16, 24, 40, 0.08);
}

.detail-panel {
  min-height: 0;
  min-height: 760px;
}

.hidden {
  display: none !important;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 30px;
  text-align: center;
}

.empty-state p {
  margin-top: 8px;
  color: var(--soft);
  font-size: 14px;
}

.empty-state.compact {
  min-height: 300px;
}

.detail-content {
  height: 100%;
  min-height: 100%;
  padding: 18px;
}

.university-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-height: 156px;
  padding: 28px;
  overflow: hidden;
  border-radius: 8px;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 16%, color-mix(in srgb, var(--hero-color) 18%, transparent), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
  border: 1px solid var(--line);
}

.university-hero::after {
  position: absolute;
  right: 18px;
  bottom: -8px;
  color: rgba(16, 24, 40, 0.05);
  content: "University";
  font-size: clamp(40px, 7vw, 82px);
  font-weight: 900;
  line-height: 1;
}

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

.hero-meta span,
.direction-chip {
  background: color-mix(in srgb, var(--hero-color) 10%, white);
  color: #0f172a;
  border-color: color-mix(in srgb, var(--hero-color) 22%, white);
}

.university-hero h2 {
  margin-top: 10px;
  font-size: clamp(26px, 3vw, 36px);
}

.university-hero p {
  margin-top: 4px;
  color: var(--sub);
  font-size: 14px;
}

.content-grid {
  height: calc(100% - 174px);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(420px, 1.22fr);
  gap: 14px;
  margin-top: 18px;
}

.program-panel,
.program-detail {
  min-height: 0;
}

.program-list {
  height: calc(100% - 64px);
}

.program-card {
  padding: 15px;
  text-align: left;
}

.program-card:hover,
.program-card.active {
  border-color: var(--direction-color);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.program-card h3 {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.45;
}

.program-card p {
  margin-top: 6px;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.5;
}

#programDetailBody {
  height: 100%;
  overflow-y: auto;
  padding: 18px;
}

.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--line);
}

.detail-title h2 {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.35;
}

.program-overview {
  padding: 4px 4px 2px;
  border-radius: 8px;
}

.overview-stats {
  margin-top: 12px;
}

.detail-actions button.selected {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #15803d;
}

.facts {
  margin: 12px 0;
}

.fact {
  min-height: 30px;
  border-radius: 6px;
  background: #ffffff;
  color: #374151;
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.06);
}

.fact.subtle {
  color: var(--soft);
  background: #f8fafc;
}

a.fact {
  color: var(--blue);
  border: 1px solid #cfe0ff;
  background: #eff6ff;
}

.detail-section {
  margin-top: 20px;
}

.detail-section h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 17px;
}

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

.case-card,
.info-block {
  padding: 14px;
}

.service-notice-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 58%, #eef5ff 100%);
  border-color: rgba(22, 100, 255, 0.2);
}

.service-notice-card h4 {
  margin-top: 8px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

.service-notice-card p {
  max-width: 560px;
  margin-top: 6px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.65;
}

.service-notice-card .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.quota-card {
  align-items: center;
  background:
    linear-gradient(135deg, #f8fbff 0%, #ffffff 58%, #eefdfa 100%);
  border-color: rgba(20, 184, 169, 0.24);
}

.quota-card h4 {
  white-space: normal;
}

.quota-qr {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 132px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.quota-qr img {
  display: block;
  width: 112px;
  height: auto;
  border-radius: 7px;
}

.quota-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.quota-actions .button {
  white-space: nowrap;
}

.case-card:hover,
.info-block:hover,
.service-notice-card:hover {
  border-color: rgba(22, 100, 255, 0.22);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.06);
}

.case-card strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.case-card p,
.info-block p {
  margin-top: 6px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.65;
}

.admission-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.admission-card {
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, var(--stat-bg));
  border-color: color-mix(in srgb, var(--stat-color) 18%, white);
}

.admission-card span {
  color: var(--stat-color);
  font-size: 12px;
  font-weight: 900;
}

.admission-card strong {
  display: block;
  margin-top: 6px;
  color: var(--stat-color);
  font-size: 22px;
}

.admission-card p {
  margin-top: 0;
  color: var(--soft);
  font-size: 12px;
}

.plan-drawer {
  position: fixed;
  top: 8vh;
  left: 5vw;
  right: auto;
  z-index: 80;
  width: 90vw;
  height: 84vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-strong);
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(.2,.8,.2,1);
}

.plan-drawer.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  background: rgba(3, 7, 18, 0.42);
  backdrop-filter: blur(3px);
}

.drawer-mask.open {
  display: block;
}

.drawer-header,
.drawer-actions {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.drawer-header p:not(.overline) {
  margin-top: 4px;
  color: var(--soft);
  font-size: 13px;
}

.plan-table {
  flex: 1;
  overflow: auto;
  padding: 16px;
}

.plan-lead-panel {
  min-width: min(100%, 960px);
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(22, 100, 255, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(22, 100, 255, 0.08), rgba(255, 255, 255, 0.96) 42%),
    #fff;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.06);
}

.plan-lead-copy {
  display: grid;
  gap: 8px;
  max-width: 880px;
}

.plan-lead-copy h3 {
  max-width: 760px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.35;
}

.plan-lead-copy p:not(.overline) {
  max-width: 900px;
  color: var(--sub);
  font-size: 14px;
  line-height: 1.75;
}

.plan-lead-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.plan-lead-actions span {
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.plan-archive-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.plan-archive-cards article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.plan-archive-cards span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.plan-archive-cards h4 {
  color: var(--ink);
  font-size: 14px;
}

.plan-archive-cards p {
  margin-top: 6px;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.65;
}

.plan-grid {
  min-width: 1940px;
  display: grid;
  grid-template-columns: 130px 70px 230px 240px 260px 120px 260px 120px 180px 260px 90px 320px 130px 46px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.plan-grid > div {
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
}

.plan-grid > div:nth-child(14n) {
  border-right: 0;
}

.plan-head {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #fff;
  background: #0f172a;
  font-weight: 900;
}

.editable {
  min-height: 22px;
  outline: none;
}

.editable:focus {
  background: #eef2ff;
  box-shadow: inset 0 0 0 1px #818cf8;
}

.remove-plan {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
}

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
  pointer-events: none;
}

.tour-overlay.open {
  display: block;
}

.tour-scrim {
  position: fixed;
  z-index: 200;
  background: rgba(3, 7, 18, 0.34);
  backdrop-filter: blur(3px);
  pointer-events: none;
}

.tour-card {
  position: fixed;
  z-index: 260;
  max-width: 380px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-strong);
  transform: translateY(8px);
  animation: tourIn 0.22s cubic-bezier(.2,.8,.2,1) forwards;
  pointer-events: auto;
}

.tour-card h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.tour-card p:not(.overline) {
  color: var(--sub);
  line-height: 1.7;
}

.tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.tour-target {
  position: relative;
  z-index: 220 !important;
  box-shadow: 0 0 0 4px rgba(22, 100, 255, 0.24), 0 0 0 10px rgba(22, 100, 255, 0.08), 0 18px 42px rgba(17, 24, 39, 0.18) !important;
}

.tour-target[data-add-plan],
.tour-target .button,
.tour-target button {
  animation: tourPulse 1.05s ease-in-out infinite;
}

.tour-arrow {
  position: fixed;
  z-index: 205;
  padding: 9px 12px 9px 34px;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(22, 100, 255, 0.28);
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
  animation: arrowFloat 0.9s ease-in-out infinite alternate;
}

.tour-arrow::before {
  position: absolute;
  left: 12px;
  top: 50%;
  content: "↑";
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 900;
}

.tour-arrow.red-diagonal {
  padding: 10px 14px 10px 38px;
  background: #ef4444;
  box-shadow: 0 16px 34px rgba(239, 68, 68, 0.34);
  animation-name: arrowDiagonalFloat;
}

.tour-arrow.red-diagonal::before {
  content: "↗";
  color: #fff;
}

.tour-arrow.red-diagonal.long {
  min-width: 168px;
  padding: 13px 18px 13px 52px;
  background: #dc2626;
  box-shadow: 0 20px 44px rgba(220, 38, 38, 0.4);
  font-size: 15px;
}

.tour-arrow.red-diagonal.long::before {
  left: 16px;
  font-size: 30px;
}

.service-modal,
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  place-items: start center;
  padding: 24px;
  padding-top: min(9vh, 72px);
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
  overscroll-behavior: contain;
}

.service-modal.open,
.auth-modal.open {
  display: grid;
}

.service-card,
.auth-card {
  position: relative;
  width: min(420px, 100%);
  padding: 24px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  animation: tourIn 0.22s cubic-bezier(.2,.8,.2,1) forwards;
}

.service-card {
  text-align: center;
}

.auth-card {
  width: min(390px, 100%);
  text-align: left;
}

.service-card h2 {
  margin-top: 6px;
  font-size: 24px;
}

.service-card p:not(.overline) {
  margin: 8px auto 18px;
  max-width: 310px;
  color: var(--sub);
  line-height: 1.7;
}

.service-card img {
  display: block;
  width: min(300px, 82vw);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.service-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--sub);
  font-size: 18px;
}

.auth-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 34px;
}

.auth-head h2 {
  margin-top: 4px;
  font-size: 22px;
}

.auth-head .button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 18px;
  padding: 4px;
  background: #f1f5f9;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 10px;
}

.auth-tabs button {
  min-height: 34px;
  color: #475467;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.auth-tabs button.active {
  color: var(--blue-dark);
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.auth-form {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.auth-form label {
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.auth-form input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.auth-form input:focus {
  border-color: #9dbbff;
  box-shadow: 0 0 0 4px rgba(22, 100, 255, 0.1);
}

.auth-form input:focus-visible {
  outline: 3px solid rgba(22, 100, 255, 0.28);
  outline-offset: 2px;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 8px;
}

.auth-code-row .button {
  min-height: 40px;
  margin-top: 0;
  padding: 0 10px;
  white-space: nowrap;
}

.auth-form .button {
  width: 100%;
  margin-top: 6px;
}

.auth-message {
  min-height: 20px;
  margin-top: 12px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.auth-message[data-tone="error"] {
  color: #b42318;
}

.auth-message[data-tone="success"] {
  color: #047857;
}

.ai-nudge {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  width: min(360px, calc(100vw - 32px));
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(135deg, #1664ff, #14b8a6, #f59e0b) border-box;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.2);
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(.2,.8,.2,1);
}

.ai-nudge.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.ai-nudge::before {
  position: absolute;
  inset: 0;
  width: 110px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82), transparent);
  transform: translateX(-120%);
  animation: aiPickerShine 3.4s ease-in-out infinite;
}

.ai-nudge h3,
.ai-nudge p,
.ai-nudge a,
.ai-nudge .ai-picker-badge,
.ai-nudge-close {
  position: relative;
  z-index: 1;
}

.ai-nudge h3 {
  margin-top: 10px;
  padding-right: 26px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
}

.ai-nudge p {
  margin: 8px 0 14px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.7;
}

.ai-nudge .button {
  width: 100%;
}

.ai-nudge-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--sub);
  font-size: 16px;
}

.uk-list-modal {
  position: fixed;
  inset: 0;
  z-index: 310;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(5px);
  pointer-events: auto;
}

.uk-list-modal.open {
  display: grid;
}

.uk-list-modal-card {
  display: flex;
  flex-direction: column;
  width: min(920px, 76vw);
  height: min(660px, 76vh);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 14px;
  box-shadow: var(--shadow-strong);
  pointer-events: auto;
  transform: translateY(8px) scale(0.98);
  animation: ukListFloatIn 0.2s cubic-bezier(.2,.8,.2,1) forwards;
}

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

.uk-list-modal-header h2 {
  font-size: 22px;
}

.uk-list-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.uk-list-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.uk-list-modal-actions button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--sub);
  font-size: 20px;
}

.uk-list-service-button {
  width: auto;
  min-width: 0;
  height: 42px;
  padding: 0 18px;
  color: var(--blue);
  background: #eff6ff;
  border-color: #cfe0ff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(22, 100, 255, 0.16);
}

.uk-list-service-button:hover {
  background: #e0ecff;
  border-color: #a9c4ff;
}

#ukListFrame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
}

@keyframes ukListFloatIn {
  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes tourIn {
  to {
    transform: translateY(0);
  }
}

@keyframes tourPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes arrowFloat {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(8px);
  }
}

@keyframes arrowDiagonalFloat {
  from {
    transform: translate(-4px, 4px);
  }
  to {
    transform: translate(5px, -5px);
  }
}

@media (max-width: 1180px) {
  .site-header,
  .command-center,
  .workspace,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-nav a,
  .site-nav button {
    height: 36px;
    padding: 0 10px;
  }

  .header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .ai-picker-link {
    max-width: min(310px, 100%);
  }

  .account-chip {
    max-width: min(132px, 100%);
  }

  .uk-list-tool-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .uk-list-actions {
    flex-wrap: wrap;
  }

  .workspace-page {
    height: auto;
    min-height: 100vh;
  }

  .school-panel {
    height: 420px;
  }

  .detail-panel {
    min-height: 720px;
  }

  .content-grid {
    height: auto;
  }

  .program-panel,
  .program-detail {
    min-height: 420px;
  }

  .program-list {
    height: 420px;
  }

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

@media (max-width: 760px) {
  .workspace-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .summary-strip,
  .case-grid,
  .admission-stats {
    grid-template-columns: 1fr;
  }

  .service-notice-card {
    align-items: stretch;
    flex-direction: column;
  }

  .service-notice-card .button {
    width: 100%;
  }

  .quota-actions {
    width: 100%;
  }

  .quota-qr {
    width: 100%;
    max-width: 180px;
  }

  .auth-card,
  .service-card {
    padding: 20px;
  }

  .auth-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .university-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .plan-drawer {
    top: 4vh;
    left: 3vw;
    width: 94vw;
    height: 90vh;
  }

  .ai-nudge {
    right: 14px;
    bottom: 14px;
  }

  .uk-list-modal {
    padding: 12px;
  }

  .uk-list-modal-card {
    width: min(100%, 680px);
    height: min(86vh, 720px);
  }

  .uk-list-modal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .uk-list-modal-actions {
    width: 100%;
    justify-content: space-between;
  }

  .tour-card {
    max-width: min(380px, calc(100vw - 28px));
  }
}

@media (max-width: 520px) {
  .tour-card {
    left: 14px !important;
    right: 14px;
    top: auto !important;
    bottom: 18px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
