/* Pilot hangar — spec sheet + aircraft deck over shared field backdrop */

.rcs-hangar-page .rcs-hangar-wrap {
  width: 100%;
  max-width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 0 16px 28px;
}

@media (max-width: 767px) {
  .rcs-hangar-page .rcs-hangar-wrap {
    padding-bottom: 36px;
  }
}

@media (min-width: 900px) {
  .rcs-hangar-page .rcs-hangar-wrap {
    max-width: min(1240px, calc(100vw - 48px));
    padding: 0 24px 32px;
  }
}

.rcs-hangar-page .rcs-page-loading,
.rcs-hangar-page .rcs-page-auth {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 16px;
  width: 100%;
}

/* ── Stage layout ── */
.rcs-pilot-field-page .hg-btn {
  background: var(--rcs-btn-bg);
  color: var(--rcs-text);
  border-color: var(--rcs-border);
}

.hg-btn {
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  text-decoration: none;
  backdrop-filter: blur(8px);
}

.hg-btn.primary {
  background: rgba(34, 197, 94, 0.95);
  border-color: #166534;
  color: #052e16;
}

.hg-btn.primary:hover {
  background: #22c55e;
}

.hg-btn.primary.hg-btn--dirty {
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.65),
    0 0 var(--rcs-tactile-glow-blur, 8px) var(--rcs-tactile-glow-spread, 1px) rgba(250, 204, 21, 0.4);
}

@keyframes hg-save-create-pulse {
  0%, 100% {
    background: rgba(34, 197, 94, 0.95);
    box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    background: #86efac;
    box-shadow: inset 0 0 16px 3px rgba(255, 255, 255, 0.42);
  }
}

.hg-btn.primary.hg-btn--create-pulse {
  overflow: hidden;
  isolation: isolate;
  box-shadow: none;
  animation: hg-save-create-pulse 1s ease-in-out infinite;
}

.hg-btn.ghost {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
}

/* ── Stage layout ── */
.hg-stage {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  width: 100%;
}

.hg-deck--top {
  flex-shrink: 0;
  padding: 6px 0 2px;
}

.hg-deck--top .hg-carousel-wrap {
  padding-bottom: 0;
}

.hg-spec-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 4px 16px 12px;
  overflow: visible;
}

.hg-spec-panel[hidden] {
  display: none !important;
}

.hg-deck {
  flex-shrink: 0;
}

.hg-deck-actions {
  flex-shrink: 0;
  padding-bottom: 16px;
}

@media (min-width: 900px) {
  .hg-deck {
    padding-bottom: 12px;
  }
}

.hg-deck-actions {
  padding: 0 16px 8px;
}

.hg-deck-actions[hidden] {
  display: none !important;
}

.hg-deck-actions-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rcs-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

[data-theme="dark"] .rcs-pilot-field-page .hg-deck-actions-inner {
  background: rgba(17, 24, 39, 0.9);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

@media (min-width: 900px) {
  .hg-stage {
    padding: 0 0 12px;
  }

  .hg-deck--top {
    order: 0;
    padding: 0 28px 6px;
  }

  .hg-spec-panel {
    order: 1;
    padding: 2px 28px 10px;
  }

  .hg-deck-actions {
    display: none !important;
  }
}

@media (max-width: 899px) {
  .hg-spec-panel {
    padding: 0 12px 20px;
    flex: 0 1 auto;
    max-height: none;
    scroll-margin-top: 10px;
  }

  .hg-spec-footer-actions--desktop {
    display: none !important;
  }
}

@media (min-width: 900px) {
  .hg-spec-footer-actions--desktop {
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }
}

/* ── Carousel / bays — equal tiles, glow on hover, selected lights up ── */
.hg-carousel-wrap {
  position: relative;
  width: 100%;
  padding: 0;
}

/* ── Deck toolbar panel (readable over backdrop) ── */
.hg-deck-toolbar-panel {
  margin: 0 16px 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

[data-theme="light"] .rcs-hangar-page .hg-deck-toolbar-panel {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}

@media (min-width: 900px) {
  .hg-deck-toolbar-panel {
    margin: 0 28px 8px;
  }
}

/* ── Deck toolbar + carousel row ── */
.hg-deck-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 0;
}

.hg-deck-toolbar-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.hg-deck-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.92);
}

[data-theme="light"] .rcs-hangar-page .hg-deck-title {
  color: var(--rcs-muted);
}

.hg-deck-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #052e16;
  background: rgba(34, 197, 94, 0.92);
  border: 1px solid rgba(22, 101, 52, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

[data-theme="dark"] .rcs-pilot-field-page .hg-deck-count-pill {
  color: #ecfdf5;
  background: rgba(22, 163, 74, 0.88);
  border-color: rgba(134, 239, 172, 0.35);
}

.hg-deck-inventory-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.16);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
}

.hg-deck-inventory-btn:hover {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.24);
}

[data-theme="dark"] .rcs-pilot-field-page .hg-deck-inventory-btn {
  background: rgba(17, 24, 39, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--rcs-text);
}

.hg-deck-inventory-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  background: var(--rcs-brand-red, #dd0206);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.hg-deck-inventory-inline {
  font-weight: 700;
  color: var(--rcs-accent-text, #dd0206);
  text-decoration: none;
}

.hg-deck-inventory-inline:hover {
  text-decoration: underline;
}

.hg-deck-empty-note {
  padding: 6px 0 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.92);
}

[data-theme="light"] .rcs-hangar-page .hg-deck-empty-note {
  color: var(--rcs-muted);
}

.hg-carousel-scroll-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

@media (min-width: 900px) {
  .hg-carousel-scroll-wrap {
    padding: 0 28px;
  }
}

.hg-carousel-scroll-wrap::before,
.hg-carousel-scroll-wrap::after {
  display: none;
}

.hg-carousel-chevron {
  position: absolute;
  top: 50%;
  transform: translateY(calc(-50% - 6px));
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    opacity 0.15s ease,
    transform 0.15s ease;
}

.hg-carousel-chevron--prev {
  left: 2px;
}

.hg-carousel-chevron--next {
  right: 2px;
}

.hg-carousel-chevron:not(:disabled):hover,
.hg-carousel-chevron:not(:disabled):focus-visible {
  border-color: var(--rcs-brand-red, #dd0206);
  background: rgba(15, 23, 42, 0.96);
  box-shadow:
    0 0 0 2px rgba(221, 2, 6, 0.28),
    0 4px 16px rgba(0, 0, 0, 0.32);
  transform: translateY(calc(-50% - 7px));
}

.hg-carousel-chevron:disabled {
  opacity: 0.32;
  cursor: default;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.42);
  box-shadow: none;
}

[data-theme="light"] .rcs-hangar-page .hg-carousel-chevron {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .rcs-hangar-page .hg-carousel-chevron:not(:disabled):hover,
[data-theme="light"] .rcs-hangar-page .hg-carousel-chevron:not(:disabled):focus-visible {
  border-color: var(--rcs-brand-red, #dd0206);
  background: #fff;
  box-shadow:
    0 0 0 2px rgba(221, 2, 6, 0.2),
    0 4px 14px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .rcs-hangar-page .hg-carousel-chevron:disabled {
  background: rgba(255, 255, 255, 0.55);
  color: rgba(15, 23, 42, 0.35);
  border-color: rgba(15, 23, 42, 0.1);
}

.hg-carousel-chevron[hidden] {
  display: none !important;
}

.hg-empty--inline {
  text-align: left;
  padding: 8px 4px 12px;
  max-width: none;
  margin: 0;
}

.hg-empty--inline p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 10px 14px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  display: inline-block;
  max-width: min(100%, 520px);
}

[data-theme="light"] .rcs-hangar-page .hg-empty--inline p {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

.hg-carousel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 10px 4px 10px;
  scrollbar-width: auto;
  scrollbar-color: rgba(221, 2, 6, 0.62) rgba(255, 255, 255, 0.1);
  width: 100%;
}

[data-theme="light"] .rcs-hangar-page .hg-carousel {
  scrollbar-color: rgba(221, 2, 6, 0.55) rgba(15, 23, 42, 0.08);
}

@media (min-width: 900px) {
  .hg-carousel {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 14px;
    padding: 10px 36px 12px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x proximity;
  }
}

.hg-carousel::-webkit-scrollbar {
  height: 10px;
}

.hg-carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}

.hg-carousel::-webkit-scrollbar-thumb {
  background: rgba(221, 2, 6, 0.58);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

[data-theme="light"] .rcs-hangar-page .hg-carousel::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .rcs-hangar-page .hg-carousel::-webkit-scrollbar-thumb {
  background: rgba(221, 2, 6, 0.52);
}

.hg-bay {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 118px;
  cursor: pointer;
  text-align: center;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

@media (min-width: 600px) {
  .hg-bay {
    width: 128px;
  }
}

@media (min-width: 900px) {
  .hg-bay {
    width: 132px;
  }
}

.hg-card-slot {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 84px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-shrink: 0;
}

.hg-card-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: #0f172a;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    opacity 0.22s ease;
}

/* Dim unselected tiles with an overlay — CSS filter on photos janks mobile scroll. */
.hg-card-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: rgba(8, 12, 20, 0.4);
  opacity: 0;
  transition: opacity 0.22s ease, background 0.22s ease;
}

.hg-bay:not(.is-selected) .hg-card-frame {
  border-color: rgba(255, 255, 255, 0.22);
}

.hg-bay:not(.is-selected) .hg-card-frame::after {
  opacity: 1;
}

.hg-bay:not(.is-selected):hover .hg-card-frame,
.hg-bay:not(.is-selected):focus-visible .hg-card-frame {
  border-color: rgba(134, 239, 172, 0.55);
  box-shadow:
    0 0 0 1px rgba(134, 239, 172, 0.45),
    0 0 18px rgba(134, 239, 172, 0.35),
    0 6px 20px rgba(0, 0, 0, 0.28);
}

.hg-bay:not(.is-selected):hover .hg-card-frame::after,
.hg-bay:not(.is-selected):focus-visible .hg-card-frame::after {
  background: rgba(8, 12, 20, 0.16);
}

.hg-bay.is-selected .hg-card-frame {
  border-color: #86efac;
  box-shadow:
    0 0 0 2px rgba(134, 239, 172, 0.95),
    0 0 22px rgba(74, 222, 128, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

.hg-bay.is-selected .hg-card-frame::after {
  opacity: 0;
}

.hg-bay.is-selected:hover .hg-card-frame,
.hg-bay.is-selected:focus-visible .hg-card-frame {
  box-shadow:
    0 0 0 2px rgba(134, 239, 172, 1),
    0 0 28px rgba(74, 222, 128, 0.62),
    0 10px 26px rgba(0, 0, 0, 0.32);
}

.hg-bay.is-default:not(.is-selected) .hg-card-frame {
  border-color: rgba(251, 191, 36, 0.45);
}

.hg-bay.is-default.is-selected .hg-card-frame {
  border-color: #fde047;
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.85),
    0 0 22px rgba(74, 222, 128, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

.hg-card-photo {
  /* positioned by RcsPhotoFraming.applyToElement */
  display: block;
}

.hg-card-frame--empty {
  background: rgba(15, 23, 42, 0.55);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.28);
}

.hg-card-camera {
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.55);
}

.hg-card-camera svg {
  width: 100%;
  height: 100%;
}

.hg-card-frame--add {
  border-style: dashed;
  border-color: rgba(134, 239, 172, 0.4);
  background: rgba(8, 14, 10, 0.4);
  opacity: 1;
}

.hg-card-frame--add::after,
.hg-card-frame--empty::after {
  content: none;
}

.hg-bay--add:not(.is-selected) .hg-card-frame--add {
  opacity: 0.88;
}

.hg-bay--add:not(.is-selected):hover .hg-card-frame--add,
.hg-bay--add.is-selected .hg-card-frame--add {
  opacity: 1;
  border-color: rgba(134, 239, 172, 0.65);
  box-shadow:
    0 0 0 1px rgba(134, 239, 172, 0.4),
    0 0 16px rgba(134, 239, 172, 0.28);
}

.hg-card-caption {
  width: 100%;
  min-height: 44px;
  padding: 6px 8px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  transition: opacity 0.22s ease, background 0.22s ease;
}

.hg-bay:not(.is-selected) .hg-card-caption {
  opacity: 0.92;
  background: rgba(15, 23, 42, 0.68);
}

.hg-bay.is-selected .hg-card-caption {
  opacity: 1;
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(134, 239, 172, 0.25);
}

.hg-bay-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #f8fafc;
  width: 100%;
}

.hg-bay-meta {
  font-size: 10px;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.3;
  width: 100%;
}

.hg-bay-badge {
  display: inline-block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.22);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.hg-bay--add .hg-add-icon {
  font-size: 30px;
  font-weight: 300;
  color: #86efac;
  line-height: 1;
}

.hg-bay--add .hg-bay-label {
  color: #ecfdf5;
}

.hg-bay:focus-visible {
  outline: none;
}

.hg-bay:focus-visible .hg-card-caption {
  outline: 2px solid rgba(134, 239, 172, 0.65);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .hg-card-frame,
  .hg-card-caption {
    transition: none;
  }
}

/* Empty hangar */
.hg-empty {
  text-align: center;
  padding: 40px 24px 60px;
  max-width: 420px;
  margin: 0 auto;
}

.hg-empty h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--rcs-text);
}

.hg-empty p {
  margin: 0 0 18px;
  color: var(--rcs-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Spec sheet — frosted panel (matches profile/logbook field cards) ── */
.rcs-pilot-field-page .hg-spec-sheet {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--rcs-text);
  border: 1px solid var(--rcs-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

[data-theme="dark"] .rcs-pilot-field-page .hg-spec-sheet {
  background: rgba(17, 24, 39, 0.9);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}

/* Mobile: no blur on the photo-containing sheet (scroll jank). PC keeps glass. */
@media (max-width: 899px) {
  .rcs-pilot-field-page .hg-spec-sheet {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.97);
  }

  [data-theme="dark"] .rcs-pilot-field-page .hg-spec-sheet {
    background: rgba(17, 24, 39, 0.97);
  }

  .hg-spec-photo-col {
    background: #f1f5f9;
  }

  [data-theme="dark"] .rcs-pilot-field-page .hg-spec-photo-col {
    background: #0f172a;
  }

  .hg-card-caption,
  .hg-deck-toolbar-panel,
  .hg-spec-sticky-bar,
  .hg-deck-actions-inner {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .hg-card-caption {
    background: rgba(15, 23, 42, 0.92);
  }

  .hg-bay:not(.is-selected) .hg-card-caption {
    background: rgba(15, 23, 42, 0.88);
  }

  .hg-bay.is-selected .hg-card-caption {
    background: rgba(15, 23, 42, 0.94);
  }

  .hg-deck-toolbar-panel {
    background: rgba(15, 23, 42, 0.96);
  }

  [data-theme="light"] .rcs-hangar-page .hg-deck-toolbar-panel {
    background: rgba(255, 255, 255, 0.97);
  }

  .rcs-pilot-field-page .hg-spec-sticky-bar {
    background: rgba(255, 255, 255, 0.98);
  }

  [data-theme="dark"] .rcs-pilot-field-page .hg-spec-sticky-bar {
    background: rgba(17, 24, 39, 0.98);
  }

  .hg-deck-actions-inner {
    background: rgba(255, 255, 255, 0.97);
  }

  [data-theme="dark"] .rcs-pilot-field-page .hg-deck-actions-inner {
    background: rgba(17, 24, 39, 0.97);
  }
}

.hg-spec-stack {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
}

.hg-spec-sheet {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
}

.hg-spec-sheet-top {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hg-spec-extended-wrap {
  flex: 0 0 auto;
  width: 100%;
  border-top: 1px solid var(--rcs-border);
  border-radius: 0 0 14px 14px;
  background: var(--rcs-panel);
  overflow: hidden;
}

.hg-extended-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  padding: 11px 16px;
  margin: 0;
  background: var(--rcs-input-bg);
  border: none;
  cursor: pointer;
  color: var(--rcs-text);
  font: inherit;
  border-radius: 0;
}

.hg-extended-toggle:not(.is-open) {
  animation: hg-extended-breathe 4s ease-in-out infinite;
}

.hg-extended-toggle.is-open {
  animation: none;
  box-shadow: none;
  background: var(--rcs-panel);
  border-bottom: 1px solid var(--rcs-border);
}

.hg-extended-toggle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.hg-extended-toggle-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rcs-text);
}

.hg-extended-toggle-chevron {
  font-size: 20px;
  line-height: 1;
  color: var(--rcs-status, #22c55e);
  flex-shrink: 0;
}

.hg-extended-toggle.is-open .hg-extended-toggle-label {
  color: var(--rcs-muted);
}

.hg-extended-toggle.is-open .hg-extended-toggle-chevron {
  color: var(--rcs-muted);
}

.hg-extended-toggle-hint {
  font-size: 11px;
  color: var(--rcs-muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
  line-height: 1.35;
}

.hg-extended-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 0 16px 12px;
  background: var(--rcs-input-bg);
}

.hg-extended-preview[hidden] {
  display: none !important;
}

.hg-extended-preview-chip {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--rcs-muted);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px dashed var(--rcs-border);
  background: transparent;
  opacity: 0.85;
}

@keyframes hg-extended-breathe {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
  }
  50% {
    box-shadow: inset 0 0 0 2px rgba(34, 197, 94, 0.55), 0 0 10px rgba(34, 197, 94, 0.18);
  }
}

.hg-spec-extended {
  flex: 0 0 auto;
  width: 100%;
  background: var(--rcs-panel);
}

.hg-spec-extended-scroll {
  padding: 10px 16px 14px;
  overflow: visible;
}

@media (max-width: 899px) {
  .hg-spec-extended-scroll {
    max-height: none;
    overflow-y: visible;
  }
}

.hg-spec-quick {
  flex: 0 0 auto;
  overflow: visible;
  padding: 8px 16px 10px;
}

.hg-spec-scroll--quick,
.hg-spec-quick {
  flex: 0 0 auto;
  overflow: visible;
}

.hg-spec-sheet-body {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: 0;
}

@media (min-width: 900px) {
  .hg-spec-stack {
    max-width: min(1240px, calc(100vw - 48px));
  }

  .hg-spec-sheet-body {
    flex-direction: row;
    align-items: stretch;
  }
}

@media (max-width: 899px) {
  .hg-spec-sheet-top {
    max-height: none;
  }

  .hg-spec-sheet {
    max-width: none;
  }

  .hg-spec-extended-scroll {
    max-height: none;
  }
}

.hg-spec-photo-col {
  flex-shrink: 0;
  padding: 14px;
  background: rgba(248, 250, 252, 0.72);
  border-bottom: 1px solid var(--rcs-border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-height: 0;
}

[data-theme="dark"] .rcs-pilot-field-page .hg-spec-photo-col {
  background: rgba(15, 23, 42, 0.55);
}

@media (min-width: 900px) {
  .hg-spec-photo-col {
    width: 320px;
    border-bottom: none;
    border-right: 1px solid var(--rcs-border);
    padding: 16px 14px 14px;
  }

  .hg-spec-photo-frame {
    max-width: 292px;
    aspect-ratio: 16 / 9;
    min-height: 168px;
  }

  .hg-spec-photo-actions {
    max-width: 292px;
  }
}

.hg-spec-photo-top {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 100%;
}

.hg-spec-photo-frame {
  position: relative;
  width: 100%;
  max-width: min(100%, 300px);
  aspect-ratio: 16 / 10;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--rcs-border);
  background: #0f172a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  padding: 0;
  cursor: zoom-in;
}

.hg-spec-photo-frame.hg-photo-open {
  cursor: zoom-in;
}

.hg-spec-photo-lg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hg-spec-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--rcs-muted);
  font-size: 12px;
  text-align: center;
  padding: 16px;
}

.hg-spec-photo-placeholder svg {
  width: 36px;
  height: 36px;
  opacity: 0.45;
  stroke: #64748b;
}

.hg-spec-hero-blurb {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 2px 10px;
  min-height: 0;
}

.hg-spec-hero-type {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rcs-brand-red, #dd0206);
}

.hg-spec-hero-name {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 900;
  font-style: italic;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--rcs-text);
  word-break: break-word;
  hyphens: auto;
}

.hg-spec-hero-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hg-spec-hero-line {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--rcs-text);
}

.hg-spec-hero-line--power {
  color: var(--rcs-brand-red, #dd0206);
}

.hg-spec-hero-line--muted {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rcs-muted);
}

.hg-spec-photo-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding-top: 0;
  width: 100%;
  max-width: min(100%, 300px);
  align-self: center;
}

.hg-spec-photo-actions .hg-btn {
  width: 100%;
  justify-content: center;
}

.hg-spec-photo-actions .hg-btn--photo {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 800;
}

.hg-spec-photo-actions .hg-btn--photo-secondary {
  font-size: 11px;
  font-weight: 600;
  color: var(--rcs-muted);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.hg-spec-photo-actions .hg-btn--photo-secondary:hover {
  color: var(--rcs-error);
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.hg-spec-photo-hint {
  margin: 0;
  font-size: 11px;
  color: var(--rcs-muted);
  text-align: center;
  line-height: 1.4;
}

.hg-spec-photo-upload-hint {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--rcs-muted);
  text-align: center;
  line-height: 1.45;
}

.hg-spec-preflight-knob {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border-radius: 10px;
  background: #0a0a0a;
  color: #facc15;
  border: 2px solid #facc15;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.22s ease, transform 0.15s ease, border-color 0.22s ease;
}

.hg-spec-preflight-knob__stripe {
  display: block;
  height: 8px;
  flex-shrink: 0;
  background: repeating-linear-gradient(
    -45deg,
    #facc15,
    #facc15 7px,
    #0a0a0a 7px,
    #0a0a0a 14px
  );
  pointer-events: none;
}

.hg-spec-preflight-knob__stripe--bottom {
  height: 5px;
}

.hg-spec-preflight-knob__label {
  position: relative;
  z-index: 1;
  padding: 12px 14px 11px;
  text-align: center;
  line-height: 1.25;
  background: #0a0a0a;
  color: #facc15;
}

.hg-spec-preflight-knob:hover,
.hg-spec-preflight-knob:focus-visible {
  transform: translateY(-1px);
  border-color: #fde047;
  box-shadow:
    0 0 0 1px #0a0a0a,
    0 0 0 3px #facc15,
    0 0 20px rgba(250, 204, 21, 0.55),
    0 0 32px rgba(250, 204, 21, 0.28),
    0 6px 20px rgba(0, 0, 0, 0.5);
  color: #fde047;
  outline: none;
}

[data-theme="light"] .hg-spec-preflight-knob {
  background: #111827;
  border-color: #ca8a04;
  color: #ca8a04;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .hg-spec-preflight-knob__label {
  background: #111827;
  color: #eab308;
}

[data-theme="light"] .hg-spec-preflight-knob__stripe {
  background: repeating-linear-gradient(
    -45deg,
    #eab308,
    #eab308 7px,
    #111827 7px,
    #111827 14px
  );
}

[data-theme="light"] .hg-spec-preflight-knob:hover,
[data-theme="light"] .hg-spec-preflight-knob:focus-visible {
  border-color: #eab308;
  box-shadow:
    0 0 0 1px #ffffff,
    0 0 0 3px #ca8a04,
    0 0 16px rgba(234, 179, 8, 0.45),
    0 6px 18px rgba(15, 23, 42, 0.12);
  color: #facc15;
}

.hg-spec-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.hg-spec-sheet--new .hg-hero-stats {
  display: none;
}

.hg-spec-header {
  display: none;
}

.hg-spec-sticky-bar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding: 8px 12px;
  border: 1px solid var(--rcs-border);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

[data-theme="dark"] .rcs-pilot-field-page .hg-spec-sticky-bar {
  background: rgba(17, 24, 39, 0.96);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

.hg-spec-sticky-start {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hg-spec-add-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  width: auto;
  height: auto;
  padding: 6px 12px 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(22, 163, 74, 0.55);
  background: rgba(34, 197, 94, 0.18);
  color: #16a34a;
  font-size: inherit;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.hg-spec-add-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.2);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.hg-spec-add-btn__label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hg-spec-add-btn:hover,
.hg-spec-add-btn:focus-visible {
  background: rgba(34, 197, 94, 0.32);
  border-color: rgba(34, 197, 94, 0.85);
  box-shadow:
    0 0 0 2px rgba(134, 239, 172, 0.45),
    0 0 16px rgba(34, 197, 94, 0.55),
    0 0 28px rgba(74, 222, 128, 0.35);
  transform: translateY(-1px);
}

[data-theme="dark"] .rcs-pilot-field-page .hg-spec-add-btn {
  color: #86efac;
  background: rgba(22, 163, 74, 0.22);
}

.hg-spec-sticky-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  margin-left: auto;
}

.hg-spec-sticky-actions .hg-btn,
.hg-spec-sticky-actions .hg-btn--default-chip {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.hg-spec-sticky-actions #hg-set-default,
.hg-spec-sticky-actions .hg-btn--default-chip {
  min-width: 118px;
  box-sizing: border-box;
}

.hg-btn--default-chip {
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #854d0e;
  border-radius: 10px;
  font-weight: 700;
  cursor: default;
}

[data-theme="dark"] .rcs-pilot-field-page .hg-btn--default-chip {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.14);
}

.hg-spec-inventory-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: 10px;
  text-decoration: none;
}

@media (max-width: 899px) {
  .hg-spec-sticky-bar {
    top: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 6px 8px;
    gap: 5px;
  }

  .hg-spec-sticky-start {
    width: 100%;
  }

  .hg-spec-sticky-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 4px;
  }

  .hg-spec-add-btn {
    min-height: 34px;
    padding: 5px 8px;
    border-radius: 8px;
  }

  .hg-spec-add-btn__label {
    display: none;
  }

  .hg-spec-kicker {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .hg-spec-sticky-actions #hg-delete {
    display: none !important;
  }

  .hg-spec-sticky-actions .hg-spec-inventory-btn,
  .hg-spec-sticky-actions #hg-save-spec,
  .hg-spec-sticky-actions #hg-copy-model {
    flex: 1 1 calc(33.333% - 3px);
    min-width: 0;
    min-height: 30px;
    padding: 5px 6px;
    font-size: 9px;
    line-height: 1.15;
    white-space: nowrap;
    display: inline-flex !important;
  }

  .hg-spec-sticky-actions #hg-set-default,
  .hg-spec-sticky-actions .hg-btn--default-chip {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    min-height: 30px;
    padding: 5px 8px;
    font-size: 9px;
    line-height: 1.15;
    display: inline-flex !important;
    justify-content: center;
  }

  .hg-spec-inventory-btn {
    gap: 4px;
  }

  .hg-spec-inventory-btn .hg-deck-inventory-badge {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 9px;
    line-height: 16px;
  }

  .hg-carousel-scroll-wrap {
    padding: 0 40px;
  }

  .hg-carousel-chevron {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .hg-carousel-chevron--prev {
    left: 0;
  }

  .hg-carousel-chevron--next {
    right: 0;
  }
}

.hg-spec-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hg-spec-kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rcs-brand-red, #dd0206);
}

.hg-spec-identity-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: end;
  padding: 10px 16px 6px;
}

@media (min-width: 900px) {
  .hg-spec-identity-row {
    grid-template-columns: 128px minmax(220px, 2.2fr) minmax(160px, 1fr);
    gap: 10px;
  }
}

.hg-spec-title-row {
  display: grid;
  grid-template-columns: minmax(110px, 140px) 1fr;
  gap: 8px;
  align-items: end;
}

.hg-spec-title-row .hg-spec-field--wide {
  grid-column: 1 / -1;
}

.hg-spec-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  flex-shrink: 1;
  min-width: 0;
}

@media (max-width: 640px) {
  .hg-spec-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .hg-spec-header-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .hg-spec-header-actions .hg-btn,
  .hg-spec-header-actions .hg-stat-chip {
    font-size: 11px;
    padding: 7px 10px;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .hg-spec-header-actions .hg-btn.primary {
    flex: 1 1 100%;
  }
}

.hg-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 16px 8px;
  margin-top: 4px;
  background: transparent;
  border-bottom: 1px solid var(--rcs-border);
  flex-shrink: 0;
}

.hg-hero-stat {
  padding: 10px 12px;
  background: var(--rcs-input-bg);
  border: 1px solid var(--rcs-border);
  border-radius: 8px;
  text-align: center;
}

.hg-hero-stat-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rcs-muted);
  margin-bottom: 4px;
}

.hg-hero-stat-value {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--rcs-text);
  letter-spacing: -0.02em;
}

@media (max-width: 599px) {
  .hg-hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hg-spec-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 16px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.2) transparent;
}

.hg-spec-section {
  margin-bottom: 16px;
}

.hg-spec-section:last-child {
  margin-bottom: 0;
}

.hg-spec-section-title {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rcs-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rcs-border);
}

.hg-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hg-spec-grid--4 {
  grid-template-columns: repeat(2, 1fr);
}

.hg-spec-grid--quick {
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 520px) {
  .hg-spec-grid--quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hg-spec-section--quick {
  border: none;
  border-radius: 0;
  padding: 8px 16px 10px;
  background: transparent;
  margin-bottom: 0;
}

.hg-quick-block {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--rcs-border);
  border-radius: 10px;
  background: var(--rcs-input-bg);
}

.hg-quick-block:last-child {
  margin-bottom: 0;
}

.hg-quick-block-title {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rcs-muted);
}

.hg-quick-block-hint {
  margin: -4px 0 8px;
  font-size: 11px;
  color: var(--rcs-muted);
  line-height: 1.35;
}

.hg-quick-block--link {
  background: transparent;
  border-style: dashed;
}

.hg-spec-grid--quick-tight {
  grid-template-columns: 1fr;
  gap: 6px;
}

@media (min-width: 520px) {
  .hg-spec-grid--quick-tight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hg-spec-section--quick .hg-spec-field-label {
  font-size: 9px;
  letter-spacing: 0.04em;
}

.hg-spec-section--quick .hg-unit-row-inner .hg-spec-unit-select {
  max-width: 68px;
  min-width: 56px;
  flex: 0 0 60px;
  padding: 6px 6px;
  font-size: 11px;
}

.hg-spec-section--quick .hg-spec-input,
.hg-spec-section--quick .hg-spec-select {
  font-size: 13px;
  padding: 6px 8px;
}

.hg-spec-section--quick .hg-unit-row-inner {
  gap: 6px;
}

.hg-spec-section--quick .hg-unit-row-inner .hg-unit-value {
  min-width: 0;
  flex: 1 1 auto;
}

@media (min-width: 600px) {
  .hg-spec-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 599px) {
  .hg-spec-grid {
    grid-template-columns: 1fr;
  }
}

.hg-spec-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hg-spec-field--wide {
  grid-column: 1 / -1;
}

.hg-spec-field-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rcs-muted);
}

.hg-spec-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--rcs-border);
  background: var(--rcs-input-bg);
  color: var(--rcs-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.hg-spec-input:focus,
.hg-spec-input:focus-visible,
.hg-spec-sheet input:focus,
.hg-spec-sheet select:focus,
.hg-spec-sheet textarea:focus {
  outline: none;
  border-color: var(--rcs-accent);
  box-shadow: 0 0 0 2px var(--rcs-accent-dim);
}

.hg-spec-header .hg-stat-chip {
  background: var(--rcs-pill-bg);
  border-color: var(--rcs-border);
  color: var(--rcs-muted);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--rcs-border);
  align-self: center;
}

.hg-spec-textarea {
  min-height: 72px;
  resize: vertical;
}

.hg-spec-status {
  font-size: 12px;
  color: var(--rcs-success);
  margin: 0 16px 12px;
}

.hg-spec-status.is-error {
  color: var(--rcs-error);
}

.hg-spec-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--rcs-muted);
}

.hg-product-link {
  color: var(--rcs-accent-text);
  font-weight: 700;
  text-decoration: none;
}

.hg-product-link:hover {
  text-decoration: underline;
}

.hg-spec-custom-row[hidden] {
  display: none !important;
}

@media (min-width: 900px) and (max-height: 1000px) {
  .hg-spec-panel {
    align-items: flex-start;
    padding: 0 24px 4px;
  }

  .hg-spec-stack {
    max-width: min(1240px, calc(100vw - 48px));
  }

  .hg-spec-photo-col {
    padding: 12px;
  }

  .hg-spec-identity-row {
    padding-top: 8px;
  }

  .hg-spec-quick {
    padding-top: 6px;
    padding-bottom: 8px;
  }
}

.hg-spec-field--check { flex-direction: row; align-items: center; gap: 8px; }
.hg-check-group { margin-top: 4px; }
.hg-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px 16px;
  margin-top: 6px;
  align-items: start;
}
.hg-check-grid .hg-check-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--rcs-text);
  cursor: pointer;
}
.hg-check-grid .hg-check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}
.hg-check-grid .hg-check-item span {
  flex: 1;
  min-width: 0;
}
.hg-unit-row-inner {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}
.hg-spec-sheet .hg-unit-row-inner .hg-unit-value {
  width: auto;
  flex: 1 1 72px;
  min-width: 72px;
}
.hg-spec-sheet .hg-unit-row-inner .hg-spec-unit-select {
  width: auto;
  flex: 0 0 88px;
  min-width: 72px;
  max-width: 96px;
}
.hg-unit-row-inner .hg-unit-value { flex: 1 1 72px; min-width: 72px; }
.hg-unit-row-inner .hg-spec-unit-select { max-width: 96px; flex-shrink: 0; }
.hg-servos-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
}
.hg-servo-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.1fr) minmax(80px, 0.9fr) minmax(90px, 0.95fr) minmax(100px, 1fr) minmax(90px, 1fr) minmax(90px, 1fr) minmax(88px, auto);
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
  min-width: min(100%, 860px);
}
.hg-servo-row .hg-spec-field[hidden],
.hg-servo-row .hg-servo-brand-custom-field[hidden],
.hg-servo-row .hg-spec-custom-row[hidden] { display: none !important; }
.hg-servo-row .hg-servo-brand-custom-field:not([hidden]),
.hg-servo-row .hg-spec-custom-row:not([hidden]) {
  grid-column: span 2;
}
.hg-spec-grid--servo-summary .hg-servo-brand-custom-field:not([hidden]) {
  grid-column: 1 / -1;
}
.hg-servo-row-actions {
  min-width: 0;
}
.hg-servo-row-actions-label {
  visibility: hidden;
  user-select: none;
}
.hg-servo-row-actions-btns {
  display: flex;
  gap: 6px;
  align-items: stretch;
  justify-content: flex-end;
}
.hg-servo-row-actions-btns .hg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  box-sizing: border-box;
}
.rcs-pilot-field-page .hg-servo-row-actions-btns .hg-btn.hg-servo-copy {
  border: 1px solid #16a34a;
  background: #bbf7d0;
  color: #14532d;
}
.rcs-pilot-field-page .hg-servo-row-actions-btns .hg-btn.hg-servo-copy:hover {
  background: #86efac;
  border-color: #15803d;
  color: #052e16;
}
.rcs-pilot-field-page .hg-servo-row-actions-btns .hg-btn.hg-servo-remove {
  border: 1px solid #dc2626;
  background: #fecaca;
  color: #991b1b;
}
.rcs-pilot-field-page .hg-servo-row-actions-btns .hg-btn.hg-servo-remove:hover {
  background: #fca5a5;
  border-color: #b91c1c;
  color: #7f1d1d;
}
[data-theme="dark"] .rcs-pilot-field-page .hg-servo-row-actions-btns .hg-btn.hg-servo-copy {
  border-color: #4ade80;
  background: #166534;
  color: #ecfdf5;
}
[data-theme="dark"] .rcs-pilot-field-page .hg-servo-row-actions-btns .hg-btn.hg-servo-copy:hover {
  background: #15803d;
  border-color: #86efac;
  color: #ffffff;
}
[data-theme="dark"] .rcs-pilot-field-page .hg-servo-row-actions-btns .hg-btn.hg-servo-remove {
  border-color: #f87171;
  background: #7f1d1d;
  color: #fee2e2;
}
[data-theme="dark"] .rcs-pilot-field-page .hg-servo-row-actions-btns .hg-btn.hg-servo-remove:hover {
  background: #991b1b;
  border-color: #fca5a5;
  color: #ffffff;
}
.hg-servo-copy {
  font-size: 0.75rem;
  padding: 8px 10px;
  white-space: nowrap;
}
.hg-servo-remove {
  min-width: 38px;
  padding: 8px 10px;
  font-size: 1.125rem;
  line-height: 1;
}
@media (max-width: 720px) {
  .hg-servo-row { grid-template-columns: 1fr 1fr; }
}

/* Spec sticky bar — prevent white flash on hover in dark mode */
.rcs-pilot-field-page .hg-spec-sticky-actions .hg-btn:hover,
.rcs-pilot-field-page .hg-spec-sticky-actions a.hg-btn:hover {
  filter: none !important;
}

[data-theme="dark"] .rcs-pilot-field-page .hg-spec-sticky-actions .hg-btn:not(.primary):not(.danger):hover,
[data-theme="dark"] .rcs-pilot-field-page .hg-spec-sticky-actions a.hg-spec-inventory-btn:hover {
  background: rgba(55, 65, 81, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: var(--rcs-text) !important;
}

[data-theme="dark"] .rcs-pilot-field-page .hg-spec-sticky-actions .hg-btn.danger:hover {
  background: rgba(127, 29, 29, 0.45) !important;
  border-color: rgba(248, 113, 113, 0.52) !important;
  color: #fecaca !important;
}

.rcs-pilot-field-page .hg-spec-sticky-actions .hg-btn:not(.primary):not(.danger):hover,
.rcs-pilot-field-page .hg-spec-sticky-actions a.hg-spec-inventory-btn:hover {
  background: rgba(226, 232, 240, 0.98);
  border-color: var(--rcs-border);
  color: var(--rcs-text);
}

.rcs-pilot-field-page .hg-spec-sticky-actions .hg-btn.danger:hover {
  background: rgba(254, 226, 226, 0.95);
  border-color: rgba(239, 68, 68, 0.45);
  color: var(--rcs-error, #dc2626);
}

/* Click-to-enlarge aircraft photos */
button.hg-photo-open {
  appearance: none;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  text-align: inherit;
}

button.hg-photo-open:focus-visible {
  outline: 2px solid var(--rcs-accent, #2563eb);
  outline-offset: 2px;
}

body.hg-photo-lightbox-open {
  overflow-y: scroll;
}

.hg-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.hg-photo-lightbox[hidden] {
  display: none !important;
}

.hg-photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(3, 7, 18, 0.92);
  cursor: zoom-out;
}

.hg-photo-lightbox-panel {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hg-photo-lightbox-img {
  display: block;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.hg-photo-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.hg-photo-lightbox-close:hover {
  background: #fff;
}

.hg-photo-lightbox-close:focus-visible {
  outline: 2px solid var(--rcs-accent, #2563eb);
  outline-offset: 2px;
}

/* —— Full configuration section cards —— */
.hg-full-config-heading {
  margin: 0;
  padding: 14px 16px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rcs-muted);
  border-bottom: 1px solid var(--rcs-border);
}

.hg-spec-full-config-wrap {
  flex: 0 0 auto;
  width: 100%;
}

.hg-spec-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 16px;
}

.hg-spec-card {
  border: 1px solid var(--rcs-border);
  border-radius: 12px;
  background: var(--rcs-panel);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

[data-theme="dark"] .rcs-pilot-field-page .hg-spec-card {
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.hg-spec-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rcs-border);
  background: rgba(148, 163, 184, 0.08);
}

.hg-spec-card__icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: var(--rcs-accent, #2563eb);
}

.hg-spec-card__icon svg {
  display: block;
  width: 28px;
  height: 28px;
}

.hg-spec-card__title {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rcs-text);
}

.hg-spec-card__body {
  padding: 12px 14px 14px;
}

.hg-spec-subtitle {
  margin: 14px 0 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rcs-muted);
}

.hg-spec-subtitle:first-child {
  margin-top: 0;
}

.hg-spec-hint--spaced {
  margin: 0 0 12px;
}

.hg-spec-card-action {
  margin-top: 10px;
}

.hg-motor-field[hidden] {
  display: none !important;
}

.hg-spec-grid[hidden],
#hg-fpv-fields[hidden],
#hg-smoke-fields[hidden],
#hg-tow-hook-fields[hidden],
#hg-quick-motor-details[hidden],
#hg-ext-motor-details[hidden] {
  display: none !important;
}

.hg-fpv-toggle {
  margin-bottom: 0;
}

.hg-surfaces-layout {
  display: grid;
  gap: 12px;
}

@media (min-width: 720px) {
  .hg-surfaces-layout {
    grid-template-columns: minmax(140px, 200px) 1fr;
    align-items: start;
  }
}

.hg-surfaces-primary .hg-check-grid {
  grid-template-columns: 1fr;
}

.hg-check-item--solo {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
  cursor: pointer;
  color: var(--rcs-text);
}

.rcs-hangar-page .hg-check-item--solo,
.rcs-hangar-page .hg-check-grid .hg-check-item {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
}

.rcs-hangar-page .hg-check-item--solo input[type="checkbox"],
.rcs-hangar-page .hg-check-grid .hg-check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 2px 0 0;
  padding: 0;
  flex-shrink: 0;
}

.rcs-hangar-page .hg-check-item--solo span,
.rcs-hangar-page .hg-check-grid .hg-check-item span {
  flex: 1;
  min-width: 0;
}

.hg-check-item--block {
  width: 100%;
}

.hg-sharing-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.hg-sharing-row .hg-check-item--solo span {
  white-space: nowrap;
}

@media (max-width: 520px) {
  .hg-sharing-row .hg-check-item--solo span {
    white-space: normal;
  }
}

.hg-gear-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--rcs-border);
}

.hg-gear-row .hg-gear-remove {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 32px;
  padding: 4px 12px;
}

.hg-deck-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 2px solid #22c55e;
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

[data-theme="dark"] .hg-deck-add-btn {
  color: #4ade80;
}

.hg-deck-add-btn:hover,
.hg-deck-add-btn:focus-visible {
  background: rgba(34, 197, 94, 0.24);
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}
