/* --- */
/* 设计系统：茶山地图配色（墨绿 ink / 陶土红 clay / 金色 saffron / 苔绿 moss / 暖白 paper）*/
/* 圆角三档：sm 8 / md 12 / lg 18；阴影两档：card / floating */
:root {
  --ink: #213b33;
  --clay: #a95742;
  --clay-deep: #7e3f32;
  --saffron: #c5974b;
  --moss: #728b73;
  --paper: #faf8f1;
  --line: #dce1d8;
  --muted: #7e8980;

/* --- */
  --forest: #a95742;
  --forest-deep: #7e3f32;
  --gold: #c5974b;
  --gold-soft: #f6ecd6;
  --cream: #f2efe6;
  --card: #ffffff;
  --blue: #5b7f9e;
  --green: #3f7d54;
  --red: #b23b34;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 4px 14px rgba(30, 52, 43, .12);
  --shadow-floating: 0 14px 36px rgba(30, 52, 43, .18);
/* --- */
  --shadow-sm: 0 4px 14px rgba(30, 52, 43, .12);
  --shadow-md: 0 10px 28px rgba(30, 52, 43, .16);
  --shadow-lg: 0 14px 36px rgba(30, 52, 43, .18);
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--ink); background: var(--cream); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
.app-shell, #map { height: 100%; width: 100%; overflow: hidden; }
.app-shell { position: relative; background: #cfd9cb; }
/* --- */
#map { position: relative; z-index: 1; }

/* --- */
.topbar { position: absolute; z-index: 6; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 14px 0; pointer-events: none; }
.app-title { padding: 8px 11px; border-radius: var(--radius-sm); background: rgba(33, 59, 51, .78); text-shadow: none; }
.app-title strong { display: block; font-size: 17px; font-weight: 700; letter-spacing: 1px; color: #fff; }
.app-title small { display: block; margin-top: 3px; font-size: 10px; color: rgba(255,255,255,.68); }
.top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: auto; }
.status-pill { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.88); font-size: 10px; color: #55685e; box-shadow: var(--shadow-card); pointer-events: auto; }
.status-pill i { width: 7px; height: 7px; background: #3f7d54; border-radius: 50%; box-shadow: 0 0 0 4px rgba(63,125,84,.14); }
.status-pill.loading i { background: var(--saffron); box-shadow: 0 0 0 4px rgba(197,151,75,.16); }
.status-pill.error i { background: var(--red); box-shadow: 0 0 0 4px rgba(178,59,52,.14); }

/* --- */
/* 标题行：茶区名（衬线大字）+ 右侧白色统计胶囊；窄屏自动换行避让右上角按钮 */
.sheet-title-row { display: flex; align-items: center; justify-content: flex-start; gap: 8px 12px; margin: 5px 0 4px; flex-wrap: wrap; padding-right: 76px; }
.sheet-title-row h1 { margin: 0; padding-right: 0; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 统计条：白底胶囊，位于茶区名右侧 */
.stats-bar { display: flex; align-items: center; flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.95); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(30,52,43,.08); }
.stats-bar[hidden] { display: none; }
.stats-items { display: flex; align-items: center; gap: 7px; }
.stat-item { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: 10px; line-height: 1; }
.stat-item svg { color: var(--saffron); }
.stat-item b { font-size: 12px; color: var(--ink); font-weight: 700; min-width: 10px; text-align: center; }
.stat-item em { font-style: normal; color: var(--muted); }
.stat-like { display: flex; align-items: center; gap: 2px; padding: 3px 7px; border-radius: 999px; border: 1px solid rgba(197,151,75,.5); background: #fff; color: #8a6524; font-size: 10px; font-weight: 600; cursor: pointer; }
.stat-like svg { color: var(--saffron); }
.stat-like.liked { background: linear-gradient(135deg, rgba(199,64,50,.92), rgba(150,40,32,.92)); border-color: rgba(199,64,50,.6); color: #fff; box-shadow: 0 0 0 3px rgba(199,64,50,.16); }
.stat-like.liked svg { color: #ffd9b0; }
.stat-like:active { transform: scale(.96); }

/* --- */
/* 远景仅显示区域级标签：墨绿主区、陶土红地市、淡金县级、苔绿乡镇，红色留给选中态 */
.region-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.region-name {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-size: 16px; font-weight: 700; letter-spacing: 2px; color: #ffffff;
  padding: 6px 15px 7px; border-radius: var(--radius-sm); line-height: 1;
  background: rgba(33, 59, 51, .9); border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: var(--shadow-card); user-select: none;
  pointer-events: auto; cursor: pointer;
}
.region-name:active { transform: translate(-50%, -50%) scale(.96); background: rgba(33, 59, 51, .96); }
/* --- */
.region-name.city { font-size: 13px; font-weight: 600; letter-spacing: 1px; padding: 4px 12px 5px; background: rgba(169, 87, 66, .9); color: #ffffff; border: 1px solid rgba(255, 255, 255, .45); box-shadow: var(--shadow-card); }
.region-name.city:active { background: rgba(150, 76, 57, .95); transform: translate(-50%, -50%) scale(.96); }
.region-name.city .count { display: inline-block; margin-left: 5px; font-size: 9px; color: rgba(255, 255, 255, .78); font-weight: 400; }
/* --- */
.region-name.sub { font-size: 13px; font-weight: 600; letter-spacing: 1px; padding: 4px 12px 5px; background: rgba(197, 151, 75, .88); color: #2a2416; border: 1px solid rgba(255, 255, 255, .4); box-shadow: var(--shadow-card); transform: translate(-50%, 0); }
.region-name.sub:active { background: rgba(184, 138, 64, .94); transform: translate(-50%, 0) scale(.96); }
.region-name.sub.town-lv { background: rgba(114, 139, 115, .92); color: #fff; border-color: rgba(255, 255, 255, .45); }
.region-name.sub.town-lv:active { background: rgba(97, 122, 98, .96); }
.region-name.sub .count { display: inline-block; margin-left: 5px; font-size: 9px; color: rgba(42, 36, 22, .65); font-weight: 400; }
.region-name.sub.town-lv .count { color: rgba(255, 255, 255, .8); }

/* --- */
.area-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.area-label {
  position: absolute; transform: translate(-50%, -100%);
  transform-origin: 50% 100%; /* 缂╂斁/鍔ㄧ敾浠ュ簳杈归敋鐐逛负鍘熺偣锛屼繚璇佸簳杈瑰缁堝帇鍦ㄥ潗鏍囩偣涓?*/
  white-space: nowrap; pointer-events: auto; cursor: pointer;
  font-size: 11px; font-weight: 600; letter-spacing: .5px;
  padding: 3px 7px 4px; border-radius: var(--radius-sm);
  color: #ffffff; background: rgba(33, 59, 51, .88);
  box-shadow: 0 2px 6px rgba(20, 35, 28, .18);
  line-height: 1; user-select: none;
  z-index: 5;
}
.area-label.focus { background: rgba(33, 59, 51, .94); font-size: 12px; font-weight: 700; }
/* --- */
.area-label.active {
  z-index: 60;
  background: var(--clay);
  color: #fff;
  font-size: 13px; font-weight: 800;
  padding: 4px 9px 5px; border-radius: var(--radius-sm);
  box-shadow: 0 0 0 2px rgba(255, 248, 224, .9);
  transform: translate(-50%, -100%) scale(1.08);
  animation: none;
}
.area-label.plain { background: rgba(255, 255, 255, .96); color: var(--clay-deep); box-shadow: 0 1px 5px rgba(20, 35, 28, .16); }

/* --- */
.bottom-console { position: absolute; z-index: 6; left: 12px; right: 12px; bottom: 14px; }
.crumb-bar { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: var(--shadow-card); overflow-x: auto; scrollbar-width: none; }
.crumb-bar[hidden] { display: none; }
.crumb-bar::-webkit-scrollbar { display: none; }
.crumb { flex: 0 0 auto; height: 26px; padding: 0 10px; border-radius: 999px; background: #f1f4ec; color: var(--clay-deep); font-size: 11px; font-weight: 600; white-space: nowrap; }
.crumb:active { background: #e4eadd; }
.crumb-home { background: var(--clay); color: #fff; }
.crumb-current { background: #e9efe4; color: #4f6257; }
.crumb-sep { flex: 0 0 auto; color: #a4b0a8; font-size: 12px; }
/* --- */
.search-box { height: 42px; display: flex; align-items: center; padding: 0 6px 0 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.search-box:focus-within { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(169, 87, 66, .12); }
.search-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; margin-right: 4px; border-radius: 50%; background: transparent; color: var(--ink); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.search-box input::placeholder { color: var(--muted); }
.search-box button { display: none; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 6px; }
.search-box.has-value button { display: block; }
.icp-row { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 7px; font-size: 10px; line-height: 1.4; color: rgba(38,46,42,.45); text-align: center; flex-wrap: wrap; }
.icp-row a { color: inherit; text-decoration: none; }
.icp-row a:active { color: rgba(38,46,42,.7); }

/* --- */
#map .tdt-attribution, #map .tdt-copyright, #map .tdt-control-attribution,
#map [class*="attribution"], #map [class*="copyright"] { display: none !important; }
.icp-sep { opacity: .6; }
.search-results { position: absolute; left: 0; right: 0; bottom: 60px; padding: 7px; border-radius: var(--radius-md); background: rgba(255,255,255,.98); box-shadow: var(--shadow-floating); max-height: 44vh; overflow: auto; }
.search-results[hidden] { display: none; }
/* --- */
.search-results::before { content: ''; display: block; height: 1px; background: var(--line); margin: 0 4px 6px; }
.result-item { display: block; width: 100%; padding: 12px; text-align: left; background: transparent; border-bottom: 1px solid var(--line); color: var(--ink); }
.result-item:last-child { border: 0; }
.result-item:active { background: #eef3eb; }
.result-name { font-weight: 600; font-size: 14px; }
.result-path { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

/* --- */
.map-tools { position: absolute; z-index: 5; right: 12px; bottom: 170px; display: grid; gap: 8px; }
.tool-btn { width: 40px; height: 40px; border-radius: var(--radius-md); background: rgba(255,255,255,.96); color: var(--clay-deep); font-size: 20px; box-shadow: var(--shadow-card); display: grid; place-items: center; }
.tool-btn:active { transform: scale(.95); background: #fff; }
.tool-btn.active { color: var(--clay); box-shadow: 0 0 0 2px var(--clay), var(--shadow-card); }

/* --- */
.nearby-panel { position: absolute; z-index: 8; left: 12px; bottom: 236px; width: min(300px, calc(100% - 24px)); padding: 10px 12px 8px; border-radius: var(--radius-md); background: rgba(255,255,255,.98); box-shadow: var(--shadow-floating); }
.nearby-panel[hidden] { display: none; }
.nearby-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12px; color: var(--ink); }
.nearby-close { width: 26px; height: 26px; border-radius: 50%; color: var(--muted); font-size: 15px; line-height: 1; display: grid; place-items: center; }
.nearby-close:active { background: var(--line); }
.nearby-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 6px; border-radius: var(--radius-sm); text-align: left; }
.nearby-item:active { background: var(--paper); }
.nearby-rank { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--clay); color: #fff; font-size: 11px; display: grid; place-items: center; }
.nearby-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nearby-dist { flex: none; font-size: 11px; color: var(--clay-deep); font-weight: 600; }

/* --- */
.fab-wrap { position: absolute; z-index: 6; right: 12px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab { width: 42px; height: 42px; border-radius: 50%; background: var(--clay); color: #fff; font-size: 24px; font-weight: 300; line-height: 1; box-shadow: var(--shadow-card); display: grid; place-items: center; transition: transform .2s ease; }
.fab.open { transform: rotate(45deg); }
.fab-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; border-radius: var(--radius-md); background: rgba(255,255,255,.97); box-shadow: var(--shadow-floating); }
.fab-panel[hidden] { display: none; }
.fab-panel button { min-height: 40px; padding: 0 10px; border-radius: var(--radius-sm); background: #f1f4ec; color: var(--clay-deep); font-size: 12px; font-weight: 600; }
.fab-panel button:active { background: #e6ecdf; }

/* --- */
.bottom-sheet { position: absolute; z-index: 7; left: 50%; bottom: 130px; width: min(540px, calc(100% - 20px)); max-height: calc(100vh - 150px); overflow-y: auto; padding: 16px 18px 18px; border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md); background: rgba(255,255,255,.98); box-shadow: var(--shadow-floating); transform: translate(-50%, calc(100% + 120px)); transition: transform .34s cubic-bezier(.22,.8,.25,1); }
.bottom-sheet.open { transform: translate(-50%, 0); }
.sheet-topbar { position: absolute; top: 9px; right: 10px; display: flex; gap: 6px; z-index: 2; }
.sheet-topbar[hidden], .sheet-meta[hidden], .sheet-actions[hidden], .sheet-expand[hidden] { display: none; }
.sheet-topbar .sheet-close { position: static; }
.sheet-mini-btn { width: 27px; height: 27px; border-radius: 50%; background: #f7efe3; color: #8a6524; font-size: 13px; display: grid; place-items: center; border: 1px solid rgba(197,151,75,.35); }
.sheet-mini-btn:active { background: #f0e2c8; }
.sheet-handle { width: 36px; height: 4px; margin: 0 auto 13px; border-radius: 4px; background: #d9dcd1; }
.sheet-close { position: absolute; right: 13px; top: 11px; width: 30px; height: 30px; border-radius: 50%; background: #f1f3ec; color: #65766b; font-size: 20px; line-height: 1; }
.sheet-kicker { font-size: 10px; letter-spacing: 2px; color: var(--saffron); font-weight: 700; }
/* --- */
.bottom-sheet h1 { margin: 5px 0 4px; font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; letter-spacing: .04em; font-size: 26px; font-weight: 700; }
.sheet-address { margin: 0; color: var(--muted); font-size: 13px; }
.sheet-meta { display: flex; align-items: center; gap: 7px; margin: 12px 0; flex-wrap: wrap; }
.sheet-meta span { padding: 5px 9px; border-radius: var(--radius-sm); background: #edf2e8; color: #617263; font-size: 11px; }
.sheet-meta span:first-child { background: var(--gold-soft); color: #8a6524; }
.sheet-meta .meta-merchant { background: #eef1ec; color: var(--muted); }
/* --- */
.merchant-entry-mini { margin-left: auto; height: 30px; padding: 0 16px; border-radius: 999px; background: transparent; color: var(--clay); font-size: 12px; font-weight: 600; border: 1px solid var(--clay); }
.merchant-entry-mini:active { background: rgba(169,87,66,.08); }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.primary-action, .secondary-action { height: 44px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; }
.primary-action { flex: 1; min-width: 120px; text-align: left; padding: 0 15px; background: var(--clay); color: #fff; }
.primary-action span { float: right; font-size: 21px; line-height: 17px; }
.secondary-action { padding: 0 14px; background: transparent; color: var(--clay); border: 1px solid var(--line); white-space: nowrap; }
.sheet-expand { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.bottom-sheet.expanded > .sheet-note { display: none; }
.sheet-note { margin: 11px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

/* --- */
.correction-modal, .detail-modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(33, 59, 51, .5); }
.correction-modal[hidden], .detail-modal[hidden] { display: none; }
.correction-dialog, .detail-dialog { position: relative; width: min(440px, 100%); max-height: min(720px, calc(100vh - 36px)); overflow: auto; padding: 24px 22px; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-floating); }
.correction-dialog h2, .detail-dialog h2, .merchant-dialog h2 { margin: 6px 0 4px; font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; letter-spacing: .04em; font-size: 24px; font-weight: 700; padding-right: 28px; }
.coordinate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 13px; }
.coordinate-fields label, .reason-field { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.coordinate-fields input, .coordinate-fields select, .reason-field input, .reason-field select, .reason-field textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 10px; color: var(--ink); outline: none; font-size: 13px; }
.coordinate-fields input:focus, .reason-field textarea:focus, .reason-field select:focus { border-color: var(--moss); box-shadow: 0 0 0 3px rgba(114,139,115,.14); }
.coordinate-fields input:disabled { background: #f4f5f0; color: #8b968e; }
.map-center-action { margin: 10px 0 8px; padding: 8px 11px; border-radius: var(--radius-sm); background: #edf2e8; color: var(--clay); font-size: 11px; min-height: 34px; }
.correction-distance { margin: 0 0 12px; font-size: 11px; color: var(--clay-deep); line-height: 1.5; }
.correction-distance[hidden] { display: none; }
.reason-field textarea { resize: vertical; }
.correction-actions { display: flex; gap: 9px; margin-top: 16px; }
.correction-actions .primary-action { text-align: center; }
.form-error { margin: 10px 0 0; color: var(--red); font-size: 11px; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 170px; transform: translateX(-50%); padding: 11px 15px; border-radius: var(--radius-sm); background: var(--clay-deep); color: #fff; font-size: 12px; box-shadow: var(--shadow-floating); max-width: 86vw; text-align: center; }

/* --- */
.detail-dialog { width: min(560px, 100%); }
.detail-dialog h2 { font-size: 30px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 20px 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.detail-grid div { display: grid; gap: 5px; padding: 13px; background: rgba(255,255,255,.92); }
.detail-grid small { color: var(--muted); font-size: 10px; }
.detail-grid strong { font-size: 13px; font-weight: 600; color: var(--ink); word-break: break-all; }
.coords-mini { margin: -12px 0 14px; font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.detail-callout { display: flex; gap: 11px; align-items: flex-start; padding: 14px; border-radius: var(--radius-sm); background: #edf2e8; }
.callout-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #d9e6d2; color: var(--clay); font-size: 19px; flex: 0 0 auto; }
.detail-callout strong { font-size: 13px; }
.detail-callout p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.detail-actions { display: flex; gap: 8px; margin-top: 17px; flex-wrap: wrap; }
.detail-actions .primary-action { flex: 1; min-width: 140px; text-align: center; }
.detail-actions .secondary-action { flex: 1; min-width: 96px; }

/* --- */
.merchant-section { margin-top: 20px; }
.section-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; font-size: 13px; font-weight: 600; }
.section-line span { color: var(--muted); font-size: 11px; font-weight: 400; }
.merchant-list { display: grid; gap: 8px; }
.merchant-empty { padding: 13px; border: 1px dashed #c9d4c6; border-radius: var(--radius-sm); color: #8a988d; font-size: 11px; }
.merchant-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 13px; border-radius: var(--radius-sm); background: #f5f6f2; border: 1px solid transparent; }
.merchant-card.certified { border-color: rgba(197,151,75,.4); background: #fbf6ea; }
.merchant-card strong { display: block; font-size: 14px; }
.merchant-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.merchant-badge { padding: 4px 7px; border-radius: 5px; background: var(--gold-soft); color: #8a6524; font-size: 10px; white-space: nowrap; font-weight: 600; }
.merchant-badge.approved { background: #e4f0df; color: #2e7d32; }
.merchant-badge.pending { background: #f6ecd6; color: #8a6524; }
.merchant-join { width: 100%; height: 42px; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; color: var(--clay); font-size: 13px; font-weight: 600; }
.merchant-join span { font-size: 18px; margin-left: 4px; }

/* --- */
.merchant-detail-badges { display: flex; gap: 7px; margin: 12px 0; flex-wrap: wrap; }
.merchant-detail-badges span { padding: 5px 9px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; }
.badge-type { background: #eef1ec; color: var(--muted); }
.badge-cert { background: var(--gold-soft); color: #8a6524; }
.badge-status-approved { background: #e4f0df; color: #2e7d32; }
.badge-status-pending { background: #f6ecd6; color: #8a6524; }
.merchant-detail-intro { margin: 0 0 14px; padding: 12px 13px; border-radius: var(--radius-sm); background: #f4f6f1; color: #55685e; font-size: 12px; line-height: 1.7; }
.contact-box { margin: 4px 0 2px; padding: 15px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }
.contact-placeholder { color: var(--muted); font-size: 12px; text-align: center; padding: 8px 0; }
.contact-hidden { text-align: center; }
.contact-hidden p { margin: 0 0 10px; color: #55685e; font-size: 13px; }
.contact-revealed { display: grid; gap: 8px; }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: var(--radius-sm); background: #f4f7f1; }
.contact-row strong { font-size: 15px; letter-spacing: .5px; word-break: break-all; }
.contact-row small { display: block; color: var(--muted); font-size: 10px; }
.contact-row-actions { display: flex; gap: 7px; }
.contact-row-actions button { min-height: 36px; padding: 0 12px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; }
.btn-call { background: var(--green); color: #fff; }
.btn-copy { background: #eef2ea; color: var(--clay); }
.reveal-contact-btn { width: 100%; min-height: 42px; border-radius: var(--radius-sm); background: var(--clay); color: #fff; font-size: 13px; font-weight: 600; }
.contact-stats { margin-top: 8px; color: #a2aca5; font-size: 10px; text-align: center; }

/* --- */
.merchant-dialog { max-height: min(720px, calc(100vh - 36px)); }
.merchant-dialog > .reason-field { margin-top: 15px; }
.merchant-dialog .merchant-fields { margin-top: 13px; }
.merchant-dialog select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 0 9px; color: var(--ink); outline: none; font-size: 13px; }
.cert-material-panel { margin-top: 15px; padding: 13px; border: 1px dashed #c9d4c6; border-radius: var(--radius-sm); background: #fbfcf8; }
.cert-material-panel .sheet-note { margin-top: 9px; }
.material-fields { display: grid; gap: 8px; }
.material-field { display: grid; gap: 5px; }
.material-field .material-label { font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.material-field .material-label em { font-style: normal; color: var(--red); }
.material-field input[type="file"] { font-size: 11px; color: var(--muted); }
.material-field input[type="file"]::file-selector-button { background: #eef2ea; color: var(--clay); border: 0; border-radius: 6px; padding: 6px 9px; font-size: 11px; cursor: pointer; }
.material-uploaded { font-size: 10px; color: #2e7d32; }

/* --- */
.adverts-section { margin-top: 14px; }
.adverts-section[hidden] { display: none; }
.adverts-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #8a6524; }
.adverts-head::before { content: ''; width: 4px; height: 12px; border-radius: 2px; background: var(--saffron); }
.advert-card { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: var(--radius-sm); background: var(--gold-soft); border: 1px solid rgba(197,151,75,.35); }
.advert-card + .advert-card { margin-top: 8px; }
.advert-card.clickable { cursor: pointer; }
.advert-card.clickable:active { background: #f2e4c4; }
.advert-media { flex: 0 0 auto; width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; background: #efe3c8; }
.advert-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.advert-body { min-width: 0; }
.advert-title { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.advert-content { margin-top: 4px; font-size: 11px; color: #7d6a45; line-height: 1.6; word-break: break-all; }
.advert-link { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--clay); }
.search-results .adverts-section { margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.search-results .adverts-section[hidden] { display: none; }

/* --- */
.disclaimer { margin: 10px 0 0; color: #a2aca5; font-size: 10px; line-height: 1.5; text-align: center; }
.merchant-list .disclaimer { margin-top: 8px; text-align: left; }

/* --- */
.lead-dialog { max-height: min(720px, calc(100vh - 36px)); }
.lead-dialog > .reason-field { margin-top: 13px; }
.fab-panel #lead-entry-btn { grid-column: 1 / -1; background: var(--clay); color: #fff; }

/* --- */
@media (min-width: 768px) {
  .topbar { padding: 16px 22px 0; }
  .bottom-console { left: 22px; right: 22px; max-width: 560px; }
  .map-tools { right: 22px; }
  .fab-wrap { right: 22px; }
  .bottom-sheet { bottom: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .bottom-sheet { transition: none; }
}

