:root {
  color-scheme: dark;
  /* PANEL_RULES: Single source of truth for design dimensions */
  --design-w: 1920;
  --design-h: 648;  /* Taller to clear top+bottom drawer overlays (was 576) */
  --panel-base-width: calc(var(--design-w) * 1px);
  --panel-base-height: calc(var(--design-h) * 1px);
  --panel-aspect: calc(var(--design-w) / var(--design-h));
  --scale-min: 0.1;
  --scale-max: 10;
  --stage-pad: 24px;
  --panel-type-scale: 1;  /* Typography scale multiplier */
  --body-bg: radial-gradient(circle at top, #16202f 0%, #070b12 55%, #04060b 100%);
  --text-primary: #f2f6ff;
  --text-muted: #7f93a8;
  --accent: #39a0ff;
  --lamp-off: #1d2836;
  --lamp-on: #16c47f;
  --lamp-rx: #55c0ff;
  --lamp-data: #ffc94d;
  --lamp-cloud: #39a0ff;
  --bezel-bg: #0e141d;
  --bezel-border: #1d2733;
  --bezel-highlight: rgba(118, 150, 210, 0.18);
  --display-bg: linear-gradient(180deg, rgba(8, 16, 26, 0.92), rgba(3, 7, 12, 0.95));
  --display-border: rgba(87, 110, 148, 0.45);
  --display-glow: rgba(12, 207, 255, 0.12);
  --control-surface: linear-gradient(180deg, #121c28, #0c1119 70%, #101824 100%);
  --control-border: rgba(78, 106, 136, 0.35);
  --control-shadow: rgba(3, 4, 8, 0.75);
  --button-bg: #1b2a3a;
  --button-bg-hover: #24374c;
  --button-border: rgba(110, 153, 202, 0.45);
  --pill-bg: rgba(33, 46, 66, 0.92);
  --pill-border: rgba(101, 137, 189, 0.65);
  --meter-bg: rgba(7, 11, 17, 0.85);
  --meter-fill: linear-gradient(90deg, #39a0ff, #15d08c);
  --meter-fill-rx: linear-gradient(90deg, #f6b73c, #f3652b);
  --card-bg: rgba(12, 16, 24, 0.88);
  --card-border: rgba(136, 168, 214, 0.18);

  /* BTN-01: Global button sizing — skins can override these */
  --btn-min-size: 56px;
  --btn-gap: 12px;
  --btn-padding: 10px 14px;
  --btn-radius: 10px;
  --btn-ptt-min-width: 72px;
  --btn-press-scale: 0.94;
  --btn-press-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
  --btn-press-brightness: 0.88;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;  /* Allow body to be shorter than viewport */
  background: var(--body-bg);
  color: var(--text-primary);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.35;
  overflow: hidden;  /* PANEL_RULES: never show scrollbars on panel surface */
}

body {
  font-size: calc(16px * var(--panel-type-scale));
  padding: 0;
}

.panel-page {
  width: 100%;
  padding: 0;
  overflow: hidden;  /* PANEL_RULES: clamp panel to viewport with no scroll */
}

.panel-app {
  width: 100%;
  max-width: none !important;  /* PANEL_RULES: no caps */
}

.panel-stage {
  width: 100%;
  height: calc(100vw / var(--panel-aspect));  /* Height based on width and aspect ratio */
  max-height: calc(100vw / var(--panel-aspect));  /* Never exceed calculated height */
  overflow: hidden;  /* Prevent transient scrollbars during resize */
}

.panel-stage__surface {
  position: relative;
  width: 100%;
  height: 100%;  /* Fill the aspect-ratio constrained stage */
  max-width: none;  /* PANEL_RULES: no caps */
  max-height: none;  /* PANEL_RULES: no caps */
  overflow: visible;  /* PANEL_RULES: allow scaler to extend beyond surface */
  padding: 0;  /* PANEL_RULES: zero padding for edge-to-edge scaling */
}

.panel-stage__scaler {
  width: calc(var(--design-w) * 1px);  /* PANEL_RULES: design dimensions */
  height: calc(var(--design-h) * 1px);
  transform-origin: 0 0;  /* PANEL_RULES: top-left origin */
  will-change: transform;  /* PANEL_RULES: performance hint */
  /* transform set by panel-scale.js */
}

.panel-stage__scaler::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 40px;
  background-color: rgba(22, 32, 47, 0.35);
  /* `panel-stage-glow.png` is distributed alongside the panel package but remains
     untracked in the repo to keep the PR binary-free. */
  background-image: url("./panel-stage-glow.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(59, 109, 170, 0.2);
  opacity: 0.55;
  pointer-events: none;
}

.radio-panel {
  position: relative;
  width: 100%;
  height: 100%;
}

.radio-panel__bezel {
  --panel-padding: 0px;  /* Remove all padding */
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 48px;
  background: var(--bezel-bg);
  border: 1px solid var(--bezel-border);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), inset 0 0 0 1px var(--bezel-highlight);
  font-size: calc(16px * var(--panel-type-scale));
  overflow: hidden;
}

.radio-panel__main {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;  /* Remove all padding */
}

.radio-panel__drawer {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  pointer-events: none;
  min-height: 0;
}

.radio-panel__drawer > * {
  pointer-events: auto;
  width: 100%;
}

.radio-panel__drawer--top {
  justify-content: flex-start;
  top: var(--panel-padding);
  bottom: auto;
  z-index: 20;
}

.radio-panel__drawer--bottom {
  justify-content: flex-end;
  top: auto;
  bottom: var(--panel-padding);
  z-index: 15;
}

.radio-panel__config {
  width: 100%;
}

.config-capsule {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.config-capsule__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 24px;
  border-radius: 999px;
  border: 2px solid rgba(100, 160, 230, 0.55);
  background: linear-gradient(130deg, rgba(18, 30, 46, 0.95), rgba(9, 14, 24, 0.9));
  color: rgba(240, 248, 255, 0.95);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: calc(14px * var(--panel-type-scale));
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  /* Cool blue accent - top drawer */
  box-shadow:
    inset 0 1px 0 rgba(140, 180, 240, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(60, 120, 200, 0.1);
}

.config-capsule__header:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(14, 26, 48, 0.42);
}

.config-capsule__header:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(92, 150, 233, 0.6);
}

.config-capsule__title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.config-capsule__title::before,
.config-capsule__title::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(248, 252, 255, 0.95), rgba(139, 177, 238, 0.65));
  box-shadow: inset 0 1px 1px rgba(5, 9, 18, 0.55), 0 4px 10px rgba(7, 11, 22, 0.75);
  border: 1px solid rgba(120, 164, 223, 0.8);
}

.config-capsule__title::after {
  order: 2;
}

.config-capsule__status {
  font-size: calc(11px * var(--panel-type-scale));
  letter-spacing: 0.18em;
  color: rgba(173, 201, 239, 0.85);
  text-transform: uppercase;
}

.config-capsule.is-collapsed .config-capsule__body {
  display: none;
}

.config-capsule__body {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.config-section {
  display: grid;
  gap: 10px;
}

/* Prominent styling for airport location section (subscriber feature) */
.config-location {
  background: rgba(16, 42, 36, 0.6);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 12px;
  padding: 16px;
  position: relative;
}

.config-location::before {
  content: "SUBSCRIBER FEATURE";
  position: absolute;
  top: -8px;
  left: 16px;
  padding: 2px 10px;
  background: rgba(5, 46, 22, 0.95);
  border: 1px solid rgba(52, 211, 153, 0.5);
  border-radius: 6px;
  font-size: calc(9px * var(--panel-type-scale));
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #6ee7b7;
  text-transform: uppercase;
}

.config-location .config-field__label {
  color: rgba(167, 243, 208, 0.95);
}

.config-location .config-device-note {
  color: rgba(134, 239, 172, 0.85);
}

.config-location input {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(5, 35, 25, 0.9);
}

.config-location input:focus {
  border-color: rgba(52, 211, 153, 0.8);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

/* Compact row layout for config drawer */
.config-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 0;
}

.config-row--fp {
  border-top: 1px solid rgba(100, 140, 200, 0.2);
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  padding: 10px 0;
  margin: 4px 0;
}

.config-field--compact {
  flex: 1 1 120px;
  min-width: 100px;
  max-width: 180px;
}

.config-field--compact .config-field__label {
  font-size: calc(10px * var(--panel-type-scale));
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.config-field--compact input,
.config-field--compact select {
  padding: 10px 12px;
  font-size: calc(14px * var(--panel-type-scale));
  max-width: none;
}

.config-field--narrow {
  flex: 0 1 80px;
  min-width: 70px;
  max-width: 90px;
}

.config-field--airport {
  flex: 0 1 100px;
  max-width: 110px;
}

.config-button--row {
  padding: 10px 16px;
  font-size: calc(11px * var(--panel-type-scale));
  letter-spacing: 0.12em;
  min-height: 42px;
  white-space: nowrap;
  flex-shrink: 0;
}

.config-field {
  display: grid;
  gap: 6px;
}

.config-field__label {
  font-size: calc(14px * var(--panel-type-scale));
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(210, 228, 255, 0.9);
  font-weight: 600;
}

.config-field input,
.config-field select {
  appearance: none;
  width: 100%;
  max-width: 320px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 2px solid rgba(120, 160, 220, 0.5);
  background: rgba(10, 18, 28, 0.9);
  color: #f8fbff;
  font: 500 calc(16px * var(--panel-type-scale))/1.3 "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.config-field input:focus,
.config-field select:focus {
  outline: none;
  border-color: rgba(102, 153, 222, 0.9);
  box-shadow: 0 0 0 2px rgba(65, 126, 224, 0.45);
}

.config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.config-button {
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid rgba(104, 155, 232, 0.6);
  background: linear-gradient(135deg, rgba(52, 105, 198, 0.92), rgba(26, 70, 166, 0.9));
  color: #f7fbff;
  font: 600 calc(14px * var(--panel-type-scale))/1.2 "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  min-height: 48px;
}

.config-button:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(17, 38, 84, 0.5);
}

.config-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 153, 222, 0.6);
}

.config-button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.config-button--secondary {
  background: linear-gradient(135deg, rgba(26, 38, 58, 0.92), rgba(18, 28, 44, 0.88));
  border-color: rgba(92, 138, 202, 0.5);
  color: rgba(211, 228, 255, 0.85);
}

.config-button--secondary.is-active {
  background: linear-gradient(135deg, rgba(36, 82, 150, 0.95), rgba(24, 52, 98, 0.9));
  border-color: rgba(128, 178, 245, 0.8);
  color: #f6fbff;
  box-shadow: 0 14px 32px rgba(31, 68, 118, 0.45);
}

.config-button--secondary:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(24, 46, 82, 0.45);
}

.config-status--dev {
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(12, 20, 32, 0.7);
  color: rgba(164, 204, 255, 0.9);
  font-size: calc(11px * var(--panel-type-scale));
  letter-spacing: 0.04em;
  white-space: pre-wrap;
  text-align: left;
  border: 1px solid rgba(64, 102, 164, 0.4);
}

.config-status {
  font-size: calc(12px * var(--panel-type-scale));
  text-align: right;
  color: rgba(178, 205, 246, 0.8);
  min-height: 18px;
}

.config-status.is-error {
  color: #fca5a5;
}

.config-status.is-ok {
  color: #6ee7b7;
}

.config-devices {
  display: grid;
  gap: 14px;
}

.config-device-note {
  margin: 0;
  font-size: calc(13px * var(--panel-type-scale));
  color: rgba(190, 215, 250, 0.85);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
}

.config-device-note.is-warn {
  color: #fca5a5;
}

.config-device-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.config-device-toggle {
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid rgba(118, 168, 231, 0.5);
  background: rgba(9, 18, 32, 0.75);
  color: rgba(228, 240, 255, 0.9);
  font: 600 calc(13px * var(--panel-type-scale))/1.1 "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
}

.config-device-toggle:hover:not([disabled]) {
  background: rgba(20, 36, 58, 0.85);
}

.config-device-toggle[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.config-capsule.is-collapsed .config-capsule__header {
  box-shadow: none;
}

.config-capsule.is-collapsed .config-capsule__status {
  color: rgba(173, 201, 239, 0.6);
}

.dev-faker {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: min(420px, calc(100vw - 32px));
  z-index: 9000;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: #e8f1ff;
}

.dev-faker__shell {
  border-radius: 18px;
  border: 1px solid rgba(108, 150, 214, 0.5);
  background: rgba(6, 12, 24, 0.9);
  box-shadow: 0 26px 60px rgba(4, 10, 22, 0.8), inset 0 0 0 1px rgba(72, 114, 186, 0.28);
  overflow: hidden;
}

.dev-faker__summary {
  cursor: pointer;
  padding: 12px 16px;
  margin: 0;
  font-size: calc(12px * var(--panel-type-scale));
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(130deg, rgba(20, 32, 54, 0.95), rgba(9, 14, 26, 0.88));
}

.dev-faker__summary:focus-visible {
  outline: 2px solid rgba(92, 150, 233, 0.65);
}

.dev-faker__body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.dev-faker__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dev-faker__preset {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: calc(11px * var(--panel-type-scale));
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dev-faker__preset select {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(104, 150, 214, 0.45);
  background: rgba(6, 14, 28, 0.85);
  color: inherit;
}

.dev-faker__button {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(104, 150, 214, 0.45);
  background: rgba(12, 22, 40, 0.85);
  color: rgba(225, 237, 255, 0.85);
  font: 600 calc(11px * var(--panel-type-scale))/1.2 "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.dev-faker__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(6, 14, 28, 0.6);
}

.dev-faker__button--primary {
  background: linear-gradient(135deg, rgba(56, 110, 198, 0.92), rgba(28, 68, 160, 0.9));
  border-color: rgba(98, 154, 232, 0.6);
  color: #f7fbff;
}

.dev-faker__editor {
  width: 100%;
  min-height: 180px;
  max-height: 320px;
  border-radius: 14px;
  border: 1px solid rgba(92, 138, 210, 0.4);
  background: rgba(4, 12, 24, 0.88);
  color: #f8fbff;
  font: 500 calc(12px * var(--panel-type-scale))/1.4 "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  padding: 12px;
  resize: vertical;
}

.dev-faker__status {
  font-size: calc(11px * var(--panel-type-scale));
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(173, 204, 248, 0.75);
}

.dev-faker__status.is-error {
  color: #fca5a5;
}

.dev-faker__status.is-ok {
  color: #6ee7b7;
}
.radio-display__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 18px;
}

.radio-display__title {
  font-size: calc(16px * var(--panel-type-scale));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: #f7fbff;
  text-shadow: 0 2px 8px rgba(39, 134, 255, 0.35);
}

.radio-panel__header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.radio-panel__logo {
  font-size: calc(48px * var(--panel-type-scale));
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: #f7fbff;
  text-shadow: 0 4px 18px rgba(39, 134, 255, 0.45);
}

.lamp-bank {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 8px;
  margin-left: auto;
}

.lamp {
  position: relative;
  min-width: 48px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--lamp-off);
  border: 1px solid rgba(92, 132, 170, 0.25);
  box-shadow: inset 0 1px 0 rgba(170, 212, 255, 0.16);
  text-align: center;
  text-transform: uppercase;
  font-size: calc(6px * var(--panel-type-scale));
  letter-spacing: 0.12em;
  color: var(--text-muted);
  transition: all 0.18s ease-out;
}

.lamp span {
  pointer-events: none;
}

.lamp.is-on {
  color: #041014;
  box-shadow: 0 0 30px 6px rgba(57, 160, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.lamp[data-lamp="tx"].is-on {
  background: linear-gradient(180deg, #ff5555, #fb1f1f);
  border-color: rgba(255, 133, 133, 0.85);
  color: #140303;
}

.lamp[data-lamp="rx"].is-on {
  background: linear-gradient(180deg, #4bc0ff, #1587ff);
  border-color: rgba(145, 210, 255, 0.9);
}

.lamp[data-lamp="data"].is-on {
  background: linear-gradient(180deg, #ffd966, #ffb347);
  border-color: rgba(255, 217, 102, 0.85);
}

.lamp[data-lamp="cloud"].is-on {
  background: linear-gradient(180deg, #2f7bff, #1e52ff);
  border-color: rgba(136, 183, 255, 0.75);
  color: #eaf2ff;
}

.radio-display {
  position: relative;
  width: 100%;  /* Fill parent edge-to-edge */
  height: 100%;  /* Fill parent edge-to-edge */
  background: var(--display-bg);
  border-radius: 40px;
  padding: 0;  /* Remove all padding - fill to edges */
  border: 1px solid var(--display-border);
  box-shadow: 0 18px 48px rgba(13, 24, 34, 0.55), inset 0 0 45px var(--display-glow);
}

/* Cache bust - Updated grid layout: knobs | LCD display | indicators */
.radio-display__layout {
  display: grid;
  grid-template-columns: 160px 1fr 200px;  /* Wider knob area (160px), same center, wider right (200px) */
  gap: 32px;  /* Increased gap for more breathing room */
  align-items: stretch;  /* Stretch to fill height */
  padding: 64px 32px 52px;  /* Top clears config drawer + display border; bottom clears data drawer */
}

.display-knobs {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 62px;  /* Increased 30% gap for clearer knob separation */
  padding-top: 16px;  /* Align knobs with primary LCD band */
}

.display-surface {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;  /* Allow display surface to grow and fill available space */
}

.display-lines {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 0 0 auto;  /* Don't grow or shrink - take only needed space */
}

.display-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

/* Single frequency line - contains Active/MHz/Standby all in one row */
.display-line {
  flex: 0 0 auto;  /* Don't grow - take only needed height */
}

.display-line__label {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75em;
  letter-spacing: 0.18em;
  min-width: 80px;  /* Align labels */
}

.display-line__value {
  font-size: calc(72px * var(--panel-type-scale));  /* Reduced to fit everything in LCD */
  font-weight: 600;
  letter-spacing: 0.08em;
  text-shadow: 0 0 14px rgba(73, 169, 255, 0.45);
  flex-shrink: 0;  /* Don't shrink */
  font-family: 'Roboto Mono', 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-variant-numeric: tabular-nums;  /* Fixed-width numbers */
  min-width: 9ch;  /* Reserve space for XXX.XXX format (7 chars + spacing) */
  text-align: left;
}

/* Secondary listen frequency - smaller, next to active */
.display-line__value--secondary {
  font-size: calc(36px * var(--panel-type-scale)) !important;  /* Half size of main frequencies */
  margin-left: 1em !important;
  opacity: 0.8 !important;
  visibility: hidden;  /* Hidden by default but still takes up space */
  min-width: 9ch !important;  /* Reserve space for XXX.XXX format */
  font-family: 'Roboto Mono', 'SF Mono', 'Monaco', 'Courier New', monospace !important;
  font-variant-numeric: tabular-nums !important;
  text-align: left !important;
}

.display-line__value--secondary:not(:empty) {
  visibility: visible;  /* Show when there's content */
}

.display-line__unit {
  font-size: calc(18px * var(--panel-type-scale));
  color: var(--text-muted);
  align-self: baseline;  /* Align bottom of MHz with baseline of frequency numbers */
  margin-right: 0.5em;
}

.display-line__label--standby {
  margin-left: 2em;
}

.pill-action {
  appearance: none;
  border: 2px solid var(--pill-border);
  background: var(--pill-bg);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 12px 32px;  /* Larger oval button */
  font-size: calc(18px * var(--panel-type-scale));  /* Larger text */
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pill-action:hover,
.pill-action:focus-visible {
  background: rgba(56, 96, 156, 0.85);
  border-color: rgba(123, 169, 255, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  outline: none;
}

.pill-action--subtle {
  background: rgba(26, 38, 54, 0.75);
  border-color: rgba(74, 104, 150, 0.4);
  color: var(--text-muted);
}

.pill-action--subtle:hover,
.pill-action--subtle:focus-visible {
  color: var(--text-primary);
}

.display-overview {
  display: flex;
  flex-direction: column;  /* Stack vertically: frequencies then metadata */
  justify-content: flex-start;
  align-items: stretch;
  gap: 12px;  /* Tighter spacing to pull inbox up */
  flex: 1;  /* Fill available space */
  /* Glass LCD effect - this is the green LCD box */
  background: linear-gradient(180deg, rgba(0, 188, 212, 0.05), rgba(0, 188, 212, 0.02));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 188, 212, 0.2);
  border-radius: 8px;
  padding: 24px 32px;  /* Generous padding inside LCD */
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1),
              inset 0 -1px 2px rgba(0, 0, 0, 0.3),
              0 0 20px rgba(0, 188, 212, 0.15),
              0 0 40px rgba(0, 188, 212, 0.08),
              0 2px 8px rgba(0, 188, 212, 0.1);
}

/* Old meta row - kept for compatibility */
.display-meta {
  display: flex;
  gap: 18px;
  /* NO flex-wrap - scaler handles scaling */
}

/* Two-column layout below frequencies: meta on left, messages on right */
.display-lower {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  flex: 1;
  min-height: 0;
}

.display-meta-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 100px;
}

.meta-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.meta-label {
  text-transform: uppercase;
  font-size: 0.75em;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.meta-value {
  font-size: calc(22px * var(--panel-type-scale));
  font-weight: 500;
}

/* Bridge indicator - shows connection source (SC/WC/WEB) as meta-value */
.bridge-indicator {
  text-transform: uppercase;
  font-weight: 600;
}

.bridge-indicator--sc {
  color: #4CAF50;
}

.bridge-indicator--wc {
  color: #2196F3;
}

.bridge-indicator--web {
  color: #9E9E9E;
}

/* RADIO-INBOX-001: Message ticker styles - LCD Display Effect */
.display-inbox {
  margin-top: 0.5rem;
  padding: 10px 14px;
  background: linear-gradient(180deg,
    rgba(2, 8, 12, 0.98) 0%,
    rgba(4, 12, 18, 0.99) 50%,
    rgba(2, 6, 10, 0.98) 100%);
  border: 2px solid rgba(30, 50, 70, 0.8);
  border-radius: 4px;
  min-height: calc(60px * var(--panel-type-scale));
  overflow: hidden;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.6),
    inset 0 0 20px rgba(0, 40, 60, 0.15),
    0 1px 0 rgba(60, 80, 100, 0.3);
}

/* Right-side inbox fills the area to the right of meta column - LCD panel */
.display-inbox--right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 16px;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg,
    rgba(2, 8, 12, 0.98) 0%,
    rgba(4, 12, 18, 0.99) 50%,
    rgba(2, 6, 10, 0.98) 100%);
  border: 2px solid rgba(30, 50, 70, 0.8);
  border-radius: 6px;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.6),
    inset 0 0 30px rgba(0, 60, 80, 0.12),
    0 1px 0 rgba(60, 80, 100, 0.3);
}

.inbox-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Right inbox has larger font for 4 lines */
.display-inbox--right .inbox-lines {
  gap: 4px;
}

.inbox-line {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: calc(13px * var(--panel-type-scale));
  letter-spacing: 0.04em;
  color: #00ff88;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 0;
  opacity: 1;
  transition: opacity 0.3s ease, text-shadow 0.3s ease;
}

/* Larger font for right inbox messages - sized for 4 readable lines */
.display-inbox--right .inbox-line {
  font-size: calc(36px * var(--panel-type-scale));
  padding: 2px 0;
  line-height: 1.3;
  color: #00ff88;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
}

.inbox-line--empty {
  color: var(--text-muted);
  font-style: italic;
}

/* Flashing cursor line - indicates connected and waiting */
.inbox-line--cursor {
  color: var(--text-primary);
  min-height: 1.3em;
}

.inbox-cursor {
  display: inline-block;
  width: 0.6em;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: inbox-cursor-blink 1s step-end infinite;
}

@keyframes inbox-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.inbox-line--priority-high {
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
  font-weight: 600;
}

.inbox-line--priority-medium {
  color: #ffd93d;
  text-shadow: 0 0 8px rgba(255, 217, 61, 0.4);
}

.inbox-line--category-selcal {
  color: #6bcb77;
  text-shadow: 0 0 8px rgba(107, 203, 119, 0.4);
}

.inbox-line--category-satcom {
  color: #4d96ff;
  text-shadow: 0 0 10px rgba(77, 150, 255, 0.5);
}

.inbox-line--category-tcas {
  color: #ff922b;
  text-shadow: 0 0 10px rgba(255, 146, 43, 0.5);
}

.inbox-line--category-elt,
.inbox-line--category-emergency {
  color: #ff6b6b;
  text-shadow: 0 0 12px rgba(255, 107, 107, 0.6);
  animation: inbox-pulse 1s ease-in-out infinite;
}

.inbox-line--category-system {
  color: rgba(173, 201, 239, 0.9);
  text-shadow: 0 0 6px rgba(173, 201, 239, 0.3);
  font-style: normal;
  letter-spacing: 0.06em;
}

/* Sent message confirmation styling */
.inbox-line--category-sent {
  color: #6ee7b7;
  text-shadow: 0 0 10px rgba(110, 231, 183, 0.5);
  font-weight: 500;
}

@keyframes inbox-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}


/* SELCAL in meta column - larger and prominent */
.meta-group--selcal {
  margin-top: auto;  /* Push to bottom of column */
}

.meta-value--selcal {
  font-size: calc(24px * var(--panel-type-scale));
  font-weight: 600;
  letter-spacing: 0.16em;
  font-family: 'Roboto Mono', 'SF Mono', 'Monaco', 'Courier New', monospace;
  text-shadow: 0 0 8px rgba(73, 169, 255, 0.3);
}

.display-meters {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.display-meter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.display-meter__bar {
  position: relative;
  height: 8px;  /* Slightly taller bars */
  width: 100%;  /* Full width */
  border-radius: 999px;
  background: rgba(6, 12, 20, 0.85);
  overflow: hidden;
  border: 1px solid rgba(66, 102, 148, 0.45);
}

.display-meter__fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #39a0ff, #15d08c);
  transition: width 0.08s linear;
}

.display-meter[data-meter="rx"] .display-meter__fill {
  background: var(--meter-fill-rx);
}

.display-indicators {
  display: flex;
  flex-direction: column;
  justify-content: space-between;  /* Space out top and bottom */
  gap: 24px;
  padding: 24px 16px;
  background: rgba(8, 16, 28, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(66, 102, 148, 0.25);
  min-height: 100%;  /* Fill available height */
}

/* SWAP button at top of indicators */
.display-indicators > .pill-action {
  width: 100%;
  text-align: center;
  order: 1;  /* First item */
}

/* PTT button in indicators area */
.display-indicators > .control-button--ptt {
  width: 100%;
  padding: 16px 24px;
  font-size: calc(20px * var(--panel-type-scale));
  order: 4;  /* Last item */
}

.display-meters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  order: 2;  /* Move meters after status lamps */
}

.status-lamps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 0;
  order: 3;  /* Move lamps to bottom of indicators */
}

.status-lamp {
  width: 18px;  /* Larger lamps */
  height: 18px;
  border-radius: 50%;
  background: rgba(50, 50, 50, 0.6);
  border: 2px solid rgba(80, 80, 80, 0.8);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.status-lamp.is-active {
  background: #4CAF50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.8), 0 0 3px rgba(76, 175, 80, 1);
  border-color: #81C784;
}

.status-lamp[data-lamp="tx"].is-on,
.status-lamp[data-lamp="tx"].is-active {
  background: #ff5722;
  box-shadow: 0 0 8px rgba(255, 87, 34, 0.8), 0 0 3px rgba(255, 87, 34, 1);
  border-color: #ff8a65;
}

.status-lamp[data-lamp="rx"].is-on,
.status-lamp[data-lamp="rx"].is-active {
  background: #2196F3;
  box-shadow: 0 0 8px rgba(33, 150, 243, 0.8), 0 0 3px rgba(33, 150, 243, 1);
  border-color: #64B5F6;
}

.status-lamp[data-lamp="data"].is-on,
.status-lamp[data-lamp="data"].is-active {
  background: #FFC107;
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.8), 0 0 3px rgba(255, 193, 7, 1);
  border-color: #FFD54F;
}

/* Cloud lamp: red when disconnected, green when connected */
.status-lamp[data-lamp="cloud"] {
  background: #d32f2f;
  box-shadow: 0 0 6px rgba(211, 47, 47, 0.6), 0 0 2px rgba(211, 47, 47, 0.8);
  border-color: #e57373;
}

.status-lamp[data-lamp="cloud"].is-on,
.status-lamp[data-lamp="cloud"].is-active {
  background: #4CAF50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.8), 0 0 3px rgba(76, 175, 80, 1);
  border-color: #81C784;
}

.control-knob {
  position: relative;
  width: 128px;  /* Larger knobs - increased from 112px */
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid rgba(98, 132, 177, 0.45);
  background: var(--control-surface);
  box-shadow: inset 0 0 0 1px rgba(160, 190, 220, 0.1), 0 12px 24px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.control-knob:hover,
.control-knob:focus-visible {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(160, 190, 220, 0.26), 0 18px 30px rgba(0, 0, 0, 0.75);
  outline: none;
}

.control-knob__inner {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(210, 230, 255, 0.5), rgba(22, 32, 44, 0.8));
  box-shadow: inset 0 0 0 1px rgba(190, 220, 255, 0.28);
  cursor: pointer;
  z-index: 2;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}

/* Interactive inner knobs - hover feedback for all inner knobs */
.control-knob__inner:hover,
.control-knob__inner:focus {
  transform: scale(1.05);
  box-shadow: inset 0 0 0 1px rgba(190, 220, 255, 0.4), 0 0 8px rgba(160, 200, 255, 0.3);
  outline: 2px solid rgba(160, 200, 255, 0.5);
  outline-offset: 2px;
  background: radial-gradient(circle at 30% 30%, rgba(220, 240, 255, 0.6), rgba(32, 42, 54, 0.85));
}

.control-knob__label {
  position: absolute;
  bottom: -1.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}


.memory-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: rgba(8, 16, 28, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(66, 102, 148, 0.2);
}

.memory-status {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0.3rem 0.5rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(90, 129, 170, 0.35);
  background: rgba(15, 22, 32, 0.85);
}

.memory-bank {
  display: grid;
  grid-template-columns: repeat(8, 1fr);  /* 8 buttons: M1-M5, Test, Ack, Intercom */
  gap: 10px;
}

.memory-slot {
  appearance: none;
  border: 2px solid rgba(90, 129, 170, 0.45);
  background: rgba(19, 27, 39, 0.9);
  border-radius: 0.75rem;
  padding: 14px 16px;  /* Slightly smaller to fit 8 buttons */
  color: var(--text-muted);
  font-size: calc(15px * var(--panel-type-scale));  /* Slightly smaller text */
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.memory-hint {
  margin: 0;
  font-size: 0.75em;
  color: var(--text-muted);
}

.memory-slot--set {
  color: #6cecc3;
  border-color: rgba(76, 216, 167, 0.65);
  box-shadow: 0 0 8px rgba(76, 216, 167, 0.4), inset 0 0 4px rgba(76, 216, 167, 0.2);
}

.memory-slot--empty {
  color: #f37878;
  border-color: rgba(255, 136, 136, 0.45);
}

.memory-slot--action {
  color: var(--text-primary);
  border-color: rgba(118, 162, 224, 0.55);
  background: rgba(23, 33, 47, 0.9);
}

.memory-slot:hover,
.memory-slot:focus-visible {
  outline: none;
  background: rgba(34, 46, 66, 0.9);
}

.memory-slot--set:hover,
.memory-slot--set:focus-visible {
  color: #a8ffdd;
  border-color: rgba(130, 255, 209, 0.85);
}

.memory-slot--empty:hover,
.memory-slot--empty:focus-visible {
  color: #ffb4b4;
  border-color: rgba(255, 180, 180, 0.85);
}

.memory-slot--action:hover,
.memory-slot--action:focus-visible {
  color: #d8e7ff;
  border-color: rgba(156, 200, 255, 0.85);
}

/* Intercom button states */
.memory-slot--intercom.active {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.85);
  background: rgba(255, 107, 107, 0.15);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.6), inset 0 0 8px rgba(255, 107, 107, 0.3);
  animation: intercom-pulse 1.5s ease-in-out infinite;
}

@keyframes intercom-pulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.6), inset 0 0 8px rgba(255, 107, 107, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.8), inset 0 0 12px rgba(255, 107, 107, 0.4);
  }
}

.selcal-label {
  font-size: 0.85em;
  color: var(--text-muted);
}

.selcal-code {
  font-size: 1.35em;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-primary);
}

.radio-data {
  background: var(--control-surface);
  border: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-primary);
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

.radio-config {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  color: var(--text-primary);
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0 16px 16px 16px;
}

.radio-panel__config {
  border: none;
  background: transparent;
  display: block;
}

.config-capsule {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0;
}

.data-panels {
  display: grid;
  grid-template-columns: 5fr 1fr 4fr;  /* Keypad (30%+20% = 50%) | ELT (10%) | DATA (40%) */
  gap: 18px;  /* More spacing between panels */
}

.data-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;  /* Reduced from 12px */
  position: relative;
}

/* Panel separators - subtle divider lines between panels */
.data-panel--keypad::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 5%;
  bottom: 5%;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(80, 120, 170, 0.4) 20%,
    rgba(80, 120, 170, 0.5) 50%,
    rgba(80, 120, 170, 0.4) 80%,
    transparent 100%);
}

.data-panel--keypad {
  /* Width set by grid-template-columns (440px) - no explicit width needed */
}

.data-panel--acars {
  /* Takes remaining space */
  padding-left: 4px;
}

/* Canvas container - holds switchable data type canvases */
.data-canvas-container {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Individual canvases - only one visible at a time */
.data-canvas {
  display: none;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.18s ease;
  width: 880px;  /* Fixed width to match ACARS and prevent size jumps */
  min-width: 880px;
}

.data-canvas.is-active {
  display: flex;
  opacity: 1;
}

/* SATCOM composer canvas styles */
.satcom-composer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.satcom-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.satcom-field span {
  font-size: calc(12px * var(--panel-type-scale));
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 220, 255, 0.85);
  font-weight: 600;
}

.satcom-field input,
.satcom-field textarea {
  background: rgba(10, 18, 28, 0.9);
  border: 2px solid rgba(100, 140, 190, 0.4);
  border-radius: 10px;
  padding: 12px 14px;
  color: #f8fbff;
  font-size: calc(14px * var(--panel-type-scale));
  font-family: inherit;
  max-width: 320px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.satcom-field input:focus,
.satcom-field textarea:focus {
  outline: none;
  border-color: rgba(100, 160, 240, 0.8);
  box-shadow: 0 0 0 2px rgba(65, 126, 224, 0.35);
}

.satcom-field textarea {
  resize: none;
  min-height: 80px;
}

.satcom-composer-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.satcom-composer-actions button {
  appearance: none;
  background: linear-gradient(180deg, rgba(36, 82, 140, 0.95), rgba(28, 65, 120, 0.98));
  border: 2px solid rgba(100, 160, 240, 0.6);
  border-radius: 10px;
  padding: 12px 24px;
  color: #f6fbff;
  font-size: calc(14px * var(--panel-type-scale));
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.satcom-composer-actions button:hover {
  background: linear-gradient(180deg, rgba(46, 95, 160, 0.95), rgba(36, 80, 140, 0.98));
  border-color: rgba(120, 180, 255, 0.8);
}

.satcom-composer-actions button:active {
  transform: translateY(1px);
}

.satcom-feedback {
  font-size: calc(12px * var(--panel-type-scale));
  min-height: 1.5em;
  color: rgba(180, 205, 240, 0.8);
}

/* SELCAL canvas */
.selcal-canvas-composer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.selcal-canvas-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.selcal-canvas-field span {
  font-size: calc(12px * var(--panel-type-scale));
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 220, 255, 0.85);
  font-weight: 600;
}

.selcal-canvas-field input {
  background: rgba(10, 18, 28, 0.9);
  border: 2px solid rgba(100, 140, 190, 0.4);
  border-radius: 10px;
  padding: 12px 14px;
  color: #f8fbff;
  font-size: calc(14px * var(--panel-type-scale));
  font-family: inherit;
  max-width: 200px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.selcal-canvas-field input:focus {
  outline: none;
  border-color: rgba(100, 160, 240, 0.8);
  box-shadow: 0 0 0 2px rgba(65, 126, 224, 0.35);
}

.selcal-canvas-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.selcal-canvas-actions button {
  appearance: none;
  background: linear-gradient(180deg, rgba(36, 82, 140, 0.95), rgba(28, 65, 120, 0.98));
  border: 2px solid rgba(100, 160, 240, 0.6);
  border-radius: 10px;
  padding: 12px 24px;
  color: #f6fbff;
  font-size: calc(14px * var(--panel-type-scale));
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.selcal-canvas-actions button:hover {
  background: linear-gradient(180deg, rgba(46, 95, 160, 0.95), rgba(36, 80, 140, 0.98));
  border-color: rgba(120, 180, 255, 0.8);
}

.selcal-canvas-actions button:active {
  transform: translateY(1px);
}

.selcal-canvas-feedback {
  font-size: calc(12px * var(--panel-type-scale));
  min-height: 1.5em;
  color: rgba(180, 205, 240, 0.8);
}

/* Media queries removed - scaler handles all sizing */

.panel-collapse {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--display-bg);
  border-radius: 16px;
  border: 1px solid var(--display-border);
  box-shadow: 0 8px 24px rgba(13, 24, 34, 0.5), inset 0 0 24px var(--display-glow);
  overflow: hidden;
  z-index: 10;
}

/* Position top drawer (config) at top - offset to prevent overlap with main panel */
.radio-config.panel-collapse {
  top: 16px;  /* Increased from 8px to prevent overlap when collapsed */
  border: none !important;
  background: linear-gradient(180deg, rgb(8, 16, 26), rgb(3, 7, 12)) !important;  /* Opaque - can't see through metal */
  box-shadow: 0 12px 32px rgba(13, 24, 34, 0.5), inset 0 0 32px var(--display-glow) !important;
}

/* Position bottom drawer (data) at bottom - offset slightly to reduce overlap */
.radio-data.panel-collapse {
  bottom: 4px;
  display: flex;
  flex-direction: column-reverse;  /* Header at bottom for consistent edge interaction */
  background: linear-gradient(180deg, rgb(8, 16, 26), rgb(3, 7, 12)) !important;  /* Opaque - can't see through metal */
}

.panel-collapse__header {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-primary);
  padding: 4px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: calc(11px * var(--panel-type-scale));
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: inherit;
  width: 100%;
  min-height: 28px;
}

.panel-collapse__header:hover,
.panel-collapse__header:focus-visible {
  background: rgba(32, 48, 70, 0.3);
  outline: none;
}

/* Caution tape indicator - subtle visual hint for clickable drawer edge */
.panel-collapse__header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    -45deg,
    #1a1a1a,
    #1a1a1a 4px,
    #b8860b 4px,
    #b8860b 8px
  );
  opacity: 0.6;
  pointer-events: none;
}

/* Config drawer: caution tape at bottom of header (top edge of panel) */
.radio-config .panel-collapse__header {
  position: relative;
}
.radio-config .panel-collapse__header::before {
  bottom: 0;
}

/* Data drawer: warm amber accent - bottom drawer */
.radio-data .panel-collapse__header {
  position: relative;
  border-top: 1px solid rgba(255, 180, 80, 0.25);
  background: linear-gradient(180deg,
    rgba(30, 26, 18, 0.6) 0%,
    transparent 100%);
}

/* Caution tape at top of header (bottom edge of panel) */
.radio-data .panel-collapse__header::before {
  top: 0;
}

.panel-collapse__title {
  flex: 1;
  text-align: left;
}

.panel-collapse__right {
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.panel-collapse__press {
  font-size: 0.85em;
  opacity: 0.6;
  font-weight: 400;
}

.panel-collapse__chevron {
  transition: transform 0.22s ease;
  font-size: 0.9em;
}

.panel-collapse.is-collapsed .panel-collapse__chevron {
  transform: rotate(-90deg);
}

.panel-collapse__body {
  display: grid;
  gap: 0;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s ease;
  will-change: max-height, opacity;
}

.panel-collapse__body.is-scrollable {
  overflow: hidden;  /* PANEL_RULES: prevent inner scrollbars */
}

.panel-collapse__body.is-animating {
  pointer-events: none;
}

.panel-collapse.is-collapsed .panel-collapse__body {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .panel-collapse__body {
    transition-duration: 0.01ms;
  }
  .panel-collapse__chevron {
    transition-duration: 0.01ms;
  }
  .panel-collapse__header {
    transition: none;
  }
}

.section-title {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78em;
  color: var(--text-muted);
}

.satcom-display {
  min-height: 2em;
  padding: 0.45em 0.65em;
  border-radius: 0.6rem;
  border: 1px solid rgba(90, 140, 200, 0.35);
  background: rgba(6, 12, 20, 0.9);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.satcom-pad {
  display: grid;
  grid-template-columns: 3fr 2fr;  /* Alpha (30% of drawer) | Numeric (20% of drawer) */
  gap: 10px;  /* More spacing between sections */
  align-items: start;
}

.satcom-pad__letters {
  display: grid;
  grid-template-columns: repeat(7, 1fr);  /* 7 equal columns filling 30% of drawer */
  gap: 4px;
  align-content: start;
}

.satcom-pad__cluster {
  display: grid;
  gap: 6px;
  align-content: start;
}

.satcom-pad__numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* 3 equal columns filling numeric space */
  gap: 4px;
}

.satcom-pad__controls {
  display: grid;
  grid-auto-rows: 38px;  /* Larger control button height */
  gap: 5px;
}

/* Media query removed - scaler handles all sizing */

.satcom-pad button,
.satcom-actions button,
.data-panel button,
.memory-slot,
.control-knob,
.pill-action,
.control-button {
  font-family: inherit;
}

.satcom-pad button,
.satcom-actions button,
.data-panel button {
  appearance: none;
  border: 1px solid rgba(50, 70, 100, 0.7);
  background: linear-gradient(180deg,
    rgba(32, 46, 65, 0.95) 0%,
    rgba(20, 30, 44, 0.98) 50%,
    rgba(14, 22, 34, 0.95) 100%);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text-primary);
  font-size: calc(14px * var(--panel-type-scale));
  cursor: pointer;
  transition: all 0.12s ease;
  min-height: 38px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25),
    0 3px 5px rgba(0, 0, 0, 0.35);
}

.satcom-pad button:active,
.satcom-actions button:active,
.data-panel button:active {
  background: linear-gradient(180deg,
    rgba(14, 22, 34, 0.95) 0%,
    rgba(20, 30, 44, 0.98) 50%,
    rgba(32, 46, 65, 0.95) 100%);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.25);
  transform: translateY(1px);
}

.satcom-pad__letters button {
  min-width: unset;  /* Let grid control width */
  width: 100%;  /* Fill grid cell */
  aspect-ratio: 1;  /* Keep buttons square */
  font-weight: 600;
  font-size: calc(16px * var(--panel-type-scale));
}

.satcom-pad__numbers button {
  min-width: unset;  /* Let grid control width */
  width: 100%;  /* Fill grid cell */
  min-height: 48px;
  font-size: calc(18px * var(--panel-type-scale));
  font-weight: 600;
}

.satcom-pad__controls button {
  font-size: calc(11px * var(--panel-type-scale));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 38px;
}

.satcom-pad button:hover,
.satcom-pad button:focus-visible,
.satcom-actions button:hover,
.satcom-actions button:focus-visible,
.data-panel button:hover,
.data-panel button:focus-visible {
  background: linear-gradient(180deg,
    rgba(42, 58, 80, 0.95) 0%,
    rgba(28, 42, 58, 0.98) 50%,
    rgba(20, 32, 46, 0.95) 100%);
  border-color: rgba(100, 140, 200, 0.7);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Hold value display for buttons with data-hold attribute */
.satcom-pad__numbers button[data-hold] {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.satcom-pad__numbers button[data-hold]::after {
  content: attr(data-hold);
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-size: 0.55em;
  color: rgba(173, 201, 239, 0.6);
  letter-spacing: 0;
}

.satcom-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* Fixed 3-column - scaler handles scaling */
  gap: 6px;
}

.acars-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  /* NO flex-wrap - scaler handles scaling */
}

.acars-stats {
  display: flex;
  gap: 13px;
  /* NO flex-wrap - scaler handles scaling */
  color: var(--text-muted);
  font-size: 0.85em;
}

.acars-status-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  border: 1px solid rgba(90, 140, 200, 0.35);
  background: #ff6b6b;
  box-shadow: 0 0 0.35rem rgba(255, 107, 107, 0.55);
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.acars-status-indicator.is-ready {
  background: #24d58d;
  border-color: rgba(36, 213, 141, 0.65);
  box-shadow: 0 0 0.45rem rgba(36, 213, 141, 0.65);
}

.acars-status-indicator.is-pending {
  background: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.55);
  box-shadow: 0 0 0.45rem rgba(255, 107, 107, 0.55);
}

/* Mode selector - ACARS/SATCOM toggle buttons */
.acars-mode-selector {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(90, 130, 180, 0.25);
  margin-bottom: 8px;
}

.acars-mode-selector button {
  appearance: none;
  border: 1px solid rgba(60, 80, 110, 0.6);
  background: linear-gradient(180deg,
    rgba(30, 45, 65, 0.95) 0%,
    rgba(18, 28, 42, 0.98) 50%,
    rgba(12, 20, 32, 0.95) 100%);
  border-radius: 6px;
  padding: 10px 20px;
  color: var(--text-muted);
  font-size: calc(13px * var(--panel-type-scale));
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.12s ease;
  min-width: 90px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 3px 6px rgba(0, 0, 0, 0.4);
}

.acars-mode-selector button:active {
  background: linear-gradient(180deg,
    rgba(12, 20, 32, 0.95) 0%,
    rgba(18, 28, 42, 0.98) 50%,
    rgba(30, 45, 65, 0.95) 100%);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.3);
  transform: translateY(1px);
}

.acars-mode-selector button.is-active {
  background: linear-gradient(180deg,
    rgba(20, 55, 100, 0.95) 0%,
    rgba(36, 82, 140, 0.98) 50%,
    rgba(45, 95, 160, 0.95) 100%);
  border-color: rgba(100, 160, 240, 0.8);
  color: #f6fbff;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 0 10px rgba(57, 160, 255, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.3);
}

.acars-mode-selector button:hover:not(.is-active) {
  background: linear-gradient(180deg,
    rgba(38, 55, 80, 0.95) 0%,
    rgba(26, 40, 58, 0.98) 50%,
    rgba(18, 28, 42, 0.95) 100%);
  border-color: rgba(132, 174, 230, 0.65);
  color: var(--text-primary);
}

.acars-mode-label {
  font-size: calc(11px * var(--panel-type-scale));
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* FreeTextInput component styling */
.freetext-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.freetext-input__mode-selector {
  display: flex;
  gap: 8px;
  align-items: center;
}

.freetext-mode-btn {
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(96, 130, 170, 0.4);
  background: rgba(14, 20, 30, 0.8);
  color: var(--text-muted);
  font-size: 0.75em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.freetext-mode-btn.is-active {
  background: rgba(32, 72, 120, 0.9);
  border-color: rgba(132, 174, 230, 0.7);
  color: var(--text-primary);
}

.freetext-input__textarea {
  width: 100%;
  min-height: 70px;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(96, 130, 170, 0.45);
  background: rgba(6, 12, 20, 0.92);
  color: var(--text-primary);
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.8em;
  line-height: 1.4;
  resize: none;  /* No resize handle */
}

.freetext-input__textarea:focus {
  outline: none;
  border-color: rgba(132, 174, 230, 0.75);
  box-shadow: 0 0 0 2px rgba(132, 174, 230, 0.2);
}

.freetext-input__actions {
  display: flex;
  gap: 6px;
}

.acars-composer {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.acars-menu {
  display: grid;
  gap: 14px;
  grid-template-columns: 260px 260px 300px;
}

.acars-menu-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acars-menu-field span {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: calc(12px * var(--panel-type-scale));
  color: rgba(200, 220, 255, 0.85);
  font-weight: 600;
}

.acars-menu-field select {
  appearance: none;
  border: 2px solid rgba(100, 140, 190, 0.5);
  border-radius: 10px;
  background: rgba(14, 20, 30, 0.9);
  color: var(--text-primary);
  padding: 12px 14px;
  font-family: inherit;
  font-size: calc(14px * var(--panel-type-scale));
  min-height: 48px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.acars-menu-field select:focus-visible {
  outline: none;
  border-color: rgba(132, 174, 230, 0.75);
  box-shadow: 0 0 0 2px rgba(132, 174, 230, 0.2);
}

.acars-fields {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;  /* Reduced from 0.45rem */
  font-size: 0.75em;  /* Reduced from 0.85em */
}

.acars-empty {
  padding: 0.5rem 0.4rem;  /* Reduced from 0.7rem 0.5rem */
  border-radius: 0.5rem;  /* Reduced from 0.65rem */
  background: rgba(12, 18, 28, 0.8);
  color: var(--text-muted);
  text-align: center;
}

.acars-field-grid {
  display: grid;
  gap: 10px;  /* Reduced from 16px */
  grid-template-columns: 280px 280px 280px;  /* Reduced from 320px to fit better */
}

.acars-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acars-field span {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: calc(11px * var(--panel-type-scale));
  color: rgba(200, 220, 255, 0.85);
  font-weight: 600;
}

.acars-field input,
.acars-field textarea {
  appearance: none;
  border: 2px solid rgba(100, 140, 190, 0.45);
  border-radius: 8px;
  background: rgba(8, 12, 20, 0.9);
  color: var(--text-primary);
  padding: 10px 12px;
  font-family: inherit;
  font-size: calc(14px * var(--panel-type-scale));
  letter-spacing: 0.05em;
  resize: none;
  max-width: 260px;
}

.acars-field input:focus-visible,
.acars-field textarea:focus-visible {
  outline: none;
  border-color: rgba(132, 174, 230, 0.75);
  box-shadow: 0 0 0 2px rgba(132, 174, 230, 0.18);
}

.acars-field-meta {
  display: flex;
  gap: 7px;
  /* NO flex-wrap - scaler handles scaling */
  color: var(--text-muted);
  font-size: 0.75em;
}

.acars-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 130, 170, 0.4);
  background: rgba(14, 20, 30, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.62em;
}

.acars-preview {
  display: grid;
  gap: 18px;
  grid-template-columns: 480px 480px;
}

.acars-preview-pane {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.acars-preview-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7em;
  color: var(--text-muted);
}

[data-acars-preview-text] {
  width: 100%;
  min-height: 4.4rem;
  resize: vertical;
  border-radius: 0.65rem;
  border: 1px solid rgba(96, 130, 170, 0.45);
  background: rgba(8, 12, 20, 0.92);
  color: var(--text-primary);
  padding: 0.6rem 0.7rem;
  font-family: inherit;
  font-size: 0.95em;
  letter-spacing: 0.04em;
}

[data-acars-preview-text]:focus-visible {
  outline: none;
  border-color: rgba(132, 174, 230, 0.75);
  box-shadow: 0 0 0 2px rgba(132, 174, 230, 0.18);
}

[data-acars-preview-json] {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(96, 130, 170, 0.45);
  background: rgba(6, 12, 20, 0.92);
  color: var(--text-muted);
  font-size: 0.65em;  /* Reduced from 0.75em to fit more content */
  overflow: hidden;  /* No scrollbars - content should scale to fit */
  white-space: pre-wrap;
  word-break: break-word;
}

.acars-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.acars-actions button {
  border-radius: 10px;
  padding: 12px 24px;
  font-size: calc(14px * var(--panel-type-scale));
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 48px;
}

.acars-feedback {
  min-height: 1.2rem;
  font-size: 0.75em;
  color: var(--text-muted);
}

.acars-feedback.is-success {
  color: #9fe3b6;
}

.acars-feedback.is-warn {
  color: #f0d9a5;
}

.acars-feedback.is-error {
  color: #ffb4b4;
}

.acars-feedback.is-info {
  color: var(--text-primary);
}

.radio-ptt {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.control-button {
  appearance: none;
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  border-radius: 0.85rem;
  padding: 0.55em 0.85em;
  color: var(--text-primary);
  font-size: 0.85em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.control-button:hover,
.control-button:focus-visible {
  background: var(--button-bg-hover);
  border-color: rgba(142, 190, 255, 0.7);
  transform: translateY(-1px);
  outline: none;
}

.control-button.is-active {
  background: linear-gradient(180deg, #2b3d56, #1c293d 55%, #273a55 100%);
  border-color: rgba(150, 204, 255, 0.85);
  color: #f2f6ff;
  box-shadow: 0 0 18px rgba(57, 160, 255, 0.35);
}

.control-button--ptt {
  background: linear-gradient(180deg, #1d2636, #121a27 45%, #1c2a3a 100%);
  font-weight: 600;
}

.control-button.disabled,
.control-button[disabled],
.pill-action[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.ptt-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;  /* Fill available width */
}

/* PTT button in memory block area */
.ptt-buttons .control-button--ptt {
  flex: 1;  /* Fill available space */
  padding: 18px 32px;
  font-size: calc(18px * var(--panel-type-scale));
}

.panel-footer-text,
.panel-footer {
  max-width: min(100%, var(--panel-max-width));
  color: var(--text-muted);
  text-align: center;
  font-size: calc(14px * var(--panel-type-scale));
}

/* Hide all text outside panel on home-listen mode (public front page) */
[data-panel-mode="home-listen"] .panel-footer-text,
[data-panel-mode="home-listen"] .panel-footer {
  display: none;
}

/* Tighten spacing on home-listen mode */
[data-panel-mode="home-listen"] .panel-page {
  gap: 0;
}

[data-panel-mode="home-listen"] .panel-app {
  gap: 0;
}

.panel-footer-text code {
  background: rgba(16, 24, 36, 0.9);
  border-radius: 0.4rem;
  padding: 0.15em 0.45em;
  border: 1px solid rgba(84, 124, 180, 0.25);
}

.panel-footer {
  display: none;  /* Hidden - status shown by lamp on main panel instead */
}

.panel-footer--ok {
  color: #6ee7b7;
}

.panel-footer--warn {
  color: #facc15;
}

.panel-footer--err {
  color: #fca5a5;
}

.dev-board {
  width: min(100%, var(--panel-max-width));
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  border-radius: 26px;
  background: rgba(9, 12, 18, 0.82);
  border: 1px solid rgba(98, 134, 188, 0.25);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  color: var(--text-primary);
}

.dev-board h2 {
  margin: 0;
  font-size: calc(26px * var(--panel-type-scale));
}

.task-list {
  display: grid;
  grid-template-columns: 480px 480px 480px;
  gap: 24px;
}

.task-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1.2rem;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.task-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.task-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9em;
}

.task-status {
  font-weight: 600;
  color: var(--text-muted);
}

.task-status[data-state="logged"] {
  color: var(--accent);
}

/* ========================================================================
   ELT-001: Emergency Locator Transmitter Panel Styles
   ======================================================================== */

.data-panel--elt {
  width: 140px;
  padding: 8px;
  background: rgba(12, 18, 28, 0.9);
  border: 1px solid rgba(90, 130, 180, 0.35);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Separator line after ELT panel */
.data-panel--elt::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 5%;
  bottom: 5%;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(80, 120, 170, 0.4) 20%,
    rgba(80, 120, 170, 0.5) 50%,
    rgba(80, 120, 170, 0.4) 80%,
    transparent 100%);
}

.elt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(90, 130, 180, 0.25);
}

.elt-title {
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.elt-freq {
  font-size: 0.65em;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.elt-switch-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.elt-switch-btn {
  appearance: none;
  border: 1px solid rgba(96, 130, 170, 0.45);
  background: rgba(14, 20, 30, 0.85);
  border-radius: 4px;
  padding: 6px 8px;
  color: var(--text-muted);
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.elt-switch-btn:hover:not([disabled]) {
  background: rgba(32, 48, 70, 0.85);
  border-color: rgba(132, 174, 230, 0.65);
  color: var(--text-primary);
}

.elt-switch-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(132, 174, 230, 0.4);
}

.elt-switch-btn.is-active {
  background: rgba(36, 82, 140, 0.9);
  border-color: rgba(100, 160, 240, 0.8);
  color: #f6fbff;
  box-shadow: 0 0 8px rgba(57, 160, 255, 0.3);
}

.elt-switch-btn--on {
  border-color: rgba(255, 100, 100, 0.45);
}

.elt-switch-btn--on:hover:not([disabled]) {
  border-color: rgba(255, 140, 140, 0.7);
  background: rgba(80, 30, 30, 0.85);
}

.elt-switch-btn--on.is-active {
  background: rgba(180, 50, 50, 0.9);
  border-color: rgba(255, 120, 120, 0.85);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 80, 80, 0.5);
}

.elt-switch-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.elt-test-btn {
  appearance: none;
  border: 1px solid rgba(255, 193, 7, 0.5);
  background: rgba(40, 35, 15, 0.85);
  border-radius: 4px;
  padding: 6px 8px;
  color: rgba(255, 220, 120, 0.9);
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  user-select: none;  /* Prevent text selection */
}

.elt-test-btn:hover {
  background: rgba(60, 50, 20, 0.9);
  border-color: rgba(255, 210, 80, 0.75);
  color: rgba(255, 235, 150, 1);
}

.elt-test-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.4);
}

.elt-test-btn:active,
.elt-test-btn.is-active {
  background: rgba(180, 140, 20, 0.9);
  border-color: rgba(255, 220, 100, 0.9);
  color: #1a1500;
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.elt-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: rgba(6, 12, 20, 0.8);
  border-radius: 4px;
  border: 1px solid rgba(70, 100, 140, 0.25);
}

.elt-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(80, 80, 80, 0.6);
  border: 1px solid rgba(100, 100, 100, 0.5);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

/* ELT status states */
.elt-status-indicator[data-state="off"] {
  background: rgba(80, 80, 80, 0.6);
  border-color: rgba(100, 100, 100, 0.5);
}

.elt-status-indicator[data-state="disabled"] {
  background: #ff5722;
  border-color: #ff8a65;
  box-shadow: 0 0 8px rgba(255, 87, 34, 0.7);
}

.elt-status-indicator[data-state="armed"] {
  background: #4CAF50;
  border-color: #81C784;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
}

.elt-status-indicator[data-state="active"] {
  background: #ff5722;
  border-color: #ff8a65;
  box-shadow: 0 0 10px rgba(255, 87, 34, 0.8);
  animation: elt-blink 0.5s ease-in-out infinite;
}

.elt-status-indicator[data-state="test"] {
  background: #FFC107;
  border-color: #FFD54F;
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.7);
  animation: elt-blink 1s ease-in-out infinite;
}

@keyframes elt-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.elt-status-text {
  font-size: 0.6em;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.elt-status-text[data-state="active"] {
  color: #ff8a65;
}

.elt-status-text[data-state="test"] {
  color: #FFD54F;
}

.elt-status-text[data-state="armed"] {
  color: #81C784;
}

.elt-status-text[data-state="disabled"] {
  color: var(--text-muted);
  font-style: italic;
}

/* ELT feature disabled state */
.data-panel--elt.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.data-panel--elt.is-disabled .elt-header {
  opacity: 0.7;
}

/* ========================================================================
   BTN-01→05: Button Size, Spacing & Press Feedback (Beta UX Polish)
   ======================================================================== */

/* BTN-05: Unified press feedback for ALL interactive elements.
   Scale down + inset shadow + brightness drop on :active */
.pill-action:active,
.memory-slot:active,
.control-button:active,
.elt-switch-btn:active,
.satcom-pad button:active,
.satcom-actions button:active,
.data-panel button:active,
[role="button"]:active {
  transform: scale(var(--btn-press-scale));
  box-shadow: var(--btn-press-shadow);
  filter: brightness(var(--btn-press-brightness));
  transition-duration: 0.06s;
}

/* BTN-02: Memory bank (M1-M5, TEST, ACK, INTERCOM) — larger gaps, bigger targets */
.memory-bank {
  gap: var(--btn-gap);
}

.memory-slot {
  min-width: 58px;
  min-height: var(--btn-min-size);
  padding: var(--btn-padding);
  border-radius: var(--btn-radius);
}

/* BTN-02: PTT button — largest target, prominent glow */
.ptt-buttons .control-button--ptt,
.display-indicators > .control-button--ptt {
  min-width: var(--btn-ptt-min-width);
  min-height: 60px;
  border-radius: var(--btn-radius);
}

/* PTT active glow (green tint) — fired when bus emits ptt-active */
.control-button--ptt.is-active {
  background: linear-gradient(180deg, #14352a, #0d2620 45%, #163830 100%);
  border-color: rgba(74, 222, 128, 0.85);
  color: #6ee7b7;
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.45), inset 0 0 12px rgba(74, 222, 128, 0.15);
  animation: ptt-glow 1.2s ease-in-out infinite;
}

@keyframes ptt-glow {
  0%, 100% {
    box-shadow: 0 0 24px rgba(74, 222, 128, 0.45), inset 0 0 12px rgba(74, 222, 128, 0.15);
  }
  50% {
    box-shadow: 0 0 36px rgba(74, 222, 128, 0.65), inset 0 0 18px rgba(74, 222, 128, 0.25);
  }
}

/* BTN-03: Keypad (SATCOM pad letters + numbers) — wider gaps, bigger min-height */
.satcom-pad__letters {
  gap: 8px 10px;
}

.satcom-pad__numbers {
  gap: 8px;
}

.satcom-pad__letters button {
  min-height: 52px;
}

.satcom-pad__numbers button {
  min-height: 52px;
}

.satcom-pad__controls {
  gap: 8px;
}

.satcom-pad__controls button {
  min-height: 42px;
}

/* BTN-03: Stronger :active feedback for satcom pad (override the existing one) */
.satcom-pad button:active {
  transform: scale(var(--btn-press-scale));
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.5);
}

/* BTN-04: Control knobs — active press feedback */
.control-knob:active {
  transform: scale(0.96);
  box-shadow: inset 0 0 0 1px rgba(160, 190, 220, 0.15), 0 6px 12px rgba(0, 0, 0, 0.5);
  transition-duration: 0.06s;
}

.control-knob__inner:active {
  transform: scale(0.92);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  transition-duration: 0.06s;
}

/* BTN-01: Pill action buttons — enforce min hit target */
.pill-action {
  min-height: var(--btn-min-size);
  border-radius: var(--btn-radius);
}

/* BTN-01: Control buttons — enforce min hit target */
.control-button {
  min-height: 44px;
  min-width: 44px;
  border-radius: var(--btn-radius);
}

/* BTN-02: PTT buttons flex container — enforce gap */
.ptt-buttons {
  gap: var(--btn-gap);
}

/* BTN-01: Display indicators spacing */
.display-indicators {
  gap: var(--btn-gap);
}

