/* PROJECT: FORCE — Main Menu Hub & Topbar (.pf-*)
   Scale unit --u maps 1920x1080 design coordinates to any desktop/ultrawide viewport. */

:root {
  --u: min(100vw / 1920, 100vh / 1080);
  --pf-bg: #081018;
  --pf-panel: rgba(16, 26, 36, 0.72);
  --pf-panel-hi: rgba(40, 60, 76, 0.55);
  --pf-stroke: rgba(120, 200, 230, 0.28);
  --pf-cyan: #2FD6F2;
  --pf-cyan-glow: rgba(47, 214, 242, 0.45);
  --pf-gold: #FFC21A;
  --pf-orange: #FF8A00;
  --pf-gold-glow: rgba(255, 170, 20, 0.55);
  --pf-text: #EEF4F8;
  --pf-text-dim: #9DB0BE;
  --pf-dark-text: #1A1206;
  --pf-exo: 'Exo 2', 'Barlow Condensed', system-ui, sans-serif;
  --pf-body: 'Barlow Condensed', 'Exo 2', system-ui, sans-serif;
}
.menu img{-webkit-user-drag:none;user-select:none}
.pf-bg{pointer-events:none;user-select:none}

/* Suppress legacy dark veil and cinema bars on the new PROJECT: FORCE title hub */
.menu[data-screen="title"] .m-veil {
  background: transparent;
  opacity: 0;
  pointer-events: none;
}
.menu[data-screen="title"] .m-bars {
  display: none;
}

/* ---- Topbar (shared across title hub & sub-screens) ---- */
.pf-topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 12;
  pointer-events: none;
  padding: calc(40 * var(--u)) max(calc(72 * var(--u)), var(--gr)) 0 max(calc(72 * var(--u)), var(--gl));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: calc(24 * var(--u));
}
.pf-topbar[hidden] {
  display: none;
}
.pf-topbar > * {
  pointer-events: auto;
}
.menu:not([data-screen="title"]) .pf-topbar {
  padding-top: calc(18 * var(--u));
  padding-bottom: calc(16 * var(--u));
  background: linear-gradient(180deg, rgba(6, 12, 18, 0.92) 0%, rgba(6, 12, 18, 0.65) 75%, transparent 100%);
}

/* Logo Plate (double chamfered layer so cyan border follows diagonal corners) */
.pf-logo {
  justify-self: start;
  position: relative;
  width: calc(300 * var(--u));
  height: calc(86 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(14 * var(--u));
  padding: 0 calc(20 * var(--u));
  border: 0;
  color: var(--pf-text);
  background: rgba(47, 214, 242, 0.42);
  backdrop-filter: blur(calc(10 * var(--u)));
  clip-path: polygon(
    calc(14 * var(--u)) 0, 100% 0,
    100% calc(100% - 14 * var(--u)), calc(100% - 14 * var(--u)) 100%,
    0 100%, 0 calc(14 * var(--u))
  );
  cursor: pointer;
  text-align: left;
  transition: filter 0.16s ease;
}
.pf-logo::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  z-index: 0;
  background: linear-gradient(135deg, rgba(16, 30, 44, 0.94), rgba(10, 18, 28, 0.9));
  clip-path: polygon(
    calc(13 * var(--u)) 0, 100% 0,
    100% calc(100% - 13 * var(--u)), calc(100% - 13 * var(--u)) 100%,
    0 100%, 0 calc(13 * var(--u))
  );
}
.pf-logo > * {
  position: relative;
  z-index: 1;
}
.pf-logo:hover {
  filter: brightness(1.1);
}
.pf-logo-mark {
  position: relative;
  width: calc(64 * var(--u));
  height: calc(38 * var(--u));
  flex: none;
  display: grid;
  place-items: center;
}
.pf-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 calc(8 * var(--u)) rgba(39, 223, 234, 0.45));
}
.pf-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.pf-inline-emblem {
  height: 20px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 6px rgba(39, 223, 234, 0.55));
}
.pf-logo-mark.pf-has-img svg {
  display: none;
}
.pf-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  min-width: 0;
}
.pf-logo-pre {
  font: 700 calc(17 * var(--u))/1.05 var(--pf-exo);
  letter-spacing: 0.14em;
  color: var(--pf-cyan);
  text-transform: uppercase;
}
.pf-logo-main {
  font: 800 calc(38 * var(--u))/0.92 var(--pf-exo);
  letter-spacing: 0.04em;
  color: var(--pf-text);
  text-transform: uppercase;
}

/* Center Pill Tab-bar */
.pf-tabbar {
  justify-self: center;
  margin-top: calc(4 * var(--u));
  width: auto;
  min-width: calc(860 * var(--u));
  max-width: calc(1060 * var(--u));
  height: calc(76 * var(--u));
  padding: calc(10 * var(--u)) calc(12 * var(--u));
  border-radius: 999px;
  background: var(--pf-panel);
  border: 1px solid var(--pf-stroke);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(calc(10 * var(--u)));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(6 * var(--u));
}
.pf-tab {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  height: calc(56 * var(--u));
  padding: 0 calc(20 * var(--u));
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(238, 244, 248, 0.84);
  font: 700 calc(20 * var(--u))/1 var(--pf-exo);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--u));
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.pf-tab:hover:not(.active) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.pf-tab.active {
  min-width: 0;
  background: linear-gradient(180deg, #FFD34A 0%, #FFA51A 100%);
  color: var(--pf-dark-text);
  box-shadow: 0 0 calc(18 * var(--u)) var(--pf-gold-glow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.pf-tab:active {
  transform: scale(0.98);
}
.pf-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: calc(22 * var(--u));
  height: calc(22 * var(--u));
  padding: 0 calc(6 * var(--u));
  border-radius: 999px;
  background: rgba(255, 194, 26, 0.22);
  border: 1px solid rgba(255, 194, 26, 0.65);
  color: var(--pf-gold);
  font: 700 calc(13 * var(--u))/1 var(--pf-exo);
}
.pf-tab.active .pf-tab-badge {
  background: rgba(26, 18, 6, 0.16);
  border-color: rgba(26, 18, 6, 0.35);
  color: var(--pf-dark-text);
}
.pf-tab-badge[data-empty="1"] {
  display: none;
}

/* Top-Right Profile & Currencies */
.pf-top-right {
  justify-self: end;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: calc(10 * var(--u));
}
.pf-top-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: calc(12 * var(--u));
}
.pf-lang-pill {
  margin-top: calc(18 * var(--u));
}
.pf-profile {
  width: calc(325 * var(--u));
  height: calc(80 * var(--u));
  padding: calc(10 * var(--u)) calc(12 * var(--u));
  border-radius: calc(10 * var(--u));
  background: var(--pf-panel);
  border: 1px solid var(--pf-stroke);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(calc(10 * var(--u)));
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u));
}
.pf-level-badge {
  position: relative;
  width: calc(54 * var(--u));
  height: calc(60 * var(--u));
  flex: none;
  display: grid;
  place-items: center;
}
.pf-level-badge img,
.pf-level-badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pf-level-badge.pf-has-img svg {
  display: none;
}
.pf-level-badge b {
  position: relative;
  z-index: 1;
  font: 800 calc(20 * var(--u))/1 var(--pf-exo);
  color: var(--pf-text);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}
.pf-profile-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.pf-profile-name {
  font: 700 calc(22 * var(--u))/1.05 var(--pf-exo);
  letter-spacing: 0.02em;
  color: var(--pf-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-profile-lvl {
  font: 600 calc(18 * var(--u))/1.1 var(--pf-body);
  color: var(--pf-gold);
}
.pf-avatar-box {
  position: relative;
  width: calc(60 * var(--u));
  height: calc(60 * var(--u));
  flex: none;
  border-radius: calc(8 * var(--u));
  overflow: hidden;
  border: 1px solid rgba(120, 200, 230, 0.42);
  background: linear-gradient(145deg, #1b2c3b, #0c141d);
  display: grid;
  place-items: center;
}
.pf-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pf-avatar-box.pf-has-img svg {
  display: none;
}

.pf-currencies {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--u));
}
.menu:not([data-screen="title"]) .pf-currencies {
  display: none;
}
.pf-cur-pill {
  min-width: calc(128 * var(--u));
  height: calc(44 * var(--u));
  padding: 0 calc(13 * var(--u));
  border-radius: 999px;
  background: var(--pf-panel);
  border: 1px solid var(--pf-stroke);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 22px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(calc(10 * var(--u)));
  display: inline-flex;
  align-items: center;
  gap: calc(7 * var(--u));
  font: 700 calc(17 * var(--u))/1 var(--pf-exo);
  color: var(--pf-text);
  white-space: nowrap;
}
.pf-cur-icon {
  position: relative;
  width: calc(26 * var(--u));
  height: calc(26 * var(--u));
  flex: none;
  display: grid;
  place-items: center;
}
.pf-cur-icon img,
.pf-cur-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pf-cur-icon.pf-has-img svg {
  display: none;
}
.pf-cur-val-gold {
  color: var(--pf-gold);
}
.pf-cur-unit {
  font: 600 calc(16 * var(--u))/1 var(--pf-body);
  color: var(--pf-text-dim);
}
.pf-lang-pill {
  height: calc(44 * var(--u));
  min-width: calc(56 * var(--u));
  padding: 0 calc(14 * var(--u));
  border-radius: 999px;
  background: var(--pf-panel);
  border: 1px solid rgba(47, 214, 242, 0.4);
  color: var(--pf-cyan);
  font: 700 calc(16 * var(--u))/1 var(--pf-exo);
  letter-spacing: 0.05em;
  cursor: pointer;
  backdrop-filter: blur(calc(10 * var(--u)));
  transition: background 0.15s ease, border-color 0.15s ease;
}
.pf-lang-pill:hover {
  background: rgba(47, 214, 242, 0.16);
  border-color: var(--pf-cyan);
}

/* ---- Title Screen Layers (L0, L1, L2) ---- */
.pf-title {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  background: var(--pf-bg);
}
.menu[data-screen="title"] .pf-title {
  display: block;
}

/* L0: Hangar Background + Vignette */
.pf-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(38% 58% at 50% 34%, rgba(56, 148, 204, 0.34) 0%, rgba(16, 40, 62, 0.18) 48%, transparent 78%),
    radial-gradient(24% 48% at 32% 24%, rgba(74, 175, 232, 0.22) 0%, transparent 72%),
    radial-gradient(24% 48% at 68% 24%, rgba(74, 175, 232, 0.22) 0%, transparent 72%),
    linear-gradient(180deg, #0d1c2b 0%, #102436 52%, #0a141f 100%);
}
.pf-bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background:
    linear-gradient(90deg, transparent 49.4%, rgba(255, 194, 26, 0.32) 49.8%, transparent 50.2%),
    repeating-linear-gradient(0deg, transparent 0, transparent calc(64 * var(--u)), rgba(120, 200, 230, 0.08) calc(65 * var(--u)));
  mask-image: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.85) 85%);
}
.pf-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.pf-bg-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 64% 68% at 50% 48%, transparent 25%, rgba(4, 8, 12, 0.72) 100%),
    linear-gradient(90deg, rgba(4, 9, 14, 0.72) 0%, rgba(4, 9, 14, 0.34) 26%, transparent 45%, transparent 55%, rgba(4, 9, 14, 0.34) 74%, rgba(4, 9, 14, 0.72) 100%);
}

/* L1: Hero Operator */
.pf-hero {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  transform: translateX(-50%);
  height: calc(100% - max(130px, calc(200 * var(--u))));
  width: 52vw;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  animation: pfHeroEnter 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.pf-hero-shadow {
  position: absolute;
  left: 50%;
  bottom: calc(16 * var(--u));
  transform: translateX(-50%);
  width: calc(420 * var(--u));
  height: calc(60 * var(--u));
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.22) 55%, transparent 78%);
}
.pf-hero-figure {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: pfHeroBreath 4s ease-in-out infinite;
}
.pf-hero-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 calc(16 * var(--u)) calc(28 * var(--u)) rgba(0, 0, 0, 0.5));
}
.pf-hero-placeholder {
  width: calc(360 * var(--u));
  height: calc(780 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  opacity: 0.88;
}
.pf-hero-figure.pf-has-img .pf-hero-placeholder {
  display: none;
}
.pf-hero-placeholder svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 calc(26 * var(--u)) rgba(47, 214, 242, 0.2));
}

@keyframes pfHeroBreath {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(calc(-4 * var(--u))); }
}
@keyframes pfHeroEnter {
  from { opacity: 0; transform: translateX(-50%) scale(0.98); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

/* L2: Panels & Glassmorphism */
.pf-panel {
  background: var(--pf-panel);
  border: 1px solid var(--pf-stroke);
  border-radius: calc(10 * var(--u));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(calc(10 * var(--u)));
}
.pf-panel-title {
  font: 800 calc(24 * var(--u))/1.1 var(--pf-exo);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--pf-text);
  margin: 0 0 calc(14 * var(--u));
}

/* Left Column */
.pf-contracts {
  position: absolute;
  left: max(calc(72 * var(--u)), var(--gl));
  top: calc(240 * var(--u));
  z-index: 3;
  width: calc(385 * var(--u));
  height: calc(282 * var(--u));
  padding: calc(18 * var(--u)) calc(20 * var(--u));
  display: flex;
  flex-direction: column;
  animation: pfSlideLeft 0.35s 0.05s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.pf-contract-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: calc(8 * var(--u));
}
.pf-contract-row {
  flex: 1 1 0;
  min-height: calc(58 * var(--u));
  padding: calc(8 * var(--u)) calc(12 * var(--u));
  border-radius: calc(8 * var(--u));
  background: rgba(10, 18, 26, 0.48);
  border: 1px solid rgba(120, 200, 230, 0.14);
  display: grid;
  grid-template-columns: calc(24 * var(--u)) minmax(0, 1fr) calc(22 * var(--u));
  align-items: center;
  gap: calc(10 * var(--u));
}
.pf-contract-ring {
  width: calc(22 * var(--u));
  height: calc(22 * var(--u));
  border-radius: 50%;
  border: 1.5px solid var(--pf-gold);
  color: var(--pf-gold);
  display: grid;
  place-items: center;
}
.pf-contract-row.is-cyan .pf-contract-ring {
  border-color: var(--pf-cyan);
  color: var(--pf-cyan);
}
.pf-contract-ring svg,
.pf-contract-tick svg {
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
}
.pf-contract-mid {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(6 * var(--u));
}
.pf-contract-label {
  font: 500 calc(18 * var(--u))/1.1 var(--pf-body);
  letter-spacing: 0.02em;
  color: var(--pf-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-contract-label b {
  color: var(--pf-gold);
  font-weight: 600;
}
.pf-contract-track {
  height: calc(6 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.pf-contract-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #E89600, var(--pf-gold));
  box-shadow: 0 0 calc(8 * var(--u)) var(--pf-gold-glow);
}
.pf-contract-row.is-cyan .pf-contract-fill {
  background: linear-gradient(90deg, #1098B8, var(--pf-cyan));
  box-shadow: 0 0 calc(8 * var(--u)) var(--pf-cyan-glow);
}
.pf-contract-tick {
  color: var(--pf-gold);
  display: grid;
  place-items: center;
  opacity: 0.5;
}
.pf-contract-row.is-done .pf-contract-tick {
  opacity: 1;
}
.pf-contract-row.is-cyan .pf-contract-tick {
  color: var(--pf-cyan);
}

.pf-contracts-toggle {
  display: none;
}

/* Quick Loadout */
.pf-quick-loadout {
  position: absolute;
  left: max(calc(72 * var(--u)), var(--gl));
  bottom: max(calc(70 * var(--u)), var(--sab));
  z-index: 3;
  width: calc(385 * var(--u));
  height: calc(405 * var(--u));
  padding: calc(18 * var(--u)) calc(20 * var(--u));
  display: flex;
  flex-direction: column;
  animation: pfSlideLeft 0.35s 0.14s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.pf-loadout-slots {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
}
.pf-weapon-slot {
  position: relative;
  flex: 1 1 0;
  width: 100%;
  padding: calc(12 * var(--u)) calc(16 * var(--u));
  border-radius: calc(8 * var(--u));
  background: var(--pf-panel-hi);
  border: 1px solid rgba(120, 200, 230, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--pf-text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  overflow: hidden;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease;
}
.pf-weapon-slot:hover {
  border-color: var(--pf-cyan);
  background: rgba(48, 76, 98, 0.68);
  transform: translateY(calc(-1 * var(--u)));
}
.pf-slot-dot {
  position: absolute;
  top: calc(10 * var(--u));
  right: calc(10 * var(--u));
  width: calc(6 * var(--u));
  height: calc(6 * var(--u));
  border-radius: 50%;
  background: var(--pf-cyan);
  box-shadow: 0 0 calc(8 * var(--u)) var(--pf-cyan);
}
.pf-holo-wrap {
  position: relative;
  width: 100%;
  height: calc(96 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-holo-img {
  max-width: 92%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 calc(4 * var(--u)) calc(6 * var(--u)) #0008);
}
.pf-holo-fallback {
  width: 82%;
  height: 82%;
  display: grid;
  place-items: center;
  color: var(--pf-cyan);
  opacity: 0.85;
  filter: drop-shadow(0 0 calc(8 * var(--u)) var(--pf-cyan-glow));
}
.pf-holo-wrap.pf-has-img .pf-holo-fallback {
  display: none;
}
.pf-holo-fallback svg {
  width: 100%;
  height: 100%;
}
/* Dimmed real-weapon render while the thumbnail loads or the slot is empty. */
.pf-holo-fallback.is-ghost {
  width: 92%;
  height: 100%;
  opacity: 1;
  filter: none;
}
.pf-holo-fallback.is-ghost img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0.3;
  filter: grayscale(1) brightness(1.5) contrast(0.85) drop-shadow(0 0 calc(6 * var(--u)) rgba(47, 214, 242, 0.35));
}
.pf-holo-fallback:empty::after {
  content: "";
  width: 62%;
  height: 34%;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent, rgba(47, 214, 242, 0.14), transparent);
  background-size: 200% 100%;
  animation: pfHoloShimmer 1.4s linear infinite;
}
@keyframes pfHoloShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .pf-holo-fallback:empty::after { animation: none; } }
.pf-weapon-slot.is-empty .pf-slot-name { color: var(--pf-text-dim); }
.pf-slot-name {
  font: 800 calc(26 * var(--u))/1 var(--pf-exo);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--pf-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Right Column: Party, DEPOT, PLAY 4v4, Matchmaking Status */
.pf-right-col {
  position: absolute;
  right: max(calc(72 * var(--u)), var(--gr));
  bottom: max(calc(40 * var(--u)), var(--sab));
  z-index: 3;
  width: calc(390 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  animation: pfSlideRight 0.35s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.pf-party {
  margin-bottom: calc(20 * var(--u));
}
.pf-party-label {
  font: 500 calc(18 * var(--u))/1.2 var(--pf-body);
  color: var(--pf-text-dim);
  text-align: right;
  margin-bottom: calc(10 * var(--u));
}
.pf-party-slots {
  display: flex;
  justify-content: flex-end;
  gap: calc(14 * var(--u));
}
.pf-party-slot {
  position: relative;
  width: calc(60 * var(--u));
  height: calc(60 * var(--u));
  padding: 0;
  border-radius: calc(10 * var(--u));
  background: rgba(16, 26, 36, 0.65);
  border: 1.5px solid var(--pf-stroke);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--pf-text);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.pf-party-slot.is-cyan {
  border-color: var(--pf-cyan);
  box-shadow: 0 0 calc(10 * var(--u)) var(--pf-cyan-glow);
}
.pf-party-slot.is-gold {
  border-color: rgba(255, 194, 26, 0.72);
}
.pf-party-slot.is-empty {
  border-radius: 50%;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}
.pf-party-slot.is-empty:hover {
  border-color: var(--pf-cyan);
  background: rgba(47, 214, 242, 0.14);
}
.pf-party-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pf-party-slot.pf-has-img .pf-party-svg {
  display: none;
}
.pf-party-svg {
  width: calc(28 * var(--u));
  height: calc(28 * var(--u));
  color: rgba(238, 244, 248, 0.85);
}

/* DEPOT Arena Card */
.pf-depot {
  position: relative;
  height: calc(208 * var(--u));
  margin-bottom: calc(20 * var(--u));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(16 * var(--u)) calc(18 * var(--u));
  background: linear-gradient(155deg, #1b2d3c 0%, #0d1924 65%, #070e15 100%);
}
.pf-depot-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}
.pf-depot-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 16, 24, 0.45) 0%, rgba(8, 16, 24, 0.25) 45%, rgba(6, 12, 18, 0.92) 100%);
}
.pf-depot-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(10 * var(--u));
}
.pf-depot-title {
  font: 800 calc(30 * var(--u))/1 var(--pf-exo);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--pf-text);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}
.pf-depot-sub {
  margin-top: calc(4 * var(--u));
  font: 600 calc(16 * var(--u))/1.1 var(--pf-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pf-cyan);
}
.pf-depot-arrows {
  display: flex;
  gap: calc(6 * var(--u));
}
.pf-arrow-btn {
  width: calc(30 * var(--u));
  height: calc(30 * var(--u));
  padding: 0;
  border-radius: calc(6 * var(--u));
  border: 1px solid rgba(120, 200, 230, 0.35);
  background: rgba(8, 16, 24, 0.7);
  color: var(--pf-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.pf-arrow-btn:hover {
  border-color: var(--pf-cyan);
  background: rgba(47, 214, 242, 0.2);
}
.pf-arrow-btn svg {
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
}
.pf-depot-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(10 * var(--u));
}
.pf-depot-specs {
  display: flex;
  flex-direction: column;
  gap: calc(3 * var(--u));
}
.pf-depot-specs span {
  font: 500 calc(15 * var(--u))/1.1 var(--pf-body);
  color: var(--pf-text);
}
.pf-depot-invite {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pf-cyan);
  font: 600 calc(15 * var(--u))/1.1 var(--pf-body);
  text-align: left;
  cursor: pointer;
}
.pf-depot-invite:hover {
  text-decoration: underline;
}
.pf-find-match {
  height: calc(44 * var(--u));
  padding: 0 calc(18 * var(--u));
  border-radius: calc(8 * var(--u));
  border: 1.5px solid var(--pf-gold);
  background: rgba(20, 16, 8, 0.78);
  color: var(--pf-gold);
  font: 700 calc(16 * var(--u))/1 var(--pf-exo);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 calc(14 * var(--u)) rgba(255, 194, 26, 0.2);
  transition: background 0.14s ease, filter 0.14s ease, transform 0.12s ease;
}
.pf-find-match:hover {
  background: rgba(255, 194, 26, 0.18);
  filter: brightness(1.1);
}
.pf-find-match:active {
  transform: scale(0.98);
}

/* PLAY 4v4 CTA */
.pf-play-btn {
  width: 100%;
  height: calc(112 * var(--u));
  border-radius: calc(10 * var(--u));
  border: calc(2 * var(--u)) solid #FFE07A;
  background: linear-gradient(180deg, #FFC93A 0%, var(--pf-orange) 100%);
  color: var(--pf-dark-text);
  font: 800 calc(44 * var(--u))/1 var(--pf-exo);
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 0 calc(32 * var(--u)) var(--pf-gold-glow), inset 0 2px 0 rgba(255, 255, 255, 0.45);
  animation: pfPlayPulse 2.4s ease-in-out infinite;
  transition: filter 0.15s ease, transform 0.14s ease;
}
.pf-play-btn:hover {
  filter: brightness(1.08);
  transform: translateY(calc(-2 * var(--u)));
}
.pf-play-btn:active {
  transform: scale(0.98);
}
@keyframes pfPlayPulse {
  0%, 100% { box-shadow: 0 0 calc(26 * var(--u)) rgba(255, 170, 20, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.45); }
  50% { box-shadow: 0 0 calc(42 * var(--u)) rgba(255, 170, 20, 0.72), inset 0 2px 0 rgba(255, 255, 255, 0.55); }
}

.pf-status {
  margin-top: calc(14 * var(--u));
  text-align: center;
  font: 500 calc(18 * var(--u))/1.2 var(--pf-body);
  color: var(--pf-text-dim);
}

/* Sub-screen positioning under the new topbar */
.menu:not([data-screen="title"]) .m-card {
  top: calc(50% + 44 * var(--u));
  max-height: calc(100vh - 128 * var(--u) - var(--sat) - var(--sab));
}

/* Entrance animations */
@keyframes pfSlideLeft {
  from { opacity: 0; transform: translateX(calc(-16 * var(--u))); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pfSlideRight {
  from { opacity: 0; transform: translateX(calc(16 * var(--u))); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---- Compact / Tablet / Mobile Landscape & Portrait ---- */
@media (max-width: 1099px), (orientation: portrait) {
  .pf-topbar {
    padding: max(10px, var(--sat)) var(--gr) 0 var(--gl);
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }
  .pf-logo {
    width: auto;
    height: 44px;
    padding: 0 12px;
    gap: 8px;
  }
  .pf-logo-mark {
    width: 28px;
    height: 28px;
  }
  .pf-logo-pre {
    font-size: 10px;
  }
  .pf-logo-main {
    font-size: 18px;
  }
  .pf-tabbar {
    margin-top: 0;
    width: 100%;
    height: 46px;
    padding: 4px 6px;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 4px;
    scrollbar-width: none;
  }
  .pf-tabbar::-webkit-scrollbar {
    display: none;
  }
  .pf-tab {
    flex: 0 0 auto;
    min-width: 78px;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }
  .pf-tab.active {
    min-width: 82px;
  }
  .pf-top-right {
    gap: 4px;
    align-items: center;
  }
  .pf-profile {
    display: none;
  }
  .pf-currencies {
    gap: 6px;
  }
  .pf-cur-pill {
    display: none;
  }
  .pf-lang-pill {
    margin-top: 0;
    height: 36px;
    min-width: 44px;
    padding: 0 10px;
    font-size: 12px;
  }

  .pf-contracts-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    left: var(--gl);
    top: calc(66px + var(--sat));
    z-index: 4;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--pf-panel);
    border: 1px solid var(--pf-stroke);
    color: var(--pf-text);
    font: 700 12px/1 var(--pf-exo);
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(8px);
  }
  .pf-contracts {
    left: var(--gl);
    top: calc(108px + var(--sat));
    width: min(320px, calc(100vw - var(--gl) - var(--gr)));
    height: auto;
    min-height: 0;
    max-height: calc(100vh - 122px - var(--sat) - var(--sab));
    overflow-y: auto;
    padding: 12px 14px;
    border-radius: 10px;
    z-index: 6;
    display: none;
  }
  .pf-title.show-contracts .pf-contracts {
    display: block;
  }
  .pf-title.show-contracts .pf-quick-loadout {
    opacity: 0;
    pointer-events: none;
  }
  .pf-contract-list {
    gap: 8px;
  }
  .pf-contract-row {
    flex: 0 0 auto;
    height: auto;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 8px;
    grid-template-columns: 20px minmax(0, 1fr) 18px;
    gap: 8px;
  }
  .pf-contract-ring {
    width: 18px;
    height: 18px;
  }
  .pf-contract-ring svg,
  .pf-contract-tick svg {
    width: 12px;
    height: 12px;
  }
  .pf-contract-mid {
    gap: 4px;
  }
  .pf-contract-label {
    font-size: 13px;
  }
  .pf-contract-track {
    height: 5px;
  }
  .pf-arrow-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }
  .pf-arrow-btn svg {
    width: 14px;
    height: 14px;
  }
  .pf-depot-invite {
    font-size: 12px;
  }
  .menu:not([data-screen="title"]) .m-card {
    top: calc(50% + 28px);
    max-height: calc(100vh - 82px - var(--sat) - var(--sab));
  }
  .pf-quick-loadout {
    left: var(--gl);
    bottom: calc(14px + var(--sab));
    width: min(220px, 34vw);
    height: auto;
    padding: 10px 12px;
    border-radius: 10px;
  }
  .pf-panel-title {
    font-size: 13px;
    margin-bottom: 6px;
  }
  .pf-loadout-slots {
    flex: 0 0 auto;
    gap: 6px;
  }
  .pf-weapon-slot {
    flex: 0 0 auto;
    height: auto;
    padding: 6px 10px;
    min-height: 0;
    gap: 2px;
  }
  .pf-slot-dot {
    top: 7px;
    right: 7px;
    width: 5px;
    height: 5px;
  }
  .pf-holo-wrap {
    height: 30px;
  }
  .pf-slot-name {
    font-size: 13px;
    line-height: 1.15;
  }
  .pf-hero {
    height: min(74vh, 620px);
    width: min(46vw, 420px);
  }
  .pf-hero-placeholder {
    width: 100%;
    height: 92%;
  }
  .pf-right-col {
    right: var(--gr);
    left: auto;
    bottom: calc(14px + var(--sab));
    width: min(260px, 42vw);
  }
  .pf-party {
    display: none;
  }
  .pf-depot {
    height: 112px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 10px;
  }
  .pf-depot-title {
    font-size: 16px;
  }
  .pf-depot-sub {
    font-size: 11px;
  }
  .pf-depot-specs {
    display: none;
  }
  .pf-find-match {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 6px;
  }
  .pf-play-btn {
    height: 54px;
    font-size: 24px;
    border-radius: 10px;
  }
  .pf-status {
    margin-top: 4px;
    font-size: 11px;
  }
}

@media (orientation: portrait) and (max-width: 760px) {
  .pf-hero {
    height: 52vh;
    width: 82vw;
    bottom: 130px;
  }
  .pf-quick-loadout {
    display: none;
  }
  .pf-right-col {
    left: var(--gl);
    right: var(--gr);
    width: auto;
    bottom: calc(12px + var(--sab));
  }
  .pf-depot {
    height: auto;
    min-height: 98px;
    gap: 8px;
    margin-bottom: 8px;
  }
  .pf-play-btn {
    height: 58px;
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-hero,
  .pf-hero-figure,
  .pf-contracts,
  .pf-quick-loadout,
  .pf-right-col,
  .pf-play-btn {
    animation: none !important;
    transition: none !important;
  }
}

/* Cases is a retained application screen, not an external navigation. */
.menu .pf-cases-screen{inset:0;width:100%;height:100%;max-height:none;padding:0;transform:none;border:0;z-index:5;background:#081018;overflow:hidden}
.menu[data-screen="cases"] .pf-cases-screen{display:block}
.menu[data-screen="cases"] .m-bars{display:none}
.menu[data-case-opening="true"] .pf-topbar{display:none}
.menu[data-case-opening="true"] .pf-cases-screen{z-index:45}
.pf-hero-canvas{position:absolute;inset:0;width:100%;height:100%;opacity:0;filter:drop-shadow(0 12px 20px #0007)}
.pf-hero.pf-has-3d .pf-hero-canvas{opacity:1}
.pf-hero.pf-has-3d .pf-hero-canvas{pointer-events:auto;cursor:grab;touch-action:none;user-select:none}
.pf-hero.pf-has-3d .pf-hero-canvas.is-turning{cursor:grabbing}
.pf-hero.pf-has-3d .pf-hero-img,.pf-hero.pf-has-3d .pf-hero-placeholder{display:none}
.pf-hero-controls{position:absolute;left:50%;top:-48px;transform:translateX(-50%);z-index:5;display:flex;align-items:center;flex-direction:column;gap:5px;pointer-events:auto;max-width:100%;white-space:nowrap}
/* Team switch: two chevron plaques (blue SWAT / red FSB) instead of a dropdown. */
.pf-hero-teams{display:flex;gap:0;filter:drop-shadow(0 6px 14px #0006)}
.pf-hero-team{--team:#3fa3ff;display:flex;align-items:center;gap:8px;min-height:40px;padding:4px 20px 4px 16px;border:0;color:#9db0be;background:rgba(10,24,36,.82);cursor:pointer;font:inherit;clip-path:polygon(10px 0,100% 0,calc(100% - 10px) 100%,0 100%);transition:background-color .15s ease,color .15s ease;box-shadow:inset 0 0 0 1px rgba(120,200,230,.28)}
.pf-hero-team+.pf-hero-team{margin-left:-4px}
.pf-hero-team[data-hero-team="1"]{--team:#ff5a4a}
.pf-hero-team .pf-unit-mark{width:24px;height:24px;color:var(--team);opacity:.7}
.pf-hero-team span{display:flex;flex-direction:column;align-items:flex-start;line-height:1}
.pf-hero-team b{font:800 13px/1 'Exo 2',sans-serif;letter-spacing:.06em}
.pf-hero-team small{margin-top:3px;font:600 10px/1 'Barlow Condensed','Exo 2',sans-serif;letter-spacing:.16em;opacity:.75}
.pf-hero-team:hover{color:#eef4f8;background:rgba(24,44,60,.9)}
.pf-hero-team.is-active{color:#fff;background:linear-gradient(180deg,color-mix(in srgb,var(--team) 42%,#0a1824),color-mix(in srgb,var(--team) 22%,#0a1824));box-shadow:inset 0 0 0 1px var(--team),0 0 16px color-mix(in srgb,var(--team) 45%,transparent)}
.pf-hero-team.is-active .pf-unit-mark{opacity:1}
.pf-hero-team:focus-visible{outline:2px solid #eef4f8;outline-offset:2px}
.pf-hero-controls span{font:500 9px 'Exo 2',sans-serif;color:#82becd;text-shadow:0 1px 5px #000;max-width:100%;overflow:hidden;text-overflow:ellipsis}
@media(orientation:portrait) and (max-width:760px){.pf-hero-controls{top:-20px}.pf-hero-controls span{display:none}}
