:root {
  --green: #145a3c; --green-700: #0f4a31; --green-100: #e3f1ea; --amber: #f5a623;
  --ink: #16211b; --ink-2: #4a5852; --ink-3: #7b8781; --line: #e2e8e5; --surface: #ffffff; --bg: #eef2ef;
  --sale: #e67e22; --rent: #2b6cb0; --occupied: #2e8b57; --vacant: #8a949e; --uc: #7b4fb3; --plot: #b7c0c8; --none: #c9d1cc;
  --radius: 16px; --shadow: 0 8px 28px rgba(10, 30, 20, .16); --shadow-sm: 0 2px 10px rgba(10, 30, 20, .12);
  --sheet-peek: 92px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%; }
body { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
#app { position: fixed; inset: 0; }
#map { position: absolute; inset: 0; background: #eceae4; }
.leaflet-container { font-family: var(--font); }
.leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.7); }

/* Top bar */
.topbar { position: absolute; top: calc(8px + var(--safe-t)); left: 10px; right: 10px; z-index: 1000; display: flex; gap: 8px; align-items: center; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 8px; background: var(--green); color: #fff; padding: 8px 12px 8px 10px; border-radius: 14px; box-shadow: var(--shadow-sm); cursor: pointer; flex: none; }
.brand-logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.14); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 14px; } .brand-text small { font-size: 11px; opacity: .85; }
.search { flex: 1; display: flex; align-items: center; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 0 8px 0 12px; height: 46px; min-width: 0; }
.search-icon { color: var(--ink-3); flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; height: 100%; padding: 0 8px; min-width: 0; font-size: 15px; }
.search input::-webkit-search-cancel-button { display: none; }
.icon-btn { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--ink-2); display: grid; place-items: center; }
.icon-btn:hover { background: var(--bg); }
.topnav { display: flex; gap: 6px; align-items: center; flex: none; }
.pill-btn { border: 0; border-radius: 12px; padding: 0 14px; height: 42px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-sm); white-space: nowrap; }
.pill-btn.primary { background: var(--amber); color: #2b1d00; }
.pill-btn.ghost { background: var(--surface); color: var(--green); }
.avatar { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--green); color: #fff; font-weight: 700; box-shadow: var(--shadow-sm); }

/* Chips */
.chips { position: absolute; top: calc(64px + var(--safe-t)); left: 10px; right: 10px; z-index: 999; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--surface); color: var(--ink-2); padding: 0 12px; height: 34px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm); }
.chip.active { background: var(--green); color: #fff; }
.chip-select { flex: none; border: 0; background: var(--surface); color: var(--ink-2); height: 34px; border-radius: 999px; padding: 0 10px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--none); }
.dot-for_sale { background: var(--sale); } .dot-for_rent { background: var(--rent); } .dot-occupied, .dot-listed { background: var(--occupied); }
.dot-vacant { background: var(--vacant); } .dot-under_construction { background: var(--uc); } .dot-plot { background: var(--plot); } .dot-none { background: var(--none); }

/* Map controls */
.map-controls { position: absolute; right: 10px; top: calc(118px + var(--safe-t)); z-index: 998; display: flex; flex-direction: column; gap: 8px; }
.map-btn { width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-sm); display: grid; place-items: center; }
.map-btn.active { background: var(--green); color: #fff; }
.legend { position: absolute; left: 10px; bottom: calc(var(--sheet-peek) + 10px + var(--safe-b)); z-index: 998; display: flex; gap: 10px; background: rgba(255,255,255,.92); padding: 6px 10px; border-radius: 10px; font-size: 11px; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.offline { position: absolute; left: 50%; transform: translateX(-50%); top: calc(108px + var(--safe-t)); z-index: 1001; background: #333; color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12px; }

/* Plot labels on the map */
.plot-label { background: transparent; border: 0; box-shadow: none; }
.plot-label span { display: inline-block; transform: translate(-50%, -50%); font-size: 10px; font-weight: 700; color: #1b2a21; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; white-space: nowrap; pointer-events: none; }
.plot-label.has-listing span { color: var(--green-700); font-size: 11px; }
.plot-label.is-match span { color: #6a0080; font-size: 12px; background: rgba(255,255,255,.85); padding: 1px 5px; border-radius: 6px; text-shadow: none; line-height: 1.15; }
.plot-label.is-match span small { font-weight: 600; font-size: 10px; }
.plot-label.is-selected span { color: #fff; background: #ff1744; font-size: 12px; padding: 2px 6px; border-radius: 6px; text-shadow: none; line-height: 1.15; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.plot-label.is-selected span small { font-weight: 600; font-size: 10px; }
.pulse-ring { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #ff1744; animation: pulse 1.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.45); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.dot-match { background: #d500f9; } .dot-selected { background: #ff1744; }
.leaflet-tooltip.plot-tip { border-radius: 8px; padding: 4px 8px; font-weight: 600; }

/* Blocks drawn by admin */
.block-label { background: transparent; border: 0; box-shadow: none; }
.block-label span { display: inline-block; transform: translate(-50%, -50%); background: rgba(20, 90, 60, .88); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.draw-vertex { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid #145a3c; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.draw-bar { position: absolute; left: 50%; transform: translateX(-50%); top: calc(108px + var(--safe-t)); z-index: 1003; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px; display: flex; gap: 12px; align-items: center; width: min(560px, calc(100% - 20px)); }
.draw-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.draw-text span { color: var(--ink-2); font-size: 12px; }
.draw-actions { display: flex; gap: 6px; flex: none; }
.leaflet-container.drawing { cursor: crosshair; }
@media (max-width: 640px) { .draw-bar { flex-direction: column; align-items: stretch; } .draw-actions { justify-content: flex-end; } }
.me-marker { width: 18px; height: 18px; border-radius: 50%; background: #1e88e5; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(30,136,229,.25); }

/* Sheet */
.sheet { position: absolute; z-index: 1002; background: var(--surface); box-shadow: 0 -8px 30px rgba(0,0,0,.18); display: flex; flex-direction: column; left: 0; right: 0; bottom: 0; border-radius: 22px 22px 0 0; height: 72vh; max-height: calc(100% - 120px - var(--safe-t)); transition: transform .28s cubic-bezier(.2,.8,.2,1); transform: translateY(calc(100% - var(--sheet-peek) - var(--safe-b))); touch-action: none; }
.sheet[data-state="open"] { transform: translateY(0); }
.sheet[data-state="hidden"] { transform: translateY(100%); }
.sheet-close { position: absolute; top: 8px; right: 10px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--bg); color: var(--ink-2); font-size: 22px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.sheet-close:hover { background: var(--line); }
.sheet-open { position: absolute; z-index: 1001; border: 0; background: var(--green); color: #fff; font-weight: 700; font-size: 13px; box-shadow: var(--shadow); cursor: pointer; display: flex; align-items: center; gap: 4px; }
/* phones: a pill above the bottom edge */
.sheet-open { left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); padding: 10px 16px 10px 12px; border-radius: 999px; }
.sheet-open svg { transform: rotate(90deg); }
.sheet-handle { height: 22px; display: grid; place-items: center; cursor: grab; flex: none; }
.sheet-handle span { width: 42px; height: 5px; border-radius: 3px; background: #d4dbd7; }
.sheet-body { flex: 1; overflow: auto; padding: 0 16px calc(24px + var(--safe-b)); touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 0 10px; }
.sheet-title h2 { font-size: 17px; }
.muted { color: var(--ink-3); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

/* Result cards */
.cards { display: flex; flex-direction: column; gap: 8px; }
.card { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; text-align: left; width: 100%; }
.card:hover { border-color: var(--green); background: #f7fbf8; }
.card .thumb { width: 56px; height: 56px; border-radius: 12px; background: var(--green-100); display: grid; place-items: center; flex: none; overflow: hidden; color: var(--green); font-weight: 800; font-size: 15px; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb.c { background: #fff4e0; color: #8a5a00; }
.card .body { flex: 1; min-width: 0; }
.card .title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: var(--none); vertical-align: middle; }
.badge.for_sale { background: var(--sale); } .badge.for_rent { background: var(--rent); } .badge.occupied { background: var(--occupied); }
.badge.vacant { background: var(--vacant); } .badge.under_construction { background: var(--uc); } .badge.plot { background: var(--plot); color: #2b3330; }
.badge.type { background: var(--green-100); color: var(--green); }
.badge.type.c { background: #fff4e0; color: #8a5a00; }
.empty { text-align: center; color: var(--ink-3); padding: 28px 12px; }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* Detail */
.detail-head { display: flex; align-items: flex-start; gap: 12px; }
.detail-head .plotnum { width: 64px; height: 64px; border-radius: 16px; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; }
.detail-head .plotnum.c { background: #b8741a; }
.detail-head .plotnum small { font-size: 10px; font-weight: 600; opacity: .85; }
.detail-head h2 { font-size: 20px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 6px; scroll-snap-type: x mandatory; }
.gallery img { height: 180px; min-width: 240px; border-radius: 14px; object-fit: cover; scroll-snap-align: start; cursor: zoom-in; background: var(--bg); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 14px; }
.fact { background: var(--bg); border-radius: 12px; padding: 10px; }
.fact small { display: block; color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.fact b { font-size: 15px; }
.price { font-size: 22px; font-weight: 800; color: var(--green-700); margin-top: 12px; }
.price small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.desc { white-space: pre-wrap; line-height: 1.5; margin-top: 12px; font-size: 14.5px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; height: 44px; padding: 0 16px; font-weight: 700; font-size: 14px; text-decoration: none; background: var(--bg); color: var(--ink); }
.btn.primary { background: var(--green); color: #fff; }
.btn.amber { background: var(--amber); color: #2b1d00; }
.btn.wa { background: #25d366; color: #fff; }
.btn.danger { background: #fdecec; color: #b42318; }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .6; cursor: default; }
.note { background: #fff8e6; border: 1px solid #ffe3a3; color: #6b4e00; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-top: 12px; }
.note.info { background: var(--green-100); border-color: #c5e3d2; color: var(--green-700); }

/* Forms */
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field input, .field select, .field textarea { border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; outline: 0; font-size: 15px; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); }
.field textarea { min-height: 96px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 6px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }
.error { color: #b42318; background: #fdecec; border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.form h3 { font-size: 15px; margin-top: 8px; color: var(--green-700); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.photos .ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 15px; line-height: 1; }
.photos .add { aspect-ratio: 1; border: 2px dashed #cbd5d0; border-radius: 12px; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; cursor: pointer; text-align: center; }
.status-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.status-picker label { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.status-picker input { display: none; }
.status-picker label.on { border-color: var(--green); background: var(--green-100); color: var(--green-700); }
.selected-plot { display: flex; align-items: center; gap: 12px; background: var(--green-100); border-radius: 14px; padding: 10px 12px; }
.selected-plot .plotnum { width: 48px; height: 48px; border-radius: 12px; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* Tables (admin) */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.tabs { display: flex; gap: 6px; margin: 8px 0 12px; }
.tabs button { border: 0; background: var(--bg); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px; }
.tabs button.on { background: var(--green); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; }
.stat { background: var(--bg); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 20px; color: var(--green-700); }
.stat small { color: var(--ink-3); font-size: 11px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(12, 25, 18, .5); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(2px); }
.modal { position: relative; background: #fff; border-radius: 20px; width: min(440px, 100%); max-height: calc(100% - 16px); overflow: auto; padding: 22px 20px 20px; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 8px; right: 8px; }
.modal h2 { font-size: 20px; margin-bottom: 4px; }
.modal .switch { text-align: center; margin-top: 12px; font-size: 14px; }
.modal .switch button { border: 0; background: none; color: var(--green); font-weight: 700; text-decoration: underline; }

.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.92); display: grid; place-items: center; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close { position: absolute; top: 12px; right: 12px; color: #fff; font-size: 30px; }

.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + var(--safe-b)); z-index: 4000; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { background: #1d2a22; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); animation: toast .25s ease; max-width: 90vw; }
.toast.err { background: #b42318; } .toast.ok { background: var(--green); }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Phone tweaks */
@media (max-width: 640px) {
  .brand-text { display: none; }
  .brand { padding: 8px; border-radius: 12px; }
  .pill-btn { padding: 0 11px; height: 40px; font-size: 13px; }
  #btnMine, #btnAdmin { display: none !important; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
/* Desktop: side panel instead of bottom sheet */
@media (min-width: 900px) {
  .sheet { left: auto; right: 12px; top: calc(118px + var(--safe-t)); bottom: 12px; width: 420px; height: auto; max-height: none; border-radius: 20px; transform: none !important; transition: none; }
  .sheet[data-state="hidden"] { display: none; }
  .sheet-handle { display: none; }
  .sheet-body { padding-top: 16px; }
  .sheet-close { top: 12px; right: 12px; }
  .sheet-title { padding-right: 36px; }
  .map-controls { right: 444px; }
  .legend { bottom: 14px; left: 12px; }
  .chips { right: 444px; }
  .leaflet-bottom.leaflet-right { right: 432px; }
  /* desktop: a tab on the right edge brings the panel back */
  .sheet-open { left: auto; right: 0; bottom: auto; top: 50%; transform: translateY(-50%); flex-direction: column; padding: 14px 8px; border-radius: 12px 0 0 12px; }
  .sheet-open svg { transform: none; }
  .sheet-open span { writing-mode: vertical-rl; }
  body.panel-hidden .map-controls, body.panel-hidden .chips { right: 10px; }
  body.panel-hidden .leaflet-bottom.leaflet-right { right: 0; }
}

/* ===================== society features (extras.js) ===================== */
.link-btn { border: 0; background: none; padding: 0; color: var(--green); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: inherit; }
.verified { color: #1a73e8; font-size: 13px; }
.badge.verified-badge { background: #e8f0fe; color: #1a73e8; }
.icon-btn.on { color: #1a73e8; background: #e8f0fe; }
.section-h { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.tabs.wrap { flex-wrap: wrap; }
.card.static { cursor: default; align-items: flex-start; }
.card.static:hover { border-color: var(--line); background: #fff; }
a.card { text-decoration: none; color: inherit; }
.mini-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.thumb.place, .plotnum.place { background: #eef3fb; font-size: 26px; }
.thumb.sos { background: #fdecec; font-size: 24px; }
.stats .stat.warn b { color: #b42318; }
.warn-row td { background: #fff6f5; }
tr.dead, .invite-row.dead, .notice.dead { opacity: .55; }

/* quick links */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 6px; }
.tile { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.tile span { font-size: 22px; }
.tile:hover { border-color: var(--green); background: #f7fbf8; }

/* notices */
.notice { border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #f4f7fb; border-left: 4px solid #6b8fc7; }
.notice.warning { background: #fff8e6; border-left-color: #f0a500; }
.notice.urgent { background: #fdecec; border-left-color: #d93025; }
.notice-b { white-space: pre-wrap; margin: 4px 0; font-size: 14px; line-height: 1.45; }

/* map pins for places */
.place-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); font-size: 17px; border: 2px solid #fff; }

/* guide bar */
.guide-bar { position: absolute; z-index: 1004; left: 50%; transform: translateX(-50%); top: calc(108px + var(--safe-t)); width: min(560px, calc(100% - 20px)); background: #1a73e8; color: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 10px 12px; display: flex; gap: 12px; align-items: center; }
.guide-arrow { width: 46px; height: 46px; flex: none; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 26px; font-weight: 900; transition: transform .4s ease; }
.guide-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.guide-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-text a { color: #fff; font-weight: 700; }
.guide-btns { display: flex; gap: 6px; }
.guide-btns .btn { background: rgba(255,255,255,.2); color: #fff; }
body.guiding .chips { opacity: 0; pointer-events: none; }
@media (min-width: 900px) { .guide-bar { left: calc((100% - 444px) / 2); } }

/* tour */
.tour { text-align: center; }
.tour-icon { font-size: 48px; margin: 4px 0 6px; }
.tour p { color: var(--ink-2); line-height: 1.55; }
.tour-dots { display: flex; justify-content: center; gap: 6px; margin: 12px 0 4px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tour-dots i.on { background: var(--green); width: 22px; border-radius: 4px; }
.steps { padding-left: 20px; margin: 4px 0; line-height: 1.55; font-size: 14px; }
.steps li { margin-bottom: 4px; }

/* visit page */
.welcome { background: linear-gradient(135deg, #145a3c, #1f7a52); color: #fff; border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; }
.welcome-h { font-size: 20px; font-weight: 800; }
.welcome p { margin: 6px 0 0; opacity: .95; }

/* invites */
.invite-list { display: flex; flex-direction: column; gap: 6px; }
.invite-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; flex-wrap: wrap; }
.qr-box { text-align: center; margin-top: 10px; }
.qr-box img { width: 220px; height: 220px; }

/* complaints */
.complaint { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.badge.st-open { background: #d93025; } .badge.st-in_progress { background: #f0a500; } .badge.st-resolved { background: #2e8b57; } .badge.st-rejected { background: #8a949e; }

/* printable visitor card */
.print-card { border: 2px solid var(--green); border-radius: 18px; padding: 18px; text-align: center; }
.pc-top { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.pc-title { font-size: 24px; font-weight: 800; margin-top: 6px; }
.pc-sub { color: var(--ink-2); margin-top: 2px; }
.pc-qr { width: 200px; height: 200px; margin: 14px auto 8px; display: block; }
.pc-foot { font-size: 12px; color: var(--ink-2); }
@media print {
  body.printing-card * { visibility: hidden !important; }
  body.printing-card #printCard, body.printing-card #printCard * { visibility: visible !important; }
  body.printing-card #printCard { position: fixed; left: 50%; top: 20mm; transform: translateX(-50%); width: 120mm; border-color: #000; }
}
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(4, 1fr); gap: 6px; } .tile { font-size: 11px; } }
.sheet-title { padding-right: 40px; }
.modal .print-card { margin-top: 22px; }


/* ===================== sign-in security (account.js) ===================== */
.step-icon { font-size: 40px; text-align: center; margin: 2px 0 6px; }
.code-input { font-size: 26px !important; letter-spacing: .35em; text-align: center; font-weight: 800; }
.qr-box svg { width: 210px; height: 210px; display: block; margin: 0 auto; }
.secret-key { font-family: ui-monospace, Consolas, monospace; font-size: 16px; font-weight: 700; color: var(--ink); background: var(--bg); border-radius: 10px; padding: 8px 10px; margin: 6px 0; word-break: break-all; }
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.recovery-grid code { font-family: ui-monospace, Consolas, monospace; font-size: 15px; font-weight: 700; background: var(--bg); border-radius: 10px; padding: 10px; text-align: center; letter-spacing: .05em; }
.sec-box { border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.sec-box.good { background: #e6f4ea; color: #1e5631; }
.sec-box.warn { background: #fff8e6; color: #6b4e00; }
.sec-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.modal .switch + .switch { margin-top: 4px; }
details summary { cursor: pointer; }
