/* 校招信息站 v1：移动优先 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f4f5f7; color: #222; font-size: 15px; line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
html, body { overflow-x: clip; }
.wrap { max-width: 640px; margin: 0 auto; padding: 12px 12px 76px; }
header.top {
  position: sticky; top: 0; z-index: 10;
  background: #1677ff; color: #fff; padding: 14px 16px;
  font-size: 17px; font-weight: 600;
}
header.top small { display: block; font-size: 12px; font-weight: 400; opacity: .85; }
h2.sec { font-size: 16px; margin: 18px 2px 10px; display: flex; align-items: center; }
h2.sec .tag { font-size: 11px; background: #1677ff; color: #fff; border-radius: 8px;
  padding: 1px 8px; margin-left: 8px; font-weight: 400; }
h2.sec .tag.hot { background: #f5222d; }
.card {
  background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); display: block; color: inherit; text-decoration: none;
}
.card h3 { font-size: 15px; margin-bottom: 6px; }
.card h3 .co { color: #1677ff; }
.meta { font-size: 12.5px; color: #666; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.badge {
  display: inline-block; font-size: 11px; border-radius: 6px; padding: 1px 7px; margin-left: 6px;
  vertical-align: 1px;
}
.badge.danger { background: #fff1f0; color: #f5222d; border: 1px solid #ffa39e; }
.badge.warn { background: #fffbe6; color: #d48806; border: 1px solid #ffe58f; }
.badge.ok { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.badge.gray { background: #f5f5f5; color: #888; border: 1px solid #e0e0e0; }
.empty { text-align: center; color: #999; padding: 30px 0; font-size: 14px; }
/* 底部导航 */
nav.bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  background: #fff; border-top: 1px solid #e8e8e8;
  display: flex; max-width: 640px; margin: 0 auto;
}
nav.bottom a {
  flex: 1; text-align: center; padding: 10px 0 12px; font-size: 12px;
  color: #888; text-decoration: none;
}
nav.bottom a.on { color: #1677ff; font-weight: 600; }
nav.bottom a .ic { font-size: 20px; display: block; }
/* 搜索 */
.searchbar { display: flex; gap: 8px; margin: 12px 0; }
.searchbar input {
  flex: 1; border: 1px solid #ddd; border-radius: 10px; padding: 10px 12px; font-size: 15px;
}
.btn {
  background: #1677ff; color: #fff; border: none; border-radius: 10px;
  padding: 10px 18px; font-size: 15px;
}
.btn.ghost { background: #f0f0f0; color: #333; }
.btn.danger { background: #f5222d; }
.btn.block { width: 100%; margin-top: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.filters select, .filters input {
  flex: 1 1 30%; border: 1px solid #ddd; border-radius: 8px; padding: 8px; font-size: 13px;
  background: #fff;
}
.notice {
  background: #fffbe6; border: 1px solid #ffe58f; border-radius: 10px;
  padding: 10px 12px; font-size: 13px; color: #874d00; margin: 10px 0;
}
/* 详情 */
.kv { display: flex; padding: 9px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.kv .k { width: 92px; color: #888; flex-shrink: 0; }
.kv .v { flex: 1; }
.countdown {
  background: linear-gradient(135deg, #1677ff, #4096ff); color: #fff; border-radius: 12px;
  padding: 16px; text-align: center; margin: 12px 0;
}
.countdown .n { font-size: 34px; font-weight: 700; }
.statusrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.statusrow button {
  border: 1px solid #ddd; background: #fff; border-radius: 20px; padding: 7px 14px; font-size: 13px;
}
.statusrow button.on { background: #1677ff; color: #fff; border-color: #1677ff; }
/* 表单 */
.formcard { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.formcard label { display: block; font-size: 13px; color: #666; margin: 10px 0 4px; }
.formcard select, .formcard input, .formcard textarea {
  width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 9px; font-size: 14px;
}
.subitem { display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; font-size: 14px; }
.subitem button { border: none; background: none; color: #f5222d; font-size: 14px; }
.tabs { display: flex; gap: 8px; margin: 12px 0; overflow-x: auto; }
.tabs button { border: 1px solid #ddd; background: #fff; border-radius: 16px;
  padding: 6px 14px; font-size: 13px; white-space: nowrap; }
.tabs button.on { background: #1677ff; color: #fff; border-color: #1677ff; }
.mj-content { display: none; }
.mj-content.show { display: block; }
/* ===== 轻量排版（面经 / 问答） ===== */
.md { font-size: 14px; color: #333; }
.md h4 { font-size: 14.5px; margin: 14px 0 6px; padding-left: 9px;
  border-left: 3px solid #1677ff; color: #111; line-height: 1.4; }
.md h4:first-child { margin-top: 2px; }
.md p { margin: 7px 0; line-height: 1.8; }
.md ul, .md ol { margin: 7px 0; padding-left: 22px; }
.md li { margin: 5px 0; line-height: 1.75; }
.md li::marker { color: #1677ff; font-weight: 700; }
.md strong { color: #111; }
.md .sec-t { display: inline-block; font-size: 13px; font-weight: 700; color: #fff;
  background: #1677ff; border-radius: 8px; padding: 2px 10px; margin: 12px 0 2px; }
.md .sec-t:first-child { margin-top: 2px; }
.blank { background: #fff7e6; border-bottom: 2px solid #faad14; border-radius: 3px;
  padding: 0 3px; color: #874d00; }
/* 面经卡片 */
.mj-head { display: flex; align-items: center; gap: 10px; }
.expand-tip { margin-left: auto; flex-shrink: 0; font-size: 12px; color: #1677ff; white-space: nowrap; }
.mj-body { display: none; margin-top: 10px; border-top: 1px dashed #e8e8e8; padding-top: 6px; }
.mj-body.show { display: block; }
/* 问答 */
.qa-q { display: flex; align-items: flex-start; gap: 8px; }
.qa-q .expand-tip { margin-left: 0; }
/* 面试问答手风琴 */
.qa-num { display: inline-block; min-width: 24px; height: 24px; line-height: 24px; text-align: center;
  background: #1677ff; color: #fff; font-size: 12px; font-weight: 700; border-radius: 7px;
  margin-right: 8px; padding: 0 6px; vertical-align: 1px; }
.qa-answer { font-size: 14px; color: #444; white-space: pre-wrap; margin-top: 8px;
  background: #fafafa; border-radius: 8px; padding: 10px; display: none; }
.qa-answer.show { display: block; }
table.diff { width: 100%; font-size: 13px; border-collapse: collapse; background: #fff; }
table.diff td, table.diff th { border: 1px solid #eee; padding: 6px; text-align: left; }
.meter { font-size: 26px; font-weight: 700; color: #1677ff; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: #fff; border-radius: 10px; padding: 12px; text-align: center; }
.stat .t { font-size: 12px; color: #888; }

/* ===== 详情页 ===== */
.detail-head { display: flex; align-items: center; gap: 12px; }
.detail-head .avatar { width: 52px; height: 52px; font-size: 22px; border-radius: 14px; }
.detail-head .card-title h3 { font-size: 17px; white-space: normal; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chip { background: #eef4ff; color: #1677ff; font-size: 12.5px; border-radius: 14px; padding: 5px 12px; }
/* 投递方式小徽标 */
.m-badge { background: #f6ffed; color: #389e0d; border: 1px solid #d9f7be;
  font-size: 11.5px; border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
/* 搜索结果视图切换（仅桌面端显示） */
.view-toggle { display: none; }
@media (min-width: 1100px) {
  .view-toggle { display: inline-flex; border: 1px solid #d9d9d9; border-radius: 16px; overflow: hidden; }
  .view-toggle button { border: none !important; border-radius: 0 !important; margin: 0 !important; }
  .view-toggle button.on { background: #1677ff !important; color: #fff !important; }
}
/* PC 表格视图 */
.tablewrap { overflow-x: auto; background: #fff; border-radius: 12px; margin-top: 8px; }
.jobtable { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.jobtable th, .jobtable td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
.jobtable th { color: #888; font-weight: 600; font-size: 12.5px; background: #fafafa; }
.jobtable tbody tr { cursor: pointer; }
.jobtable tbody tr:hover { background: #f2f6ff; }
.jobtable td:nth-child(2) { white-space: normal; min-width: 180px; }
/* 底部政策链接 */
.foot-links { text-align: center; font-size: 12px; color: #aaa; margin: 26px 0 10px; }
.foot-links a { color: #aaa; text-decoration: none; margin: 0 8px; }
/* ===== 详情页：底部固定操作条（紧凑，不遮挡内容） ===== */
.sticky-apply {
  position: fixed; left: 0; right: 0; bottom: 72px; z-index: 40;
  max-width: 640px; margin: 0 auto;
  display: flex; gap: 10px; align-items: stretch;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px);
  border-top: 1px solid #eee;
}
.sticky-apply .btn {
  margin-top: 0; padding: 10px 0; font-size: 15px; border-radius: 12px;
  text-align: center; text-decoration: none; line-height: 1.4;
}
.sticky-apply .btn.apply { flex: 1; min-width: 0; }
.sticky-apply .btn.src { flex: none; padding-left: 22px; padding-right: 22px; }
/* 固定操作条不再遮挡正文：详情页底部留出空间 */
body.detail-page .wrap { padding-bottom: 168px; }
/* 微信链接小徽标 */
.wx-badge {
  display: inline-block; font-size: 10px; font-weight: 700; color: #07c160;
  background: #e6f9ef; border-radius: 8px; padding: 1px 6px; margin-left: 6px;
  vertical-align: 2px;
}
/* 微信提示弹窗 */
.wx-sheet { padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
.wx-sheet h3 { font-size: 16px; margin: 0 0 8px; }
.wx-sheet p { font-size: 13.5px; color: #666; line-height: 1.75; margin: 0 0 6px; }
.wx-sheet .btn.block { margin-top: 10px; }
.wx-sheet .rowlink { display: block; text-align: center; margin-top: 12px;
  font-size: 14px; color: #888; background: none; border: none; width: 100%; cursor: pointer; }

/* ===== 首页合并搜索：排序条 / 重置 / 回顶部 ===== */
.sortbar { display: flex; align-items: center; gap: 8px; margin: 12px 2px 4px; flex-wrap: wrap; }
.sortbar[hidden] { display: none; }
.sortbar button { border: 1px solid #d9d9d9; background: #fff; border-radius: 16px;
  padding: 7px 14px; font-size: 13px; color: #666; cursor: pointer; }
.sortbar button.on { background: #1677ff; border-color: #1677ff; color: #fff; font-weight: 600; }
.res-count { margin-left: auto; font-size: 12.5px; color: #999; }
.btn-plain { border: 1px solid #d9d9d9; background: #fff; border-radius: 10px;
  padding: 9px 12px; font-size: 13px; color: #666; cursor: pointer; white-space: nowrap; }
.btn-plain:active { background: #f2f6ff; color: #1677ff; }
#toTop { position: fixed; right: 14px; bottom: 96px; z-index: 50;
  border: none; background: rgba(22,119,255,.92); color: #fff; border-radius: 20px;
  padding: 9px 14px; font-size: 13px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
#toTop[hidden] { display: none; }
@media (min-width: 1100px) { #toTop { bottom: 40px; } }

/* ===== 城市选择器弹窗 ===== */
.city-btn {
  flex: 1 1 0; min-width: 0; padding: 9px 10px; font-size: 13.5px;
  border: 1px solid #d9d9d9; border-radius: 10px; background: #fff; color: #333;
  text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.city-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center; }
.city-modal[hidden] { display: none; }
.city-panel { background: #fff; width: 100%; max-width: 560px; max-height: 84vh;
  border-radius: 16px 16px 0 0; display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 768px) {
  .city-modal { align-items: center; padding: 20px; }
  .city-panel { border-radius: 16px; }
}
.city-head { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid #f0f0f0; }
.city-head input { flex: 1; min-width: 0; padding: 10px 12px; font-size: 14px;
  border: 1px solid #d9d9d9; border-radius: 10px; }
.btn-ghost { border: none; background: none; font-size: 17px; color: #888; padding: 6px 10px; cursor: pointer; }
.city-tabs { display: flex; gap: 8px; padding: 10px 12px 2px; }
.city-tabs button { border: none; background: none; font-size: 14px; color: #666; padding: 8px 4px; cursor: pointer; }
.city-tabs button.on { color: #1677ff; font-weight: 700; border-bottom: 2.5px solid #1677ff; }
.city-body { position: relative; display: flex; overflow-y: auto; padding: 2px 8px 24px 12px; -webkit-overflow-scrolling: touch; }
#city_list { flex: 1; min-width: 0; }
.city-sec { font-size: 12px; color: #999; margin: 14px 0 4px; scroll-margin-top: 4px; }
.city-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.city-chip { padding: 8px 16px; background: #f2f6ff; color: #1677ff; border: none;
  border-radius: 18px; font-size: 13.5px; cursor: pointer; }
.city-chip:active { background: #1677ff; color: #fff; }
.city-row { padding: 11px 4px; border-bottom: 1px solid #f5f5f5; font-size: 14.5px; cursor: pointer; }
.city-row:active { background: #f2f6ff; }
.city-row.on { color: #1677ff; font-weight: 700; }
.city-index { position: sticky; top: 8px; align-self: flex-start; display: none; flex-direction: column;
  font-size: 10.5px; color: #1677ff; padding: 4px 0; }
.city-index span { padding: 2.5px 8px; cursor: pointer; text-align: center; }
.city-index span:active { font-weight: 700; }

/* ===== 职位卡片：公司首字头像 ===== */
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.avatar {
  width: 42px; height: 42px; border-radius: 11px; color: #fff;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.card-title { flex: 1; min-width: 0; }
.card-title h3 { font-size: 15px; margin: 0 0 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title .co { font-size: 12.5px; color: #666;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-head > .badge { margin-left: auto; align-self: flex-start; flex-shrink: 0; }
/* 职位卡片：公司名左、发布日期右 */
.card-title .co-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-title .co-row .co-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title .co-row .pub-date { flex-shrink: 0; color: #999; font-size: 12px; }
/* 批次标签：秋招 / 春招 / 实习 … */
.batch-tag { background: #f0e6ff; color: #7b3ff2; border-radius: 8px; padding: 1px 8px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; }

/* ===== 首页：紧凑吸顶头（居中标题 + 搜索 + 横滑筛选） ===== */
.home-top {
  position: sticky; top: 0; z-index: 55;
  background: linear-gradient(135deg, #1565d8 0%, #4096ff 55%, #7b3ff2 100%);
  color: #fff;
}
.home-top .top {
  position: static; background: none; text-align: center;
  font-size: 17px; font-weight: 700; padding: 12px 16px 0;
}
.searchrow { display: flex; gap: 8px; align-items: center; padding: 10px 12px 6px; }
.home-top .city-btn {
  flex: 0 0 auto; max-width: 118px; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 16px;
  padding: 9px 10px; font-size: 13.5px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.home-top .city-btn.picked { background: #fff; color: #1677ff; font-weight: 700; border-color: #fff; }
.top-search { flex: 1; min-width: 0; display: flex; gap: 8px; margin: 0; }
.top-search input {
  flex: 1; min-width: 0; border: none; border-radius: 16px; padding: 9px 12px; font-size: 14px;
}
.top-search .btn { background: #fff; color: #1677ff; font-weight: 700; border-radius: 16px;
  padding: 9px 18px; font-size: 14px; }
/* 横滑筛选 chips：单行，不占用多行 */
.home-top .filters {
  display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px;
  padding: 4px 12px 12px; margin: 0; scrollbar-width: none;
}
.home-top .filters::-webkit-scrollbar { display: none; }
.home-top .filters select {
  flex: 0 0 auto; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-color: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); color: #fff;
  border-radius: 16px; padding: 7px 26px 7px 13px; font-size: 13px; white-space: nowrap;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ffffff' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.home-top .filters select.picked {
  background-color: #fff; color: #1677ff; font-weight: 700; border-color: #fff;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231677ff' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
.home-top .filters select option { color: #222; }
.chip-plain { flex: 0 0 auto; border: none; background: none; color: rgba(255,255,255,.85);
  font-size: 13px; padding: 7px 6px; white-space: nowrap; cursor: pointer; }
/* 数据一行：保留可信度，只占一行 */
.statline { text-align: center; font-size: 12px; color: #999; margin: 10px 0 0; }
.statline b { color: #1677ff; font-weight: 700; }

/* ===== 自适应：平板 / 桌面 ===== */
/* 平板(768~1099px)：内容放宽，卡片双列，保留底部导航（触屏友好） */
@media (min-width: 768px) {
  .wrap { max-width: 880px; padding: 16px 20px 96px; }
  nav.bottom { max-width: 880px; }
  #list, #soon, #news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
  #list .card, #soon .card, #news .card { margin-bottom: 0; }
  #list .empty, #soon .empty, #news .empty { grid-column: 1 / -1; }
}
/* 桌面(>=1100px)：内容 1140px，卡片三列，底部导航变为顶部导航栏 */
@media (min-width: 1100px) {
  body:has(nav.bottom) { padding-top: 60px; }
  .wrap { max-width: 1140px; padding: 20px 28px 48px; }
  nav.bottom {
    top: 0; bottom: auto; left: 0; right: 0; max-width: none; height: 60px;
    border-top: none; border-bottom: 1px solid #e8e8e8;
    justify-content: center; align-items: stretch;
  }
  nav.bottom a { flex: none; display: flex; align-items: center; gap: 7px;
    padding: 0 28px; font-size: 14px; }
  nav.bottom a .ic { display: inline; font-size: 16px; }
  header.top { top: 0; } /* 桌面端无 60px 顶部导航（nav.bottom 已下线），粘性阈值保持 0 否则会下移盖住面包屑 */
  .home-top { top: 0; } /* 同上：桌面端无 60px 顶部导航 */
  .searchrow { max-width: 760px; margin: 0 auto; }
  .home-top .filters { max-width: 1140px; margin: 0 auto; }
  #list, #soon, #news { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  #list .card, #soon .card, #news .card { transition: box-shadow .15s; }
  #list .card:hover, #soon .card:hover, #news .card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
  .filters { flex-wrap: nowrap; }
  .filters select, .filters input { flex: 1 1 0; min-width: 0; }
  .grid2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .searchbar { max-width: 760px; margin-left: auto; margin-right: auto; }
}

/* ===== 移动端 UI 修复（2026-10-19）：375/390/430px ===== */
@media (max-width: 767px) {
  /* 1. 搜索栏窄屏：城市按钮缩小，输入框保证最小宽度，搜索按钮不被挤压 */
  .home-top .city-btn {
    max-width: 92px; font-size: 12.5px; padding: 9px 8px;
    flex: 0 0 auto;
  }
  .top-search { min-width: 0; }
  .top-search input { min-width: 0; font-size: 14px; }
  .top-search .btn { flex: 0 0 auto; padding: 9px 14px; white-space: nowrap; }
  .searchrow { padding: 10px 10px 6px; gap: 6px; }

  /* 2. 筛选框：约束容器宽度，横滑不溢出屏幕 */
  .home-top { overflow: hidden; max-width: 100%; }
  .home-top .filters {
    max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .home-top .filters select { max-width: 38vw; }

  /* 3. 页脚与 SEO 区留白：真源是 .wrap 的 76px 底内边距（避让固定导航）+ SEO 的 24px 外边距。
     SEO 区在 .wrap 之后，已提供视觉分隔，移动端收紧 .wrap 底边距 */
  .wrap { padding-bottom: 20px; }
  .seo-links { margin-top: 12px !important; margin-bottom: 8px !important; }
  .seo-links h2 { margin-bottom: 6px !important; }

  /* 4. SEO 列表移动端：字号/行距/链接优化（两行截断由后端 PR #5 提供，此处不重复定义） */
  .seo-links { font-size: 14px; }
  .seo-links ul { line-height: 1.9; }
  .seo-job-link {
    color: #333; text-decoration: none; line-height: 1.7;
  }
  .seo-job-link:active { color: #1677ff; }

  /* 5. 禁止横向溢出：关键容器 */
  .wrap, .home-top, .searchrow { max-width: 100%; overflow-x: clip; }
}
