﻿:root {
      --sky-blue: #2F6B9F;
      --evening-navy: #07111F;
      --horizon-orange: #E8A06B;
      --peach-glow: #F6D2A9;
      --cloud-white: #F7F8FA;
      --text-slate: #2E3640;

      --brand-900: #07111F;
      --brand-800: #0F1F36;
      --brand-700: #2F6B9F;
      --brand-600: #3D82BE;
      --brand-accent: #E8A06B;
      --brand-accent-soft: #F6D2A9;

      --slate-900: #0f172a;
      --slate-700: #334155;
      --slate-500: #64748b;
      --slate-300: #cbd5e1;
      --slate-200: #e2e8f0;
      --slate-100: #f1f5f9;
      --slate-50: #f8fafc;

      --radius-sm: 6px;
      --radius-md: 8px;
      --radius-lg: 12px;
      --radius-pill: 999px;

      --font-base: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
      --shadow-md: 0 4px 16px rgba(7,17,31,0.16);
    }
    body, html {
      margin: 0;
      padding: 0;
      height: 100%;
      font-family: var(--font-base);
      background: var(--slate-50);
      color: var(--text-slate);
    }
    body {
      background: var(--slate-50);
      color: var(--text-slate);
    }
    abbr[title],
    .term-help[title] {
      cursor: help;
      text-decoration: underline dotted rgba(47, 107, 159, 0.55);
      text-underline-offset: 0.14em;
    }
    .hidden {
      display: none !important;
    }
    input, select, button, textarea {
      font: inherit;
    }
    input[type="text"],
    input[type="number"],
    input[type="password"],
    select {
      border: 1px solid var(--slate-300);
      border-radius: var(--radius-md);
      background: #fff;
      color: var(--text-slate);
      padding: 9px 12px;
      box-sizing: border-box;
      box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    }
    input[type="text"]:focus,
    input[type="number"]:focus,
    input[type="password"]:focus,
    select:focus {
      outline: none;
      border-color: var(--brand-600);
      box-shadow: 0 0 0 3px rgba(61, 130, 190, 0.16);
    }
    .topbar {
      position: sticky;
      top: 0;
      z-index: 1400;
      box-shadow: var(--shadow-md);
    }
    .topbar-row {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      padding: 12px 18px;
    }
    .topbar-brand-row {
      background: linear-gradient(180deg, #2F6B9F 0%, #07111F 48%, #E8A06B 100%);
      border-bottom: 1px solid rgba(246, 210, 169, 0.24);
      padding-top: 18px;
      padding-bottom: 24px;
    }
    .topbar-action-row {
      background: linear-gradient(180deg, rgba(246, 210, 169, 0.18) 0%, #ffffff 48%);
      border-bottom: 1px solid var(--slate-200);
      justify-content: space-between;
      gap: 14px 18px;
    }
    .topbar label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 14px;
      color: rgba(247, 248, 250, 0.94);
    }
    .brand-lockup {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 220px;
      margin-right: 8px;
    }
    .brand-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .brand-name {
      color: var(--cloud-white);
      font-size: 30px;
      font-weight: 800;
      letter-spacing: -0.04em;
      line-height: 1;
    }
    .brand-home-link {
      color: inherit;
      text-decoration: none;
    }
    .brand-home-link:hover {
      text-decoration: none;
    }
    .brand-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 22px;
      padding: 0 9px;
      border-radius: var(--radius-pill);
      background: rgba(232, 160, 107, 0.95);
      color: var(--brand-900);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      box-shadow: 0 8px 20px rgba(7, 17, 31, 0.18);
    }
    .brand-tagline {
      color: rgba(247, 248, 250, 0.84);
      font-size: 12px;
      font-weight: 500;
      letter-spacing: 0.02em;
    }
    .search-row {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      flex: 1 1 360px;
      justify-content: center;
    }
    .project-row {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      color: var(--slate-700);
    }
    .search-row input {
      width: min(420px, 100%);
      max-width: 100%;
      background: rgba(7, 17, 31, 0.32);
      border-color: rgba(247, 248, 250, 0.35);
      color: var(--cloud-white);
      box-shadow: none;
    }
    .search-row input::placeholder {
      color: rgba(247, 248, 250, 0.64);
    }
    .search-row label {
      flex-wrap: nowrap;
      white-space: nowrap;
    }
    .search-row input:focus {
      border-color: rgba(246, 210, 169, 0.85);
      box-shadow: 0 0 0 3px rgba(246, 210, 169, 0.18);
    }
    .project-row select {
      width: 240px;
      max-width: 100%;
    }
    .auth-summary {
      margin-left: auto;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      font-size: 13px;
      color: rgba(247, 248, 250, 0.92);
    }
    .auth-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      border-radius: var(--radius-pill);
      background: rgba(247, 248, 250, 0.14);
      border: 1px solid rgba(247, 248, 250, 0.28);
      color: var(--cloud-white);
      font-weight: 700;
    }
    .auth-badge.locked {
      background: rgba(232, 160, 107, 0.22);
      border-color: rgba(246, 210, 169, 0.5);
      color: var(--cloud-white);
    }
    .auth-logout {
      min-width: 0 !important;
      padding: 6px 12px;
    }
    .mobile-controls-toggle {
      display: none;
      min-width: 0 !important;
      padding: 8px 12px;
      border-radius: var(--radius-pill);
      border: 1px solid rgba(247, 248, 250, 0.34);
      background: rgba(7, 17, 31, 0.28);
      color: var(--cloud-white);
      font-weight: 700;
      box-shadow: none;
    }
    .topbar-action-row label,
    .topbar-action-row .map-view-toggle-label {
      color: var(--slate-700);
    }
    .topbar-action-row input[type="text"],
    .topbar-action-row select {
      min-height: 40px;
    }
    .topbar-section {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      min-width: 0;
    }
    .topbar-section.center {
      flex: 1 1 480px;
    }
    .topbar-actions {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .topbar-actions button {
      min-width: 0;
    }
    .map-view-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .map-view-toggle-label {
      font-size: 14px;
      color: rgba(247, 248, 250, 0.88);
      font-weight: 600;
    }
    .toggle-chip {
      min-width: 0 !important;
      padding: 6px 12px;
      border: 1px solid var(--slate-300);
      border-radius: var(--radius-pill);
      background: #fff;
      color: var(--slate-700);
      font-weight: 600;
    }
    .toggle-chip.active {
      background: var(--brand-700);
      border-color: var(--brand-700);
      color: #fff;
    }
    #mapWrap {
      width: 80vw;
      max-width: calc(100vw - 24px);
      margin: 10px auto 0;
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-sizing: border-box;
      background: #dfe9f5;
      box-shadow: var(--shadow-md);
      position: relative;
    }
    #map {
      width: 100%;
      height: 50vh;
      min-height: 340px;
    }
    #mapWrap.is-expanded {
      width: calc(100vw - 24px);
      max-width: calc(100vw - 24px);
      height: 72vh;
      z-index: 1700;
    }
    #mapWrap.is-expanded #map {
      height: 100%;
      min-height: 0;
    }
    #mapWrap:fullscreen {
      width: 100vw;
      height: 100vh;
      margin: 0;
      border-radius: 0;
      border: 0;
    }
    #mapWrap:fullscreen #map {
      height: 100%;
      min-height: 0;
    }
    .toolbar {
      padding: 16px 20px 24px;
      background: var(--slate-50);
      border-top: 1px solid var(--slate-200);
      width: 80vw;
      max-width: calc(100vw - 24px);
      margin: 0 auto;
      box-sizing: border-box;
    }
    .toolbar-section { margin-bottom: 12px; }
    .toolbar label { display: inline-block; margin-right: 16px; }
    .mobile-design-stage {
      display: block;
    }
    .mobile-map-shell {
      position: relative;
    }
    .map-overlay-actions {
      position: absolute;
      top: 10px;
      right: 10px;
      z-index: 1200;
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
      max-width: calc(100% - 20px);
      pointer-events: none;
    }
    .map-overlay-actions button,
    .map-preview-close {
      pointer-events: auto;
      min-width: 0 !important;
      padding: 8px 10px;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.75);
      background: rgba(19, 38, 68, 0.82);
      color: #fff;
      font-weight: 700;
      box-shadow: 0 10px 30px rgba(8, 15, 28, 0.18);
      backdrop-filter: blur(4px);
    }
    .map-preview-close {
      position: absolute;
      top: 12px;
      right: 12px;
      z-index: 1201;
      display: none;
    }
    .map-location-search {
      position: absolute;
      top: 58px;
      right: 12px;
      z-index: 1200;
      display: flex;
      align-items: center;
      gap: 8px;
      width: min(500px, calc(100% - 360px));
      padding: 8px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.78);
      background: rgba(7, 17, 31, 0.72);
      box-shadow: 0 12px 30px rgba(8, 15, 28, 0.18);
      backdrop-filter: blur(6px);
      pointer-events: auto;
    }
    .map-location-search label {
      display: flex;
      align-items: center;
      gap: 6px;
      flex: 1 1 auto;
      min-width: 0;
      margin: 0;
      color: #fff;
      font-weight: 700;
      white-space: nowrap;
    }
    .map-location-search input {
      min-width: 0;
      width: 100%;
      background: rgba(255,255,255,0.95);
      border-color: rgba(203, 213, 225, 0.95);
      color: var(--brand-900);
    }
    .map-location-search button {
      flex: 0 0 auto;
      min-width: 0 !important;
      padding: 8px 10px;
      background: var(--brand-accent);
      border-color: var(--brand-accent);
      color: var(--brand-900);
      font-weight: 800;
    }
    .map-tool-overlay {
      position: absolute;
      top: 58px;
      left: 12px;
      z-index: 1200;
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      max-width: calc(100% - 160px);
      pointer-events: none;
    }
    .map-tool-overlay button {
      pointer-events: auto;
      min-width: 0 !important;
      padding: 8px 10px;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.78);
      background: rgba(255,255,255,0.9);
      color: var(--brand-900);
      font-weight: 700;
      box-shadow: 0 10px 30px rgba(8, 15, 28, 0.14);
      backdrop-filter: blur(4px);
    }
    .map-tool-overlay button.active {
      background: rgba(232, 160, 107, 0.95);
      color: #07111F;
    }
    .map-selection-overlay {
      position: absolute;
      left: 12px;
      bottom: 12px;
      z-index: 1201;
      width: min(320px, calc(100% - 24px));
      padding: 12px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.78);
      background: rgba(255,255,255,0.94);
      color: var(--text-slate);
      box-shadow: 0 14px 34px rgba(8, 15, 28, 0.18);
      backdrop-filter: blur(6px);
    }
    .map-selection-overlay.hidden {
      display: none !important;
    }
    .map-selection-title {
      font-size: 11px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--slate-500);
      font-weight: 800;
      margin-bottom: 4px;
    }
    .map-selection-heading {
      font-size: 15px;
      font-weight: 800;
      color: var(--brand-900);
      margin-bottom: 8px;
    }
    .map-selection-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px 10px;
      margin-bottom: 10px;
    }
    .map-selection-grid label {
      display: block;
      margin: 0;
      font-size: 11px;
      color: var(--slate-600);
      font-weight: 600;
    }
    .map-selection-grid input,
    .map-selection-grid select {
      margin-top: 4px;
      width: 100%;
    }
    .map-selection-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .map-selection-meta {
      margin-bottom: 8px;
      font-size: 12px;
      color: var(--slate-600);
    }
    #mapWrap.is-expanded .map-preview-close,
    #mapWrap:fullscreen .map-preview-close {
      display: inline-flex;
    }
    .mobile-map-action-bar {
      position: absolute;
      top: 8px;
      left: 8px;
      z-index: 1200;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
      width: min(520px, calc(100% - 16px));
    }
    .mobile-map-action-bar button {
      min-width: 0;
      padding: 8px 6px;
      background: rgba(255, 255, 255, 0.96);
      backdrop-filter: blur(4px);
      border-color: rgba(203, 213, 225, 0.95);
      color: var(--brand-800);
      box-shadow: 0 10px 30px rgba(8, 15, 28, 0.14);
    }
    .route-design-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      align-items: start;
      margin-bottom: 12px;
    }
    @media (min-width: 769px) {
      .toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
        gap: 12px;
        align-items: start;
      }
      #actionStatus,
      .summary-strip,
      .validation-panel,
      #mobileDesignStage,
      #missionPreviewPanel,
      .planner-footer {
        grid-column: 1 / -1;
      }
      .route-design-grid {
        display: none;
      }
      .map-tool-overlay {
        max-width: calc(100% - 24px);
      }
      .map-location-search {
        top: 106px;
        left: 12px;
        right: auto;
        width: min(520px, calc(100% - 24px));
      }
      .map-selection-overlay {
        width: min(360px, calc(100% - 24px));
      }
      #map {
        height: 42vh;
        min-height: 320px;
      }
      #livePreviewPanel,
      #heightProfilePanel {
        margin-bottom: 0;
      }
    }
    .mission-config-section {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 12px 16px;
      align-items: end;
    }
    .mission-config-section label {
      display: block;
      margin-right: 0;
      font-size: 12px;
      color: #475569;
      font-weight: 500;
    }
    .mission-config-section input,
    .mission-config-section select {
      margin-top: 4px;
      display: block;
      width: 100%;
    }
    .mission-config-actions {
      display: flex;
      align-items: end;
      gap: 8px;
      flex-wrap: wrap;
    }
    .mission-config-summary {
      grid-column: 1 / -1;
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      align-items: center;
    }
    .help-text { color: var(--slate-500); font-size: 12px; line-height: 1.4; }
    .summary-strip {
      padding: 12px 20px;
      background: #ffffff;
      border-bottom: 1px solid var(--slate-200);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .summary-strip-title {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #94a3b8;
      font-weight: 700;
    }
    .summary-strip-main {
      display: flex;
      align-items: center;
      gap: 14px;
      flex-wrap: wrap;
    }
    .summary-strip-side {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: wrap;
      margin-left: auto;
    }
    .site-access-gate {
      position: fixed;
      inset: 0;
      z-index: 5000;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(180deg, rgba(47, 107, 159, 0.9) 0%, rgba(7, 17, 31, 0.94) 48%, rgba(232, 160, 107, 0.88) 100%);
      backdrop-filter: blur(4px);
      padding: 20px;
    }
    .site-access-gate.hidden {
      display: none;
    }
    .site-access-card {
      width: min(420px, 100%);
      background: #ffffff;
      border-radius: 14px;
      border: 1px solid rgba(15, 31, 54, 0.1);
      box-shadow: 0 20px 48px rgba(19, 38, 68, 0.22);
      padding: 18px 18px 16px;
      display: grid;
      gap: 12px;
    }
    .site-access-card::before {
      content: '';
      display: block;
      height: 6px;
      margin: -18px -18px 8px;
      border-radius: 14px 14px 0 0;
      background: linear-gradient(90deg, #2F6B9F, #E8A06B);
    }
    .site-access-title {
      font-size: 20px;
      font-weight: 800;
      color: var(--brand-900);
    }
    .site-access-copy {
      color: var(--slate-700);
      font-size: 14px;
      line-height: 1.45;
    }
    .site-access-form {
      display: grid;
      gap: 10px;
    }
    .site-access-form label {
      display: grid;
      gap: 5px;
      color: var(--brand-800);
      font-size: 13px;
      font-weight: 600;
    }
    .site-access-form input {
      padding: 10px 12px;
      border: 1px solid #c7d7ea;
      border-radius: 10px;
      font-size: 14px;
    }
    .site-access-actions {
      display: flex;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
    }
    .site-access-message {
      min-height: 18px;
      font-size: 13px;
      color: #8a5a00;
    }
    .site-access-message.error {
      color: #a12626;
    }
    .validation-panel {
      margin: 10px 12px;
      background: #fafbfd;
      border: 1px solid var(--slate-200);
      border-radius: 10px;
      border-left: 4px solid var(--slate-200);
      padding: 10px 12px;
      box-shadow: var(--shadow-sm);
    }
    .validation-panel summary {
      list-style: none;
      cursor: pointer;
      user-select: none;
    }
    .validation-panel summary::-webkit-details-marker {
      display: none;
    }
    .validation-panel.has-red {
      border-left-color: #dc2626;
    }
    .validation-panel.has-amber {
      border-left-color: #d97706;
    }
    .validation-panel.has-blue {
      border-left-color: #2563eb;
    }
    .validation-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .validation-panel-title {
      font-weight: 700;
      color: var(--brand-800);
    }
    .validation-panel-body {
      margin-top: 10px;
      display: grid;
      gap: 10px;
    }
    .validation-controls {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      align-items: center;
    }
    .validation-summary {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 8px;
    }
    .validation-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      margin-top: 2px;
    }
    .validation-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 9px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      border: 1px solid transparent;
    }
    .validation-pill.red { background: #fff1f0; color: #9a1f1f; border-color: #ffc7c2; }
    .validation-pill.amber { background: #fff8e8; color: #8a5a00; border-color: #f2d28b; }
    .validation-pill.blue { background: #eef5ff; color: #1f4b8f; border-color: #cfe0ff; }
    .validation-pill.red::before { content: 'x '; }
    .validation-pill.amber::before { content: '! '; }
    .validation-pill.blue::before { content: 'i '; }
    .validation-findings {
      margin-top: 8px;
      display: grid;
      gap: 6px;
    }
    .validation-finding {
      border-left: 5px solid #cfe0ff;
      padding: 7px 9px;
      border-radius: 6px;
      background: #f8fbff;
      font-size: 13px;
      line-height: 1.35;
    }
    .validation-finding.red { border-left-color: #c7352f; background: #fff7f6; }
    .validation-finding.amber { border-left-color: #d99300; background: #fffaf0; }
    .validation-finding.blue { border-left-color: #2b72c9; background: #f6faff; }
    .validation-recommendation {
      margin-top: 3px;
      color: #536477;
      font-size: 12px;
    }
    .validation-finding-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 8px;
    }
    .secondary-button {
      background: #fff;
      color: var(--slate-700);
      border: 1px solid var(--slate-300);
    }
    .danger-button {
      background: #fff1f1;
      color: #b42318;
      border: 1px solid rgba(180, 35, 24, 0.28);
    }
    .panel {
      background: #fff;
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-lg);
      padding: 14px;
      box-shadow: var(--shadow-sm);
    }
    #focalList, #altitudePointList {
      max-height: 120px;
      overflow-y: auto;
      border: 1px solid #ccc;
      padding: 6px;
      background: #fff;
    }
    #altitudeEditorWrap {
      width: 100%;
      height: 190px;
      margin: 8px 0;
      border: 1px solid #ccc;
      background: linear-gradient(to bottom, #ffffff, #f4f7fb);
      border-radius: 6px;
      touch-action: none;
      overscroll-behavior: contain;
    }
    @media (min-width: 769px) {
      #altitudeEditorWrap {
        height: 160px;
        margin: 6px 0;
      }
      .altitude-editor-side {
        min-height: 160px;
      }
      #altitudeOffsetControl {
        height: 160px;
      }
    }
    #altitudeEditor {
      width: 100%;
      height: 100%;
      display: block;
      cursor: crosshair;
      touch-action: none;
    }
    .altitude-editor-frame {
      display: grid;
      grid-template-columns: 34px 1fr;
      gap: 8px;
      align-items: stretch;
    }
    .altitude-editor-side {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 190px;
      touch-action: none;
      overscroll-behavior: contain;
    }
    .altitude-editor-main {
      min-width: 0;
    }
    .altitude-editor-progress {
      margin-top: 6px;
      padding: 0 4px 2px;
    }
    .slider-shell {
      position: relative;
      user-select: none;
      touch-action: none;
    }
    .slider-shell.disabled {
      opacity: 0.45;
    }
    .slider-track {
      position: absolute;
      inset: 0;
      border-radius: 999px;
      background: linear-gradient(to right, rgba(246, 210, 169, 0.42), rgba(47, 107, 159, 0.2));
      border: 1px solid rgba(47, 107, 159, 0.25);
    }
    .slider-fill {
      position: absolute;
      border-radius: 999px;
      background: linear-gradient(to right, #2F6B9F, #E8A06B);
    }
    .slider-thumb {
      position: absolute;
      width: 22px;
      height: 22px;
      border-radius: 999px;
      background: #ffffff;
      border: 2px solid #2F6B9F;
      box-shadow: 0 1px 4px rgba(0,0,0,0.18);
      transform: translate(-50%, -50%);
    }
    #altitudeOffsetControl {
      width: 24px;
      height: 190px;
    }
    #altitudeOffsetControl .slider-fill {
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(to bottom, #E8A06B, #2F6B9F);
    }
    #altitudeProgressControl {
      width: 100%;
      height: 24px;
    }
    #altitudeProgressControl .slider-fill {
      top: 0;
      bottom: 0;
      left: 0;
    }
    .altitude-chart-slider-labels {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      color: #4d6478;
      margin-bottom: 2px;
    }
    #preview3dWrap {
      width: 100%;
      height: 220px;
      margin: 6px 0 8px;
      border: 1px solid var(--slate-200);
      background: linear-gradient(to bottom, #f7fbff 0%, #eef4fb 58%, #dde9f2 58%, #f4efe6 100%);
      border-radius: var(--radius-md);
      overflow: hidden;
      position: relative;
    }
    @media (min-width: 769px) {
      #preview3dWrap {
        height: 180px;
      }
    }
    #preview3d {
      width: 100%;
      height: 100%;
      display: block;
    }
    .panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .panel-header strong {
      font-size: 13px;
      font-weight: 700;
      color: #1e3a5f;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .panel-header-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .panel-header-actions button {
      border-radius: var(--radius-pill);
      padding: 5px 12px;
      font-size: 12px;
      font-weight: 600;
    }
    #updateGlobePreview {
      background: var(--brand-700);
      border-color: var(--brand-700);
      color: #fff;
    }
    #updateGlobePreview:hover {
      background: #255A86;
      border-color: #255A86;
      color: #fff;
    }
    #sharePreviewButton {
      background: #f0f7ff;
      border-color: var(--slate-300);
      color: var(--brand-700);
    }
    #sharePreviewButton:hover {
      background: #e3f0ff;
      border-color: var(--brand-600);
      color: var(--brand-700);
    }
    #previewLegend {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
      font-size: 12px;
      color: #345;
      margin-top: 6px;
    }
    .preview-legend-overlay {
      position: absolute;
      left: 8px;
      right: 8px;
      bottom: 8px;
      display: none;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      padding: 5px 8px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.78);
      backdrop-filter: blur(3px);
      font-size: 11px;
      color: #2f4762;
      border: 1px solid rgba(180, 198, 220, 0.85);
    }
    .preview-legend-overlay .legend-item {
      gap: 4px;
    }
    .preview-legend-overlay .legend-swatch {
      width: 10px;
      height: 10px;
    }
    .preview-controls {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 6px;
      font-size: 12px;
      color: #345;
    }
    .preview-control-group {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .preview-controls input[type="range"] {
      width: 220px;
    }
    .camera-standalone-panel {
      display: grid;
      gap: 8px;
      min-height: 132px;
    }
    .camera-standalone-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .camera-standalone-row input[type="range"] {
      width: min(320px, 100%);
    }
    .camera-standalone-value {
      min-width: 52px;
      font-weight: 600;
      color: #244166;
    }
    #globePreviewWrap {
      width: 80vw;
      max-width: 100%;
      height: 420px;
      margin: 6px auto 8px;
      border: 0;
      border-radius: var(--radius-lg);
      overflow: hidden;
      position: relative;
      background: #d9e3ef;
      box-shadow: inset 0 2px 8px rgba(0,0,0,0.12), var(--shadow-md);
    }
    #globePreviewWrap.is-expanded {
      height: 72vh;
    }
    #globePreviewWrap:fullscreen {
      width: 100vw;
      height: 100vh;
      margin: 0;
      border-radius: 0;
      border: 0;
    }
    .globe-preview-close {
      position: absolute;
      top: 12px;
      right: 12px;
      z-index: 20;
      display: none;
      min-width: 0 !important;
      padding: 8px 12px;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.75);
      background: rgba(19, 38, 68, 0.82);
      color: #fff;
      font-weight: 700;
      box-shadow: 0 10px 30px rgba(8, 15, 28, 0.18);
    }
    #globePreviewWrap.is-expanded .globe-preview-close,
    #globePreviewWrap:fullscreen .globe-preview-close {
      display: inline-flex;
    }
    #globePreview {
      width: 100%;
      height: 100%;
    }
    .globe-preview-label {
      position: absolute;
      top: 12px;
      left: 12px;
      z-index: 10;
      background: rgba(15, 31, 54, 0.75);
      color: white;
      font-size: 11px;
      font-weight: 600;
      padding: 5px 10px;
      border-radius: 999px;
      letter-spacing: 0.04em;
      backdrop-filter: blur(4px);
      pointer-events: none;
    }
    .panel-header-copy {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .panel-header-subtitle {
      font-size: 11px;
      color: #64748b;
      font-weight: 400;
    }
    .geo-preview-status {
      position: absolute;
      left: 10px;
      right: 10px;
      top: 10px;
      z-index: 500;
      padding: 8px 10px;
      border-radius: 8px;
      background: rgba(255,255,255,0.88);
      color: #2f4762;
      font-size: 12px;
      line-height: 1.35;
      border: 1px solid rgba(180, 198, 220, 0.95);
      backdrop-filter: blur(2px);
      pointer-events: none;
    }
    .geo-preview-status.hidden {
      display: none;
    }
    #globePreviewStatus {
      display: none !important;
    }
    .mini-button {
      padding: 6px 12px;
      font-weight: 600;
      border-radius: var(--radius-md);
    }
    .primary-button {
      padding: 8px 16px;
      font-weight: 600;
      border-radius: var(--radius-md);
    }
    .legend-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .legend-swatch {
      width: 12px;
      height: 12px;
      border-radius: 999px;
      display: inline-block;
    }
    .altitude-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
      flex-wrap: wrap;
    }
    .altitude-row input {
      width: 90px;
    }
    .altitude-row span {
      min-width: 70px;
      font-size: 12px;
      color: #333;
    }
    .altitude-row.selected {
      background: #eef5ff;
      border-radius: 6px;
      padding: 6px;
    }
    .altitude-row button {
      margin-left: 4px;
    }
    .altitude-selected-panel {
      margin: 8px 0 10px;
      padding: 10px;
      border: 1px solid #d8e3f5;
      border-radius: 8px;
      background: #f7fbff;
    }
    .altitude-selected-title {
      font-size: 13px;
      font-weight: 600;
      color: #244166;
      margin-bottom: 6px;
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }
    .altitude-selected-empty {
      font-size: 12px;
      color: #5a6f86;
    }
    .altitude-control-grid {
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .altitude-control {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .altitude-control label {
      margin-right: 0;
      font-size: 12px;
      color: #345;
    }
    .altitude-control-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .altitude-control-row input[type="range"] {
      flex: 1 1 160px;
    }
    .altitude-control-row input[type="number"] {
      width: 90px;
    }
    .altitude-selected-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 8px;
    }
    .altitude-value-pills {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }
    .altitude-value-pill {
      padding: 4px 8px;
      border-radius: 999px;
      background: #edf4ff;
      color: #244166;
      font-size: 11px;
      border: 1px solid #d3e2fb;
    }
    .altitude-slider-layout {
      display: grid;
      grid-template-columns: 42px 1fr;
      gap: 12px;
      align-items: center;
    }
    .altitude-slider-vertical-wrap {
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 150px;
    }
    .altitude-slider-vertical {
      -webkit-appearance: slider-vertical;
      appearance: slider-vertical;
      width: 28px;
      height: 150px;
    }
    .altitude-slider-horizontal {
      width: 100%;
    }
    .altitude-slider-label {
      font-size: 11px;
      color: #4d6478;
      margin-bottom: 4px;
    }
    .path-badge {
      background: var(--brand-800);
      color: #fff;
      border: 2px solid #fff;
      border-radius: 999px;
      min-width: 26px;
      height: 26px;
      padding: 0 6px;
      line-height: 22px;
      text-align: center;
      font-size: 13px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 1px 3px rgba(0,0,0,0.18);
    }
    .path-badge.selected {
      box-shadow: 0 0 0 3px rgba(246, 210, 169, 0.95), 0 4px 14px rgba(7, 17, 31, 0.28);
      transform: scale(1.08);
    }
    .import-panel {
      width: min(80vw, 1600px);
      margin: 16px auto 0;
      background: rgba(255,255,255,0.96);
      border: 1px solid rgba(47, 107, 159, 0.14);
      border-radius: 14px;
      box-shadow: 0 8px 24px rgba(7, 17, 31, 0.08);
      padding: 18px 20px;
    }
    .planner-soft-note {
      margin-top: 10px;
      padding: 10px 12px;
      border-radius: 10px;
      background: rgba(232, 160, 107, 0.12);
      border: 1px solid rgba(232, 160, 107, 0.3);
      color: #6c4a23;
      font-size: 13px;
      line-height: 1.45;
    }
    .planner-reminder-strip {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      margin: 0 0 10px;
    }
    .planner-reminder-card {
      display: grid;
      gap: 4px;
      padding: 10px 12px;
      border-radius: 10px;
      background: #ffffff;
      border: 1px solid var(--slate-200);
      box-shadow: var(--shadow-sm);
      font-size: 12px;
      line-height: 1.4;
      color: var(--slate-700);
    }
    .planner-reminder-card strong {
      color: var(--brand-800);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .planner-footer {
      width: 80vw;
      max-width: calc(100vw - 24px);
      margin: 0 auto 20px;
      padding: 0 20px 18px;
      color: var(--slate-500);
      font-size: 13px;
    }
    .planner-footer-links {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 16px;
      margin-bottom: 8px;
    }
    .planner-footer-links a {
      color: var(--brand-700);
      text-decoration: none;
      font-weight: 600;
    }
    .planner-footer-links a:hover {
      text-decoration: underline;
    }
    .planner-footer-copy {
      line-height: 1.5;
    }
    .import-panel-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }
    .import-panel-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-top: 14px;
    }
    .import-panel-grid label {
      display: grid;
      gap: 6px;
      font-size: 13px;
      color: var(--slate-700);
    }
    .import-panel-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 14px;
    }
    .import-progress {
      margin-top: 12px;
      padding: 10px 12px;
      border-radius: 10px;
      background: rgba(47, 107, 159, 0.08);
      border: 1px solid rgba(47, 107, 159, 0.16);
    }
    .import-progress-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 8px;
      color: var(--brand-800);
      font-size: 13px;
    }
    .import-progress-track {
      position: relative;
      width: 100%;
      height: 10px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(15, 31, 54, 0.1);
    }
    .import-progress-bar {
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--sky-blue), var(--horizon-orange));
      transition: width 0.18s ease;
    }
    .import-progress.processing .import-progress-bar {
      width: 100% !important;
      background: linear-gradient(90deg, rgba(47, 107, 159, 0.22), rgba(47, 107, 159, 0.95), rgba(232, 160, 107, 0.22));
      background-size: 200% 100%;
      animation: import-progress-pulse 1.15s linear infinite;
    }
    @keyframes import-progress-pulse {
      from {
        background-position: 200% 0;
      }
      to {
        background-position: -200% 0;
      }
    }
    .estimate-text {
      font-size: 12px;
      color: #36506d;
      margin-top: 8px;
    }
    .estimate-text.warning {
      color: #9a4b16;
      font-weight: 600;
    }
    .summary-strip .estimate-text {
      margin-top: 0;
      font-size: 15px;
      font-weight: 600;
      color: #1e3a5f;
    }
    .summary-strip .estimate-text.warning {
      color: #9a4b16;
    }
    #toalpSummary {
      display: inline-flex;
      align-items: center;
      min-height: 32px;
      padding: 6px 10px;
      border-radius: var(--radius-pill);
      background: rgba(47, 107, 159, 0.08);
      border: 1px solid rgba(47, 107, 159, 0.16);
      color: var(--brand-800);
      font-size: 12px;
      font-weight: 600;
    }
    #missionValidationState {
      color: #94a3b8;
      font-style: italic;
    }
    .focal-guide-text {
      color: var(--brand-700);
      font-weight: 600;
    }
    .height-limit-warning {
      margin-top: 6px;
      font-size: 12px;
      color: #b03a2e;
      font-weight: 600;
      min-height: 18px;
    }
    .object-controls-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 10px;
      align-items: end;
      margin-top: 8px;
      min-height: 132px;
    }
    .object-controls-row label {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-right: 0;
      font-size: 12px;
      color: #345;
    }
    .object-controls-row input,
    .object-controls-row select {
      min-width: 90px;
    }
    #plannerObjectList {
      max-height: 180px;
      overflow-y: auto;
      border: 1px solid #d8e3f5;
      border-radius: 8px;
      background: #f7fbff;
      padding: 8px;
      margin-top: 10px;
    }
    .planner-object-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid #e4edf9;
    }
    .planner-object-row:last-child {
      border-bottom: 0;
    }
    .planner-object-row strong {
      min-width: 96px;
      color: #244166;
    }
    .planner-object-row input,
    .planner-object-row select {
      width: 88px;
    }
    .planner-object-chip {
      display: inline-flex;
      align-items: center;
      padding: 4px 8px;
      border-radius: 999px;
      background: #edf4ff;
      color: #244166;
      font-size: 11px;
      border: 1px solid #d3e2fb;
    }
    .planner-object-empty {
      font-size: 12px;
      color: #5a6f86;
    }
    .planner-object-hitbox {
      width: 54px;
      height: 54px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: grab;
      touch-action: none;
    }
    .planner-object-hitbox:active {
      cursor: grabbing;
    }
    .planner-object-badge {
      background: #0f6a7c;
      color: #fff;
      border: 2px solid #fff;
      border-radius: 999px;
      min-width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      box-shadow: 0 1px 4px rgba(0,0,0,0.2);
      pointer-events: none;
    }
    .planner-object-badge.turbine {
      background: #0f6a7c;
    }
    .planner-object-badge.building {
      background: #8a5a1f;
    }
    .touch-friendly-note {
      color: #4a5c70;
      font-size: 12px;
      margin-top: 4px;
    }
    .compact-details {
      margin-top: 6px;
      font-size: 12px;
    }
    .compact-details summary {
      cursor: pointer;
      user-select: none;
      color: #244166;
      font-weight: 600;
      list-style: none;
    }
    .compact-details summary::-webkit-details-marker {
      display: none;
    }
    .compact-details summary::before {
      content: '+ ';
      color: #5a7aa5;
    }
    .compact-details[open] summary::before {
      content: '- ';
    }
    .compact-details .help-text,
    .compact-details .compact-panel {
      margin-top: 6px;
      padding: 8px 10px;
      border: 1px solid #d8e3f5;
      border-radius: 8px;
      background: #f7fbff;
    }
    .secondary-controls {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      padding-top: 10px;
      border-top: 1px solid var(--slate-200);
    }
    .secondary-controls .muted-action {
      color: var(--slate-700);
      background: var(--slate-100);
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-md);
      padding: 7px 12px;
    }
    .secondary-controls .danger-action {
      color: #ef4444;
      border: 1px solid #fecaca;
      background: #fff5f5;
      border-radius: var(--radius-md);
      padding: 7px 12px;
    }
    .focal-panel-header {
      margin-bottom: 10px;
    }
    .focal-panel-controls {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
      margin-top: 8px;
    }
    .focal-panel-controls label {
      margin-right: 0;
    }
    .focal-panel-meta {
      margin-bottom: 6px;
    }
    #cameraFocusPanel .focal-panel-controls {
      margin-top: 10px;
    }
    #cameraFocusPanel #focalList {
      max-height: 140px;
    }
    .camera-mode-panel {
      display: grid;
      gap: 10px;
    }
    .camera-mode-row {
      display: flex;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
    }
    .camera-guide-note {
      font-size: 12px;
      color: #4d6478;
    }
    #actionStatus {
      margin-top: 10px;
      padding: 10px 12px;
      border-radius: 8px;
      font-size: 13px;
      display: none;
    }
    #actionStatus.info {
      display: block;
      background: #eef5ff;
      color: #1f4b8f;
      border: 1px solid #cfe0ff;
    }
    #actionStatus.error {
      display: block;
      background: #fff1f0;
      color: #8f2828;
      border: 1px solid #f2c0bb;
    }
    button {
      cursor: pointer;
      border: 1px solid var(--slate-300);
      border-radius: var(--radius-md);
      background: #fff;
      color: var(--slate-700);
      box-shadow: var(--shadow-sm);
      transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    }
    button:hover {
      border-color: var(--brand-600);
      color: var(--brand-800);
      transform: translateY(-1px);
    }
    button:active {
      transform: translateY(1px) scale(0.985);
      filter: brightness(0.98);
      box-shadow: inset 0 2px 6px rgba(7, 17, 31, 0.12);
    }
    .primary-button {
      background: var(--sky-blue);
      border-color: var(--sky-blue);
      color: #fff;
    }
    .primary-button:hover {
      background: #255A86;
      border-color: #255A86;
      color: #fff;
    }
    #generateKmz,
    #downloadGlobePreview,
    #downloadFlythroughPreview {
      background: var(--horizon-orange);
      border-color: var(--horizon-orange);
      color: var(--brand-900);
    }
    #generateKmz:hover,
    #downloadGlobePreview:hover,
    #downloadFlythroughPreview:hover {
      background: #d68b55;
      border-color: #d68b55;
      color: var(--brand-900);
    }
    #deleteProjectButton,
    .destructive-button {
      background: #b42318;
      border-color: #b42318;
      color: #fff;
    }
    #deleteProjectButton:hover,
    .destructive-button:hover {
      background: #912018;
      border-color: #912018;
      color: #fff;
    }
    .map-location-search #locationSearchButton {
      background: var(--brand-accent);
      border-color: var(--brand-accent);
      color: var(--brand-900);
    }
    .map-location-search #locationSearchButton:hover {
      background: #d68b55;
      border-color: #d68b55;
      color: var(--brand-900);
    }
    #startDraw,
    #finishDraw {
      background: transparent;
      border: 1.5px solid var(--brand-700);
      color: var(--brand-700);
    }
    #startDraw:hover,
    #finishDraw:hover {
      background: rgba(47, 107, 159, 0.08);
      border-color: var(--brand-700);
      color: var(--brand-800);
    }
    #validateMission {
      background: rgba(232, 160, 107, 0.08);
      border: 1.5px solid var(--horizon-orange);
      color: #8a4e1d;
    }
    #validateMission:hover {
      background: rgba(232, 160, 107, 0.16);
      border-color: #d68b55;
      color: #7a4518;
    }
    #deleteLastPoint,
    #resetAllTop,
    #saveProjectButton,
    #loadProjectButton,
    #clearPlannerObjectsButton,
    #clearToalpButton,
    #setToalpButton {
      background: var(--slate-100);
      border-color: var(--slate-200);
      color: var(--slate-700);
    }
    #resetAllTop {
      background: transparent;
      border-color: transparent;
      box-shadow: none;
      color: var(--slate-500);
    }
    #resetAllTop:hover {
      background: var(--slate-100);
      border-color: var(--slate-200);
      color: var(--slate-700);
    }
    .draw-button-active {
      background: rgba(47, 107, 159, 0.14) !important;
      border-color: var(--brand-700) !important;
      color: var(--brand-800) !important;
      box-shadow: 0 0 0 3px rgba(47, 107, 159, 0.12), var(--shadow-sm);
    }
    .draw-button-ready {
      background: rgba(232, 160, 107, 0.18) !important;
      border-color: var(--horizon-orange) !important;
      color: var(--brand-900) !important;
      box-shadow: 0 0 0 3px rgba(232, 160, 107, 0.14), var(--shadow-sm);
    }
    .draw-button-warning {
      background: var(--horizon-orange) !important;
      border-color: #d68b55 !important;
      color: var(--brand-900) !important;
      box-shadow: 0 0 0 4px rgba(232, 160, 107, 0.18), 0 10px 22px rgba(232, 160, 107, 0.25);
    }
    .draw-button-idle:not(:disabled) {
      opacity: 0.88;
    }
    button:disabled.draw-button-idle,
    button:disabled.draw-button-active,
    button:disabled.draw-button-ready,
    button:disabled.draw-button-warning {
      opacity: 0.45;
      box-shadow: none;
    }
    @media (max-width: 768px) {
      .topbar {
        z-index: 1000;
        gap: 8px;
        padding: 0;
      }
      .topbar-brand-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 10px 12px;
        padding: 12px 12px 14px;
      }
      .brand-lockup {
        width: 100%;
        margin-right: 0;
        min-width: 0;
      }
      .brand-tagline {
        display: none;
      }
      .mobile-controls-toggle {
        display: inline-flex;
        align-self: start;
      }
      .summary-strip {
        padding: 8px 10px;
        align-items: flex-start;
      }
      .summary-strip .estimate-text {
        font-size: 13px;
      }
        .topbar label {
          width: 100%;
        }
        .brand-name {
          font-size: 26px;
        }
        .search-row,
        .auth-summary {
          grid-column: 1 / -1;
          width: 100%;
          max-height: 0;
          overflow: hidden;
          opacity: 0;
          pointer-events: none;
          margin: 0;
          padding: 0;
          transition: max-height 0.24s ease, opacity 0.18s ease, padding 0.18s ease;
        }
        .topbar.mobile-open .search-row,
        .topbar.mobile-open .auth-summary {
          max-height: 220px;
          opacity: 1;
          pointer-events: auto;
        }
        .topbar.mobile-open .search-row {
          padding-top: 4px;
        }
        .topbar.mobile-open .auth-summary {
          padding-top: 2px;
        }
        .topbar button {
          flex: 1 1 calc(33.333% - 6px);
          min-width: 0;
        }
        .topbar label input {
          flex: 1 1 auto;
          min-width: 0;
        }
        .search-row input {
          flex: 1 1 auto;
          width: auto;
          min-width: 0;
        }
      .topbar-action-row {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        padding-top: 0;
        padding-bottom: 0;
        border-bottom-width: 0;
        transition: max-height 0.24s ease, opacity 0.18s ease, padding 0.18s ease;
      }
      .topbar.mobile-open .topbar-action-row {
        max-height: 820px;
        opacity: 1;
        pointer-events: auto;
        padding: 10px 12px 12px;
        border-bottom-width: 1px;
      }
      .topbar-action-row,
      .topbar-section,
      .topbar-section.center,
      .topbar-actions {
        width: 100%;
      }
      .topbar-section,
      .topbar-section.center,
      .topbar-actions {
        justify-content: flex-start;
      }
      .topbar-actions {
        gap: 8px;
      }
      .mobile-design-stage {
        position: relative;
      }
      .mobile-map-shell {
        position: sticky;
        top: 76px;
        z-index: 20;
        width: calc(100% - 20px);
        margin: 8px auto 0;
      }
      .map-overlay-actions {
        top: 52px;
        left: 8px;
        right: 8px;
        justify-content: space-between;
      }
      .map-tool-overlay {
        top: 104px;
        left: 8px;
        right: 8px;
        max-width: calc(100% - 16px);
      }
      .map-tool-overlay button {
        flex: 1 1 calc(33.333% - 6px);
        padding: 7px 8px;
        font-size: 12px;
      }
      .map-location-search {
        top: 154px;
        left: 8px;
        right: 8px;
        width: auto;
        padding: 6px;
      }
      .map-location-search label {
        font-size: 12px;
      }
      .map-location-search button {
        padding: 7px 8px;
        font-size: 12px;
      }
      .map-selection-overlay {
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
        padding: 10px;
      }
      .map-selection-grid {
        grid-template-columns: 1fr;
      }
      .map-overlay-actions button {
        flex: 1 1 calc(50% - 6px);
        padding: 7px 8px;
        font-size: 12px;
      }
      .mobile-map-action-bar {
        right: 8px;
        width: auto;
      }
      .mobile-map-action-bar button {
        padding: 8px 6px;
      }
      #mobileFinishDraw {
        background: rgba(47, 107, 159, 0.94);
        border-color: rgba(47, 107, 159, 1);
        color: #fff;
      }
      #mobileResetAll {
        color: var(--slate-600);
      }
      #mapWrap {
        width: 100%;
        margin: 0;
      }
      #map {
        width: 100%;
        position: static;
        height: calc(50vh - 40px);
        min-height: 280px;
        margin: 0;
      }
      #mapWrap.is-expanded {
        width: 100%;
        max-width: 100%;
        height: calc(100vh - 98px);
      }
      .toolbar {
        width: calc(100% - 20px);
        padding: 8px 10px 14px;
      }
      .route-design-grid {
        grid-template-columns: 1fr;
        margin-top: 10px;
      }
      .mission-config-section,
      .object-controls-row {
        grid-template-columns: 1fr;
      }
      .camera-standalone-panel,
      .object-controls-row {
        min-height: 0;
      }
      .toolbar-section {
        margin-bottom: 10px;
      }
      .panel {
        padding: 8px;
      }
        #preview3dWrap {
          height: 132px;
        }
        #globePreviewWrap {
          width: calc(100% - 20px);
          height: 240px;
          margin: 6px auto 8px;
        }
        #altitudeEditorWrap {
          height: 118px;
          margin: 4px 0;
        }
      .altitude-editor-frame {
        grid-template-columns: 26px 1fr;
        gap: 6px;
      }
      .altitude-editor-side {
        min-height: 118px;
      }
      #altitudeOffsetControl {
        height: 118px;
      }
      .altitude-selected-panel {
        margin: 4px 0 6px;
        padding: 6px;
      }
      .altitude-control-grid {
        gap: 6px;
        grid-template-columns: 1fr;
      }
      #focalList, #altitudePointList {
        max-height: 90px;
      }
      .preview-controls input[type="range"] {
        width: 140px;
      }
      .help-text {
        font-size: 11px;
      }
      p small {
        font-size: 11px;
      }
      #previewLegend {
        display: none;
      }
      .preview-legend-overlay {
        display: flex;
      }
      .preview-controls {
        margin-top: 4px;
      }
      .touch-friendly-note {
        font-size: 11px;
        line-height: 1.3;
      }
      .altitude-selected-title {
        font-size: 12px;
        margin-bottom: 4px;
      }
      .altitude-control label {
        font-size: 11px;
      }
      .altitude-selected-actions {
        gap: 6px;
      }
      .altitude-selected-actions label {
        font-size: 11px;
        margin-right: 0;
      }
      .altitude-selected-actions input[type="number"] {
        width: 78px;
      }
      .altitude-slider-layout {
        grid-template-columns: 34px 1fr;
        gap: 8px;
      }
      .altitude-slider-vertical-wrap {
        min-height: 118px;
      }
      .altitude-slider-vertical {
        height: 118px;
        width: 24px;
      }
      .object-controls-row {
        gap: 6px;
      }
      .object-controls-row label {
        font-size: 11px;
      }
      .planner-object-row {
        gap: 6px;
      }
      .planner-object-row strong {
        min-width: 78px;
      }
      .import-panel {
        width: min(96vw, 1600px);
        padding: 16px;
      }
      .planner-reminder-strip {
        grid-template-columns: 1fr;
      }
      .planner-footer {
        width: calc(100% - 20px);
        padding: 0 10px 14px;
      }
      .import-panel-grid {
        grid-template-columns: 1fr;
      }
      .path-badge {
        min-width: 22px;
        height: 22px;
        padding: 0 5px;
        line-height: 18px;
        font-size: 11px;
      }
    }

