/* ==========================================================================
   ONE GLOBE - earth.nullschool.net Inspired Ultra-Minimalist Theme
   Deep black space, monospace data HUD, signature gold-capsule buttons,
   and 60 FPS WebGL wind vector field visualization.
   ========================================================================== */

:root {
  --bg-pure-black: #020617;
  --panel-bg: rgba(255, 255, 255, 0.90);
  --panel-border: rgba(0, 0, 0, 0.08);
  --panel-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --accent-gold: #d97706;
  --accent-gold-bg: rgba(217, 119, 6, 0.12);
  --accent-gold-border: rgba(217, 119, 6, 0.65);
  
  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-red: #e11d48;
  
  --font-mono: 'SF Mono', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Pretendard', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --glass-blur: blur(16px);
  --transition-fast: 0.15s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  background-color: var(--bg-pure-black);
  font-family: var(--font-mono);
  color: var(--text-main);
  font-size: 12px;
}

#cesiumContainer {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
  background-color: var(--bg-pure-black);
  touch-action: none;
  overscroll-behavior: none;
}

#cesiumContainer .cesium-viewer,
#cesiumContainer .cesium-widget,
#cesiumContainer .cesium-widget canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

#windCanvas {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 2;
  pointer-events: none;
}

/* Hide default Cesium elements */
.cesium-widget-credits,
.cesium-viewer-toolbar,
.cesium-viewer-animationContainer,
.cesium-viewer-timelineContainer,
.cesium-viewer-bottomContainer {
  display: none !important;
}

#uiRoot {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  z-index: 10;
  pointer-events: none;
}

.interactive {
  pointer-events: auto;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: var(--panel-shadow);
  color: var(--text-main);
}

/* ==========================================================================
   earth.nullschool.net Control Wrapper (Bottom Left)
   ========================================================================== */
.earth-control-wrapper {
  display: none !important;
}

.earth-minimal-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.earth-minimal-btn svg {
  width: 14px;
  height: 14px;
  color: #0284c7;
}

.earth-minimal-btn:hover {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.16);
  transform: translateY(-1px);
}

.mode-pill-group,
.proj-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mode-pill-group .btn-item,
.proj-chips-grid .btn-item {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: var(--transition-fast);
}

.mode-pill-group .btn-item:hover,
.proj-chips-grid .btn-item:hover {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.3);
}

.mode-pill-group .btn-item.active,
.proj-chips-grid .btn-item.active {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.65);
  color: #d97706;
}

.modal-footer-system {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-icon {
  font-size: 14px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.social-icon:hover {
  opacity: 1;
}

.lang-tag {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}

.earth-menu-panel {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 480px;
  animation: fadeIn 0.2s ease-out;
}

.earth-menu-panel.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  line-height: 1.6;
  white-space: nowrap;
}

.row-label {
  width: 72px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
}

.row-divider {
  color: var(--text-dim);
  margin-right: 2px;
}

.row-val {
  color: #0f172a;
  font-weight: 600;
}

.row-val.muted {
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 400;
}

.btn-subtle-toggle {
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 3px;
  color: var(--accent-cyan);
  font-family: inherit;
  font-size: 10px;
  padding: 1px 5px;
  cursor: pointer;
  margin-left: 6px;
  transition: var(--transition-fast);
}

.btn-subtle-toggle:hover {
  background: rgba(2, 132, 199, 0.12);
  border-color: var(--accent-cyan);
}

/* Button Groups */
.btn-group {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

.wrap-group {
  max-width: 320px;
}

.btn-item {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #475569;
  font-family: inherit;
  font-size: 11px;
  padding: 1px 5.5px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-item:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
}

/* Iconic nullschool active gold capsule badge */
.btn-item.active {
  background: var(--accent-gold-bg);
  border: 1px solid var(--accent-gold-border);
  color: var(--accent-gold);
  font-weight: 700;
}

.overlay-row {
  align-items: flex-start;
}

.overlay-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.social-icon {
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s;
}

.social-icon:hover {
  opacity: 1.0;
}

.footer-link {
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
}

.footer-link:hover {
  color: #0f172a;
}

/* Scale Bar */
.scale-row {
  align-items: flex-start;
  padding: 3px 0;
}

.scale-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 260px;
}

.nullschool-scale-bar {
  width: 100%;
  height: 9px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(to right, #001f3f 0%, #0074d9 15%, #2ecc40 30%, #ffdc00 48%, #ff4136 65%, #b10dc9 82%, #ffffff 100%);
}

.scale-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-muted);
}

/* Footer Row */
.footer-row {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 4px;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-tag {
  font-size: 10px;
  color: var(--text-dim);
  margin: 0 4px;
}

/* ==========================================================================
   Point Weather HUD (Appears on click)
   ========================================================================== */
.point-hud-bar {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  z-index: 20;
  animation: fadeIn 0.15s ease-out;
}

.point-reticle-icon {
  color: var(--accent-cyan);
  font-size: 14px;
}

.point-hud-coords {
  color: #0f172a;
  font-weight: 700;
}

.point-hud-divider {
  color: var(--text-dim);
}

.point-hud-vector {
  color: var(--accent-gold);
  font-weight: 600;
}

.point-hud-extra {
  color: var(--text-muted);
}

.btn-subtle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: var(--transition-fast);
}

.btn-subtle:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Surface Weather Layer & Map Visibility Settings Modal
   ========================================================================== */
.layer-settings-modal {
  position: fixed;
  top: 70px;
  bottom: 24px;
  left: 20px;
  width: 410px;
  height: auto;
  max-height: calc(100vh - 94px);
  overflow: hidden;
  box-sizing: border-box;
  padding: 16px 18px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 65;
  animation: fadeIn 0.2s ease-out;
}

.layer-settings-modal .card-header-common {
  flex-shrink: 0;
  margin-bottom: 0;
}

/* Thematic Category Tabs in Layer Settings Modal (Pinned) */
.layer-cat-tabs {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 2px;
}

.layer-settings-body {
  flex: 1 1 0px;
  min-height: 0px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.layer-settings-body::-webkit-scrollbar {
  width: 5px;
}

.layer-settings-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
}

.layer-settings-body::-webkit-scrollbar-thumb:hover {
  background: rgba(2, 132, 199, 0.45);
}

.layer-cat-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.layer-cat-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #64748b;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.layer-cat-tab:hover {
  background: rgba(255, 255, 255, 0.65);
  color: #0f172a;
}

.layer-cat-tab.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.layer-cat-tab svg {
  width: 14px;
  height: 14px;
}

.layer-cat-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.16s ease-out;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
}

.settings-section.highlight-box {
  background: rgba(2, 132, 199, 0.05);
  border: 1px solid rgba(2, 132, 199, 0.3);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-badge {
  font-size: 10px;
  font-weight: 700;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.25);
  padding: 2px 8px;
  border-radius: 10px;
}

.section-badge.gold {
  color: #d97706;
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.35);
}

/* Overlay Chips Grid */
.overlay-chips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.layer-chip {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.layer-chip:hover {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.4);
  color: #0284c7;
  transform: translateY(-1px);
}

.layer-chip.active {
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid #0284c7;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.2);
}

.chip-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.chip-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Base Map Chips Grid */
.basemap-chips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.basemap-chip {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.basemap-chip:hover {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.4);
  color: #0284c7;
  transform: translateY(-1px);
}

.basemap-chip.active {
  background: rgba(2, 132, 199, 0.15);
  border: 1.5px solid #0284c7;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.2);
}

.basemap-chip .chip-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.basemap-chip .chip-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.basemap-chip .chip-main {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.basemap-chip .chip-sub {
  font-size: 9.5px;
  color: #64748b;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.basemap-chip.active .chip-sub {
  color: #0369a1;
}

/* Height Chips Grid */
.height-chips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.height-chip {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.height-chip:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

.height-chip.active {
  background: rgba(217, 119, 6, 0.15);
  border-color: #d97706;
  color: #d97706;
  font-weight: 700;
}

/* Toggle Rows & Slider Rows */
.setting-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.setting-toggle-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-title {
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
  letter-spacing: -0.2px;
}

.toggle-desc {
  display: none;
}

.setting-slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 4px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-title {
  font-size: 11px;
  color: #334155;
  font-weight: 600;
}

.slider-val {
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
}

/* ==========================================================================
   Mode Sub-Panel (Geo / Typhoon / City / Map)
   ========================================================================== */
.mode-sub-panel {
  position: absolute;
  top: 76px;
  left: 20px;
  width: 350px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 25;
  animation: fadeIn 0.2s ease-out;
}

.subpanel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 6px;
}

.subpanel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
}

.subpanel-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subpanel-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subpanel-toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #334155;
  cursor: pointer;
  padding: 3px 0;
}

.subpanel-toggle-item input[type="checkbox"] {
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.subpanel-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.subpanel-select {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--panel-border);
  color: #0f172a;
  padding: 4px 6px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
}

.subpanel-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.subpanel-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-muted);
}

.subpanel-slider {
  width: 100%;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.subpanel-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 4px;
}

/* Compact Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.12);
  transition: .2s;
  border-radius: 18px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-cyan);
}

input:checked + .slider:before {
  transform: translateX(14px);
}

/* ==========================================================================
   Windy Style 5-Day Meteogram Drawer
   ========================================================================== */
.meteogram-drawer {
  position: absolute;
  bottom: 20px;
  left: 480px;
  right: 40px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 22;
  animation: fadeIn 0.2s ease-out;
}

.meteogram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 6px;
}

.meteogram-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meteogram-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.meteogram-location {
  font-size: 11px;
  color: var(--accent-cyan);
  background: rgba(2, 132, 199, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.meteogram-chart-content {
  width: 100%;
  overflow-x: auto;
}

.meteogram-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meteogram-legend-row {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.meteogram-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.temp-dot { background: #ff7675; }
.app-dot { background: #fab1a0; }
.rain-dot { background: #00cec9; }
.wind-dot { background: #00d2ff; }

.meteogram-svg-container {
  position: relative;
  width: 100%;
}

.meteogram-svg {
  width: 100%;
  height: auto;
  max-height: 230px;
}

.meteogram-tooltip {
  position: absolute;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  pointer-events: none;
  font-size: 11px;
  color: #0f172a;
  z-index: 30;
  min-width: 140px;
}

.tip-header {
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 2px;
}

.tip-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.5;
}

.tip-lbl {
  color: var(--text-muted);
}

.meteogram-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
}

/* ==========================================================================
   Google Earth Great-Circle Ruler / Measure Tool HUD
   ========================================================================== */
.measure-hud {
  position: absolute;
  top: 60px;
  left: 20px;
  width: 300px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 25;
  animation: fadeIn 0.2s ease-out;
  border: 1px solid rgba(2, 132, 199, 0.35);
}

.measure-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 6px;
}

.measure-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.btn-close-measure {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 3px;
}

.btn-close-measure:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
}

.measure-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.measure-metric-main {
  background: rgba(2, 132, 199, 0.06);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.measure-val-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.measure-val-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.measure-val-unit {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.measure-sub-units {
  font-size: 10px;
  color: var(--text-muted);
}

.measure-details-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.measure-detail-item {
  background: rgba(0, 0, 0, 0.03);
  padding: 6px 8px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.detail-label {
  font-size: 9px;
  color: var(--text-muted);
}

.detail-val {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
}

.measure-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-measure-act {
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: #0f172a;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-measure-act:hover {
  background: rgba(225, 29, 72, 0.12);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.measure-hint {
  font-size: 9px;
  color: var(--text-muted);
}

/* ==========================================================================
   Bottom Right Minimal Branding
   ========================================================================== */
.bottom-right-branding {
  position: absolute;
  bottom: 20px;
  left: 140px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #475569;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  z-index: 20;
}

.app-dot {
  font-size: 12px;
}

.app-name {
  color: #0f172a;
  font-weight: 600;
}

.app-close {
  cursor: pointer;
  margin-left: 4px;
  font-size: 10px;
  color: var(--text-dim);
}

.app-close:hover {
  color: #0f172a;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* Brand Badge in Top Search Bar */
.top-brand-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 2px;
  cursor: default;
  flex-shrink: 0;
}

.top-brand-badge .app-dot {
  font-size: 13px;
}

.top-brand-badge .app-brand-name {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
}

/* ==========================================================================
   Integrated Weather Status inside Top Bar (Minimalist Chip)
   ========================================================================== */
.topbar-weather-pill {
  display: inline-flex;
  align-items: center;
  user-select: none;
  flex-shrink: 0;
}

.btn-pill-info-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.035);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  height: 28px;
  padding: 0 10px;
  margin: 0;
  cursor: pointer;
  color: #334155;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-pill-info-trigger:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.25);
  color: #0284c7;
}

.pill-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  flex-shrink: 0;
  animation: pulseGreen 2s infinite ease-in-out;
}

.hud-pill-data-val {
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

/* ==========================================================================
   Weather Info Modal (Detailed Observation Popup Panel)
   ========================================================================== */
.weather-info-modal {
  top: 72px;
  left: 20px;
  width: 350px;
  max-width: calc(100vw - 40px);
  padding: 16px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

.weather-info-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-card-section {
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.info-sec-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.info-icon-sm {
  width: 13px;
  height: 13px;
  color: #0284c7;
}

.info-time-display-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.info-date-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.info-live-tag {
  font-size: 9px;
  font-weight: 800;
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 6px;
  padding: 2px 6px;
  letter-spacing: 0.3px;
}

.info-layer-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.info-chip-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  color: #334155;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.info-chip-badge.active {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.3);
  font-weight: 700;
}

.hud-source-val {
  font-size: 10px;
  color: #64748b;
  font-family: var(--font-mono);
}

.info-desc-text {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
  margin: 2px 0 0 0;
}

.btn-info-modal-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-info-modal-action:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.btn-info-modal-action svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Google Earth Style Top Floating Search & Preset Bar
   ========================================================================== */
/* ==========================================================================
   Google Earth Style Top Floating Search & Preset Bar (Minimalist Redesign)
   ========================================================================== */
.top-search-bar {
  position: fixed;
  top: 16px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  z-index: 50;
  max-width: calc(100vw - 40px);
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.035);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 0 8px;
  height: 28px;
  transition: all 0.2s ease;
}

.search-input-wrap:focus-within {
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.4);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.12);
}

.search-icon {
  width: 14px;
  height: 14px;
  color: #94a3b8;
  flex-shrink: 0;
}

#inputCitySearch {
  width: 120px;
  background: transparent;
  border: none;
  outline: none;
  color: #0f172a;
  font-family: var(--font-sans);
  font-size: 11.5px;
  padding: 2px 0;
  transition: width 0.2s ease;
}

#inputCitySearch:focus {
  width: 160px;
}

#inputCitySearch::placeholder {
  color: #94a3b8;
  font-size: 11px;
}

.btn-clear-search {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 50%;
}
.btn-clear-search:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
}

.search-dropdown {
  position: absolute;
  top: 50px;
  left: 0;
  width: 300px;
  max-height: 260px;
  overflow-y: auto;
  border-radius: 12px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  z-index: 100;
}

.search-item {
  display: flex;
  flex-direction: column;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.search-item:hover {
  background: rgba(2, 132, 199, 0.1);
}
.search-item-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  font-family: var(--font-sans);
}
.search-item-sub {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 1px;
  font-family: var(--font-sans);
}

.top-nav-presets {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.035);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #475569;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  padding: 0 9px;
  height: 28px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-nav-item svg {
  width: 13px;
  height: 13px;
}

.btn-nav-item:hover {
  background: rgba(0, 0, 0, 0.07);
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.12);
}

.btn-nav-item.active {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.4);
  font-weight: 600;
}

.btn-nav-lesson {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.22);
  color: #2563eb;
  font-weight: 600;
}

.btn-nav-lesson:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
  color: #1d4ed8;
}

.btn-nav-lesson.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-nav-lesson.active svg {
  color: #ffffff !important;
}

.btn-nav-settings.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.btn-nav-settings.active svg {
  color: #ffffff !important;
}

.btn-nav-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
}

/* ==========================================================================
   Quick Layer Dock (Deprecated: Integrated into Control Center)
   ========================================================================== */
.quick-layer-dock {
  display: none !important;
}

.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: var(--dock-btn-w, 44px);
  flex: 1 1 0;
  min-height: 0;
  max-height: 44px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s ease;
  box-sizing: border-box;
  padding: 0;
}

.dock-btn svg {
  width: clamp(11px, 1.8vh, 15px);
  height: clamp(11px, 1.8vh, 15px);
  margin-bottom: 1px;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.dock-label {
  font-family: var(--font-sans);
  font-size: clamp(6.8px, 1.0vh, 8.5px);
  font-weight: 500;
  letter-spacing: -0.3px;
  line-height: 1;
  transition: font-size 0.15s ease;
  pointer-events: none;
  white-space: nowrap;
}

.dock-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

.dock-btn:hover svg {
  transform: scale(1.12);
}

.dock-btn.active {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.6);
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.2);
}

.dock-divider {
  width: 20px;
  height: 1px;
  min-height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 1px auto;
  border-radius: 1px;
  flex-shrink: 0;
}

/* ==========================================================================
   Centralized Unified Card & Modal Component System
   ========================================================================== */
.unified-card-modal {
  position: absolute;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  font-family: var(--font-sans);
  z-index: 60;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.sheet-drag-handle {
  display: none;
}

.mobile-sheet-close-row {
  display: none;
}

.card-header-common {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.weather-card-modal {
  top: 76px;
  left: 20px;
  width: 370px;
  max-width: calc(100vw - 40px);
  padding: 16px 18px;
  animation: cardFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.weather-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.card-location-name {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.card-coords {
  display: block;
  font-size: 11px;
  color: #64748b;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.btn-card-close {
  background: rgba(0, 0, 0, 0.04);
  border: none;
  color: #64748b;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.15s ease;
}
.btn-card-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

.weather-card-main {
  margin-bottom: 14px;
}

.weather-temp-section {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.card-temp {
  font-size: 42px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -1.5px;
}

.weather-temp-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-desc {
  font-size: 14px;
  font-weight: 600;
  color: #0284c7;
}

.card-apparent {
  font-size: 12px;
  color: #64748b;
}

.weather-grid-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.metric-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  padding: 8px 10px;
}

.metric-icon {
  width: 16px;
  height: 16px;
  color: #0284c7;
  flex-shrink: 0;
}

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
}

.metric-val {
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
}

.weather-card-meteogram {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 12px;
}

.meteogram-title-bar {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

/* ==========================================================================
   Windy Style Bottom Interactive Time Scrubber Bar (Modern Collapsible)
   ========================================================================== */
.time-scrubber-container {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.10);
  z-index: 45;
  font-family: var(--font-sans);
  user-select: none;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.25s ease,
              box-shadow 0.25s ease,
              transform 0.25s ease,
              background 0.2s ease,
              border-color 0.2s ease;
}

/* 1. Collapsed State (평상시 접힘 캡슐) */
.time-scrubber-container.is-collapsed {
  width: auto !important;
  max-width: 320px !important;
  padding: 5px 8px 5px 14px !important;
  border-radius: 20px !important;
  cursor: pointer;
}

.time-scrubber-container.is-collapsed:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: 0 14px 32px rgba(2, 132, 199, 0.16);
  transform: translateX(-50%) translateY(-2px);
}

.scrubber-collapsed-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.time-scrubber-container.is-collapsed .scrubber-collapsed-bar {
  display: flex;
}

.time-scrubber-container:not(.is-collapsed) .scrubber-collapsed-bar {
  display: none;
}

.scrubber-collapsed-icon {
  font-size: 13px;
  line-height: 1;
}

.scrubber-collapsed-time {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.2px;
}

.scrubber-quick-play-btn {
  background: rgba(2, 132, 199, 0.10);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: #0284c7;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  margin-left: 2px;
}

.scrubber-quick-play-btn:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  transform: scale(1.08);
}

.scrubber-quick-play-btn.active {
  background: #d97706;
  border-color: #d97706;
  color: #ffffff;
}

.scrubber-expand-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #64748b;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.time-scrubber-container.is-collapsed:hover .scrubber-expand-hint {
  color: #0284c7;
  transform: translateY(-2px);
}

/* 2. Expanded State (펼침 조작 패널) */
.time-scrubber-container:not(.is-collapsed) {
  width: 580px;
  max-width: calc(100vw - 320px);
  padding: 10px 18px 12px 18px;
  border-radius: 22px;
}

.time-scrubber-container:not(.is-collapsed) .scrubber-expanded-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.time-scrubber-container.is-collapsed .scrubber-expanded-content {
  display: none;
}

.scrubber-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scrubber-btn {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #334155;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.scrubber-btn:hover {
  background: rgba(2, 132, 199, 0.12);
  border-color: rgba(2, 132, 199, 0.4);
  color: #0284c7;
  transform: translateY(-1px);
}

.scrubber-btn-play {
  width: 32px;
  height: 32px;
  background: #0284c7;
  border: 1px solid #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.scrubber-btn-play:hover {
  background: #0369a1;
  border-color: #0369a1;
  color: #ffffff;
  transform: scale(1.06);
}

.scrubber-btn-play.active {
  background: #d97706;
  border-color: #d97706;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

.scrubber-btn-now {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: #0284c7;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.scrubber-btn-now:hover {
  background: rgba(2, 132, 199, 0.16);
  border-color: #0284c7;
  transform: translateY(-1px);
}

.scrubber-time-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.25);
  padding: 4px 12px;
  border-radius: 12px;
  letter-spacing: 0.2px;
}

.scrubber-btn-collapse {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.scrubber-btn-collapse:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
  transform: translateY(1px);
}

.scrubber-slider-track {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.scrubber-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.08);
  outline: none;
  cursor: pointer;
  margin: 6px 0 12px 0;
  transition: background 0.15s;
}

.scrubber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.45);
  cursor: pointer;
  border: 2px solid #ffffff;
  transition: transform 0.12s, box-shadow 0.12s;
}

.scrubber-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.6);
}

.scrubber-ticks {
  position: relative;
  width: 100%;
  height: 16px;
}

.scrubber-day-marker {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 9.5px;
  color: #64748b;
  white-space: nowrap;
}

.scrubber-day-label {
  font-weight: 600;
  color: #334155;
}

.scrubber-date-label {
  font-size: 8.5px;
  color: #94a3b8;
}

/* ==========================================================================
   Disaster (USGS Earthquake) & Flight Modals
   ========================================================================== */
.disaster-card-modal,
.flight-card-modal {
  position: absolute;
  top: 76px;
  right: 80px;
  width: 340px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  padding: 16px 18px;
  z-index: 60;
  font-family: var(--font-sans);
  animation: cardFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.disaster-header,
.flight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.disaster-title-wrap,
.flight-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.disaster-icon,
.flight-icon {
  width: 18px;
  height: 18px;
  color: #0284c7;
}

.disaster-title,
.flight-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.disaster-mag-section {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.eq-mag-val {
  font-size: 32px;
  font-weight: 800;
  color: #ef4444;
  line-height: 1;
}

.eq-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.eq-place {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.eq-depth {
  font-size: 11px;
  color: #64748b;
}

.disaster-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #64748b;
  padding: 4px 2px;
}

.eq-tsunami {
  color: #0284c7;
  font-weight: 600;
}

.flight-route-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 12px;
}

.flight-city {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.flight-arrow {
  color: #0284c7;
  font-weight: 800;
}

.flight-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ==========================================================================
   High School Earth Science Lesson & Inquiry Themes Modal
   ========================================================================== */
.lesson-themes-modal {
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  width: 740px;
  max-width: calc(100vw - 40px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px 24px;
  z-index: 70;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
  animation: cardFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lesson-intro-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(2, 132, 199, 0.08));
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.lesson-intro-title {
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 4px;
}

.lesson-intro-desc {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.45;
}

.lesson-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.lesson-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.lesson-card:hover {
  transform: translateY(-2px);
  border-color: #2563eb;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.14);
}

.lesson-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lesson-badge {
  font-size: 10px;
  font-weight: 700;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.lesson-target-tag {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  font-family: var(--font-mono);
}

.lesson-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-card-icon {
  width: 18px;
  height: 18px;
  color: #2563eb;
  flex-shrink: 0;
}

.lesson-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.lesson-desc {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.45;
}

.lesson-guide-preview {
  background: rgba(248, 250, 252, 0.9);
  border: 1px dashed rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  color: #334155;
  line-height: 1.4;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.lesson-guide-preview .guide-icon {
  width: 13px;
  height: 13px;
  color: #eab308;
  flex-shrink: 0;
  margin-top: 1px;
}

.btn-lesson-apply {
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #2563eb;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lesson-card:hover .btn-lesson-apply {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.btn-lesson-apply svg {
  width: 13px;
  height: 13px;
}

/* Info Guide Box & Scale Guide Text */
.info-guide-box {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.4), rgba(254, 249, 195, 0.5)) !important;
  border: 1px solid rgba(234, 179, 8, 0.35) !important;
}

.info-guide-text {
  font-size: 11.5px;
  color: #451a03;
  line-height: 1.5;
}

.info-guide-text strong {
  color: #b45309;
}

.scale-guide-text {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
}

/* ==========================================================================
   Mobile-First Responsive Architecture (768px & 480px Breakpoints)
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Top Search Bar: Flexible Mobile Adaptation */
  .top-search-bar {
    top: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    padding: 6px 10px;
    gap: 6px;
    border-radius: 16px;
  }

  .search-input-wrap {
    flex: 1;
    min-width: 0;
  }

  #inputCitySearch {
    width: 100%;
    font-size: 13px;
  }

  .top-nav-presets {
    gap: 4px;
  }

  .btn-nav-item {
    padding: 0 7px;
    font-size: 11px;
    height: 28px;
    min-height: 28px;
  }

  .btn-nav-icon {
    width: 28px;
    height: 28px;
    padding: 0;
  }

  /* 1.1 Integrated Weather Info Section on Mobile */
  .topbar-weather-pill {
    gap: 4px !important;
  }

  .btn-pill-info-trigger {
    font-size: 10.5px !important;
    padding: 0 7px !important;
    height: 28px !important;
    gap: 4px !important;
  }

  .hud-pill-data-val {
    max-width: 110px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px !important;
  }

  /* 2. Quick Layer Dock: Bottom Horizontal Scrolling Chip Bar */
  .quick-layer-dock {
    top: auto !important;
    right: 8px !important;
    left: 8px !important;
    bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
    transform: none !important;
    flex-direction: row !important;
    width: auto !important;
    max-width: none !important;
    height: 44px !important;
    padding: 4px 6px !important;
    gap: 5px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    scrollbar-width: none;
    z-index: 40 !important;
  }

  .quick-layer-dock::-webkit-scrollbar {
    display: none;
  }

  .dock-btn {
    width: auto !important;
    min-width: 48px !important;
    height: 36px !important;
    padding: 2px 6px !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
  }

  .dock-btn svg {
    width: 14px !important;
    height: 14px !important;
    margin-bottom: 0px !important;
  }

  .dock-label {
    font-size: 9px !important;
  }

  .dock-divider {
    width: 1px !important;
    height: 22px !important;
    margin: auto 2px !important;
  }

  /* 3. Time Scrubber: Mobile Collapsible */
  .time-scrubber-container:not(.is-collapsed) {
    left: 8px !important;
    right: 8px !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    padding: 8px 12px !important;
    border-radius: 16px !important;
    z-index: 45 !important;
  }

  .time-scrubber-container.is-collapsed {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .scrubber-slider {
    margin: 3px 0 6px 0 !important;
  }

  .scrubber-slider::-webkit-slider-thumb {
    width: 20px !important;
    height: 20px !important;
  }

  /* 4. Unified Modals: Native Mobile Bottom Sheets */
  .unified-card-modal,
  .lesson-themes-modal,
  .weather-info-modal,
  .layer-settings-modal,
  .weather-card-modal,
  .disaster-card-modal,
  .flight-card-modal,
  .mode-sub-panel,
  .meteogram-drawer {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 72vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px 16px calc(24px + env(safe-area-inset-bottom, 12px)) 16px !important;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.20) !important;
    z-index: 90 !important;
    animation: slideUpSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .sheet-drag-handle {
    display: block !important;
    width: 40px;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    margin: 0 auto 10px auto;
  }

  .mobile-sheet-close-row {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .sheet-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
  }

  .btn-sheet-close {
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 13px;
    font-weight: bold;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  .btn-sheet-close:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #0f172a;
  }

  /* 5. Earth Menu Panel on Mobile: Floating Pill & Native Bottom Sheet */
  .earth-control-wrapper {
    top: 60px !important;
    left: 10px !important;
    bottom: auto !important;
    z-index: 50 !important;
  }

  .earth-toggle-btn {
    font-size: 12px !important;
    padding: 6px 12px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
  }

  .earth-menu-panel {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 12px)) 16px !important;
    z-index: 95 !important;
    animation: slideUpSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .menu-row {
    flex-wrap: wrap !important;
    white-space: normal !important;
    gap: 6px !important;
    padding: 3px 0 !important;
  }

  .row-label {
    width: 65px !important;
    text-align: left !important;
  }

  .scale-bar-wrap {
    width: 100% !important;
  }

  /* 6. Point HUD bar */
  .point-hud-bar {
    top: 60px !important;
    left: 10px !important;
    right: 10px !important;
    font-size: 11px !important;
    padding: 6px 10px !important;
    flex-wrap: wrap !important;
  }

  /* 7. Google Earth Navigation Controls: Ergonomic Thumb Touch Floating Widget */
  .google-earth-nav-controls {
    right: calc(12px + env(safe-area-inset-right, 0px)) !important;
    bottom: calc(105px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 8px !important;
    z-index: 55 !important;
  }

  .ge-compass-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
  }

  .ge-zoom-group {
    display: flex !important;
    flex-direction: column !important;
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 16px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16) !important;
    overflow: hidden !important;
  }

  .ge-zoom-group .ge-btn-sub {
    display: flex !important;
    width: 46px !important;
    height: 44px !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    transition: background 0.12s ease, transform 0.1s ease !important;
  }

  .ge-zoom-group .ge-btn-sub:first-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }

  .ge-zoom-group .ge-btn-sub:active,
  .ge-zoom-group .ge-btn-sub.active {
    background: rgba(2, 132, 199, 0.20) !important;
    color: #0284c7 !important;
    transform: scale(0.92) !important;
  }

  .ge-tilt-group {
    display: none !important; /* Tilt on small mobile is handled by 3D button and 2-finger swipe */
  }

  .ge-altitude-badge {
    display: block !important;
    font-size: 9.5px !important;
    padding: 2px 6px !important;
    background: rgba(255, 255, 255, 0.88) !important;
    border-radius: 8px !important;
    color: #475569 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    white-space: nowrap !important;
    pointer-events: none !important;
  }

  /* 8. Hide desktop-only branding on mobile */
  .bottom-right-branding {
    display: none !important;
  }
}

@keyframes slideUpSheet {
  from {
    transform: translateY(100%);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .btn-nav-item span {
    display: none !important;
  }

  #btnNavMeasure,
  #btnNavSettings,
  #btnNavFullscreen {
    display: none !important;
  }

  .top-search-bar input {
    font-size: 11.5px !important;
  }

  .btn-nav-item {
    padding: 6px 8px !important;
  }

  .weather-grid-metrics,
  .flight-metrics-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .card-temp {
    font-size: 32px !important;
  }

  .layer-cat-tabs {
    overflow-x: auto;
    gap: 2px;
    padding: 3px;
    scrollbar-width: none;
  }

  .layer-cat-tabs::-webkit-scrollbar {
    display: none;
  }

  .layer-cat-tab {
    padding: 6px 4px;
    font-size: 10px;
    gap: 3px;
  }

  .layer-cat-tab svg {
    width: 13px;
    height: 13px;
  }
}

/* ==========================================================================
   Google Earth Style 3D Navigation Controls
   ========================================================================== */
.google-earth-nav-controls {
  position: fixed;
  right: 84px;
  bottom: clamp(6px, 1.8vh, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2px, 0.6vh, 5px);
  z-index: 55;
  pointer-events: auto;
  user-select: none;
}

.ge-nav-btn {
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.18s ease;
}

.ge-nav-btn:hover {
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.5);
  color: #0284c7;
  transform: scale(1.06);
}

.ge-nav-btn:active {
  transform: scale(0.96);
}

/* 3D Compass Widget */
.ge-compass-btn {
  width: clamp(28px, 4.2vh, 40px);
  height: clamp(28px, 4.2vh, 40px);
  padding: 0;
  position: relative;
  background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
  border: 2px solid rgba(0, 0, 0, 0.12);
}

.ge-compass-btn:hover {
  border-color: #0284c7;
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.25);
}

.ge-compass-outer {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ge-compass-needle {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  pointer-events: none;
  transition: transform 0.08s linear;
  will-change: transform;
}

.ge-needle-north {
  color: #ef4444;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-shadow: 0 0 4px rgba(239, 68, 68, 0.8);
}

.ge-needle-north small {
  font-size: 8px;
  font-family: var(--font-mono);
  margin-top: -1px;
}

.ge-needle-south {
  color: #64748b;
  font-size: 9px;
  line-height: 1;
  font-weight: bold;
}

/* Grouped Step Buttons (Tilt & Zoom) */
.ge-btn-group {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ge-btn-sub {
  width: clamp(26px, 3.6vh, 36px);
  height: clamp(16px, 2.4vh, 24px);
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  font-size: clamp(9px, 1.2vh, 12px);
  font-weight: bold;
  color: #475569;
}

.ge-btn-sub:first-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ge-btn-sub:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0284c7;
  transform: none;
}

.ge-btn-sub:active {
  background: rgba(2, 132, 199, 0.15);
}

/* Live Camera Altitude Badge */
.ge-altitude-badge {
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #475569;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
}



/* ==========================================================================
   Height-Based Responsive UI Architecture (Laptops, Low-res & Landscape)
   Prevents vertical cut-off on 768p, 720p, 600p and zoomed screens
   ========================================================================== */
@media (min-width: 769px) and (max-height: 780px) {
  .quick-layer-dock {
    gap: var(--dock-gap, 2px);
    padding: var(--dock-padding, 4px 3px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .dock-btn {
    width: var(--dock-btn-w, 42px) !important;
    border-radius: 8px;
  }

  .dock-btn svg {
    width: var(--dock-icon-size, 14px) !important;
    height: var(--dock-icon-size, 14px) !important;
    margin-bottom: 1px;
  }

  .dock-label {
    font-size: var(--dock-font-size, 8px) !important;
  }

  .dock-divider {
    margin: 1px auto;
  }

  .google-earth-nav-controls {
    bottom: 12px !important;
    gap: 4px !important;
  }

  .ge-compass-btn {
    width: 36px !important;
    height: 36px !important;
  }

  .ge-btn-sub {
    width: 30px !important;
    height: 22px !important;
    font-size: 11px !important;
  }

  .ge-altitude-badge {
    display: none !important;
  }

  .unified-card-modal {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
}

@media (min-width: 769px) and (max-height: 620px) {
  .quick-layer-dock {
    gap: var(--dock-gap, 1px);
    padding: var(--dock-padding, 3px 2px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .dock-btn {
    width: var(--dock-btn-w, 38px) !important;
  }

  .dock-btn svg {
    width: var(--dock-icon-size, 12px) !important;
    height: var(--dock-icon-size, 12px) !important;
    margin-bottom: 0px;
  }

  .dock-label {
    font-size: var(--dock-font-size, 7.5px) !important;
  }

  .google-earth-nav-controls {
    bottom: 8px !important;
    gap: 3px !important;
  }

  .ge-compass-btn {
    width: 30px !important;
    height: 30px !important;
  }

  .ge-btn-3d {
    width: 28px !important;
    height: 28px !important;
    font-size: 10px !important;
  }

  .ge-btn-sub {
    width: 28px !important;
    height: 18px !important;
    font-size: 10px !important;
  }

  .ge-altitude-badge {
    display: none !important;
  }
}

/* ==========================================================================
   Comprehensive Screen Auto-Adaptation & Responsive Architecture
   Flawlessly handles Tablets, Foldables, Split-screen desktop, Laptops & 4K
   ========================================================================== */

/* 1. Medium Screens / Tablets & Split-Screen Desktop (769px ~ 1180px) */
@media (min-width: 769px) and (max-width: 1180px) {
  .top-search-bar {
    left: 16px;
    max-width: calc(100vw - 90px);
    padding: 5px 10px;
    gap: 8px;
  }

  .search-input-wrap input {
    width: clamp(170px, 20vw, 250px);
  }

  /* Compact preset buttons on narrower desktop/tablet screens */
  #btnNavMeasure span,
  #btnNavSettings span,
  #btnNavFullscreen span {
    display: none !important;
  }

  .btn-nav-item {
    padding: 6px 8px;
  }

  /* Prevent bottom overlap: fluid time scrubber and hide watermark logo */
  .time-scrubber-container {
    width: clamp(340px, 42vw, 480px);
    padding: 6px 14px;
    bottom: 16px;
  }

  .bottom-right-branding {
    display: none !important;
  }

  .google-earth-nav-controls {
    right: 70px !important;
    bottom: 16px !important;
  }
}

/* 2. Narrow Desktop / Split Windows (769px ~ 960px) */
@media (min-width: 769px) and (max-width: 960px) {
  #btnNavSeoul span {
    display: none !important;
  }

  .time-scrubber-container {
    width: clamp(300px, 38vw, 400px);
    padding: 5px 10px;
  }

  .scrubber-date-labels span {
    font-size: 9px;
  }

  .earth-control-wrapper {
    left: 10px;
    bottom: 12px;
  }

  .google-earth-nav-controls {
    right: 64px !important;
    bottom: 12px !important;
  }

  .ge-altitude-badge {
    display: none !important;
  }
}

/* 3. Ultra-Low Height (Laptops with Taskbars, Landscape Phones, Split Horizontal: <= 540px) */
@media (min-width: 769px) and (max-height: 540px) {
  .top-search-bar {
    top: 6px;
    padding: 4px 8px;
  }

  .quick-layer-dock {
    max-height: calc(100vh - 12px);
    overflow-y: auto;
    padding: 2px;
    gap: 1px;
  }

  .time-scrubber-container {
    bottom: 6px;
    padding: 4px 8px;
  }

  .earth-control-wrapper {
    bottom: 6px;
  }

  .google-earth-nav-controls {
    bottom: 6px !important;
  }

  .ge-tilt-group,
  .ge-zoom-group {
    display: none !important;
  }
}

/* 4. Large / Ultra-Wide & 4K Displays (>= 1921px) */
@media (min-width: 1921px) {
  html, body {
    font-size: 13px;
  }

  .top-search-bar {
    top: 24px;
    left: 28px;
    max-width: 760px;
    padding: 8px 16px;
    border-radius: 28px;
  }

  .search-input-wrap input {
    font-size: 14px;
  }

  .time-scrubber-container {
    width: 600px;
    bottom: 28px;
    padding: 10px 20px;
    border-radius: 22px;
  }

  .quick-layer-dock {
    right: 24px;
    padding: 8px 6px;
  }

  .dock-btn {
    width: var(--dock-btn-w, 52px) !important;
  }

  .google-earth-nav-controls {
    right: 96px;
    bottom: 28px;
    gap: 10px;
  }
}




