/* Finite whole-loop C/animal cohesion. Presentation only. */
body[data-style="hybrid"]{--lantern-frame:url("themes/lantern-paper/c-lantern-paper-768x1152.webp")}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game::before{inset:0!important;height:100%!important;background-position:center 65%!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection,
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.controls{background:transparent!important;border:0!important;box-shadow:none!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #handSection #hand{overflow:visible!important;background:none!important;padding-bottom:3px!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability{box-shadow:0 5px 6px #07100fe0!important;transition:transform 120ms ease,box-shadow 120ms ease}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability:is(:hover,:focus-visible){transform:translateY(-3px);z-index:5;box-shadow:0 8px 10px #07100ff0!important}
@media(min-height:501px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game{grid-template-rows:minmax(120px,1fr) var(--hybrid-field-row) var(--hybrid-control-row) var(--hybrid-hand-height)!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection{grid-row:4!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.controls{grid-row:3!important;align-items:center!important}
}
body[data-style="hybrid"] :is(.cycle-card,.loot-reward-card,.pv-option){border:8px solid #34403c!important;border-image:var(--lantern-frame) 112 stretch!important;border-image-width:8px!important;border-radius:0!important;background:#e5d5af!important;color:#25352a!important;box-shadow:0 4px 6px #07100fc0!important}
body[data-style="hybrid"] :is(.cycle-card-art,.pv-effect-art,.loot-reward-art){background:#d9c79f!important;border:1px solid #a68e5d;border-radius:0!important}
body[data-style="hybrid"] :is(.pv-option h3,.loot-title){font:700 18px/21px Georgia,serif!important;color:#25352a!important}
body[data-style="hybrid"] .cycle-forecast ul{flex-direction:row;flex-wrap:wrap;gap:4px 8px}
body[data-style="hybrid"] .cycle-forecast li{align-items:center;background:#d5c29b;border:1px solid #ad986d;border-radius:2px;padding:2px 4px;width:max-content;max-width:100%;font-size:14px;line-height:18px}
body[data-style="hybrid"] .cycle-keywords{display:flex;align-items:center;gap:4px}
body[data-style="hybrid"] .cycle-card-title{border-bottom:1px solid #a68e5d;padding-bottom:4px}
body[data-style="hybrid"] :is(.cycle-view,.pv-full){background:#17282c!important;color:#ecdcb8}
body[data-style="hybrid"] .pv-option-cost{background:#20383f;border:1px solid #a68e5d;border-radius:2px;color:#eddfbd;padding:3px 5px;font-size:14px}
body[data-style="hybrid"] .pv-old{background:#20383f;color:#eddfbd;border-color:#8e7952}
body[data-style="hybrid"] .tv-paper{background:#e5d5af;color:#25352a;border-color:#8e7952;border-radius:2px;box-shadow:0 3px 5px #07100fb0}
body[data-style="hybrid"] .tv-paper :is(h2,h3,strong){color:#25352a}
body[data-style="hybrid"] .tv-class-choice{background:#20383f!important;border:1px solid #8e7952!important;border-radius:2px!important;color:#eddfbd!important}
body[data-style="hybrid"] .tv-class-thumb{background:#20383f;border-radius:0}
body[data-style="hybrid"] .tv-class-art>strong{background:var(--lantern-unit,#20383f);color:#eddfbd}
body[data-style="hybrid"] .loot-resource-amount{color:#56451f!important}
body[data-style="hybrid"] .loot-reward-card .loot-effect{color:#25352a!important}
body[data-style="hybrid"] .loot-reward-card .loot-title{border-top:1px solid #a68e5d;padding-top:3px}
@media(prefers-reduced-motion:reduce){body[data-style="hybrid"] #handSection #hand>.ability{transition:none!important}}
/* One decorative scene owns the full viewport, including header and HUD. */
body[data-style="hybrid"]{--active-scene:var(--hybrid-scene)}
body[data-style="hybrid"][data-view="tavern"]{--active-scene:url("assets/tavern-v1.png")}
body[data-style="hybrid"] .world-art{position:fixed!important;inset:0!important;background:var(--active-scene) center 60%/cover no-repeat!important;opacity:1!important;filter:none!important;transform:none!important;pointer-events:none!important}
body[data-style="hybrid"] .world-shade{background:linear-gradient(#0714166b,transparent 22%,#07141622 74%,#07141680)!important;pointer-events:none!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game{background:transparent!important;border:0!important;box-shadow:none!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game::before{content:none!important}
body[data-style="hybrid"] :is(.top,#playerHud,#resources){background:transparent!important;border:0!important;box-shadow:none!important}
body[data-style="hybrid"] .brand{background:#132229df;border:1px solid #777255;padding:3px 7px;border-radius:3px}
body[data-style="hybrid"] .cycle-parent,body[data-style="hybrid"] .cycle-heading{background:#132229e8;border:1px solid #777255;border-radius:3px;padding:4px 7px}
body[data-style="hybrid"] .cycle-view{background:transparent!important}
body[data-style="hybrid"] .cycle-policy>span{background:#132229eb;padding:3px 6px;border:1px solid #777255;border-radius:2px}
body[data-style="hybrid"] #resources :is(.coin-purse,.mini-resource){background:#132229e8;border:1px solid #777255;border-radius:3px}
body[data-style="hybrid"] #resources .secondary-resources{background:transparent}
body[data-style="hybrid"] .tavern-root{background:transparent!important}
body[data-style="hybrid"] .tavern-root::before{background:linear-gradient(90deg,#15110e70,transparent 55%,#110e0d66)!important}
body[data-style="hybrid"] :is(.progression-card,.overlay-card.loot-card){background:#13222945;border:0;box-shadow:none}
body[data-style="hybrid"] .pv-full{background:transparent!important}
body[data-style="hybrid"] .pv-header{background:#132229e8;border:1px solid #777255;border-radius:3px;padding:5px 8px}

/* Eligible finishing is a foreground choice, not a footer label. */
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game{--hybrid-control-row:88px!important}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls .turn-actions{display:flex;width:100%;height:100%;align-items:stretch;justify-content:center;gap:10px}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls :is(#cycleFinish,#endButton){display:flex;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0;min-width:0;max-width:280px;min-height:76px;padding:5px 8px!important;border:2px solid #ab925b!important;border-radius:3px!important;background:#20382beF!important;color:#f3e3bc!important;box-shadow:0 4px 6px #07100fd0!important;text-align:left;white-space:normal}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls #endButton{background:#302d32ef!important;border-color:#8c8478!important}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] .cycle-decision-art{display:block;flex:none;width:60px;height:60px;object-fit:cover;object-position:center bottom;border:1px solid #8e7952;border-radius:2px;background:#132229}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #endButton .cycle-decision-art{object-fit:contain}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] :is(#cycleFinish,#endButton)>span{display:flex;flex-direction:column;gap:3px;min-width:0}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] :is(#cycleFinish,#endButton) strong{font:700 18px/21px Georgia,serif}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] :is(#cycleFinish,#endButton) small{font:12px/15px system-ui;color:#edddbd}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] :is(#cycleFinish,#endButton) small .icon{width:14px;height:14px;vertical-align:-2px}
@media(max-width:700px){body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] .cycle-decision-art{width:36px;height:44px}body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls :is(#cycleFinish,#endButton){gap:5px;padding:4px!important}body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] :is(#cycleFinish,#endButton) strong{font-size:16px;line-height:18px}}
@media(max-height:500px){body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game{--hybrid-control-row:60px!important;grid-template-rows:minmax(95px,1fr) var(--hybrid-field-row) 60px!important}body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls :is(#cycleFinish,#endButton){min-height:54px}body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] .cycle-decision-art{width:42px;height:42px}body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] :is(#cycleFinish,#endButton)>span{gap:0}body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] :is(#cycleFinish,#endButton) strong{font-size:16px;line-height:18px}body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] :is(#cycleFinish,#endButton) small{font-size:12px;line-height:14px}}

/* Hand-specific ownership and cost corners; full names remain on units/inspection. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"] #game>#handSection #hand>.ability:not(.loot-card){grid-template-rows:36px minmax(40px,1fr) auto!important;gap:3px!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"] #game>#handSection #hand>.ability>.hybrid-owner-line{display:none!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"] #game>#handSection #hand>.ability:not(.loot-card)>strong{grid-row:1!important;min-height:36px!important;padding:1px 30px 1px 32px!important;font-size:14px!important;line-height:16px!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"] #game>#handSection #hand>.ability>.ability-art{grid-row:2!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"] #game>#handSection #hand>.ability>.hybrid-card-detail{grid-row:3!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"] #game>#handSection #hand>.ability:not(.loot-card)>.owner{inset:9px auto auto 9px!important;width:29px!important;height:29px!important;max-width:29px!important;max-height:29px!important;border:1px solid var(--class-accent,#a68e5d)!important;border-radius:2px!important;background:var(--lantern-unit,#20383f)!important;overflow:hidden!important;z-index:3}
body[data-style="hybrid"] #hand .ability>.owner>img[data-animal-identity]{width:100%;height:100%;object-fit:cover!important;transform:scale(2.3);transform-origin:65% 18%;padding:0!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"] #game>#handSection #hand>.ability>.cost{inset:10px 9px auto auto!important;min-width:25px!important;min-height:26px!important;height:26px!important;padding:1px 2px!important;gap:1px}
body[data-style="hybrid"] #hand .cost>.icon{width:13px!important;height:16px!important}
body[data-style="hybrid"] [data-class="hunter"]{--lantern-unit:#442b25;--class-accent:#ca9766}
body[data-style="hybrid"] [data-class="barbarian"]{--lantern-unit:#4a2a24;--class-accent:#d17b64}
body[data-style="hybrid"] [data-class="warlock"]{--lantern-unit:#40252f;--class-accent:#bf93b0}
body[data-style="hybrid"] [data-class="pathfinder"]{--lantern-unit:#20383f;--class-accent:#8bbbc1}
body[data-style="hybrid"] [data-class="captain"]{--lantern-unit:#243b45;--class-accent:#c8be7a}
body[data-style="hybrid"] [data-class="guardian"]{--lantern-unit:#373821;--class-accent:#adb779}
body[data-style="hybrid"] [data-class="paladin"]{--lantern-unit:#41402b;--class-accent:#e0cc8d}
body[data-style="hybrid"] [data-class="bard"]{--lantern-unit:#223c2d;--class-accent:#9fc785}
body[data-style="hybrid"] [data-class="healer"]{--lantern-unit:#1d3b35;--class-accent:#8dc9ba}
body[data-style="hybrid"] [data-class]>.hybrid-unit-name,body[data-style="hybrid"] .ability[data-class]>strong{border-bottom-color:var(--class-accent)!important}
body[data-style="hybrid"] .tv-class-choice[data-class]{border-color:var(--class-accent)!important;background:var(--lantern-unit)!important}
body[data-style="hybrid"] #game .hero.owner-highlight{outline:3px solid var(--class-accent,#e0c281)!important;outline-offset:2px}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>.direct-guard{inset:auto 8px 55px!important;min-height:36px;height:36px;width:calc(100% - 16px);max-width:none;display:flex!important;justify-content:center;gap:6px;z-index:8;background:#28452ef5;border:2px solid #a1c787;border-radius:3px;color:#f2e4c2;padding:2px 5px;font:700 14px/16px system-ui}
body[data-style="hybrid"] .direct-guard>.main-action-art{width:30px!important;height:30px!important;object-fit:contain}
body[data-style="hybrid"] .direct-guard>span{display:flex;align-items:center;gap:5px}
body[data-style="hybrid"] .direct-guard small{display:block;font:12px/14px system-ui}
body[data-style="hybrid"] .direct-guard:disabled{background:#30372eef!important;border-color:#777e6b;opacity:1;color:#c2c8b6}
body[data-style="hybrid"] #foodCounter{min-width:112px!important}
body[data-style="hybrid"] #foodCounter>small{white-space:nowrap;font-size:12px;line-height:16px}
body[data-style="hybrid"] #foodCounter>small>.icon{width:13px;height:13px;vertical-align:-2px}
body[data-style="hybrid"] .meal-amount{font-size:16px;line-height:17px}
body[data-style="hybrid"] #enemyDeck{border-color:#b97b5a!important;background:#442323!important}
/* Reserve a real HUD safe area for persistent quantities and the next meal. */
body[data-style="hybrid"] #playerHud:has(>#resources){height:64px!important;min-height:64px!important;padding:4px 7px!important;flex:none}
body[data-style="hybrid"] #playerHud #resources{height:56px!important;min-height:56px!important;align-items:center!important}
body[data-style="hybrid"] #playerHud #resources .mini-resource{height:50px!important;min-height:50px!important;display:flex!important;flex-direction:column;justify-content:center;gap:1px;padding:2px 5px!important}
body[data-style="hybrid"] #playerHud #resources .mini-resource>span{font-size:20px;line-height:23px}
body[data-style="hybrid"] #playerHud #resources .mini-resource>small{line-height:17px}
body[data-style="hybrid"] #playerHud #resources .secondary-resources{height:52px!important;min-height:52px!important;align-items:center!important}
@media(max-height:500px){body[data-style="hybrid"] #playerHud:has(>#resources){height:56px!important;min-height:56px!important;padding-block:2px!important}body[data-style="hybrid"] #playerHud #resources{height:52px!important;min-height:52px!important}body[data-style="hybrid"] #playerHud #resources .mini-resource{height:46px!important;min-height:46px!important}}

/* Retire the old compact floating footer: choices own a real grid row. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.controls{position:static!important;inset:auto!important;width:100%!important;max-width:none!important;height:100%!important;min-height:0!important;align-self:stretch;justify-self:stretch;z-index:6}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.controls>.turn-actions{height:100%!important;min-height:0!important;flex:1 1 auto}
body[data-style="hybrid"] #game>.controls .turn-actions>button:not(#cycleFinish):not(#endButton):not(#guardSelected){height:32px!important;min-height:32px!important;max-width:70px;align-self:center;padding:3px 5px!important}
body[data-style="hybrid"] .cycle-card-art{flex:1 1 120px!important;max-height:none!important;height:auto!important;min-height:85px!important}
body[data-style="hybrid"] #enemyDeck{background:#442323 url("themes/forest-deck.svg") center/cover no-repeat!important;border:2px solid #b97b5a!important}
body[data-style="hybrid"] #enemyDeck>img{object-fit:contain!important;padding:5px;background:transparent!important}
@media(min-width:701px) and (min-height:501px) and (max-height:650px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game{--hybrid-hand-height:186px!important;--hybrid-control-row:56px!important;--hybrid-field-row:46px!important;grid-template-rows:minmax(110px,1fr) 46px 56px 186px!important}
 body[data-style="hybrid"][data-phase="battle"][data-cycle-phase="night"] #game>.controls :is(#cycleFinish,#endButton){min-height:52px!important;padding:3px 5px!important}
 body[data-style="hybrid"][data-phase="battle"][data-cycle-phase="night"] .cycle-decision-art{height:42px;width:42px}
 body[data-style="hybrid"][data-phase="battle"][data-cycle-phase="night"] :is(#cycleFinish,#endButton)>span{gap:0}
 body[data-style="hybrid"][data-phase="battle"][data-cycle-phase="night"] :is(#cycleFinish,#endButton) strong{font-size:16px;line-height:18px}
 body[data-style="hybrid"][data-phase="battle"][data-cycle-phase="night"] :is(#cycleFinish,#endButton) small{font-size:12px;line-height:14px}
 body[data-style="hybrid"][data-progression="xp"][data-phase="battle"] #game>#handSection #hand>.ability:not(.loot-card){grid-template-rows:32px minmax(28px,1fr) auto!important;gap:2px!important}
 body[data-style="hybrid"][data-progression="xp"][data-phase="battle"] #game>#handSection #hand>.ability:not(.loot-card)>strong{min-height:32px!important}
}

/* Self-Guard uses the action row; Tank ally targeting remains on the ally. */
body[data-style="hybrid"][data-progression="xp"][data-phase="battle"] #game>.controls .turn-actions>#guardSelected{display:flex;align-items:center;justify-content:center;gap:6px;flex:0 1 145px;height:44px!important;min-height:44px!important;max-width:155px;padding:3px 6px!important;background:#29472f;border:2px solid #9fc488;border-radius:3px;color:#f2e3c0;font:700 14px/16px system-ui}
body[data-style="hybrid"] #guardSelected>.main-action-art{width:34px;height:34px;object-fit:contain}
body[data-style="hybrid"] #guardSelected>span{display:flex;flex-direction:column;gap:1px}
body[data-style="hybrid"] #guardSelected:disabled{opacity:1!important;background:#30372e!important;border-color:#747e69!important;color:#c3cbb8!important}
body[data-style="hybrid"] #guardSelected[hidden]{display:none!important}
@media(max-width:700px) and (min-height:501px){
 body[data-style="hybrid"][data-progression="xp"][data-phase="battle"][data-cycle-phase="night"][data-hero-selected="true"] #game{--hybrid-hand-height:190px!important;--hybrid-control-row:110px!important;grid-template-rows:minmax(110px,1fr) var(--hybrid-field-row) 110px 190px!important}
 body[data-style="hybrid"][data-hero-selected="true"] #game>.controls>.turn-actions{flex-wrap:wrap!important;gap:4px!important;justify-content:center!important;align-content:center}
 body[data-style="hybrid"][data-hero-selected="true"] #game>.controls .turn-actions>#guardSelected{flex:1 1 calc(50% - 8px)!important;max-width:none;min-width:110px;height:40px!important;min-height:40px!important}
 body[data-style="hybrid"][data-hero-selected="true"] #game>.controls .turn-actions>:is(#inspectButton,#cancelButton){flex:0 0 44px!important;max-width:44px!important;min-width:0!important;height:34px!important;min-height:34px!important}
 body[data-style="hybrid"][data-hero-selected="true"] #game>.controls .turn-actions>:is(#cycleFinish,#endButton){flex:1 1 calc(50% - 5px)!important;max-width:none;min-height:56px!important;height:56px;padding:3px!important}
 body[data-style="hybrid"][data-hero-selected="true"] :is(#cycleFinish,#endButton) .cycle-decision-art{width:30px;height:38px}
 body[data-style="hybrid"][data-hero-selected="true"] :is(#cycleFinish,#endButton)>span{gap:0}
 body[data-style="hybrid"][data-hero-selected="true"] :is(#cycleFinish,#endButton) strong{font-size:14px;line-height:16px}
 body[data-style="hybrid"][data-hero-selected="true"] :is(#cycleFinish,#endButton) small{font-size:12px;line-height:14px}
}

/* Qualified rank exports retain one shared camera and their authored scale growth. */
body[data-style="hybrid"][data-progression="xp"] #game>.formation :is(#front,#rear)>.hero>img[data-animal-rank]{object-fit:contain!important;object-position:center!important;padding:2px!important;clip-path:none!important;background:var(--lantern-unit,#20383f)!important}
body[data-style="hybrid"] .tv-portrait[data-animal-rank]{object-fit:contain!important;object-position:center!important;padding:5px!important}
body[data-style="hybrid"] #hand .ability>.owner>.animal-owner-portrait{display:block;width:100%;height:100%;object-fit:contain;transform:none!important;padding:0!important}

/* Visual response stays inside stable click targets. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability:is(:hover,:focus-visible){transform:none!important;outline-color:var(--class-accent,#e4bd66)!important}
body[data-style="hybrid"] #hand .ability .ability-art{transition:filter 120ms ease,transform 120ms ease;transform-origin:center 70%}
body[data-style="hybrid"] #hand .ability:is(:hover,:focus-visible) .ability-art{filter:brightness(1.08);transform:translateY(-2px)}
body[data-style="hybrid"] #hand .ability:active .ability-art{transform:translateY(1px);filter:brightness(.95)}
body[data-style="hybrid"][data-progression="xp"] #game>#handSection #hand>.ability[data-class]{--lantern-paper:color-mix(in srgb,var(--class-accent) 14%,#e5d5af);background:var(--lantern-paper)!important}
body[data-style="hybrid"][data-progression="xp"] #game>#handSection #hand>.ability[data-class]>.ability-art{background:color-mix(in srgb,var(--class-accent) 20%,#d9c79f)!important}
body[data-style="hybrid"] #hand .cost>b{font-size:16px!important;line-height:18px!important}
body[data-style="hybrid"] #enemyDeck:is(:hover,:focus-visible){outline:2px solid #d1a16f;outline-offset:2px;box-shadow:0 0 14px #ac56374d}
@media(prefers-reduced-motion:reduce){body[data-style="hybrid"] #hand .ability .ability-art{transition:none!important;transform:none!important}}

/* Compact cards use the supplied age/gear portrait, not a tiny full-body crop. */
body[data-style="hybrid"][data-progression="xp"] #game>.formation :is(#front,#rear)>.hero>img[data-framing="portrait"]{object-fit:contain!important;object-position:center!important}
@media(min-width:701px) and (min-height:651px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero{width:min(230px,100%)!important;max-width:230px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy{width:min(230px,100%)!important;max-width:230px!important;flex-basis:230px!important}
}
@media(min-width:701px) and (min-height:501px) and (max-height:650px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] .top{height:52px!important;min-height:52px!important;padding-block:2px!important}
 body[data-style="hybrid"][data-cycle-phase] :is(#enemyStatus,.cycle-goal){height:48px!important;min-height:48px!important;max-height:48px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game{grid-template-rows:minmax(130px,1fr) 46px 56px 186px!important}
 body[data-style="hybrid"] #playerHud:has(>#resources){height:56px!important;min-height:56px!important;padding-block:2px!important}
 body[data-style="hybrid"] #playerHud #resources{height:52px!important;min-height:52px!important}
 body[data-style="hybrid"] #playerHud #resources .mini-resource{height:46px!important;min-height:46px!important}
}
@media(max-width:700px) and (min-height:501px){
 body[data-style="hybrid"][data-progression="xp"][data-phase="battle"][data-cycle-phase="night"] #game{--hybrid-hand-height:190px!important;--hybrid-control-row:84px!important;--hybrid-field-row:46px!important;grid-template-rows:minmax(125px,1fr) 46px 84px 190px!important}
 body[data-style="hybrid"][data-progression="xp"][data-phase="battle"][data-cycle-phase="night"][data-hero-selected="true"] #game{--hybrid-hand-height:170px!important;--hybrid-control-row:110px!important;grid-template-rows:minmax(125px,1fr) 46px 110px 170px!important}
 body[data-style="hybrid"][data-progression="xp"][data-phase="battle"][data-cycle-phase="night"] #game>.formation :is(#front,#rear)>.hero{min-height:108px!important}
 body[data-style="hybrid"][data-progression="xp"][data-phase="battle"] #game>#handSection #hand>.ability:not(.loot-card){grid-template-rows:30px minmax(22px,1fr) auto!important;gap:2px!important}
 body[data-style="hybrid"][data-progression="xp"][data-phase="battle"] #game>#handSection #hand>.ability:not(.loot-card)>strong{min-height:30px!important;padding-right:35px!important}
}

/* Inspection is a valid button action even when its card cannot be played. */
body[data-style="hybrid"] #hand>.ability[data-unavailable="true"]{box-shadow:0 3px 4px #07100fc0!important}
body[data-style="hybrid"][data-view="expedition"] .world-shade::after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 72%,#d58b182e,transparent 48%);opacity:.35;animation:cohesion-firelight 7s ease-in-out infinite alternate}
body[data-style="hybrid"]:has(.overlay:not([hidden])) .world-shade::after{animation-play-state:paused}
@keyframes cohesion-firelight{from{opacity:.2}to{opacity:.48}}
@media(prefers-reduced-motion:reduce){body[data-style="hybrid"] .world-shade::after{animation:none!important;opacity:.3}}
/* One compact anatomy: portrait left, class/Health/Fight facts right, XP below. */
@media(max-width:700px),(max-height:650px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero{display:grid!important;grid-template-columns:minmax(48px,45%) minmax(0,1fr)!important;grid-template-rows:22px minmax(50px,1fr) 18px!important;gap:2px 3px!important;min-height:110px!important;padding:2px 3px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>.hybrid-unit-name{position:static!important;inset:auto!important;grid-area:1/1/2/-1!important;align-self:stretch!important;min-height:22px!important;max-height:22px!important;padding:1px 18px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>img[data-animal-rank]{grid-area:2/1/3/2!important;width:100%!important;height:100%!important;min-height:0!important;align-self:stretch!important;object-fit:contain!important;object-position:center!important;padding:0!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>.hero-class-name{position:static!important;inset:auto!important;grid-area:2/2/3/3!important;align-self:start!important;justify-self:center!important;width:max-content!important;max-width:100%!important;padding:0!important;white-space:nowrap!important;font:12px/14px system-ui!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.hp{position:static!important;inset:auto!important;grid-area:2/2/3/3!important;align-self:start!important;justify-self:center!important;margin-top:15px!important;min-height:18px!important;height:18px!important;font:700 16px/18px system-ui!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.stats{grid-area:2/2/3/3!important;align-self:end!important;justify-self:center!important;margin-bottom:6px!important;gap:2px!important;font:12px/16px system-ui!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.health-track{position:static!important;inset:auto!important;grid-area:2/2/3/3!important;align-self:end!important;justify-self:stretch!important;height:4px!important;min-height:4px!important;width:100%!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.xp-ribbon{position:static!important;inset:auto!important;grid-area:3/1/4/-1!important;align-self:stretch!important;width:100%!important;height:18px!important;min-height:18px!important;margin:0!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .guard{inset:auto auto 24px 8px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .guard+.guard{inset:auto auto 41px 8px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>.direct-guard{inset:29px auto auto 5px!important;width:calc(45% - 4px)!important;height:42px!important;min-height:42px!important;padding:2px!important;gap:2px!important;font:12px/14px system-ui!important}
 body[data-style="hybrid"] .direct-guard>.main-action-art{width:22px!important;height:26px!important}
 body[data-style="hybrid"] .direct-guard>span{flex-direction:column;gap:0}
}

/* Grouped closure: legible compact facts and stable primary-control slots. */
body[data-style="hybrid"] #closeInspection{color:#f4e4bd!important;background:#20382f!important;border:2px solid #c9b079!important;opacity:1!important;width:36px;height:36px;font:700 27px/28px system-ui;z-index:8}
body[data-style="hybrid"] #cardInspection .effect-art-medallion{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;width:100%;max-height:100%}
body[data-style="hybrid"] #cardInspection .inspection-art>.effect-art{background:transparent!important;padding:0!important}
body[data-style="hybrid"] #cardInspection .inspection-art{border-radius:0!important;background:#d9c79f!important}
body[data-style="hybrid"] .inspection-effect-summary{display:flex;gap:8px;flex-wrap:wrap;margin:5px 0;color:#25352a}
body[data-style="hybrid"] .inspection-effect-summary>span{display:flex;align-items:center;gap:3px;font-size:18px}
body[data-style="hybrid"] .inspection-effect-summary .icon{width:24px;height:24px}
body[data-style="hybrid"] .inspection-effect-summary small{font-size:12px}
body[data-style="hybrid"] .cycle-day-art{object-fit:contain!important}
body[data-style="hybrid"] [data-cycle-card="main"] .cycle-day-art{object-fit:cover!important;object-position:center 60%}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls .turn-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,280px) minmax(0,280px);grid-template-rows:1fr;gap:6px!important}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls #endButton{grid-area:1/3;max-width:none!important;width:100%;height:100%!important}
body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls #cycleFinish{grid-area:1/2;max-width:none!important;width:100%;height:100%!important}
body[data-style="hybrid"] .turn-context{grid-area:1/1;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:4px;min-width:0}
body[data-style="hybrid"] .turn-context>button:not(#guardSelected){height:32px!important;min-height:32px!important;max-width:70px;padding:3px 5px!important}
body[data-style="hybrid"] .turn-context>#guardSelected{display:flex;align-items:center;justify-content:center;gap:5px;flex:1 1 128px;max-width:155px;height:44px!important;min-height:44px!important;padding:3px 5px!important;background:#29472f;border:2px solid #9fc488;border-radius:3px;color:#f2e3c0;font:700 14px/16px system-ui}
@media(min-height:501px) and (max-height:650px) and (min-width:701px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game{grid-template-rows:minmax(148px,1fr) 36px 56px 186px!important}
}
@media(max-width:700px),(max-height:650px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero{grid-template-rows:22px minmax(64px,1fr) 18px!important;min-height:126px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.hp{margin-top:16px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.stats{margin-bottom:6px!important}
}
@media(max-width:700px) and (min-height:501px){
 body[data-style="hybrid"][data-progression="xp"][data-phase="battle"][data-cycle-phase="night"][data-hero-selected] #game{grid-template-rows:minmax(148px,1fr) 36px 106px 164px!important}
 body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls .turn-actions{grid-template-columns:1fr 1fr!important;grid-template-rows:44px 56px!important;align-content:center!important;gap:4px!important}
 body[data-style="hybrid"] .turn-context{grid-area:1/1/2/-1;justify-content:center}
 body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls #endButton{grid-area:2/2!important;min-height:56px!important}
 body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls #cycleFinish{grid-area:2/1!important;min-height:56px!important}
 body[data-style="hybrid"][data-night-decision="false"][data-cycle-phase="night"][data-phase="battle"] #game>.controls #endButton{grid-column:1/-1!important}
 body[data-style="hybrid"] .turn-context>#guardSelected{max-width:170px;min-height:40px!important;height:40px!important}
 body[data-style="hybrid"] .turn-context>:is(#inspectButton,#cancelButton){min-width:38px;max-width:44px!important}
}
@media(max-height:500px){
 body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls .turn-actions{grid-template-columns:minmax(0,1fr) minmax(0,205px) minmax(0,205px)!important}
 body[data-style="hybrid"][data-progression="xp"][data-phase="battle"] #game>#handSection #hand>.ability:not(.loot-card){grid-template-rows:30px minmax(20px,1fr) auto!important;gap:1px!important}
 body[data-style="hybrid"][data-progression="xp"][data-phase="battle"] #game>#handSection #hand>.ability:not(.loot-card)>strong{min-height:30px!important}
}

body[data-style="hybrid"] #inspectionCopy button{color:#f4e4bd!important;background:#20382f!important;border-color:#bda36c!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.controls>.turn-actions{max-height:none!important;height:100%!important;align-self:stretch}
@media(max-width:700px),(max-height:500px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability:not(.loot-card){grid-template-rows:30px minmax(20px,1fr) auto!important;gap:1px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability:not(.loot-card)>strong{min-height:30px!important;padding:1px 31px 1px 30px!important}
}

body[data-style="hybrid"] .turn-context{flex-wrap:nowrap!important}
body[data-style="hybrid"][data-progression="xp"] #game .turn-context>.action-information{flex:0 0 52px!important;width:52px!important;min-width:0;align-self:center}
body[data-style="hybrid"] .turn-context .battle-response>span{display:none}
body[data-style="hybrid"] .turn-context .battle-response button{max-width:52px;font-size:12px;line-height:14px;white-space:normal}
body[data-style="hybrid"] .turn-context>#guardSelected{min-width:110px;flex:1 1 128px!important}

/* One actual market surface; prices, stock and effects come from engine quotes. */
body[data-style="hybrid"][data-view="tavern"]{--active-scene:url("assets/tavern-interactive-base-v3-1600.webp")}
body[data-style="hybrid"][data-view="tavern"] #playerHud:not([hidden]){display:flex!important}
body[data-style="hybrid"][data-view="tavern"] #playerHud[hidden]{display:none!important}
body[data-style="hybrid"][data-view="tavern"] main{padding-bottom:70px!important;padding-right:70px!important}
body[data-style="hybrid"] .tavern-root .tavern-scene{background:transparent!important;box-shadow:none!important;border:0!important}
body[data-style="hybrid"] .tavern-root .scene-background{display:none!important}
body[data-style="hybrid"] .tavern-root .tv-content{background:transparent!important;box-shadow:none!important;border:0!important}
body[data-style="hybrid"] #tavern[data-market="stock1"]{overflow:auto!important;background:none!important;padding:0}
body[data-style="hybrid"] .market-shell{height:100%;min-height:420px;display:grid;grid-template-rows:32px minmax(170px,1.2fr) 30px minmax(140px,.9fr);gap:8px;padding:2px}
body[data-style="hybrid"] .market-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#152724e8;border:1px solid #a68e5d;padding:3px 8px}
body[data-style="hybrid"] .market-heading h1{font:700 20px/24px Georgia,serif;color:#f1e0b7;white-space:nowrap}
body[data-style="hybrid"] .market-heading p{display:flex;align-items:center;gap:4px;flex-wrap:wrap;font-size:12px;color:#eee0be}
body[data-style="hybrid"] .market-stock{display:grid;grid-template-columns:minmax(150px,1fr) minmax(0,3fr);gap:8px;min-height:0}
body[data-style="hybrid"] .market-goods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr 1fr;gap:6px;min-height:0}
body[data-style="hybrid"] :is(.market-offer,.market-quest){min-width:0;min-height:0;display:flex;flex-direction:column;gap:3px;padding:4px;background:#e5d5af;color:#25352a;border:7px solid #34403c;border-image:var(--lantern-frame) 112 stretch;border-radius:0;box-shadow:0 4px 5px #07100fa0}
body[data-style="hybrid"] .market-offer header{display:flex;align-items:baseline;justify-content:space-between;gap:3px;flex-wrap:wrap}
body[data-style="hybrid"] .market-offer h2{font:700 14px/16px Georgia,serif;color:inherit;text-shadow:none}
body[data-style="hybrid"] .market-offer header>span{font-size:12px}
body[data-style="hybrid"] .market-picture{flex:1;min-height:24px;position:relative;background:#d9c79f;border:1px solid #a68e5d;display:flex;align-items:center;justify-content:center;overflow:hidden}
body[data-style="hybrid"] .market-art{display:block;width:100%;height:100%;min-height:0;object-fit:contain;transform:none!important}
body[data-style="hybrid"] .market-picture>.loot-art{width:100%;height:100%;min-height:0}
body[data-style="hybrid"] .market-recruit{background:var(--lantern-unit,#20383f);color:#f0e0b9;border-color:var(--class-accent,#c5a56d)}
body[data-style="hybrid"] .market-recruit .market-picture{background:var(--lantern-unit,#20383f);border-color:var(--class-accent,#c5a56d);min-height:68px}
body[data-style="hybrid"] .market-recruit h2{font-size:20px;line-height:23px}
body[data-style="hybrid"] .market-values{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:3px 5px;font:14px/17px system-ui;color:inherit}
body[data-style="hybrid"] .market-values b{font-size:17px}
body[data-style="hybrid"] .market-values span{font-size:12px}
body[data-style="hybrid"] .market-icon{display:inline-block;width:18px;height:18px;object-fit:contain;flex:none;vertical-align:-3px;fill:none;stroke:currentColor;stroke-width:1.8}
body[data-style="hybrid"] .market-shell button{min-height:30px;display:flex;align-items:center;justify-content:center;gap:5px;background:#294531!important;color:#f1e1b7!important;border:1px solid #ad9868;border-radius:2px;padding:2px 4px;font-size:14px;line-height:16px;box-shadow:none}
body[data-style="hybrid"] .market-shell button>span{display:flex;align-items:center;gap:3px}
body[data-style="hybrid"] .market-shell button small{display:flex;align-items:center;gap:3px;font-size:12px;line-height:14px}
body[data-style="hybrid"] .market-shell button small .market-icon{width:13px;height:13px}
body[data-style="hybrid"] .market-shell button:disabled{opacity:1!important;background:#545c4a!important;color:#d9d9c3!important;border-color:#8e967c;cursor:default}
body[data-style="hybrid"] .market-shell button:is(:hover,:focus-visible):not(:disabled){outline:2px solid #e2c583;outline-offset:1px;filter:brightness(1.08);transform:none}
body[data-style="hybrid"] .market-shell details{font-size:12px;line-height:15px;position:relative;flex:none}
body[data-style="hybrid"] .market-shell summary{cursor:pointer;text-decoration:underline;min-height:16px}
body[data-style="hybrid"] .market-shell details[open]>p{position:absolute;z-index:15;bottom:100%;left:0;width:240px;max-width:75vw;max-height:240px;overflow:auto;padding:9px;background:#e5d5af;color:#25352a;border:2px solid #a68e5d;box-shadow:0 5px 12px #0009;font-size:14px;line-height:20px}
body[data-style="hybrid"] .market-ranks{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#152724e8;border:1px solid #a68e5d;padding:2px 6px;color:#f1e0b7}
body[data-style="hybrid"] .market-ranks strong{margin-right:auto;font:700 18px/21px Georgia,serif}
body[data-style="hybrid"] .market-ranks button{min-width:30px;min-height:25px}
body[data-style="hybrid"] .market-ranks button[aria-pressed="true"]{background:#dfbd7b!important;color:#25352a!important;outline:1px solid #ffe3a0}
body[data-style="hybrid"] .market-quests{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;min-height:0}
body[data-style="hybrid"] .market-patron{display:flex;align-items:center;gap:4px;min-height:32px}
body[data-style="hybrid"] .market-patron>.market-art{width:36px;height:42px;flex:none}
body[data-style="hybrid"] .market-patron h3{font:700 16px/18px Georgia,serif;color:inherit}
body[data-style="hybrid"] .market-patron small{font-size:12px}
body[data-style="hybrid"] .market-quest>.market-values{justify-content:flex-start}
body[data-style="hybrid"] .market-guide{font-size:12px;line-height:15px;flex:1}
body[data-style="hybrid"] .market-error{position:fixed;left:20%;right:20%;bottom:72px;z-index:20;padding:8px;background:#472d28;color:#ffe3bd;border:2px solid #c3a36c}
@media(max-width:700px){
 body[data-style="hybrid"][data-view="tavern"] main{padding:5px 54px 70px 5px!important}
 body[data-style="hybrid"] .market-shell{height:auto;min-height:100%;grid-template-rows:auto auto auto auto;padding-bottom:8px}
 body[data-style="hybrid"] .market-heading{align-items:flex-start;flex-direction:column;gap:3px}
 body[data-style="hybrid"] .market-stock{grid-template-columns:minmax(0,1fr)}
 body[data-style="hybrid"] .market-recruit{min-height:245px}
 body[data-style="hybrid"] .market-recruit .market-picture{height:145px;flex:none}
 body[data-style="hybrid"] .market-goods{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,180px)}
 body[data-style="hybrid"] .market-quests{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(190px,auto)}
 body[data-style="hybrid"] .market-ranks{min-height:58px}
 body[data-style="hybrid"] .market-ranks strong{flex-basis:100%}
}
@media(max-height:500px) and (min-width:701px){body[data-style="hybrid"] .market-shell{min-height:420px;height:auto}body[data-style="hybrid"] .market-picture{min-height:32px}}

body[data-style="hybrid"][data-view="tavern"] main{padding-bottom:6px!important}
body[data-style="hybrid"] .market-shell{min-height:416px;grid-template-rows:28px minmax(206px,1.2fr) 30px minmax(130px,.8fr);gap:6px}
body[data-style="hybrid"] .market-goods>.market-offer{display:grid;grid-template-columns:40px minmax(0,1fr) 42px;grid-template-rows:16px minmax(26px,1fr) 28px;gap:2px}
body[data-style="hybrid"] .market-goods>.market-offer>header{grid-area:1/1/2/-1;display:block}
body[data-style="hybrid"] .market-goods>.market-offer>.market-picture{grid-area:2/1/3/2;min-height:0}
body[data-style="hybrid"] .market-goods>.market-offer>.market-values{grid-area:2/2/3/-1;justify-content:flex-start;gap:2px 4px}
body[data-style="hybrid"] .market-goods>.market-offer>button{grid-area:3/1/4/3;min-height:28px}
body[data-style="hybrid"] .market-goods>.market-offer>details{grid-area:3/3;align-self:center}
body[data-style="hybrid"] .market-picture>.loot-effect-art{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;min-height:0!important;object-fit:contain!important;padding:0!important;position:static!important}
body[data-style="hybrid"] .market-quest{display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:40px minmax(28px,1fr) 28px;gap:2px}
body[data-style="hybrid"] .market-quest>.market-patron{grid-area:1/1/2/-1}
body[data-style="hybrid"] .market-quest>.market-values{grid-area:2/1/3/-1}
body[data-style="hybrid"] .market-quest>.market-guide{display:none}
body[data-style="hybrid"] .market-quest>details{grid-area:3/2;align-self:center}
body[data-style="hybrid"] .market-quest>button{grid-area:3/1;min-height:28px}
body[data-style="hybrid"] .market-quest summary{font-size:0}
body[data-style="hybrid"] .market-quest summary::after{content:"Goal & risk";font-size:12px;line-height:14px}
body[data-style="hybrid"] .market-patron>.market-art{width:30px;height:38px}
body[data-style="hybrid"] .market-patron h3{font-size:14px;line-height:15px}
@media(max-width:700px){
 body[data-style="hybrid"][data-view="tavern"] main{padding-bottom:6px!important}
 body[data-style="hybrid"] .market-shell{height:auto;grid-template-rows:auto auto auto auto}
 body[data-style="hybrid"] .market-goods>.market-offer{display:flex;min-height:180px}
 body[data-style="hybrid"] .market-goods>.market-offer>.market-picture{min-height:50px}
 body[data-style="hybrid"] .market-quest{min-height:170px;grid-template-rows:50px minmax(28px,1fr) 32px}
 body[data-style="hybrid"] .market-ranks{min-height:65px}
}

body[data-style="hybrid"] .market-quest summary{font-size:12px;line-height:14px}
body[data-style="hybrid"] .market-quest summary::after{content:none}
body[data-style="hybrid"][data-view="tavern"] #threatInfo{position:static!important;inset:auto!important;display:flex!important;align-items:center;justify-content:center;flex:0 0 52px;width:52px!important;height:50px!important;min-height:50px!important;margin-left:auto;padding:2px!important}
body[data-style="hybrid"][data-view="tavern"] #threatInfo :is(.threat-column,.threat-bonus){display:none!important}
body[data-style="hybrid"][data-view="tavern"] #threatInfo .threat-value{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;font-size:12px;line-height:14px}
body[data-style="hybrid"][data-view="tavern"] #threatInfo .threat-value>.icon{width:14px;height:14px}
body[data-style="hybrid"][data-view="tavern"] #threatInfo .threat-value>b{font-size:18px;line-height:19px}
@media(max-width:700px){
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources{display:grid!important;grid-template-columns:64px minmax(0,1fr) 44px;gap:4px;width:100%!important;min-width:0!important}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources>.coin-purse{position:static!important;inset:auto!important;margin:0!important;width:64px!important;min-width:0!important;height:50px!important;min-height:50px!important;padding:0!important}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources>.secondary-resources{display:grid!important;grid-template-columns:44px minmax(0,1fr) 52px;gap:4px;width:100%;min-width:0!important}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources .mini-resource{min-width:0!important;width:100%!important;padding:2px!important}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources .mini-resource>span{gap:2px}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources .mini-resource>span>.icon{width:16px!important;height:16px!important}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources #foodCounter{min-width:0!important}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources #threatInfo{width:44px!important;min-width:0!important;flex-basis:44px!important;padding:1px!important}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources #threatInfo .threat-value>span{font-size:12px;line-height:13px;white-space:nowrap}
}
@media(max-width:700px){
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources>.coin-purse{display:grid!important;grid-template-columns:20px minmax(0,1fr);grid-template-rows:28px 14px;align-content:center;gap:0}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources>.coin-purse>.purse-icon{grid-area:1/1;width:20px!important;height:20px!important;align-self:center}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources>.coin-purse>.coin-count{grid-area:1/2;font-size:28px!important;line-height:28px!important}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources>.coin-purse>.coin-caption{grid-area:2/1/3/-1;font-size:12px!important;line-height:14px!important;letter-spacing:.04em}
 body[data-style="hybrid"][data-view="tavern"] #playerHud #resources>.coin-purse>.mana-track{display:none!important}
}

/* Compact laptop: artwork shares the lower stage with fixed control slots. */
@media(min-width:940px) and (min-height:501px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game{grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-template-rows:minmax(184px,1fr) 36px 208px!important;gap:4px 10px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation{grid-area:1/1/2/4!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter{grid-area:1/4/2/7!important;display:grid!important;grid-template-rows:20px minmax(124px,1fr) 20px;gap:4px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies{min-height:124px!important;height:100%!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy{height:100%!important;min-height:124px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection{grid-area:3/1/4/5!important;height:208px!important;position:relative!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability{height:208px!important;max-height:208px!important;min-height:208px!important;grid-template-rows:32px minmax(70px,1fr) auto!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability>.ability-art{height:100%!important;min-height:70px!important;max-height:none!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.controls{grid-area:3/5/4/7!important;padding:0!important}
 body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls>.turn-actions{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(84px,1fr) 56px 56px!important;gap:6px!important}
 body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls #endButton{grid-area:3/1!important;min-height:56px!important;height:56px!important;max-height:56px!important}
 body[data-style="hybrid"][data-cycle-phase="night"][data-phase="battle"] #game>.controls #cycleFinish{grid-area:2/1!important;min-height:56px!important;height:56px!important;max-height:56px!important}
 body[data-style="hybrid"] #game>.controls .turn-context{grid-area:1/1!important;display:flex!important;flex-wrap:wrap!important;align-content:end;align-items:center;justify-content:center;gap:4px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero{width:min(214px,100%)!important;max-width:214px!important;height:160px!important;min-height:160px!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:22px minmax(94px,1fr) 18px!important}
}
/* Small screens retain the complete context controls in two stable rows. */
@media(max-height:500px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game{grid-template-rows:minmax(146px,1fr) 32px 60px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter{display:grid!important;grid-template-rows:20px minmax(102px,1fr) 20px;gap:2px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies{min-height:102px!important;height:100%!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy{height:100%!important;min-height:102px!important}
 body[data-style="hybrid"] #game>.controls .turn-context{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:30px 28px;gap:2px!important;align-content:center;justify-content:stretch}
 body[data-style="hybrid"] #game>.controls .turn-context>#guardSelected{grid-area:1/1/2/-1;width:100%!important;max-width:none!important;min-width:0!important;min-height:30px!important;height:30px!important;padding:1px 3px!important}
 body[data-style="hybrid"] #game>.controls .turn-context>:is(#inspectButton,#cancelButton,.action-information){grid-row:2;width:100%!important;min-width:0!important;max-width:none!important;height:28px!important;min-height:28px!important;flex:none!important}
 body[data-style="hybrid"] #game>.controls .turn-context .battle-response button{height:28px!important;min-height:28px!important;max-width:none!important;padding:1px!important}
 body[data-style="hybrid"] #guardSelected>.main-action-art{width:24px;height:24px}
}
/* Forecast damage keeps its icon without covering Health on compact foes. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>.direct-attack{inset:26px auto auto 36px!important;display:flex;align-items:center;justify-content:center;gap:2px;height:20px!important;min-height:20px!important;padding:1px 3px!important;font:700 12px/14px system-ui!important}
body[data-style="hybrid"] #game .enemy>.direct-attack>.main-action-art{width:16px!important;height:16px!important}

body[data-style="hybrid"][data-progression="xp"] #game .enemy>img[data-forest-rank]{object-fit:contain!important;object-position:center!important;transform:none!important}
@media(max-height:500px){
 body[data-style="hybrid"][data-progression="xp"] #game #fieldActions{height:32px!important;min-height:32px!important;padding-block:0!important}
 body[data-style="hybrid"][data-progression="xp"] #game .forage-bush{display:flex!important;align-items:center;justify-content:center;gap:5px;width:240px!important;height:32px!important;min-height:32px!important}
 body[data-style="hybrid"][data-progression="xp"] #game .forage-bush>.bush-base{display:none!important}
 body[data-style="hybrid"][data-progression="xp"] #game .forage-bush>.forage-nodes{position:static!important;inset:auto!important;display:flex!important;align-items:center;gap:4px;width:auto!important;height:30px!important}
 body[data-style="hybrid"][data-progression="xp"] #game .forage-bush .forage-node{position:relative!important;inset:auto!important;transform:none!important;width:30px!important;min-width:30px!important;height:30px!important}
 body[data-style="hybrid"][data-progression="xp"] #game .forage-bush>.bush-food-total{position:static!important;inset:auto!important;transform:none!important;white-space:nowrap;font-size:12px!important;line-height:16px!important;padding:1px 3px!important}
}

/* Compact Forest anatomy reserves its left illustration instead of laying facts over it. */
@media(max-width:700px),(max-height:650px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>img{grid-area:2/1/5/2!important;width:100%!important;height:100%!important;min-height:0!important;padding:0!important;clip-path:none!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy .enemy-copy>.role{position:static!important;inset:auto!important;grid-area:2/2/3/3!important;align-self:start!important;justify-self:center!important;font:12px/14px system-ui!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy .enemy-copy>.hp{grid-area:3/2/4/3!important;justify-content:center!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy .enemy-copy>.enemy-signature{grid-area:2/2/3/3!important;align-self:end!important;justify-self:center!important;text-align:center!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy .enemy-copy>.health-track{grid-area:4/2/5/3!important}
}

/* The scene carries the HUD. Only cards and actual choices keep card surfaces. */
body[data-style="hybrid"] .brand,
body[data-style="hybrid"] .top :is(.cycle-parent,.cycle-goal,.cycle-parent-title,.quest-gold-area),
body[data-style="hybrid"] .cycle-heading{background:transparent!important;border:0!important;border-image:none!important;box-shadow:none!important;border-radius:0!important}
body[data-style="hybrid"] :is(.brand,.cycle-parent,.cycle-parent-title,.primary-goal,.cycle-heading){text-shadow:0 2px 3px #090c0f,0 0 7px #090c0f}
body[data-style="hybrid"] .top{background:linear-gradient(#08100e66,transparent)!important;border:0!important;box-shadow:none!important}
body[data-style="hybrid"] :is(.top-actions,#game>.formation,#game>.encounter)>.section-line{background:none!important;border:0!important;box-shadow:none!important;text-shadow:0 2px 3px #090c0f,0 0 6px #090c0f}
body[data-style="hybrid"] #playerHud #resources :is(.coin-purse,.mini-resource){background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;text-shadow:0 2px 3px #090c0f,0 0 6px #090c0f}
body[data-style="hybrid"] #playerHud #threatInfo{background:none!important;border:0!important;box-shadow:none!important;text-shadow:0 2px 3px #090c0f,0 0 6px #090c0f}
body[data-style="hybrid"] #playerHud #threatInfo .threat-column{background:#130f0b66!important;border-color:#d0ab6d99!important}
body[data-style="hybrid"] #playerHud #resources .coin-purse .hud-capacity-track{background:#10252888!important;border-color:#9cd0d088!important}
body[data-style="hybrid"] .top .cycle-goal-purpose{background:none!important;border:0!important;text-shadow:0 2px 3px #090c0f,0 0 5px #090c0f}

body[data-style="hybrid"] .quest-action-art{width:30px;height:30px;object-fit:contain;flex:none;vertical-align:middle}
body[data-style="hybrid"] #questTarget strong{display:flex;align-items:center;justify-content:center;gap:3px}

body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"] #game>#handSection #hand>.ability:not(.loot-card)>strong{display:flex!important;align-items:center;justify-content:center;text-align:center!important;font-family:var(--fantasy-title,Georgia),serif!important}
body[data-style="hybrid"] #hand .owner>.card-role{position:absolute;inset:0 auto auto 0;z-index:3;display:grid;place-items:center;width:14px;height:14px;background:var(--lantern-unit,#20383f);color:#f0dfb8}
body[data-style="hybrid"] #hand .owner>.card-role>.icon{width:13px;height:13px}
body[data-style="hybrid"] #hand .hybrid-card-detail{gap:1px!important;padding-block:1px!important}
body[data-style="hybrid"] #hand .hybrid-target-keyword{font:12px/15px system-ui!important;white-space:normal!important}

/* Current identity rail: real role left, centred title, native Mana cost right. */
body[data-style="hybrid"] #hand .owner>.hand-role-art{display:block;width:100%!important;height:100%!important;object-fit:contain!important;transform:none!important;padding:2px!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy .enemy-copy>.role{position:absolute!important;inset:12px auto auto 12px!important;display:block!important;width:16px!important;height:16px!important;font-size:0!important;line-height:0!important;background:none!important;z-index:3;grid-area:auto!important}
body[data-style="hybrid"] #game .enemy .enemy-copy>.role>.icon{display:block;width:16px!important;height:16px!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>.enemy-rank{inset:12px 12px auto auto!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>.hybrid-unit-name{padding-inline:20px!important;text-align:center!important}

/* Priority card faces: dominant portrait window, quiet live stat plates and bottom XP. */
@media(min-width:940px) and (min-height:501px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation{grid-template-rows:20px minmax(0,1fr)!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>img[data-animal-rank]{grid-area:2/1/3/-1!important;width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>.hero-class-name{display:none!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.hp{grid-area:2/1/3/2!important;align-self:end!important;justify-self:start!important;margin:0 0 4px!important;padding:0 3px!important;width:max-content!important;max-width:100%!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.stats{grid-area:2/2/3/3!important;align-self:end!important;justify-self:end!important;margin:0 0 4px!important;padding:0 3px!important;width:max-content!important;max-width:100%!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.health-track{grid-area:2/1/3/-1!important;align-self:end!important;height:3px!important;min-height:3px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.xp-ribbon{grid-area:3/1/4/-1!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter{justify-items:stretch!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies{width:100%!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection>.hand-heading{position:absolute!important;inset:0 auto auto calc(100% + 10px)!important;width:calc((100% - 10px)/2)!important;height:28px!important;min-height:28px!important;display:flex!important;justify-content:flex-start!important;gap:4px!important;z-index:7}
 body[data-style="hybrid"] #game>.controls .turn-context{position:relative!important;padding-top:28px!important;box-sizing:border-box}
 body[data-style="hybrid"] #game>.controls .turn-context>#guardSelected{flex:0 1 145px!important;max-width:145px!important;min-width:0!important}
 body[data-style="hybrid"] #game>.controls .turn-context>:is(#inspectButton,#cancelButton){max-width:58px!important;padding-inline:3px!important}
 body[data-style="hybrid"][data-progression="xp"] #game .turn-context>.action-information{position:absolute!important;right:0!important;top:0!important;width:52px!important;height:28px!important;min-height:28px!important}
}

body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability:not(.loot-card)>strong{padding:2px 38px 2px 36px!important;line-height:14px!important;overflow-wrap:anywhere!important;min-width:0!important}

/* Party-owned neutral cards use the same readable face, with a custody glyph. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability.loot-card{grid-template-rows:32px minmax(60px,1fr) auto 18px!important;gap:2px!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability.loot-card>strong{grid-row:1!important;min-height:32px!important;padding:2px 38px 2px 36px!important;font:700 14px/14px var(--fantasy-title,Georgia),serif!important;display:flex;align-items:center;justify-content:center;overflow-wrap:anywhere}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability.loot-card>.ability-art{grid-row:2!important;padding:0!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability.loot-card>.effect-copy{grid-row:3!important;color:#25352a!important;background:#e5d5af!important;line-height:16px!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability.loot-card>.loot-tags{grid-row:4!important;background:#e5d5af!important;color:#25352a!important;padding:0 2px!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability.loot-card>.owner.loot-owner{width:29px!important;max-width:29px!important;height:29px!important;inset:9px auto auto 9px!important;justify-content:center;overflow:hidden}
body[data-style="hybrid"] #hand .loot-owner>span{display:none}
body[data-style="hybrid"] .loot-cost{display:flex!important;align-items:center;justify-content:center;gap:2px}
body[data-style="hybrid"] .loot-cost>.loot-stat-icon{width:14px!important;height:16px!important;margin:0!important}
body[data-style="hybrid"] .loot-tags :is(.loot-lifetime,.loot-rarity){color:#42513d!important}
body[data-style="hybrid"][data-cycle-phase] .cycle-goal #questTarget{min-width:86px!important}

/* Authored fantasy rails use local book faces; changing values remain live, crisp text. */
body[data-style="hybrid"]{--fantasy-title:"Palatino Linotype",Palatino,"Book Antiqua",Georgia;--fantasy-copy:Georgia,"Times New Roman",serif}
body[data-style="hybrid"] :is(.brand,.hybrid-unit-name,.ability>strong,.loot-title,.pv-option h3,.market-offer h2,.patron-quest-panel h2,.patron-speech h2){font-family:var(--fantasy-title),serif!important;letter-spacing:.015em}
body[data-style="hybrid"] :is(.hybrid-card-detail,.loot-effect,.patron-speech p){font-family:var(--fantasy-copy)!important}
body[data-style="hybrid"] #game .enemy[data-element="Earth"]{--lantern-plane:#4b4430;--enemy-accent:#a2b481}
body[data-style="hybrid"] #game .enemy[data-element="Fire"]{--lantern-plane:#66382a;--enemy-accent:#d69b64}
body[data-style="hybrid"] #game .enemy[data-element="Air"]{--lantern-plane:#344b55;--enemy-accent:#a4c4ce}
body[data-style="hybrid"] #game .enemy[data-element="Water"]{--lantern-plane:#2c4a56;--enemy-accent:#88bbd1}
body[data-style="hybrid"] #game .enemy[data-element="Ice"]{--lantern-plane:#344b55;--enemy-accent:#b4d2d7}
body[data-style="hybrid"] #game .enemy>img{border-color:var(--enemy-accent,#a68e5d)!important}

/* Compact cards retain portrait proportions and a closer subject camera. */
@media(min-width:940px) and (min-height:501px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game{grid-template-rows:minmax(196px,1fr) 36px 196px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection{height:196px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability{width:142px!important;min-width:142px!important;max-width:142px!important;flex:0 0 142px!important;height:196px!important;min-height:196px!important;max-height:196px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.controls>.turn-actions{grid-template-rows:minmax(72px,1fr) 56px 56px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero{width:138px!important;min-width:138px!important;max-width:138px!important;height:172px!important;min-height:172px!important;grid-template-rows:24px minmax(94px,1fr) 18px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation .hero>.hybrid-unit-name{padding:1px 16px!important;font-size:14px!important;line-height:14px!important;align-self:center!important;overflow-wrap:anywhere}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation .hero>.role-seal{inset:12px auto auto 10px!important;width:14px!important;height:14px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation .hero>.role-seal>.icon{width:14px!important;height:14px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation .hero .hero-body>.hp{font-size:14px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation .hero .hero-body>.stats{font-size:12px!important;gap:2px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation .hero .hero-body>.stats .icon{width:12px!important;height:12px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy{width:138px!important;max-width:138px!important;height:172px!important;min-height:172px!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:24px minmax(64px,1fr) 18px 18px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>img{grid-area:2/1/4/2!important;object-fit:contain!important;width:100%!important;height:100%!important;min-height:0!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>.hybrid-unit-name{grid-area:1/1/2/2!important;font-size:14px!important;line-height:14px!important;align-self:center!important;padding-inline:18px!important;overflow-wrap:anywhere}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy .enemy-copy>.hp{grid-area:3/1/4/2!important;justify-self:center!important;align-self:end!important;width:max-content!important;background:#36281ee8!important;padding:0 3px!important;font-size:14px!important;z-index:2}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy .enemy-copy>.health-track{grid-area:3/1/4/2!important;align-self:end!important;height:3px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy .enemy-copy>.intent{grid-area:4/1/5/2!important;font-size:12px!important;line-height:16px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy .enemy-copy>.enemy-signature{position:absolute!important;top:40px!important;right:10px!important;grid-area:auto!important;max-width:64px!important;padding:1px 2px!important;background:#30251ee8!important;font-size:12px!important;line-height:14px!important}
}

@media(min-width:940px) and (min-height:501px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability{width:160px!important;min-width:160px!important;max-width:160px!important;flex-basis:160px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>.hybrid-unit-name{font:700 14px/14px var(--fantasy-title),serif!important;white-space:normal!important;text-overflow:clip!important;overflow:visible!important;padding:0 13px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>.hybrid-unit-name{white-space:normal!important;text-overflow:clip!important;overflow:visible!important;padding-inline:14px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>.role-seal{inset:10px auto auto 8px!important;width:14px!important;height:14px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>.role-seal>.icon{width:14px!important;height:14px!important}
}

@media(min-width:940px) and (min-height:651px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game{grid-template-rows:minmax(246px,1fr) 44px 280px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection{height:280px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability{width:200px!important;min-width:200px!important;max-width:200px!important;flex-basis:200px!important;height:280px!important;min-height:280px!important;max-height:280px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.controls>.turn-actions{grid-template-rows:minmax(156px,1fr) 56px 56px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero{width:180px!important;min-width:180px!important;max-width:180px!important;height:246px!important;min-height:246px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy{width:180px!important;min-width:180px!important;max-width:180px!important;height:246px!important;min-height:246px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>.hybrid-unit-name,
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>.hybrid-unit-name{font-size:16px!important;line-height:18px!important}
}

@media(min-width:940px) and (max-height:500px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero{width:154px!important;min-width:154px!important;max-width:154px!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:24px minmax(94px,1fr) 18px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>img[data-animal-rank]{grid-area:2/1/3/-1!important;width:100%!important;height:100%!important;object-fit:contain!important;padding:0!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>.hero-class-name{display:none!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.hp{grid-area:2/1/3/2!important;align-self:end!important;justify-self:start!important;margin-bottom:4px!important;font-size:14px!important;padding:0 2px!important;background:#36281ee8}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.stats{grid-area:2/2/3/3!important;align-self:end!important;justify-self:end!important;margin-bottom:4px!important;font-size:12px!important;padding:0 2px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.health-track{grid-area:2/1/3/-1!important;align-self:end!important;height:3px!important;min-height:3px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero .hero-body>.xp-ribbon{grid-area:3/1/4/-1!important}
}

/* Reward cards keep the same title/cost rail and portrait frame. */
body[data-style="hybrid"] #lootPanel .loot-reward-card{width:100%;max-width:240px;justify-self:center}
body[data-style="hybrid"] #lootPanel .loot-reward-card.loot-card{grid-template-rows:28px minmax(60px,1fr) auto 18px!important}
body[data-style="hybrid"] #lootPanel .loot-reward-card.loot-card>.loot-title{grid-row:1!important;display:flex;align-items:center;justify-content:center;padding:0 30px!important;border:0!important;font:700 16px/18px var(--fantasy-title),serif!important}
body[data-style="hybrid"] #lootPanel .loot-reward-card.loot-card>.loot-reward-art{grid-row:2!important;padding:0!important}
body[data-style="hybrid"] #lootPanel .loot-reward-card.loot-card>.loot-effect{grid-row:3!important}
body[data-style="hybrid"] #lootPanel .loot-reward-card.loot-card>.loot-tags{grid-row:4!important;background:#e5d5af!important;color:#42513d!important}
body[data-style="hybrid"] #lootPanel .loot-reward-card.loot-card>.loot-owner{inset:9px auto auto 9px!important;width:22px;height:24px;justify-content:center;color:#3d4128!important}
body[data-style="hybrid"] #lootPanel .loot-reward-card.loot-card>.loot-owner>span{display:none}
body[data-style="hybrid"] #lootPanel .loot-reward-card.loot-card>.loot-cost{inset:9px 9px auto auto!important}
@media(max-height:500px){body[data-style="hybrid"] #lootPanel .loot-reward-card{max-width:180px}}

@font-face{font-family:"IM Fell English";src:url("themes/fonts/IMFellEnglish-Regular.ttf") format("truetype");font-style:normal;font-weight:400;font-display:swap}
body[data-style="hybrid"]{--fantasy-title:"IM Fell English",Georgia,serif;--fantasy-copy:"IM Fell English",Georgia,serif;font-family:var(--fantasy-copy)}
body[data-style="hybrid"] :is(.patron-facts,.patron-condition,.market-host-label,.market-ranks,.market-heading,.cycle-day-card,.turn-context){font-family:var(--fantasy-copy)!important}
body[data-style="hybrid"] :is(.hp,.stats,.cost,.mini-resource,.coin-count,.xp-ribbon,.market-values b,.market-offer>button b,.loot-effect b){font-family:system-ui,sans-serif!important;font-variant-numeric:tabular-nums}
@media(min-width:940px) and (min-height:651px) and (max-height:759px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game{grid-template-rows:minmax(198px,1fr) 36px 232px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection{height:232px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability{width:168px!important;min-width:168px!important;max-width:168px!important;flex-basis:168px!important;height:232px!important;min-height:232px!important;max-height:232px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.controls>.turn-actions{grid-template-rows:minmax(108px,1fr) 56px 56px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero{width:148px!important;min-width:148px!important;max-width:148px!important;height:198px!important;min-height:198px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy{width:148px!important;min-width:148px!important;max-width:148px!important;height:198px!important;min-height:198px!important}
}
body[data-style="hybrid"] .market-shell details[open]>p{position:fixed!important;left:14px!important;right:74px!important;bottom:254px!important;width:auto!important;max-width:540px!important;max-height:min(240px,40dvh)!important}

body[data-style="hybrid"] #endButton{background:linear-gradient(#485b3c,#243a2b)!important;border:2px solid #d9bc7c!important;box-shadow:0 3px 5px #100b07aa,inset 0 0 0 1px #6e7954!important;color:#fff0cb!important}
body[data-style="hybrid"] #endButton strong{font:700 22px/24px var(--fantasy-title),serif!important;color:#fff0cb!important}
body[data-style="hybrid"] #endButton:is(:hover,:focus-visible){outline:2px solid #f4d995!important;outline-offset:2px;filter:brightness(1.12);transform:none!important}
body[data-style="hybrid"] #endButton:active strong{transform:translateY(1px)}

/* Art shares one opaque card surface beneath the C outline. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>#handSection #hand>.ability>.ability-art{border:0!important;box-shadow:none!important;background:var(--lantern-paper,#e5d5af)!important;overflow:hidden!important}
body[data-style="hybrid"] #hand .ability-art :is(.effect-art,.effect-art-medallion){width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;border:0!important;border-radius:0!important;background:none!important;padding:0!important;box-shadow:none!important}
body[data-style="hybrid"] #hand .ability-art .effect-art-main{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;border:0!important;padding:0!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>img,
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>img{border:0!important;box-shadow:none!important;background:transparent!important}

/* Real action previews sit beside units, preserving the character artwork. */
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero>.direct-guard{inset:auto!important;left:calc(100% + 4px)!important;top:calc(50% - 24px)!important;width:76px!important;min-width:76px!important;max-width:76px!important;height:48px!important;min-height:48px!important;display:grid!important;grid-template-columns:24px minmax(0,1fr);gap:2px;padding:2px!important;font:700 14px/15px var(--fantasy-title),serif!important;transform:none!important;z-index:5}
body[data-style="hybrid"] #game .hero>.direct-guard>.main-action-art{width:24px!important;height:28px!important;object-fit:contain!important}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>.direct-attack{inset:auto!important;left:calc(100% + 6px)!important;top:calc(50% - 24px)!important;width:76px!important;height:48px!important;min-height:48px!important;display:grid!important;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:2px;padding:2px!important;font:700 14px/15px var(--fantasy-title),serif!important;transform:none!important;background:#294e2c!important;border:1px solid #afd784!important;color:#f5e8c4!important}
body[data-style="hybrid"] #game .enemy>.direct-attack>.main-action-art{display:block!important;width:24px!important;height:28px!important;object-fit:contain!important}
body[data-style="hybrid"] #game .enemy>.direct-attack span{display:flex;flex-direction:column;align-items:center}

/* Common compact effect rail gives the artwork its intended inner-card share. */
body[data-style="hybrid"] #hand .ability:not(.loot-card) .hybrid-card-detail{flex-direction:row!important;flex-wrap:wrap!important;align-content:center;align-items:center;justify-content:center;min-height:22px;gap:0 3px!important}
body[data-style="hybrid"] #hand .hybrid-effect-token{flex-wrap:nowrap!important;gap:2px!important}
body[data-style="hybrid"] #game .hero>.direct-guard>span{flex-direction:column!important;align-items:center!important;width:100%;max-width:100%;min-width:0;gap:0!important;text-align:center;line-height:14px}
body[data-style="hybrid"] #game .hero>.direct-guard>span>b{line-height:14px}
body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>.direct-attack{min-width:76px!important;max-width:76px!important}
@media(min-width:940px) and (min-height:501px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy{grid-template-rows:30px minmax(58px,1fr) 18px 18px!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy>.hybrid-unit-name{min-height:30px!important;font-size:14px!important;line-height:14px!important;white-space:normal!important}
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.encounter #enemies>.enemy .enemy-copy>.enemy-signature{inset:auto!important;left:calc(100% + 6px)!important;top:calc(50% + 28px)!important;width:90px!important;max-width:90px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;text-align:center!important;font:12px/14px var(--fantasy-copy)!important}
}
@media(min-width:940px) and (min-height:501px) and (max-height:759px){
 body[data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game>.formation :is(#front,#rear)>.hero[data-class="hunter"]>img[data-animal-rank]{width:125%!important;height:125%!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;align-self:start!important;justify-self:center!important;object-fit:contain!important;object-position:center top!important;clip-path:inset(0 10% 20% 10%)!important}
}

/* The visible Fight extension belongs to the same native enemy target. */
body[data-style="hybrid"] #game .enemy>.direct-attack{pointer-events:auto!important;cursor:pointer}
