:root {
  --bg: #f6f7f1;
  --surface: #ffffff;
  --surface-2: #f2f5ee;
  --ink: #1f2d24;
  --ink-2: #5b6b60;
  --ink-3: #8b978e;
  --line: #e4e9df;
  --brand: #1f5a3a;
  --brand-2: #2f7a4c;
  --brand-soft: #e3f0df;
  --accent: #f2a541;
  --accent-soft: #fff3df;
  --danger: #b6503d;
  --ok: #2c8a4e;
  --warn: #b98316;
  --ai: #6b4fd8;
  --ai-soft: #f0ecff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(24, 48, 32, 0.12);
  --shadow-sm: 0 2px 10px rgba(24, 48, 32, 0.08);
  --header-h: 64px;
  --nav-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-family: Prompt, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-2); }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn { border: 0; background: var(--brand); color: #fff; border-radius: 14px; padding: 12px 18px; font-weight: 600; transition: background .15s, transform .1s; }
.btn:hover { background: #17482e; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 12px; }
.btn-lg { padding: 16px 22px; font-size: 16px; border-radius: 16px; width: 100%; }
.btn-ghost { border: 0; background: none; color: var(--ink-2); padding: 12px; font-weight: 500; }
.btn-outline { border: 1.5px dashed #b9cdb6; background: var(--surface); color: var(--brand-2); border-radius: 14px; padding: 12px; font-weight: 600; }
.btn-soft { border: 0; background: var(--brand-soft); color: var(--brand); border-radius: 12px; padding: 9px 13px; font-weight: 600; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn-ai { border: 0; background: linear-gradient(135deg, #7b5cf0, #5a3fcf); color: #fff; border-radius: 14px; padding: 12px 16px; font-weight: 600; width: 100%; }
.btn-ai:disabled { opacity: .7; cursor: wait; }
.wide { width: 100%; margin-top: 12px; }

/* ---------- onboarding ---------- */
.onboard { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 10%, #d9ecd2 0, transparent 50%), radial-gradient(circle at 90% 90%, #fde8c4 0, transparent 45%), var(--bg); }
.onboard-card { width: min(100%, 420px); text-align: center; animation: rise .5s ease-out; }
.onboard-art { position: relative; height: 170px; margin-bottom: 8px; }
.onboard-art::before { content: ''; position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; transform: translate(-50%, -50%); border-radius: 50%; background: #cfe4c3; }
.ob-dog { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-6deg); font-size: 96px; }
.ob-paw { position: absolute; left: 18%; top: 18%; font-size: 30px; animation: float 3s ease-in-out infinite; }
.ob-pin { position: absolute; right: 20%; top: 8%; font-size: 40px; animation: float 3s ease-in-out infinite .6s; }
.onboard h1 { font-size: 32px; line-height: 1.3; margin: 0 0 10px; letter-spacing: -.5px; }
.onboard h1 em { font-style: normal; color: var(--brand-2); }
.onboard p { color: var(--ink-2); font-size: 14px; line-height: 1.7; margin: 0 0 18px; }
.ob-points { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; text-align: left; }
.ob-points li { background: var(--surface); border-radius: 14px; padding: 11px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-sm); }
.onboard small { display: block; color: var(--ink-3); font-size: 11px; margin-top: 6px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- shell ---------- */
.app { height: 100%; display: flex; flex-direction: column; }
.topbar { height: calc(var(--header-h) + var(--safe-t)); padding: var(--safe-t) 20px 0; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 1200; flex: none; }
.brand { font-family: 'DM Sans', sans-serif; font-weight: 800; font-size: 24px; letter-spacing: -1px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand-icon { margin-right: 6px; }
.brand-dot { color: var(--accent); }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 14px; }
.tabs .tab { border: 0; background: none; padding: 8px 16px; border-radius: 11px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.tabs .tab.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.stage { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; z-index: 1; background: #e8ecef; }

/* desktop: side panel */
.panel { position: absolute; z-index: 1100; top: 14px; left: 14px; bottom: 14px; width: 420px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.panel-scroll { overflow-y: auto; flex: 1; padding: 16px 16px 8px; overscroll-behavior: contain; }
.sheet-handle { display: none; }
.map-float { position: absolute; z-index: 1000; border: 0; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.search-area { top: 16px; left: calc(50% + 217px); transform: translateX(-50%); padding: 10px 18px; border-radius: 30px; color: var(--brand); font-size: 14px; }
.locate { right: 14px; bottom: 30px; width: 48px; height: 48px; border-radius: 50%; font-size: 22px; color: var(--brand); }
.leaflet-top.leaflet-right { top: 4px; }

/* ---------- explore ---------- */
.search-wrap { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 14px; padding: 0 14px; border: 1.5px solid transparent; }
.search-wrap:focus-within { border-color: #9fc79e; background: var(--surface); }
.search-wrap span { font-size: 20px; color: var(--ink-3); }
.search-wrap input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 13px 0; font-size: 15px; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 12px 0 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 30px; padding: 7px 12px; font-size: 13px; white-space: nowrap; color: var(--ink-2); }
.chip.selected { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .n { opacity: .65; font-size: 11px; margin-left: 3px; }
.toggles { display: flex; gap: 8px; align-items: center; padding: 8px 0; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; background: var(--surface-2); padding: 7px 11px; border-radius: 10px; cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--brand); margin: 0; }
.toggles select { margin-left: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 8px; font-size: 12px; }
.status { font-size: 12px; color: var(--ink-3); padding: 4px 2px 10px; }
.status b { color: var(--ink); }
.list { display: grid; gap: 10px; }

.card { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; text-align: left; width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 12px; transition: border-color .15s, box-shadow .15s, transform .1s; }
.card:hover, .card.hl { border-color: #a9cfa6; box-shadow: var(--shadow-sm); }
.card:active { transform: scale(.99); }
.card-icon { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 27px; background: var(--brand-soft); }
.card-body { min-width: 0; }
.card-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.card-side { text-align: right; font-size: 12px; color: var(--ink-2); display: grid; gap: 6px; justify-items: end; align-self: start; }
.card-side .save { border: 0; background: none; font-size: 20px; color: var(--ink-3); padding: 0; line-height: 1; }
.card-side .save.on { color: #e0525b; }
.tag { font-size: 11px; padding: 3px 8px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: #e2f3e5; color: var(--ok); }
.tag.warn { background: #fdf2dc; color: var(--warn); }
.tag.no { background: #fbe6e1; color: var(--danger); }
.tag.price { background: var(--accent-soft); color: #9a5f05; font-weight: 600; }
.tag.ai { background: var(--ai-soft); color: var(--ai); }
.tag.team { background: #e5eefc; color: #2f5fb3; }

.c-pool { background: #dff1fb; } .c-grooming { background: #fbe7f0; } .c-cafe { background: #f8ecd9; }
.c-dogpark { background: #e1f2dc; } .c-park { background: #e1f2dc; } .c-beach { background: #fff0cf; }
.c-hotel { background: #ebe6f8; } .c-pethotel { background: #ebe6f8; } .c-mall { background: #e6eefb; }
.c-vet { background: #e2f3f1; } .c-petshop { background: #fdeee3; } .c-activity { background: #fbe9d9; } .c-petservice { background: #fdeee3; } .c-shelter { background: #fff4cc; } .c-event { background: #fde2e6; }

.ad-card { border: 1px dashed #e3c78f; background: linear-gradient(120deg, #fffaf0, #fff4df); border-radius: var(--radius); padding: 14px; position: relative; display: block; text-align: left; width: 100%; }
.ad-card .ad-label { position: absolute; top: 8px; right: 10px; font-size: 10px; color: #a58547; letter-spacing: 1px; }
.ad-card strong { display: block; font-size: 14px; margin-bottom: 3px; }
.ad-card p { margin: 0; font-size: 12px; color: #866d3d; }
.ad-slot { min-height: 100px; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); position: relative; }
.ad-slot::before { content: 'โฆษณา'; position: absolute; top: 4px; right: 8px; font-size: 10px; color: var(--ink-3); }

.empty { text-align: center; color: var(--ink-3); padding: 28px 12px; background: var(--surface-2); border-radius: var(--radius); font-size: 14px; line-height: 1.7; }
.skeleton { height: 80px; border-radius: var(--radius); background: linear-gradient(90deg, #eef1ea 0%, #f7f9f4 50%, #eef1ea 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.view-head h2 { margin: 2px 0 2px; font-size: 21px; }
.view-head p { margin: 0 0 14px; color: var(--ink-3); font-size: 13px; }

/* ---------- detail ---------- */
.back { border: 0; background: var(--surface-2); border-radius: 12px; padding: 8px 12px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.d-hero { display: flex; gap: 14px; align-items: center; margin: 14px 0 6px; }
.d-icon { width: 64px; height: 64px; font-size: 34px; border-radius: 18px; display: grid; place-items: center; flex: none; }
.d-name { font-size: 21px; font-weight: 700; line-height: 1.3; margin: 0; }
.d-sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.d-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.d-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.d-action { border: 0; background: var(--surface-2); border-radius: 14px; padding: 10px 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); text-decoration: none; display: grid; justify-items: center; gap: 4px; }
.d-action span { font-size: 20px; }
.d-action.primary { background: var(--brand); color: #fff; }
.d-action.on { color: #e0525b; }
.section { border-top: 1px solid var(--line); padding: 16px 0; }
.section h3 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.section h3 small { font-weight: 400; font-size: 11px; color: var(--ink-3); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.fact b { display: block; font-size: 11px; color: var(--ink-3); font-weight: 500; margin-bottom: 2px; }
.price-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.price-table td { padding: 9px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.price-table .src { display: block; font-size: 11px; font-weight: 400; color: var(--ink-3); }
.price-table .src a { color: var(--ink-3); }
.price-table input { accent-color: var(--brand); }
.estimate { margin-top: 10px; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.estimate strong { font-size: 19px; color: #8a5304; }
.note { font-size: 11px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.6; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-box { background: var(--ai-soft); border-radius: 16px; padding: 14px; }
.ai-box p { margin: 0 0 10px; font-size: 12px; color: #5a4a95; line-height: 1.6; }
.tt-list { display: grid; gap: 8px; }
.tt { display: flex; gap: 10px; align-items: center; background: #111; color: #fff; border-radius: 12px; padding: 10px 12px; text-decoration: none; font-size: 13px; }
.tt span:first-child { font-size: 18px; }
.review { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-3); font-size: 12px; margin-bottom: 4px; }
.review-head b { color: var(--ink); font-weight: 600; }
.stars-ro { color: var(--accent); letter-spacing: 1px; }
.r-summary { display: flex; align-items: center; gap: 14px; background: var(--surface-2); padding: 12px 14px; border-radius: 14px; margin-bottom: 8px; }
.r-summary strong { font-size: 28px; }
.g-attr { font-size: 11px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; margin-top: 6px; }

/* events */
.event { display: grid; grid-template-columns: 60px 1fr; gap: 12px; text-align: left; width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 12px; }
.event:hover { border-color: #a9cfa6; }
.e-date { background: #fde2e6; border-radius: 14px; text-align: center; padding: 8px 0; color: #a53a4c; line-height: 1.1; }
.e-date b { display: block; font-size: 22px; }
.e-date span { font-size: 11px; font-weight: 600; }
.e-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.e-meta { font-size: 12px; color: var(--ink-3); margin: 4px 0 6px; }
.e-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.e-links a { font-size: 12px; }

.panel-foot { font-size: 10px; color: var(--ink-3); padding: 18px 2px 8px; line-height: 1.6; }
.panel-foot p { margin: 0; }
.panel-foot a { color: var(--ink-3); }

/* ---------- map markers ---------- */
.pin { width: 38px; height: 38px; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg); background: #fff; border: 2.5px solid var(--brand-2); box-shadow: 0 4px 10px rgba(0,0,0,.2); display: grid; place-items: center; transition: transform .15s; }
.pin span { transform: rotate(45deg); font-size: 19px; }
.pin.price { border-color: var(--accent); }
.pin.event { border-color: #d6566c; }
.pin.unknown { border-color: #b8c2bb; }
.pin.active { transform: rotate(-45deg) scale(1.25); z-index: 1000; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2f7cf6; border: 3px solid #fff; box-shadow: 0 0 0 rgba(47,124,246,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,124,246,.45); } 70% { box-shadow: 0 0 0 16px rgba(47,124,246,0); } 100% { box-shadow: 0 0 0 0 rgba(47,124,246,0); } }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(47,122,76,.25); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: var(--brand-2); color: #fff; font-weight: 700; font-family: 'DM Sans', sans-serif; }
.marker-cluster div { width: 32px; height: 32px; margin-left: 4px; margin-top: 4px; border-radius: 16px; display: grid; place-items: center; }
.marker-cluster span { line-height: 1; }
.marker-cluster { border-radius: 20px; }
.leaflet-container { font-family: Prompt, system-ui, sans-serif; }
.leaflet-control-attribution { font-size: 9px; }

/* ---------- modals ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(18, 32, 22, .55); z-index: 2500; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 24px; padding: 26px; position: relative; width: min(100%, 520px); max-height: 92vh; overflow-y: auto; animation: rise .25s ease-out; }
.close { position: absolute; right: 16px; top: 16px; border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; }
.modal-icon { font-size: 34px; }
.modal h2 { font-size: 21px; margin: 8px 0 4px; }
.modal-sub { font-size: 13px; color: var(--ink-3); margin: 0 0 14px; }
.modal form > label, .modal fieldset { display: block; font-size: 13px; font-weight: 600; margin: 12px 0; border: 0; padding: 0; }
.modal legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.modal label > span, .modal legend > span { color: var(--danger); }
.modal input:not([type=radio]):not([type=checkbox]), .modal textarea, .modal select { display: block; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; margin-top: 6px; font-size: 14px; font-weight: 400; outline-color: #8fbf92; background: var(--surface); }
.modal small { display: block; font-size: 11px; color: var(--ink-3); margin-top: 10px; font-weight: 400; }
.feedback { font-size: 13px; min-height: 0; }
.feedback.ok { color: var(--ok); } .feedback.err { color: var(--danger); }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; }
.stars { display: flex !important; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.stars legend { float: left; width: 100%; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { font-size: 34px; color: #d9ddd5; cursor: pointer; line-height: 1; transition: color .1s; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--accent); }
.stars input:focus-visible + label { outline: 2px solid var(--brand-2); border-radius: 4px; }
.pick { display: flex !important; flex-wrap: wrap; gap: 6px; }
.pick legend { width: 100%; }
.pick label { cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick label span { display: inline-block; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; font-weight: 500; font-size: 13px; }
.pick input:checked + span { background: var(--brand-soft); border-color: #8fbf92; color: var(--brand); }
.pick input:focus-visible + span { outline: 2px solid var(--brand-2); }

.toast { position: fixed; left: 50%; bottom: calc(24px + var(--nav-h) + var(--safe-b)); transform: translateX(-50%); background: #1f2d24; color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14px; z-index: 4000; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

.bottom-nav { display: none; }

/* ---------- mobile: bottom sheet ---------- */
@media (max-width: 760px) {
  :root { --header-h: 56px; --nav-h: 62px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .topbar .tabs, #openSuggest { display: none; }
  .brand { font-size: 22px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); flex: none; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--surface); border-top: 1px solid var(--line); z-index: 1300; }
  .bottom-nav .tab { border: 0; background: none; font-size: 11px; font-weight: 600; color: var(--ink-3); display: grid; place-content: center; justify-items: center; gap: 1px; }
  .bottom-nav .tab span { font-size: 20px; }
  .bottom-nav .tab.active { color: var(--brand); }
  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; border-radius: 22px 22px 0 0; height: calc(100% - 12px); transform: translateY(var(--sheet-y, 50%)); transition: transform .28s cubic-bezier(.2,.8,.2,1); will-change: transform; }
  .panel.dragging { transition: none; }
  .panel[data-snap="peek"] { --sheet-y: calc(100% - 150px); }
  .panel[data-snap="half"] { --sheet-y: 48%; }
  .panel[data-snap="full"] { --sheet-y: 0%; }
  .sheet-handle { display: grid; place-items: center; height: 22px; flex: none; cursor: grab; touch-action: none; }
  .sheet-handle span { width: 42px; height: 5px; border-radius: 3px; background: #d3d9cf; }
  .panel-scroll { padding-top: 2px; }
  .search-area { left: 50%; top: 12px; }
  .locate { bottom: auto; top: 12px; right: 12px; width: 44px; height: 44px; }
  .d-actions { grid-template-columns: repeat(4, 1fr); }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { border-radius: 24px 24px 0 0; max-height: 94vh; padding: 22px 18px calc(22px + var(--safe-b)); }
}

.update-cta { margin-top: 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface-2); border-radius: 14px; padding: 10px 12px; font-size: 12px; color: var(--ink-2); }
.update-cta .btn-soft { flex: none; }
.modal label.inline-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 12px; color: var(--ink-2); }
.modal label.inline-check input { margin-top: 3px; accent-color: var(--brand); }
.d-tags .tag { white-space: normal; line-height: 1.5; }
@media (max-width: 760px) { .leaflet-control-zoom { display: none; } }

/* ---------- photos ---------- */
.card-icon, .d-cover { position: relative; overflow: hidden; }
.card-icon .ph, .d-cover .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.d-cover { height: 150px; border-radius: 18px; display: grid; place-items: center; font-size: 64px; margin: 12px 0 0; }
.d-cover .ph { object-fit: contain; background: inherit; }
.d-hero { margin-top: 12px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; scrollbar-width: none; }
.gallery img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; flex: none; }

/* ---------- iPhone / mobile polish ---------- */
.app { height: 100vh; height: 100dvh; }
.onboard { overflow-y: auto; align-items: start; padding-top: max(24px, var(--safe-t)); }
.onboard-card { margin: auto 0; }
@media (max-width: 760px) {
  /* 16px inputs stop iOS Safari from zooming the page when a field is focused. */
  input, select, textarea, .search-wrap input, .modal input:not([type=radio]):not([type=checkbox]), .modal textarea, .modal select, .toggles select { font-size: 16px !important; }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; transition: transform .25s ease; }
  body.nav-hidden .bottom-nav { transform: translateY(100%); }
  .panel { height: calc(100% - 8px); }
  .panel[data-snap="peek"] { --sheet-y: calc(100% - 150px - var(--nav-h) - var(--safe-b)); }
  .panel-scroll { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); -webkit-overflow-scrolling: touch; }
  .toast { bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
  body.nav-hidden .toast { bottom: calc(var(--safe-b) + 16px); }
  .leaflet-bottom.leaflet-right { top: 0; bottom: auto; left: 0; right: auto; }
  .leaflet-bottom.leaflet-right .leaflet-control-attribution { border-radius: 0 0 8px 0; }
  .card { grid-template-columns: 50px 1fr auto; gap: 10px; padding: 10px; }
  .card-icon { width: 50px; height: 50px; }
  .d-actions { gap: 6px; }
  .d-cover { height: 130px; }
  .modal { max-height: calc(100dvh - var(--safe-t) - 12px); }
}

.confirm-box { background: #fff8e6; border: 1px solid #f1dfb0; border-radius: 16px; padding: 12px 14px; margin: 0 0 14px; display: grid; gap: 6px; font-size: 13px; }
.confirm-box span { color: var(--ink-2); font-size: 12px; }
.confirm-box div { display: flex; gap: 8px; }

.google-cta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; background: #eef4ff; border-radius: 14px; padding: 10px 12px; margin: 4px 0 8px; font-size: 12px; color: #2f4f86; }
.google-cta div { display: flex; gap: 6px; }
.g-box { background: #f3f6fb; border-radius: 14px; padding: 10px 12px; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.g-box .g-attr { width: 100%; margin: 2px 0 0; }
