/* ================================================================
   Shared stylesheet — paragliding air flow simulator
   All pages link this file. Page-specific rules stay inline.
   ================================================================ */

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Base ── */
body {
  background: #0a0f1a;
  color: #c8d8e8;
  font-family: 'Segoe UI', sans-serif;
}

canvas {
  display: block;
}

/* ================================================================
   Navigation bar  (identical across all pages)
   ================================================================ */

#header-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  z-index: 3000;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 2px;
  background: rgba(6, 10, 20, 0.92);
  border-bottom: 1px solid rgba(100, 160, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  margin-right: 4px;
  color: #7eb8ff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s;
}

.nav-logo img {
  width: 18px;
  height: 18px;
  filter: invert(74%) sepia(44%) saturate(578%) hue-rotate(183deg) brightness(105%) contrast(96%);
}

.nav-logo:hover {
  background: rgba(100, 160, 255, 0.1);
}

.nav-sep {
  width: 1px;
  height: 18px;
  background: rgba(100, 160, 255, 0.12);
  margin: 0 2px;
  flex-shrink: 0;
}

.nav-link {
  padding: 5px 10px;
  color: #4a6888;
  text-decoration: none;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  color: #90b8d8;
  background: rgba(100, 160, 255, 0.08);
}

.nav-link.nav-active {
  color: #7eb8ff;
  background: rgba(100, 160, 255, 0.1);
  font-weight: 500;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  color: #4a6888;
  font-size: 12px;
  font-family: inherit;
  border-radius: 6px;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-btn::after {
  content: '▾';
  font-size: 9px;
  opacity: 0.6;
}

.nav-dropdown:hover .nav-dropdown-btn,
.nav-dropdown-btn:hover {
  color: #90b8d8;
  background: rgba(100, 160, 255, 0.08);
}

.nav-dropdown-btn.nav-active {
  color: #7eb8ff;
  background: rgba(100, 160, 255, 0.1);
  font-weight: 500;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 120px;
  background: rgba(8, 14, 28, 0.97);
  border: 1px solid rgba(100, 160, 255, 0.18);
  border-radius: 8px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-item {
  padding: 6px 10px;
  color: #4a6888;
  text-decoration: none;
  font-size: 12px;
  border-radius: 5px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-item:hover {
  color: #90b8d8;
  background: rgba(100, 160, 255, 0.08);
}

.nav-dropdown-item.nav-active {
  color: #7eb8ff;
  background: rgba(100, 160, 255, 0.1);
  font-weight: 500;
}

/* ================================================================
   Document pages  (about.html, about-advanced.html, etc.)
   ================================================================ */

.doc-page body {
  font-size: 14px;
  line-height: 1.7;
}

/* Apply document typography when body carries .doc class
   OR use the simpler approach: about pages set font-size on body
   via a one-line inline <style>. The rules below are scoped to
   elements that only appear inside about-page markup. */

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

h1 {
  font-size: 24px;
  color: #7eb8ff;
  margin-bottom: 6px;
}

.subtitle {
  color: #4a7090;
  font-size: 14px;
  margin-bottom: 48px;
}

h2 {
  font-size: 17px;
  color: #7eb8ff;
  margin: 40px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(100, 160, 255, 0.15);
}

h3 {
  font-size: 14px;
  color: #90c8e8;
  margin: 22px 0 8px;
  font-weight: 600;
}

p {
  margin-bottom: 12px;
  color: #a8c0d4;
}

/* ── Equation block ── */
.eq {
  font-family: 'Courier New', monospace;
  background: rgba(100, 160, 255, 0.07);
  border-left: 3px solid rgba(100, 160, 255, 0.3);
  padding: 10px 16px;
  margin: 12px 0;
  border-radius: 0 6px 6px 0;
  color: #c8e0ff;
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre;
}

/* ── Inline code ── */
code {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: rgba(100, 160, 255, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  color: #a0d0ff;
}

/* ── Parameter table ── */
.param-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
}

.param-table th {
  text-align: left;
  padding: 7px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #4a6888;
  border-bottom: 1px solid rgba(100, 160, 255, 0.15);
}

.param-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(100, 160, 255, 0.07);
  vertical-align: top;
  font-size: 13px;
}

.param-table tr:last-child td {
  border-bottom: none;
}

.param-table td:first-child {
  color: #7eb8ff;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  white-space: nowrap;
}

.param-table td:nth-child(2) {
  color: #7a9ab0;
  font-size: 12px;
  white-space: nowrap;
}

.param-table td:nth-child(3) {
  color: #a8c0d4;
}

/* ── Land-cover table ── */
.lc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
}

.lc-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #4a6888;
  border-bottom: 1px solid rgba(100, 160, 255, 0.15);
}

.lc-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(100, 160, 255, 0.07);
  color: #a8c0d4;
}

.lc-table tr:last-child td {
  border-bottom: none;
}

/* ── Land-cover colour swatch ── */
.lc-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 6px;
}

/* ── Info / warning boxes ── */
.box {
  background: rgba(100, 160, 255, 0.05);
  border: 1px solid rgba(100, 160, 255, 0.15);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
}

.box.note {
  border-color: rgba(255, 60, 60, 0.3);
  background: rgba(255, 30, 30, 0.05);
}

.box.note li {
  color: #c06060;
}

.box.warn {
  border-color: rgba(255, 180, 60, 0.3);
  background: rgba(255, 160, 30, 0.05);
}

.box.warn li {
  color: #c09060;
}

/* ── Numbered step ── */
.step {
  display: flex;
  gap: 12px;
  margin: 8px 0;
}

.step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(100, 160, 255, 0.2);
  color: #7eb8ff;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.step-body {
  flex: 1;
  color: #a8c0d4;
}

/* ── Lists ── */
ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

ul li {
  margin-bottom: 5px;
  color: #a8c0d4;
}

/* ================================================================
   Responsive
   ================================================================ */

/* Nav — compact on small screens */
@media (max-width: 480px) {
  .nav-logo span {
    display: none;
  }

  .nav-link,
  .nav-dropdown-btn {
    padding: 5px 7px;
    font-size: 11px;
  }
}

/* Document pages */
@media (max-width: 768px) {
  .page {
    padding: 52px 16px 60px;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 15px;
  }

  h3 {
    font-size: 13px;
  }

  .param-table,
  .lc-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 48px 10px 40px;
  }

  h1 {
    font-size: 17px;
  }

  h2 {
    font-size: 13px;
    letter-spacing: 0.5px;
    margin: 32px 0 14px;
  }

  h3 {
    font-size: 12px;
  }

  p,
  li {
    font-size: 13px;
    line-height: 1.6;
  }

  .eq {
    font-size: 11px;
    padding: 10px 12px;
  }

  .step {
    gap: 8px;
  }
}

/* ================================================================
   #sim-ui-panel — simulate pages: flex-column sidebar
   ================================================================ */

#sim-ui-panel {
  background: rgba(10, 15, 30, 0.88);
  border: 1px solid rgba(100, 160, 255, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.sim-page {
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  color: #e0e8f0;
}

body.sim-page input[type="number"],
body.sim-page input[type="date"],
body.sim-page input[type="text"],
body.sim-page input[type="range"] {
  width: 100%;
  background: rgba(100, 160, 255, 0.07);
  border: 1px solid rgba(100, 160, 255, 0.2);
  border-radius: 5px;
  color: #e0e8f0;
  font-size: 12px;
  padding: 5px 8px;
  outline: none;
  margin-bottom: 2px;
}

body.sim-page input[type="number"]:focus,
body.sim-page input[type="date"]:focus {
  border-color: rgba(100, 160, 255, 0.5);
}

body.sim-page input[type="range"] {
  padding: 4px 2px;
}

input[type="range"] {
  width: 100%;
  accent-color: #7eb8ff;
  cursor: pointer;
}

@media (max-width: 768px) {
  #sim-ui-panel {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  body.sim-page {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
    padding-top: 44px;
  }

  body.sim-page #status-bar {
    position: sticky !important;
    top: 44px !important;
    bottom: auto !important;
    height: auto !important;
    padding: 7px 14px;
    z-index: 100;
  }

  body.sim-page #console-area {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    min-height: 40vh;
    padding: 10px;
    margin-top: 0;
  }

  body.sim-page #plots-area,
  body.sim-page #sim-plots-area,
  body.sim-page #plots-area-sim {
    height: auto !important;
    flex-wrap: wrap;
  }

  body.sim-page .plot-box {
    flex: 0 0 calc(50% - 5px) !important;
    height: 140px !important;
  }

  body.sim-page #settings-area {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: auto !important;
    padding: 0;
  }

  body.sim-page input[type="number"],
  body.sim-page input[type="date"],
  body.sim-page input[type="text"],
  body.sim-page input[type="range"] {
    font-size: 16px !important;
  }

  body.sim-page .btn {
    padding: 10px 8px;
    font-size: 12px;
  }
}

/* ================================================================
   #ui-panel — view pages: absolute slide-in overlay
   ================================================================ */

#ui-panel {
  background: rgba(10, 15, 30, 0.88);
  border: 1px solid rgba(100, 160, 255, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  position: absolute;
  top: 52px;
  right: 8px;
  width: 250px;
  padding: 14px 16px;
  max-height: calc(100vh - 68px);
  overflow-y: auto;
  transform: translateX(calc(100% + 20px));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

#ui-panel.open {
  transform: translateX(0);
}

#ui-panel::-webkit-scrollbar {
  width: 4px;
}

#ui-panel::-webkit-scrollbar-thumb {
  background: rgba(100, 160, 255, 0.2);
  border-radius: 2px;
}

#ui-panel h2 {
  font-size: 13px;
  color: #7eb8ff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  margin-top: 0;
}

@media (max-width: 768px) {
  #ui-panel {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 72vh;
    max-height: 72dvh;
    border-radius: 14px 14px 0 0;
    transform: translateY(100%);
  }

  #ui-panel.open {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  #ui-panel {
    max-height: 60vh;
  }
}

/* ================================================================
   Simulation / area panel layout
   ================================================================ */

#panel-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(100, 160, 255, 0.15);
  flex-shrink: 0;
}

#panel-header h2 {
  font-size: 14px;
  color: #7eb8ff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  margin-top: 6px;
}

#panel-header .subtitle {
  font-size: 10px;
  color: #3a6080;
  margin-bottom: 6px;
}

#panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

#panel-body::-webkit-scrollbar {
  width: 4px;
}

#panel-body::-webkit-scrollbar-thumb {
  background: rgba(100, 160, 255, 0.2);
  border-radius: 2px;
}

#panel-footer {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(100, 160, 255, 0.15);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* ================================================================
   .section-title  (all simulate + view pages)
   ================================================================ */

.section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #3a6080;
  margin: 14px 0 6px;
  border-bottom: 1px solid rgba(100, 160, 255, 0.1);
  padding-bottom: 4px;
}

.section-title:first-child {
  margin-top: 0;
}

/* ================================================================
   #panel-toggle  (all 4 view pages + area.html)
   ================================================================ */

#panel-toggle {
  position: absolute;
  top: 52px;
  right: 8px;
  z-index: 1002;
  background: rgba(10, 15, 30, 0.88);
  border: 1px solid rgba(100, 160, 255, 0.35);
  border-radius: 12px;
  color: #7eb8ff;
  padding: 9px 14px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.15s, right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#panel-toggle:active {
  background: rgba(30, 55, 100, 0.7);
}

@media (max-width: 768px) {
  #panel-toggle.open {
    right: 8px;
  }
}

/* ================================================================
   #info-panel  (all 4 view pages)
   ================================================================ */

#info-panel {
  position: absolute;
  top: 52px;
  left: 16px;
  width: 240px;
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid rgba(100, 160, 255, 0.3);
  border-radius: 12px;
  padding: 14px;
  font-size: 12px;
  color: #c8d8e8;
  backdrop-filter: blur(8px);
  display: none;
  z-index: 10;
}

#info-panel h3 {
  font-size: 13px;
  color: #7eb8ff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

#info-panel .info-coords {
  font-size: 10px;
  color: #7eb8ff;
  margin-bottom: 10px;
}

/* ================================================================
   Simulate pages — core layout  (all 4 simulate pages)
   ================================================================ */

#console-area {
  position: absolute;
  inset: 44px 366px 28px 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

#log-output {
  flex: 1;
  overflow-y: auto;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 12px;
  background: rgba(5, 8, 18, 0.7);
  border: 1px solid rgba(100, 160, 255, 0.15);
  border-radius: 8px;
}

#log-output .log-info {
  color: #5588aa;
}

#log-output .log-success {
  color: #30c870;
}

#log-output .log-warn {
  color: #c8a040;
}

#log-output .log-error {
  color: #cc4444;
}

.log-ts {
  color: #334455;
  margin-right: 6px;
}

#progress-wrap {
  margin-top: 10px;
  height: 6px;
  background: rgba(100, 160, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3a6080, #7eb8ff);
  transition: width 0.2s;
  border-radius: 3px;
}

#plots-area,
#sim-plots-area,
#plots-area-sim {
  display: none;
  flex-direction: row;
  gap: 10px;
  margin-top: 10px;
  height: 170px;
  flex-shrink: 0;
}

.plot-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(5, 8, 18, 0.7);
  border: 1px solid rgba(100, 160, 255, 0.15);
  border-radius: 8px;
  padding: 6px 6px 4px;
  overflow: hidden;
  min-width: 0;
}

.plot-box canvas {
  flex: 1;
  image-rendering: pixelated;
}

.plot-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #3a6080;
  margin-bottom: 4px;
  flex-shrink: 0;
  text-align: center;
}

#settings-area {
  position: absolute;
  top: 44px;
  right: 16px;
  width: 350px;
  bottom: 32px;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

#status-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(5, 8, 18, 0.9);
  border-top: 1px solid rgba(100, 160, 255, 0.15);
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 11px;
  color: #3a6080;
}

/* ================================================================
   Simulate pages — controls  (all 4 simulate pages share btn +
   field-label etc.; checkbox/radio/input:disabled used by the
   non-dynamic pair only)
   ================================================================ */

.field-label {
  font-size: 11px;
  color: #99b8d0;
  margin-bottom: 2px;
  display: block;
}

.field-hint {
  font-size: 10px;
  color: #3a6080;
  margin-bottom: 8px;
  line-height: 1.4;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 2px;
}

.grid-2 .field-label {
  font-size: 10px;
}

.footer-row {
  display: flex;
  gap: 6px;
}

/* ================================================================
   Compass widget  (simulate-dynamic + simulate-dynamic-advanced)
   ================================================================ */

#compass-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

#compass-svg {
  cursor: pointer;
  flex-shrink: 0;
}

#compass-readout {
  font-size: 11px;
  color: #99b8d0;
  line-height: 1.7;
}

#compass-readout strong {
  color: #7eb8ff;
  font-size: 14px;
}

input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

input[type="checkbox"] {
  accent-color: #7eb8ff;
  margin-right: 6px;
  vertical-align: middle;
}

.checkbox-row {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #99b8d0;
  margin-bottom: 2px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  padding: 8px 10px;
  background: rgba(100, 160, 255, 0.05);
  border: 1px solid rgba(100, 160, 255, 0.15);
  border-radius: 6px;
}

.radio-group label {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #99b8d0;
  cursor: pointer;
  padding: 4px 0;
}

.radio-group input[type="radio"] {
  accent-color: #7eb8ff;
  margin-right: 8px;
  flex-shrink: 0;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid;
  cursor: pointer;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.btn-fetch {
  color: #a0ceff;
  border-color: rgba(100, 160, 255, 0.35);
  background: rgba(100, 160, 255, 0.09);
}

.btn-sim {
  color: #7eb8ff;
  border-color: rgba(100, 160, 255, 0.28);
  background: rgba(100, 160, 255, 0.06);
}

.btn-stop {
  color: #ff8080;
  border-color: rgba(255, 80, 80, 0.35);
  background: rgba(255, 80, 80, 0.09);
}

.btn-map {
  color: #60e0a0;
  border-color: rgba(50, 195, 95, 0.35);
  background: rgba(50, 195, 95, 0.09);
}

.btn-fetch:not(:disabled):hover {
  background: rgba(100, 160, 255, 0.2);
  border-color: rgba(100, 160, 255, 0.6);
}

.btn-sim:not(:disabled):hover {
  background: rgba(100, 160, 255, 0.2);
  border-color: rgba(100, 160, 255, 0.6);
}

.btn-stop:not(:disabled):hover {
  background: rgba(255, 80, 80, 0.2);
  border-color: rgba(255, 80, 80, 0.6);
}

.btn-map:not(:disabled):hover {
  background: rgba(50, 195, 95, 0.2);
  border-color: rgba(50, 195, 95, 0.6);
}

/* ================================================================
   View pages — tab buttons  (all 4 view pages)
   ================================================================ */

.tab-row {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tab-btn {
  flex: 1;
  padding: 4px 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 10px;
  border: 1px solid rgba(100, 160, 255, 0.25);
  color: #4a6888;
  background: transparent;
  cursor: pointer;
  transition: 0.15s;
}

.tab-btn.active {
  color: #7eb8ff;
  border-color: rgba(100, 160, 255, 0.6);
  background: rgba(100, 160, 255, 0.12);
}

.tab-btn:hover:not(.active) {
  color: #90b8d8;
  background: rgba(100, 160, 255, 0.08);
}

/* ================================================================
   View pages — info panel rows  (all 4 view pages)
   ================================================================ */

.ctrl-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #99b8d0;
  margin-bottom: 4px;
}

.ctrl-label span {
  color: #7eb8ff;
  font-weight: 600;
}

#info-panel .info-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(100, 160, 255, 0.08);
  padding-bottom: 5px;
}

#info-panel .info-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

#info-panel .info-label {
  color: #6888a0;
}

#info-panel .info-val {
  color: #e0f0ff;
  font-weight: bold;
  text-align: right;
}

/* ================================================================
   Toggle row / button  (view-dynamic + view-dynamic-advanced)
   ================================================================ */

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #99b8d0;
  margin-bottom: 8px;
}

.toggle-btn {
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid rgba(100, 160, 255, .25);
  color: #4a6888;
  background: transparent;
  cursor: pointer;
  transition: .15s;
}

.toggle-btn.on {
  color: #7eb8ff;
  border-color: rgba(100, 160, 255, .6);
  background: rgba(100, 160, 255, .12);
}

/* ================================================================
   View pages — colorbar  (view-dynamic + view-dynamic-advanced)
   ================================================================ */

#colorbar-wrap {
  position: absolute;
  left: 16px;
  bottom: 20px;
  background: rgba(10, 15, 30, 0.82);
  border: 1px solid rgba(100, 160, 255, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
}

#colorbar-title {
  text-align: center;
  margin-bottom: 5px;
  font-weight: bold;
  color: #7eb8ff;
  font-size: 10px;
}

#colorbar-body {
  display: flex;
  gap: 5px;
  align-items: stretch;
}

#colorbar-canvas {
  width: 20px;
  height: 160px;
  border-radius: 3px;
  border: 1px solid rgba(100, 160, 255, 0.15);
}

#colorbar-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 160px;
  font-size: 9px;
  color: #99b8d0;
  line-height: 1;
}

/* ================================================================
   View pages — colorbar classes  (view + view-advanced)
   ================================================================ */

#colorbars {
  position: absolute;
  bottom: 20px;
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  max-width: 500px;
}

.colorbar {
  background: rgba(10, 15, 30, 0.82);
  border: 1px solid rgba(100, 160, 255, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
}

.colorbar.show {
  display: block;
}

.colorbar-title {
  text-align: center;
  margin-bottom: 5px;
  font-weight: bold;
  color: #7eb8ff;
  font-size: 10px;
}

.colorbar-body {
  display: flex;
  gap: 5px;
  align-items: stretch;
}

.colorbar-canvas {
  border-radius: 3px;
  border: 1px solid rgba(100, 160, 255, 0.15);
}

.colorbar-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 9px;
  color: #99b8d0;
  line-height: 1;
}

/* ================================================================
   View pages — spinner  (@keyframes spin shared by all 4 view
   pages; #loading-spinner used by the dynamic pair)
   ================================================================ */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#loading-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(100, 160, 255, 0.15);
  border-top-color: #7eb8ff;
  animation: spin 0.9s linear infinite;
}


.hide,
.hidden {
  display: none;
}