* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: linear-gradient(165deg, #f5f3ff 0%, #faf5ff 45%, #ede9fe 100%);
  color: #1e1b4b;
  line-height: 1.5;
  font-size: 14px;
}

html.pwa-standalone body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

html.pwa-standalone .btn-install,
html.pwa-standalone .rplaces-pwa-install {
  display: none !important;
}

html.native-app .btn-install,
html.native-app .mode-switch,
html.native-app .native-hide {
  display: none !important;
}

html.native-app body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Phone APK: list on top, map/register block below — one scroll */
html.native-app.native-combined-layout #viewList.layout {
  display: block;
  overflow-y: auto;
  max-height: calc(100dvh - 118px - env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
html.native-app.native-combined-layout .panel-list,
html.native-app.native-combined-layout .panel-main,
html.native-app.native-combined-layout .panel-note {
  display: block !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
}
html.native-app.native-combined-layout .list-detail-host {
  --list-card-slot: 148px;
  flex: 0 1 auto;
  max-height: calc(var(--list-card-slot) * 3 + 4px);
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0;
}
html.native-app.native-combined-layout .note-header {
  display: none !important;
}
html.native-app.native-combined-layout .panel-main {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
html.native-app.native-combined-layout .panel-main .note-section:first-child {
  padding: 0 0 6px;
}
html.native-app.native-combined-layout .panel-main .note-section:first-child .note-section-title {
  margin: 0 0 4px;
}
html.native-app.native-combined-layout .map-toolbar {
  margin: 0 0 2px;
}
html.native-app.native-combined-layout .panel-list {
  min-height: 0 !important;
  flex: 0 0 auto;
}
html.native-app .native-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 8px 10px;
  margin: 0 0 8px;
  background: #ede9fe;
  border: 1px solid #c4b5fd;
  border-radius: 10px;
  max-height: 88px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
html.native-app .native-quick-list.hidden { display: none !important; }
html.native-app .native-quick-item {
  border: 1px solid #c4b5fd;
  background: #fff;
  color: #5b21b6;
  border-radius: 999px;
  padding: 3px 8px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
}
html.native-app .native-quick-item-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
html.native-app .btn-back-list {
  width: 100%;
  margin-bottom: 10px;
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
  color: #4c1d95;
  font-weight: 700;
}

.app { max-width: 1280px; margin: 0 auto; padding: 20px 14px 48px; }

.app-update-banner {
  position: sticky;
  top: 0;
  z-index: 9000;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}
.app-update-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.app-update-text {
  margin: 0;
  font-size: 0.88rem;
  color: #92400e;
  line-height: 1.4;
}
.app-update-text strong { color: #b45309; }
.app-update-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #a16207;
}
.app-update-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-update {
  background: #d97706;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.btn-update-later {
  background: transparent;
  color: #92400e;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
html.native-app .app-update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  margin: 0;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
}

html.native-app body.has-update-banner .app {
  padding-top: calc(64px + env(safe-area-inset-top, 0px));
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7c3aed;
}

h1 { margin: 0; font-size: 1.65rem; font-weight: 800; color: #4c1d95; }
.sub { margin: 8px 0 0; color: #5b5675; max-width: 40rem; font-size: 0.92rem; }

.header-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.mode-switch {
  display: flex;
  border: 1px solid #c4b5fd;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.btn-mode {
  border: none;
  background: transparent;
  color: #5b5675;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
}
.btn-mode.is-active {
  background: #7c3aed;
  color: #fff;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}
.alert-info {
  background: #ede9fe;
  border: 1px solid #c4b5fd;
  color: #4c1d95;
}

.view-panel.hidden { display: none !important; }

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .map { height: 320px !important; }
  .map-overview { height: 55vh !important; min-height: 280px; }
  .panel-list { max-height: none; min-height: 120px; }
  .site-list { min-height: 72px; max-height: 40vh; }
  html.native-app .panel-list { min-height: 50vh; }
  html.native-app .site-list { max-height: none !important; min-height: 220px; }
}

.panel {
  background: #fff;
  border: 1px solid #ddd6fe;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(76, 29, 149, 0.06);
}

.panel-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid #ede9fe;
}
.panel-head h2 { margin: 0 0 10px; font-size: 1rem; color: #4c1d95; }

.list-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px 10px;
  align-items: end;
}
.list-filter-grid .field { margin: 0; min-width: 0; }
.list-filter-grid .field span {
  font-size: 0.68rem;
  margin-bottom: 3px;
}
.list-filter-grid input,
.list-filter-grid select {
  font-size: 0.82rem;
  padding: 7px 9px;
}

html.native-app .panel-head-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 8px;
}
html.native-app .panel-head-row h2 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.82rem;
  white-space: nowrap;
  padding-bottom: 22px;
}
html.native-app .panel-head-row .list-filter-grid {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 900px) {
  .panel-head-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 8px;
  }
  .panel-head-row h2 {
    flex: 0 0 auto;
    margin: 0;
    font-size: 0.82rem;
    white-space: nowrap;
    padding-bottom: 22px;
  }
  .panel-head-row .list-filter-grid {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.panel-list { max-height: calc(100vh - 140px); display: flex; flex-direction: column; }

.site-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow: auto;
  flex: 1;
}

.site-item {
  padding: 10px 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 6px;
}
.site-item:hover { background: #f5f3ff; }
.site-item.active {
  background: #ede9fe;
  border-color: #a78bfa;
}

.site-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.site-item strong { font-size: 0.95rem; display: block; }
.site-cat {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7c3aed;
  white-space: nowrap;
}
.site-addr { display: block; color: #64748b; font-size: 0.82rem; margin-top: 3px; }
.site-meta { display: block; color: #94a3b8; font-size: 0.74rem; margin-top: 4px; }

.site-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.site-empty { padding: 20px 12px; color: #64748b; text-align: center; font-size: 0.9rem; }

.panel-main { padding: 14px; }

.site-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field-wide { grid-column: 1 / -1; }

.lookup-field { position: relative; }
.lookup-field span small {
  font-weight: 500;
  color: #8b85a8;
}
.lookup-results {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  border: 1px solid #e2ddf5;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(76, 29, 149, 0.12);
  max-height: 220px;
  overflow-y: auto;
  z-index: 20;
}
.lookup-results li {
  padding: 10px 12px;
  border-bottom: 1px solid #f1edf9;
  cursor: pointer;
  font-size: 0.88rem;
}
.lookup-results li:last-child { border-bottom: 0; }
.lookup-results li:hover { background: #f5f3ff; }
.lookup-results .lookup-name {
  display: block;
  font-weight: 600;
  color: #312e81;
}
.lookup-results .lookup-addr {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

.field span, .filter-cat span {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: #5b5675;
  margin-bottom: 4px;
}
.field span em { color: #dc2626; font-style: normal; }

.field input,
.field select,
#siteSearchName,
.panel-head-row #siteSearch,
.panel-head-row #filterCategory {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.field input:focus,
.field select:focus,
#siteSearchName:focus,
.panel-head-row #siteSearch:focus,
.panel-head-row #filterCategory:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.field input[readonly] { background: #faf5ff; color: #334155; }

.field-pin {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field-pin input[type="checkbox"] {
  width: auto;
  accent-color: #7c3aed;
  transform: scale(1.15);
  margin: 4px 0 0;
}
.field-pin-hint {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 400;
  line-height: 1.3;
}

.filter-cat { display: block; margin-top: 0; }

.form-hint {
  margin: 10px 0 8px;
  font-size: 0.82rem;
  color: #64748b;
}

.map {
  width: 100%;
  height: 380px;
  border-radius: 12px;
  border: 1px solid #c4b5fd;
  background: #e2e8f0;
  z-index: 0;
}

.map-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 6px 0 8px;
}

.btn-locate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #f8fbff 0%, #dbeafe 52%, #bfdbfe 100%);
  color: #1d4ed8;
  border: 1px solid #93c5fd;
  border-top-color: #e0f2fe;
  border-bottom-color: #60a5fa;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 2px 0 #93c5fd,
    0 3px 8px rgba(29, 78, 216, 0.2);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}

.btn-locate .mp-icon-slot {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5));
}

.btn-locate:hover {
  background: linear-gradient(180deg, #fff 0%, #dbeafe 48%, #93c5fd 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 2px 0 #60a5fa,
    0 4px 10px rgba(29, 78, 216, 0.26);
}

.btn-locate:active {
  background: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 100%);
  border-top-color: #93c5fd;
  border-bottom-color: #3b82f6;
  box-shadow:
    inset 0 2px 4px rgba(29, 78, 216, 0.22),
    0 1px 2px rgba(15, 23, 42, 0.08);
  transform: translateY(2px);
}

.btn-locate:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.locate-readout {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.locate-readout.is-coarse {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}
.field input.coord-updated {
  background: #fef9c3;
  border-color: #facc15;
}

.place-media { margin-top: 12px; }
.place-media-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.btn-media {
  border: 1px solid #c4b5fd;
  color: #4c1d95;
  font-weight: 600;
}
.btn-media-camera { background: #f5f3ff; }
.btn-media-video { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }
.btn-media-gallery { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.btn-media:disabled { opacity: 0.45; cursor: not-allowed; }
.place-media-hint {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: #64748b;
}
.place-media-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 8px;
}
.place-media-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 88px;
  cursor: pointer;
}
.place-media-thumb {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #ddd6fe;
  background: #f8fafc;
}
.place-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.place-media-time {
  margin-top: 3px;
  max-width: 100%;
  font-size: 0.58rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #94a3b8;
  text-align: center;
  white-space: nowrap;
  transform: scale(0.92);
  transform-origin: center top;
}
.place-media-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 6px;
}
.rplaces-cam-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom);
}
.rplaces-cam-top {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  justify-content: center;
}
.rplaces-cam-mode {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
}
.rplaces-cam-mode.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
}
.rplaces-cam-stage {
  position: relative;
  width: 100%;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rplaces-cam-stage video {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}
.rplaces-cam-shutter {
  position: absolute;
  bottom: 18px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #ef4444;
  color: #fff;
  font-size: 1.2rem;
}
.rplaces-cam-shutter.is-video {
  background: #dc2626;
}
.rplaces-cam-shutter.is-recording {
  border-radius: 12px;
  background: #f59e0b;
}
.rplaces-cam-rec-hint {
  position: absolute;
  bottom: 92px;
  margin: 0;
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 700;
}
.rplaces-cam-cancel {
  background: #334155;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
}

body.rplaces-media-view-open {
  overflow: hidden;
}
.rplaces-media-viewer {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 42, 0.96);
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.rplaces-media-viewer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 10px 12px;
}
.rplaces-media-viewer-delete {
  margin-left: auto;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rplaces-media-viewer-delete .icon {
  color: #fff;
}
.rplaces-media-viewer-delete:active {
  background: #dc2626;
}
.rplaces-media-viewer-back {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
.rplaces-media-viewer-back:active {
  background: rgba(255, 255, 255, 0.22);
}
.rplaces-media-viewer-when {
  font-size: 0.72rem;
  color: #94a3b8;
}
.rplaces-media-viewer-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px 12px 16px;
}
.place-media-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.4rem;
  color: #94a3b8;
  background: #1e293b;
}
.rplaces-media-viewer-stage {
  touch-action: none;
  overflow: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rplaces-media-viewer-img-zoom {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.05s linear;
}
.rplaces-media-viewer-img,
.rplaces-media-viewer-video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.rplaces-media-viewer-video {
  width: 100%;
  background: #000;
}

.rplaces-media-viewer-doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-height: 100%;
  color: #e2e8f0;
  text-align: center;
}

.rplaces-media-viewer-doc-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  word-break: break-all;
}

.rplaces-media-viewer-doc-icon .icon {
  color: #94a3b8;
}

.rplaces-media-viewer-pdf {
  width: 100%;
  height: min(70vh, 560px);
  border: none;
  border-radius: 8px;
  background: #fff;
}

.rplaces-media-viewer-open {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}

.rplaces-capture-sheet {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.rplaces-capture-sheet-panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px 16px 14px 14px;
  padding: 14px 14px 10px;
  box-shadow: 0 12px 40px rgba(76, 29, 149, 0.22);
}
.rplaces-capture-sheet-title {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #4c1d95;
  text-align: center;
}
.rplaces-capture-option {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  background: #faf5ff;
  color: #4c1d95;
  cursor: pointer;
}
.rplaces-capture-option.is-primary {
  border-color: #7c3aed;
  background: #f5f3ff;
}
.rplaces-capture-option small {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
}
.rplaces-capture-cancel {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
  text-align: center;
}

.travel-templates {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0 0;
}
.travel-templates-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #5b21b6;
}
.travel-templates-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.btn-template {
  background: #faf5ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-template:hover { background: #ede9fe; }

.route-day-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  margin-bottom: 10px;
}
.route-day-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #5b21b6;
}
.route-day-label select {
  min-width: 220px;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
  color: #4c1d95;
}
.route-day-hint {
  margin: 0;
  flex: 1 1 200px;
  font-size: 0.78rem;
  color: #64748b;
}

.btn-share-meet {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}
.share-meet-hint { margin: 6px 0 0; font-size: 0.78rem; color: #64748b; }

.map-overview { height: calc(100vh - 260px); min-height: 360px; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}
.btn-primary { background: #7c3aed; color: #fff; }
.btn-primary:hover { background: #6d28d9; }
.btn-tab { background: #ede9fe; color: #5b21b6; }
.btn-tab.is-active { background: #7c3aed; color: #fff; }
.btn-tab:hover:not(.is-active) { background: #ddd6fe; }
.btn-maps { background: #dbeafe; color: #1d4ed8; }
.btn-maps:hover { background: #bfdbfe; }
.btn-nav { background: #dcfce7; color: #15803d; }
.btn-nav:hover { background: #bbf7d0; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-danger:hover { background: #fecaca; }
.btn-install { background: #fff; color: #6d28d9; border: 1px solid #c4b5fd; }
.btn-install:hover { background: #f5f3ff; }
.btn-sm { padding: 6px 10px; font-size: 0.78rem; }

.hidden { display: none !important; }

.form-status {
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: 0.88rem;
}
.form-status.ok { color: #15803d; }
.form-status.err { color: #b91c1c; }

.leaflet-popup-content { font-size: 0.88rem; margin: 10px 12px; }
.popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.rplaces-pwa-install {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 27, 75, 0.94);
  color: #f5f3ff;
  box-shadow: 0 8px 32px rgba(76, 29, 149, 0.35);
}
.rplaces-pwa-install-text {
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.35;
}
.rplaces-pwa-install-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  background: #7c3aed;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.rplaces-pwa-install-dismiss {
  border: none;
  background: transparent;
  color: #c4b5fd;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.app-credit {
  margin-top: 24px;
  padding: 14px 0 calc(10px + env(safe-area-inset-bottom));
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.app-version {
  font-size: 0.65rem;
  color: var(--text-muted, #8a8983);
  font-weight: 600;
  letter-spacing: 0.04em;
  user-select: none;
}
.app-credit-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary, #5f5e5a);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.app-credit-link:hover {
  color: #7c3aed;
}
.app-credit-logo {
  display: block;
  height: 24px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}
html.pwa-standalone .app-credit {
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
