:root {
  --bg-dark: #070d19;
  --bg-navy: #0b1528;
  --bg-card: rgba(15, 23, 42, 0.82);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --glass-border: rgba(6, 182, 212, 0.25);
  --glass-border-glow: rgba(6, 182, 212, 0.55);
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --cyan-neon: #00f0ff;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --amber-400: #fbbf24;
  --red-400: #f87171;
  --red-500: #ef4444;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.25);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

#three-container canvas {
  touch-action: none;
  display: block;
}

.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
              radial-gradient(circle at 85% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.5) 0%, var(--bg-dark) 100%);
}

/* Header & Brand Navigation */
header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(11, 21, 40, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
  gap: 12px;
}

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

.brand-logo-badge {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-logo-badge svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(to right, #ffffff, var(--cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.vessel-selector-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--glass-border);
  padding: 6px 12px;
  border-radius: var(--radius-md);
}

.vessel-selector-wrap label {
  font-size: 0.75rem;
  color: var(--cyan-400);
  font-weight: 600;
  text-transform: uppercase;
}

.vessel-select {
  background: #0b1528;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.vessel-select optgroup {
  background: #070d19;
  color: var(--cyan-400);
  font-weight: 700;
}

.vessel-select option {
  background: #0f172a;
  color: var(--text-main);
}

.nav-tabs {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(2, 132, 199, 0.35));
  color: var(--cyan-neon);
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

/* App Main Layout */
.app-main {
  position: relative;
  z-index: 10;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 440px;
  height: calc(100vh - 72px);
  overflow: hidden;
}

/* 3D Realistic Viewport */
.viewport-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #050a14;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#three-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.viewport-hud-top {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 15;
}

.hud-chip {
  pointer-events: auto;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-chip strong {
  color: var(--cyan-neon);
  font-weight: 600;
}

.hud-controls {
  pointer-events: auto;
  display: flex;
  gap: 8px;
}

.hud-btn {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.hud-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--cyan-500);
  color: var(--cyan-neon);
  transform: translateY(-1px);
}

.quick-hotspot-bar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 21, 40, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  display: flex;
  gap: 8px;
  z-index: 15;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  max-width: 92%;
  overflow-x: auto;
}

.hotspot-chip-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.hotspot-chip-btn .chip-index {
  width: 18px;
  height: 18px;
  background: rgba(6, 182, 212, 0.2);
  color: var(--cyan-400);
  border-radius: 50%;
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.hotspot-chip-btn:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--cyan-500);
  color: var(--text-main);
}

.hotspot-chip-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.35), rgba(2, 132, 199, 0.45));
  border-color: var(--cyan-neon);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.3);
}

.hotspot-chip-btn.active .chip-index {
  background: var(--cyan-neon);
  color: #050a14;
}

/* Right Sidebar */
.sidebar-container {
  background: var(--bg-navy);
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  position: relative;
}

.sidebar-view {
  display: none;
  padding: 18px;
  flex-direction: column;
  gap: 16px;
}

.sidebar-view.active {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
}

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

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.glass-card:hover {
  border-color: var(--glass-border-glow);
}

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

.card-header-compact h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.badge-risk {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.badge-risk.tinggi {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--red-400);
}

.badge-risk.sedang {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: var(--amber-400);
}

.badge-risk.rendah {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--emerald-400);
}

.info-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cyan-400);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-content {
  font-size: 0.83rem;
  color: var(--text-main);
  line-height: 1.5;
  background: rgba(2, 6, 23, 0.5);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
  white-space: pre-line;
}

.action-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  border: none;
  color: white;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.35);
}

.action-btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #0891b2);
  transform: translateY(-2px);
}

/* Realistic Image Showcase */
.vessel-photo-wrap {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  position: relative;
}

.vessel-photo-wrap img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(7, 13, 25, 0.95));
  padding: 8px 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.anatomy-card-item {
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
}

.anatomy-card-item h4 {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--cyan-neon);
  margin-bottom: 4px;
}

.anatomy-card-item .role-text {
  font-size: 0.78rem;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.4;
}

.anatomy-card-item .sanitary-pill {
  font-size: 0.72rem;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.input-group label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.input-group input {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transition: var(--transition);
}

.input-group input:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.metric-results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

.metric-card {
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.metric-title {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cyan-neon);
  margin: 4px 0;
}

.metric-status {
  font-size: 0.68rem;
  font-weight: 600;
}

.metric-status.pass {
  color: var(--emerald-400);
}

.metric-status.warn {
  color: var(--amber-400);
}

.metric-status.fail {
  color: var(--red-400);
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.checklist-item:hover {
  background: rgba(2, 6, 23, 0.65);
  border-color: rgba(6, 182, 212, 0.3);
}

.checklist-item.checked {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
}

.checklist-item.checked h4 {
  color: var(--emerald-400);
}

.checklist-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--emerald-500);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checklist-content h4 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.checklist-content p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Mobile Bottom Navigation Bar (Hidden on desktop) */
.mobile-bottom-nav {
  display: none;
}

/* ==========================================================================
   Responsive Breakpoints: Tablet & Smartphone (Mobile First Principles)
   ========================================================================== */

/* Tablet & Medium Screens (max-width: 1024px) */
@media (max-width: 1024px) {
  .app-main {
    grid-template-columns: 1fr 380px;
    height: calc(100dvh - 72px);
  }
}

/* Smartphone Screens (max-width: 768px) */
@media (max-width: 768px) {
  /* Header Layout */
  header {
    padding: calc(10px + var(--safe-top)) 14px 10px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .brand-group {
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
  }

  .brand-logo-badge {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
  }

  .brand-logo-badge svg {
    width: 20px;
    height: 20px;
  }

  .brand-text h1 {
    font-size: 0.88rem;
    line-height: 1.25;
  }

  .brand-text p {
    font-size: 0.67rem;
    line-height: 1.2;
  }

  /* Vessel Selector Dropdown Bar */
  .vessel-selector-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: var(--radius-sm);
  }

  .vessel-selector-wrap label {
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .vessel-select {
    flex: 1;
    width: 100%;
    min-width: 0;
    font-size: 0.82rem;
    padding: 6px 8px;
    min-height: 38px;
    border-radius: 6px;
  }

  /* Hide Desktop Nav Tabs on Smartphone */
  .nav-tabs {
    display: none;
  }

  /* Main Container Layout */
  .app-main {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100dvh - 120px);
    overflow: visible;
  }

  /* 3D Realistic Viewport */
  .viewport-container {
    width: 100%;
    height: clamp(260px, 44dvh, 380px);
    position: relative;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
  }

  /* When on other tabs (Anatomy, Calculator, Regulations), collapse 3D viewport on mobile for 100% full screen focus */
  body:not(.mobile-3d-active) .viewport-container {
    display: none !important;
  }

  /* Viewport HUD Top Controls */
  .viewport-hud-top {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  #hud-engine-chip {
    display: none !important;
  }

  .hud-chip {
    padding: 5px 12px;
    font-size: 0.74rem;
    max-width: 54%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 20px;
    flex-shrink: 1;
  }

  .hud-chip strong {
    font-size: 0.74rem;
  }

  .hud-chip span:first-child {
    display: none;
  }

  .hud-controls {
    gap: 6px;
  }

  .hud-btn {
    padding: 5px 9px;
    font-size: 0.72rem;
    border-radius: 6px;
    gap: 4px;
    white-space: nowrap;
  }

  /* Quick Hotspot Horizontal Selector Bar */
  .quick-hotspot-bar {
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 96%;
    padding: 5px 8px;
    gap: 6px;
    border-radius: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .quick-hotspot-bar::-webkit-scrollbar {
    display: none;
  }

  .hotspot-chip-btn {
    padding: 5px 9px;
    font-size: 0.72rem;
    border-radius: 8px;
    gap: 5px;
  }

  .hotspot-chip-btn .chip-index {
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
  }

  /* Right Sidebar & Content Views */
  .sidebar-container {
    width: 100%;
    height: auto;
    border-left: none;
    overflow-y: visible;
    padding-bottom: calc(84px + var(--safe-bottom));
  }

  .sidebar-view {
    padding: 12px 14px 28px 14px;
    gap: 12px;
  }

  .glass-card {
    padding: 13px;
    border-radius: 12px;
  }

  .card-header-compact h3 {
    font-size: 0.90rem;
    line-height: 1.3;
  }

  .info-content {
    font-size: 0.81rem;
    padding: 8px 10px;
    line-height: 1.45;
  }

  /* Photo Container in Anatomy Tab */
  .vessel-photo-wrap img {
    height: 190px;
  }

  /* Calculator Inputs and Responsive Grid */
  .calc-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .input-group {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .input-group label {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .input-group input {
    height: 44px;
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    padding: 6px 10px;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .metric-results-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .metric-card {
    padding: 10px 8px;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  .metric-title {
    font-size: 0.68rem;
  }

  .metric-value {
    font-size: 1.25rem;
    margin: 2px 0;
  }

  .metric-status {
    font-size: 0.65rem;
  }

  /* Action Buttons Touch Target Size */
  .action-btn-primary {
    min-height: 48px;
    font-size: 0.90rem;
    border-radius: 10px;
  }

  /* Checklist Items Touch Targets */
  .checklist-item {
    padding: 12px;
    gap: 12px;
    border-radius: 10px;
    min-height: 48px;
  }

  .checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
  }

  .checklist-content h4 {
    font-size: 0.83rem;
  }

  .checklist-content p {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  /* Mobile Bottom Navigation Bar (Docked at Bottom) */
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    height: calc(60px + var(--safe-bottom));
    padding: 4px 6px var(--safe-bottom) 6px;
    background: rgba(11, 21, 40, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.55);
  }

  .mobile-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-btn .nav-icon-wrap {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
  }

  .mobile-nav-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: var(--transition);
  }

  .mobile-nav-btn span {
    font-family: var(--font-body);
    font-size: 0.67rem;
    font-weight: 500;
    line-height: 1;
    transition: var(--transition);
  }

  .mobile-nav-btn:active {
    transform: scale(0.93);
  }

  .mobile-nav-btn.active {
    color: var(--cyan-neon);
  }

  .mobile-nav-btn.active .nav-icon-wrap {
    background: rgba(6, 182, 212, 0.18);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
  }

  .mobile-nav-btn.active span {
    font-weight: 700;
    color: var(--cyan-neon);
  }
}

/* Compact Smartphones (max-width: 400px - iPhone SE, small Galaxy A series) */
@media (max-width: 400px) {
  .hud-chip span:first-child {
    display: none;
  }

  .hud-btn span {
    display: none;
  }

  .hud-btn {
    padding: 6px 8px;
  }

  .calc-grid {
    grid-template-columns: 1fr;
  }

  .metric-value {
    font-size: 1.15rem;
  }

  .mobile-nav-btn span {
    font-size: 0.62rem;
  }
}
