/* Shepherd Maps (Nov 14, 2026): its own app at maps.shepherdgrid.com. The ShepherdGrid look, a full-screen map, a search bar on
   top, a panel for places and directions (a bottom sheet on phones, a side panel on computers), and the driving view. */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/assets/fonts/Inter-Regular.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/assets/fonts/Inter-Medium.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/assets/fonts/Inter-SemiBold.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/assets/fonts/Inter-Bold.woff') format('woff'); }
@font-face { font-family: 'Inter Display'; font-weight: 700; font-display: swap; src: url('/assets/fonts/InterDisplay-Bold.woff') format('woff'); }

:root {
  /* ShepherdGrid's own colors (Nov 14, David: "Shepherd Connect needs to look like our brand ... feel like an app that came
     from shepherdgrid.com"): deep teal-black, bright teal, gold, and the soft purple for prayer. */
  --accent: #19d3f0; --accent-2: #00f5e8; --accent-soft: rgba(25, 211, 240, 0.13); --on-accent: #021317;
  --grad: linear-gradient(90deg, #00f5e8, #00c0f5);
  --bg: #031216; --surface: #061b20; --surface-2: #0b2a31; --line: #12343b; --text: #e6f5f4; --text-2: #9cc2c0; --text-3: #5f8f8e;
  --mine: linear-gradient(135deg, #0b7f8c, #0a6a93); --mine-text: #effdfc; --theirs: #0d2a31; --theirs-text: #e6f5f4; --chat-bg: #020e11;
  --ok: #3ad69c; --warn: #f5a524; --bad: #f2566e; --gold: #f4b54a; --prayer: #c38bff; --prayer-soft: rgba(195, 139, 255, 0.14);
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.45); --r: 16px; --vvh: 100dvh;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; --display: 'Inter Display', 'Inter', -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.4; overscroll-behavior: none; }
body { overflow: hidden; position: fixed; inset: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

#app { position: fixed; left: 0; right: 0; top: 0; height: var(--vvh); overflow: hidden; }
.boot { height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; background: radial-gradient(60% 50% at 50% 40%, rgba(0, 245, 232, 0.12), transparent 70%), var(--bg); color: var(--text); font-family: var(--display); font-size: 20px; }
.boot b span { color: var(--gold); }
.btn { min-height: 46px; padding: 0 18px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; background: var(--surface-2); color: var(--text); }
.btn.primary { background: var(--grad); color: var(--on-accent); box-shadow: 0 6px 22px rgba(0, 220, 240, 0.25); }
.btn.primary:active { filter: brightness(0.92); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 18px; background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 14px; }
.chip.on { background: var(--grad); color: var(--on-accent); }
.card { margin: 12px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 84px); transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: #e6f5f4; color: #031216; font-size: 15px; box-shadow: var(--shadow); animation: up 0.2s ease; }
@keyframes up { from { opacity: 0; transform: translate(-50%, 10px); } }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.sm svg { width: 18px; height: 18px; }

/* ================================================================ Shepherd Search */

/* ================================================================ Shepherd Maps */
.hidden { display: none !important; }
.map { position: absolute; inset: 0; }
.smap { overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: #e9ecef; cursor: grab; isolation: isolate; }
.smap:active { cursor: grabbing; }
.smap-tiles img { position: absolute; left: 0; top: 0; transform-origin: 0 0; opacity: 0; transition: opacity 0.2s; pointer-events: none; image-rendering: auto; }
.smap-tiles img.in { opacity: 1; }
.smap-svg { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.smap-svg .route-casing { fill: none; stroke: #04313a; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.smap-svg .route { fill: none; stroke: #00c8f0; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.smap-pins { position: absolute; inset: 0; pointer-events: none; }
.smap-pin { position: absolute; left: 0; top: 0; pointer-events: auto; will-change: transform; }
.pin { width: 32px; height: 40px; margin: -40px 0 0 -16px; display: grid; justify-items: center; align-items: start; }
.pin i { width: 28px; height: 28px; margin-top: 2px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--gold); border: 2px solid #3b2500; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35); }
.pin span { transform: rotate(45deg); font-size: 12px; font-weight: 800; font-style: normal; color: #2a1800; }
.drop { margin: -34px 0 0 -16px; color: #e5484d; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35)); }
.drop svg { width: 34px; height: 34px; fill: #e5484d; stroke: #fff; }
.me-dot { width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(0, 160, 255, 0.22); display: grid; place-items: center; pointer-events: none !important; }
.me-dot i { width: 14px; height: 14px; border-radius: 50%; background: #0a84ff; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4); }
.rep { width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); background: #e5484d; }
.rep svg { width: 19px; height: 19px; }
.k-hazard, .k-construction { background: #f5a524 !important; color: #2a1800 !important; }
.k-traffic { background: #e5484d !important; }
.k-closed { background: #b42318 !important; }
.k-police { background: #2563eb !important; }
.k-flood { background: #0ea5e9 !important; }
.k-crash { background: #dc2626 !important; }

/* search bar */
.top { position: absolute; left: 0; right: 0; top: 0; z-index: 10; padding: calc(env(safe-area-inset-top) + 10px) 10px 0; pointer-events: none; }
.top > * { pointer-events: auto; }
.bar { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 6px 0 8px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 560px; }
.bar:focus-within { border-color: var(--accent); }
.bar-logo { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.bar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16.5px; color: var(--text); }
.bar input::-webkit-search-cancel-button { display: none; }
.ib { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); flex: none; }
.ib:hover { background: var(--surface-2); color: var(--text); }
.top .chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 2px 6px; max-width: 560px; }
.top .chips::-webkit-scrollbar { display: none; }
.top .chip { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25); background: var(--surface); border: 1px solid var(--line); color: var(--text); }

/* buttons on the map */
.fabs { position: absolute; right: 10px; bottom: calc(42vh + 14px); z-index: 9; display: grid; gap: 10px; transition: bottom 0.2s; }
.fabs.nav-mode { bottom: calc(env(safe-area-inset-bottom) + 96px); }
.fabs.nav-mode .fab:not(.report) { display: none; }
.fab { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); }
.fab.locate { color: var(--accent); }
.fab.report { width: 56px; height: 56px; background: #f5a524; color: #2a1800; border: 0; }
.fab.report svg { width: 26px; height: 26px; }
.credit { position: absolute; left: 6px; bottom: calc(env(safe-area-inset-bottom) + 2px); z-index: 1; font-size: 10px; color: #333; background: rgba(255, 255, 255, 0.75); padding: 1px 6px; border-radius: 6px; pointer-events: none; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the panel */
.panel { position: absolute; left: 0; right: 0; bottom: 0; z-index: 13; max-height: 42vh; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35); padding: 0 16px calc(env(safe-area-inset-bottom) + 16px); }
.panel .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 6px; }
@media (min-width: 900px) {
  .panel { left: 12px; right: auto; top: 132px; bottom: auto; width: 380px; max-height: calc(var(--vvh) - 150px); border-radius: 18px; padding-top: 6px; box-shadow: var(--shadow); }
  .panel .grab { display: none; }
  .fabs { bottom: 30px; }
  .top { padding-left: 12px; }
}
.ph { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 10px; }
.ph > div { flex: 1; min-width: 0; }
.ph h2 { font-size: 21px; overflow-wrap: anywhere; }
.ph small { display: block; color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.home h2 { font-size: 22px; margin: 4px 0 6px; }
.home h2 b { color: var(--gold); }
.note { color: var(--text-2); font-size: 14px; margin: 0 0 10px; }
.faint { color: var(--text-3); font-size: 12.5px; }
.tips { display: flex; flex-wrap: wrap; gap: 8px; }
.pill.ai { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(195, 139, 255, 0.15); color: var(--prayer); margin: 0 0 10px; }
.list { display: grid; }
.place-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); text-align: left; width: 100%; }
.place-row:first-child { border-top: 0; }
.place-row .n { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #2a1800; font-size: 12px; font-weight: 800; display: grid; place-items: center; flex: none; }
.place-row .mid { flex: 1; min-width: 0; display: grid; gap: 1px; }
.place-row b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-row small { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-row .open { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ok); }
.place-row .dist { color: var(--text-2); font-size: 13px; font-weight: 600; flex: none; }
.place .addr { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; font-size: 15px; }
.place .addr svg { width: 20px; height: 20px; color: var(--text-3); margin-top: 1px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.acts .btn { min-height: 42px; padding: 0 14px; font-size: 14.5px; }
.acts .btn svg { width: 19px; height: 19px; }
.modes { display: flex; gap: 6px; padding: 3px; border-radius: 12px; background: var(--surface-2); margin-bottom: 10px; width: max-content; }
.modes button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--text-2); }
.modes button.on { background: var(--bg); color: var(--accent); }
.modes svg { width: 19px; height: 19px; }
.warn { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(245, 165, 36, 0.13); color: var(--warn); font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.warn svg { width: 19px; height: 19px; flex: none; }
.go { margin: 2px 0 10px; }
.steps { list-style: none; margin: 0 0 10px; padding: 0; display: grid; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.steps li span { flex: 1; }
.steps li small { color: var(--text-3); font-size: 12.5px; flex: none; }
.steps li svg { color: var(--accent); }
.msg { text-align: center; padding: 14px 6px 8px; }
.msg h3 { font-size: 18px; margin-bottom: 6px; }
.msg p { color: var(--text-2); margin: 0 0 12px; }
.loading { display: flex; justify-content: center; gap: 8px; padding: 24px; }
.loading i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: blink 1s infinite ease-in-out; }
.loading i:nth-child(2) { animation-delay: 0.15s; } .loading i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 100% { opacity: 0.2; transform: scale(0.8); } 50% { opacity: 1; transform: none; } }
.rep-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 12px; }
.rep-pick { display: grid; justify-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; color: #fff; font-size: 12.5px; font-weight: 700; text-align: center; }
.rep-pick svg { width: 28px; height: 28px; }
.field input { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; outline: 0; }
.field input:focus { border-color: var(--accent); }
.field { margin-bottom: 10px; }
.err { color: var(--bad); font-size: 14px; margin: 0 0 10px; }
.signin { margin-top: 12px; }

/* driving */
.nav-top { position: absolute; left: 10px; right: 10px; top: calc(env(safe-area-inset-top) + 10px); z-index: 12; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: #0b7f8c; color: #fff; box-shadow: var(--shadow); max-width: 560px; }
.nav-top .turn svg.big { width: 44px; height: 44px; stroke-width: 2.4; }
.nav-top .what { display: grid; gap: 2px; min-width: 0; }
.nav-top b { font-family: var(--display); font-size: 26px; }
.nav-top span { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.nav-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 12; display: flex; align-items: center; gap: 8px; padding: 12px 14px calc(env(safe-area-inset-bottom) + 12px); background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35); }
.nav-bottom .eta { flex: 1; display: grid; }
.nav-bottom .eta b { font-family: var(--display); font-size: 24px; color: var(--ok); }
.nav-bottom .eta span { color: var(--text-2); font-size: 14px; }
.nav-bottom .btn.danger { background: rgba(242, 86, 110, 0.15); }
@media (min-width: 900px) { .nav-bottom { left: 12px; right: auto; width: 420px; bottom: 12px; border-radius: 18px; } }
