/* Current candidate: actions live on their targets; card and save rules stay in JS. */
body[data-progression="xp"] #game{position:relative;perspective:1100px}
body[data-progression="xp"] #game #fieldActions{grid-column:1/-1;grid-row:2;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:42px;position:relative;padding:0 12px}
body[data-progression="xp"] #fieldActions[hidden]{display:none!important}
.forage-nodes{display:flex;align-items:center;justify-content:center;gap:12px}
.forage-node{position:relative;width:48px;height:42px;padding:0;border:1px solid #8b825c;border-radius:10px;background:#10271bbd;box-shadow:0 3px 3px #0009}
.forage-node>img{height:100%;width:100%;object-fit:contain;filter:drop-shadow(0 2px 3px #000)}
.forage-node>b{position:absolute;bottom:0;right:-2px;padding:0 4px;background:#123222;border:1px solid #b7cd93;border-radius:5px;color:#fff3c7;font-size:16px;line-height:20px}
.forage-node.gathered{opacity:.35;box-shadow:none}
.deck-stack{position:relative;height:42px;width:36px;padding:0;border:1px solid #c1ac71;border-radius:5px;background:#1b3428;box-shadow:3px 2px 0 #345141,5px 4px 0 #12221b}
.deck-stack>img:not(.class-sigil){height:100%;width:100%;object-fit:cover;border-radius:4px}
.deck-stack>.class-sigil{position:absolute;left:-10px;top:-3px;width:23px;height:23px;background:#172c22e8;border-radius:50%;border:1px solid #bece92}
.deck-stack>b{position:absolute;bottom:0;right:-8px;min-width:22px;font:600 14px/20px system-ui;color:#f7e9bb;border:1px solid #c6ad70;background:#13251e;border-radius:5px}
#enemyDeck{border-color:#bd7b6b;box-shadow:3px 2px 0 #6b3d38,5px 4px 0 #241414}
#fieldPreview{position:absolute;z-index:15;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);width:max-content;max-width:min(680px,95vw);padding:5px 10px;border:1px solid #b7cc91;border-radius:7px;background:#10271bf5;color:#f2edda;font:14px/19px system-ui;pointer-events:none;text-align:center;box-shadow:0 4px 10px #0008}
#fieldPreview[hidden]{display:none}
.direct-attack,.direct-guard{position:absolute;z-index:5;top:32px;right:5px;width:45px;height:45px;padding:0;display:grid;place-items:center;border:2px solid #b6f086;border-radius:50%;background:#234a25ed;box-shadow:0 0 10px #8dd95d80}
.direct-attack{pointer-events:none}
.direct-guard{cursor:pointer}
.direct-attack .main-action-art,.direct-guard .main-action-art{width:40px!important;height:40px!important;object-fit:contain}
.direct-guard>b{position:absolute;right:-3px;bottom:-3px;background:#173322;border:1px solid #c3dc9b;border-radius:5px;padding:0 3px;line-height:18px;font-size:14px}
body[data-progression="xp"] .quest-progress-track>i{background:linear-gradient(90deg,#b98924,#f7d866)!important}
body[data-progression="xp"] .quest-objective:has(+*){border-color:#ddc971}
.deck-entry{display:flex;align-items:center;gap:8px;margin:5px 0;font:16px/22px system-ui}
.deck-entry>.class-sigil{width:30px;height:30px;object-fit:contain}
.travel-destination{display:block;position:relative;height:110px;overflow:hidden;border:1px solid #b89b64;border-radius:8px;margin-bottom:12px}
.travel-destination>img{height:100%;width:100%;object-fit:cover}
.travel-silhouettes{position:absolute;inset:0;display:flex;justify-content:center}
.travel-silhouettes>img{max-width:100px;height:100%;object-fit:contain;filter:drop-shadow(0 3px 3px #000)}
.travel-costs{display:flex;justify-content:space-around;gap:6px;margin:8px 0 12px}
.travel-value{display:grid;grid-template-columns:auto auto;align-items:center;justify-content:center;gap:3px 7px}
.travel-value>.icon{width:36px;height:36px;grid-row:1/3;fill:none;stroke:currentColor;stroke-width:1.5}
.travel-value>b{font:600 19px/22px system-ui}.travel-value>small{font:14px/18px system-ui}
.travel-destination-info{display:block;font:14px/20px system-ui}
.reward-tokens{display:flex;align-items:center;gap:10px;min-height:35px}.reward-tokens>span{display:flex;align-items:center;gap:3px}.reward-tokens .tv-icon{height:35px!important;width:35px!important;margin:0!important}.reward-tokens b{font:600 21px/25px system-ui}
.patron-card .patron-pressure{display:flex;align-items:center;gap:7px;font-size:14px;line-height:18px}.patron-card .patron-pressure .tv-icon{width:36px!important;height:36px!important;flex:none}
@media(max-width:700px){.forage-nodes{gap:6px}.forage-node{width:42px;height:39px}body[data-progression="xp"] #game #fieldActions{padding:0 6px}.direct-guard,.direct-attack{width:40px;height:40px}.travel-value{gap:2px}.travel-value>.icon{width:27px;height:27px}.travel-value>b{font-size:16px}.reward-tokens{gap:5px}.reward-tokens .tv-icon{width:30px!important;height:30px!important}}
@media(max-height:500px){body[data-progression="xp"] #game #fieldActions{min-height:34px}.deck-stack{height:32px;width:27px}.forage-node{height:32px;width:40px}.forage-node>b{font-size:14px;line-height:17px}.direct-guard,.direct-attack{top:20px;height:32px;width:32px}.direct-guard .main-action-art,.direct-attack .main-action-art{height:29px!important;width:29px!important}.travel-destination{height:70px}.travel-costs{margin:5px 0}.travel-value>.icon{width:28px;height:28px}}
@media(prefers-reduced-motion:reduce){}

#enemyEventNotice{flex:none;margin:0;text-align:center;font:14px/18px system-ui;color:#eed8b0;background:#17281be0;border:1px solid #97855c;border-radius:5px;padding:2px 4px}
#enemyEventNotice[hidden]{display:none}
/* Unit art uses the upper card face; compact landscape art never dictates phone scale. */
body[data-progression="xp"] #game .enemy>img{inset:21px 3px 63px!important;width:calc(100% - 6px)!important;height:calc(100% - 84px)!important;object-fit:contain}
body[data-progression="xp"] #game .enemy>.enemy-copy{inset:0!important;padding:22px 4px 4px!important;display:flex!important;flex-direction:column;justify-content:flex-end;align-items:stretch;gap:2px;pointer-events:none}
body[data-progression="xp"] #game .enemy-copy h3{font-size:16px!important;line-height:18px!important;margin:0!important;min-height:18px;padding:0!important}
body[data-progression="xp"] #game .enemy-copy>.hp{font-size:17px!important;line-height:20px!important;min-height:20px}
body[data-progression="xp"] #game .enemy-copy>.health-track{height:7px!important;flex:none}
body[data-progression="xp"] #game .enemy-copy>.intent{font-size:14px!important;line-height:17px!important;min-height:17px;margin:0!important}
@media(max-height:500px){body[data-progression="xp"] #game .enemy>img{inset:4px auto 5px 4px!important;width:34%!important;height:calc(100% - 9px)!important}body[data-progression="xp"] #game .enemy>.enemy-copy{padding:4px 3px 3px calc(34% + 6px)!important;justify-content:center;gap:1px}body[data-progression="xp"] #game .enemy-copy h3{font-size:14px!important;line-height:16px!important}body[data-progression="xp"] #game .enemy-copy>.hp{font-size:16px!important;line-height:18px!important}body[data-progression="xp"] #game .enemy-copy>.intent{font-size:12px!important;line-height:15px!important}}

.travel-destination>img{object-position:center 20%}
@media(min-width:701px) and (min-height:501px) and (max-height:700px){
 body[data-progression="xp"] #game .enemy>img{inset:21px auto 5px 3px!important;width:39%!important;height:calc(100% - 26px)!important}
 body[data-progression="xp"] #game .enemy>.enemy-copy{padding:22px 3px 5px calc(39% + 4px)!important;justify-content:center;gap:2px}
 body[data-progression="xp"] #game .enemy-copy>.intent{font-size:12px!important;line-height:16px!important}
}
@media(max-height:500px){
 body[data-fixture] #xpPanel.overlay{padding-top:20px}
 body[data-fixture] #xpPanel .progression-card{height:calc(100dvh - 26px)}
}

.direct-guard{top:22px;width:36px;height:36px}.direct-guard .main-action-art{width:32px!important;height:32px!important}
.direct-attack{left:6px;right:auto;top:24px;width:38px;height:38px}.direct-attack .main-action-art{width:34px!important;height:34px!important}
@media(max-width:700px) and (min-height:501px){.direct-guard{width:40px;height:40px}.direct-guard .main-action-art{width:36px!important;height:36px!important}}
@media(max-height:500px){.direct-guard{left:4px;right:auto;top:21px;width:30px;height:30px}.direct-guard .main-action-art{width:27px!important;height:27px!important}.direct-attack{top:20px;width:32px;height:32px}.direct-attack .main-action-art{width:29px!important;height:29px!important}}

/* Grouped review closure: readable forecasts and real capacity/pressure tracks. */
.direct-attack>b{position:absolute;right:-10px;bottom:-3px;border:1px solid #f3d69b;border-radius:5px;padding:0 3px;background:#173421;color:#fff4cf;font:600 14px/18px system-ui;white-space:nowrap}
body[data-progression="xp"] #resources .coin-purse,body[data-progression="xp"] #threatInfo{position:relative;padding-bottom:7px}
body[data-progression="xp"] #resources .hud-capacity-track{position:absolute!important;left:6px;right:6px;bottom:2px;height:6px;display:block!important;border:1px solid #76bfd08f;border-radius:4px;background:#071820;overflow:hidden;pointer-events:none}
body[data-progression="xp"] #resources .hud-capacity-track>i{display:block;height:100%;background:linear-gradient(90deg,#296596,#91e9ff);transition:width .2s ease}
body[data-progression="xp"] #resources .threat-track{border-color:#d293698f;background:#2b100e}
body[data-progression="xp"] #resources .threat-track>i{background:linear-gradient(90deg,#a85233,#f1b976)}
body[data-progression="xp"] #threatInfo>small{align-self:start;line-height:12px;transform:translateY(-2px)}
@media(max-height:500px){
 body[data-progression="xp"] #resources .hud-capacity-track{height:5px;bottom:1px}
}
@media(prefers-reduced-motion:reduce){body[data-progression="xp"] #resources .hud-capacity-track>i{transition:none}}
@media(max-width:500px){
 body[data-progression="xp"] #game .formation>.section-line{gap:3px}
 body[data-progression="xp"] #game .formation>.section-line>h2{flex:1;min-width:0;font-size:12px;line-height:13px;overflow-wrap:anywhere}
 body[data-progression="xp"] #moveSelected{min-width:28px;width:28px;padding:2px}
 body[data-progression="xp"] #moveSelected>span{display:none}
}

.departure-response{display:flex;flex-direction:column;gap:8px;font:14px/19px system-ui;text-align:left}
.departure-response>strong{color:#ffe1a3;font-size:16px;line-height:20px}
.departure-health{display:flex;gap:5px 14px;flex-wrap:wrap}
.departure-health>span{white-space:nowrap;background:#1d352a;border:1px solid #9caa7366;padding:3px 6px;border-radius:5px}
.departure-events{display:grid;gap:5px}
#forecastPanel:has(.departure-response) .travel-destination{height:60px;margin-bottom:5px}
@media(max-height:500px){#forecastPanel:has(.departure-response) .travel-destination{display:none}.departure-response{gap:4px;font-size:14px;line-height:17px}.departure-events{gap:2px}#forecastPanel:has(.departure-response) .overlay-card{padding:8px 12px}#forecastPanel:has(.departure-response) .overlay-heading{margin-bottom:4px}#forecastPanel:has(.departure-response) p{margin:4px 0}}
