/* Modern minimal design for HapticRoutes */

:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --surface-subtle: #f8f9fb;
  --ink: #182033;
  --muted: #667085;
  --accent: #3451b2;
  --accent-hover: #293f8f;
  --accent-rgb: 52, 81, 178;
  --export: #15803d;
  --export-hover: #166534;
  --danger: #dc2626;
  --border: #dfe4ea;
  --border-light: #eef1f5;
  --shadow-sm: 0 1px 3px rgba(30, 41, 59, 0.07);
  --shadow: 0 16px 40px rgba(30, 41, 59, 0.11);
  --radius: 14px;
  --radius-sm: 9px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--accent-rgb), 0.07), transparent 34rem),
    var(--bg);
  min-height: 100vh;
}

/* App Layout */
.local-server-notice {
  margin: 18px;
  padding: 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
}

.local-server-notice p { margin-bottom: 0; }
.local-server-notice a { color: var(--accent); }

.app {
  min-height: 100vh;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.65px;
}

.creator-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.creator-monogram {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.creator-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.creator-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.creator-copy strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.creator-links {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-left: 8px;
  border-left: 1px solid var(--border-light);
}

.creator-links a {
  padding: 5px 6px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
}

.creator-links a:hover {
  background: var(--border-light);
  color: var(--accent);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.topbar-badge {
  padding: 4px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: 999px;
  font-weight: 500;
  color: var(--accent);
}

/* Main Content Grid */
.content {
  display: grid;
  grid-template-columns: clamp(320px, 33vw, 440px) 1fr;
  gap: 18px;
  flex: 1;
  min-height: 0;
}

/* Panel */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 32px rgba(30, 41, 59, 0.08);
  overflow: hidden;
  max-height: calc(100vh - 120px);
}

/* Numbered workflow accordion */
.workflow-steps {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.workflow-step {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.workflow-step.active {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(30, 41, 59, 0.1);
}

.tab-button {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tab-button:hover {
  background: rgba(var(--accent-rgb), 0.055);
}

.tab-button.active {
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.11), rgba(var(--accent-rgb), 0.025));
}

.step-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tab-button.active .step-number {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.step-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.step-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.step-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-chevron {
  width: 9px;
  height: 9px;
  justify-self: end;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translate(-2px, 2px);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.tab-button.active .step-chevron {
  border-color: var(--accent);
  transform: rotate(225deg) translate(-1px, 1px);
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
  padding: 4px 14px 18px;
  border-top: 1px solid var(--border-light);
}

.tab-panel.active {
  display: flex;
  animation: reveal-step 0.2s ease-out;
}

@keyframes reveal-step {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.panel-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-head h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

.divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

/* Preview */
.preview-canvas {
  width: 100%;
  min-height: 320px;
  height: 340px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  overflow: hidden;
}

.preview-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Details */
.detail-overview {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.detail-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-quick-actions .btn {
  padding-inline: 8px;
}

.detail-layer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-layer-toggle {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  background: var(--panel);
}

.detail-layer-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.25;
}

.detail-layer-copy strong {
  font-size: 12px;
  font-weight: 600;
}

.detail-layer-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-density-control {
  padding-top: 2px;
}

.detail-density-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-editors {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-editor {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

.detail-editor summary {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 38px 12px 14px;
  cursor: pointer;
  list-style: none;
}

.detail-editor summary::-webkit-details-marker {
  display: none;
}

.detail-editor summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.18s ease;
}

.detail-editor[open] summary::after {
  transform: translateY(-20%) rotate(225deg);
}

.detail-editor summary span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.detail-editor summary small {
  color: var(--muted);
  font-size: 10px;
}

.detail-editor[open] summary {
  border-bottom: 1px solid var(--border-light);
  background: rgba(var(--accent-rgb), 0.045);
}

.detail-editor-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

/* Routing meta */
.routing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.route-length-summary {
  font-size: 12px;
  color: var(--muted);
}

.routing-health-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(248, 250, 252, 0.8);
  color: #1e293b;
}

.routing-health-badge .health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.routing-health-badge.health-ok {
  border-color: rgba(34, 197, 94, 0.45);
  color: #14532d;
  background: rgba(220, 252, 231, 0.7);
}

.routing-health-badge.health-ok .health-dot {
  background: #22c55e;
}

.routing-health-badge.health-warn {
  border-color: rgba(245, 158, 11, 0.4);
  color: #92400e;
  background: rgba(254, 243, 199, 0.7);
}

.routing-health-badge.health-warn .health-dot {
  background: #f59e0b;
}

.routing-health-badge.health-down {
  border-color: rgba(248, 113, 113, 0.4);
  color: #991b1b;
  background: rgba(254, 226, 226, 0.75);
}

.routing-health-badge.health-down .health-dot {
  background: #ef4444;
}

.routing-health-badge.health-unknown .health-dot {
  background: #94a3b8;
}

.provider-health {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.provider-health-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.provider-health-list {
  display: grid;
  gap: 8px;
}

.provider-health-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--border-light);
  font-size: 12px;
  color: var(--ink);
}

.provider-health-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.provider-health-status {
  font-size: 11px;
  color: var(--muted);
}

.provider-health-item .health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.provider-health-item.health-ok .health-dot {
  background: #22c55e;
}

.provider-health-item.health-warn .health-dot {
  background: #f59e0b;
}

.provider-health-item.health-down .health-dot {
  background: #ef4444;
}

/* Callout */
.panel-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: rgba(var(--accent-rgb), 0.07);
  border-radius: var(--radius);
}

.panel-callout strong {
  font-size: 14px;
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

input[type="number"],
input[type="text"],
select {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
  transition: border-color 0.15s ease;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Checkbox fields */
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.checkbox-field:hover {
  background: var(--border);
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-field span {
  font-size: 14px;
  font-weight: 500;
}

/* Indent section (sub-options) */
.indent-section {
  padding-left: 28px;
  margin-top: -8px;
}

/* Feature toggles */
.feature-toggles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* Radio group */
.radio-group {
  display: flex;
  gap: 16px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.radio-group input {
  accent-color: var(--accent);
}

/* Checkbox list */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

/* Buttons */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn.large {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.ghost {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn.ghost:hover {
  background: var(--border-light);
}

.btn.primary {
  background: var(--accent);
  color: white;
}

.btn.primary:hover {
  background: var(--accent-hover);
}

.btn.export {
  background: var(--export);
  color: white;
}

.btn.export:hover {
  background: var(--export-hover);
}

.btn.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn.danger:hover {
  background: rgba(220, 38, 38, 0.1);
}

.btn-file {
  position: relative;
  overflow: hidden;
}

.btn-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Export buttons */
.export-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Advanced sections (progressive disclosure) */
.advanced-section {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.advanced-section summary {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  background: var(--border-light);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.advanced-section summary::-webkit-details-marker {
  display: none;
}

.advanced-section summary::after {
  content: "+";
  font-weight: 400;
  font-size: 16px;
}

.advanced-section[open] summary::after {
  content: "−";
}

.advanced-section[open] summary {
  border-bottom: 1px solid var(--border-light);
}

.advanced-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Status */
.status {
  z-index: 3;
  padding: 12px 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--border-light);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.status.info {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
}

.status.warn {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.status.error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

/* Map Section */
.texture-guide { padding: 24px; overflow-y: auto; position: absolute; inset: 0; background: var(--surface-subtle); }
.texture-guide h2 { margin: 0 0 8px; }
.texture-guide > p { color: var(--muted); max-width: 70ch; }
.texture-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.texture-gallery figure { margin: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.texture-gallery img { display: block; width: 100%; aspect-ratio: 16 / 7; }
.texture-gallery figcaption { padding: 14px; }
.texture-gallery p { color: var(--muted); margin: 6px 0 0; font-size: 12px; }
.map-section.style-active > :not(.texture-guide) { display: none; }
@media (max-width: 768px) {
  .texture-gallery { grid-template-columns: 1fr; }
}

.map-section {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #e8edf2;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 120px);
}

.canvas-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  border: 1px solid rgba(223, 228, 234, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(30, 41, 59, 0.14);
  backdrop-filter: blur(12px);
}

.canvas-mode {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 7px 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.canvas-mode-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.map-section.preview-active .canvas-mode-dot {
  background: #334155;
  box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.12);
}

.canvas-action,
.canvas-view-button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.canvas-action {
  padding: 5px 9px;
  color: var(--accent);
}

.canvas-action:hover {
  background: rgba(var(--accent-rgb), 0.08);
}

.canvas-view-toggle {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
  background: var(--border-light);
}

.canvas-view-button {
  min-width: 40px;
  padding: 4px 9px;
}

.canvas-view-button:hover {
  color: var(--ink);
}

.canvas-view-button.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.map-preview-slot {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 2;
}

.map-section.preview-active .map-preview-slot {
  display: block;
}

.map-section.preview-active .map {
  visibility: hidden;
}

.map-section.preview-active .map-stats {
  display: none;
}

.map {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: calc(100vh - 120px);
}

.map-preview-slot .preview-canvas {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: var(--surface-subtle);
}

.map-stats {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: var(--shadow);
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: calc(100% - 24px);
  overflow-x: auto;
  white-space: nowrap;
}

.stat-route {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat-secondary {
  color: var(--muted);
  font-weight: 400;
}

.stat-divider {
  color: var(--muted);
}

/* Hints */
.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Focus states */
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Point marker */
.point-marker {
  background: var(--accent);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 11px;
  font-weight: 600;
  border: 2px solid white;
  box-shadow: var(--shadow);
}

/* Responsive */
@media (max-width: 1024px) {
  .content {
    grid-template-columns: clamp(280px, 40vw, 380px) 1fr;
  }

  .grid.three {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .content {
    grid-template-columns: 1fr;
  }

  .panel {
    max-height: 45vh;
  }

  .map {
    min-height: 50vh;
  }

  .stat-label,
  .stat-secondary {
    display: none;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .brand {
    flex-wrap: wrap;
  }

  .topbar-actions {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .feature-toggles {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .app {
    padding: 12px;
  }

  .button-row {
    flex-direction: column;
  }

  .brand,
  .creator-card {
    width: 100%;
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .creator-links {
    margin-left: auto;
  }

  .btn.large {
    width: 100%;
  }

  .tab-button {
    min-height: 58px;
    padding: 10px 12px;
  }

  .tab-panel {
    padding-inline: 12px;
  }

  .canvas-toolbar {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .map-section .leaflet-top.leaflet-left {
    top: 56px;
  }

  .canvas-mode {
    min-width: 0;
    margin-right: auto;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .canvas-action {
    padding-inline: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Route Shape — the two controls that change how the whole line feels, so the
   section is called out rather than sitting flush with the rest of the panel. */
.feature-section {
  background: var(--border-light);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px;
}

.feature-section .section-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-new {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.feature-section .grid.two {
  grid-template-columns: minmax(0, 1fr);
}

.feature-section .grid.three {
  align-items: end;
}

.feature-section .field {
  min-width: 0;
}

.grid.minor-road-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.minor-road-controls .field:first-child {
  grid-column: 1 / -1;
}
