/* 深圳中考高中库 · 网页版样式
   移动优先；桌面端居中，最大 720px */

:root {
  --blue: #0041B9;
  --blue-deep: #00318C;
  --blue-soft: #EEF3FC;
  --yellow: #FFCD00;
  --ink: #1B2333;
  --ink-mid: #46506A;
  --muted: #7A8499;
  --line: #E8EDF6;
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --danger: #C0392B;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(16, 34, 76, .06);
  --tabbar-h: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: #E9EEF7;
  color: var(--ink);
  overflow-x: hidden;
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }

.shell {
  position: relative;
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 40px rgba(16, 34, 76, .08);
}

#app { padding: 16px 16px calc(var(--tabbar-h) + 28px); }

/* ---------- 通用块 ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  overflow: hidden;
}

.section-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.muted { color: var(--muted); font-size: 13px; line-height: 1.55; }

.disclaimer {
  background: #FFF9E3;
  border: 1px solid #F6E6A6;
  color: #6B5A17;
  font-size: 12.5px;
  line-height: 1.7;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.foot-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  padding: 6px 4px 8px;
}

.link-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.link-card .section-title { margin-bottom: 2px; }
.link-card::after { content: "›"; color: var(--muted); font-size: 20px; }
.link-card:hover { box-shadow: 0 4px 18px rgba(16, 34, 76, .12); }

/* ---------- 顶部 hero ---------- */

.hero {
  background: linear-gradient(160deg, var(--blue) 0%, #0A54D8 100%);
  border-radius: var(--radius);
  padding: 22px 20px 24px;
  color: #fff;
  margin-bottom: 14px;
}

.hero-tag {
  display: inline-block;
  background: var(--yellow);
  color: #1B2333;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.hero-title {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .5px;
  margin-top: 12px;
}

.hero-sub {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #D5E2FF;
}

/* ---------- 搜索与筛选 ---------- */

.search-input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0 14px 0 40px;
  font-size: 15px;
  outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%237A8499' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>");
  background-repeat: no-repeat;
  background-position: 14px center;
}

.search-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 65, 185, .1); }

.filter-block { margin: 14px 0 4px; }

.filter-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.segmented {
  display: inline-flex;
  background: #E7EDF8;
  border-radius: 10px;
  padding: 3px;
}

.segmented button {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
  color: var(--ink-mid);
}

.segmented button.on {
  background: #fff;
  color: var(--blue);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(16, 34, 76, .1);
}

.area-select {
  flex: 1;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0 10px;
  font-size: 13.5px;
  color: var(--ink-mid);
  outline: none;
}

.filter-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 6px 13px;
  border-radius: 8px;
  background: #EEF2F9;
  color: var(--ink-mid);
  font-size: 13px;
  line-height: 1.4;
}

.chip.on { background: var(--blue); color: #fff; font-weight: 600; }

.sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 10px;
}

.sort-btn {
  font-size: 12.5px;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

/* ---------- 学校卡片 ---------- */

.school-card { padding: 16px 16px 12px; cursor: pointer; transition: box-shadow .16s, transform .16s; }
.school-card:hover { box-shadow: 0 6px 20px rgba(16, 34, 76, .12); }
.school-card:active { transform: scale(.995); }

.card-head { display: flex; align-items: center; gap: 12px; }

/* 校徽：统一圆角白底方块，图内已留呼吸位，object-fit contain 防变形 */
.logo-tile {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #EBEFF7;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-tile img { width: 100%; height: 100%; object-fit: contain; display: block; }

.logo-fallback {
  background: var(--blue-soft);
  border-color: transparent;
  color: var(--blue);
  font-size: 18px;
  font-weight: 700;
}

.logo-lg { width: 56px; height: 56px; border-radius: 15px; }
.logo-lg.logo-fallback { font-size: 22px; }
.logo-sm { width: 32px; height: 32px; border-radius: 9px; }
.logo-sm.logo-fallback { font-size: 14px; }
.logo-xs { width: 30px; height: 30px; border-radius: 8px; }
.logo-xs.logo-fallback { font-size: 13px; }

.rank-badge {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue);
  color: var(--yellow);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title-wrap { flex: 1; min-width: 0; }

/* 学校名前的 2026 年排名序号 */
.name-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

/* 校名允许两行，长校名（如「深圳市高级中学中心校区」）不被截断 */
.name-row .school-name {
  flex: 1;
  min-width: 0;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  /* 中文按 <wbr> 断行，不在汉字之间乱断；真放不下时再 anywhere 兜底 */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.rank-no {
  flex: none;
  margin-top: 1px;
  min-width: 24px;
  height: 19px;
  padding: 0 5px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  letter-spacing: -.2px;
}

.school-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-box {
  flex: none;
  min-width: 58px;
  padding: 5px 8px;
  border-radius: 10px;
  background: var(--blue-soft);
  text-align: center;
}

.score-num { font-size: 20px; font-weight: 700; color: var(--blue); line-height: 1.2; }
.score-unit { font-size: 11px; color: var(--blue); margin-left: 1px; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--ink-mid);
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.add-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 7px 14px;
  border-radius: 9px;
}

.add-btn:active { background: #DCE6FA; }

.empty-state { text-align: center; padding: 40px 20px; }
.empty-state .state-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }

/* ---------- 详情页 ---------- */

.detail-hero {
  border-radius: var(--radius);
  overflow: hidden;
  background: #DDE4F0;
  height: 210px;
}

.detail-hero img { width: 100%; height: 100%; object-fit: cover; }

.detail-hero-card { position: relative; margin-top: -22px; z-index: 2; }

.hero-head { display: flex; align-items: flex-start; gap: 14px; }
.hero-info { flex: 1; min-width: 0; }

.hero-name { display: block; font-size: 22px; font-weight: 700; line-height: 1.35; margin-top: 10px; }
.hero-meta { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

.row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #F2F5FA;
  font-size: 14px;
}

.row:last-child { border-bottom: 0; }
.row-label { flex: none; width: 104px; color: var(--muted); font-size: 13px; }
.row-value { flex: 1; color: var(--ink); font-weight: 600; }
.row-value-text { flex: 1; color: var(--ink-mid); line-height: 1.65; }

.long-text { display: block; font-size: 14px; color: var(--ink-mid); line-height: 1.8; margin-bottom: 8px; }

/* 高考成绩 */

.gk-hint { margin: -4px 0 12px; font-size: 12px; line-height: 1.6; }

.gk-table { border-radius: 12px; overflow: hidden; background: #F7F9FD; }

.gk-tr {
  display: flex;
  align-items: center;
  padding: 11px 12px;
  font-size: 14px;
  border-top: 1px solid #EDF1F8;
}

.gk-tr:first-child { border-top: 0; }

.gk-th {
  background: #EEF3FC;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 9px 12px;
}

.gk-td { flex: 1; text-align: center; }
.gk-td:first-child { text-align: left; }

.gk-y { flex: 0 0 58px; color: var(--ink-mid); font-weight: 600; font-size: 13px; }
.gk-th .gk-y { color: var(--muted); }

.gk-num { color: var(--blue); font-weight: 700; font-size: 15px; }
.gk-num-s { font-size: 14px; letter-spacing: -.2px; }
.gk-txt { color: var(--ink-mid); font-size: 12px; line-height: 1.4; display: inline-block; }
.gk-na { color: #C3CBD9; }

.gk-empty {
  background: #F7F9FD;
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.gk-note { margin-top: 12px; border-top: 1px dashed #E4EAF4; padding-top: 10px; }
.gk-note summary {
  font-size: 13px;
  color: var(--blue);
  cursor: pointer;
  list-style: none;
  padding: 2px 0;
}
.gk-note summary::-webkit-details-marker { display: none; }
.gk-note summary::after { content: ' ▾'; font-size: 11px; }
.gk-note[open] summary::after { content: ' ▴'; }
.gk-note .long-text { margin-top: 8px; margin-bottom: 0; font-size: 13px; white-space: pre-wrap; }

/* 宿舍图 */

.dorm-strip {
  position: relative;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.dorm-strip::-webkit-scrollbar { display: none; }

.dorm-strip img {
  flex: none;
  width: 100%;
  height: 200px;
  object-fit: cover;
  scroll-snap-align: center;
  border-radius: 12px;
  background: #E4EAF4;
  cursor: zoom-in;
}

.dorm-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.dorm-thumbs::-webkit-scrollbar { display: none; }

.dorm-thumbs img {
  flex: none;
  width: 74px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #E4EAF4;
  border: 2px solid transparent;
  cursor: pointer;
}

.dorm-thumbs img.on { border-color: var(--blue); }

.empty-photo {
  background: #F2F5FA;
  color: var(--muted);
  font-size: 13px;
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  margin-bottom: 8px;
}

/* 加入志愿 */

.add-row { margin-top: 12px; }

.add-row button {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.add-row button:active { background: var(--blue-deep); }

.picked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFF9E3;
  border: 1px solid #F6E6A6;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 14px;
  color: #6B5A17;
}

.remove-btn { font-size: 13px; color: var(--danger); }

.go-draft { display: block; margin-top: 10px; font-size: 13px; color: var(--blue); }

/* ---------- 志愿模拟 ---------- */

.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F2F5FA;
}

.form-row:last-of-type { border-bottom: 0; }
.form-row label { flex: none; width: 72px; font-size: 14px; color: var(--ink-mid); }

.form-row select, .form-row input {
  flex: 1;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  font-size: 14.5px;
  outline: none;
}

.form-row select:focus, .form-row input:focus { border-color: var(--blue); }

.primary-btn {
  width: 100%;
  height: 46px;
  margin-top: 14px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.equiv-card {
  background: linear-gradient(150deg, var(--blue) 0%, #0A54D8 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

.equiv-label { font-size: 12.5px; color: #CBDCFF; }
.equiv-num { font-size: 34px; font-weight: 700; color: var(--yellow); line-height: 1.2; }
.equiv-unit { font-size: 14px; color: #fff; margin-left: 4px; }
.equiv-note { display: block; margin-top: 6px; font-size: 12px; color: #D5E2FF; line-height: 1.6; }

.group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.group-title { font-size: 16px; font-weight: 700; }
.group-range { font-size: 12px; color: var(--muted); }
.group-count { margin-left: auto; font-size: 12px; color: var(--muted); }

.mock-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #F2F5FA;
  cursor: pointer;
}

.mock-item:hover { background: #FAFBFE; }
.mock-left { flex: 1; min-width: 0; }
.mock-name { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.mock-right { flex: none; text-align: right; }
.mock-score { display: block; font-size: 17px; font-weight: 700; color: var(--blue); }
.mock-diff { display: block; font-size: 12px; color: var(--muted); }

.mock-add {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 19px;
  line-height: 30px;
  text-align: center;
}

.mock-add.on { background: #EEF3FC; color: var(--muted); font-size: 11px; line-height: 30px; }

/* ---------- 志愿梯子 ---------- */

.form-hint {
  margin: -4px 0 10px;
  padding: 0 2px;
  font-size: 11.5px;
  line-height: 1.65;
  color: #94A1B8;
}

.zy-scheme-sub {
  margin: -2px 0 12px;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.zy-map {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, .28);
}

.zy-map-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 2px;
  font-size: 12px;
  color: #C6D6F5;
  border-radius: 6px;
}

.zy-map-row.head { font-size: 11px; color: #93A9D6; }
.zy-map-row.on { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; }
.zy-map-k { flex: none; width: 40px; color: #fff; }
.zy-map-v { flex: 1; min-width: 0; }
.zy-map-d { flex: none; width: 56px; text-align: right; }
.zy-map-e { flex: none; width: 46px; text-align: right; }

.zy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 0;
  border-top: 1px solid #F2F5FA;
}

.zy-row:first-of-type { border-top: 0; }

.zy-no {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #EEF3FC;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.zy-main { flex: 1; min-width: 0; cursor: pointer; }

.zy-name {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zy-main:active .zy-name { color: var(--blue); }

.zy-meta {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zy-fig { flex: none; min-width: 44px; text-align: right; }

.zy-fig b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--blue);
}

.zy-diff { display: block; font-size: 11px; line-height: 1.4; }
.zy-diff.up { color: #C2761C; }
.zy-diff.down { color: #2F7D5F; }
.zy-diff.flat { color: var(--muted); }

.zy-row .mock-add { border: 0; padding: 0; cursor: pointer; font-family: inherit; }

.card > .zk-note { border-top: 0; margin-top: 0; padding-top: 0; }

.zy-save {
  display: block;
  width: 100%;
  margin: -4px 0 14px;
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  border: 0;
  cursor: pointer;
}

.zy-save:active { opacity: .8; }

.zy-rule {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px dashed #EDF1F8;
}

.zy-rule:first-of-type { border-top: 0; }

.zy-rule b {
  flex: none;
  width: 62px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.65;
}

.zy-rule span {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-mid);
}

.zy-tip {
  margin: 0 0 12px;
  background: #FFF7E8;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.7;
  color: #8A6320;
}

/* ---------- 志愿表 ---------- */

.summary-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.summary-num { font-size: 30px; font-weight: 700; color: var(--blue); }
.summary-hint { font-size: 13px; color: var(--muted); }

.plan-item { border-bottom: 1px solid #F2F5FA; padding: 12px 0; }
.plan-item:last-child { border-bottom: 0; }
.plan-main { display: flex; align-items: center; gap: 10px; cursor: pointer; }

.plan-no {
  flex: none;
  width: 52px;
  font-size: 12px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 7px;
  padding: 4px 0;
  text-align: center;
}

.plan-body { flex: 1; min-width: 0; }
.plan-name { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.plan-score { flex: none; text-align: right; }
.plan-score b { display: block; font-size: 17px; color: var(--blue); }
.plan-score span { font-size: 11px; color: var(--muted); }

.plan-actions { display: flex; gap: 8px; margin-top: 9px; padding-left: 62px; }

.mini-btn {
  font-size: 12.5px;
  color: var(--ink-mid);
  background: #F1F4FA;
  border-radius: 7px;
  padding: 5px 12px;
}

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

.clear-all {
  width: 100%;
  margin-top: 4px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #F0D6D2;
  color: var(--danger);
  font-size: 14px;
}

/* ---------- 科普 ---------- */

.term-card { cursor: pointer; }
.term-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.term-title { font-size: 15.5px; font-weight: 600; }
.term-arrow { font-size: 12px; color: var(--blue); }
.term-brief { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); }
.term-detail { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-mid); line-height: 1.8; }

/* ---------- 底部导航 ---------- */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 720px;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  z-index: 40;
}

.tabbar button {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
}

.tabbar button.on { color: var(--blue); font-weight: 600; }
.tabbar .tab-ico { font-size: 17px; line-height: 1; }

.tabbar i {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(11px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #E23B2E;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 16px;
  text-align: center;
}

/* ---------- 加载与灯箱 ---------- */

.loading-card { text-align: center; padding: 60px 20px; color: var(--muted); }

.spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto 14px;
  border: 3px solid #DDE5F3;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 14, 30, .94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* hidden 属性的 display:none 会被上面的 display:flex 覆盖，这里补回来 */
.lightbox[hidden] { display: none; }

.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

.lightbox-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

/* ---------- 桌面端 ---------- */

@media (min-width: 760px) {
  #app { padding: 24px 28px calc(var(--tabbar-h) + 40px); }
  .hero { padding: 30px 28px; }
  .hero-title { font-size: 30px; }
  .detail-hero { height: 300px; }
  .dorm-strip img { height: 260px; }
  .card { padding: 22px; }
  .school-card:hover { transform: translateY(-1px); }
  .dorm-strip img { width: 100%; }
}

/* ---------- 自主招生 ---------- */

.zk-hero { padding: 20px 20px 22px; }

.zk-seg {
  display: flex;
  gap: 6px;
  background: #E7ECF6;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 10px;
}

.zk-seg button {
  flex: 1;
  padding: 10px 6px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-mid);
  transition: background .15s, color .15s;
}

.zk-seg button.on {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 4px rgba(16, 34, 76, .1);
}

.zk-cat-desc {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
  padding: 0 4px 12px;
}

.zk-card { padding: 14px 14px 12px; cursor: pointer; transition: box-shadow .16s; }
.zk-card.open { cursor: default; box-shadow: 0 4px 18px rgba(16, 34, 76, .1); }

.zk-meta {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-mid);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zk-stat {
  flex: none;
  min-width: 52px;
  text-align: center;
  background: var(--blue-soft);
  border-radius: 10px;
  padding: 4px 6px;
}

.zk-stat-num {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.25;
}

.zk-stat-lb { display: block; font-size: 10px; color: var(--muted); line-height: 1.3; }

.zk-chev {
  flex: none;
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: #9BA6BE;
  transition: transform .18s;
}

.zk-chev.open { transform: rotate(180deg); color: var(--blue); }

.zk-body {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  cursor: default;
}

.zk-ghead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 8px;
}

.zk-ghead:first-child { margin-top: 0; }

.zk-gtag {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
  padding: 3px 8px;
}

.zk-gcount { font-size: 12px; color: var(--muted); }

.zk-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-mid);
  padding: 6px 0 2px;
}

.zk-item {
  padding: 8px 0;
  border-bottom: 1px dashed #EDF1F8;
}

.zk-item:last-child { border-bottom: 0; }

.zk-item-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.zk-item-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}

.zk-item-plan {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
}

.zk-item-score {
  flex: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}

.zk-item-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.zk-item-way { flex: 1; min-width: 0; }

.zk-item-click { cursor: pointer; }
.zk-item-click:active { background: #FAFBFE; }

.zk-item-more {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.zk-item.open .zk-item-name { color: var(--blue); }

.zk-item-arr {
  font-style: normal;
  font-size: 13px;
  line-height: 1;
  transition: transform .18s;
}

.zk-item.open .zk-item-arr { transform: rotate(90deg); }

.zk-item-body {
  margin: 8px 0 2px;
  background: #F7F9FD;
  border-radius: 10px;
  padding: 10px 12px;
}

.zk-ib-pre {
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.zk-ib-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-mid);
  white-space: pre-wrap;
  word-break: break-word;
}

.zk-ib-hint {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.65;
  color: #9AA5BC;
}

.zk-note { margin-top: 10px; border-top: 1px dashed #E4EAF4; padding-top: 8px; }

.zk-note summary {
  font-size: 13px;
  color: var(--blue);
  cursor: pointer;
  list-style: none;
  padding: 2px 0;
}

.zk-note summary::-webkit-details-marker { display: none; }
.zk-note summary::after { content: ' ▾'; font-size: 11px; }
.zk-note[open] summary::after { content: ' ▴'; }

.zk-note .long-text {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-mid);
  white-space: pre-wrap;
}

.zk-tip {
  margin-top: 12px;
  background: #F7F9FD;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.zk-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 10px;
  padding: 10px;
}

.zk-link:active { opacity: .8; }

/* 校名允许两行，避免「深圳大学附属中学中心校区」这类长名被截断 */
.zk-card .school-name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

.zk-hint { display: block; margin-top: 6px; color: #9AA5BC; }

.zk-school-link {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #F7F9FD;
  color: var(--ink-mid);
  font-size: 13px;
  text-align: center;
}

.zk-school-link:active { opacity: .75; }

/* ---------- 数据解锁（高考成绩 / 升学数据 / 宿舍环境） ---------- */

.lk-wrap {
  position: relative;
  max-height: 486px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.lk-blur {
  filter: blur(5px);
  opacity: .55;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.lk-veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, .16) 0%,
    rgba(255, 255, 255, .58) 44%,
    rgba(255, 255, 255, .94) 76%,
    #FFFFFF 100%);
}

.lk-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
}

.lk-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.lk-desc {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

.lk-btn {
  width: 100%;
  max-width: 258px;
  height: 44px;
  margin-top: 12px;
  border-radius: 22px;
  background: var(--blue);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow: 0 6px 16px rgba(0, 65, 185, .24);
}

.lk-btn:active { transform: scale(.985); opacity: .92; }

.lk-note {
  margin-top: 8px;
  font-size: 11.5px;
  color: #9AA5BC;
}

/* ---------- 解锁留资弹窗 ---------- */

body.ul-open { overflow: hidden; }

.ul-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 41, .46);
  animation: ulFade .18s ease both;
}

.ul-sheet {
  width: 100%;
  max-width: 460px;
  padding: 20px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 30px rgba(16, 34, 76, .18);
  animation: ulUp .24s cubic-bezier(.22, .9, .3, 1) both;
}

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

.ul-head strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.ul-x {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #F3F6FC;
  color: #7A8499;
  font-size: 20px;
  line-height: 28px;
  text-align: center;
}

.ul-sub {
  margin: 6px 0 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

.ul-field { display: block; margin-bottom: 12px; }

.ul-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-mid);
}

.ul-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid #E3EAF6;
  border-radius: 12px;
  background: #F8FAFE;
  /* 16px 起，iOS 聚焦时不会自动放大页面 */
  font-size: 16px;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
}

.ul-field input::placeholder { color: #AEB8CB; font-size: 14px; }
.ul-field input:focus { border-color: var(--blue); background: #fff; }

.ul-submit {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(0, 65, 185, .22);
}

.ul-submit:active { opacity: .9; }

.ul-tip {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.7;
  color: #9AA5BC;
  text-align: center;
}

@keyframes ulFade { from { opacity: 0; } to { opacity: 1; } }

@keyframes ulUp {
  from { transform: translateY(24px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 720px) {
  .ul-mask { align-items: center; }
  .ul-sheet { border-radius: 20px; }
}
