* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* RunWell Clinic branding - light theme */
  --bg: #ffffff;
  --surface: #f8f9fa;
  --surface-2: #f0f2f4;
  --border: #e2e5e9;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --navy: #334264;
  --primary: #41AE9F;
  --primary-hover: #369e90;
  --highlight: #F5F35C;
  --highlight-soft: rgba(245, 243, 92, 0.25);
  --accent-orange: #fb923c;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --accent-green: #41AE9F;
  --accent-yellow: #F5F35C;
  --accent-cyan: #41AE9F;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 30px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
  text-decoration: none;
}

.logo img {
  height: 36px;
  width: auto;
}

.logo svg { flex-shrink: 0; }

nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: #ffffff;
  color: var(--navy);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-pro {
  position: relative;
}

.btn-icon {
  background: transparent;
  color: var(--primary);
  border: 1px dashed var(--border);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-icon:hover {
  background: rgba(65, 174, 159, 0.08);
  border-color: var(--primary);
}

/* Main layout - two-column: left (map + elevation) | right (race plan) */
main {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 56px);
}

#left-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 300px;
  overflow: hidden;
}

#map-container {
  flex: 1;
  position: relative;
  min-height: 100px;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

/* Runner info overlay */
.overlay-card {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  z-index: 800;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
}

.runner-info-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}

.runner-info-icon { font-size: 20px; }

#runner-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

#runner-details .detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

#runner-details .detail-value {
  color: var(--text);
  font-weight: 600;
}

/* Elevation panel (below map in left column) */

/* ─── Resize handles ──────────────────────────────── */

.resize-handle-h {
  height: 6px;
  background: var(--border);
  cursor: ns-resize;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  transition: background 0.15s;
}

.resize-handle-h::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: #b0b8c1;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.resize-handle-h:hover,
.resize-handle-h.dragging { background: var(--primary); }

.resize-handle-h:hover::after,
.resize-handle-h.dragging::after { opacity: 1; }

.resize-handle-v {
  width: 6px;
  background: var(--border);
  cursor: ew-resize;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  transition: background 0.15s;
  align-self: stretch;
}

.resize-handle-v::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 32px;
  border-radius: 2px;
  background: #b0b8c1;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.resize-handle-v:hover,
.resize-handle-v.dragging { background: var(--primary); }

.resize-handle-v:hover::after,
.resize-handle-v.dragging::after { opacity: 1; }

body.resizing { user-select: none; cursor: ns-resize; }
body.resizing-v { user-select: none; cursor: ew-resize; }

#elevation-panel {
  height: 220px;
  min-height: 80px;
  max-height: 50vh;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

#splits-panel {
  width: 440px;
  min-width: 320px;
  max-width: 55vw;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  flex-shrink: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.panel-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

/* Effort column - hidden by default, shown by JS for Coach plan */
.effort-col { display: none !important; }
.effort-col.show { display: table-cell !important; }
.effort-col.show.col-hidden { display: none !important; }


/* Bottom panel tabs (elevation / weather) */
.bottom-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.bottom-tab {
  background: transparent;
  border: none;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.bottom-tab:hover { color: var(--text); }
.bottom-tab.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Weather panel */
/* Weather year list (accordion) */
.weather-year-list {
  padding: 2px 0;
}
.weather-year-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--surface-2);
  cursor: pointer;
  font-size: 12px;
  transition: background 0.1s;
  border-radius: var(--radius-sm);
}
.weather-year-row:hover { background: var(--surface); }
.weather-year-row.expanded { background: var(--surface); }
.wyr-year { font-weight: 700; color: var(--navy); min-width: 36px; }
.wyr-temp { font-weight: 600; color: var(--text); min-width: 80px; }
.wyr-icon { font-size: 14px; }
.wyr-wind { color: var(--text-muted); font-size: 11px; flex: 1; }
.wyr-expand { color: var(--text-muted); font-size: 10px; margin-left: auto; }

.weather-year-detail {
  padding: 6px 8px 10px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.wyd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.wyd-item {
  text-align: center;
}
.wyd-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: block;
}
.wyd-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  display: block;
  margin-top: 1px;
}
.weather-summary {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.weather-summary-stat {
  text-align: center;
  flex: 1;
}
.weather-summary-stat .ws-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.weather-summary-stat .ws-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  margin-top: 2px;
}

.elevation-stats {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.elevation-stats span { white-space: nowrap; }

#elevation-chart-wrapper {
  flex: 1;
  position: relative;
  min-height: 0;
  cursor: crosshair;
}

#elevation-chart {
  width: 100% !important;
  height: 100% !important;
}

/* Splits list */
#splits-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#splits-list::-webkit-scrollbar { width: 5px; }
#splits-list::-webkit-scrollbar-track { background: transparent; }
#splits-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.split-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.split-item:hover { background: var(--surface); }

.split-item.active {
  background: rgba(65, 174, 159, 0.08);
  border-left: 3px solid var(--primary);
}

.split-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.split-icon.mile { background: rgba(51, 66, 100, 0.1); color: var(--navy); font-size: 11px; font-weight: 700; }
.split-icon.water { background: rgba(65, 174, 159, 0.1); color: var(--primary); }
.split-icon.nutrition { background: rgba(245, 243, 92, 0.3); color: #8a8700; }
.split-icon.pace { background: rgba(139, 92, 246, 0.1); color: var(--accent-purple); }
.split-icon.note { background: rgba(239, 68, 68, 0.1); color: var(--accent-red); }
.split-icon.town { background: rgba(65, 174, 159, 0.1); color: var(--primary); }
.split-icon.landmark { background: rgba(251, 146, 60, 0.1); color: var(--accent-orange); }
.split-icon.effort { background: rgba(251, 146, 60, 0.1); color: var(--accent-orange); }

.split-info { flex: 1; min-width: 0; }
.split-label { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-meta { font-size: 11px; color: var(--text-muted); }

.split-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--accent-red);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  transition: opacity 0.15s;
}
.split-item:hover .split-delete { opacity: 1; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.modal {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 400px;
  max-width: 92vw;
  box-shadow: var(--shadow-lg);
}

.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--navy); }

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-body label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.modal-body textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
}
.modal-body textarea:focus { border-color: var(--primary); }

.modal-body input,
.modal-body select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.modal-body input:focus,
.modal-body select:focus { border-color: var(--primary); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* Map markers */
.mile-marker {
  background: var(--navy);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: var(--shadow-sm);
}

.custom-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: var(--shadow-sm);
}

.custom-marker.nutrition { background: var(--highlight); color: #1a1a2e; }
.custom-marker.pace { background: var(--accent-purple); color: #fff; }
.custom-marker.note { background: var(--accent-red); color: #fff; }
.custom-marker.effort { background: var(--accent-orange); color: #1a1a2e; }
.custom-marker.water { background: var(--primary); color: #fff; }

.runner-marker {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  cursor: grab;
  transition: transform 0.1s;
}
.runner-marker:hover { transform: scale(1.2); }

.start-marker, .finish-marker {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.start-marker { background: var(--primary); color: #fff; }
.finish-marker { background: var(--navy); color: #fff; }

/* Leaflet popup overrides */
.leaflet-popup-content-wrapper {
  background: #fff !important;
  color: var(--text) !important;
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-lg) !important;
}
.leaflet-popup-tip { background: #fff !important; }
.leaflet-popup-content { margin: 10px 14px !important; font-family: 'Inter', sans-serif !important; font-size: 13px !important; }
.leaflet-popup-close-button { color: var(--text-muted) !important; }

/* Zoom controls */
.leaflet-control-zoom a {
  background: #fff !important;
  color: var(--navy) !important;
  border-color: var(--border) !important;
}

/* ─── Tab bar ─────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.tab {
  flex: 1;
  padding: 6px 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: all 0.15s;
}

.tab.active {
  background: #ffffff;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.tab:hover:not(.active) { color: var(--text); }

.tab-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.tab-content::-webkit-scrollbar { width: 5px; }
.tab-content::-webkit-scrollbar-track { background: transparent; }
.tab-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.panel-header-actions { display: flex; gap: 6px; align-items: center; }

/* ─── Splits table ────────────────────────────────── */
#splits-table-wrapper { flex: 1; overflow-y: auto; min-height: 0; }
#splits-table-wrapper::-webkit-scrollbar { width: 5px; }
#splits-table-wrapper::-webkit-scrollbar-track { background: transparent; }
#splits-table-wrapper::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

#splits-table { width: 100%; border-collapse: collapse; font-size: 12px; }

#splits-table thead { position: sticky; top: 0; z-index: 1; }

#splits-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

#splits-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--surface);
  color: var(--text);
  white-space: nowrap;
}

#splits-table tr { cursor: pointer; transition: background 0.1s; }
#splits-table tbody tr:hover { background: var(--surface); }
#splits-table tbody tr.active-row { background: rgba(65, 174, 159, 0.06); }

.pace-cell { display: flex; align-items: center; gap: 4px; }
.pace-cell input {
  width: 52px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-family: inherit;
  text-align: center;
  outline: none;
}
.pace-cell input:focus { border-color: var(--primary); }

/* Effort badges */
.effort-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.effort-badge.easy { background: rgba(65, 174, 159, 0.12); color: var(--primary); }
.effort-badge.moderate { background: rgba(51, 66, 100, 0.1); color: var(--navy); }
.effort-badge.hard { background: rgba(251, 146, 60, 0.12); color: var(--accent-orange); }
.effort-badge.sprint { background: rgba(239, 68, 68, 0.1); color: var(--accent-red); }

/* Pace summary */
.pace-summary {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 12px;
}

.pace-summary-header { display: flex; align-items: center; justify-content: space-between; }
#pace-goal-label { font-weight: 600; color: var(--navy); }

.custom-marker.effort { background: var(--accent-orange); color: #0f1117; }

.split-notes {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Pro feature styles ─────────────────────────── */
.pro-badge-inline {
  background: var(--highlight);
  color: var(--navy);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.connect-services { display: flex; flex-direction: column; gap: 8px; }

.connect-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
}
.connect-btn:hover { border-color: var(--primary); }
.connect-icon { font-size: 18px; }
.connect-status { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--text-muted); }
.connect-status.connected { color: var(--primary); }

.history-form { display: flex; flex-direction: column; gap: 10px; }
.history-form-row { display: flex; gap: 10px; }
.history-form-row label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.history-form-row input,
.history-form-row select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.history-form-row input:focus,
.history-form-row select:focus { border-color: var(--primary); }

.history-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.history-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
.history-table td { padding: 8px 10px; border-bottom: 1px solid var(--surface-2); color: var(--text); }
.history-table tbody tr:hover { background: var(--surface); }

.history-delete { background: none; border: none; color: var(--accent-red); cursor: pointer; font-size: 14px; opacity: 0.5; transition: opacity 0.15s; }
.history-delete:hover { opacity: 1; }

.nutri-summary-cards { display: flex; gap: 10px; margin-bottom: 12px; }
.nutri-card { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.nutri-card-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 4px; }
.nutri-card-value { font-size: 18px; font-weight: 800; color: var(--primary); }

.weather-impact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.weather-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.weather-card-icon { font-size: 22px; }
.weather-card-label { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.weather-card-value { font-size: 14px; font-weight: 700; color: var(--text); }
.weather-card.impact-none .weather-card-value { color: var(--primary); }
.weather-card.impact-low .weather-card-value { color: #d97706; }
.weather-card.impact-medium .weather-card-value { color: var(--accent-orange); }
.weather-card.impact-high .weather-card-value { color: var(--accent-red); }

.weather-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.weather-summary-total { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.weather-summary-total strong { font-size: 20px; color: #d97706; }
.weather-summary-note { margin-top: 8px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ─── Reviews section ─────────────────────────────── */
.reviews-section {
  border-top: 1px solid var(--border);
  padding: 10px 0 0;
  margin-top: 8px;
}

.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.reviews-header h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}

.review-count {
  font-size: 11px;
  color: var(--text-muted);
}

.review-input-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.review-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-family: inherit;
  outline: none;
}
.review-input:focus { border-color: var(--primary); }

.review-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.review-list {
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-item {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12px;
}

.review-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.review-author {
  font-weight: 700;
  color: var(--navy);
  font-size: 11px;
}

.review-date {
  font-size: 10px;
  color: var(--text-muted);
}

.review-stars {
  margin-left: auto;
  color: var(--highlight);
  font-size: 11px;
  text-shadow: 0 0 1px rgba(0,0,0,0.2);
}

.review-text {
  color: var(--text-muted);
  line-height: 1.4;
}

/* Star rating input */
.star-rating {
  display: inline-flex;
  gap: 2px;
  cursor: pointer;
}
.star-rating span {
  font-size: 16px;
  color: var(--border);
  transition: color 0.1s;
}
.star-rating span.active { color: #d4a017; }

/* Responsive */
@media (max-width: 900px) {
  main {
    flex-direction: column;
  }
  #left-column {
    min-width: 0;
    flex: 1;
  }
  #elevation-panel { min-height: 140px; height: 180px; }
  .resize-handle-v { width: 100%; height: 6px; cursor: ns-resize; align-self: auto; }
  #splits-panel { width: auto; max-width: none; max-height: 40vh; border-left: none; border-top: 1px solid var(--border); }
  nav { gap: 4px; }
  .btn-secondary, .btn-primary { padding: 6px 10px; font-size: 11px; }
}
