/* Térkép iframe — ugyanaz a felépítés mint /equipment/ (flex body + hangar-layout grid).
   Csak méret/kompakt finomhangolás; a fülek: .hangar-panel-active (JS). */

html.eq-map-embed-html {
  height: 100%;
  margin: 0;
  font-size: 11px;
}

body.eq-map-embed {
  margin: 0;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse 100% 80% at 50% 0%, rgba(0, 200, 224, 0.08), transparent 50%),
    linear-gradient(180deg, #070a10 0%, #040508 100%);
}

.eq-map-embed-viewport {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

body.eq-map-embed .page.starhub {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 2px !important;
  font-size: 11px;
}

body.eq-map-embed .starhub-container {
  flex: 1 1 0;
  min-height: 0 !important;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 2px 6px !important;
}

body.eq-map-embed .content {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Ugyanaz a oszlopos felépítés mint hangar.css — nem külön grid a .body-n */
body.eq-map-embed .page.starhub .starhub-container .content > .body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0% !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  width: 100% !important;
  padding: 4px 6px !important;
  overflow: hidden !important;
}

body.eq-map-embed .hangar-controls {
  flex-shrink: 0 !important;
  margin-bottom: 6px !important;
}

body.eq-map-embed .ctrl-label {
  font-size: 10px !important;
}

body.eq-map-embed .vehicle-controls {
  flex-shrink: 0 !important;
  margin-bottom: 6px !important;
}

body.eq-map-embed .vehicle-tab {
  padding: 7px 12px !important;
  font-size: 11px !important;
}

/* hangar-layout — ugyanaz mint hangar.css (1fr + inventory oszlop) */
body.eq-map-embed .hangar-layout {
  flex: 1 1 0% !important;
  height: 0 !important;
  min-height: 0 !important;
  display: grid !important;
  /* Classic DO shell columns — hangar_do_classic.css may refine */
  grid-template-columns: minmax(0, 1fr) 292px !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: stretch !important;
  overflow: hidden !important;
  width: 100% !important;
}

body.eq-map-embed .hangar-left {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100% !important;
  flex: 1 1 0 !important;
}

body.eq-map-embed .hangar-main-panel {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  padding: 16px 18px !important;
  overflow: hidden !important;
}

body.eq-map-embed .hangar-main-panel.blurBox {
  display: flex !important;
  flex-direction: column !important;
}

body.eq-map-embed .hangar-main-panel:has(.hangar-ship-equip-row.is-pet-mode),
body.eq-map-embed .hangar-main-panel:has(.hangar-ship-equip-row.is-drone-mode) {
  overflow: hidden !important;
}

body.eq-map-embed .hangar-ship-equip-row {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  gap: 16px !important;
  align-items: stretch !important;
  overflow: hidden !important;
}

body.eq-map-embed .hangar-equipment {
  min-width: 280px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.eq-map-embed .equip-panel-bg {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
}

/* Aktív fül — magasabb specificitás (különben üres panel marad) */
body.eq-map-embed .equip-panel-bg > .equip-panel.view-ship:not(.hangar-panel-active),
body.eq-map-embed .equip-panel-bg > .drone-panel.view-drones:not(.hangar-panel-active),
body.eq-map-embed .equip-panel-bg > .pet-panel.view-pet:not(.hangar-panel-active) {
  display: none !important;
}

body.eq-map-embed .equip-panel-bg > .equip-panel.view-ship.hangar-panel-active,
body.eq-map-embed .equip-panel-bg > .drone-panel.view-drones.hangar-panel-active,
body.eq-map-embed .equip-panel-bg > .pet-panel.view-pet.hangar-panel-active {
  display: flex !important;
  flex: 1 1 0 !important;
  min-height: 200px !important;
  height: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
  flex-direction: column !important;
}

/* Hajó hex — keskenyebb, hogy a slotok (LASERS/GENERATORS/EXTRAS) látszódjanak mint a DO hangárban */
body.eq-map-embed .ship-hexagon-wrap {
  width: 180px !important;
  flex: 0 0 180px !important;
  flex-shrink: 0 !important;
}

body.eq-map-embed .ship-hexagon {
  width: 168px !important;
  height: 200px !important;
  margin: 0 auto 8px !important;
}

body.eq-map-embed .ship-hexagon-inner {
  padding: 14px !important;
}

body.eq-map-embed .ship-title {
  font-size: 13px !important;
  margin-bottom: 8px !important;
}

body.eq-map-embed .ship-preview img {
  width: 130px !important;
  height: 130px !important;
  max-height: none !important;
  object-fit: contain !important;
}

body.eq-map-embed .ship-design-selector {
  transform: none;
}

body.eq-map-embed .starhub-container .blurBox {
  margin-right: 0 !important;
  box-shadow:
    0 0 0 1px rgba(0, 200, 224, 0.22) inset,
    0 0 18px rgba(0, 200, 224, 0.1),
    inset 0 0 40px rgba(0, 0, 0, 0.45) !important;
}

body.eq-map-embed .page.starhub .starhub-container .hangar-main-panel.blurBox {
  max-height: none !important;
}

/* Drón nézet — #drone-list görget (mint a standalone hangár) */
body.eq-map-embed .hangar-ship-equip-row.is-drone-mode {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-drone-mode .hangar-equipment,
body.eq-map-embed .hangar-ship-equip-row.is-drone-mode .equip-panel-bg {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* .drone-panel — lásd .hangar-panel-active fent */

body.eq-map-embed #drone-list {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  max-height: none !important;
  padding: 2px 4px 4px 2px !important;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 238, 0.45) rgba(0, 0, 0, 0.4);
}

body.eq-map-embed #drone-list::-webkit-scrollbar {
  width: 7px;
}

body.eq-map-embed #drone-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  margin: 4px 0;
}

body.eq-map-embed #drone-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 212, 238, 0.55), rgba(0, 140, 200, 0.4));
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 238, 0.25);
}

body.eq-map-embed .drone-row-do {
  grid-template-columns: 72px 44px minmax(150px, 1fr) 44px !important;
  padding: 6px 8px 8px !important;
  gap: 4px 8px !important;
}

body.eq-map-embed .drone-img-wrap {
  width: 72px !important;
  height: 72px !important;
}

body.eq-map-embed .drone-img {
  width: 54px !important;
  height: 54px !important;
}

body.eq-map-embed .drone-row-do .drone-slots-wrap .slot {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
}

body.eq-map-embed .drone-design-slot-wrap .slot {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
}

body.eq-map-embed .drone-stats {
  font-size: 10px !important;
  line-height: 1.4 !important;
}

body.eq-map-embed .drone-stat-row {
  grid-template-columns: minmax(100px, 1fr) auto !important;
  gap: 6px !important;
}

body.eq-map-embed .drone-name {
  font-size: 12px !important;
}

body.eq-map-embed .hangar-inventory.blurBox,
body.eq-map-embed .hangar-inventory {
  max-width: 440px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

body.eq-map-embed .hangar-inventory.blurBox {
  padding: 6px 8px 8px !important;
}

body.eq-map-embed .quick-controls {
  gap: 0 !important;
  margin-bottom: 8px !important;
  flex-shrink: 0 !important;
  min-height: 34px !important;
}

body.eq-map-embed .currency-screen {
  font-size: 10px !important;
  padding: 5px 9px !important;
}

body.eq-map-embed .inv-actions {
  gap: 6px !important;
  margin-bottom: 6px !important;
  flex-shrink: 0 !important;
}

body.eq-map-embed .inv-action-btn {
  padding: 5px 10px !important;
  font-size: 10px !important;
}

body.eq-map-embed .inventory-tabs {
  gap: 5px !important;
  margin-bottom: 8px !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
}

body.eq-map-embed .inventory-tabs.pet-inv-tabs-do {
  display: flex !important;
}

body.eq-map-embed .inventory-tabs.pet-inv-tabs-do .inv-tab {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  text-align: center !important;
}

body.eq-map-embed .inv-tab {
  padding: 6px 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

/* Inventory: height:0 + flex → görgethető; max-content width levágta az alját scroll nélkül */
body.eq-map-embed .inventory-grid {
  flex: 1 1 0% !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 238, 0.45) rgba(0, 0, 0, 0.4);
  display: grid !important;
  grid-template-columns: repeat(7, 44px) !important;
  gap: 5px !important;
  align-content: start !important;
  justify-content: start !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding-bottom: 10px !important;
  overscroll-behavior: contain;
}

body.eq-map-embed .inventory-grid::-webkit-scrollbar {
  width: 7px;
}

body.eq-map-embed .inventory-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
}

body.eq-map-embed .inventory-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 212, 238, 0.55), rgba(0, 140, 200, 0.4));
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 238, 0.25);
}

body.eq-map-embed .inventory-grid.inventory-grid--seven {
  grid-template-columns: repeat(7, 44px) !important;
  gap: 5px !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.eq-map-embed .inv-item {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  justify-self: start !important;
}

body.eq-map-embed .inv-item img {
  width: 36px !important;
  height: 36px !important;
  max-width: 88% !important;
  max-height: 88% !important;
  object-fit: contain !important;
}

body.eq-map-embed .inv-item .item-level,
body.eq-map-embed .inv-item .item-charge {
  font-size: 9px !important;
}

/*
 * Hajó slotok: hangar.css (repeat(10, 48px), .slot 48×48) — map embedben NEM írjuk felül.
 * Csak görgetés, ha a panel alacsony.
 */
body.eq-map-embed .equip-stack {
  gap: 12px !important;
  min-width: 0 !important;
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 238, 0.45) rgba(0, 0, 0, 0.4);
}

body.eq-map-embed .equip-stack::-webkit-scrollbar {
  width: 7px;
}

body.eq-map-embed .equip-stack::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
}

body.eq-map-embed .equip-stack::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 212, 238, 0.55), rgba(0, 140, 200, 0.4));
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 238, 0.25);
}

/* DO-szerű: slotok sorba törnek a rendelkezésre álló szélességben */
body.eq-map-embed .equip-panel.view-ship .slot-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, 48px) !important;
  gap: 3px !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-content: start !important;
}

body.eq-map-embed #slot-rocketlauncher.slot-grid {
  grid-template-columns: repeat(2, 48px) !important;
  justify-content: start !important;
  width: max-content !important;
}

/* hangar.css @media (max-width: 900px) — map iframe-ben maradjon 10×48 */
@media (max-width: 900px) {
  body.eq-map-embed .hangar-ship-equip-row {
    flex-direction: row !important;
    align-items: stretch !important;
  }
  body.eq-map-embed .ship-hexagon-wrap {
    width: 160px !important;
    flex: 0 0 160px !important;
    flex-shrink: 0 !important;
  }
  body.eq-map-embed .equip-panel.view-ship .slot-grid {
    grid-template-columns: repeat(auto-fill, 44px) !important;
  }
  body.eq-map-embed .equip-panel.view-ship .slot-grid .slot {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  body.eq-map-embed #slot-rocketlauncher.slot-grid {
    grid-template-columns: repeat(2, 44px) !important;
  }
}

/* P.E.T. lézer / generátor — hajó slot-grid (10 oszlop) */
body.eq-map-embed .pet-equip-main .slot-grid {
  grid-template-columns: repeat(10, minmax(32px, 1fr)) !important;
  gap: 4px !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.eq-map-embed .pet-equip-main .slot-grid .slot {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
}

body.eq-map-embed .pet-eq-grid-6 {
  grid-template-columns: repeat(6, var(--pet-slot-size, 36px)) !important;
  gap: 4px !important;
  width: max-content !important;
  max-width: 100% !important;
}

body.eq-map-embed .pet-eq-slots {
  align-items: stretch !important;
}

body.eq-map-embed .pet-eq-h {
  margin-bottom: 10px !important;
  position: relative !important;
  z-index: 1 !important;
}

body.eq-map-embed .pet-eq-cell {
  max-height: none !important;
}

/*
 * .pet-eq-cell.slot: .slot overflow + fix min + max-height:52 + aspect-ratio → széles, alacsony cella;
 * clip-path levágja az ikont. Embedben reset.
 */
body.eq-map-embed .pet-eq-cell.slot {
  overflow: visible !important;
  clip-path: none !important;
  border-radius: 4px !important;
  aspect-ratio: 1 !important;
  width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.eq-map-embed .pet-eq-cell.slot img {
  width: auto !important;
  height: auto !important;
  max-width: 92% !important;
  max-height: 92% !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  flex-shrink: 0 !important;
}

body.eq-map-embed .pet-slot-main {
  overflow: hidden !important;
  flex: 1 1 0 !important;
  min-height: 0 !important;
}

/* ===== P.E.T. térkép — rendezett konténer (bal fő / jobb inventory) ===== */
body.eq-map-embed .hangar-ship-equip-row.is-pet-mode {
  --pet-slot-size: 36px;
  --pet-slot-gap: 3px;
  --pet-slot-cols-ref: 10;
  --pet-slot-band-width: calc(
    var(--pet-slot-cols-ref) * var(--pet-slot-size) +
    (var(--pet-slot-cols-ref) - 1) * var(--pet-slot-gap)
  );
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .hangar-main-panel {
  padding: 6px 8px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-eq {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-eq-inner {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0 !important;
  min-height: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-equip-row {
  display: grid !important;
  grid-template-columns: 156px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: stretch !important;
  flex: 1 1 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-preview-col {
  width: 156px !important;
  max-width: none !important;
  min-width: 156px !important;
  grid-column: 1 !important;
  gap: 6px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-equip-main {
  grid-column: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Sötét doboz: kitölti a maradék helyet; függőleges görgetés ha kell (AI-PROTOCOLS) */
body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-main {
  container-type: size;
  container-name: peteq;
  flex: 1 1 0 !important;
  flex-grow: 1 !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  align-self: stretch !important;
}

@container peteq (min-height: 220px) {
  body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-main {
    --pet-slot-size: 40px;
  }
}

@container peteq (min-height: 250px) {
  body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-main {
    --pet-slot-size: 42px;
  }
}

@container peteq (min-height: 280px) {
  body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-main {
    --pet-slot-size: 44px;
  }
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-shell-top {
  margin-bottom: 2px !important;
  padding-bottom: 4px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-shell-title {
  display: none !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-tab {
  padding: 4px 8px !important;
  font-size: 10px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-panel {
  flex-shrink: 0 !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-panel::before {
  padding: 3px 8px 2px !important;
  font-size: 8px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-fields {
  gap: 4px !important;
  padding: 4px 6px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-field {
  padding: 3px 5px !important;
  gap: 3px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-lbl {
  font-size: 9px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-input,
body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-select {
  height: 24px !important;
  font-size: 10px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-select {
  color-scheme: dark !important;
  color: #e8f4ff !important;
  background-color: #040c16 !important;
  background-image: linear-gradient(180deg, rgba(4, 12, 22, 0.98), rgba(0, 6, 14, 0.99)),
    url("data:image/svg+xml;utf8,<svg fill='%2300d4ee' height='10' viewBox='0 0 24 24' width='10' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: 0 0, right 8px center !important;
  background-size: auto, 12px !important;
  border: 1px solid rgba(0, 200, 224, 0.32) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-select option {
  background-color: #0a1420 !important;
  color: #e8f4ff !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .btn-pet-config-save {
  min-width: 44px !important;
  height: 26px !important;
  font-size: 9px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-preview-frame--sm {
  max-width: 80px !important;
  height: 80px !important;
  min-height: 80px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-status-panel > .pet-xp-card {
  margin: 4px 4px 0 !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-vitals-panel {
  padding: 0 4px !important;
  gap: 2px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-stat-line {
  padding: 4px 6px !important;
  font-size: 9px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-toolbar {
  margin-bottom: 6px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-toolbar-grid {
  grid-template-columns: minmax(130px, 168px) minmax(0, 1fr) !important;
  gap: 6px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-toolbar-card {
  padding: 6px 7px 7px !important;
  gap: 4px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-active-slot-select {
  height: 24px !important;
  font-size: 10px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-fuel-shop-grid {
  gap: 5px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-fuel-card {
  padding: 5px 5px 4px !important;
  gap: 4px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-fuel-card-liters {
  font-size: 11px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-fuel-card-price {
  font-size: 9px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-fuel-buy-btn {
  padding: 5px 4px !important;
  font-size: 9px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-actions-panel {
  padding: 4px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .btn-pet-action-btn {
  padding: 5px 4px !important;
  font-size: 8px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-panel {
  border-radius: 8px !important;
  flex-shrink: 0 !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 4px !important;
  padding: 4px 6px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-config-field--wide {
  grid-column: 1 / -1 !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-main {
  overflow-x: auto !important;
  overflow-y: auto !important;
  padding: 0 !important;
  border-radius: 8px !important;
  background: linear-gradient(165deg, rgba(8, 14, 24, 0.95), rgba(4, 8, 14, 0.98)) !important;
  border: 1px solid rgba(0, 200, 224, 0.22) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-panel--stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  flex: 0 0 auto !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  padding: 6px 8px 8px !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-equip-main .equip-block.pet-equip-block {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  margin: 0 !important;
  padding: 4px 0 !important;
  min-width: 0 !important;
  flex-shrink: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-equip-main .equip-block.pet-equip-block:last-child {
  border-bottom: none !important;
  padding-bottom: 4px !important;
  margin-bottom: 0 !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-equip-main .equip-header {
  width: auto !important;
  max-width: var(--pet-slot-band-width) !important;
  box-sizing: border-box !important;
  padding: 4px 8px !important;
  margin: 0 0 3px 0 !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  border-radius: 4px !important;
  align-self: flex-start !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-panel--stack > .pet-equip-block:nth-child(3) .equip-header {
  max-width: calc(6 * var(--pet-slot-size) + 5 * var(--pet-slot-gap)) !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-panel--stack > .pet-equip-block:nth-child(4) .equip-header {
  max-width: calc(12 * var(--pet-slot-size) + 11 * var(--pet-slot-gap)) !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-equip-main .equip-header .pet-eq-lv {
  font-size: 10px !important;
}

/* Lézer / generátor / gears / AI — egyforma fix slot */
body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-equip-main .slot-grid {
  grid-template-columns: repeat(10, var(--pet-slot-size)) !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-equip-main .slot-grid .slot {
  width: var(--pet-slot-size) !important;
  height: var(--pet-slot-size) !important;
  min-width: var(--pet-slot-size) !important;
  min-height: var(--pet-slot-size) !important;
  max-width: var(--pet-slot-size) !important;
  max-height: var(--pet-slot-size) !important;
  aspect-ratio: unset !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-equip-main .slot-grid,
body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-slots {
  gap: var(--pet-slot-gap) !important;
  justify-content: flex-start !important;
  align-content: start !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-equip-main .slot-grid {
  width: var(--pet-slot-band-width) !important;
  max-width: var(--pet-slot-band-width) !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-grid-6 {
  grid-template-columns: repeat(6, var(--pet-slot-size)) !important;
  width: calc(6 * var(--pet-slot-size) + 5 * var(--pet-slot-gap)) !important;
  max-width: var(--pet-slot-band-width) !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-grid-12 {
  grid-template-columns: repeat(12, var(--pet-slot-size)) !important;
  width: calc(12 * var(--pet-slot-size) + 11 * var(--pet-slot-gap)) !important;
  max-width: none !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-cell .pet-lock {
  font-size: 14px !important;
  line-height: 1 !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-equip-main .slot-grid .slot-lvl,
body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-cell .slot-lvl {
  font-size: 9px !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-grid-6 .pet-eq-cell,
body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-grid-12 .pet-eq-cell {
  width: var(--pet-slot-size) !important;
  height: var(--pet-slot-size) !important;
  min-width: var(--pet-slot-size) !important;
  min-height: var(--pet-slot-size) !important;
  max-width: var(--pet-slot-size) !important;
  max-height: var(--pet-slot-size) !important;
  aspect-ratio: unset !important;
  clip-path: none !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-cell.slot img,
body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-grid-6 .pet-eq-cell.slot img,
body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-eq-grid-12 .pet-eq-cell.slot img {
  max-width: calc(var(--pet-slot-size) - 6px) !important;
  max-height: calc(var(--pet-slot-size) - 6px) !important;
  width: auto !important;
  height: auto !important;
}

body.eq-map-embed .pet-slot-eq-inner,
body.eq-map-embed .pet-equip-row,
body.eq-map-embed .pet-equip-main {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* P.E.T. panel — .hangar-panel-active; teljes magasság */
body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-panel.view-pet.hangar-panel-active {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-shell {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-grid-eq {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-pane.is-active {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* AI sor szélesebb → vízszintes + szükség esetén függőleges görgetés */
body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-main::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

body.eq-map-embed .hangar-ship-equip-row.is-pet-mode .pet-slot-main::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 238, 0.4);
  border-radius: 999px;
}

/* Drón / P.E.T.: 7×44px inventory + padding */
body.eq-map-embed .hangar-layout:has(.is-drone-mode),
body.eq-map-embed .hangar-layout:has(.is-pet-mode) {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px) !important;
}

body.eq-map-embed .hangar-layout:has(.is-drone-mode) .hangar-inventory,
body.eq-map-embed .hangar-layout:has(.is-pet-mode) .hangar-inventory {
  max-width: 400px !important;
  min-width: 320px !important;
}

body.eq-map-embed .inventory-tabs.pet-inv-tabs-do {
  flex-wrap: wrap !important;
  row-gap: 4px !important;
}

body.eq-map-embed .hangar-layout:has(.hangar-ship-equip-row.is-pet-mode) .inv-tabs-ship {
  display: none !important;
}

body.eq-map-embed .hangar-layout:has(.hangar-ship-equip-row.is-pet-mode) .inv-tabs-pet.pet-inv-tabs-do {
  display: flex !important;
}
