/* ============================================================================
   Airbus A320 / A32NX MCDU Ultra-Realistic Layout & Styling
   Faithfully matching real Airbus A320 Thales/Honeywell MCDU hardware & FBW A32NX
   ============================================================================ */

@font-face {
  font-family: "HoneywellMCDU";
  src: url("../fonts/HoneywellMCDU.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "HoneywellMCDUSmall";
  src: url("../fonts/HoneywellMCDUSmall.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --mcduWhite: #ffffff;
  --mcduLightGrey: #666666;
  --mcduGrey: #787878;
  --mcduGreen: #00ff00;
  --mcduAmber: #ff9a00;
  --mcduCyan: #00ffff;
  --mcduYellow: #ffff00;
  --mcduRed: #ff0000;
  --mcduMagenta: #ff94ff;

  --mcdu-chassis-bg: #5f778f;
  --mcdu-chassis-grad: linear-gradient(175deg, #748c9e 0%, #637b8d 25%, #566e80 65%, #495e70 100%);
  --mcdu-metal-border: #3b4b57;
  --bezel-bg: #15181d;
  --screen-bg: #030405;
  --key-dark-1: #24272f;
  --key-dark-2: #16181e;
  --key-border: #2e323c;
  --key-text: #e2ecf5;
  --key-accent-text: #c0d4e5;
}

/* ============================================================================
   MCDU HARDWARE CHASSIS
   ============================================================================ */
.mcdu-console-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 6px;
}

.mcdu-chassis {
  width: 490px;
  background: var(--mcdu-chassis-grad);
  border-radius: 16px 16px 14px 14px;
  padding: 14px 16px 18px;
  border: 3px solid var(--mcdu-metal-border);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 0 rgba(0, 0, 0, 0.6),
    inset 3px 0 0 rgba(255, 255, 255, 0.15),
    inset -3px 0 0 rgba(0, 0, 0, 0.35);
  position: relative;
  user-select: none;
}

/* Top Plate Header, Pins, Vents & Screws */
.mcdu-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 4px;
}

.mount-pin-large {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e2e8f0 45%, #94a3b8 100%);
  border: 1.5px solid #475569;
  box-shadow: 0 2px 5px rgba(0,0,0,0.6), inset 0 1px 2px rgba(255,255,255,0.8);
}

.mcdu-vents-group {
  display: flex;
  gap: 12px;
  align-items: center;
}
.vent-slot {
  width: 32px;
  height: 6px;
  background: #11151a;
  border-radius: 3px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.95);
}

.chassis-corner-screw {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #475569, #1e293b);
  border: 1px solid #0f172a;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.9), 0 1px 0 rgba(255,255,255,0.25);
  position: relative;
}
.chassis-corner-screw::before {
  content: '';
  position: absolute;
  top: 50%; left: 18%; right: 18%; height: 1.5px;
  background: #090d12;
  transform: translateY(-50%) rotate(42deg);
}
.chassis-corner-screw::after {
  content: '';
  position: absolute;
  top: 50%; left: 18%; right: 18%; height: 1.5px;
  background: #090d12;
  transform: translateY(-50%) rotate(-48deg);
}

/* Side Grip Slots */
.side-grip {
  position: absolute;
  width: 8px;
  height: 80px;
  background: #14181d;
  border-radius: 4px;
  border-right: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.9);
  bottom: 110px;
}
.side-grip.left { left: 8px; }
.side-grip.right { right: 8px; }

/* ============================================================================
   SCREEN BEZEL & LSK COLUMNS WITH WHITE TRACE GUIDELINES
   ============================================================================ */
.mcdu-screen-cluster {
  display: flex;
  background: var(--bezel-bg);
  border-radius: 12px;
  padding: 8px 6px;
  margin-bottom: 12px;
  box-shadow:
    inset 0 4px 16px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(0, 0, 0, 0.8),
    0 1.5px 0 rgba(255, 255, 255, 0.15);
  position: relative;
}

.mcdu-lsk-col {
  display: flex;
  flex-direction: column;
  width: 58px;
  flex-shrink: 0;
  position: relative;
  box-sizing: border-box;
}

/* Fixed Annunciator Zone matching Screen Header Offset */
.mcdu-annunciator-zone {
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Annunciator Lights (FAIL, FM1, MENU, FM2, IND, RDY) */
.mcdu-annunciator {
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-align: center;
  border-radius: 2px;
  padding: 2px 4px;
  min-height: 12px;
  line-height: 1.1;
  background: #0d1015;
  border: 1px solid #1c222c;
  color: #2a3342;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
  transition: all 0.1s ease;
  user-select: none;
  box-sizing: border-box;
}

#ann-fail {
  width: 36px;
}

.annunciator-bank-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
}

.ann-row-1, .ann-row-2 {
  display: flex;
  gap: 2px;
  justify-content: center;
}

.annunciator-bank-right .mcdu-annunciator {
  font-size: 7px;
  padding: 1px 3px;
  min-height: 11px;
  line-height: 1.1;
}

.mcdu-annunciator.ann-amber.lit {
  background: #4a2800;
  border-color: #ff9a00;
  color: #ffaa00;
  box-shadow: 0 0 8px rgba(255, 154, 0, 0.6), inset 0 0 4px rgba(255, 154, 0, 0.4);
}

.mcdu-annunciator.ann-white.lit {
  background: #2a3545;
  border-color: #94a3b8;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5), inset 0 0 3px rgba(255, 255, 255, 0.3);
}

.mcdu-annunciator.ann-green.lit {
  background: #003816;
  border-color: #00ff66;
  color: #00ff66;
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.6), inset 0 0 4px rgba(0, 255, 102, 0.4);
}

/* LSK Button Group: Exact 6 rows matching screen data rows */
.lsk-button-group {
  display: grid;
  grid-template-rows: repeat(6, 32px);
  width: 100%;
  box-sizing: border-box;
}

/* LSK Button with authentic white horizontal bar */
.mcdu-lsk {
  width: 100%;
  height: 22px;
  margin-top: 10px;
  margin-bottom: 0;
  padding: 0;
  box-sizing: border-box;
  background: linear-gradient(180deg, #2b303b 0%, #1c1f26 50%, #101217 100%);
  border: 1px solid #333a46;
  border-top: 1px solid #444c5a;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.06s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mcdu-lsk:hover {
  background: linear-gradient(180deg, #363c4a 0%, #242832 100%);
  border-color: #4b5466;
}
.mcdu-lsk:active {
  background: #0c0d11;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.95);
  transform: translateY(1px);
}

/* White center bar on LSK */
.mcdu-lsk::before {
  content: '';
  width: 14px;
  height: 2px;
  background: #d4e2ee;
  border-radius: 1px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.8);
}

/* Angled white guideline traces pointing to screen */
.lsk-left::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%);
  pointer-events: none;
}
.lsk-right::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%);
  pointer-events: none;
}

/* ============================================================================
   CRT SCREEN DISPLAY
   ============================================================================ */
.mcdu-screen-frame {
  flex: 1;
  background: var(--screen-bg);
  border-radius: 8px;
  border: 3px solid #07090b;
  box-shadow:
    inset 0 0 50px rgba(0, 255, 65, 0.04),
    inset 0 0 14px rgba(0, 0, 0, 0.95),
    0 0 0 1px #161b22;
  padding: 8px 10px 6px;
  position: relative;
  overflow: hidden;
}

/* CRT Screen scanline & raster effects */
.mcdu-screen-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 95% 85% at 50% 45%, transparent 65%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
  z-index: 5;
}
.mcdu-screen-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.12) 2px, rgba(0, 0, 0, 0.12) 4px);
  pointer-events: none;
  z-index: 6;
}

.mcdu-display-matrix {
  font-family: 'HoneywellMCDU', 'Share Tech Mono', monospace;
  position: relative;
  z-index: 2;
  user-select: none;
}

/* Title Line */
.disp-title {
  height: 20px;
  line-height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'HoneywellMCDU', monospace;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--mcduWhite);
  font-weight: 900;
  margin-bottom: 4px;
  overflow: hidden;
}

/* 6 Distinct Row Pairs (Label + Data) matched 1:1 with LSK Buttons */
.disp-row-pair {
  height: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
}

/* Field Label Lines - using authentic HoneywellMCDUSmall */
.disp-label {
  height: 12px;
  line-height: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'HoneywellMCDUSmall', 'HoneywellMCDU', monospace;
  font-size: 11px;
  letter-spacing: 0.3px;
  font-weight: 900;
  overflow: hidden;
}

/* Data Input/Output Lines - using authentic HoneywellMCDU */
.disp-data {
  height: 18px;
  line-height: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'HoneywellMCDU', monospace;
  font-size: 15px;
  letter-spacing: 0.5px;
  font-weight: 900;
  margin-bottom: 2px;
  overflow: hidden;
}

/* Scratchpad Line */
.disp-sp {
  height: 20px;
  line-height: 20px;
  border-top: 1px solid #142a19;
  margin-top: 4px;
  padding-top: 2px;
  display: flex;
  align-items: center;
  font-family: 'HoneywellMCDU', monospace;
  font-size: 15px;
  letter-spacing: 0.5px;
  overflow: hidden;
  font-weight: 900;
}

/* Columns */
.dl { flex: 0 0 auto; text-align: left; white-space: nowrap; }
.dc { flex: 1; text-align: center; white-space: nowrap; }
.dr { flex: 0 0 auto; text-align: right; white-space: nowrap; }

/* Authentic FlyByWire A32NX / Airbus CRT Phosphor Colors */
.cw   { color: var(--mcduWhite); }
.cg   { color: var(--mcduGreen); text-shadow: 0 0 3px rgba(0, 255, 0, 0.4); }
.ca   { color: var(--mcduAmber); text-shadow: 0 0 3px rgba(255, 154, 0, 0.4); }
.cc   { color: var(--mcduCyan); text-shadow: 0 0 3px rgba(0, 255, 255, 0.4); }
.cm   { color: var(--mcduMagenta); text-shadow: 0 0 3px rgba(255, 148, 255, 0.4); }
.cb   { color: var(--mcduCyan); }
.cy   { color: var(--mcduYellow); text-shadow: 0 0 3px rgba(255, 255, 0, 0.4); }
.cr   { color: var(--mcduRed); text-shadow: 0 0 5px rgba(255, 0, 0, 0.6); }
.cdim { color: var(--mcduLightGrey); }

/* Blinking Scratchpad Cursor */
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.cursor {
  display: inline-block;
  width: 8px;
  height: 13px;
  background: #ffb100;
  animation: cursorBlink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

/* ============================================================================
   FUNCTION KEYS AREA (Exact 6 columns + BRT/DIM vertical rocker)
   ============================================================================ */
.mcdu-func-bezel {
  background: #090b0e;
  border-radius: 8px;
  padding: 7px 8px;
  margin-bottom: 10px;
  border: 1px solid #14171d;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.95), 0 0 0 1px rgba(0,0,0,0.6);
}

.func-keys-grid-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr) 38px;
  gap: 4px;
}

.fkey {
  height: 27px;
  background: linear-gradient(180deg, var(--key-dark-1) 0%, var(--key-dark-2) 100%);
  border: 1px solid var(--key-border);
  border-bottom: 2.5px solid #08090d;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  color: var(--key-text);
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 3px rgba(0,0,0,0.8);
  transition: all 0.06s;
}
.fkey:hover {
  background: linear-gradient(180deg, #2e333e 0%, #1e2129 100%);
  color: #ffffff;
  border-color: #3f4654;
}
.fkey:active {
  background: #0a0b0e;
  border-bottom: 1px solid #08090d;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.95);
  transform: translateY(1px);
}
.fkey.blank-key {
  cursor: default;
  background: #101216;
  border-color: #1a1d24;
  border-bottom-color: #0c0d10;
  box-shadow: none;
}

/* BRT/DIM vertical pair */
.brt-rocker-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.brt-key-half {
  flex: 1;
  font-size: 7.5px;
  height: 26px;
  background: linear-gradient(180deg, #1e2127 0%, #13151a 100%);
  color: #8da4b8;
}

/* ============================================================================
   LOWER SECTION: NAVIGATION SLEW + CIRCULAR NUMPAD + ALPHANUMERIC MATRIX
   ============================================================================ */
.mcdu-lower-panel {
  display: flex;
  gap: 14px;
}

/* LEFT COLUMN: AIRPORT, 2x2 ARROW CLUSTER, AND CIRCULAR NUMPAD */
.lower-left-col {
  width: 170px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Airport row */
.airport-row {
  display: flex;
  gap: 4px;
}
.k-btn-airport {
  width: 80px;
  height: 28px;
  font-size: 8px;
  line-height: 1.1;
  background: linear-gradient(180deg, var(--key-dark-1) 0%, var(--key-dark-2) 100%);
  border: 1px solid var(--key-border);
  border-bottom: 2.5px solid #07080a;
  border-radius: 4px;
  color: var(--key-text);
  font-family: 'Share Tech Mono', monospace;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 1px 3px rgba(0,0,0,0.8);
}
.k-btn-airport:hover {
  color: #fff;
}
.k-btn-airport:active {
  transform: translateY(1px);
}

/* Slew Arrows 2x2 Recessed Cluster */
.arrow-cluster-recess {
  background: #080a0d;
  border-radius: 6px;
  padding: 5px;
  border: 1px solid #13171e;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.95);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.k-arrow {
  height: 26px;
  background: linear-gradient(180deg, #20232b 0%, #121419 100%);
  border: 1px solid #292d37;
  border-bottom: 2px solid #07080a;
  border-radius: 4px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.7);
  transition: all 0.06s;
}
.k-arrow:hover {
  background: #2b303b;
}
.k-arrow:active {
  background: #08090c;
  transform: translateY(1px);
}

/* Circular Numeric Keypad Grid (3 cols x 4 rows) */
.numpad-circle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 4px 0;
  justify-items: center;
}

.k-round {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #303542 0%, #1c2027 60%, #111317 100%);
  border: 1px solid #2e333e;
  border-bottom: 3.5px solid #050608;
  color: #ffffff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 3px 6px rgba(0,0,0,0.85);
  transition: all 0.06s;
}
.k-round:hover {
  background: radial-gradient(circle at 35% 30%, #3b4150 0%, #252a34 60%, #15181d 100%);
  color: #ffffff;
}
.k-round:active {
  background: #090a0d;
  border-bottom: 1px solid #050608;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.95);
  transform: translateY(2px);
}

/* RIGHT COLUMN: ALPHANUMERIC MATRIX (5 cols x 6 rows) */
.alpha-matrix-container {
  flex: 1;
  background: #080a0d;
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #14171d;
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.95);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.k-alpha {
  height: 38px;
  background: linear-gradient(180deg, var(--key-dark-1) 0%, var(--key-dark-2) 100%);
  border: 1px solid var(--key-border);
  border-bottom: 3px solid #06070a;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 4px rgba(0,0,0,0.85);
  transition: all 0.06s;
}
.k-alpha:hover {
  background: linear-gradient(180deg, #2d323d 0%, #1e2129 100%);
  color: #ffffff;
}
.k-alpha:active {
  background: #090a0d;
  border-bottom: 1px solid #06070a;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.95);
  transform: translateY(1px);
}

/* Special Alpha Keys */
.k-alpha.k-clr {
  color: #ffffff;
}
.k-alpha.k-ovfy {
  font-size: 8px;
  line-height: 1.1;
}
.ovfy-triangle {
  font-size: 10px;
  margin-top: 1px;
}

/* Tactile marking box on key E, S, W */
.k-alpha.tactile-mark {
  position: relative;
}
.k-alpha.tactile-mark::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 3px;
  pointer-events: none;
}

/* ============================================================================
   GUIDED TUTOR PULSE HIGHLIGHT
   ============================================================================ */
@keyframes keyPulseGlow {
  0%, 100% {
    box-shadow: 0 0 8px #00e5ff, inset 0 0 6px #00e5ff;
    border-color: #00e5ff;
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 16px #00e5ff, 0 0 24px #00e5ff, inset 0 0 10px #00e5ff;
    border-color: #ffffff;
    transform: scale(1.05);
  }
}

.guided-pulse {
  animation: keyPulseGlow 1.2s infinite ease-in-out !important;
  z-index: 100 !important;
  position: relative;
  border-color: #00e5ff !important;
}

/* Touch & Mobile Tap Optimization */
button, .mcdu-lsk, .fkey, .k-btn-airport, .k-arrow, .k-round, .k-alpha {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================================
   MOBILE RESPONSIVE RULES FOR MCDU CONSOLE (PHONE VIEWPORTS <= 520px)
   ============================================================================ */
@media (max-width: 520px) {
  .mcdu-pane {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    justify-content: center;
  }

  .mcdu-console-wrapper {
    width: 100%;
    max-width: 100vw;
    padding: 0;
    box-sizing: border-box;
  }

  .mcdu-chassis {
    width: 100%;
    max-width: 480px;
    padding: 10px 8px 14px;
    border-radius: 12px;
    border-width: 2px;
    box-sizing: border-box;
  }

  .side-grip {
    display: none;
  }

  .mcdu-top-bar {
    margin-bottom: 6px;
    padding: 0 2px;
  }

  .mount-pin-large {
    width: 14px;
    height: 14px;
  }

  .vent-slot {
    width: 20px;
    height: 4px;
  }

  .mcdu-screen-cluster {
    padding: 6px 3px;
    border-radius: 8px;
    margin-bottom: 8px;
  }

  .mcdu-lsk-col {
    width: 40px;
  }

  .mcdu-annunciator-zone {
    height: 29px;
  }

  .lsk-button-group {
    grid-template-rows: repeat(6, 28px);
  }

  .mcdu-lsk {
    width: 100%;
    height: 20px;
    margin-top: 8px;
    margin-bottom: 0;
    border-radius: 3px;
  }

  .mcdu-lsk::before {
    width: 10px;
    height: 1.5px;
  }

  .lsk-left::after, .lsk-right::after {
    width: 5px;
    right: -5px;
    left: -5px;
  }

  .mcdu-annunciator {
    font-size: 7px;
    padding: 1px 2px;
    min-height: 10px;
  }

  #ann-fail {
    width: 28px;
  }

  .annunciator-bank-right .mcdu-annunciator {
    font-size: 6px;
    padding: 1px 2px;
    min-height: 9px;
  }

  .mcdu-screen-frame {
    padding: 6px 6px 4px;
    border-radius: 6px;
    border-width: 2px;
  }

  .disp-row-pair {
    height: 28px;
  }

  .disp-title {
    font-size: 13.5px;
    height: 18px;
    line-height: 18px;
    letter-spacing: 0.2px;
    margin-bottom: 3px;
  }

  .disp-label {
    font-size: 10px;
    height: 10px;
    line-height: 10px;
    letter-spacing: 0.1px;
  }

  .disp-data {
    font-size: 13.5px;
    height: 16px;
    line-height: 16px;
    letter-spacing: 0.2px;
    margin-bottom: 2px;
  }

  .disp-sp {
    font-size: 13.5px;
    height: 18px;
    line-height: 18px;
    letter-spacing: 0.2px;
  }

  .mcdu-fkeys-grid {
    gap: 3px;
    margin-bottom: 8px;
  }

  .fkey {
    height: 28px;
    font-size: 9px;
    padding: 1px;
  }

  .fkey-sub {
    font-size: 7px;
  }

  .brt-key-half {
    height: 22px;
    font-size: 6.5px;
  }

  .mcdu-lower-panel {
    gap: 8px;
  }

  .lower-left-col {
    width: 145px;
    gap: 6px;
  }

  .k-btn-airport {
    width: 70px;
    height: 25px;
    font-size: 7.5px;
  }

  .arrow-cluster-recess {
    padding: 3px;
    gap: 3px;
  }

  .k-arrow {
    height: 23px;
    font-size: 13px;
  }

  .numpad-circle-grid {
    gap: 5px;
  }

  .k-round {
    width: 38px;
    height: 38px;
    font-size: 13.5px;
    border-bottom-width: 2.5px;
  }

  .alpha-matrix-container {
    padding: 5px;
    gap: 4px;
  }

  .k-alpha {
    height: 33px;
    font-size: 13px;
    border-bottom-width: 2.5px;
    border-radius: 4px;
  }

  .k-alpha.k-ovfy {
    font-size: 7.5px;
  }

  .ovfy-triangle {
    font-size: 8px;
  }
}

/* ============================================================================
   ULTRA-COMPACT SMARTPHONES (<= 380px, e.g. iPhone SE, smaller Androids)
   ============================================================================ */
@media (max-width: 380px) {
  .mcdu-chassis {
    padding: 6px 4px 10px;
  }

  .mcdu-lsk-col {
    width: 34px;
  }

  .mcdu-annunciator-zone {
    height: 24px;
  }

  .lsk-button-group {
    grid-template-rows: repeat(6, 25px);
  }

  .mcdu-lsk {
    width: 100%;
    height: 17px;
    margin-top: 8px;
    margin-bottom: 0;
  }

  .mcdu-screen-frame {
    padding: 4px 4px 3px;
  }

  .disp-row-pair {
    height: 25px;
  }

  .disp-title {
    font-size: 12px;
    height: 16px;
    line-height: 16px;
    margin-bottom: 2px;
  }

  .disp-label {
    font-size: 9px;
    height: 9px;
    line-height: 9px;
  }

  .disp-data {
    font-size: 12px;
    height: 15px;
    line-height: 15px;
    margin-bottom: 1px;
  }

  .disp-sp {
    font-size: 12px;
    height: 16px;
    line-height: 16px;
  }

  .fkey {
    height: 25px;
    font-size: 8px;
  }

  .lower-left-col {
    width: 125px;
    gap: 4px;
  }

  .k-btn-airport {
    width: 58px;
    height: 23px;
    font-size: 7px;
  }

  .k-arrow {
    height: 20px;
    font-size: 11px;
  }

  .k-round {
    width: 33px;
    height: 33px;
    font-size: 12px;
    border-bottom-width: 2px;
  }

  .alpha-matrix-container {
    padding: 3px;
    gap: 3px;
  }

  .k-alpha {
    height: 29px;
    font-size: 11.5px;
    border-bottom-width: 2px;
  }
}

