/* ============================================================
   司机配送踏勘 · 雅诗兰黛风格（黑金奢华）
   ============================================================ */
/* ============================================================
   主题变量：默认「雅诗兰黛黑金」，另提供「象牙白」「午夜蓝」。
   切换方式：document.documentElement.dataset.theme = 'ivory' | 'midnight' | 'gold'
   浅色主题下金色需加深以保证对比度；金色徽标上的深色字(#1a1408)保持不变。
   ============================================================ */
:root,
html[data-theme="gold"] {
  --bg: #0a0a0b;
  --bg-grad: radial-gradient(120% 80% at 50% -10%, #16161a 0%, #0a0a0b 55%, #070708 100%);
  --surface: #141416;
  --surface-2: #1b1b1f;
  --surface-3: #222227;
  --band: #131316;
  --gold: #c9a35b;
  --gold-bright: #e8c987;
  --gold-deep: #9c7c3e;
  --gold-soft: rgba(201, 163, 91, .12);
  --gold-line: rgba(201, 163, 91, .22);
  --text: #f4f1ea;
  --text-2: #9a958c;
  --text-3: #6c685f;
  --danger: #e06464;
  --hairline: rgba(255, 255, 255, .06);
  --radius: 18px;
  --tab-h: 64px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Georgia", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* 象牙白：浅底深字，办公与打印场景更友好 */
html[data-theme="ivory"] {
  --bg: #f6f4ef;
  --bg-grad: linear-gradient(180deg, #fcfbf8 0%, #f1eee6 100%);
  --surface: #ffffff;
  --surface-2: #fcfbf7;
  --surface-3: #f1eee6;
  --band: #faf8f4;
  --gold: #96701d;
  --gold-bright: #7a5913;
  --gold-deep: #66490d;
  --gold-soft: rgba(150, 112, 29, .10);
  --gold-line: rgba(150, 112, 29, .28);
  --text: #1a1a1c;
  --text-2: #57575c;
  --text-3: #8a857c;
  --danger: #c0392b;
  --hairline: rgba(0, 0, 0, .09);
  --shadow: 0 6px 20px rgba(70, 58, 24, .10);
}

/* 午夜蓝：深蓝底 + 品牌金点缀 */
html[data-theme="midnight"] {
  --bg: #0a1020;
  --bg-grad: radial-gradient(120% 80% at 50% -10%, #16233c 0%, #0a1020 55%, #070c16 100%);
  --surface: #121b2c;
  --surface-2: #182338;
  --surface-3: #1f2c44;
  --band: #16203a;
  --gold: #d9b877;
  --gold-bright: #f0d9a0;
  --gold-deep: #a8843c;
  --gold-soft: rgba(217, 184, 119, .14);
  --gold-line: rgba(217, 184, 119, .26);
  --text: #eef2f8;
  --text-2: #9aa8bd;
  --text-3: #6d7c93;
  --danger: #e06464;
  --hairline: rgba(255, 255, 255, .07);
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
}

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

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 滚动条（Webkit） */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--gold-soft); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-grad);
  position: relative;
  overflow-x: hidden;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
}

/* ===================== 启动屏 ===================== */
.splash {
  position: fixed; inset: 0; z-index: 999;
  background: radial-gradient(120% 90% at 50% 30%, #15140f 0%, #0a0a0b 70%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s ease, visibility .8s ease;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash-inner { text-align: center; animation: splashIn 1.6s var(--ease) both; }
.splash-mark {
  width: 64px; height: 64px; margin: 0 auto 22px;
  border: 1.5px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 26px; font-weight: 700;
  color: var(--gold-bright); letter-spacing: 1px;
  box-shadow: 0 0 24px rgba(201, 163, 91, .35), inset 0 0 14px rgba(201, 163, 91, .18);
  animation: markPulse 2.4s ease-in-out infinite;
}
.splash-title {
  font-family: var(--serif); font-size: 38px; font-weight: 700;
  color: var(--gold-bright); letter-spacing: 6px; margin-left: 6px;
  text-shadow: 0 2px 18px rgba(201, 163, 91, .35);
}
.splash-sub {
  margin-top: 12px; font-size: 12.5px; letter-spacing: 4px;
  color: var(--text-2); text-transform: uppercase;
}
.splash-line {
  width: 0; height: 1px; margin: 22px auto 18px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: lineGrow 1.8s var(--ease) .3s both;
}
.splash-loading { display: flex; gap: 7px; justify-content: center; }
.splash-loading span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
  animation: dotPulse 1.2s ease-in-out infinite;
}
.splash-loading span:nth-child(2) { animation-delay: .2s; }
.splash-loading span:nth-child(3) { animation-delay: .4s; }

@keyframes splashIn {
  0% { opacity: 0; transform: scale(.96) translateY(8px); }
  100% { opacity: 1; transform: none; }
}
@keyframes markPulse {
  0%, 100% { box-shadow: 0 0 22px rgba(201, 163, 91, .3), inset 0 0 12px rgba(201, 163, 91, .15); }
  50% { box-shadow: 0 0 34px rgba(201, 163, 91, .55), inset 0 0 18px rgba(201, 163, 91, .28); }
}
@keyframes lineGrow { from { width: 0; opacity: 0; } to { width: 180px; opacity: 1; } }
@keyframes dotPulse {
  0%, 100% { opacity: .25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

/* ===================== 顶部栏 ===================== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 11, .72);
  backdrop-filter: saturate(160%) blur(22px);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  border-bottom: 1px solid var(--gold-line);
  padding: 12px 18px calc(12px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; justify-content: space-between;
  transition: padding .35s var(--ease), background .35s ease;
}
.topbar.scrolled { padding-top: 8px; padding-bottom: 8px; background: rgba(10, 10, 11, .9); }
.brand-head { line-height: 1.15; }
.brand-title {
  font-family: var(--serif); font-size: 20px; font-weight: 700;
  color: var(--gold-bright); letter-spacing: 3px;
}
.brand-sub { font-size: 10.5px; letter-spacing: 3px; color: var(--text-3); text-transform: uppercase; }
.topbar .driver {
  font-size: 12px; color: var(--text-2);
  border: 1px solid var(--gold-line); border-radius: 999px;
  padding: 6px 12px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); transition: border-color .3s, box-shadow .3s;
}
.topbar .driver:hover { border-color: var(--gold); box-shadow: 0 0 14px rgba(201, 163, 91, .25); }
.topbar .driver b { color: var(--gold-bright); font-weight: 600; }
.topbar .driver .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); animation: dotPulse 2s ease-in-out infinite; }
.topbar .driver .logout {
  color: var(--text-2); font-size: 11.5px; margin-left: 4px; padding-left: 9px;
  border-left: 1px solid var(--gold-line); text-decoration: none; transition: color .2s;
}
.topbar .driver .logout:hover { color: var(--gold-bright); }

/* ===================== 视图切换 ===================== */
.view { display: none; padding: 16px; }
.view.active { display: block; animation: viewIn .5s var(--ease) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* ===================== Hero 品牌封面看板 ===================== */
.hero {
  position: relative; overflow: hidden;
  margin: 0 -16px 18px; padding: 18px 18px 16px;
  background: linear-gradient(160deg, #1e1a13 0%, #141416 58%, #0f0f11 100%);
  border-bottom: 1px solid var(--gold-line);
  animation: heroIn .8s var(--ease) both;
}
.hero::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 163, 91, .55), transparent);
}
.hero-glow {
  position: absolute; top: -80px; right: -60px; width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(201, 163, 91, .26) 0%, rgba(201, 163, 91, 0) 68%);
  animation: glowBreathe 5.5s ease-in-out infinite; pointer-events: none;
}
@keyframes glowBreathe {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}
.hero-top { display: flex; align-items: center; justify-content: space-between; position: relative; }
.hero-brand { font-size: 11.5px; letter-spacing: 2.4px; color: var(--gold); text-transform: uppercase; }
.hero-date { font-size: 11.5px; color: var(--text-3); letter-spacing: .5px; }
.hero-title {
  position: relative; margin-top: 14px;
  font-family: var(--serif); font-size: 27px; font-weight: 700;
  color: var(--gold-bright); letter-spacing: 3px; line-height: 1.2;
  text-shadow: 0 2px 16px rgba(201, 163, 91, .28);
}
.hero-sub {
  position: relative; margin-top: 6px;
  font-size: 10.5px; letter-spacing: 3px; color: var(--text-3); text-transform: uppercase;
}
.hero-stats {
  position: relative; margin-top: 18px;
  display: flex; align-items: stretch;
  background: var(--band);
  border: 1px solid var(--gold-line); border-radius: 14px;
  overflow: hidden;
}
.hstat { flex: 1; text-align: center; padding: 12px 4px; position: relative; }
.hstat + .hstat::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px;
  background: var(--gold-line);
}
.hnum {
  font-family: var(--serif); font-size: 24px; font-weight: 700;
  color: var(--text); line-height: 1.1; letter-spacing: .5px;
  animation: numIn .7s var(--ease) both;
}
.hnum.gold { color: var(--gold-bright); text-shadow: 0 0 18px rgba(201, 163, 91, .35); }
.hlab { margin-top: 5px; font-size: 11px; color: var(--text-3); letter-spacing: 1px; }
@keyframes numIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero-progress {
  position: relative; margin-top: 12px; height: 4px; border-radius: 4px;
  background: var(--hairline); overflow: hidden;
}
.hero-progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  border-radius: 4px; box-shadow: 0 0 12px rgba(201, 163, 91, .5);
  transition: width .9s var(--ease);
}
@keyframes heroIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.hero-sub2 {
  margin-top: 10px; font-size: 12px; color: var(--text-3); line-height: 1.6;
  letter-spacing: .01em;
}
.hero-sub2 b { color: var(--gold); font-weight: 700; }

/* ===================== 搜索 / 筛选 ===================== */
.search-wrap { position: relative; }
.search-ico {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  pointer-events: none; transition: stroke .3s;
}
.search-wrap:focus-within .search-ico { stroke: var(--gold); }
.search {
  width: 100%; border: 1px solid var(--gold-line);
  background: var(--surface); color: var(--text);
  border-radius: 14px; padding: 12px 16px 12px 43px; font-size: 15px;
  outline: none; transition: border-color .3s, box-shadow .3s;
}
.search:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.search::placeholder { color: var(--text-3); }
.chips {
  display: flex; gap: 9px; overflow-x: auto; padding: 14px 0 6px;
  margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 8px 15px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--gold-line);
  font-size: 13px; color: var(--text-2); white-space: nowrap;
  transition: all .3s var(--ease); cursor: pointer;
}
.chip:active { transform: scale(.94); }
.chip.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #1a1408; border-color: transparent; font-weight: 600;
  box-shadow: 0 4px 14px rgba(201, 163, 91, .4);
}

/* ===================== 分组标题 ===================== */
.section-title {
  font-family: var(--serif); font-size: 14px; color: var(--gold-bright);
  margin: 22px 2px 12px; font-weight: 600; letter-spacing: 1px;
  display: flex; align-items: center; gap: 10px;
  animation: fadeUp .5s var(--ease) both;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--gold-line); }
.section-title::before { content: ""; width: 4px; height: 14px; background: var(--gold); border-radius: 2px; }

/* ===================== 门店卡片 ===================== */
.store {
  position: relative;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 14px; margin-bottom: 13px;
  box-shadow: var(--shadow); cursor: pointer;
  overflow: hidden;
  display: flex; gap: 13px; align-items: flex-start;
  opacity: 0; transform: translateY(18px);
  animation: cardIn .55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
  transition: border-color .3s, box-shadow .3s, transform .25s var(--ease);
}
.store::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--gold), var(--gold-deep)); opacity: 0; transition: opacity .3s;
}
.store:active { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 0 1px var(--gold-soft); }
.store:active::before { opacity: 1; }

.store-badge {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1a1408; font-size: 14px; font-weight: 800; letter-spacing: .5px;
  box-shadow: 0 4px 14px rgba(201, 163, 91, .32);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.store:active .store-badge { transform: scale(1.06) rotate(-3deg); box-shadow: 0 6px 18px rgba(201, 163, 91, .45); }
.store-main { flex: 1; min-width: 0; }
.store-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.store .name {
  font-size: 15.5px; font-weight: 700; color: var(--text);
  line-height: 1.35; flex: 1; min-width: 0; word-break: break-word;
}
.status {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
  margin-top: 2px;
}
.status.done {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1a1408; box-shadow: 0 2px 10px rgba(201, 163, 91, .35);
}
.status.todo { background: transparent; color: var(--text-3); border: 1px solid rgba(255, 255, 255, .12); }
.store .dept, .store-card .dept {
  font-size: 11px; font-weight: 700; color: #1a1408;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  padding: 3px 8px; border-radius: 7px; letter-spacing: .5px;
  box-shadow: 0 2px 8px rgba(201, 163, 91, .35);
}
.store .brand { font-size: 12px; color: var(--gold); margin-top: 5px; letter-spacing: .4px; }
.store .addr { font-size: 12.8px; color: var(--text-2); margin-top: 5px; line-height: 1.5; }
.store .meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.store .tag {
  font-size: 11.5px; color: var(--text-2); background: var(--surface-3);
  padding: 4px 9px; border-radius: 8px; border: 1px solid var(--hairline);
}
.store .tag.prov {
  color: var(--gold-bright); background: var(--gold-soft);
  border-color: var(--gold-line); font-weight: 600;
}
.store .win { color: #e8b870; background: rgba(232, 184, 112, .12); border-color: rgba(232, 184, 112, .25); }
.store-foot {
  margin-top: 10px; padding-top: 9px;
  border-top: 1px dashed rgba(201, 163, 91, .18);
  font-size: 11.5px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.foot-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 8px var(--gold); flex: 0 0 auto;
}

@keyframes cardIn { to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===================== 踩点页 ===================== */
.empty-hint {
  text-align: center; color: var(--text-2);
  padding: 70px 28px; font-size: 14px; letter-spacing: .3px;
  animation: fadeUp .5s var(--ease) both;
}
.empty-hint::before {
  content: "❖"; display: block; font-size: 30px; color: var(--gold);
  margin-bottom: 14px; opacity: .7;
}
.store-card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--gold-line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px;
  animation: cardIn .5s var(--ease) both;
}
.store-card .name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 9px; color: var(--text); }
.store-card .addr { color: var(--text-2); font-size: 13px; margin-top: 7px; line-height: 1.5; }
.store-card .win { margin-top: 9px; font-size: 12.5px; color: #e8b870; background: rgba(232, 184, 112, .12); border: 1px solid rgba(232, 184, 112, .25); display: inline-block; padding: 5px 10px; border-radius: 8px; }
.store-card .brand { font-size: 12.5px; color: var(--gold); margin-top: 7px; }

.camera-btn {
  position: relative; overflow: hidden;
  width: 100%; border: none; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1a1408; font-size: 16px; font-weight: 700; letter-spacing: 1px;
  padding: 17px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(201, 163, 91, .38);
  transition: transform .15s var(--ease), box-shadow .3s;
}
.camera-btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg); animation: shimmer 2.6s ease-in-out infinite;
}
.camera-btn:active { transform: scale(.97); box-shadow: 0 4px 14px rgba(201, 163, 91, .3); }
.camera-btn.secondary { background: var(--surface-2); color: var(--gold-bright); border: 1px solid var(--gold-line); box-shadow: none; }
.camera-btn.secondary::after { display: none; }
@keyframes shimmer { 0% { left: -120%; } 55%, 100% { left: 140%; } }

.preview-wrap { margin-top: 15px; animation: imgReveal .6s var(--ease) both; }
.preview-wrap img { width: 100%; border-radius: var(--radius); display: block; box-shadow: var(--shadow); background: #000; }
@keyframes imgReveal { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.wm-info {
  background: var(--surface); border: 1px solid var(--gold-line);
  border-radius: var(--radius); padding: 13px 15px; margin-top: 13px;
  font-size: 13px; color: var(--text-2);
}
.wm-info .row { display: flex; justify-content: space-between; padding: 4px 0; gap: 12px; }
.wm-info .row span { color: var(--text-3); flex: 0 0 auto; }
.wm-info .row b { color: var(--text); font-weight: 600; text-align: right; }

/* 定位获取中：金色脉冲点 + 文案 */
.geo-wait { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 600; }
.geo-wait i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  display: inline-block; animation: geoPulse 1.1s var(--ease) infinite;
}
@keyframes geoPulse {
  0%   { opacity: .35; transform: scale(.7); }
  50%  { opacity: 1;   transform: scale(1.25); box-shadow: 0 0 10px rgba(201,163,91,.75); }
  100% { opacity: .35; transform: scale(.7); }
}
.note-input {
  width: 100%; border: 1px solid var(--gold-line); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; margin-top: 13px; outline: none;
  background: var(--surface); color: var(--text); resize: none; font-family: inherit;
  transition: border-color .3s, box-shadow .3s;
}
.note-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.geo-actions { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 9px; }
.geo-actions .coord {
  flex: 1 1 46%; min-width: 0; border: 1px solid var(--gold-line); border-radius: 10px;
  padding: 11px 12px; font-size: 14px; outline: none; font-family: inherit;
  background: var(--surface); color: var(--text);
}
.geo-actions .coord:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }

/* 定位失败原因提示条 + 一键复制诊断 */
.geo-err {
  margin-top: 11px; padding: 10px 12px; border-radius: 10px;
  background: rgba(224,100,100,.08); border: 1px solid rgba(224,100,100,.28);
  color: #ff8a80; font-size: 12px; line-height: 1.65;
  display: flex; align-items: center; gap: 10px;
}
.geo-err span { flex: 1; min-width: 0; }
.geo-err .mini-btn { flex: 0 0 auto; color: var(--gold); border-color: var(--gold-line); background: transparent; }
.mini-btn {
  flex: 1 1 auto; border: 1px solid var(--gold-line); background: var(--surface-2);
  color: var(--gold-bright); border-radius: 10px; padding: 11px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .15s, box-shadow .3s, border-color .3s;
}
.mini-btn:active { transform: scale(.96); }
.mini-btn.primary { background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep)); color: #1a1408; border-color: transparent; }

.submit-btn {
  width: 100%; border: none; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1a1408; font-size: 16px; font-weight: 700; letter-spacing: 1px;
  padding: 17px; margin-top: 15px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(201, 163, 91, .38);
  transition: transform .15s var(--ease);
}
.submit-btn:active { transform: scale(.97); }
.submit-btn:disabled { opacity: .5; filter: grayscale(.4); }

/* ===================== 记录列表 ===================== */
.rec {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 11px; margin-bottom: 13px;
  box-shadow: var(--shadow); display: flex; gap: 13px; align-items: center;
  cursor: pointer; opacity: 0; transform: translateY(16px);
  animation: cardIn .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms);
  transition: border-color .3s, transform .25s var(--ease);
}
.rec:active { border-color: var(--gold); transform: translateY(-2px); }
.rec img { width: 78px; height: 78px; object-fit: cover; border-radius: 13px; background: #000; flex: 0 0 auto; border: 1px solid var(--gold-line); }
.rec .info { flex: 1; min-width: 0; }
.rec .info .t { font-weight: 700; font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec .info .s { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec .info .d { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.rec .info .brand { font-size: 11px; color: var(--gold); margin-top: 3px; }

/* 记录卡右侧操作（重新踩点 / 删除） */
.rec-acts { display: flex; flex-direction: column; gap: 7px; flex: 0 0 auto; }
.rec-btn {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding: 7px 12px; border-radius: 9px; font-size: 12px; font-weight: 600;
  font-family: inherit; white-space: nowrap;
  color: var(--gold); background: rgba(201,163,91,.10);
  border: 1px solid var(--gold-line);
  transition: background .25s, border-color .25s, transform .2s, opacity .25s;
}
.rec-btn:active { transform: scale(.96); }
.rec-btn:disabled { opacity: .5; cursor: not-allowed; }
.rec-btn.danger {
  color: #ff6b60; background: rgba(224,100,100,.10); border-color: rgba(224,100,100,.32);
}

/* ===================== 踩点页：本门店历史记录 ===================== */
.hist-box {
  margin: 0 0 16px; padding: 13px 14px;
  border: 1px solid var(--gold-line); border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(201,163,91,.07), rgba(201,163,91,.02));
  animation: fadeUp .5s var(--ease) both;
}
.hist-head {
  font-size: 13px; font-weight: 600; color: var(--text);
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--hairline);
}
.hist-head b { color: var(--gold); font-size: 16px; }
.hist-tip { font-size: 11px; font-weight: 400; color: var(--text-3); margin-left: auto; }
.hist-item {
  display: flex; align-items: center; gap: 11px; padding: 7px 0;
  opacity: 0; transform: translateY(8px);
  animation: fadeUp .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + .1s);
}
.hist-item + .hist-item { border-top: 1px solid var(--hairline); }
.hist-item img {
  width: 46px; height: 46px; object-fit: cover; border-radius: 9px;
  border: 1px solid var(--gold-line); flex: 0 0 auto; cursor: zoom-in; background: #000;
}
.hist-info { flex: 1; min-width: 0; }
.hist-t { font-size: 12.5px; font-weight: 600; color: var(--text); }
.hist-s { font-size: 11px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-del {
  -webkit-appearance: none; appearance: none; cursor: pointer; flex: 0 0 auto;
  padding: 6px 11px; border-radius: 8px; font-size: 11.5px; font-weight: 600; font-family: inherit;
  color: #ff6b60; background: rgba(224,100,100,.10); border: 1px solid rgba(224,100,100,.32);
  transition: background .25s, border-color .25s, transform .2s, opacity .25s;
}
.hist-del:active { transform: scale(.94); }
.hist-del:disabled { opacity: .5; cursor: not-allowed; }

/* ===================== 底部标签栏 ===================== */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 480px;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 10, 11, .82);
  backdrop-filter: saturate(160%) blur(22px);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  border-top: 1px solid var(--gold-line);
  display: flex; z-index: 30; padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab {
  flex: 1; position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; cursor: pointer;
  color: var(--text-3); font-size: 11px; letter-spacing: .5px;
  transition: color .3s, transform .15s;
}
.tab .ico { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; transition: transform .3s var(--ease); }
.tab:active { transform: scale(.92); }
.tab.active { color: var(--gold-bright); }
.tab.active svg { stroke: var(--gold-bright); }
.tab.active .ico { transform: translateY(-2px); animation: tabPop .4s var(--ease); }
.tab::after {
  content: ""; position: absolute; bottom: 6px; left: 50%; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold-deep));
  border-radius: 2px; transform: translateX(-50%); transition: width .35s var(--ease);
}
.tab.active::after { width: 26px; }
@keyframes tabPop { 0% { transform: translateY(-2px) scale(.8); } 60% { transform: translateY(-4px) scale(1.12); } 100% { transform: translateY(-2px) scale(1); } }

/* ===================== Toast ===================== */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 22px);
  transform: translate(-50%, 24px);
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  color: var(--text); padding: 13px 20px; border-radius: 14px;
  font-size: 13.5px; z-index: 100; opacity: 0; pointer-events: none;
  border: 1px solid var(--gold-line); box-shadow: var(--shadow);
  transition: opacity .3s, transform .35s var(--ease); max-width: 84%; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===================== 大图 ===================== */
.lightbox {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 95; display: none; align-items: center; justify-content: center;
}
.lightbox.show { display: flex; animation: lbIn .35s var(--ease); }
.lightbox img { max-width: 94%; max-height: 88%; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .7); animation: imgReveal .4s var(--ease); }
.lightbox .close {
  position: absolute; top: env(safe-area-inset-top, 14px); right: 18px;
  color: var(--gold-bright); font-size: 30px; cursor: pointer; line-height: 1;
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold-line); border-radius: 50%;
}
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }

/* ===================== 快门白闪 ===================== */
.shutter-flash {
  position: fixed; inset: 0; z-index: 200; background: #fff;
  opacity: 0; pointer-events: none;
}
.shutter-flash.go { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: 0; } 12% { opacity: .85; } 100% { opacity: 0; } }

/* ===================== 加载占位 ===================== */
.loading { text-align: center; color: var(--text-3); padding: 36px; font-size: 13px; letter-spacing: 1px; }
.loading::after {
  content: ""; display: block; width: 26px; height: 26px; margin: 16px auto 0;
  border: 2px solid var(--gold-line); border-top-color: var(--gold);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .splash { display: none; }
}
