:root {
  --bg: #ffffff;
  --bg-subtle: #f7f7f9;
  --card: #ffffff;
  --fill: #f2f2f5;
  --fill-2: #eaecef;

  --text: #000000;
  --text-2: #8a8a8e;
  --text-3: #b8b8bd;

  --tint: #007aff;
  --tint-press: #0062cc;
  --tint-soft: rgba(0, 122, 255, 0.08);

  --separator: rgba(60, 60, 67, 0.1);
  --separator-strong: rgba(60, 60, 67, 0.16);

  --orange: #ff9500;
  --green: #34c759;
  --indigo: #5856d6;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.045);
  --shadow-float: 0 12px 40px rgba(0, 0, 0, 0.14);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

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

html, body { background: var(--bg); }

body {
  font-family: var(--font);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
a { text-decoration: none; color: inherit; }

.app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ══════════ 顶部栏 ══════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator);
  padding: 0 20px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
}

.brand { display: flex; align-items: center; gap: 11px; }

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 8px rgba(10, 95, 224, 0.28));
}
.brand-mark svg { width: 100%; height: 100%; display: block; }

.brand-text h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.brand-text p {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 1px;
  letter-spacing: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tint);
  background: var(--tint-soft);
  transition: background 0.2s ease, transform 0.2s ease;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:active { background: rgba(0, 122, 255, 0.16); }
.icon-btn.spinning svg { animation: spin 0.75s cubic-bezier(0.5, 0, 0.5, 1) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  font-size: 13px;
}
.meta-date { font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.meta-updated { color: var(--text-2); }
.count-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--tint);
  background: var(--tint-soft);
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0;
}

/* ══════════ 分段筛选 ══════════ */
.segments {
  display: flex;
  gap: 8px;
  padding: 4px 20px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.segments::-webkit-scrollbar { display: none; }

.segment {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 100px;
  background: var(--fill);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 0.22s ease, color 0.22s ease, transform 0.12s ease;
}
.segment svg { width: 15px; height: 15px; opacity: 0.85; }
.segment:active { transform: scale(0.96); }
.segment.active {
  background: var(--text);
  color: #fff;
  font-weight: 600;
}
.segment.active svg { opacity: 1; }

/* ══════════ 列表 ══════════ */
.content {
  flex: 1;
  padding: 0 20px;
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 28px;
}

.job-card {
  position: relative;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  border: 0.5px solid var(--separator);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
  animation: cardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.job-card:active {
  transform: scale(0.978);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.06);
}

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

.logo-box {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--fill);
  border: 0.5px solid var(--separator);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-2);
}
.logo-box img { width: 100%; height: 100%; object-fit: cover; }

.head-body { flex: 1; min-width: 0; }

.title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.job-name {
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: 6px;
  letter-spacing: 0;
  white-space: nowrap;
}
.tag.gq { color: #b25000; background: rgba(255, 149, 0, 0.12); }
.tag.wq { color: #1a7f4b; background: rgba(52, 199, 89, 0.13); }
.tag.qm { color: #4b48c4; background: rgba(88, 86, 214, 0.12); }

.company-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  min-width: 0;
}
.company-name {
  font-size: 13px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nature {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-3);
  border: 0.5px solid var(--separator-strong);
  padding: 1px 6px;
  border-radius: 5px;
  letter-spacing: 0;
}

.salary {
  font-size: 17px;
  font-weight: 700;
  color: var(--tint);
  letter-spacing: -0.03em;
  margin-top: 7px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg-subtle);
  padding: 4px 9px;
  border-radius: 7px;
  letter-spacing: -0.01em;
}
.chip svg { width: 12px; height: 12px; opacity: 0.6; }

.card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 0.5px solid var(--separator);
}
.foot-desc {
  flex: 1;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.foot-more {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tint);
}
.foot-more svg { width: 13px; height: 13px; }

/* ══════════ 空状态 / 骨架屏 ══════════ */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 20px 80px;
  text-align: center;
}
.empty-art {
  width: 150px;
  height: 150px;
  margin-bottom: 18px;
}
.empty-art svg { width: 100%; height: 100%; display: block; }
.empty-title { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.empty-sub { font-size: 13.5px; color: var(--text-2); margin-top: 5px; }

.loading { padding-bottom: 30px; }
.skeleton-wrap { display: flex; flex-direction: column; gap: 12px; }
.skeleton-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 16px;
  border: 0.5px solid var(--separator);
  box-shadow: var(--shadow-card);
}
.sk-row { display: flex; gap: 12px; }
.sk-avatar {
  width: 48px; height: 48px; border-radius: var(--r-md);
  background: var(--fill);
  flex-shrink: 0;
  animation: pulse 1.6s ease-in-out infinite;
}
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.sk-line { height: 11px; border-radius: 6px; background: var(--fill); animation: pulse 1.6s ease-in-out infinite; }
.sk-line.w70 { width: 70%; }
.sk-line.w60 { width: 60%; }
.sk-line.w55 { width: 55%; }
.sk-line.w50 { width: 50%; }
.sk-line.w40 { width: 40%; }
.sk-line.w35 { width: 35%; }
.sk-chips { display: flex; gap: 6px; margin-top: 14px; }
.sk-chip { height: 22px; width: 62px; border-radius: 7px; background: var(--fill); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.hidden { display: none !important; }

/* ══════════ 弹窗 ══════════ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }

.modal {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  z-index: 300;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(101%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.modal.show { transform: translateY(0); }

.modal-grabber {
  display: flex;
  justify-content: center;
  padding: 9px 0 3px;
  flex-shrink: 0;
}
.modal-grabber span {
  width: 36px; height: 5px; border-radius: 3px;
  background: var(--separator-strong);
}

.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 20px calc(28px + env(safe-area-inset-bottom));
}

.m-head { display: flex; gap: 14px; margin-bottom: 18px; }
.m-logo {
  width: 60px; height: 60px; border-radius: 14px;
  overflow: hidden; flex-shrink: 0;
  background: var(--fill);
  border: 0.5px solid var(--separator);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; color: var(--text-2);
}
.m-logo img { width: 100%; height: 100%; object-fit: cover; }

.m-info { flex: 1; min-width: 0; }
.m-title-row { display: flex; align-items: baseline; gap: 8px; }
.m-title {
  font-size: 19px; font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.25; flex: 1; min-width: 0;
}
.m-company { font-size: 13.5px; color: var(--text-2); margin-top: 4px; }
.m-salary { font-size: 21px; font-weight: 700; color: var(--tint); letter-spacing: -0.03em; margin-top: 7px; }

.m-actions { display: flex; gap: 10px; margin-bottom: 4px; }
.ghost-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px;
  border-radius: var(--r-md);
  background: var(--fill);
  color: var(--text);
  font-size: 14px; font-weight: 550;
  letter-spacing: -0.01em;
  transition: background 0.2s;
}
.ghost-btn svg { width: 15px; height: 15px; color: var(--text-2); }
.ghost-btn:active { background: var(--fill-2); }

.m-section {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 650;
  letter-spacing: -0.02em;
  margin: 22px 0 11px;
  color: var(--text);
}
.m-section::before {
  content: '';
  width: 3px; height: 14px; border-radius: 2px;
  background: var(--tint);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cell {
  background: var(--bg-subtle);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.cell .k {
  font-size: 11px; color: var(--text-3);
  letter-spacing: 0.01em; margin-bottom: 3px;
}
.cell .v {
  font-size: 13.5px; font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.35;
  word-break: break-word;
}
.cell.full { grid-column: 1 / -1; }

.desc {
  font-size: 13.5px;
  line-height: 1.72;
  color: #3a3a3c;
  white-space: pre-wrap;
  word-break: break-word;
  letter-spacing: -0.005em;
}
.desc-empty { font-size: 13.5px; color: var(--text-3); }

.apply-btn {
  width: 100%;
  margin-top: 24px;
  padding: 15px;
  border-radius: 14px;
  background: var(--tint);
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 22px rgba(0, 122, 255, 0.32);
  transition: transform 0.14s ease, background 0.2s;
}
.apply-btn svg { width: 17px; height: 17px; }
.apply-btn:active { transform: scale(0.98); background: var(--tint-press); }

/* ══════════ 页脚 ══════════ */
.footer {
  padding: 20px 20px 40px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-3);
  letter-spacing: 0;
}

@media (min-width: 660px) {
  .modal {
    border-radius: 20px;
    bottom: 24px;
    max-height: 86vh;
  }
}

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