/* ── The hero card ───────────────────────────────────────────────────────────
   template-parts/hero-slot-card.php, wherever it is drawn: a commander slot in the lineup
   builder, a saved or profile lineup's row, and a side of the battle simulator.

   It used to live in create-lineup.css, which is the builder's stylesheet and is not
   loaded on the simulator — so the card arrived there as a column of full-size artwork.
   A part used by three surfaces carries its own stylesheet; this one needs
   hero-loadout-card.css under it, which is where the gear tile, the rank flower and the
   trait tints are defined.
   ──────────────────────────────────────────────────────────────────────────── */

/* ── The compact card (template-parts/hero-slot-card.php) ─────────────────────
   The game's lineup card: art with the ring, the gear strip, the level-and-rank
   line and the name over its foot, then the two skills and the mount. A summary
   read three across — the full sheet belongs on a lineup page, not in a slot. */
/* The card measures itself: three of these sit in a side, a slot or a list, and the width
   they get varies by a factor of three. Everything overlaid on the art is sized against
   the CARD rather than the window, so a narrow one scales instead of colliding. */
.inv-hsc{display:flex;flex-direction:column;gap:3px;width:100%;container-type:inline-size}
/* The hero art IS a card: every portrait, awakened or not, ships as 373x564 with its
   own painted frame. Hold that exact ratio so cover crops nothing — at 60/100 it shaved
   ~9% off the width and sliced the frame's side borders, which read as a cut-off card. */
.inv-hsc__art{position:relative;aspect-ratio:373/564;border-radius:.45rem;overflow:hidden;
	background:#0b1120;isolation:isolate}
/* 85%, not the full box: the painting carries the game's own level bar baked across
   its foot. Cropping it off leaves the bottom band to our gear strip, reading line
   and name, and the side borders still survive because the width is untouched. */
.inv-hsc__portrait{width:100%;height:85%;object-fit:cover;object-position:center top;display:block}
/* One wash under everything that sits on the art, so the numbers read on any painting. */
.inv-hsc__art::after{content:"";position:absolute;inset:auto 0 0;height:58%;z-index:1;
	background:linear-gradient(to top,#060a14 0%,rgba(6,10,20,.92) 34%,rgba(6,10,20,.45) 68%,transparent 100%);
	pointer-events:none}
.inv-hsc__art > :not(.inv-hsc__portrait){z-index:2}

/* Lifted clear of the strip, so the gear can run the full width of the card. */
.inv-hsc__ring{position:absolute;left:2%;bottom:40%;width:21%;aspect-ratio:1;
	display:flex;align-items:center;justify-content:center;border-radius:50%;
	background:#0b1120;border:2px solid rgba(245,158,11,.6);box-shadow:0 2px 8px rgba(0,0,0,.6)}
.inv-hsc__ring img{width:100%;height:100%;max-width:none;border-radius:50%;object-fit:cover;display:block}
.inv-hsc__ring i{position:absolute;left:50%;top:calc(100% + 1px);transform:translateX(-50%);
	font-style:normal;font-family:Rajdhani,sans-serif;font-weight:700;font-size:.52rem;
	color:#e8ecfb;text-shadow:0 1px 3px #000;white-space:nowrap}

/* The gear is the lineup card's own tile — its art, the gems riding on top, the
   level and the ascension stars — shrunk to a strip across the card's foot, which
   is where the game puts it. Everything but the scale comes from
   hero-loadout-card.css, so a piece reads the same here as on a lineup page. */
.inv-hsc__gear{position:absolute;left:4%;right:4%;bottom:20%;display:grid;
	grid-template-columns:repeat(4,minmax(0,34px));gap:4px;align-items:end;justify-content:center}
.inv-hsc__gear .inv-gear-slot{position:relative;display:block;width:100%}
/* Square corners: the piece's own frame is square in the game and on the loadout card,
   and a rounded one reads as a different kind of object at this size. */
.inv-hsc__gear .inv-gear-tile{max-width:none;display:block;border-radius:0}
.inv-hsc__gear .inv-gear-slot__icon{width:100%;height:auto;aspect-ratio:1;border:0;
	border-radius:0;background:none;display:block}
.inv-hsc__gear .inv-gear-slot__icon img{width:100%;height:100%;max-width:none;object-fit:contain;display:block}
/* Everything inside the tile keeps the loadout card's own proportions at this scale:
   the gems ride ON the piece at its top, the level sits above the star band, and the
   band sits on the tile's foot. The ascension star's petals are a fixed pixel size in
   that stylesheet — only the star's box follows the size argument — so they are scaled
   here too; left alone they spilled out of a 6px star and read as a blot. */
.inv-hsc__gear .inv-gear-tile__gems{top:1px;gap:1px}
.inv-hsc__gear .inv-gear-tile__gem{width:7px;height:7px}
.inv-hsc__gear .inv-gear-tile__gem-t{font-size:.3rem;bottom:-3px}
.inv-hsc__gear .inv-gear-tile__lv{left:2px;bottom:7px;font-size:.36rem}
.inv-hsc__gear .inv-lp-gstars{gap:1px;padding:1px 0}

/* The reading line the game puts across the card's foot: the level at the left, the
   rank at the right, a gold rule under both. These are what a player checks across
   three cards at once, so they are the largest thing on the card after the name. */
.inv-hsc__line{position:absolute;left:6%;right:6%;bottom:12%;display:flex;align-items:center;
	justify-content:space-between;gap:6px;padding-bottom:4px;
	border-bottom:1.5px solid rgba(245,158,11,.65)}
.inv-hsc__lvl{font-family:Rajdhani,sans-serif;font-weight:700;font-size:.78rem;color:#fff;
	line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap;
	text-shadow:0 1px 3px #000,0 0 6px rgba(0,0,0,.8)}
.inv-hsc__rank{display:flex;gap:2px}
.inv-hsc__rank .inv-lp-flower{width:18px;height:18px;flex:0 0 18px;
	filter:drop-shadow(0 1px 2px rgba(0,0,0,.85))}
.inv-hsc__rank .inv-lp-petal{width:5.6px;height:7.1px;margin:-7.1px 0 0 -2.8px;background:#5a6680}
.inv-hsc__rank .inv-lp-petal.on{background:linear-gradient(160deg,#fff1c2,#f8c84e 55%,#e09c1f)}
.inv-hsc__name{position:absolute;left:4%;right:4%;bottom:2%;text-align:center;
	font-family:Rajdhani,sans-serif;font-weight:700;font-size:.78rem;letter-spacing:.02em;
	color:#f6c863;text-transform:uppercase;line-height:1.1;text-shadow:0 1px 4px #000;
	overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Hard corners, as the game's rows have — a rounded plate reads as a web card, not as a
   skill slot. The commander's row sits darker than the three under it, which is how the
   game marks the skill a hero leads with. */
.inv-hsc__skill{display:flex;align-items:center;gap:6px;padding:4px 5px;border-radius:2px;
	background:#0d1424;border:1px solid rgba(255,255,255,.05)}
.inv-hsc__skill.is-cmdr{background:#05080f;border-color:rgba(255,255,255,.09)}
/* The game's own disc: the round icon inside, the slot's frame over it. The frame is the
   border, so the box carries none of its own — a ring plus a frame read as two rings. */
.inv-hsc__skillicon{position:relative;flex:0 0 28px;width:28px;height:28px;border-radius:50%;
	background:#111827}
.inv-hsc__skillart{position:absolute;left:11%;top:11%;width:78%;height:78%;max-width:none;
	border-radius:50%;object-fit:cover;display:block}
.inv-hsc__skillframe{position:absolute;inset:0;width:100%;height:100%;max-width:none;
	object-fit:contain;display:block;pointer-events:none}
.inv-hsc__skillicon i{position:absolute;right:0;bottom:0;font-style:normal;font-size:.44rem;
	font-weight:700;color:#fde68a;background:rgba(6,10,20,.85);border-radius:3px 0 0 0;
	padding:0 2px;line-height:1.3}
.inv-hsc__skillbody{min-width:0;display:flex;flex-direction:column;gap:2px}
.inv-hsc__skillname{font-size:.6rem;font-weight:600;color:#d7ddf0;line-height:1.15;
	overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.inv-hsc__pips{display:flex;gap:2px}
.inv-hsc__pips i{width:4px;height:4px;transform:rotate(45deg);background:#3c4a63;display:block}
.inv-hsc__pips i.on{background:#ef4444}

.inv-hsc__mount{position:relative;border-radius:.4rem;overflow:hidden;background:#0d1424;
	aspect-ratio:550/216}
.inv-hsc__mountart{width:100%;height:100%;max-width:none;object-fit:cover;object-position:left bottom;display:block}
/* THE GAME'S CARD HAS ITS OWN SHAPE. 550/216 above is the post banner's, near two and
   a half to one; the card the game lists a mount with is 194x119, barely wider than
   three to two. Cropping one into the other cut the horse off at the withers, so the
   box takes the card's ratio when it is a card that arrived, and the whole plate is
   shown rather than covered. */
.inv-hsc__mount.is-card{aspect-ratio:194/119;background:transparent}
.inv-hsc__mount.is-card .inv-hsc__mountart{object-fit:contain;object-position:center}
.inv-hsc__adorn{position:absolute;right:5px;top:50%;transform:translateY(-50%);
	width:26px;height:26px;display:flex;align-items:center;justify-content:center;
	border-radius:50%;overflow:hidden;background:rgba(8,13,26,.6);
	box-shadow:0 0 0 2px rgba(245,158,11,.55),0 2px 8px rgba(0,0,0,.6)}
/* The whole artwork inside the disc. Covering it at 150% filled the circle but cut the
   piece itself in half, which is the one thing a player is looking at here. */
.inv-hsc__adorn img{width:86%;height:86%;max-width:none;object-fit:contain;object-position:center;display:block}
.inv-hsc__adorn.is-max{background:conic-gradient(from 210deg,#a98be6,#79d9ad,#7cb2e8,#a98be6);
	box-shadow:0 0 0 2px #e7d9ff,0 0 12px rgba(169,139,230,.45)}
.inv-hsc__adorn.is-max img{width:86%;height:86%;border-radius:0}
/* Already cropped and centred by the exporter -- see invictus_adornment_image_url(). */
.inv-hsc__adorn img.inv-hsc__adorn-art{width:92%;height:92%;object-fit:contain}
/* The mount's traits, under it: icon alone, ringed in the rank's own colour. The tint is
   on the ARTWORK only — hero-loadout-card.css carries those filters by data-trait-tier —
   so the ring keeps the exact palette value. */
.inv-hsc__traits{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}
.inv-hsc__traits{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:3px}
/* No build yet: the game keeps the card and empties it. The frames stay so the eye
   finds the same things in the same places, the art behind them goes dark, and the
   skills the hero was born with read as unlevelled rather than as chosen. */
.inv-hsc__gear .inv-gear-slot.is-blank .inv-gear-tile{background:#141b2c;border:1px solid rgba(255,255,255,.08);border-radius:0}
.inv-hsc__gear .inv-gear-slot.is-blank img{filter:grayscale(1) brightness(.45);opacity:.5}
.inv-hsc__skill.is-blank{opacity:.5}
.inv-hsc__skill.is-blank .inv-hsc__skillicon img{filter:grayscale(1) brightness(.7)}
.inv-hsc__mount.is-blank{display:flex;align-items:center;justify-content:center;color:#2f3950}
.inv-hsc__mount.is-blank svg{width:30px;height:30px}
/* A saved lineup's three heroes, in the same card, laid out the way the game lays a
   lineup out: three across, dropping to two and then one as the room runs out. */
.inv-slc-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:.5rem 0}
/* The cards ARE the lineup now, so the old details toggle would open a second copy
   of them under the first. */
.inv-slc-details-toggle,.inv-slc-detail-wrap{display:none}
@media (max-width:620px){.inv-slc-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:420px){.inv-slc-cards{grid-template-columns:1fr}}

/* Narrow card: the level wrapped onto two lines and walked into the gear strip and the
   stars. Everything on the art steps down together rather than any one of them being
   allowed to reflow. */
@container (max-width: 160px){
	.inv-hsc__lvl{font-size:.62rem}
	.inv-hsc__rank{gap:1px}
	.inv-hsc__rank .inv-lp-flower{width:13px;height:13px;flex:0 0 13px}
	.inv-hsc__rank .inv-lp-petal{width:4px;height:5.1px;margin:-5.1px 0 0 -2px}
	.inv-hsc__gear{bottom:24%;gap:2px}
	.inv-hsc__name{font-size:.68rem}
	.inv-hsc__ring{width:24%;bottom:44%}
	.inv-hsc__ring i{font-size:.46rem}
}
@container (max-width: 120px){
	.inv-hsc__lvl{font-size:.56rem}
	.inv-hsc__rank .inv-lp-flower{width:10px;height:10px;flex:0 0 10px}
	.inv-hsc__rank .inv-lp-petal{width:3.1px;height:3.9px;margin:-3.9px 0 0 -1.55px}
	.inv-hsc__gear .inv-gear-tile__lv{font-size:.32rem}
	.inv-hsc__name{font-size:.6rem}
}
/* The My Heroes card (238x360, the same shape as this box): shown whole, its own level and stars standing in for the reading line. */.inv-hsc__art.has-card .inv-hsc__portrait{height:100%;object-fit:fill}.inv-hsc__art.has-card::after{content:none}.inv-hsc__art.has-card .inv-hsc__name{display:none}.inv-hsc__art.has-card .inv-hsc__line{display:none}
.inv-hsc__art.has-card .inv-armoury__ringwrap{z-index:3}.inv-hsc__art.has-card .inv-armoury__ringlv{font-size:8px}
/* armoury.css's ring badge, repeated here for the pages that do not load armoury.css (saved and profile lineups). Same numbers: Pan_HeroItemS m_PanEquip. */.inv-hsc__art .inv-armoury__ringwrap{position:absolute;left:2.44%;top:45.33%;width:22.86%;aspect-ratio:54.4/61.6;pointer-events:none;background:var(--inv-ring-bg,none) center/contain no-repeat}.inv-hsc__art .inv-armoury__ring{position:absolute;left:14.7%;top:13.15%;width:70.6%;height:62.3%;object-fit:contain;border:0;border-radius:0;background:none;box-shadow:none;padding:0}.inv-hsc__art .inv-armoury__ringlv{position:absolute;left:-16.2%;top:69.5%;width:132.4%;aspect-ratio:72/28;display:flex;align-items:center;justify-content:center;background:url(../images/game-icons/ring-card-lvbg.webp) center/100% 100% no-repeat;font-family:Rajdhani,Inter,sans-serif;font-weight:500;line-height:1;color:#e8c563;letter-spacing:.01em;text-shadow:0 1px 2px rgba(0,0,0,.9)}

/* ── Gear tiles as the My Heroes sheet draws them (2026-11-06) ─────────────────
   The markup is the armoury's ($hap_gear_tile): tile plate, four gem sockets in their
   APK form and the gem's colour, level, star band. The container also carries
   inv-hap__gear so the armoury's own rules agree where armoury.css is loaded; its
   strip layout (five-slot grid, plate, negative margin) is undone here, and the tile
   rules are repeated so a lineup page without armoury.css draws the same tile. */
.inv-hsc .inv-hsc__gear.inv-hap__gear{position:absolute;left:4%;right:4%;bottom:20%;display:grid;
	grid-template-columns:repeat(4,minmax(0,34px));gap:4px;align-items:end;justify-content:center;
	aspect-ratio:auto;background:none;margin:0;padding:0}
.inv-hsc .inv-hsc__gear.inv-hap__gear>*{grid-column:auto}
.inv-hsc .inv-hsc__gear .inv-gear-slot__icon{position:relative;display:block;width:100%;height:auto;aspect-ratio:1;
	background:none;border:0;border-radius:0;overflow:visible}
.inv-hsc .inv-hsc__gear .inv-gear-tile{position:absolute;inset:0;display:block;max-width:none;width:auto;height:auto;
	overflow:visible;border:0;border-radius:0;background:none}
.inv-hsc .inv-hsc__gear .inv-gear-slot.is-leg .inv-gear-tile{background:url(../images/game-icons/gem-tile-legendary.webp) center/100% 100% no-repeat}
.inv-hsc .inv-hsc__gear .inv-gear-slot.is-myth .inv-gear-tile{background:url(../images/game-icons/gem-tile-mythical.webp) center/100% 100% no-repeat}
.inv-hsc .inv-hsc__gear .inv-gear-slot.is-empty .inv-gear-tile{background:#141b2c;outline:1px solid rgba(255,255,255,.08)}
.inv-hsc .inv-hsc__gear .inv-gear-tile img{position:absolute;inset:0;width:100%;height:100%;max-width:none;
	object-fit:contain;display:block;padding:13% 4.3% 18.8%;filter:none;opacity:1}
.inv-hsc .inv-hsc__gear .inv-gear-tile__gems{position:absolute;top:1px;left:0;right:0;transform:none;z-index:3;display:flex;
	justify-content:center;gap:1px}
.inv-hsc .inv-hsc__gear .inv-gear-tile__lv{position:absolute;left:7%;right:auto;bottom:22%;top:auto;z-index:3;
	text-align:left;font:700 .42rem/1 Rajdhani,system-ui,sans-serif;color:#fff;
	text-shadow:0 1px 2px rgba(0,0,0,.85)}
.inv-hsc .inv-hsc__gear .inv-gear-tile__lv b{font-weight:700}
.inv-hsc .inv-hsc__gear .inv-lp-gstars{position:absolute;left:0;right:0;bottom:0;max-width:none;display:flex;
	justify-content:center;gap:1px;padding:1px 0;background:rgba(0,0,0,.42)}

/* The socket pip (invictus_enh_gem_pip) — the armoury's rules, sized for the slot. */
.inv-hsc .inv-enh__pip{position:relative;display:inline-block;flex:none;width:5px;height:8px}
.inv-hsc .inv-enh__pip::before,.inv-hsc .inv-enh__pip::after{content:'';position:absolute;inset:0}
.inv-hsc .inv-enh__pip::before{inset:0;transform:scale(.92);background:var(--pip-hole) center/contain no-repeat}
.inv-hsc .inv-enh__pip::after{inset:0;transform:scale(1.18);background:var(--pip-q,#5d6673);
	-webkit-mask:var(--pip-form) center/contain no-repeat;mask:var(--pip-form) center/contain no-repeat}
.inv-hsc .inv-enh__pip.is-empty::after{display:none}
.inv-hsc .inv-enh__pip[data-type="1"]{--pip-hole:url(../images/game-icons/gem-hole-b.webp);--pip-form:url(../images/game-icons/gem-shape-b.webp)}
.inv-hsc .inv-enh__pip[data-type="2"]{--pip-hole:url(../images/game-icons/gem-hole-a.webp);--pip-form:url(../images/game-icons/gem-shape-a.webp)}
.inv-hsc .inv-enh__pip[data-type="3"]{--pip-hole:url(../images/game-icons/gem-hole-c.webp);--pip-form:url(../images/game-icons/gem-shape-c.webp)}
.inv-hsc .inv-enh__pip[data-type="4"]{--pip-hole:url(../images/game-icons/gem-hole-d.webp);--pip-form:url(../images/game-icons/gem-shape-d.webp)}
@media (min-width:900px){
	.inv-hsc .inv-hsc__gear.inv-hap__gear{grid-template-columns:repeat(4,minmax(0,44px))}
	.inv-hsc .inv-hsc__gear .inv-gear-tile__lv{font-size:.5rem}
	.inv-hsc .inv-enh__pip{width:6px;height:10px}
}
/* The star helper writes its size inline (10px, the sheet's); four of those do not fit
   a 34px tile, so the slot sets its own. */
.inv-hsc .inv-hsc__gear .inv-lp-gs{width:7px!important;height:7px!important;flex-basis:7px!important}
@media (min-width:900px){ .inv-hsc .inv-hsc__gear .inv-lp-gs{width:9px!important;height:9px!important;flex-basis:9px!important} }

/* Tile furniture scales WITH the tile (user 2026-11-06, mobile/app): the stars, gem
   sockets and level were fixed pixels sized for a 34-44px tile, so on a phone, where a
   seated card is ~90px wide and a tile ~20px, four 7px stars and the pips overflowed
   the tile. Each tile is now its own container and everything on it is a share of its
   width -- the proportions the game's tile has at any size. Last in the file so it
   wins over the fixed sizes and the 900px overrides above. */
.inv-hsc .inv-hsc__gear .inv-gear-slot__icon{container-type:inline-size}
.inv-hsc .inv-hsc__gear .inv-lp-gs{width:19cqw!important;height:19cqw!important;flex-basis:19cqw!important}
.inv-hsc .inv-hsc__gear .inv-lp-gstars{gap:1cqw;padding:1cqw 0}
.inv-hsc .inv-hsc__gear .inv-gear-tile__gems{top:2cqw;gap:2cqw}
.inv-hsc .inv-hsc__gear .inv-enh__pip{width:11cqw;height:17cqw}
.inv-hsc .inv-hsc__gear .inv-gear-tile__lv,.inv-hsc .inv-hsc__gear .inv-gear-tile__lv b{font-size:19cqw}

/* EMPTY GEAR SLOT, everywhere the card is drawn (preset, challenge list, builder, report):
   the game's see-through dark tile with a faint rim and the slot's own silhouette --
   helmet, gloves, chest, boots -- not a solid navy block. user 2026-11-09 (was only in
   the COMPARISON popup). */
.inv-hsc .inv-hsc__gear .inv-gear-slot.is-empty{background:rgba(8,12,20,.42);box-shadow:inset 0 0 0 1px rgba(232,226,210,.22)}
.inv-hsc .inv-hsc__gear .inv-gear-slot.is-empty .inv-gear-tile{background:center/70% no-repeat;outline:0;opacity:.72;
	filter:grayscale(1) brightness(.8) drop-shadow(0 1px 1px rgba(0,0,0,.6))}
.inv-hsc .inv-hsc__gear .inv-gear-slot.is-empty:nth-child(1) .inv-gear-tile{background-image:url(../images/game-icons/mail/eq-1.webp)}
.inv-hsc .inv-hsc__gear .inv-gear-slot.is-empty:nth-child(2) .inv-gear-tile{background-image:url(../images/game-icons/mail/eq-2.webp)}
.inv-hsc .inv-hsc__gear .inv-gear-slot.is-empty:nth-child(3) .inv-gear-tile{background-image:url(../images/game-icons/mail/eq-3.webp)}
.inv-hsc .inv-hsc__gear .inv-gear-slot.is-empty:nth-child(4) .inv-gear-tile{background-image:url(../images/game-icons/mail/eq-4.webp)}
