:root {
  --gear-size: clamp(34px, 12.3vw, 47px);
  --gear-icon-size: calc((var(--gear-size) - 4px) * .84);
}

/* Approved concept 3: two rows in a restrained steel dock. The upper row uses
   existing empty ground; it does not take height from the combat arena. */
.combat-loadout {
  position:relative; z-index:12; isolation:isolate; flex:none;
  width:100%; max-width:382px; align-self:center; padding:8px 9px 9px;
}
.combat-loadout::before,.combat-loadout::after {
  content:""; position:absolute; pointer-events:none;
  clip-path:polygon(11px 0,calc(100% - 11px) 0,100% 11px,100% calc(100% - 11px),calc(100% - 11px) 100%,11px 100%,0 calc(100% - 11px),0 11px);
}
.combat-loadout::before {
  z-index:-2; inset:calc(-1 * var(--gear-size) - 10px) 0 0;
  background:linear-gradient(135deg,#d1dae4 0%,#718096 14%,#344253 35%,#b5c0d0 58%,#4b596d 80%,#9caabc);
}
.combat-loadout::after {
  z-index:-1; inset:calc(-1 * var(--gear-size) - 8px) 2px 2px;
  background:linear-gradient(155deg,#202c3deb,#101a29f2 70%);
  box-shadow:inset 0 0 0 1px #54617499;
}
.loadout-equipment {
  position:absolute; bottom:calc(100% + 2px); left:9px; right:9px;
  height:var(--gear-size); display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px;
}
.loadout-equipment::after { content:""; position:absolute; bottom:-7px; left:0; right:0; height:1px; background:linear-gradient(90deg,transparent,#73829877 15%,#73829877 85%,transparent); pointer-events:none; }
.loadout-slot {
  --slot-rarity:#7b879a;
  position:relative; justify-self:center; width:var(--gear-size); height:var(--gear-size);
  padding:0; border:0; border-radius:0; cursor:pointer;
  background:linear-gradient(135deg,color-mix(in srgb,var(--slot-rarity) 58%,#fff),var(--slot-rarity) 23%,color-mix(in srgb,var(--slot-rarity) 55%,#101829) 56%,var(--slot-rarity) 82%,color-mix(in srgb,var(--slot-rarity) 55%,#fff));
  clip-path:polygon(10% 0,90% 0,100% 10%,100% 90%,90% 100%,10% 100%,0 90%,0 10%);
  touch-action:manipulation; -webkit-tap-highlight-color:transparent;
}
.loadout-slot-well { position:absolute; inset:2px; display:grid; place-items:center; overflow:hidden; background:radial-gradient(ellipse at 50% 30%,#263448,#0a121d); clip-path:inherit; }
/* The rarity color fills the well all the way to its edge, so a large item
   cannot cover the entire color cue. The bevel above is the only frame. */
.loadout-slot.is-equipped .loadout-slot-well { background:radial-gradient(ellipse at 50% 35%,color-mix(in srgb,var(--slot-rarity) 46%,#132033),color-mix(in srgb,var(--slot-rarity) 28%,#101b2c) 100%); }
.loadout-slot img { display:block; width:var(--gear-icon-size); height:var(--gear-icon-size); object-fit:contain; image-rendering:auto; }
.loadout-slot svg { width:67%; height:67%; fill:none; stroke:#8190a4; stroke-width:2; stroke-linejoin:round; stroke-linecap:round; opacity:.53; }
.loadout-slot [hidden] { display:none; }
/* Scale the whole badge: Android font minimums can clamp tiny font-size values. */
.loadout-level { position:absolute; right:3px; bottom:3px; z-index:1; padding:2px 4px; border-radius:6px; background:#08111d80; color:#fff4d8; font:700 8px/1.2 Arial,sans-serif; white-space:nowrap; pointer-events:none; transform:scale(.75); transform-origin:bottom right; -webkit-text-size-adjust:none; text-size-adjust:none; }
.loadout-slot:active { transform:translateY(1px); }
.loadout-slot:focus-visible { outline:2px solid #b5dde5; outline-offset:2px; }
.combat-loadout > .skill-bar { padding:0; max-width:none; gap:6px; }
.combat-loadout .skill-info { bottom:calc(100% + var(--gear-size) + 22px); }
@media(max-width:359px) { .combat-loadout { padding-inline:7px; } .loadout-equipment { left:7px; right:7px; } .combat-loadout > .skill-bar,.loadout-equipment { gap:4px; } }
