/* ============================================================
   灯塔志愿 · 智能筛选页（screener.html）
   ============================================================ */

.scr-wrap { padding: 104px 20px 90px; max-width: 1180px; }

/* ---------- 页头 ---------- */
.scr-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 22px;
}
.scr-head h1 {
  font-size: 30px; font-weight: 800; color: var(--navy-900);
  margin: 12px 0 8px; letter-spacing: -.5px;
}
.scr-head p { color: var(--muted); font-size: 15px; max-width: 640px; }
.scr-demo-note {
  flex-shrink: 0; max-width: 250px;
  font-size: 11.5px; line-height: 1.7; color: #8f6f2c;
  background: rgba(212,175,106,.12); border: 1px solid rgba(201,164,92,.35);
  border-radius: 12px; padding: 10px 12px;
}

/* ---------- 通用面板 ---------- */
.panel {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

/* ---------- 信息录入 ---------- */
.panel-input {
  display: grid;
  grid-template-columns: .8fr .72fr 1.45fr .85fr 1fr .8fr;
  gap: 20px; align-items: start;
}
.pi-label {
  display: block; font-size: 13px; font-weight: 700; color: var(--navy-800);
  margin-bottom: 9px;
}
.pi-sub { font-size: 11px; font-weight: 400; color: var(--muted-2); margin-left: 4px; }
.pi-hint { display: block; font-size: 11px; color: var(--muted-2); margin-top: 5px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: var(--white);
  color: var(--ink-2); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 99px; cursor: pointer;
  transition: all .18s; font-family: inherit;
}
.chip:hover { border-color: var(--navy-500); color: var(--navy-600); }
.chip.is-on {
  background: var(--navy-700); border-color: var(--navy-700);
  color: #f3ead7; box-shadow: 0 4px 12px rgba(23,69,47,.22);
}
.chip-sm .chip { padding: 5px 12px; font-size: 12.5px; }

.score-line { display: flex; gap: 8px; }
#scoreInput, #rankInput, .pf-select {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: 11px;
  background: var(--white); color: var(--ink);
  font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .18s;
}
#scoreInput:focus, #rankInput:focus, .pf-select:focus { border-color: var(--navy-500); }
#scoreInput { flex: 1; min-width: 0; }
.voice-btn {
  flex-shrink: 0; height: 40px; padding: 0 12px;
  border: 1.5px solid rgba(201,164,92,.55); border-radius: 11px;
  background: rgba(212,175,106,.12); color: #8f6f2c;
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 5px; font-family: inherit;
  transition: all .18s;
}
.voice-btn:hover { background: rgba(212,175,106,.22); }
.voice-btn.listening {
  background: #c0392b; border-color: #c0392b; color: #fff;
  animation: voicePulse 1.2s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,.4); }
  50% { box-shadow: 0 0 0 7px rgba(192,57,43,0); }
}
.voice-status { font-size: 11.5px; color: var(--muted); margin-top: 6px; min-height: 16px; }
.rank-tag {
  font-size: 10.5px; font-weight: 700; color: var(--navy-600);
  background: rgba(29,92,62,.1); border: 1px solid rgba(29,92,62,.2);
  padding: 2px 8px; border-radius: 99px; margin-left: 4px;
}

/* ---------- 筛选面板 ---------- */
.panel-filter { padding: 16px 22px; }
.pf-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 0;
}
.pf-row + .pf-row { border-top: 1px dashed var(--line); }
.pf-label {
  flex-shrink: 0; width: 62px;
  font-size: 13px; font-weight: 700; color: var(--navy-800);
}
.pf-label-2 { width: auto; margin-left: 10px; }
.pf-select { width: auto; min-width: 130px; height: 36px; font-size: 13px; }
.pf-major { min-width: 190px; }
.seg {
  display: inline-flex; border: 1.5px solid var(--line);
  border-radius: 11px; overflow: hidden;
}
.seg-btn {
  border: none; background: var(--white); color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 7px 16px;
  cursor: pointer; font-family: inherit; transition: all .18s;
}
.seg-btn.is-on { background: var(--navy-700); color: #f3ead7; }

/* ---------- 统计条 ---------- */
.result-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 4px 2px 16px;
}
.result-summary > span { font-size: 13px; color: var(--muted); }
.result-summary b { color: var(--navy-800); }
.rs-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.rs-pill {
  font-style: normal; font-size: 12px; font-weight: 600;
  padding: 4px 11px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--white); color: var(--muted);
}
.rs-pill b { margin-left: 3px; }

/* 数据源徽标 */
.rs-src {
  font-style: normal; font-size: 12px; font-weight: 700;
  padding: 4px 11px; border-radius: 99px; border: 1px solid transparent;
  white-space: nowrap;
}
.rs-src-official { color: #0f5132; background: #d8f0e2; border-color: #9fd8b8; }
.rs-src-seed { color: #7c5a17; background: #f6ead0; border-color: #e3c78d; }
.rs-src-demo { color: #5d6b63; background: #eef2ef; border-color: #d8e0da; }
.rs-src-loading { color: #8a6d2f; background: #faf3e2; border-color: #e8d9b0; }
.rs-spin { display: inline-block; animation: rs-spin 1s linear infinite; }
@keyframes rs-spin { to { transform: rotate(360deg); } }

/* 交叉工具链接 */
.rs-to-same {
  font-style: normal; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  color: var(--navy-600); text-decoration: none; padding: 4px 10px;
  border: 1px solid rgba(36,115,80,.25); border-radius: 99px; background: rgba(36,115,80,.06);
}
.rs-to-same:hover { background: rgba(36,115,80,.13); }
.pi-link { color: var(--navy-600); font-weight: 700; text-decoration: none; }
.pi-link:hover { text-decoration: underline; }
.pf-school { min-width: 210px; flex: 1 1 190px; max-width: 280px; }
.rs-reach { color: #c0392b; background: rgba(192,57,43,.08); border-color: rgba(192,57,43,.25); }
.rs-stable { color: #1d5c3e; background: rgba(29,92,62,.08); border-color: rgba(29,92,62,.25); }
.rs-safe { color: #1f63b0; background: rgba(31,99,176,.08); border-color: rgba(31,99,176,.25); }
.rs-hard { color: var(--muted-2); background: var(--bg-soft); }
.rs-new { color: #7c4dbd; background: rgba(124,77,189,.08); border-color: rgba(124,77,189,.25); }

/* ---------- 分层组 ---------- */
.tier-group {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 18px; margin-bottom: 16px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tg-head {
  display: flex; align-items: center; gap: 13px;
  padding: 15px 20px; border-bottom: 1px solid var(--line);
}
.tg-ico {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.tg-head h3 { font-size: 16px; font-weight: 800; color: var(--navy-900); }
.tg-head h3 small {
  font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 8px;
}
.tg-head p { font-size: 12px; color: var(--muted); margin-top: 1px; }
.g-reach .tg-ico { background: rgba(192,57,43,.1); }
.g-stable .tg-ico { background: rgba(29,92,62,.1); }
.g-safe .tg-ico { background: rgba(31,99,176,.1); }
.g-hard .tg-ico { background: var(--bg-soft); }
.g-new .tg-ico { background: rgba(124,77,189,.1); }

/* ---------- 院校行 ---------- */
.srow {
  display: grid;
  grid-template-columns: minmax(0,1fr) 140px 168px 80px 88px;
  gap: 12px; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  cursor: default; transition: background .15s;
}
.srow:last-child { border-bottom: none; }
.srow:hover { background: var(--bg-soft); }
.sr-detail {
  border: 1.5px solid var(--navy-500); background: transparent;
  color: var(--navy-600); font-size: 12.5px; font-weight: 500;
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
  white-space: nowrap; transition: all .15s;
}
.sr-detail:hover {
  background: var(--navy-600); color: #fff; transform: translateY(-1px);
}
.sr-line1 { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sr-name { font-size: 15px; font-weight: 700; color: var(--navy-900); }
.sr-badges { display: inline-flex; gap: 5px; }
.lv-i {
  font-style: normal; font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 6px; line-height: 1.7;
}
.lv-985 { background: rgba(192,57,43,.12); color: #c0392b; }
.lv-211 { background: rgba(31,99,176,.12); color: #1f63b0; }
.lv-dbl { background: rgba(29,92,62,.12); color: var(--navy-600); }
.lv-oth { background: var(--bg-soft); color: var(--muted); }
.sr-new {
  font-style: normal; font-size: 10.5px; font-weight: 700;
  color: #7c4dbd; background: rgba(124,77,189,.1);
  padding: 1px 7px; border-radius: 6px;
}
.sr-line2 {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 4px; font-size: 12px; color: var(--muted);
}
.sr-prob {
  position: relative; height: 8px; border-radius: 99px;
  background: var(--bg-soft); overflow: visible;
  display: flex; align-items: center;
}
.sr-prob i {
  position: absolute; left: 0; top: 0; height: 8px; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-400), var(--navy-500));
  transition: width .5s;
}
.sr-prob b {
  position: absolute; right: -2px; top: -25px;
  font-size: 12px; font-weight: 800; color: var(--navy-700);
  transform: translateX(50%);
}
.sr-major {
  height: 36px; padding: 0 8px; font-size: 12.5px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--white); color: var(--ink);
  font-family: inherit; outline: none; max-width: 172px;
}
.sr-major:focus { border-color: var(--navy-500); }
.sr-add {
  height: 36px; border: 1.5px solid var(--navy-700); border-radius: 10px;
  background: var(--navy-700); color: #f3ead7;
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all .18s; white-space: nowrap;
}
.sr-add:hover { background: var(--navy-600); }
.sr-add.is-added {
  background: transparent; color: var(--muted);
  border-color: var(--line); cursor: default;
}

/* ---------- 悬浮详情卡 ---------- */
.school-pop {
  position: fixed; z-index: 900; width: 340px; max-height: 70vh; overflow-y: auto;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 18px;
  box-shadow: 0 20px 50px rgba(11,36,25,.18);
  font-size: 12.5px;
  touch-action: pan-y;   /* 移动端触摸：允许纵向滑动穿透 */
}
.sp-close {
  position: absolute; top: 8px; right: 10px; width: 26px; height: 26px;
  border: none; background: rgba(0,0,0,.05); border-radius: 50%;
  font-size: 17px; line-height: 1; color: var(--muted-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.sp-close:hover { background: rgba(0,0,0,.12); color: var(--navy-800); }
.sp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sp-head b { font-size: 15px; color: var(--navy-900); }
.sp-head span { font-size: 11px; color: var(--muted-2); }
.sp-badges { color: var(--muted); font-size: 11.5px; margin: 6px 0 10px; }
.sp-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 10px;
}
.sp-grid > div {
  background: var(--bg-soft); border-radius: 10px; padding: 7px 10px;
  display: flex; flex-direction: column;
}
.sp-grid span { font-size: 10.5px; color: var(--muted); }
.sp-grid b { font-size: 13.5px; color: var(--navy-800); }
.sp-scores p {
  display: flex; gap: 8px; font-size: 11.5px; color: var(--ink-2);
  padding: 3px 0;
}
.sp-scores label {
  flex-shrink: 0; width: 52px; font-weight: 700; color: var(--navy-700);
}
.sp-majors { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 11.5px; }
.sp-majors th {
  text-align: left; color: var(--muted); font-weight: 600;
  padding: 5px 4px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.sp-majors td { padding: 5px 4px; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.sp-new {
  margin-top: 9px; font-size: 11.5px; color: #7c4dbd;
  background: rgba(124,77,189,.08); border-radius: 9px; padding: 7px 10px;
}
.sp-note { margin-top: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }

/* ---------- 空状态 ---------- */
.result-empty {
  text-align: center; padding: 70px 20px;
  background: var(--white); border: 1px dashed var(--line);
  border-radius: 18px;
}
.re-emoji { font-size: 42px; margin-bottom: 12px; }
.result-empty h3 { font-size: 17px; color: var(--navy-900); margin-bottom: 8px; }
.result-empty p { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }

/* ---------- 志愿表悬浮按钮 ---------- */
.wl-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 800;
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #3d2e10; border: none; border-radius: 99px;
  padding: 13px 22px; font-size: 14.5px; font-weight: 800;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 12px 30px rgba(143,111,44,.35);
  transition: transform .18s;
}
.wl-fab:hover { transform: translateY(-2px); }
.wl-fab b {
  background: #3d2e10; color: var(--gold-300);
  min-width: 22px; height: 22px; border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}

/* ---------- 抽屉 ---------- */
.drawer-mask {
  position: fixed; inset: 0; z-index: 850;
  background: rgba(7,26,18,.45); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 860;
  width: 420px; max-width: 92vw; height: 100vh;
  background: var(--white); border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .28s cubic-bezier(.22,.9,.32,1);
  box-shadow: -12px 0 40px rgba(11,36,25,.12);
}
.drawer.open { transform: translateX(0); }
.dr-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 14px; border-bottom: 1px solid var(--line);
}
.dr-head h3 { font-size: 17px; color: var(--navy-900); }
.dr-close {
  border: none; background: var(--bg-soft); color: var(--muted);
  width: 32px; height: 32px; border-radius: 9px;
  font-size: 20px; cursor: pointer; line-height: 1;
}
.dr-tables { padding: 14px 22px 10px; display: flex; flex-direction: column; gap: 9px; }
.dr-table-ops { display: flex; gap: 8px; }
.dr-op {
  flex: 1; border: 1px solid var(--line); background: var(--white);
  color: var(--navy-700); font-size: 12.5px; font-weight: 600;
  padding: 7px 0; border-radius: 9px; cursor: pointer; font-family: inherit;
}
.dr-op:hover { border-color: var(--navy-500); }
.dr-op-danger { color: #c0392b; }
.dr-list { flex: 1; overflow-y: auto; padding: 6px 14px 14px; }
.dr-empty {
  text-align: center; color: var(--muted-2); font-size: 13px;
  padding: 60px 20px; line-height: 2;
}
.dr-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 10px; border-radius: 12px;
}
.dr-item:hover { background: var(--bg-soft); }
.dr-idx {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 8px;
  background: var(--navy-700); color: #f3ead7;
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.dr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dr-main b { font-size: 13.5px; color: var(--navy-900); }
.dr-main > span { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.dr-tier {
  align-self: flex-start; font-size: 10.5px; font-weight: 700;
  padding: 1px 8px; border-radius: 99px; margin-top: 3px;
}
.dr-tier-reach { color: #c0392b; background: rgba(192,57,43,.1); }
.dr-tier-stable { color: #1d5c3e; background: rgba(29,92,62,.1); }
.dr-tier-safe { color: #1f63b0; background: rgba(31,99,176,.1); }
.dr-tier-hard { color: var(--muted); background: var(--bg-soft); }
.dr-tier-new { color: #7c4dbd; background: rgba(124,77,189,.1); }
.dr-rm {
  flex-shrink: 0; border: none; background: none;
  color: var(--muted-2); font-size: 18px; cursor: pointer;
  padding: 2px 6px; border-radius: 8px; line-height: 1;
}
.dr-rm:hover { color: #c0392b; background: rgba(192,57,43,.08); }
.dr-foot {
  padding: 14px 22px 22px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.dr-clear {
  border: none; background: none; color: var(--muted-2);
  font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.dr-clear:hover { color: #c0392b; }

/* ---------- Toast ---------- */
.scr-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 950; background: rgba(7,26,18,.92); color: #e7eee9;
  font-size: 13px; font-weight: 600; padding: 11px 22px;
  border-radius: 99px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  max-width: 86vw; text-align: center;
}

/* ---------- 页脚 ---------- */
.footer-scr {
  border-top: 1px solid var(--line); padding: 20px 0;
  font-size: 12px; color: var(--muted-2);
}
.footer-scr .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-scr a { color: var(--navy-600); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .panel-input { grid-template-columns: 1fr 1fr; }
  .srow { grid-template-columns: minmax(0,1fr) 130px; row-gap: 10px; }
  .sr-major, .sr-detail, .sr-add { grid-column: auto; }
  .srow .sr-prob { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .scr-wrap { padding: 90px 14px 80px; }
  .scr-head { flex-direction: column; align-items: flex-start; }
  .scr-demo-note { max-width: none; }
  .scr-head h1 { font-size: 24px; }
  .panel { padding: 16px; }
  .panel-input { grid-template-columns: 1fr; gap: 16px; }
  .srow { grid-template-columns: 1fr; gap: 10px; padding: 14px 16px; }
  .sr-major { max-width: none; }
  .pf-label { width: 100%; }
  .rs-counts { margin-left: 0; }
  .wl-fab { right: 16px; bottom: 16px; padding: 12px 18px; font-size: 13.5px; }
  .school-pop { width: calc(100vw - 28px); }
}

/* ---------- 暗色微调 ---------- */
html[data-theme="dark"] .scr-head .text-gradient-blue {
  background: linear-gradient(120deg, #6fca9d, #2f8a5e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="dark"] .scr-head h1 { color: #f2ead6; }
html[data-theme="dark"] .pi-label { color: #e7eee9; }
html[data-theme="dark"] .pf-label { color: #e7eee9; }
html[data-theme="dark"] .chip:hover { color: var(--gold-300); }
html[data-theme="dark"] .rank-tag { color: var(--gold-300); background: rgba(212,175,106,.12); border-color: rgba(201,164,92,.3); }
html[data-theme="dark"] .voice-btn { background: rgba(212,175,106,.12); }
html[data-theme="dark"] .rs-src-official { color: #8fdcb0; background: rgba(37,117,75,.18); border-color: rgba(88,178,122,.35); }
html[data-theme="dark"] .rs-src-seed { color: #ecd9a8; background: rgba(212,175,106,.13); border-color: rgba(201,164,92,.35); }
html[data-theme="dark"] .rs-src-demo { color: #aebcb4; background: rgba(255,255,255,.05); border-color: var(--line); }
html[data-theme="dark"] .rs-to-same { color: var(--gold-300); background: rgba(212,175,106,.1); border-color: rgba(201,164,92,.32); }
html[data-theme="dark"] .pi-link { color: var(--gold-300); }
html[data-theme="dark"] .tg-head h3 { color: #f2ead6; }
html[data-theme="dark"] .sr-name { color: #e7eee9; }
html[data-theme="dark"] .sr-add.is-added { color: var(--muted); }
html[data-theme="dark"] .sr-detail {
  border-color: #ecd9a8; color: #ecd9a8;
}
html[data-theme="dark"] .sr-detail:hover {
  background: #ecd9a8; color: #071a12;
}
html[data-theme="dark"] .result-summary b { color: #e7eee9; }
html[data-theme="dark"] .sp-head b { color: #f2ead6; }
html[data-theme="dark"] .sp-grid b { color: #ecd9a8; }
html[data-theme="dark"] .sp-majors td { color: #c4d2c9; }
html[data-theme="dark"] .sp-close { background: rgba(255,255,255,.08); color: #8ea397; }
html[data-theme="dark"] .sp-close:hover { background: rgba(255,255,255,.16); color: #f2ead6; }
html[data-theme="dark"] .dr-main b { color: #f2ead6; }
html[data-theme="dark"] .dr-head h3 { color: #f2ead6; }
html[data-theme="dark"] .seg-btn { color: var(--muted); }
html[data-theme="dark"] .drawer-mask { background: rgba(0,0,0,.6); }
