/* Phone-only usability adjustments; approved desktop composition is unchanged. */
@media(max-width:760px),(max-height:540px) and (orientation:landscape){
 #app,#app[data-mode]{min-height:0;height:100svh;height:100dvh}
 .header{padding-top:env(safe-area-inset-top);height:calc(68px + env(safe-area-inset-top));margin-left:max(5%,env(safe-area-inset-left));margin-right:max(5%,env(safe-area-inset-right))}
 .game{top:calc(68px + env(safe-area-inset-top));bottom:calc(32px + env(safe-area-inset-bottom))}
 .landing,.career-deck{top:calc(68px + env(safe-area-inset-top))}
 .game-bottom{left:max(6%,env(safe-area-inset-left));right:max(6%,env(safe-area-inset-right))}
 .footer{bottom:env(safe-area-inset-bottom)}
 .touch-controls{touch-action:none;-webkit-user-select:none;-webkit-touch-callout:none}
 .career-deck,#classic-dialog{touch-action:pan-y;overscroll-behavior:contain}
 .deck-bottom{padding-bottom:calc(10px + env(safe-area-inset-bottom))}
 #classic-dialog .classic-top{padding-top:env(safe-area-inset-top);height:calc(62px + env(safe-area-inset-top))}
 #classic-content{padding-bottom:env(safe-area-inset-bottom)}
 .cv-contact-links a,.cv-actions a{min-height:44px;display:inline-flex;align-items:center}
 .mountain-actions a,.mountain-actions button,.mountain-secondary button{min-height:44px}
 .career-mountain .mountain-cta{padding-bottom:calc(40px + env(safe-area-inset-bottom))}
 .next-level.career-mountain{top:calc(68px + env(safe-area-inset-top))}
}
@media(max-height:540px) and (orientation:landscape){
 .header{height:calc(56px + env(safe-area-inset-top))}
 .landing,.career-deck,.game,.next-level.career-mountain{top:calc(56px + env(safe-area-inset-top))}
 .game{bottom:calc(22px + env(safe-area-inset-bottom))}
 .deck-layout{display:flex;flex-direction:column;align-items:center;gap:20px;margin:16px auto 0;padding:0 max(24px,env(safe-area-inset-left)) 30px;width:100%;max-width:680px}
 .deck-table{transform:none!important;left:0;margin:16px auto 0;flex-shrink:0}
 .deck-horizon{width:100%;padding:0;margin-top:16px;align-self:stretch}
 .career-story{padding:0;border:0;background:none}
 .career-story p{font-size:18px}.career-story li{font-size:16px}
 .deck-bottom-note{display:none}.deck-bottom>div{width:100%;justify-content:space-between}
 #classic-content .cv-position p:not(.cv-dates),#classic-content .cv-position li{font-size:17px}
 .cv-experience{display:block}.cv-section-heading{position:static;margin-bottom:30px}
}

/* Short-screen reveals own the viewport; reading chrome must never cover a card. */
@media(max-height:540px) and (orientation:landscape){
 #app[data-mode="reveal"]>.header,#app[data-mode="reveal"]>.footer{display:none}
 #app[data-mode="reveal"] .career-deck{inset:0;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);backdrop-filter:none}
 .career-deck .deck-topline{position:relative;top:auto;min-height:44px;padding:0 max(24px,env(safe-area-inset-right));background:#091914}
 .career-deck .deck-topline button{min-height:44px}
 .career-deck .deck-bottom{position:relative;bottom:auto;margin:0;min-height:64px;background:#091914;padding:10px max(24px,env(safe-area-inset-right))}
 .career-deck .deck-layout{margin:0 auto;padding-top:0;gap:10px;min-height:0}
 .career-deck .deck-narrative{min-height:24px;height:24px}
 .career-deck .deck-narrative>.eyebrow{font-size:10px;margin:0}
 .career-deck .deck-table{margin-top:8px}
 .career-deck:is([data-phase="impact"],[data-phase="shuffle"],[data-phase="draw"],[data-phase="flip"]) .deck-layout{height:calc(100dvh - 108px);overflow:visible}
 .career-deck:is([data-phase="impact"],[data-phase="shuffle"],[data-phase="draw"],[data-phase="flip"]) .deck-table{transform:scale(.42)!important;transform-origin:top center;margin-top:0}
 .career-deck:is([data-phase="impact"],[data-phase="shuffle"],[data-phase="draw"],[data-phase="flip"]) .deck-horizon{display:none}
}

/* Phone finale: celebrate the summit, then place the invitation before the map. */
@media(max-width:600px) and (orientation:portrait),(max-height:540px) and (orientation:landscape){
 .next-level.career-mountain{display:flex;flex-direction:column;overflow-y:auto;scroll-behavior:auto}
 .next-level.career-mountain[hidden]{display:none}
 .career-mountain>.mountain-heading,.career-mountain>.mountain-scene,.career-mountain>.mountain-cta{flex-shrink:0}
 .career-mountain[data-phase="cta"]>.mountain-cta{order:-1}
 .career-mountain[data-phase="cta"]>.mountain-scene{order:1}
}
@media(max-height:540px) and (orientation:landscape){
 .career-deck:is([data-phase="impact"],[data-phase="shuffle"],[data-phase="draw"],[data-phase="flip"]) .deck-bottom{display:none}
 .career-deck:is([data-phase="impact"],[data-phase="shuffle"],[data-phase="draw"],[data-phase="flip"]) .deck-narrative{display:none}
 .career-deck:is([data-phase="impact"],[data-phase="shuffle"],[data-phase="draw"],[data-phase="flip"]) .deck-layout{height:calc(100dvh - 44px);padding-top:12px}
 #app[data-mode="complete"]>.header,#app[data-mode="complete"]>.footer{display:none}
 #app[data-mode="complete"] .career-mountain{inset:0;padding-top:env(safe-area-inset-top)}
 .career-mountain>.mountain-scene{height:calc(100dvh - env(safe-area-inset-top));min-height:300px;margin-top:0;aspect-ratio:auto}
 .career-mountain .mountain-heading{top:12px;left:max(24px,env(safe-area-inset-left))}
 .career-mountain .mountain-heading h2{font-size:20px;line-height:1.15}
 .career-mountain .mountain-heading .eyebrow{font-size:8px;margin-bottom:5px}
 .career-mountain .mountain-heading button{top:74px;min-height:44px}
 .career-mountain .mountain-readout{display:none}
 .career-mountain .mountain-cta{padding-top:20px}
 .career-mountain .mountain-cta-inner{max-width:none;display:grid;grid-template-columns:1fr 1fr;gap:8px 26px}
 .career-mountain .mountain-cta .eyebrow{grid-column:1;margin:0;font-size:10px}
 .career-mountain .mountain-cta h1{grid-column:1;grid-row:2/5;margin:0;font-size:29px}
 .career-mountain .cta-invitation{grid-column:2;grid-row:1;margin:0}
 .career-mountain .mountain-availability{grid-column:2;grid-row:2;margin:0;font-size:13px}
 .career-mountain .mountain-actions{grid-column:2;grid-row:3/5;gap:4px 18px}
 .career-mountain .mountain-secondary{grid-column:1/-1;margin:0}
}

@media(max-height:540px) and (orientation:landscape){.career-mountain .mountain-stop[data-stop="7"] .mountain-lockup{bottom:auto;top:28px;left:-25px}}
