/* ============================================================
   安静家官网 - 前台样式（移动端优先 / App 风格）
   ============================================================ */
:root {
  --brand: #B08A5E;
  --brand-dark: #8F6B45;
  --brand-light: #E7D9C6;
  --accent: #C9A87C;
  --bg: #F6F3EF;
  --card: #FFFFFF;
  --text: #2A2420;
  --muted: #9A9188;
  --line: #EFEAE3;
  --danger: #C0392B;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(43, 34, 26, .06);
}

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

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }

/* 应用容器（居中，桌面端模拟手机） */
.app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

/* ---------- 顶部导航栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--brand-dark);
}
.topbar .brand .logo-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.topbar .hotline {
  display: flex; align-items: center; gap: 4px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 600;
}
.topbar .hotline svg { width: 16px; height: 16px; }

/* ---------- 内容区 ---------- */
.main {
  padding: 16px;
  padding-bottom: 88px;
}

.section { margin-bottom: 24px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.section-head .title {
  font-size: 17px;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.section-head .title::before {
  content: "";
  width: 4px; height: 16px;
  background: var(--brand);
  border-radius: 2px;
}
.section-head .more { color: var(--muted); font-size: 13px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ---------- 轮播 Banner ---------- */
.banner-swiper {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}
.banner-track {
  display: flex;
  transition: transform .5s ease;
}
.banner-slide {
  min-width: 100%;
  height: 170px;
  position: relative;
  display: flex; align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  color: #fff;
  cursor: pointer;
}
.banner-slide .b-title { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.banner-slide .b-sub { font-size: 13px; opacity: .9; margin-top: 6px; }
.banner-slide img.banner-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.banner-slide .banner-mask {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,0));
}
.banner-slide .banner-text { position: relative; z-index: 2; }
.banner-dots {
  position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
}
.banner-dots span { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.5); transition: .3s; }
.banner-dots span.on { width: 16px; background: #fff; }

/* ---------- 快捷入口 ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0 4px;
}
.quick-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--text);
  transition: transform .15s;
}
.quick-item:active { transform: scale(.96); }
.quick-item .qi-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-light);
  color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
}
.quick-item .qi-icon svg { width: 22px; height: 22px; }

/* ---------- 活动卡片（横向滚动） ---------- */
.act-scroll {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 4px; scroll-snap-type: x mandatory;
}
.act-scroll::-webkit-scrollbar { display: none; }
.act-card {
  min-width: 240px; scroll-snap-align: start;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.act-cover {
  height: 120px;
  background: linear-gradient(135deg, var(--brand-light), var(--accent));
  display: flex; align-items: flex-end; padding: 12px;
}
.act-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.act-card .act-body { padding: 12px; }
.act-card .act-title { font-size: 15px; font-weight: 600; }
.act-card .act-time { font-size: 12px; color: var(--muted); margin-top: 4px; }
.act-cover { position: relative; }

/* ---------- 新闻列表 ---------- */
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px;
}
.news-thumb {
  width: 96px; height: 72px; flex: none;
  border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-light), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 28px;
}
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-item .ni-body { flex: 1; min-width: 0; }
.news-item .ni-title {
  font-size: 15px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-item .ni-date { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 关于我们 ---------- */
.about { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.about .about-brand { font-size: 20px; font-weight: 700; color: var(--brand-dark); letter-spacing: 2px; }
.about .about-desc { color: #6b6159; font-size: 14px; margin-top: 8px; }
.stat-row { display: flex; margin-top: 16px; }
.stat-row .stat { flex: 1; text-align: center; }
.stat-row .stat .num { font-size: 22px; font-weight: 700; color: var(--brand-dark); }
.stat-row .stat .label { font-size: 12px; color: var(--muted); }

/* ---------- 门店 ---------- */
.store-list { display: flex; flex-direction: column; gap: 14px; }
.store-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.store-card .sc-name { font-size: 16px; font-weight: 700; }
.store-card .sc-row { display: flex; gap: 8px; margin-top: 10px; color: #5c534a; font-size: 14px; }
.store-card .sc-row svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--brand); }
.store-card .sc-actions { display: flex; gap: 10px; margin-top: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  font-size: 14px; border: 1px solid var(--line); background: #fff; color: var(--text);
  cursor: pointer; transition: .15s; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:active { background: var(--brand-dark); }
.btn-outline { color: var(--brand-dark); border-color: var(--brand-light); }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }

/* ---------- 招聘 ---------- */
.filter-row { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.filter-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 14px; border-radius: 17px;
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid var(--line); color: #5c534a; font-size: 13px;
  cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.job-list { display: flex; flex-direction: column; gap: 12px; }
.job-card { display: block; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.job-card .jc-top { display: flex; justify-content: space-between; align-items: baseline; }
.job-card .jc-title { font-size: 16px; font-weight: 700; }
.job-card .jc-salary { color: var(--brand-dark); font-weight: 700; font-size: 16px; white-space: nowrap; }
.job-card .jc-meta { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.tag {
  padding: 2px 8px; border-radius: 4px; font-size: 12px;
  background: #F3EEE7; color: #8a7a68;
}
.tag.tag-primary { background: var(--brand-light); color: var(--brand-dark); }
.job-card .jc-tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.job-card .jc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); font-size: 12px; }

.job-empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- 详情页 ---------- */
.detail-hero {
  background: linear-gradient(135deg, var(--accent), var(--brand));
  color: #fff; padding: 24px 16px; border-radius: var(--radius);
}
.detail-hero h1 { font-size: 20px; }
.detail-hero .dh-salary { font-size: 22px; font-weight: 700; margin-top: 10px; }
.detail-hero .dh-meta { margin-top: 12px; display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; opacity: .95; }

.detail-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-top: 14px; }
.detail-card h2 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.detail-card h2::before { content: ""; width: 4px; height: 14px; background: var(--brand); border-radius: 2px; }
.rich-content { font-size: 14px; color: #4a423b; line-height: 1.8; word-break: break-word; }
.rich-content img { border-radius: 8px; margin: 8px 0; }

.action-bar {
  position: sticky; bottom: 70px; z-index: 50;
  display: flex; gap: 10px; padding: 10px 16px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.action-bar .btn { flex: 1; }

/* ---------- 表单 ---------- */
.form-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; color: #5c534a; margin-bottom: 6px; }
.form-group label .req { color: var(--danger); margin-left: 2px; }
.field {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; background: #FBF9F6; color: var(--text);
  outline: none; transition: border .15s;
}
.field:focus { border-color: var(--brand); background: #fff; }
textarea.field { height: auto; padding: 10px 12px; resize: vertical; }
select.field { appearance: none; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio {
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 6px; background: #fff; cursor: pointer; font-size: 14px;
}
.radio input { display: none; }
.radio.on { border-color: var(--brand); color: var(--brand-dark); background: #FBF5EC; }

.file-upload { position: relative; }
.file-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- 提示 Toast ---------- */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 14px 22px; border-radius: 12px;
  font-size: 14px; z-index: 999; max-width: 80%; text-align: center;
  display: none;
}

/* ---------- 分享遮罩 / 海报 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.overlay.show { display: flex; }
.share-sheet {
  background: #fff; border-radius: 20px; padding: 24px; width: 100%; max-width: 360px;
  text-align: center;
}
.share-sheet h3 { font-size: 17px; margin-bottom: 20px; }
.share-actions { display: flex; gap: 20px; justify-content: center; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.share-btn .sb-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-light); color: var(--brand-dark);
}
.share-btn .sb-icon svg { width: 24px; height: 24px; }
.share-btn span { font-size: 12px; color: #5c534a; }
.share-sheet .close {
  margin-top: 20px; width: 100%; height: 44px; border: none; background: #F3EEE7;
  border-radius: 10px; color: #6b6159; font-size: 14px; cursor: pointer;
}
.poster-wrap { text-align: center; }
#poster { border-radius: 12px; box-shadow: var(--shadow); max-width: 100%; }
.poster-tip { font-size: 12px; color: var(--muted); margin: 10px 0; }

/* ---------- 底部标签栏 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  max-width: 640px; margin: 0 auto;
  height: 60px;
  display: flex;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: #A79D92; font-size: 11px;
}
.tabbar .tab svg { width: 22px; height: 22px; }
.tabbar .tab.on { color: var(--brand-dark); font-weight: 600; }

/* ---------- 页脚 ---------- */
.footer { text-align: center; padding: 20px 16px 90px; color: var(--muted); font-size: 12px; }
.footer .fm-divider { margin: 8px 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 80px 20px; }
.notfound .nf-code { font-size: 64px; font-weight: 700; color: var(--brand-light); }
.notfound .nf-text { color: var(--muted); margin: 10px 0 24px; }

/* 骨架与工具 */
.flex { display: flex; }
.flex-1 { flex: 1; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.text-muted { color: var(--muted); }