/* ================= 招生系统 · 设计系统 ================= */
:root {
  --ink: #121E30;
  --ink2: #25354B;
  --muted: #526177;
  --muted2: #5E6D81;
  --line: #DCE3EB;
  --line2: #EAF0F5;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --blue: #2456BD;
  --blue-d: #1C438F;
  --blue-l: #EBF2FF;
  --green: #087454;
  --green-l: #ECFDF5;
  --amber: #9A4C06;
  --amber-l: #FFF7ED;
  --red: #B42333;
  --red-l: #FEF2F2;
  --violet: #6937B4;
  --violet-l: #F5F3FF;
  --indigo: #4F46E5;
  --slate: #526177;
  --radius: 16px;
  --shadow-sm: 0 2px 4px #14244006;
  --shadow: 0 8px 24px #14244012;
  --shadow-lg: 0 24px 64px #08152830;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --gold: #EBD3A0;
  --night: #101D31;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 500; cursor: pointer;
  transition: .16s ease; white-space: nowrap; user-select: none;
}
.btn:hover { border-color: #CBD5E1; background: #FAFBFD; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .25); }
.btn.primary:hover { background: var(--blue-d); border-color: var(--blue-d); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: #EEF2F8; color: var(--ink); }
.btn.danger { color: var(--red); border-color: #FBD5D5; background: #fff; }
.btn.danger:hover { background: var(--red-l); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 26px; border-radius: 12px; font-size: 15px; }
.btn.block { width: 100%; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink2); font-weight: 500; margin-bottom: 6px; }
.field label .req { color: var(--red); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; outline: none; transition: .15s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.input::placeholder, .textarea::placeholder { color: var(--muted2); }
.hint { font-size: 12px; color: var(--muted2); margin-top: 5px; }
.err { font-size: 12.5px; color: var(--red); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-group label {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13.5px;
  color: var(--ink2); background: #fff; margin: 0; font-weight: 400; transition: .15s;
}
.radio-group input { accent-color: var(--blue); margin: 0; }
.radio-group label:has(input:checked) {
  border-color: var(--blue); background: var(--blue-l); color: var(--blue-d); font-weight: 500;
}

/* ---------- 状态徽章 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px;
  border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap;
  background: #F1F5F9; color: var(--slate);
}
.chip.blue { background: var(--blue-l); color: var(--blue-d); }
.chip.green { background: var(--green-l); color: var(--green); }
.chip.amber { background: var(--amber-l); color: var(--amber); }
.chip.red { background: var(--red-l); color: var(--red); }
.chip.violet { background: var(--violet-l); color: var(--violet); }
.chip.indigo { background: #EEF2FF; color: var(--indigo); }
.chip.slate { background: #F1F5F9; color: var(--slate); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted);
  padding: 12px 14px; background: #FAFBFD; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line2); font-size: 13.5px; }
.table tbody tr:hover { background: #FAFCFF; }
.table tbody tr { cursor: pointer; }
.table .mono { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }

/* ---------- 布局工具 ---------- */
.flex { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.hidden { display: none !important; }

/* ---------- 弹层 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(11, 18, 32, .45); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98) } to { opacity: 1; transform: none } }
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 460px; padding: 24px;
  box-shadow: var(--shadow-lg); animation: pop .18s ease;
}
.modal h3 { font-size: 17px; margin-bottom: 4px; }
.modal .sub { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 12px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); z-index: 300; animation: pop .2s ease;
  max-width: 90vw;
}
.toast.ok { background: #065F46; }
.toast.err { background: #991B1B; }

/* ================= 家长端 ================= */
.p-wrap { max-width: 560px; margin: 0 auto; padding: 0 18px 60px; }
.p-top {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; max-width: 560px; margin: 0 auto; padding: 0 18px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 700;
}
.p-nav a { color: var(--muted); font-size: 13.5px; margin-left: 16px; }
.p-nav a:hover { color: var(--ink); }

.hero {
  background: linear-gradient(160deg, #0B1220 0%, #17233C 55%, #1E3A8A 100%);
  border-radius: 22px; padding: 30px 26px; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(96, 165, 250, .35), transparent 68%);
}
.hero .season { font-size: 12.5px; color: #9DB3D6; letter-spacing: .04em; }
.hero h1 { font-size: 25px; margin: 10px 0 8px; line-height: 1.35; }
.hero p { margin: 0; color: #C3D3EC; font-size: 13.5px; line-height: 1.7; }
.hero .cta { display: flex; gap: 10px; margin-top: 22px; position: relative; z-index: 1; }
.hero .btn.lg { flex: 1; }
.hero .btn.ghost { color: #C3D3EC; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

.sec-title { font-size: 15px; font-weight: 600; margin: 28px 0 12px; display: flex; align-items: center; gap: 8px; }
.sec-title .bar { width: 3px; height: 15px; border-radius: 2px; background: var(--blue); }

.stage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stage-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  cursor: pointer; transition: .18s; position: relative;
}
.stage-card:hover { border-color: #BFD3F7; box-shadow: var(--shadow); transform: translateY(-1px); }
.stage-card h3 { font-size: 15.5px; margin-bottom: 4px; }
.stage-card .meta { color: var(--muted); font-size: 12.5px; }
.stage-card .num { font-size: 21px; font-weight: 600; color: var(--blue-d); font-variant-numeric: tabular-nums; }
.stage-card .num small { font-size: 12px; color: var(--muted2); font-weight: 400; }
.stage-card .ico { position: absolute; right: 14px; top: 14px; font-size: 18px; opacity: .5; }

/* wizard */
.steps { display: flex; align-items: center; gap: 6px; margin: 18px 0 20px; }
.step { flex: 1; text-align: center; font-size: 12px; color: var(--muted2); position: relative; }
.step .n {
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 5px; display: grid; place-items: center;
  background: #EDF1F7; color: var(--muted); font-size: 12.5px; font-weight: 600; transition: .2s;
}
.step.on .n { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.step.done .n { background: var(--green); color: #fff; }
.step.on { color: var(--ink); font-weight: 500; }

.opt {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; margin-bottom: 10px; background: #fff; transition: .15s;
}
.opt:hover { border-color: #BFD3F7; background: #FBFDFF; }
.opt.sel { border-color: var(--blue); background: var(--blue-l); }
.opt .t { font-weight: 500; }
.opt .d { font-size: 12.5px; color: var(--muted); }
.opt .r { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.opt .r b { color: var(--green); font-weight: 600; }
.opt .r b.full { color: var(--red); }
.opt.disabled { opacity: .55; cursor: not-allowed; }

.drop {
  border: 1.5px dashed #CBD5E1; border-radius: 12px; padding: 20px; text-align: center;
  color: var(--muted); background: #FAFBFD; cursor: pointer; transition: .15s;
}
.drop:hover { border-color: var(--blue); background: var(--blue-l); color: var(--blue-d); }
.files { margin-top: 12px; display: grid; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font-size: 13px;
}
.file-item .ico { width: 28px; height: 28px; border-radius: 7px; background: var(--blue-l); color: var(--blue-d); display: grid; place-items: center; font-size: 12px; }
.file-item .del { margin-left: auto; color: var(--muted2); cursor: pointer; }
.file-item .del:hover { color: var(--red); }

/* 结果页 */
.result-hero { padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.result-hero .no { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }
.result-hero h2 { font-size: 20px; margin: 6px 0 2px; }

.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -24px; top: 5px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 2.5px solid var(--line2);
}
.tl-item.done::before { background: var(--green); border-color: var(--green); }
.tl-item.current::before { background: var(--blue); border-color: #BFD3F7; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.tl-item.error::before { background: var(--red); border-color: #FBD5D5; }
.tl-item .t { font-weight: 500; font-size: 13.5px; }
.tl-item .d { font-size: 12.5px; color: var(--muted); }
.tl-item .time { font-size: 11.5px; color: var(--muted2); }

.notice { background: var(--amber-l); border: 1px solid #FDE3C4; color: #92400E; padding: 12px 14px; border-radius: 12px; font-size: 13px; }

/* ================= 管理端 ================= */
.admin { display: flex; min-height: 100vh; }
.side {
  width: 220px; background: var(--ink); color: #fff; padding: 20px 14px; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side .brand { color: #fff; margin-bottom: 26px; padding: 0 8px; }
.side .brand .mark { background: var(--blue); }
.side nav { display: flex; flex-direction: column; gap: 3px; }
.side nav a {
  color: #93A3BC; padding: 10px 12px; border-radius: 9px; font-size: 13.5px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.on { background: rgba(37,99,235,.18); color: #fff; font-weight: 500; }
.side nav a.on::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--blue); margin-left: -12px; }
.side .foot { margin-top: auto; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.05); font-size: 12px; color: #94A3B8; }
.side .foot b { color: #fff; display: block; font-size: 13px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 26px; gap: 14px; position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 16px; }
.content { padding: 24px 26px 60px; }
.page { display: none; }
.page.on { display: block; animation: fade .18s ease; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.kpi .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted2); }

.progress { height: 7px; border-radius: 4px; background: #EEF2F8; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 4px; background: var(--blue); transition: width .4s; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { height: 38px; width: auto; min-width: 140px; }
.toolbar .search { min-width: 220px; }

.drawer-mask { position: fixed; inset: 0; background: rgba(11,18,32,.36); z-index: 90; animation: fade .15s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 94vw; background: #fff;
  z-index: 91; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  animation: slide .2s ease;
}
@keyframes slide { from { transform: translateX(30px); opacity: .6 } to { transform: none; opacity: 1 } }
.drawer .head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.drawer .body { padding: 20px 22px; overflow: auto; flex: 1; }
.drawer .foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; background: #FCFDFF; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.box h4 { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 10px; letter-spacing: .02em; }
.mat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mat {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: #FAFBFD;
}
.mat img { width: 100%; height: 82px; object-fit: cover; display: block; }
.mat .n { padding: 7px 9px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted2); }
.empty .big { font-size: 30px; margin-bottom: 8px; opacity: .5; }

/* 登录 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 600px at 50% -10%, #1E3A8A 0%, #0B1220 55%); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 20px; padding: 30px; box-shadow: var(--shadow-lg); }
.login-card h1 { font-size: 20px; margin-bottom: 4px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-tip { margin-top: 16px; padding: 10px 12px; background: #F8FAFC; border-radius: 10px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.login-tip code { background: #EEF2F7; padding: 1px 5px; border-radius: 4px; }

@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .side { width: 180px; }
}
@media (max-width: 720px) {
  .side { display: none; }
  .content { padding: 16px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .stage-grid { grid-template-columns: 1fr; }
}

/* ================= 家长端 · 极简版 ================= */
.btn.xl { height: 52px; border-radius: 14px; font-size: 16px; font-weight: 600; box-shadow: 0 8px 22px rgba(37, 99, 235, .28); }
.btn.xl.primary:active { transform: translateY(1px); }

.p-intro { padding: 34px 4px 8px; }
.p-intro .season {
  display: inline-block; font-size: 12.5px; color: var(--blue-d); background: var(--blue-l);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 16px; letter-spacing: .03em;
}
.p-intro h1 { font-size: 29px; line-height: 1.35; letter-spacing: -.02em; margin-bottom: 10px; }
.p-intro .desc { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.p-intro .link-row { text-align: center; margin-top: 16px; }
.p-intro .link-row a { font-size: 13px; color: var(--muted); }
.p-intro .link-row a:hover { color: var(--blue); }

.p-head { display: flex; align-items: center; gap: 10px; padding: 20px 0 18px; }
.p-head h2 { font-size: 19px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 15px;
}
.icon-btn:hover { background: #F6F8FC; color: var(--ink); }

.choices { display: flex; flex-wrap: wrap; gap: 9px; }
.choice {
  height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink2); cursor: pointer; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px; transition: .15s; font-family: inherit;
}
.choice:hover { border-color: #BFD3F7; }
.choice.on { border-color: var(--blue); background: var(--blue-l); color: var(--blue-d); font-weight: 600; }
.choice .q { font-size: 11.5px; color: var(--muted2); font-weight: 400; }
.choices.sm .choice { height: 40px; padding: 0 22px; }
.pick-hint { font-size: 13px; color: var(--muted2); padding: 6px 2px; }

.picked {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 12px;
  background: var(--blue-l); border: 1px solid #D8E4FB; border-radius: 12px; font-size: 13.5px;
  color: var(--blue-d); font-weight: 500;
}
.picked a { margin-left: auto; font-size: 12.5px; font-weight: 400; }

.drop.sm { padding: 14px; font-size: 13.5px; }

.more { margin-top: 16px; }
.more summary {
  list-style: none; cursor: pointer; font-size: 13px; color: var(--muted);
  padding: 10px 2px; display: flex; align-items: center; gap: 6px;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "＋"; color: var(--muted2); }
.more[open] summary::before { content: "－"; }

.agree {
  display: flex; gap: 9px; align-items: flex-start; margin: 20px 2px 16px;
  font-size: 12.5px; color: var(--muted); line-height: 1.7; cursor: pointer;
}
.agree input { margin-top: 3px; accent-color: var(--blue); }

@media (max-width: 720px) {
  .row2.keep2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .p-intro h1 { font-size: 26px; }
}

/* 开关 */
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; cursor: pointer; }.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute; inset: 0; background: #D7DEE9; border-radius: 999px; transition: .2s;
}
.switch i::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::after { transform: translateX(18px); }

/* 招生简章 */
.bsec { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.bsec:first-child { padding-top: 0; }
.bsec:last-of-type { border-bottom: 0; }
.bsec h4 {
  font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 0 0 6px;
  display: flex; align-items: center; gap: 7px;
}
.bsec h4::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--blue); }
.bsec p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.85; }
.bdate {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 12.5px; color: var(--ink2);
}

/* ---------- 视觉细化 ---------- */
h1, h2, h3, h4 { line-height: 1.6; font-weight: 650; }

:where(a, button, summary, input, select, textarea):focus-visible,
.switch input:focus-visible + i {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
:where(.side, .p-intro, .hero) :where(a, button):focus-visible { outline-color: var(--gold); }

.btn, .choice, .icon-btn, .drop, .side nav a {
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s var(--ease);
}
.btn.primary {
  background: linear-gradient(155deg, #3165CF, #1D469A);
  border-color: transparent;
  box-shadow: 0 4px 12px #214DAD2E;
}
.btn.primary:hover { background: linear-gradient(155deg, #295ABD, #163A84); }
.btn.primary:disabled { box-shadow: none; }
.input, .select, .textarea {
  min-width: 0;
  line-height: 1.6;
  transition: border-color .18s, box-shadow .18s;
}
.input:focus, .select:focus, .textarea:focus { box-shadow: 0 0 0 4px #2456BD1C; }

.p-top { height: 68px; gap: 12px; }
.brand .mark { flex-shrink: 0; background: linear-gradient(150deg, #314962, var(--night)); color: var(--gold); }
.p-nav a { display: inline-flex; align-items: center; min-height: 44px; margin: 0; white-space: nowrap; }
.p-wrap { overflow-wrap: anywhere; }
.p-wrap .btn, .p-wrap .choice, .p-wrap .icon-btn,
.p-wrap .input, .p-wrap .select, .p-wrap .more summary, .p-wrap .agree { min-height: 44px; }
.p-wrap .icon-btn { min-width: 44px; flex-shrink: 0; }
.p-wrap .picked a, .p-wrap .file-item .del { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.p-wrap .picked a { flex-shrink: 0; }
.p-wrap .row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-wrap .row2 > .field { min-width: 0; }
.p-wrap .file-item .select { flex-shrink: 0; }
.p-wrap .file-item .ico { flex-shrink: 0; }
.p-wrap .file-item .del { flex-shrink: 0; }

.p-intro, .login-wrap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(142deg, #101C30 18%, #172C48 76%, #25496D);
}
.p-intro::before, .login-wrap::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: 460px;
  aspect-ratio: 1;
  top: -235px;
  right: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, #76B8FA45 5%, #4B85C425 38%, transparent 68%);
  animation: ambient-drift 14s ease-in-out infinite alternate;
}
@keyframes ambient-drift {
  from { transform: translate(-10px, 0); }
  to { transform: translate(-115px, 100px) scale(1.18); }
}

.p-intro {
  padding: 32px 24px 16px;
  border-radius: 22px;
  color: #fff;
  box-shadow: var(--shadow);
}
.p-intro .season {
  margin-bottom: 12px;
  border: 1px solid #EBD3A04D;
  background: #EBD3A014;
  color: var(--gold);
  letter-spacing: .08em;
}
.p-intro h1 { font-size: clamp(24px, 7vw, 34px); line-height: 1.6; margin-bottom: 6px; }
.p-intro .desc { color: #D6E1EF; margin-bottom: 22px; }
.p-intro .btn.primary {
  color: var(--night);
  background: linear-gradient(150deg, #F8EBD0, #EBD3A0);
  box-shadow: 0 4px 16px #080F1C38;
}
.p-intro .btn.primary:hover { background: #FFF1D3; }
.p-intro .link-row { margin-top: 6px; }
.p-intro .link-row a { display: inline-flex; align-items: center; min-height: 44px; color: #D6E1EF; }
.p-intro .link-row a:hover { color: #fff; }

.sec-title { font-size: 16px; }
.sec-title .bar, .bsec h4::before { background: #9A7137; }
.bsec { border-bottom-style: solid; padding-block: 14px; }
.p-head { padding-block: 16px; }
.p-head h2 { font-size: 22px; }
.choice.on { box-shadow: inset 0 0 0 1px var(--blue); }
.result-hero { box-shadow: var(--shadow-sm); }

.side {
  background: linear-gradient(170deg, #182941, var(--night) 65%);
  padding: 22px 14px;
  gap: 8px;
  overflow-y: auto;
}
.side .brand { padding-bottom: 18px; margin-bottom: 6px; border-bottom: 1px solid #FFFFFF20; }
.side .brand .mark { background: #EBD3A01A; }
.side nav a { color: #C2CEDF; }
.side nav a.on { background: #7DABEE29; }
.side nav a.on::before { background: var(--gold); }
.side .foot { border: 1px solid #FFFFFF19; color: #C2CEDF; }
.topbar { height: 68px; }
.topbar h2 { font-size: 19px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }
.kpi .v { font-size: 32px; }
.card:has(> .table) { overflow-x: auto; }
.table th { background: #EFF3F8; font-weight: 650; }
.table td { overflow-wrap: anywhere; }
.table tbody tr { transition: background-color .18s; }
.table tbody tr:hover { background: #F0F5FD; }
.progress { background: #E7EDF5; }
.drawer .head, .drawer .foot { flex-shrink: 0; }
.drawer .body { min-height: 0; }
.drawer .kv { grid-template-columns: 96px minmax(0, 1fr); overflow-wrap: anywhere; }
.drawer .box { background: #FAFBFD; }
.modal { max-height: calc(100vh - 40px); overflow: auto; }
.modal-actions { flex-wrap: wrap; }
.login-wrap::before { width: min(85vw, 1000px); top: -48%; right: -12%; }
.login-card {
  max-width: 410px;
  border: 1px solid #fff;
  padding: clamp(24px, 5vw, 36px);
  animation: settle .35s var(--ease);
}
.login-card h1 { font-size: 24px; }
.login-tip { overflow-wrap: anywhere; }

.p-wrap:not(.hidden), .page.on, .modal { animation: settle .28s var(--ease); }
@keyframes settle {
  from { opacity: 0; translate: 0 7px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes toast-in {
  from { opacity: 0; translate: 0 8px; }
  to { opacity: 1; translate: 0 0; }
}
.toast { animation: toast-in .22s var(--ease); }
.drawer { animation-duration: .28s; animation-timing-function: var(--ease); }

@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .p-wrap .row2:not(.keep2) { grid-template-columns: minmax(0, 1fr); }
  .p-wrap .input, .p-wrap .select, .p-wrap .textarea { font-size: 16px; }
  .p-wrap .choices.sm .choice { padding-inline: 12px; }
  .p-wrap .file-item { flex-wrap: wrap; }
}

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

@media print {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
  }
  .p-intro, .login-wrap { background: #fff; color: var(--ink); }
  .p-intro .season, .p-intro .desc, .p-intro .link-row a { color: var(--ink); }
  .p-intro::before, .login-wrap::before { display: none; }
}

/* ---------- 招生门户 · Apple design reference ---------- */
.admissions {
  --achievement-orange: #b65710;
  --ink: #1d1d1f;
  --ink2: #333336;
  --muted: #636369;
  --muted2: #6e6e73;
  --line: #dedee3;
  --line2: #ededf0;
  --bg: #fff;
  --blue: #0066cc;
  --blue-d: #0055ad;
  --blue-l: #eef5ff;
  --radius: 18px;
  --shadow-sm: none;
  --shadow: none;
  --font: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --home-header-height: 0px;
}
.admissions { background: var(--bg); font-size: 15px; }
.admissions .p-wrap { max-width: 680px; padding: 0 24px 56px; }
.admissions #view-home { max-width: none; padding: 0; }
.admissions #view-home .p-intro {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  min-height: 100vh; min-height: 100svh;
  padding: 104px 24px 38vh;
  padding-bottom: 38svh;
  background: #fff; color: var(--ink);
  border: 0; border-radius: 0; box-shadow: none;
  scroll-snap-align: start; scroll-margin-top: 0;
}
.admissions .p-intro::before { content: none; }
.admissions .brand {
  position: absolute; top: clamp(24px, 4vh, 40px); left: 50%;
  transform: translateX(-50%); z-index: 1; display: flex; align-items: center;
  width: min(256px, calc(100% - 48px)); min-height: 44px; margin: 0;
}
.admissions .school-logo { display: block; width: 100%; height: auto; }
.welcome-copy { position: relative; z-index: 1; text-align: center; width: 100%; max-width: 820px; }
.admissions .p-intro .season {
  display: inline-block; padding: 0; margin: 0 0 12px;
  border: 0; border-radius: 0; background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: .035em;
}
.admissions .p-intro h1 {
  margin: 0 0 16px; font-size: clamp(40px, 4.5vw, 56px);
  font-weight: 600; letter-spacing: -.035em; line-height: 1.22;
}
.admissions .p-intro h1 .title-line:last-child { color: #173e78; }
.typewriter-title .title-line { display: flex; justify-content: center; }
.typewriter-title .title-phrase { display: inline-block; position: relative; }
.typewriter-title .title-char {
  display: inline-block; position: relative; color: inherit; opacity: 0;
  animation: title-reveal .04s step-start forwards;
  animation-delay: calc(.3s + var(--type-order) * .12s);
}
/* Let punctuation hang outside the centered Chinese phrase. */
.typewriter-title .title-punctuation { position: absolute; left: 100%; top: 0; }
.typewriter-title .title-char::after {
  content: ""; position: absolute; right: -.025em; top: .15em; bottom: .12em;
  width: 1.5px; background: currentColor; opacity: 0;
  animation: title-caret .12s linear both;
  animation-delay: calc(.3s + var(--type-order) * .12s);
}
@keyframes title-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes title-caret {
  0%, 100% { opacity: 0; }
  2%, 98% { opacity: .65; }
}
.welcome-school { margin: 0 0 5px; color: var(--ink); font-size: 21px; font-weight: 400; }
.admissions .p-intro .desc { margin: 0; font-size: 17px; line-height: 1.65; color: var(--muted); }
.welcome-actions { display: flex; align-items: center; justify-content: center; margin-top: 22px; }
.admissions .btn.primary {
  border: 1px solid transparent; background: var(--blue); color: #fff;
  border-radius: 999px; box-shadow: none; font-weight: 400;
}
.admissions .btn.primary:hover { background: #0071e3; border-color: transparent; }
.admissions .btn.primary:active:not(:disabled) { transform: scale(.97); }
.admissions .p-intro .btn.primary {
  height: 50px; min-width: 148px; gap: 16px; padding: 0 24px;
  background: var(--blue); color: #fff; box-shadow: none; border-radius: 999px;
  font-size: 17px; font-weight: 400;
}
.admissions .p-intro .btn.primary:hover { background: #0071e3; }
.admissions .btn.primary:disabled { background: #e8e8ed; color: #68686e; opacity: 1; box-shadow: none; }
.admissions .scroll-cue {
  position: absolute; z-index: 1; bottom: max(18px, env(safe-area-inset-bottom)); left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; width: fit-content; min-height: 48px; margin-inline: auto;
  padding: 4px 16px;
  font-size: 14px; font-weight: 600; letter-spacing: .025em; color: var(--achievement-orange);
  text-shadow: 0 0 4px #fff, 0 1px 3px #fff;
  animation: cue-drift 4.5s ease-in-out infinite;
}
.admissions .scroll-cue svg { filter: drop-shadow(0 1px 2px #fff); }
@keyframes cue-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
html.home-paging { scroll-snap-type: y proximity; }
.admissions #brochure {
  margin: 0; padding: clamp(40px, 7vh, 80px) 24px;
  min-height: 100vh; min-height: 100svh;
  background: #f5f5f7; scroll-snap-align: start; scroll-margin-top: 0;
}
.brochure-reveal { max-width: 880px; margin-inline: auto; }
.section-kicker { color: var(--muted); font-size: 11px; letter-spacing: .14em; font-weight: 400; }
.admissions #brochure h2 {
  margin: 6px 0 32px; color: var(--ink); font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.3; letter-spacing: -.025em; font-weight: 600;
}
.admissions .p-wrap h1:focus, .admissions #brochure h2:focus, .admissions .p-head h2:focus { outline: none; }
.admissions .p-intro :where(a, button):focus-visible { outline-color: var(--blue); }
.admissions .card { border: 1px solid var(--line); border-radius: 18px; box-shadow: none; }
.admissions #introText { padding: clamp(22px, 4vw, 40px); border: 0; background: #fff; }
.admissions .bsec { padding: 22px 0; border-bottom: 1px solid var(--line2); }
.admissions .bsec:first-child { padding-top: 0; }
.admissions .bsec:last-of-type { border-bottom: 0; }
.admissions .bsec h4 { margin-bottom: 8px; font-size: 18px; font-weight: 600; }
.admissions .bsec h4::before { content: none; }
.admissions .bsec p, .admissions #introText > .small { font-size: 16px; line-height: 1.85; }
.admissions .bdate { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line2); font-size: 13px; }
.admissions #contactLine { margin-top: 22px; font-size: 13px; text-align: center; line-height: 1.7; }
.brochure-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 24px; margin-top: 28px; }
.brochure-actions a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); }
.brochure-motion .brochure-reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity .7s ease, transform .9s var(--ease);
}
.brochure-motion .is-visible .brochure-reveal { opacity: 1; transform: translateY(0); }

/* ---------- 预约表单 ---------- */
.admissions .p-head { padding: 28px 0 20px; }
.admissions .p-head h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 600; letter-spacing: -.02em; }
.apply-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.apply-steps li {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 2px 12px; border-bottom: 2px solid var(--line2);
  color: var(--muted); font-size: 13px;
}
.apply-steps li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #f5f5f7; font-size: 11px; }
.apply-steps li[aria-current="step"] { color: var(--ink); border-color: var(--blue); font-weight: 600; }
.apply-steps li[aria-current="step"] span { background: var(--blue); color: #fff; }
.apply-steps li.complete { border-color: #a3bfe9; }
.step-note { margin: 16px 0 22px; color: var(--muted); line-height: 1.7; }
.admissions .card-pad { padding: 24px; }
.choice-panel .field { margin-bottom: 0; }
.choice-panel .field + .field { border-top: 1px solid var(--line2); margin-top: 20px; padding-top: 20px; }
.admissions .field label { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.admissions .input, .admissions .select, .admissions .textarea { border-color: #d2d2d7; border-radius: 10px; font-size: 16px; min-height: 48px; }
.admissions .input:focus, .admissions .select:focus, .admissions .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #0066cc1c; }
.admissions [aria-invalid="true"] { border-color: var(--red); }
.admissions .choice { min-height: 46px; height: auto; padding-block: 9px; justify-content: center; border-radius: 999px; font-size: 14px; }
.admissions .choice.on { border-color: var(--blue); background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--blue); font-weight: 600; }
.admissions .picked { background: #f5f5f7; border: 0; padding-block: 4px; color: var(--ink); border-radius: 12px; }
.admissions .drop { width: 100%; font: inherit; min-height: 48px; border-color: #c4c4ce; background: #fafafc; }
.admissions .form-action { margin-top: 24px; }
.admissions .form-action .err { background: var(--red-l); padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.admissions .form-action .step-note { margin: 0 0 12px; font-size: 13px; }
.admissions .agree { align-items: flex-start; }
.admissions .agree input { width: 18px; height: 18px; flex-shrink: 0; }
.success-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; margin: 4px auto 16px; background: var(--green-l); color: var(--green); font-size: 28px; }

@media (max-width: 700px) {
  .admissions .p-wrap { padding-inline: 16px; }
  .admissions #view-home { padding: 0; }
  .admissions .brand { width: min(240px, calc(100% - 48px)); }
  .admissions #view-home .p-intro { padding: 100px 20px 37vh; padding-bottom: 37svh; gap: 24px; }
  .admissions .p-intro h1 { font-size: clamp(38px, 10.5vw, 48px); letter-spacing: -.04em; margin-bottom: 16px; }
  .admissions .p-intro .season { font-size: 13px; margin-bottom: 12px; }
  .welcome-school { font-size: 16px; }
  .admissions .p-intro .desc { font-size: 14px; }
  .admissions #brochure { padding-inline: 20px; }
  .admissions .card-pad { padding: 20px; }
  .admissions .p-head { padding-top: 22px; }
  .admissions .p-wrap .row2.keep2 { grid-template-columns: minmax(0, 1fr); }
  .admissions #genderPick .choice { min-width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html.home-paging { scroll-snap-type: none; }
  .brochure-motion .brochure-reveal { opacity: 1; transform: none; }
  .typewriter-title .title-char { opacity: 1; animation: none; }
  .typewriter-title .title-char::after { display: none; }
}
@media print {
  html.home-paging { scroll-snap-type: none; }
  .admissions #view-home .p-intro, .admissions #brochure { min-height: 0; padding-block: 24px; }
  .admissions .brand { position: static; transform: none; margin: 0 auto 24px; }
  .admissions #view-home .p-intro { display: block; }
  .brochure-motion .brochure-reveal { opacity: 1; transform: none; }
  .typewriter-title .title-char { opacity: 1; animation: none; }
  .typewriter-title .title-char::after { display: none; }
  .admissions .scroll-cue { display: none; }
}

/* Full-bleed campus photo fades into the white space above. */
.campus-photo {
  position: absolute; inset: auto 0 0; margin: 0;
  height: 52vh; height: 52svh; pointer-events: none;
  opacity: var(--campus-opacity, 1);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 12%, #000 63%);
  mask-image: linear-gradient(to bottom, transparent 0%, transparent 12%, #000 63%);
}
.campus-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
@media (max-width: 700px) {
  .campus-photo { height: 48vh; height: 48svh; }
}
@media (prefers-reduced-motion: reduce) {
  .campus-photo { opacity: 1; }
}
@media print {
  .campus-photo {
    position: static; height: auto; max-width: 760px; margin: 24px auto 0;
    opacity: 1; -webkit-mask-image: none; mask-image: none; break-inside: avoid;
  }
}

/* ---------- 学校成果字幕 ---------- */
.achievement-ticker {
  --ticker-min-line: 46px;
  --ticker-line: var(--ticker-min-line);
  display: flex; align-items: center;
  width: 100%; max-width: 560px; min-height: var(--ticker-line); margin: 36px auto 0;
  padding: 0; background: transparent;
  color: var(--achievement-orange); font-family: "Microsoft YaHei", "PingFang SC", "Heiti SC", "SimHei", sans-serif;
  font-size: 28px; font-weight: 700;
}
.achievement-window { flex: 1; min-width: 0; height: var(--ticker-line); overflow: hidden; overflow: clip; overflow-anchor: none; }
.achievement-track { list-style: none; padding: 0; margin: 0;  }
.achievement-track.is-offscreen { animation-name: none !important; }
.achievement-track li {
  display: flex; align-items: center; justify-content: center;
  height: var(--ticker-line); line-height: 1.5; white-space: normal; overflow-wrap: anywhere;
}
.achievement-track li > span { display: block; width: 100%; }
.achievement-static {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; list-style: none;
}

@media (max-width: 700px) {
  .achievement-ticker { --ticker-min-line: 40px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce), print {
  .achievement-ticker { display: block; padding: 0; }
  .achievement-static { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; white-space: normal; }
  .achievement-static li { line-height: 1.9; }
  .achievement-window { display: none; }
}

/* ---------- 后台首页内容编辑 ---------- */
.content-editor-intro { margin-bottom: 24px; align-items: flex-start; }
.content-editor-intro p { margin: 6px 0 0; }
.content-editor-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.content-editor-grid form { min-width: 0; }
.content-fieldset { min-width: 0; width: 100%; margin: 0; }
.content-fieldset legend { padding: 0 8px; font-size: 18px; font-weight: 600; }
.content-row { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.content-row h4 { font-size: 14px; font-weight: 600; }
.content-row > .flex { margin-bottom: 14px; }
.content-row .field:last-child { margin-bottom: 0; }
.content-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.content-ticker-row > label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.content-ticker-row .content-row-actions { justify-content: flex-end; margin-top: 8px; }
.content-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.content-editor-actions .btn.primary { margin-left: auto; }
@media (max-width: 1100px) {
  .content-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .content-editor-intro { flex-wrap: wrap; }
}

/* 宽版弹窗（基础数据等三栏内容） */
.modal.wide { max-width: 780px; }

/* 渠道邀请链接提示条 */
.invite-banner {
  margin: 10px 4px 0; padding: 8px 12px; border-radius: 10px;
  background: var(--blue-l); color: var(--blue-d);
  font-size: 12.5px; letter-spacing: .01em;
}

/* 工作台招生信息链 · 波形电路 */
.dashboard-chain { margin-bottom: 16px; container-type: inline-size; }
.chain-heading { margin-bottom: 12px; gap: 8px; }
.chain-heading h3 { font-size: 15px; }
.chain-diagram {
  position: relative;
  height: 260px;
  border-radius: 12px;
  background: radial-gradient(#d9dcf0 1px, transparent 1px) 0 0 / 17px 17px, #f3f4ff;
}
.chain-circuit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.chain-compact { display: none; }
.chain-circuit path { fill: none; vector-effect: non-scaling-stroke; }
.chain-wire { stroke: #a8a7d9; stroke-width: 1.5; }
.chain-current {
  stroke: #6742dc;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 3 4 9 84;
  filter: drop-shadow(0 0 3px #9174f4);
  animation: chain-travel 3.2s linear infinite;
  animation-delay: var(--chain-delay);
}
.chain-branch .chain-wire { stroke: #bf7383; stroke-dasharray: 3 5; }
.chain-branch .chain-current { stroke: #bd465e; filter: drop-shadow(0 0 3px #e28b9c); }
@keyframes chain-travel { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.chain-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 1px solid #deddf0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 12px rgba(38, 31, 82, .09);
  color: var(--ink);
  cursor: pointer;
}
.chain-node:hover { box-shadow: 0 0 0 4px rgba(103, 66, 220, .18); }
.chain-node:focus-visible { outline: 2px solid #6742dc; outline-offset: 4px; }
.chain-node-count { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chain-node-count-long { font-size: 12px; overflow-wrap: anywhere; max-width: 48px; }
.chain-node-label { position: absolute; top: calc(100% + 4px); white-space: nowrap; font-size: 12px; }
.chain-node-rejected .chain-node-label { color: #a63b50; }
.chain-node-done {
  border: 3px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #b9f26d, #32c77b 48%, #008858) border-box;
  color: #08774f;
}
.chain-caption { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
@container (max-width: 610px) {
  .chain-diagram { height: 470px; }
  .chain-node { left: var(--small-x); top: var(--small-y); width: 54px; height: 54px; }
  .chain-wide { display: none; }
  .chain-compact { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .chain-current { animation: none; }
}

/* 侧边栏分组 */
.nav-group { margin-top: 14px; }
.nav-group-title {
  padding: 0 14px 6px; font-size: 11px; letter-spacing: .08em;
  color: rgba(255,255,255,.42); font-weight: 500;
}
.nav-group a { margin-top: 0; }

/* 图标占固定宽度，避免不同 emoji 宽度导致文字不齐 */
.side nav a > span:first-child {
  flex: 0 0 18px; width: 18px; text-align: center; line-height: 1;
}
.side nav a { gap: 10px; }

/* ================= 浮层统一（模态 / 抽屉） ================= */
.mask {
  background: rgba(11, 18, 32, .38);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
  animation: maskIn .2s ease both;
}
.drawer-mask {
  background: rgba(11, 18, 32, .30);
  -webkit-backdrop-filter: blur(6px) saturate(115%);
  backdrop-filter: blur(6px) saturate(115%);
  animation: maskIn .2s ease both;
}
@keyframes maskIn { from { opacity: 0 } to { opacity: 1 } }

.modal {
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 28px 64px -24px rgba(11, 18, 32, .5),
              0 2px 8px -2px rgba(11, 18, 32, .12),
              inset 0 1px 0 rgba(255, 255, 255, .8);
  animation: modalIn .24s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.drawer {
  box-shadow: -24px 0 60px -28px rgba(11, 18, 32, .45);
  animation: drawerIn .26s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes drawerIn {
  from { opacity: .7; transform: translateX(28px); }
  to   { opacity: 1; transform: none; }
}

.modal:focus, .drawer:focus { outline: none; }
.modal-actions .btn { min-width: 84px; }

@media (prefers-reduced-motion: reduce) {
  .mask, .drawer-mask, .modal, .drawer { animation: none !important; }
}

/* ================= 拟物按钮（五个层级 · 五层材质） ================= */
/* u = 标签字号 / 14，所有长度都按 u 缩放，改字号时材质跟着缩放 */
.btn {
  --u: 1px;
  --btn-face: linear-gradient(180deg, #FFFFFF 0%, #F4F5F7 100%);
  --btn-face-hover: linear-gradient(180deg, #FFFFFF 0%, #FAFBFC 100%);
  --btn-face-press: linear-gradient(180deg, #EDEFF2 0%, #F7F8FA 100%);
  --btn-edge: rgba(15, 23, 42, .14);
  --btn-ink: #1F2937;
  --btn-hi: rgba(255, 255, 255, .95);
  --btn-lo: rgba(0, 0, 0, .06);
  --btn-contact: rgba(15, 23, 42, .16);
  --btn-lift: rgba(15, 23, 42, .18);
  --btn-inset-press: rgba(15, 23, 42, .16);
  --btn-lift-rest: 0 calc(4 * var(--u)) calc(10 * var(--u)) calc(-3 * var(--u)) var(--btn-lift);
  --btn-lift-hover: 0 calc(8 * var(--u)) calc(16 * var(--u)) calc(-5 * var(--u)) var(--btn-lift);

  display: inline-flex; align-items: center; justify-content: center;
  gap: calc(6 * var(--u));
  height: calc(40 * var(--u)); padding: 0 calc(18 * var(--u));
  border-radius: calc(10 * var(--u));
  border: 1px solid var(--btn-edge);
  background: var(--btn-face);
  color: var(--btn-ink);
  font-size: calc(14 * var(--u)); font-weight: 600; line-height: 1;
  cursor: pointer; white-space: nowrap; user-select: none;
  box-shadow:
    inset 0 1px 0 var(--btn-hi),
    inset 0 -1px 0 var(--btn-lo),
    inset 0 0 0 transparent,
    0 calc(1 * var(--u)) calc(2 * var(--u)) var(--btn-contact),
    var(--btn-lift-rest);
  transition:
    transform 120ms ease,
    box-shadow 140ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    filter 160ms ease;
}
.btn:hover:not(:disabled) {
  background: var(--btn-face-hover);
  box-shadow:
    inset 0 1px 0 var(--btn-hi),
    inset 0 -1px 0 var(--btn-lo),
    inset 0 0 0 transparent,
    0 calc(1 * var(--u)) calc(2 * var(--u)) var(--btn-contact),
    var(--btn-lift-hover);
}
.btn:active:not(:disabled) {
  transform: translateY(calc(1 * var(--u)));
  background: var(--btn-face-press);
  box-shadow:
    inset 0 1px 2px var(--btn-inset-press),
    inset 0 0 0 transparent,
    inset 0 0 0 transparent,
    0 calc(1 * var(--u)) calc(1 * var(--u)) var(--btn-contact),
    0 1px 0 rgba(255, 255, 255, .9);
}
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* —— primary：品牌蓝，深色面 —— */
.btn.primary {
  --btn-face: linear-gradient(180deg, #3D84F7 0%, #2563EB 100%);
  --btn-face-hover: linear-gradient(180deg, #4E8FF8 0%, #2B6BEE 100%);
  --btn-face-press: linear-gradient(180deg, #1E4FCB 0%, #2F6BE8 100%);
  --btn-edge: #1D4ED8;
  --btn-ink: #FFFFFF;
  --btn-hi: rgba(255, 255, 255, .24);
  --btn-lo: rgba(0, 0, 0, .22);
  --btn-contact: rgba(15, 23, 42, .2);
  --btn-lift: rgba(37, 99, 235, .38);
  --btn-inset-press: rgba(0, 0, 0, .4);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .22);
}

/* —— tertiary：浅灰键 —— */
.btn.tertiary {
  --btn-face: linear-gradient(180deg, #F3F4F6 0%, #E7E9EC 100%);
  --btn-face-hover: linear-gradient(180deg, #F7F8FA 0%, #ECEEF1 100%);
  --btn-face-press: linear-gradient(180deg, #E2E5E9 0%, #EFF1F4 100%);
  --btn-edge: rgba(15, 23, 42, .1);
}

/* —— ghost：无面，悬停淡灰，按下凹陷 —— */
.btn.ghost {
  --btn-face: transparent;
  --btn-face-hover: rgba(15, 23, 42, .05);
  --btn-face-press: rgba(15, 23, 42, .08);
  --btn-edge: transparent;
  --btn-ink: var(--muted);
  --btn-hi: transparent;
  --btn-lo: transparent;
  --btn-contact: transparent;
  --btn-lift: transparent;
  --btn-inset-press: rgba(15, 23, 42, .12);
  border-color: transparent;
  box-shadow: none;
}
.btn.ghost:hover:not(:disabled) { color: var(--ink); }

/* —— 轻危险：浅面红字 —— */
.btn.danger {
  --btn-ink: var(--red);
  --btn-edge: #F1C9C9;
  --btn-face: linear-gradient(180deg, #FFFFFF 0%, #FDF4F4 100%);
  --btn-face-hover: linear-gradient(180deg, #FFFFFF 0%, #FBEAEA 100%);
  --btn-face-press: linear-gradient(180deg, #F7DFDF 0%, #FDF2F2 100%);
}

/* —— 尺寸：按 u 缩放 —— */
.btn.sm { --u: calc(13 / 14 * 1px); }
.btn.lg { --u: calc(16 / 14 * 1px); }
.btn.block { width: 100%; }

/* —— text：下划线 + 箭头右移 —— */
.btn.text {
  height: auto; padding: 0; border: 0; background: none; box-shadow: none;
  color: var(--muted); font-weight: 500; text-shadow: none;
  border-bottom: 1px solid currentColor; border-radius: 0;
  transition: color 160ms ease, gap 120ms ease;
}
.btn.text:hover:not(:disabled) { background: none; color: var(--ink); gap: calc(9 * var(--u)); }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn:active { transition: none; }
}
