/* =========================================================
   World Map Projection Interpolator - Modern Stylesheet
   Theme: Dark Slate (Default) / Light Crisp
========================================================= */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Dark Theme Colors */
  --bg-primary: #070b14;
  --bg-secondary: #0d1527;
  --bg-surface: rgba(15, 23, 42, 0.85);
  --bg-surface-hover: rgba(30, 41, 59, 0.95);
  --border-color: rgba(51, 65, 85, 0.5);
  --border-active: rgba(56, 189, 248, 0.7);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-indigo: #818cf8;

  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.25);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #e2e8f0;
  --bg-surface: rgba(255, 255, 255, 0.9);
  --bg-surface-hover: rgba(248, 250, 252, 0.95);
  --border-color: rgba(203, 213, 225, 0.8);
  --border-active: rgba(2, 132, 199, 0.7);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.15);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* ---------------------------------------------------------
   Header & Primary Toggle Switch
--------------------------------------------------------- */
header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-icon .brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title p {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* The Main Projection Toggle (Requested: Left = Mercator, Right = Equal Earth) */
.main-toggle-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.projection-switch {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px;
  cursor: pointer;
  user-select: none;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.switch-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border-radius: var(--radius-full);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.5);
  z-index: 1;
}

.projection-switch.active-right .switch-indicator {
  transform: translateX(100%);
  background: linear-gradient(135deg, #059669, #0d9488);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.5);
}

.switch-option {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 20px;
  min-width: 140px;
  border-radius: var(--radius-full);
  transition: color 0.2s ease;
  text-align: center;
}

.switch-option .option-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
}

.switch-option .option-badge {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.switch-option.active .option-label {
  color: #ffffff;
}

.switch-option.active .option-badge {
  color: rgba(255, 255, 255, 0.85);
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-active);
}

/* ---------------------------------------------------------
   Map Canvas Stage & Overlays
--------------------------------------------------------- */
#map-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-primary);
}

#map-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#map-canvas.panning {
  cursor: grabbing !important;
}

/* ---------------------------------------------------------
   Floating Timeline & Playback Bar (Bottom Center)
--------------------------------------------------------- */
.timeline-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  min-width: 580px;
  max-width: 90vw;
}

.play-button {
  background: linear-gradient(135deg, var(--accent-cyan), #2563eb);
  border: none;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.4);
}

.play-button:hover {
  transform: scale(1.05);
}

.play-button:active {
  transform: scale(0.95);
}

.slider-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  outline: none;
  cursor: pointer;
  position: relative;
}

.progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.progress-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.progress-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  cursor: pointer;
}

.progress-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  min-width: 48px;
  text-align: right;
}

.speed-selector {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  padding: 2px;
  border: 1px solid var(--border-color);
}

.speed-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.speed-btn.active {
  background: var(--accent-indigo);
  color: #ffffff;
}

/* ---------------------------------------------------------
   Toolbars: Layers, Presets, and Info Cards
--------------------------------------------------------- */
.floating-panel {
  position: absolute;
  z-index: 15;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px;
}

/* Top-Left: Layer Toggles */
.layers-panel {
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 190px;
}

.panel-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.layer-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  padding: 4px 2px;
}

.layer-toggle:hover {
  color: var(--text-primary);
}

.layer-toggle input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  cursor: pointer;
  width: 16px;
  height: 16px;
}

/* Bottom-Left: Country & Continent Spotlight Combobox */
.spotlight-panel {
  bottom: 24px;
  left: 20px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Floating Zoom & Pan Controls */
.zoom-controls {
  position: absolute;
  right: 20px;
  bottom: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  z-index: 15;
}

.btn-zoom {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-zoom:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-zoom-reset {
  color: var(--accent-amber);
}

.btn-zoom-reset:hover {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.zoom-level-indicator {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 4px;
  user-select: none;
}

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

.btn-close-panel,
.btn-clear-spotlight {
  background: transparent;
  border: none;
  color: var(--accent-rose);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-close-panel {
  display: none;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-secondary);
}

.btn-close-panel:hover {
  color: var(--text-primary);
}

.btn-clear-spotlight:hover {
  background: rgba(244, 63, 94, 0.15);
}

/* Custom Combobox (Single Unified Search & Select) */
.custom-combobox {
  position: relative;
  width: 100%;
}

.combobox-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  transition: all 0.2s ease;
  cursor: text;
}

.combobox-input-wrapper:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.combobox-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.combobox-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: inherit;
  width: 100%;
}

.combobox-input::placeholder {
  color: var(--text-muted);
}

.btn-combobox-arrow {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 2px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.btn-combobox-arrow:hover {
  color: var(--text-primary);
}

.custom-combobox.open .btn-combobox-arrow {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.combobox-dropdown {
  position: absolute;
  bottom: calc(100% + 6px); /* Pop upward so it doesn't collide with timeline */
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 40;
  padding: 4px;
}

.dropdown-group-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  padding: 6px 8px 3px 8px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
  margin-bottom: 3px;
}

.dropdown-item {
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-item:hover,
.dropdown-item.focused {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

.dropdown-item.selected {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  font-weight: 600;
}

.dropdown-item .item-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.spotlight-description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
  border-top: 1px solid var(--border-color);
  padding-top: 6px;
}

/* Top-Right: Live Comparison & Hover HUD */
.inspector-panel {
  top: 20px;
  right: 20px;
  width: 310px;
}

.country-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.stat-label {
  color: var(--text-secondary);
}

.stat-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.distortion-meter {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.distortion-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 6px;
}

.distortion-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-amber), var(--accent-rose));
  width: 100%;
  transition: width 0.1s ease;
}

/* Projection Status Pill in Inspector */
.projection-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

/* ---------------------------------------------------------
   Help / Educational Modal Drawer
--------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  padding: 28px;
  position: relative;
}

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

.modal-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-body h3 {
  color: var(--text-primary);
  font-size: 1.05rem;
  margin: 16px 0 6px 0;
}

.modal-body p {
  margin-bottom: 12px;
}

.modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.84rem;
}

.modal-body th, .modal-body td {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  text-align: left;
}

.modal-body th {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Close button */
.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: var(--text-primary);
}

/* ---------------------------------------------------------
   Move Ko-fi Floating Chat Widget to Bottom Right Corner
--------------------------------------------------------- */
.floatingchat-container-wrap,
.floatingchat-container-wrap-mobi {
  left: auto !important;
  right: 20px !important;
  bottom: 24px !important;
  z-index: 99999 !important;
}

.floating-chat-kofi-popup-iframe,
.floating-chat-kofi-popup-iframe-mobi {
  left: auto !important;
  right: 20px !important;
  bottom: 88px !important;
  z-index: 100000 !important;
  max-width: min(340px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 110px) !important;
}

.floating-chat-kofi-popup-iframe[style*="height: 0px"],
.floating-chat-kofi-popup-iframe-mobi[style*="height: 0px"] {
  pointer-events: none !important;
  visibility: hidden !important;
}

/* ---------------------------------------------------------
   Comprehensive Mobile & Tablet Optimization
--------------------------------------------------------- */
#btn-toggle-layers {
  display: none;
}

@media (max-width: 768px) {
  /* Prevent any horizontal blowout */
  html, body, #app-container {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Header in 2 clean, ergonomic rows */
  header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px 10px;
    padding: 6px 10px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
  }

  .brand-section {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    gap: 6px;
    min-width: 0;
  }

  .brand-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
  }

  .brand-icon svg {
    width: 15px;
    height: 15px;
  }

  .brand-title h1 {
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-title p {
    display: none;
  }

  .header-actions {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    gap: 4px;
    flex-shrink: 0;
  }

  .btn-icon {
    width: 30px;
    height: 30px;
  }

  #btn-toggle-layers {
    display: flex;
  }

  .main-toggle-container {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    width: 100%;
    display: flex;
    justify-content: center;
    min-width: 0;
  }

  .projection-switch {
    width: 100%;
    max-width: 320px;
    padding: 2px;
    box-sizing: border-box;
  }

  .switch-option {
    flex: 1;
    min-width: 0;
    padding: 4px 6px;
  }

  .switch-option .option-label {
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .switch-option .option-badge {
    display: block;
    font-size: 0.60rem;
    white-space: nowrap;
  }

  /* Layers panel as mobile popup */
  #layers-panel {
    display: none;
    top: 86px;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: 280px;
    z-index: 50;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  }

  #layers-panel.mobile-open {
    display: flex;
  }

  #btn-close-layers {
    display: inline-block;
  }

  /* Inspector panel on mobile: hidden to keep canvas unobstructed */
  .inspector-panel {
    display: none;
  }

  /* Spotlight panel on mobile: sleek top floating search bar */
  .spotlight-panel {
    top: 8px;
    bottom: auto;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: calc(100vw - 16px);
    padding: 6px 10px;
    gap: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    min-width: 0;
  }

  .spotlight-panel .panel-header-row {
    display: flex;
    margin-bottom: 2px;
  }

  .spotlight-panel .panel-title {
    font-size: 0.65rem;
    margin-bottom: 0;
  }

  .combobox-input-wrapper {
    padding: 4px 8px;
    min-width: 0;
  }

  .combobox-input {
    font-size: 0.78rem;
    min-width: 0;
  }

  .combobox-dropdown {
    top: calc(100% + 4px);
    bottom: auto;
    max-height: 180px;
  }

  .spotlight-description {
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    display: block;
  }

  /* Timeline Scrubber on mobile */
  .timeline-bar {
    bottom: 8px;
    left: 8px;
    right: 8px;
    transform: none;
    width: auto;
    min-width: 0 !important;
    max-width: calc(100vw - 16px);
    padding: 5px 8px;
    gap: 6px;
    box-sizing: border-box;
  }

  .play-button {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
  }

  .slider-container {
    gap: 4px;
    flex: 1;
    min-width: 0;
  }

  .slider-container span {
    font-size: 0.60rem;
    white-space: nowrap;
  }

  .progress-badge {
    font-size: 0.68rem;
    min-width: 28px;
    padding: 1px 3px;
  }

  .speed-selector {
    display: none;
  }

  /* Zoom controls on mobile */
  .zoom-controls {
    right: 8px;
    top: 78px;
    bottom: auto;
    gap: 2px;
    padding: 3px;
  }

  .zoom-controls .btn-zoom {
    width: 28px;
    height: 28px;
  }

  .zoom-controls .zoom-level-indicator {
    font-size: 0.62rem;
    padding: 1px 2px;
  }

  /* Ko-fi button on mobile: sits in bottom-right corner above timeline */
  .floatingchat-container-wrap,
  .floatingchat-container-wrap-mobi {
    right: 10px !important;
    bottom: 54px !important;
    left: auto !important;
    z-index: 99999 !important;
  }

  .floating-chat-kofi-popup-iframe,
  .floating-chat-kofi-popup-iframe-mobi {
    right: 12px !important;
    bottom: 110px !important;
    left: auto !important;
    z-index: 100000 !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 130px) !important;
  }

  .floating-chat-kofi-popup-iframe-closer,
  .floating-chat-kofi-popup-iframe-closer-mobi {
    right: 0px !important;
    top: -12px !important;
  }
}

/* Accessible Screen Reader & SEO Crawlable Utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
