/* Saturday playtest: one opaque printed face and legible objective. */
body[data-style="hybrid"] .shared-ability-card15{--card-paper57:#c6c9c5;--card-header57:#adb5b1}
body[data-style="hybrid"] .shared-ability-card15[data-role="DPS"]{--card-paper57:#ead6ca;--card-header57:#d5ad9b}
body[data-style="hybrid"] .shared-ability-card15[data-role="Tank"]{--card-paper57:#d8e4d4;--card-header57:#a9c5a4}
body[data-style="hybrid"] .shared-ability-card15[data-role="Lead"]{--card-paper57:#e1d9eb;--card-header57:#c1afd5}
body[data-style="hybrid"] .shared-ability-card15[data-role="Support"]{--card-paper57:#d8e9e3;--card-header57:#aed0c3}
body[data-style="hybrid"] .shared-ability-card15>.ability-face15,
body[data-style="hybrid"] .shared-ability-card15>.held-card-face,
body[data-style="hybrid"] .shared-ability-card15>.held-card-face>.ability-face15{background:var(--card-paper57)!important;opacity:1!important;backdrop-filter:none!important}
body[data-style="hybrid"] .shared-ability-card15 .af15-heading{background:var(--card-header57)!important}
body[data-style="hybrid"] .shared-ability-card15 .af15-art{background:var(--card-paper57)!important}
body[data-style="hybrid"] .shared-ability-card15[data-lifetime="persistent"],
body[data-style="hybrid"] .shared-ability-card15[data-lifetime="persistent"]>.held-card-face{border:4px solid #4c93e5!important}
body[data-style="hybrid"] .shared-ability-card15[data-lifetime="consumable"],
body[data-style="hybrid"] .shared-ability-card15[data-lifetime="consumable"]>.held-card-face{border:4px solid #c84e56!important}
/* Quest and Day share one aligned top row; the full calendar remains inspectable on phones. */
body[data-story="true"] #storyGoalHost17 .story-goal17{box-sizing:border-box!important;display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:7px!important;height:38px!important;min-height:38px!important;border:1px solid #a99265!important;border-left:3px solid #d6b767!important;border-radius:5px!important;background:#182d24ec!important;color:#ffe7a0!important;padding:3px 8px 4px!important;font-size:14px!important;line-height:18px!important;text-align:left;box-shadow:0 1px 3px #08120da0!important}
body[data-story="true"] #storyGoalHost17 .story-goal17 strong{display:block!important;flex:1 1 auto!important;min-width:0!important;white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important}
body[data-story="true"] #storyGoalHost17 .story-goal17>span{display:inline-flex;flex:none;align-items:center;gap:2px;font-size:15px;font-weight:700;color:#ffe59a}
body[data-story="true"] #storyGoalHost17 .story-goal17 :is(strong,span)>.icon{width:17px;height:17px}
body[data-story="true"][data-view="expedition"] #storyGoalHost17{top:3px!important;left:104px!important;width:clamp(250px,28vw,430px)!important;transform:none!important}
body[data-story="true"][data-view="expedition"] #storyTimeline17>.story-timeline17{box-sizing:border-box;top:3px!important;left:auto!important;right:104px!important;transform:none!important;height:38px;max-width:calc(100vw - 470px)!important;border:1px solid #a99265;border-radius:5px;background:#182d24ec;box-shadow:0 1px 3px #08120da0}
@media(min-width:701px) and (max-width:899px){body[data-story="true"][data-view="expedition"] #storyGoalHost17{left:8px!important}body[data-story="true"][data-view="expedition"] #storyTimeline17>.story-timeline17{right:8px!important;max-width:calc(100vw - 275px)!important}}
@media(max-width:700px){
 body[data-story="true"][data-view="expedition"] #storyGoalHost17{top:3px!important;left:8px!important;width:calc(100vw - 172px)!important}
 body[data-story="true"] #storyGoalHost17 .story-goal17{height:36px!important;min-height:36px!important;padding:2px 5px 3px!important;gap:3px!important;font-size:12px!important;line-height:15px!important}
 body[data-story="true"] #storyGoalHost17 .story-goal17>span{font-size:13px}
 body[data-story="true"] #storyGoalHost17 .story-goal17 :is(strong,span)>.icon{width:14px;height:14px}
 body[data-story="true"] #storyGoalHost17 .story-goal-bonus140{width:calc(100vw - 66px);margin:3px 0 0!important}
 body[data-story="true"][data-view="expedition"] #storyTimeline17>.story-timeline17{top:3px!important;left:auto!important;right:50px!important;transform:none!important;width:106px;max-width:106px!important;height:36px;justify-content:center;gap:3px;padding:3px 5px;border:1px solid #a99265;border-radius:5px;background:#182d24ec;box-shadow:0 1px 3px #08120da0;overflow:visible}
 body[data-story="true"][data-view="expedition"] #storyTimeline17>.story-timeline17::after{content:"▾";font-size:11px;color:#d6b767}
 body[data-story="true"][data-view="expedition"] #storyTimeline17>.story-timeline17 .story-seasons17{display:none}
 body[data-story="true"][data-view="expedition"] #storyTimeline17>.story-timeline17:is(:hover,:focus-within){z-index:90}
 body[data-story="true"][data-view="expedition"] #storyTimeline17>.story-timeline17:is(:hover,:focus-within) .story-seasons17{position:absolute;right:-42px;top:36px;display:flex;justify-content:center;box-sizing:border-box;width:calc(100vw - 16px);max-width:380px;padding:7px 5px;background:#182d24f5;border:1px solid #a99265;border-radius:5px;box-shadow:0 3px 10px #08120dcc}
}
body[data-story="true"] #storyGoalHost17 .story-goal17:focus-visible{outline:3px solid #fff1ae;outline-offset:3px}
body[data-story="true"] #foodCounter .food-upkeep26{color:#e9c88b!important;font-size:11px!important;line-height:13px!important;white-space:nowrap}
body[data-story="true"][data-style="hybrid"][data-phase="tavern"][data-view="tavern"][data-combat="false"] #playerHud #resources>#storyResourcePocket19{grid-template-rows:47px 47px 68px!important;gap:4px!important;height:170px!important;overflow:hidden!important}
body[data-story="true"][data-style="hybrid"][data-phase="tavern"][data-view="tavern"][data-combat="false"] #playerHud #resources>#storyResourcePocket19:not(:has(#moraleInfo)){grid-template-rows:47px 68px!important;height:121px!important;}
body[data-story="true"][data-style="hybrid"][data-phase="tavern"][data-view="tavern"][data-combat="false"] #playerHud #resources>#storyResourcePocket19 #foodCounter .food-upkeep26{font-size:11px!important;line-height:13px!important;white-space:nowrap!important}
/* On short landscape screens the goal stays clear of the hero and boss cards. */
@media (min-width:900px) and (max-width:1100px) and (max-height:650px){
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase][data-casting="true"] #game>#handSection>#mainActionDock{position:fixed!important;left:110px!important;right:auto!important;top:101px!important;bottom:auto!important;width:240px!important;height:auto!important}
 body[data-story="true"][data-view="expedition"][data-phase="battle"] #mainActionDock>.cast-preview{box-sizing:border-box!important;width:100%!important;max-height:none!important}
}

/* Volunteer heading text follows each existing role colour. */
body #storyOpening18 .refuge-choice-card32>[data-starter][data-role="DPS"] :is(strong[data-name32],small){color:#ff9885!important}
body #storyOpening18 .refuge-choice-card32>[data-starter][data-role="Tank"] :is(strong[data-name32],small){color:#b8e5ac!important}
body #storyOpening18 .refuge-choice-card32>[data-starter][data-role="Lead"] :is(strong[data-name32],small){color:#e4dec6!important}
body #storyOpening18 .refuge-choice-card32>[data-starter][data-role="Support"] :is(strong[data-name32],small){color:#a6d9f4!important}

/* A compressed phone hand still names every card in normal reading order. */
@media(max-width:650px){
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase][data-hand-fan24="true"] #game>#handSection #hand>.ability:not(:is(:hover,:focus-visible,.selected))::after{top:32px!important;left:0!important;right:0!important;max-height:38px!important;padding:2px 1px!important;box-sizing:border-box!important;width:100%!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;text-align:center!important;font-size:11px!important;line-height:12px!important}
}

/* Keep the objective between the Day bar and the actor row on laptop screens. */
@media (min-width:900px) and (max-width:1499px) and (min-height:700px){
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase][data-art-draft7="true"] #game[data-visible-party]>.formation,
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase][data-art-draft7="true"] #game>.encounter{top:96px!important}
}

/* Patron dialogue takes the town stage without inactive shop controls behind it. */
body[data-story="true"]:has(#tavern .major-patron) #tavern :is(.patron-stock-clusters,.market-reroll,.composed-quest-summary,.story-forest-exit19,#hartwellHelp23),
body[data-story="true"]:has(#tavern .major-patron) :is(#tavernDeck36,#currentQuest23,#playerHud){visibility:hidden!important;pointer-events:none!important}
body[data-story="true"] .major-patron .spoken-scene21__advance{box-shadow:none!important}

/* Keep the printed title and effect inside the same face on hand and shop cards. */
body[data-style="hybrid"] .shared-ability-card15 .af15-name{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;white-space:normal!important;overflow:hidden!important;overflow-wrap:normal!important;word-break:normal!important;line-height:15px!important;max-height:30px!important}
body[data-style="hybrid"] #tavern .patron-stock-clusters .shared-ability-card15 .ability-face15{grid-template-rows:40px minmax(0,1fr) 80px!important}
body[data-style="hybrid"] #tavern .patron-stock-clusters .shared-ability-card15 .af15-heading{height:40px!important;min-height:40px!important}
body[data-style="hybrid"] #tavern .patron-stock-clusters .shared-ability-card15 .af15-effect{height:80px!important;min-height:80px!important;max-height:80px!important}
body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase][data-hand-fan24="true"] #game>#handSection #hand>.ability.shared-ability-card15>.held-card-face,
body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase][data-hand-fan24="true"] #game>#handSection #hand>.ability.shared-ability-card15>.held-card-face>.ability-face15{background:var(--card-paper57)!important}

@media(max-width:650px){
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game:has(#hand>.ability.selected) #mainActionDock .cast-preview{position:absolute!important;top:19px!important;left:8px!important;right:8px!important;max-height:52px!important;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-width:thin}
}
@media(max-width:650px) and (max-height:760px){
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game:has(#hand>.ability.selected) #mainActionDock{display:none!important}
}

/* A story card forecast is display-only; keep hero targets clickable beneath it. */
body[data-story="true"][data-view="expedition"][data-phase="battle"] #mainActionDock:has(>.cast-preview){pointer-events:none!important}

/* On short landscape screens, keep the last response above the fanned hand. */
@media (min-width:900px) and (max-width:1100px) and (max-height:650px){
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #responseTracker23[data-tutorial="false"]{right:110px!important;bottom:250px!important;top:auto!important;width:250px!important}
}

/* Keep the last action readable without covering the fanned hand on wide screens. */
@media (min-width:900px){
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #responseTracker23[data-tutorial="false"]{bottom:250px!important;top:auto!important;max-height:27px!important;padding:3px 6px!important;opacity:.84!important;overflow:hidden!important}
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #responseTracker23 .response23-entry{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:4px!important;margin:0!important;font-size:12px!important;line-height:18px!important;white-space:nowrap!important}
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #responseTracker23 .response23-entry>span{flex:1 1 auto!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important}
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #responseTracker23 .response23-entry>strong{flex:none!important;font-size:12px!important;line-height:18px!important}
}
body[data-story="true"][data-phase="battle"] #responseTracker23[data-tutorial="false"] .response23-net{display:none!important}

/* Two front heroes keep both card faces and readiness visible above the hand. */
@media (min-width:900px) and (max-width:1499px) and (min-height:651px) and (max-height:800px){
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game[data-visible-party="2"] #front.hero-row:has(>.hero:nth-child(2)){grid-auto-rows:180px!important;row-gap:8px!important}
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game[data-visible-party="2"] #front.hero-row:has(>.hero:nth-child(2))>.hero,
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game[data-visible-party="2"] #front.hero-row:has(>.hero:nth-child(2))>.hero>.unit-card-face{height:180px!important;min-height:180px!important}
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game[data-visible-party="2"] #front.hero-row:has(>.hero:nth-child(2))>.hero>.readiness19{left:calc(100% + 4px)!important;right:auto!important;top:calc(100% - 25px)!important;bottom:auto!important;width:70px!important;min-width:70px!important;max-width:70px!important;height:22px!important;min-height:22px!important;box-sizing:border-box!important;padding:0 2px!important;font-size:11px!important;line-height:20px!important;transform:none!important}
}
@media (min-width:900px) and (max-width:1100px) and (max-height:650px){
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game[data-visible-party="2"] #front.hero-row:has(>.hero:nth-child(2)){row-gap:8px!important}
 body[data-story="true"][data-style="hybrid"][data-progression="xp"][data-view="expedition"][data-phase="battle"][data-cycle-phase] #game[data-visible-party="2"] #front.hero-row:has(>.hero:nth-child(2))>.hero>.readiness19{left:calc(100% + 3px)!important;right:auto!important;top:100px!important;bottom:auto!important;width:65px!important;min-width:65px!important;max-width:65px!important;height:22px!important;min-height:22px!important;box-sizing:border-box!important;padding:0 2px!important;font-size:11px!important;line-height:20px!important;transform:none!important}
}
