:root {
  --theme: #fd7753;
  --theme-dark: #e85f3a;
  --theme-soft: #fff1ec;
  --text: #1a2233;
  --muted: #6b7385;
  --line: rgba(20, 28, 45, 0.08);
  --bg: #f4f6f9;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 28px rgba(20, 28, 45, 0.05);
  --font: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
body.has-tabbar {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}
a { color: var(--theme); text-decoration: none; }
a:hover { color: var(--theme-dark); }
img { max-width: 100%; display: block; }
.container { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.muted { color: var(--muted); }
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--card); border-radius: var(--radius); }

/* 底部导航栏：首页 / 找工作 / 我的 */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-top: 1px solid #ececec;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #b0b0b0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.tabbar-item:hover { color: #999; }
.tabbar-item.active {
  color: var(--theme);
}
.tabbar-item.active .tabbar-icon {
  filter: drop-shadow(0 2px 6px rgba(253, 119, 83, 0.45));
}
.tabbar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  line-height: 0;
}
.tabbar-icon svg { display: block; }
.tabbar-text {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 500;
}

.flash-wrap { padding-top: 12px; }
.flash {
  padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; background: #fff;
  border: 1px solid var(--line);
}
.flash-success { border-color: #b7eb8f; background: #f6ffed; }
.flash-danger { border-color: #ffa39e; background: #fff2f0; }
.flash-warning { border-color: #ffe58f; background: #fffbe6; }

.hero {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.35), transparent 40%),
    linear-gradient(135deg, #fd7753 0%, #ff9a76 55%, #ffc299 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.hero-brand { margin: 0; font-size: clamp(36px, 6vw, 56px); font-weight: 800; }
.hero-sub { margin: 8px 0 24px; opacity: .95; font-size: 18px; }
.search-box {
  display: flex; gap: 0; max-width: 640px;
  background: #fff; border-radius: 999px; overflow: hidden;
  box-shadow: var(--shadow);
}
.search-box input {
  flex: 1; border: 0; padding: 14px 20px; font-size: 16px; outline: none; color: var(--text);
}
.search-box button {
  border: 0; background: var(--theme-dark); color: #fff;
  padding: 0 28px; font-size: 16px; cursor: pointer;
}

.section { padding: 28px 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px;
}
.section-head h2, .page-title { margin: 0 0 16px; font-size: 22px; }
.page-title { margin-top: 8px; }

.job-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.job-card {
  display: block; background: var(--card); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
.job-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(253, 119, 83, .15);
  color: inherit;
}
.job-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.job-card-top h2, .job-card-top h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.salary { color: var(--theme); font-weight: 700; white-space: nowrap; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.job-meta span {
  background: var(--theme-soft); color: #c65335;
  padding: 2px 8px; border-radius: 6px; font-size: 12px;
}
.job-company {
  display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px;
}
.job-company img { border-radius: 6px; object-fit: cover; }

.company-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.company-card {
  display: flex; gap: 12px; align-items: center;
  background: var(--card); padding: 14px; border-radius: var(--radius);
  box-shadow: var(--shadow); color: inherit;
}
.company-card img { border-radius: 8px; object-fit: cover; }
.company-card strong { display: block; }
.company-card span { font-size: 13px; }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.filter-bar input, .filter-bar select, .form input, .form select, .form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: inherit; background: #fff;
}
.filter-bar input, .filter-bar select { width: auto; min-width: 160px; }
.filter-bar button, .btn-primary, .btn-code {
  border: 0; background: var(--theme); color: #fff;
  border-radius: 10px; padding: 10px 18px; cursor: pointer; font: inherit;
}
.btn-primary:hover, .btn-code:hover, .filter-bar button:hover { background: var(--theme-dark); }
.result-count { color: var(--muted); margin: 0 0 12px; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; padding: 20px 0; }
.load-more {
  text-align: center;
  padding: 18px 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.load-more.finished { color: #c0c4cc; }
.load-more[hidden] { display: none; }

.narrow { max-width: 640px; }
.form { display: grid; gap: 14px; background: var(--card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form label { display: grid; gap: 6px; font-size: 14px; color: #4e5969; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.code-row span { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.btn-code { white-space: nowrap; background: #ff8c61; }
.btn-code:disabled { opacity: .6; cursor: not-allowed; }
.form-foot { text-align: center; margin-top: 16px; }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab {
  flex: 1; border: 1px solid var(--line); background: #fff; padding: 10px;
  border-radius: 10px; cursor: pointer; font: inherit;
}
.tab.active { background: var(--theme-soft); border-color: var(--theme); color: var(--theme-dark); }
.tab-panel { display: none; }
.tab-panel.active { display: grid; }

.detail-head { background: var(--card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.detail-head h1 { margin: 0 0 8px; font-size: 24px; }
.detail-block {
  margin-top: 16px; background: var(--card); padding: 20px;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.detail-block h2 { margin: 0 0 12px; font-size: 18px; }
.rich-text { white-space: normal; word-break: break-word; line-height: 1.8; }
.desc-kv {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.desc-kv li {
  display: grid;
  grid-template-columns: minmax(110px, 34%) 1fr;
  gap: 8px 12px;
  align-items: start;
  padding: 10px 12px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.desc-k {
  color: #4e5969;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.desc-v {
  color: var(--text);
  word-break: break-word;
}
.desc-body {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  line-height: 1.8;
}
@media (max-width: 560px) {
  .desc-kv li { grid-template-columns: 1fr; }
}
.copyable {
  color: var(--theme);
  cursor: pointer;
  border-bottom: 1px dashed var(--theme);
  user-select: all;
}
.copyable:hover { color: var(--theme-dark); }
.copy-tip { margin-left: 8px; font-size: 12px; }
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: rgba(31, 35, 41, 0.88);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 200;
  pointer-events: none;
}
.company-link, .company-head { display: flex; gap: 12px; align-items: center; color: inherit; }
.company-logo { border-radius: 10px; object-fit: cover; }
.user-card {
  background: var(--card); padding: 20px; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 20px;
}

.site-footer {
  margin-top: 40px; padding: 28px 0; text-align: center;
  color: var(--muted); border-top: 1px solid var(--line); background: #fff;
}

@media (max-width: 768px) {
  .company-grid, .form-row { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 44px; }
}
