:root {
  --bg: #0d120f;
  --panel: rgba(20, 28, 23, 0.94);
  --panel-soft: rgba(25, 35, 29, 0.86);
  --line: rgba(255,255,255,0.10);
  --text: #f4f7f4;
  --muted: #9aa89f;
  --green: #b8ff5a;
  --green-dark: #88c935;
  --danger: #ff6b72;
  --warning: #ffd66b;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.topbar { position: fixed; z-index: 1000; top: 0; left: 0; right: 0; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 28px; background: linear-gradient(to bottom, rgba(8,13,10,.98), rgba(8,13,10,.94)); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--green); color: #17200f; font-weight: 900; transform: skew(-7deg); }
.navlinks { display: flex; align-items: center; gap: 20px; color: #d8dfda; font-size: 14px; }
.navlinks > a:hover, .nav-button:hover { color: white; }
.nav-cta { padding: 10px 14px; border-radius: 999px; background: var(--green); color: #182112 !important; font-weight: 750; }
.inline-form { display: inline; margin: 0; }
.nav-button { border: 0; background: transparent; color: #d8dfda; cursor: pointer; padding: 0; }
.mobile-nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.045); color: var(--text); cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.mobile-nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 999px; background: currentColor; transition: transform .18s ease, opacity .18s ease; }
.mobile-nav-open .mobile-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-nav-open .mobile-nav-toggle span:nth-child(2) { opacity: 0; }
.mobile-nav-open .mobile-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.page-shell { min-height: 100vh; padding-top: 70px; }
.home-shell, .editor-shell, .detail-shell { padding-top: 0; }
.content-wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.world-map { position: fixed; inset: 0; z-index: 0; background: #1a221d; contain: layout paint; }
.map-street-tiles { image-rendering: auto; }
.map-satellite-tiles { image-rendering: auto; }
.world-map .leaflet-top, .editor-map .leaflet-top, .detail-map .leaflet-top { top: 72px; }
.leaflet-control-layers { background: rgba(13,18,15,.9) !important; color: var(--text); border: 1px solid var(--line) !important; }
.leaflet-control-attribution { background: rgba(10,15,12,.76) !important; color: #a9b2ac !important; }
.leaflet-control-attribution a { color: #d6ded8 !important; }
.maptiler-logo { display: block; margin: 0 0 4px 8px !important; padding: 4px 6px; border-radius: 7px; background: rgba(255,255,255,.88); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.maptiler-logo img { display: block; width: 76px; height: auto; }
.hero-panel { position: fixed; z-index: 600; left: clamp(20px, 5vw, 72px); bottom: clamp(30px, 8vh, 90px); width: min(510px, calc(100vw - 40px)); padding: 28px; border: 1px solid var(--line); border-radius: 26px; background: rgba(13,18,15,.95); box-shadow: 0 24px 70px rgba(0,0,0,.34); }
.hero-panel h1 { font-size: clamp(42px, 6vw, 76px); line-height: .93; letter-spacing: -.055em; margin: 8px 0 18px; }
.hero-panel p { max-width: 48ch; color: #c0cbc3; line-height: 1.6; }
.eyebrow { color: var(--green); text-transform: uppercase; letter-spacing: .17em; font-size: 11px; font-weight: 800; margin: 0 0 8px; }
.hero-actions, .toolbar, .editor-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero-hint { color: var(--muted); font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 12px; font-weight: 750; cursor: pointer; transition: transform .12s ease, background .12s ease, border-color .12s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: #16200f; }
.button-primary:hover { background: #c7ff80; }
.button-ghost { background: rgba(255,255,255,.055); color: var(--text); border-color: var(--line); }
.button-danger { background: rgba(255,107,114,.12); color: #ff9ba0; border-color: rgba(255,107,114,.3); }
.button-small { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.full { width: 100%; }
.map-status { position: fixed; right: 18px; bottom: 18px; z-index: 650; padding: 9px 12px; border-radius: 999px; background: rgba(13,18,15,.94); border: 1px solid var(--line); color: #bcc6bf; font-size: 12px; }
.rideout-dot-wrap { background: transparent !important; border: 0 !important; }
.rideout-dot { display: block; width: 16px; height: 16px; margin: 4px; border-radius: 50%; background: var(--green); border: 3px solid #15200e; box-shadow: 0 0 0 4px rgba(184,255,90,.24), 0 4px 18px rgba(0,0,0,.45); }
.map-popup-button { display: block; margin-top: 10px; padding: 8px 10px; text-align: center; background: #1c291f; border-radius: 8px; color: #315014 !important; background: var(--green); font-weight: 800; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #131b16; color: var(--text); }
.center-card { width: min(520px, calc(100% - 40px)); margin: 80px auto; padding: 32px; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 20px 70px rgba(0,0,0,.25); }
.center-card h1, .page-head h1, .dashboard-head h1 { margin: 0 0 22px; font-size: clamp(34px,5vw,52px); letter-spacing: -.045em; }
.stack-form { display: grid; gap: 16px; }
.stack-form.compact { gap: 12px; }
.stack-form label, fieldset { display: grid; gap: 7px; color: #c9d1cb; font-size: 13px; font-weight: 650; }
input, textarea, select { width: 100%; color: var(--text); background: rgba(255,255,255,.055); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: rgba(184,255,90,.6); box-shadow: 0 0 0 3px rgba(184,255,90,.08); }
select { color-scheme: dark; }
select option { background: #131b16; color: var(--text); }
textarea { resize: vertical; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { margin-bottom: 8px; }
.check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.check { display: flex !important; align-items: center; gap: 8px !important; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.check input { width: auto; }
.field-help, .small { font-size: 12px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.flash-stack { position: fixed; z-index: 1500; top: 82px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); display: grid; gap: 8px; }
.flash { padding: 12px 15px; background: #1d2720; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.flash-error { border-color: rgba(255,107,114,.4); }
.flash-success { border-color: rgba(184,255,90,.35); }
.editor-layout, .detail-grid { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) min(420px, 38vw); }
.editor-map, .detail-map { min-height: 100vh; background: #19221c; }
.editor-panel, .detail-panel { position: relative; z-index: 600; padding: 105px 28px 35px; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; max-height: 100vh; }
.editor-panel h1, .detail-panel h1 { font-size: clamp(32px,4vw,50px); letter-spacing: -.045em; line-height: 1; margin: 4px 0 16px; }
.route-readout { display: flex; justify-content: space-between; padding: 10px 0 14px; color: var(--muted); font-size: 12px; }
.route-source-picker { display: grid; gap: 6px; margin: 14px 0 10px; }
.copy-source-note, .cancelled-note { margin: 10px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.035); color: var(--muted); font-size: 13px; }
.cancelled-note { border-color: rgba(255,179,71,.28); color: #e4c48b; }
.badge-row, .detail-links { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.detail-links { justify-content: flex-end; }
.route-line { stroke: var(--green); }
.route-detail-line { stroke: var(--green) !important; }
.route-preview-line { stroke: var(--green) !important; }
.rideout-radius { stroke: rgba(210,219,212,.72); fill: rgba(180,192,183,.09); stroke-dasharray: 7 7; }
.route-point-icon { background: transparent !important; border: 0 !important; }
.route-point-icon span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #182019; border: 2px solid #d9e1db; color: white; font-size: 10px; font-weight: 800; box-shadow: 0 3px 14px rgba(0,0,0,.35); }
.route-point-icon .start { border-color: var(--green); color: var(--green); }
.route-point-icon .end { border-color: #ff8c83; color: #ffb0a9; }
.detail-topline { display: flex; align-items: center; justify-content: space-between; }
.badge { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 999px; background: rgba(184,255,90,.09); border: 1px solid rgba(184,255,90,.18); color: #d8ffac; font-size: 11px; font-weight: 750; }
.badge-warn { color: #ffe7a9; background: rgba(255,214,107,.1); border-color: rgba(255,214,107,.25); }
.meta-block { display: grid; gap: 7px; color: var(--muted); margin: 20px 0; }
.meta-block strong { color: var(--text); font-size: 18px; }
.description { color: #d5ddd7; line-height: 1.65; white-space: pre-wrap; }
.action-stack { margin-top: 24px; display: grid; gap: 10px; }
.attention-card { display: grid; gap: 9px; padding: 16px; border: 1px solid rgba(255,214,107,.25); background: rgba(255,214,107,.06); border-radius: 14px; }
.page-head, .dashboard-head { padding-top: 62px; padding-bottom: 26px; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.page-head p { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding-bottom: 60px; }
.feature-card, .panel, .stat-card { background: var(--panel-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.feature-card { padding: 20px; min-height: 190px; transition: transform .15s ease, border-color .15s ease; }
.feature-card:hover { transform: translateY(-3px); border-color: rgba(184,255,90,.3); }
.feature-card h2 { margin: 7px 0 10px; letter-spacing: -.03em; }
.feature-card p { color: #b5c0b8; line-height: 1.5; }
.card-kicker { color: var(--green); font-size: 11px; font-weight: 750; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding-bottom: 60px; }
.panel { padding: 20px; }
.panel h2 { margin-top: 0; }
.span-2 { grid-column: span 2; }
.list-stack { display: grid; }
.list-row { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.list-row > div { display: grid; gap: 4px; }
.compact-link { display: block; padding: 10px 0; border-top: 1px solid var(--line); color: #d7dfd9; }
.empty { color: var(--muted); }
.group-layout { padding-top: 58px; padding-bottom: 60px; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 16px; }
.small-map { min-height: 280px; border-radius: 14px; overflow: hidden; margin: 18px 0; background: rgba(255,255,255,.035); }
.city-area-label { min-height: 280px; display: grid; place-items: center; color: #dce4de; font-size: 22px; font-weight: 800; background: radial-gradient(circle at center, rgba(184,255,90,.12), transparent 60%); }
.area-shape { stroke: var(--green); fill: var(--green); fill-opacity: .1; }
.chat-panel { display: flex; flex-direction: column; min-height: 600px; }
.chat-log { display: flex; flex-direction: column; gap: 10px; flex: 1; max-height: 520px; overflow-y: auto; padding-right: 5px; }
.chat-message { padding: 11px 12px; background: rgba(255,255,255,.035); border-radius: 12px; }
.chat-message > div { display: flex; justify-content: space-between; gap: 10px; }
.chat-message time { color: var(--muted); font-size: 10px; }
.chat-message p { margin: 7px 0 0; white-space: pre-wrap; line-height: 1.45; }
.chat-form { display: grid; gap: 9px; margin-top: 14px; }
.compact-captcha { transform-origin: left top; }
.rating-form { margin-top: 25px; }
.error-card { text-align: center; }
.error-code { display: block; color: var(--green); font-size: 70px; font-weight: 900; letter-spacing: -.06em; }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.stat-card { padding: 18px; display: grid; gap: 8px; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { font-size: 34px; }
.table-wrap { overflow-x: auto; padding-bottom: 60px; }
table { width: 100%; border-collapse: collapse; background: var(--panel-soft); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
td { font-size: 13px; }
.table-actions { display: flex; gap: 7px; }
.search-form { display: flex; gap: 8px; }
.admin-body { background: #0c110e; }
.admin-shell { padding-top: 70px; }

.brand-cluster { display: flex; align-items: center; gap: 14px; min-width: 0; }
.back-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 7px 9px; border-radius: 9px; font-size: 13px; }
.back-button:hover { color: var(--text); background: rgba(255,255,255,.05); }
.rideout-preview-tooltip { background: rgba(13,18,15,.94) !important; border: 1px solid var(--line) !important; color: var(--text) !important; box-shadow: 0 12px 28px rgba(0,0,0,.4) !important; }
.rideout-preview-tooltip::before { border-top-color: rgba(13,18,15,.94) !important; }
.rideout-preview-tooltip span { color: #bbc6be; font-size: 11px; }
.rideouts-drawer { position: fixed; z-index: 700; top: 70px; right: 0; bottom: 0; width: min(50vw, 720px); transform: translateX(100%); transition: transform .34s cubic-bezier(.2,.8,.2,1); background: rgba(13,18,15,.985); border-left: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.rideouts-open .rideouts-drawer { transform: translateX(0); }
.home-shell .world-map { transition: right .34s cubic-bezier(.2,.8,.2,1); }
.home-shell.rideouts-open .world-map { right: min(50vw, 720px); }
.home-shell.rideouts-open .map-status { right: calc(min(50vw, 720px) + 18px); }
.home-shell.rideouts-open .hero-panel { opacity: 0; pointer-events: none; transform: translateX(-24px); }
.hero-panel { transition: opacity .22s ease, transform .22s ease; }
.hero-panel.is-dismissed { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(18px); }
.rideouts-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 24px 10px; }
.rideouts-drawer-head h2 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.drawer-close { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.05); color: var(--text); cursor: pointer; font-size: 25px; }
.rideout-search { display: grid; gap: 7px; padding: 8px 24px 14px; color: var(--muted); font-size: 12px; font-weight: 700; }
.home-area-note { margin: 0 24px 10px; padding: 10px 12px; border: 1px solid rgba(184,255,90,.18); border-radius: 11px; background: rgba(184,255,90,.06); color: #d9e6dc; font-size: 12px; }
.rideouts-list { overflow-y: auto; padding: 4px 16px 28px; display: grid; align-content: start; gap: 8px; }
.rideout-list-card { display: grid; gap: 6px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.rideout-list-card:hover, .rideout-list-card:focus { border-color: rgba(184,255,90,.38); background: rgba(184,255,90,.045); transform: translateX(-2px); outline: none; }
.rideout-list-card.is-past { opacity: .68; }
.rideout-list-card.is-home { border-color: rgba(184,255,90,.22); }
.rideout-list-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rideout-list-title strong { font-size: 16px; }
.rideout-list-region { color: #c7d1ca; font-size: 12px; }
.rideout-list-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.rideout-list-card time { color: #dce3de; font-size: 12px; }
.badge-muted { color: #c8d0ca; background: rgba(255,255,255,.06); border-color: var(--line); }
.input-action-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
.region-picker { display: grid; gap: 7px; }
.region-results { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.region-result { width: 100%; display: grid; gap: 3px; text-align: left; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.035); color: var(--text); cursor: pointer; }
.region-result:hover, .region-result:focus { border-color: rgba(184,255,90,.4); background: rgba(184,255,90,.05); outline: none; }
.region-result span, .region-selected { color: var(--muted); font-size: 11px; }
.error-text { color: #ff9ba0; }
.home-area-circle { stroke: var(--green); fill: var(--green); fill-opacity: .08; stroke-dasharray: 7 7; }
.star-rating { display: grid; gap: 7px; }
.star-rating-row { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; width: fit-content; gap: 2px; }
.star-rating input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.star-rating label { font-size: 34px; line-height: 1; color: #4d5750; cursor: pointer; transition: color .12s ease, transform .12s ease; }
.star-rating label:hover, .star-rating label:hover ~ label, .star-rating input:checked ~ label { color: #ffd66b; }
.star-rating label:hover { transform: translateY(-1px) scale(1.06); }
.star-rating input:focus-visible + label { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.boundary-hit-line { cursor: grab; }

@media (max-width: 900px) {
  .topbar { gap: 12px; }
  .mobile-nav-toggle { display: inline-flex; flex: 0 0 auto; }
  .navlinks { position: absolute; top: calc(100% + 8px); right: 14px; width: min(330px, calc(100vw - 28px)); padding: 10px; display: grid; gap: 5px; background: rgba(13,18,15,.98); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 55px rgba(0,0,0,.42); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px) scale(.98); transform-origin: top right; transition: opacity .16s ease, transform .16s ease, visibility .16s; }
  .mobile-nav-open .navlinks { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
  .navlinks > a, .navlinks .inline-form { display: block; width: 100%; }
  .navlinks > a { padding: 12px 13px; border-radius: 10px; }
  .navlinks > a:hover, .navlinks > a:focus { background: rgba(255,255,255,.055); outline: none; }
  .navlinks .nav-cta { border-radius: 10px; text-align: center; }
  .navlinks .nav-button { width: 100%; padding: 12px 13px; text-align: left; border-radius: 10px; }
  .navlinks .nav-button:hover, .navlinks .nav-button:focus { background: rgba(255,255,255,.055); outline: none; }
  .rideouts-drawer { width: min(72vw, 620px); }
  .home-shell.rideouts-open .world-map { right: min(72vw, 620px); }
  .home-shell.rideouts-open .map-status { right: calc(min(72vw, 620px) + 18px); }
  .editor-layout, .detail-grid { grid-template-columns: 1fr; }
  .editor-map, .detail-map { min-height: 52vh; height: 52vh; }
  .editor-panel, .detail-panel { padding: 26px 20px 45px; max-height: none; border-left: 0; border-top: 1px solid var(--line); }
  .card-grid, .dashboard-grid, .group-layout { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .topbar { padding: 0 12px; }
  .brand-cluster { gap: 7px; min-width: 0; }
  .back-button { padding-inline: 4px; white-space: nowrap; }
  .rideouts-drawer { width: 100vw; }
  .home-shell.rideouts-open .world-map { right: 0; }
  .home-shell.rideouts-open .map-status { left: 12px; right: auto; }
  .input-action-row { grid-template-columns: 1fr; }
  .brand span:last-child { display: none; }
  .navlinks { gap: 10px; }
  .hero-panel { left: 12px; bottom: 54px; width: calc(100vw - 24px); padding: 20px; }
  .hero-panel h1 { font-size: 46px; }
  .map-status { left: 12px; right: auto; bottom: 12px; }
  .content-wrap { width: min(100% - 24px, 1180px); }
  .page-head, .dashboard-head { align-items: start; flex-direction: column; padding-top: 38px; }
  .check-grid { grid-template-columns: 1fr; }
  .table-actions { flex-direction: column; }
}

/* Map interaction performance and user-location control. */
/* Leaflet already promotes/transforms its panes. Extra will-change hints can force
   additional compositor surfaces and hurt low-power/mobile GPUs. */
.world-map.map-fast-interaction .leaflet-overlay-pane,
.world-map.map-fast-interaction .leaflet-tooltip-pane { visibility: hidden; }
.rideout-location-control { margin-bottom: 10px !important; }
.rideout-location-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #131b16;
  color: #eef5ef;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.rideout-location-button:hover, .rideout-location-button:focus-visible { background: #1c2820; outline: none; }
.rideout-location-button.is-loading { color: var(--warning); }
.rideout-location-button.is-active { color: var(--green); }
.rideout-location-button.is-error { color: #ff9ba0; }
.user-location-marker { background: transparent !important; border: 0 !important; }
.user-location-marker span {
  display: block;
  width: 16px;
  height: 16px;
  margin: 4px;
  border-radius: 50%;
  background: #66aaff;
  border: 3px solid white;
  box-shadow: 0 0 0 5px rgba(102,170,255,.24), 0 3px 12px rgba(0,0,0,.35);
}
.user-location-accuracy { stroke: rgba(102,170,255,.75); fill: #66aaff; fill-opacity: .09; }
.mobile-sheet-handle { display: none; }
.mobile-sheet-body { min-width: 0; }

@media (max-width: 760px) {
  .editor-layout, .detail-grid {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }
  .editor-map, .detail-map {
    position: fixed;
    inset: 70px 0 0;
    width: 100%;
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    min-height: 0;
  }
  .editor-map .leaflet-bottom.leaflet-right,
  .detail-map .leaflet-bottom.leaflet-right { bottom: 62px; }

  .editor-panel.mobile-bottom-sheet,
  .detail-panel.mobile-bottom-sheet {
    --sheet-peek: 58px;
    position: fixed;
    z-index: 850;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(80vh, 760px);
    max-height: min(80dvh, 760px);
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: rgba(18,25,20,.985);
    box-shadow: 0 -16px 50px rgba(0,0,0,.32);
    transform: translateY(calc(100% - var(--sheet-peek)));
    transition: transform .28s cubic-bezier(.22,.8,.25,1);
  }
  .editor-panel.mobile-bottom-sheet.is-open,
  .detail-panel.mobile-bottom-sheet.is-open { transform: translateY(0); }
  .mobile-bottom-sheet.is-dragging,
  .mobile-bottom-sheet.no-sheet-transition { transition: none !important; }
  .mobile-bottom-sheet.is-dragging { will-change: transform; }
  .mobile-bottom-sheet:not(.is-open):not(.is-dragging) .mobile-sheet-body { visibility: hidden; }
  .mobile-sheet-handle {
    display: flex;
    width: 100%;
    height: var(--sheet-peek);
    align-items: flex-start;
    justify-content: center;
    padding: 11px 0 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: ns-resize;
    touch-action: none;
  }
  .mobile-sheet-handle span {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(235,242,237,.4);
  }
  .mobile-sheet-handle:focus-visible { outline: 2px solid var(--green); outline-offset: -5px; }
  .mobile-sheet-body {
    display: block;
    max-height: calc(min(80vh, 760px) - var(--sheet-peek));
    max-height: calc(min(80dvh, 760px) - var(--sheet-peek));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 18px 28px;
  }
  .mobile-sheet-body > .eyebrow:first-child { margin-top: 2px; }
  .mobile-bottom-sheet .detail-topline { align-items: flex-start; }
}

@media (max-width: 360px) {
  .mobile-bottom-sheet .g-recaptcha { transform: scale(.88); transform-origin: left top; margin-bottom: -8px; }
}

/* Home/discovery map: MapLibre WebGL rendering. Editors/detail maps remain Leaflet. */
.world-map .maplibregl-canvas { outline: none; }
.world-map .maplibregl-ctrl-top-right { top: 72px; }
.world-map .maplibregl-ctrl-bottom-right { bottom: 2px; }
.world-map .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(13,18,15,.94);
  box-shadow: 0 5px 18px rgba(0,0,0,.22);
}
.world-map .maplibregl-ctrl-group button { background-color: rgba(13,18,15,.94); }
.world-map .maplibregl-ctrl-group button:hover { background-color: #1c2820; }
.world-map .maplibregl-ctrl-icon { filter: invert(1) brightness(1.6); }
.world-map .maplibregl-ctrl-attrib {
  background: rgba(10,15,12,.78);
  color: #a9b2ac;
}
.world-map .maplibregl-ctrl-attrib a { color: #d6ded8; }
.rideout-layer-control { padding: 0 !important; }
.rideout-layer-control select {
  width: auto;
  min-width: 104px;
  min-height: 34px;
  padding: 6px 28px 6px 9px;
  border: 0;
  border-radius: 0;
  background: #131b16;
  color: var(--text);
  box-shadow: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.rideout-layer-control select:focus { box-shadow: inset 0 0 0 2px rgba(184,255,90,.45); }
.rideout-preview-popup .maplibregl-popup-content,
.world-map .maplibregl-popup-content {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13,18,15,.97);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0,0,0,.34);
}
.world-map .maplibregl-popup-tip { border-top-color: rgba(13,18,15,.97); }
.world-map .maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: rgba(13,18,15,.97); }
.world-map .maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: rgba(13,18,15,.97); }
.world-map .maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: rgba(13,18,15,.97); }
.world-map .maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: rgba(13,18,15,.97); }
.rideout-preview-tooltip-content { display: grid; gap: 3px; }
.rideout-preview-tooltip-content strong { margin-bottom: 2px; }
.rideout-preview-tooltip-content span { color: #bbc6be; font-size: 11px; line-height: 1.35; }
.world-map .maplibregl-user-location-dot { background-color: #66aaff; }
.world-map .maplibregl-user-location-accuracy-circle { background-color: rgba(102,170,255,.14); }

@media (max-width: 600px) {
  .world-map .maplibregl-ctrl-top-right { top: 72px; }
  .world-map .maplibregl-ctrl-bottom-right { bottom: 0; }
}
