/* Two later mornings: full authored room, one compact story/goal card. */
.morning-art[hidden],.morning-dialogue[hidden],.morning-objective[hidden]{display:none!important}
.agency-shell .opening[data-illustrated-morning="true"]{position:absolute;inset:0;transform:none;width:100%;height:100%;min-height:0;max-height:none;border:0;box-shadow:none;background:#293e49;overflow:hidden}
.agency-shell .opening[data-illustrated-morning="true"] .opening-art{display:none}
.morning-art{position:absolute;left:50%;top:50%;width:1600px;height:900px;transform:translate(-50%,-50%);transform-origin:center}
.morning-room{display:block;width:100%;height:100%;object-fit:fill}
.morning-person{position:absolute;transform:translate(calc(-1 * var(--anchor-x)),calc(-1 * var(--anchor-y)));pointer-events:none}
.morning-person img{display:block;width:100%;height:100%}
.morning-person::before{content:'';position:absolute;left:36%;top:90.5%;width:31%;height:2.8%;background:#12242444;border-radius:50%}
.morning-location{position:absolute;bottom:22px;right:30px;padding:8px 12px;margin:0;background:var(--paper);color:var(--ink);font-size:13px;line-height:1.35}
.agency-shell .opening[data-illustrated-morning="true"] .opening-lockup{position:absolute;left:4%;right:auto;top:50%;transform:translateY(-50%);width:clamp(300px,30vw,400px);max-height:calc(100% - 48px);overflow:auto;padding:24px;background:var(--paper);border:1px solid var(--blue);box-shadow:var(--shadow)}
.agency-shell .opening[data-illustrated-morning="true"] h2{margin:0 0 14px}
.agency-shell .opening[data-illustrated-morning="true"] .title-day{font-size:clamp(42px,4vw,64px)}
.agency-shell .opening[data-illustrated-morning="true"] #opening-copy{font-size:17px;line-height:1.45;margin:0 0 20px}
.morning-dialogue{display:grid;gap:14px;padding:18px 0;border-block:1px solid var(--line)}
.morning-dialogue p{font-size:15px;line-height:1.45;margin:0}
.morning-dialogue strong{display:block;font-size:12px;line-height:1.5;color:var(--blue);margin-bottom:2px}
.morning-objective{font-size:14px;line-height:1.5;margin:18px 0 22px;color:var(--ink)}
.agency-shell .opening[data-illustrated-morning="true"] .week-ribbon{display:none}
.agency-shell .opening[data-illustrated-morning="true"] .opening-actions{gap:14px}
.agency-shell .opening[data-illustrated-morning="true"] .opening-actions .button{width:100%;min-width:0;min-height:44px;font-size:15px}
.agency-shell .opening[data-illustrated-morning="true"] .opening-actions .morning-expand{min-height:32px;text-align:left;justify-content:flex-start;padding-inline:0;font-size:13px}
.agency-shell .opening[data-illustrated-morning="true"] .opening-note{font-size:12px;line-height:1.45;margin:18px 0 0}
@media(max-height:760px) and (min-width:761px){
 .agency-shell .opening[data-illustrated-morning="true"] .opening-lockup{padding:20px;width:340px}
 .agency-shell .opening[data-illustrated-morning="true"] .title-day{font-size:44px}
 .agency-shell .opening[data-illustrated-morning="true"] #opening-copy{font-size:15px;margin-bottom:14px}
 .morning-dialogue{gap:10px;padding:12px 0}.morning-dialogue p{font-size:14px}.morning-objective{font-size:13px;margin:14px 0 18px}
}
@media(max-width:760px),(max-aspect-ratio:1/1){
 .agency-shell .opening[data-illustrated-morning="true"]{overflow-y:auto;display:flex;flex-direction:column;background:var(--paper)}
 .agency-shell .opening[data-illustrated-morning="true"] .morning-art{position:relative;inset:auto;flex:none;width:100%;height:auto;aspect-ratio:16/9;transform:none!important;overflow:hidden}
 .morning-location{top:calc(100vw * .5625 - 32px);bottom:auto;right:8px;padding:5px 7px;font-size:10px}
 .agency-shell .opening[data-illustrated-morning="true"] .opening-lockup{position:relative;inset:auto;transform:none;width:100%;max-height:none;flex:none;padding:20px 24px 28px;overflow:visible;box-shadow:none;border:0}
 .agency-shell .opening[data-illustrated-morning="true"] .title-day{font-size:40px}
 .agency-shell .opening[data-illustrated-morning="true"] #opening-copy{font-size:16px;margin-bottom:14px}
 .morning-dialogue{gap:10px;padding:12px 0}.morning-dialogue p{font-size:14px}.morning-objective{font-size:13px;margin:14px 0 18px}
}

/* Tuesday's connected journey: a close conversation, not an instruction card.
   Only the camera moves; the authored cast/furniture contacts stay registered. */
.morning-bubbles[hidden]{display:none!important}
.agency-shell .opening[data-morning-conversation="true"]{display:block;overflow:hidden}
.agency-shell .opening[data-morning-conversation="true"]::before{display:none}
.agency-shell .opening[data-morning-conversation="true"] .morning-art{position:absolute;left:0;top:0;width:1600px;height:900px;aspect-ratio:auto;transform-origin:0 0;overflow:visible}
.agency-shell .opening[data-morning-conversation="true"] :is(#opening-copy,.morning-location,.morning-dialogue,.morning-objective){display:none}
.agency-shell .opening[data-morning-conversation="true"] .opening-lockup{left:32px;right:auto;top:auto;bottom:32px;transform:none;width:290px;max-height:none;overflow:visible;padding:24px;z-index:3}
.agency-shell .opening[data-morning-conversation="true"] h2{margin:0 0 20px}
.agency-shell .opening[data-morning-conversation="true"] .title-day{font-size:56px}
.morning-bubbles{position:absolute;inset:0;pointer-events:none;z-index:2}
.agency-shell .opening .morning-speech{position:absolute;margin:0;padding:16px 18px;background:var(--paper);color:var(--ink);border:1px solid var(--blue);box-shadow:5px 5px 0 var(--blue);font-size:18px;line-height:1.4;box-sizing:border-box}
.morning-speech strong{display:block;margin-bottom:5px;color:var(--blue);font-size:13px;line-height:1.3}
.morning-speech::after{content:'';position:absolute;left:var(--tail-x);bottom:-11px;width:18px;height:18px;transform:translateX(-50%) rotate(45deg);background:var(--paper);border-right:1px solid var(--blue);border-bottom:1px solid var(--blue)}
@media(max-width:760px),(max-aspect-ratio:1/1){
 .agency-shell .opening[data-morning-conversation="true"] .morning-art{transform:var(--morning-camera)!important}
 .agency-shell .opening[data-morning-conversation="true"] .opening-lockup{position:absolute;left:16px;right:16px;bottom:20px;width:auto;padding:16px;display:flex;align-items:center;justify-content:space-between;gap:16px}
 .agency-shell .opening[data-morning-conversation="true"] h2{margin:0}
 .agency-shell .opening[data-morning-conversation="true"] .title-day{font-size:36px}
 .agency-shell .opening[data-morning-conversation="true"] .opening-actions{width:auto}
 .agency-shell .opening[data-morning-conversation="true"] .opening-actions .button{padding:12px;font-size:14px;min-width:0;gap:12px}
 .agency-shell .opening .morning-speech{padding:12px;font-size:15px;line-height:1.4;box-shadow:3px 3px 0 var(--blue)}
 .morning-speech strong{font-size:12px}
}
@media(max-width:350px){
 .agency-shell .opening .morning-speech{font-size:14px}
 .agency-shell .opening[data-morning-conversation="true"] .opening-lockup{gap:10px;padding:12px}
 .agency-shell .opening[data-morning-conversation="true"] .title-day{font-size:30px}
 .agency-shell .opening[data-morning-conversation="true"] .opening-actions .button{font-size:13px;padding:10px}
}

/* Reviewed scene plates fill the opening; live dialogue stays above the art. */
.agency-shell .opening[data-painted-morning="true"]{background:var(--paper)}
.agency-shell .opening[data-painted-morning="true"] .morning-art{position:absolute;left:0;top:0;width:1600px;height:900px;aspect-ratio:auto;transform-origin:0 0}
.agency-shell .opening[data-painted-morning="true"] .morning-room{object-fit:cover}
@media(max-width:760px),(max-aspect-ratio:1/1){
 .agency-shell .opening[data-painted-morning="true"] .morning-art{transform:var(--morning-camera)!important}
 .agency-shell .opening[data-painted-morning="true"] .opening-lockup{bottom:16px}
}

.morning-tails{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.morning-tails path{fill:var(--paper);stroke:var(--blue);stroke-width:1}
.agency-shell .opening[data-painted-morning="true"] .morning-speech::after{display:none}

@media(max-height:520px) and (min-width:761px) and (min-aspect-ratio:1/1){
 .agency-shell .opening[data-painted-morning="true"] .morning-speech{font-size:14px;line-height:1.35;padding:12px}
 .agency-shell .opening[data-painted-morning="true"] .opening-lockup{left:16px;bottom:16px;width:280px;display:flex;align-items:center;gap:16px;padding:12px}
 .agency-shell .opening[data-painted-morning="true"] h2{margin:0}
 .agency-shell .opening[data-painted-morning="true"] .title-day{font-size:32px}
 .agency-shell .opening[data-painted-morning="true"] .opening-actions{flex:1}
 .agency-shell .opening[data-painted-morning="true"] .opening-actions .button{font-size:13px;padding:10px;gap:10px}
}

/* Separate portrait paintings fill the phone. These rules activate only after
   the corresponding portrait has decoded; landscape covers keep their camera. */
.agency-shell .opening[data-portrait-morning="true"] .morning-art{width:900px;height:1600px}
.agency-shell .opening[data-portrait-morning="true"] .morning-speech::after{display:none}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"]::before{display:block;position:absolute;inset:0 0 auto;height:calc(96px + clamp(48px,calc(20svh - 80px),68px));background:linear-gradient(180deg,#111c2bba 0%,#111c2b80 66%,#111c2b00 100%);z-index:1;pointer-events:none}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .opening-art{left:0;top:0;width:900px;height:1600px;transform-origin:0 0}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .opening-art>img{width:100%;height:100%;object-fit:cover}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .opening-bubble{display:none}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .opening-signature{left:24px;top:16px;z-index:3;color:var(--paper)}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .opening-signature b{font-size:16px}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .opening-lockup{display:contents}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] h2{position:absolute;left:24px;top:40px;margin:0;display:flex;align-items:baseline;gap:8px;font-size:clamp(48px,calc(20svh - 80px),68px);line-height:1;color:var(--paper);z-index:3}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .title-small{display:block;font-size:24px;line-height:1;margin:0}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .title-large{display:block;font-size:clamp(48px,calc(20svh - 80px),68px);line-height:1}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] #opening-copy{position:absolute;left:24px;right:24px;top:calc(46px + clamp(48px,calc(20svh - 80px),68px));margin:0;color:var(--paper);font-size:16px;z-index:3}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .opening-actions{position:absolute;left:24px;right:24px;bottom:24px;display:flex;flex-direction:column;gap:10px;z-index:3}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .opening-actions .button{min-width:0;width:100%;min-height:48px;padding:10px 18px;font-size:16px}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"][data-resumable="true"] [data-start-shift]{background:var(--paper);color:var(--blue);border-color:var(--blue)}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .opening-note{position:absolute;left:24px;right:24px;bottom:calc(var(--portrait-actions-height,48px) + 38px);margin:0;padding:8px 12px;background:var(--paper);color:var(--ink);z-index:3}
.agency-shell .opening[data-portrait-morning="true"][data-day="1"] .opening-foot{display:none}

/* One decoded scene at a time: no old room/sprites or previous-day poster
   beneath a pending replacement. Day controls stay usable on slow/failing art. */
.agency-shell .opening[data-poster-state]:not([data-poster-state="ready"]) :is(.opening-art,.morning-art,.morning-bubbles){visibility:hidden!important}
.agency-shell .opening[data-poster-state="loading"],.agency-shell .opening[data-poster-state="failed"]{background:#20343c}
.agency-shell .opening .morning-loading{position:absolute;inset:42% 24px auto;z-index:2;margin:0;text-align:center;color:#fff8e5;font-size:15px;line-height:1.5;pointer-events:none}
.morning-loading[hidden]{display:none!important}

/* Monday's short portrait cover fits the viewport without clipping Start.
   Compact the existing title and live greeting; preserve the painting/copy. */
@media(max-width:760px) and (max-height:760px) and (orientation:portrait){
 .connected-pitch-slice.agency-shell:not(.historical-case) .play-grid[data-shift-phase="intro"]:has(.opening[data-day="1"]){height:100%;min-height:0}
 .agency-shell:not(.historical-case) .opening[data-portrait-morning="true"][data-day="1"]{min-height:0;--short-title-size:clamp(38px,calc(20svh - 90px),58px)}
 .agency-shell:not(.historical-case) .opening[data-portrait-morning="true"][data-day="1"] .opening-signature{top:8px}
 .agency-shell:not(.historical-case) .opening[data-portrait-morning="true"][data-day="1"] .opening-signature b{font-size:12px}
 .agency-shell:not(.historical-case) .opening[data-portrait-morning="true"][data-day="1"] h2{top:26px;font-size:var(--short-title-size)}
 .agency-shell:not(.historical-case) .opening[data-portrait-morning="true"][data-day="1"] .title-small{font-size:20px}
 .agency-shell:not(.historical-case) .opening[data-portrait-morning="true"][data-day="1"] .title-large{font-size:var(--short-title-size)}
 .agency-shell:not(.historical-case) .opening[data-portrait-morning="true"][data-day="1"] #opening-copy{top:calc(30px + var(--short-title-size));line-height:1.3}
 .agency-shell:not(.historical-case) .opening[data-portrait-morning="true"][data-day="1"] .morning-speech{padding:6px 12px;font-size:14px}
}


/* New weekday plates: keep speech clear at the smallest phone sizes. */
@media(max-width:760px){
 .connected-pitch-slice.agency-shell #opening:is([data-day="3"],[data-day="4"],[data-day="5"]){height:100%;min-height:0}
 .connected-pitch-slice.agency-shell .play-grid[data-shift-phase="intro"]:has(.opening:is([data-day="3"],[data-day="4"],[data-day="5"])){height:calc(100dvh - 74px);min-height:0}
}
@media(max-width:359px) and (orientation:portrait){
 .agency-shell .opening[data-portrait-morning="true"]:is([data-day="3"],[data-day="4"],[data-day="5"]) .morning-speech{padding:4px 6px;font-size:14px;line-height:1.3}
 .agency-shell .opening[data-portrait-morning="true"]:is([data-day="3"],[data-day="4"],[data-day="5"]) .morning-speech strong{font-size:11px;line-height:1.3;margin-bottom:3px}
}
@media(min-width:761px) and (max-height:520px){
 .agency-shell .opening[data-painted-morning="true"]:is([data-day="3"],[data-day="4"],[data-day="5"]) .opening-lockup{box-sizing:border-box;width:300px;padding:8px;gap:8px}
 .agency-shell .opening[data-painted-morning="true"]:is([data-day="3"],[data-day="4"],[data-day="5"]) .title-day{font-size:28px}
 .agency-shell .opening[data-painted-morning="true"]:is([data-day="3"],[data-day="4"],[data-day="5"]) .opening-actions .button{min-height:44px;font-size:13px;padding:8px;gap:8px}
}
/* A short sideways phone uses a conversation column beside the painting.
   The full live text can scroll independently; Begin remains visible. */
.agency-shell .opening[data-compact-morning="true"]::after{content:'';position:absolute;inset:0 0 0 56%;background:var(--paper);z-index:1;pointer-events:none}
.agency-shell .opening[data-compact-morning="true"] .morning-bubbles{inset:8px 8px 66px calc(56% + 8px);display:flex;flex-direction:column;gap:8px;overflow:auto;overscroll-behavior:contain;pointer-events:auto}
.agency-shell .opening[data-compact-morning="true"] .morning-speech{position:static;flex:none;width:auto!important;padding:6px;font-size:14px;line-height:1.3;box-shadow:none;border:0;border-bottom:1px solid var(--line)}
.agency-shell .opening[data-compact-morning="true"] .morning-speech strong{display:inline;font-size:12px;line-height:inherit;margin:0 4px 0 0}
.agency-shell .opening[data-compact-morning="true"] .morning-tails{display:none}
.agency-shell .opening[data-compact-morning="true"] .opening-lockup{box-sizing:border-box;left:56%;right:0;bottom:0;top:auto;width:auto;max-width:none;display:block;padding:8px 12px 12px;box-shadow:none;border:0;background:var(--paper)}
.agency-shell .opening[data-compact-morning="true"] .opening-lockup h2{position:absolute;width:1px;height:1px;margin:-1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.agency-shell .opening[data-compact-morning="true"] .opening-actions{width:100%}
.agency-shell .opening[data-compact-morning="true"] .opening-actions .button{width:100%;min-height:44px;font-size:14px;padding:8px;gap:8px}

/* Degraded room frames must not scroll when native focus enters the dialog. */
.agency-shell .opening[data-morning-conversation="true"][data-painted-morning="false"]:is([data-day="3"],[data-day="4"],[data-day="5"]),
.agency-shell .opening[data-degraded-morning="portrait"]{overflow:clip}
/* Only a failed weekday portrait: keep the complete substitute above live text. */
.agency-shell .opening[data-degraded-morning="portrait"] .morning-bubbles{inset:calc(var(--degraded-art-height) + 8px) 8px 82px;display:flex;flex-direction:column;gap:8px;overflow:auto;overscroll-behavior:contain;pointer-events:auto}
.agency-shell .opening[data-degraded-morning="portrait"] .morning-speech{position:static;flex:none;width:auto!important;padding:8px;font-size:14px;line-height:1.4;box-shadow:none;border:0;border-bottom:1px solid var(--line)}
.agency-shell .opening[data-degraded-morning="portrait"] .morning-speech strong{font-size:12px;line-height:inherit;margin:0 0 3px}
.agency-shell .opening[data-degraded-morning="portrait"] .morning-tails{display:none}
.agency-shell .opening[data-degraded-morning="portrait"] .opening-lockup{box-sizing:border-box;left:8px;right:8px;top:auto;bottom:8px;width:auto;max-width:none;display:flex;padding:8px;gap:8px;border:0;box-shadow:none;background:var(--paper)}
.agency-shell .opening[data-degraded-morning="portrait"] .title-day{font-size:24px}
.agency-shell .opening[data-degraded-morning="portrait"] .opening-actions .button{min-height:44px;font-size:14px;padding:8px;gap:8px}
