/* Settled anatomy, not a choice of the pending illustrated treatment.
   Cycles-trial only: load after hybrid-preview.css and before motion CSS.
   Every selector is gated by the actual hybrid expedition. No values, actor
   sources, global grid allocation or interaction semantics are supplied here. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero,
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy {
 display:grid;
 grid-template-columns:minmax(0,1fr) auto;
 grid-template-rows:auto minmax(24px,1fr) auto 6px 18px;
 align-content:stretch;
 align-items:stretch;
 gap:1px 4px;
 padding:2px 3px 2px;
 min-width:0;
 min-height:0;
 width:min(160px,100%)!important;
 max-width:160px!important;
 justify-self:center;
 border-radius:3px;
 overflow:visible;
}

/* The existing real name is the centre banner, not part of an art overlay. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero > .hybrid-unit-name,
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy > .hybrid-unit-name {
 position:static!important;
 inset:auto!important;
 grid-area:1 / 1 / 2 / -1!important;
 align-self:stretch!important;
 justify-self:stretch!important;
 width:100%!important;
 height:auto!important;
 min-height:22px!important;
 max-height:none;
 margin:0!important;
 padding:1px 5px!important;
 background:#14211de8;
 border-bottom:1px solid #ab9e7470;
 border-radius:1px;
 color:#f0dfb8;
 font:700 16px/18px Georgia,serif!important;
 text-align:center!important;
 white-space:normal!important;
 overflow:visible!important;
 text-overflow:clip;
}

/* The actual subject stays one image and one real control. Empty image space
   uses the same approved clean forest material, never a second actor. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero > img,
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy > img {
 position:static!important;
 inset:auto!important;
 grid-area:2 / 1 / 4 / -1!important;
 display:block;
 width:100%!important;
 height:100%!important;
 min-width:0;
 min-height:24px;
 padding:0 2px 8px;
 object-fit:contain;
 object-position:center bottom!important;
 background-color:#13241f;
 background-image:var(--hybrid-scene,none);
 background-position:center 62%;
 background-size:cover;
 background-repeat:no-repeat;
 border:1px solid #8c9a713f;
 border-radius:1px;
 filter:none;
 pointer-events:none;
}

/* Flatten wrappers so HP, statistics and rails each own a single grid row. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero:has(.xp-ribbon) > .hero-body,
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy > .enemy-copy {display:contents!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .hero-body > .stats {
 position:static!important;
 inset:auto!important;
 grid-area:3 / 1 / 4 / 2!important;
 display:flex;
 flex-wrap:wrap;
 align-items:center;
 justify-content:center;
 gap:2px 7px;
 min-width:0;
 min-height:18px;
 padding:0 2px;
 background:var(--hybrid-unit,#17262b);
 color:#eddfbd;
 font:14px/18px system-ui;
}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .stats .icon {width:16px;height:16px}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .hero-body > .hp,
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy .hp {
 position:static!important;
 inset:auto!important;
 grid-area:3 / 2 / 4 / 3!important;
 display:flex;
 align-items:center;
 justify-content:center;
 min-width:0;
 min-height:18px;
 padding:0 2px!important;
 margin:0;
 color:#ffdfcb;
 font:700 16px/18px system-ui!important;
 white-space:nowrap;
 background:none;
}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .hero-body > .health-track,
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy .health-track {
 position:relative!important;
 inset:auto!important;
 grid-area:4 / 1 / 5 / -1!important;
 width:100%;
 height:6px!important;
 min-height:6px;
 margin:0!important;
 border-radius:0;
}

/* Fixed XP band retains real endpoints/value and the earned upgrade target. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero:has(.xp-ribbon) > .hero-body > .xp-ribbon {
 position:static!important;
 inset:auto!important;
 grid-area:5 / 1 / 6 / -1!important;
 width:100%!important;
 height:18px!important;
 min-height:18px;
 padding:0!important;
 pointer-events:auto;
}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .xp-ribbon > .experience-meter.xp-ranked {height:18px;min-height:18px;grid-template-rows:18px;gap:3px;line-height:16px}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .xp-ribbon > .experience-meter.xp-ranked > :is(.xp-rank-current,.xp-rank-next) {font:700 14px/18px system-ui}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .xp-ribbon > .experience-meter.xp-ranked > .xp-track {height:18px;min-height:18px;line-height:16px;border-radius:0}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .xp-ribbon > .experience-meter.xp-ranked > .xp-track > .xp-value {height:16px;font:14px/16px system-ui}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .xp-ribbon > button {height:22px;min-height:22px;line-height:18px;z-index:8}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero:has(.xp-ribbon > button) {grid-template-rows:auto minmax(24px,1fr) auto 6px 22px}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero:has(.xp-ribbon > button) > .hero-body > .xp-ribbon {height:22px!important;min-height:22px}

/* Real class/rank occupy art-side caps. A source-present fallback
   role/rank is used when the actual class-name line is not supplied. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .hero-class-name {
 position:absolute;
 inset:26px auto auto 5px;
 max-width:calc(50% - 9px);
 padding:0 3px;
 background:var(--hybrid-unit,#17262b);
 color:#eadfbd;
 font:12px/15px system-ui;
 white-space:normal;
 overflow-wrap:normal;
 pointer-events:none;
 z-index:3;
}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .hero-body:not(:has(> .hero-class-name)) > .role {position:absolute;inset:26px auto auto 5px;display:flex;align-items:center;gap:2px;max-width:48%;padding:0 3px;background:var(--hybrid-unit,#17262b);font:12px/15px system-ui;z-index:3}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero > .role-seal {display:block!important;inset:26px 4px auto auto!important;width:17px!important;height:17px!important;z-index:4}
/* Availability keeps its actual border and accessible label, without a second
   visible Ready/Acted/position line competing with the individual name. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero > :is(.activation-badge,.short-position) {display:none!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .guard {inset:auto auto 47px 5px!important;z-index:4}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .guard + .guard {top:auto!important;left:auto!important;right:5px!important;bottom:47px!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero > .direct-guard {inset:auto 5px 47px auto;z-index:5}

/* Hostile card: header, art, actual HP/signature keywords, HP rail, intention.
   Dark red remains the hostile material; no element or rarity is invented. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy {grid-template-rows:auto minmax(24px,1fr) auto 6px auto;background:#442323;flex:0 1 160px;align-self:stretch}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy > .hybrid-unit-name {background:#311c1c}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy .hp {grid-area:3 / 1 / 4 / 2!important;justify-content:flex-start;background:#442323ed;z-index:1}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy .enemy-signature {grid-area:3 / 2 / 4 / 3!important;align-self:stretch;align-content:center;padding:0 2px;color:#f0d8b9;font:12px/15px system-ui;text-align:right;white-space:normal;background:#442323ed;z-index:1}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy .intent {grid-area:5 / 1 / 6 / -1!important;min-height:18px!important;padding:1px 3px!important;background:#311c1c;color:#f6dfb6;font:14px/16px system-ui!important;white-space:normal!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy .enemy-copy > .role {position:absolute;inset:26px 5px auto auto;max-width:calc(50% - 9px);padding:0 3px;background:#442323;font:12px/15px system-ui;z-index:3}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy > .enemy-rank {display:block!important;inset:26px auto auto 4px;max-width:20px;height:17px;padding:0 3px;font:12px/15px system-ui;z-index:4}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy > .last-attack,
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero > .response-mark {top:43px;bottom:auto;left:5px;right:auto;max-width:calc(50% - 9px);font:12px/14px system-ui}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy > .direct-attack {inset:auto 5px 49px auto}

/* Ability anatomy keeps the settled name/corners/owner/art structure. Actual
   root-supplied symbol + amount + qualifier tokens own the bottom keyword rail.
   Support both a containing .hybrid-card-detail and direct token siblings. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability > strong {text-align:center;align-content:center;background:#eadcba;border-bottom:1px solid #b2a17b}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability > .ability-art {border:1px solid #b1a17a;background-color:#eddfbd;background-image:linear-gradient(#eddfbdda,#eddfbdda),var(--hybrid-scene,none);background-position:center;background-size:cover;border-radius:1px}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability > .hybrid-card-detail {display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:2px 8px;padding:2px 3px;color:#23362b;background:#e2d2aa;font:14px/17px system-ui;text-align:center;border-top:1px solid #ad9970}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand .hybrid-effect-symbols {display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:3px 8px;min-width:0;min-height:19px;color:#203a2b;font:700 16px/19px system-ui}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand .hybrid-effect-symbols :is(.icon,svg,img) {display:inline-block;flex:none;width:20px;height:20px;vertical-align:middle;object-fit:contain}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand .hybrid-effect-symbols :is(small,.qualifier) {font:14px/17px system-ui}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand :is(.hybrid-target-keyword,.hybrid-armour-rule) {display:block;min-width:0;padding:0 3px;color:#304431;font:14px/17px system-ui;white-space:normal;overflow-wrap:normal}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability:has(> .hybrid-effect-symbols) {grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto minmax(24px,1fr) auto auto}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability:has(> .hybrid-effect-symbols) > :is(strong,.hybrid-owner-line,.ability-art,.hybrid-effect-symbols) {grid-column:1/-1}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability > .hybrid-effect-symbols {grid-row:4;background:#e2d2aa;border-top:1px solid #ad9970;padding:2px 3px}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability > .hybrid-target-keyword {grid-area:5 / 1 / 6 / 2;background:#e2d2aa;text-align:left}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability > .hybrid-armour-rule {grid-area:5 / 2 / 6 / 3;background:#e2d2aa;text-align:right}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability:has(> .hybrid-effect-symbols) > :is(.hybrid-card-detail,.effect-copy) {display:none}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability:has(.hybrid-effect-symbols) > .effect-copy {display:none}

/* Neutral Party cards keep their genuine effect, cost and lifetime/rarity rows. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability.loot-card > .effect-copy {display:block;min-height:0;background:#e2d2aa;border-top:1px solid #ad9970;font:14px/17px system-ui!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #handSection #hand > .ability.loot-card > .loot-tags {min-height:18px;align-items:center}

@media(max-width:700px), (max-height:500px) {
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero > .hybrid-unit-name,
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy > .hybrid-unit-name {font-size:14px!important;line-height:16px!important;min-height:20px!important;padding-inline:4px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero > img,
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .encounter #enemies > .enemy > img {padding-inline:1px}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game > .formation :is(#front,#rear) > .hero .hero-body > .stats {gap:1px 4px}
}

/* Actual statistics paint above the art window's spanning image. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game .hero :is(.hp,.stats){z-index:2;background:var(--hybrid-unit,#17262b)}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game .enemy :is(.hp,.enemy-signature){z-index:2;background:#442323}

/* Reserve a real numeric column even when a signature has a long name. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game>.encounter #enemies>.enemy{grid-template-columns:minmax(65px,.9fr) minmax(0,1fr)}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game>.encounter #enemies>.enemy .enemy-signature{min-width:0;overflow-wrap:normal;font-size:12px;line-height:13px}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game>.encounter #enemies>.enemy>.direct-attack{inset:auto 4px 39px auto;min-height:26px!important;height:28px!important;max-width:38px;padding:1px 3px!important}

body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game>.encounter #enemies>.enemy .enemy-signature{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-height:15px}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"] #game>.encounter #enemies>.enemy>.direct-attack{inset:27px auto auto 5px;min-height:22px!important;height:22px!important}
