.career-growth-panel{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.85rem 1.1rem;margin:.7rem 0;border:1px solid #75654b;background:#211f1b;color:#eee4ce;border-radius:10px}.career-growth-panel[hidden]{display:none}.career-growth-panel p{margin:.25rem 0;font-size:.9rem;color:#c9c0aa}.career-growth-panel strong{color:#e3c586}.career-growth-dialog{width:min(1020px,calc(100vw - 28px));max-height:88dvh;overflow:auto;background:#211f1b;color:#eee4ce;border:1px solid #a58b5b;border-radius:12px;padding:1.3rem}.career-growth-dialog::backdrop{background:#090c0de6}.career-growth-dialog header{display:flex;justify-content:space-between;align-items:start;gap:1rem}.career-growth-dialog h2{margin:.3rem 0}.career-growth-dialog small,.career-choice-card>span{color:#cab68b}.career-choice-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin:1rem 0}.career-choice-card{display:flex;flex-direction:column;background:#302c25;border:1px solid #6c604b;border-radius:8px;padding:1rem;min-width:0}.career-choice-card h3{color:#e6c98b;margin:.5rem 0}.career-choice-card p{line-height:1.7;white-space:pre-line;overflow-wrap:anywhere;flex:1}.career-choice-card button{min-height:44px;white-space:normal}.career-growth-dialog button:focus-visible{outline:3px solid #e5c88d;outline-offset:3px}.career-growth-dialog #career-choice-error{color:#f2a49a}.career-growth-dialog details{border-top:1px solid #6c604b;padding-top:1rem}.career-growth-dialog details p{color:#c9c0aa;line-height:1.6}.career-trial-strip{padding:.8rem 1rem;border:1px solid #74634b;background:#24211b;border-radius:8px;display:flex;justify-content:space-between;gap:1rem}.career-trial-strip p{margin:.3rem 0;color:#c9c0aa}.career-trial-strip button{min-height:44px}.career-growth-active #career-mode-toggle{margin-bottom:.8rem}.career-trial #matches-link,.career-trial #logout-button{display:none!important}@media(max-width:700px){.career-choice-cards{grid-template-columns:1fr}.career-growth-dialog{padding:1rem;max-height:92dvh}.career-growth-panel{align-items:stretch;flex-direction:column}.career-growth-panel button{min-height:44px}.career-trial-strip{flex-direction:column}.career-growth-dialog header{position:sticky;top:-1rem;background:#211f1b;padding:.5rem 0;z-index:1}}
.career-combat-status{flex:1 0 100%;grid-column:1/-1;margin:.2rem 0;color:#d6c39b;font-size:.85rem;line-height:1.5}
/* 113: the dialog header remains reachable while reading every candidate. */
#career-growth-dialog.career-growth-dialog{box-sizing:border-box;width:min(1080px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border-radius:4px;background:linear-gradient(140deg,#303226,#17231d);box-shadow:0 24px 100px #000b;overflow:auto;overscroll-behavior:contain}
#career-growth-dialog.career-growth-dialog>header{position:sticky;top:0;z-index:5;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:18px 22px;border-bottom:1px solid #8d7956;background:#222c23fa;box-shadow:0 4px 12px #0003}
#career-growth-dialog h2{font:500 26px/1.4 Georgia,'STSong',serif;color:#f0dfb5;margin:5px 0 0}
#career-growth-dialog header small{font-size:13px;line-height:1.5;letter-spacing:.12em}
#career-growth-dialog #career-defer{min-height:44px;max-width:170px;padding:9px 14px;font-size:15px;line-height:1.5;white-space:normal;border:1px solid #a78e61;background:#353a2b}
#career-growth-dialog>:is(p,details){margin:16px 22px;font-size:15px;line-height:1.7}
#career-growth-dialog #career-choice-error:empty{display:none}
#career-growth-dialog .career-choice-cards{gap:16px;margin:20px 22px 24px}
#career-growth-dialog .career-choice-cards:empty{display:none}
#career-growth-dialog .career-choice-card{position:relative;gap:9px;padding:20px;min-height:270px;border-radius:3px;border:1px solid #807050;border-top:3px solid #c1a367;background:linear-gradient(150deg,#3c392b,#1c2a22)}
#career-growth-dialog .career-choice-card>span{font-size:13px;line-height:1.5;letter-spacing:.06em;color:#c9c09e}
#career-growth-dialog .career-choice-card h3{font-size:23px;line-height:1.4;color:#f0d8a0;margin:3px 0 5px}
#career-growth-dialog .career-choice-card p{font-size:16px;line-height:1.8;margin:0 0 12px;word-break:normal;overflow-wrap:break-word}
#career-growth-dialog .career-choice-card button{width:100%;margin-top:auto;padding:12px;font-size:16px;line-height:1.5;text-align:center;background:linear-gradient(110deg,#76603a,#414f31);border:1px solid #c4a86c}
#career-growth-dialog .career-choice-card:focus-within{border-color:#f1d18b;box-shadow:0 0 0 1px #f1d18b}
#career-growth-dialog #career-learned{padding:16px 0;margin-bottom:22px}
#career-growth-dialog #career-learned summary{cursor:pointer;color:#dfc58b}
#career-growth-dialog #career-learned-list article{padding:12px 0;border-bottom:1px solid #6e634744}
@media(max-width:800px){#career-growth-dialog .career-choice-cards{grid-template-columns:1fr;margin:14px}#career-growth-dialog.career-growth-dialog>header{padding:14px;gap:10px}#career-growth-dialog h2{font-size:22px}#career-growth-dialog>:is(p,details){margin:14px}#career-growth-dialog .career-choice-card{min-height:0;padding:18px}#career-growth-dialog #career-defer{max-width:135px;padding:8px 10px}}
#career-growth-dialog .career-choice-cards{grid-template-columns:repeat(var(--career-card-count,3),minmax(0,1fr))}
@media(max-width:800px){#career-growth-dialog .career-choice-cards{grid-template-columns:1fr}}
/* Career action details are projected instructions; keep every action reachable. */
body.career-growth-active #event-scene#event-scene.combat-scene{height:auto!important;min-height:560px!important}
body.career-growth-active #event-scene#event-scene.combat-scene .event-scene-copy{max-height:none;overflow:visible}
body.career-growth-active #event-scene#event-scene.combat-scene #combat-panel{max-height:44dvh;overflow:auto;overscroll-behavior:contain}
body.career-growth-active #event-scene#event-scene.combat-scene #path-combat-actions>button small{display:block!important;margin-top:5px;text-align:left;white-space:normal}
/* Reveal the scene within its own bounds: a translated, invisible overlay widened mobile pages. */
#event-scene.scene-entering::after{opacity:0;transform:none;animation-name:scene-wipe-contained-115}
@keyframes scene-wipe-contained-115{from{opacity:1;clip-path:inset(0);transform:none}to{opacity:0;clip-path:inset(0 0 0 100%);transform:none}}

/* 116: brief decisions, complete rules on demand, full-width battle. */
#career-growth-dialog .career-choice-card{min-height:220px;gap:8px}
#career-growth-dialog .career-choice-card .career-brief{flex:0;margin-bottom:4px;line-height:1.65}
#career-growth-dialog .career-skill-details{padding:8px 0;border-top:1px solid #796a4944;margin:0 0 8px}
#career-growth-dialog .career-skill-details summary{cursor:pointer;color:#d6c090;font-size:14px;min-height:30px;display:list-item}
#career-growth-dialog .career-skill-details p{font-size:14px;line-height:1.7;margin:10px 0;flex:none}
.career-action-details{flex:1 0 100%;grid-column:1/-1;border-top:1px solid #75654b;padding:8px 2px}
.career-action-details summary{cursor:pointer;color:#d6c090;min-height:28px}
.career-action-details p{font-size:14px;line-height:1.65;margin:8px 0}
body.career-growth-active:has(#event-scene.combat-scene:not([hidden])){height:auto;overflow-y:auto}
body.career-growth-active:has(#event-scene.combat-scene:not([hidden])) main.app-shell{height:auto!important;min-height:calc(100dvh - 24px)}
body.career-growth-active #map-stage-page:has(#event-scene.combat-scene:not([hidden])){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto auto!important;flex:none}
body.career-growth-active #event-scene#event-scene.combat-scene{grid-column:1/-1!important;width:100%;min-width:0;min-height:0!important;height:auto!important}
body.career-growth-active #event-scene#event-scene.combat-scene .battle-stage{width:100%;height:clamp(360px,48vh,560px)!important;min-height:360px!important;flex:none}
body.career-growth-active #event-scene#event-scene.combat-scene #combat-panel{max-height:none;overflow:visible}
body.career-growth-active #event-scene#event-scene.combat-scene #path-combat-actions>button{flex:1 1 190px;font-size:14px;min-height:48px}
body.career-growth-active #map-stage-page:has(#event-scene.combat-scene:not([hidden])) #ai-observation{grid-column:1/-1!important;grid-row:4!important;width:100%;max-height:none}
body.career-growth-active:has(#event-scene.combat-scene:not([hidden])) .career-growth-panel{padding:8px 14px;margin:0;gap:10px;flex-direction:row;align-items:center}
body.career-growth-active:has(#event-scene.combat-scene:not([hidden])) #career-status{display:none}
@media(max-width:800px){#career-growth-dialog .career-choice-card{min-height:0;padding:16px}body.career-growth-active #event-scene#event-scene.combat-scene .battle-stage{height:340px!important;min-height:340px!important}body.career-growth-active #map-stage-page:has(#event-scene.combat-scene:not([hidden])){display:flex!important;flex-direction:column}body.career-growth-active #map-stage-page:has(#event-scene.combat-scene:not([hidden])) #ai-observation{order:10}}

/* 117: AI controls in one header button; the primary battle stays in the viewport. */
#ai-observation{display:none!important}
#ai-observation-button[hidden]{display:none!important}
#ai-observation-menu{position:fixed;inset:64px 18px auto auto;margin:0;width:240px;max-width:calc(100vw - 36px);box-sizing:border-box;padding:16px;background:#202b22;color:#eee4ce;border:1px solid #a58b5b;box-shadow:0 10px 40px #0009}
#ai-observation-menu label{display:block;margin-bottom:10px}
#ai-observation-menu select,#ai-observation-menu button{width:100%;min-height:38px;margin:4px 0;font-size:14px}
body.experience-live #map-stage-page{grid-template-columns:minmax(0,1fr)!important}
@media(min-width:900px) and (min-height:600px){
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])):not(.intro-101){height:100dvh!important;min-height:0!important;overflow:hidden!important;display:flow-root!important;padding:0!important;margin:0!important}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) main.app-shell{display:flex!important;flex-direction:column!important;width:calc(100% - 24px);height:calc(100dvh - 16px)!important;min-height:0!important;margin:8px auto!important;gap:4px}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #game-panel:not([hidden]){display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;gap:4px}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) .hero-header{position:relative;box-sizing:border-box;margin:0!important;min-height:38px!important;height:38px!important;padding:2px 10px!important;flex:none}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) .hero-header .header-actions{gap:4px!important;flex-wrap:nowrap!important}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) .hero-header button,body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) .hero-header .button-link{font-size:12px!important;padding:5px 8px!important;min-height:30px!important}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) .career-growth-panel{display:none!important}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) .session-bar{height:30px;min-height:30px}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #map-stage-page:has(#event-scene.combat-scene:not([hidden])){display:grid!important;flex:1 1 0!important;min-height:0!important;grid-template-rows:28px 54px minmax(0,1fr)!important;padding:6px!important;gap:4px}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #event-scene#event-scene.combat-scene{height:100%!important;min-height:0!important;display:flex!important;flex-direction:column;overflow:hidden}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #event-scene#event-scene.combat-scene .battle-stage{height:auto!important;min-height:200px!important;flex:1 1 0!important}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #event-scene#event-scene.combat-scene .battle-party,body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #event-scene#event-scene.combat-scene .battle-enemy{height:min(78%,310px)!important;bottom:18px}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #event-scene#event-scene.combat-scene .event-scene-copy{flex:none;min-height:0!important;max-height:min(190px,29dvh);overflow:auto}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #event-scene#event-scene.combat-scene #combat-panel{padding:6px 10px!important;gap:4px;max-height:none;overflow:visible}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #event-scene#event-scene.combat-scene :is(.combat-actions,#path-combat-actions){gap:5px}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #event-scene#event-scene.combat-scene :is(.combat-actions,#path-combat-actions)>button{flex:1 1 130px;min-width:105px;min-height:34px!important;padding:5px 8px!important;font-size:13px!important;line-height:1.4}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #event-scene#event-scene.combat-scene #path-combat-actions>button small{display:none!important}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) .career-action-details{padding:3px 0}.battle-fit-117 .career-action-details summary{min-height:22px;font-size:13px}
 body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #event-scene .combat-tools>summary{padding:2px 0}
}

@media(min-width:900px) and (min-height:600px){
 body.battle-fit-117 .hero-header{display:flex!important;align-items:center!important;justify-content:space-between!important}
 body.battle-fit-117 .brand-lockup{display:flex;align-items:center;gap:8px!important}
 body.battle-fit-117 .brand-mark{width:28px!important;height:30px!important;font-size:21px!important;box-shadow:none}
 body.battle-fit-117 .hero-header h1{font-size:19px!important;line-height:1.2!important;letter-spacing:2px!important;margin:0!important}
 body.battle-fit-117 .hero-header :is(.eyebrow,.brand-subtitle){display:none!important}
 body.battle-fit-117 .hero-header .header-actions{display:flex;align-items:center;flex-direction:row!important;margin:0!important}
 body.battle-fit-117 #connection-status{font-size:11px;margin:0}
 body.battle-fit-117 .session-bar{padding:3px 10px!important;margin:0!important;box-sizing:border-box;flex:none;font-size:12px}
 body.battle-fit-117 .session-bar .panel-kicker,body.battle-fit-117 .turn-copy .panel-kicker{display:none!important}
 body.battle-fit-117 .session-bar button{padding:4px 10px!important;font-size:12px}
 body.battle-fit-117 #map-stage-page>.turn-bar{grid-column:1/-1;grid-row:1;min-height:0;padding:3px 8px!important;box-sizing:border-box}
 body.battle-fit-117 #player-stats{grid-column:1/-1;grid-row:2;margin:0!important;gap:6px!important;min-height:0}
 body.battle-fit-117 #player-stats .player-stat{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;padding:5px 9px!important;gap:2px 8px!important;align-items:center;min-width:0;overflow:visible}
 body.battle-fit-117 #player-stats .player-stat>strong,body.battle-fit-117 #player-stats .stat-core{grid-column:1;font-size:12px!important;line-height:1.4;margin:0}
 body.battle-fit-117 #player-stats .player-extended{grid-column:2;grid-row:1/3;align-self:center}
 body.battle-fit-117 #player-stats .stat-track{display:none}
 body.battle-fit-117 #event-scene.combat-scene .battle-party{width:43%;left:3%}
 body.battle-fit-117 #event-scene.combat-scene .battle-enemy{width:29%;right:6%}
 body.battle-fit-117 #event-scene.combat-scene .enemy-hud{top:12px;right:3%;width:38%;font-size:11px}
 body.battle-fit-117 #event-scene.combat-scene .enemy-hud h3{font-size:17px;margin:0}
 body.battle-fit-117 #event-scene.combat-scene .enemy-intent{font-size:12px;margin:4px 0}
}

/* 121: a deliberate choice, with readable effects and an explicit confirmation. Modal only. */
#career-growth-dialog.career-growth-dialog[open]{display:flex;flex-direction:column;width:min(1120px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:hidden;border:1px solid #9d875f;border-radius:3px;background:radial-gradient(ellipse at 5% 0%,#68604744,transparent 65%),linear-gradient(145deg,#2d3227,#15231d 80%);box-shadow:0 24px 100px #000c}
#career-growth-dialog.career-growth-dialog>header{flex:none;position:relative;top:auto;padding:20px 26px;background:#202d25e8;border-bottom:1px solid #a5926555;box-shadow:none}
#career-growth-dialog header small{color:#bcbba0;letter-spacing:.14em;font-size:12px}
#career-growth-dialog h2{font:500 28px/1.4 Georgia,'STSong',serif;letter-spacing:.06em;margin:5px 0 0;color:#efdfb9}
#career-growth-dialog #career-defer{background:transparent;border:1px solid #8b866255;color:#d7d4bb;font-size:14px;max-width:none}
#career-growth-dialog .career-choice-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px 26px 20px;scrollbar-color:#8e7b50 #1a281f}
#career-growth-dialog #career-choice-hint{font-size:14px;line-height:1.75;color:#c0c5ae;margin:0 0 18px}
#career-growth-dialog #career-choice-error{font-size:14px;line-height:1.6;margin:0 0 14px}
#career-growth-dialog .career-choice-cards{margin:0;gap:16px;align-items:stretch}
#career-growth-dialog .career-choice-card{--card-ink:#d9b575;--card-shade:#746040;position:relative;gap:8px;padding:22px 20px 18px;min-height:290px;border:1px solid #7c775a66;border-top:1px solid #a4986d77;border-radius:2px;background:radial-gradient(ellipse at 20% 0%,#87704426,transparent 70%),linear-gradient(150deg,#34392b,#1b2c23);box-shadow:inset 0 0 40px #080e091c;transition:background .15s,border-color .15s}
#career-growth-dialog .career-choice-card[data-role=support]{--card-ink:#a6c4af;--card-shade:#405e50;background:radial-gradient(ellipse at 20% 0%,#5f8a7322,transparent 70%),linear-gradient(150deg,#2c392e,#172b25)}
#career-growth-dialog .career-card-mark{display:flex;align-items:center;justify-content:space-between;min-height:54px;color:var(--card-ink);margin-bottom:8px}
#career-growth-dialog .career-card-mark svg{width:48px;height:48px;stroke:currentColor;stroke-width:1.5}
#career-growth-dialog .career-card-mark span{font:italic 32px/1 Georgia,serif;opacity:.45}
#career-growth-dialog .career-choice-card .career-card-category{color:var(--card-ink);font-size:12px;letter-spacing:.12em}
#career-growth-dialog .career-choice-card h3{font:500 24px/1.4 Georgia,'STSong',serif;margin:2px 0 4px;color:#f0dfb9;overflow-wrap:anywhere}
#career-growth-dialog .career-choice-card .career-brief{font-size:16px;line-height:1.8;color:#d7d8bf;margin:0;flex:1}
#career-growth-dialog .career-skill-details{margin:12px 0 0;padding:10px 0 0;border-top:1px solid #b3a16e33}
#career-growth-dialog .career-skill-details summary{min-height:32px;font-size:13px;line-height:1.7;color:#b9bfa8;cursor:pointer}
#career-growth-dialog .career-skill-details p{font-size:14px;line-height:1.85;color:#d2d4bd;margin:10px 0 16px;white-space:pre-line}
#career-growth-dialog .career-choice-card button{font-size:14px;min-height:42px;padding:9px 12px;margin-top:2px;background:#1a2b22;border:1px solid #8d896466;color:#d7d5bb}
#career-growth-dialog .career-choice-card.is-selected{border-color:#e0bf7b;background:radial-gradient(ellipse at 0% 0%,#d3ac4940,transparent 80%),linear-gradient(150deg,#3e4531,#253b2a);box-shadow:inset 0 0 0 1px #c2a76855}
#career-growth-dialog .career-choice-card.is-selected button{color:#f8e6b3;border-color:#c7a66a;background:#66573566}
#career-growth-dialog #career-learned{margin:22px 0 0;padding:16px 0 0;border-top:1px solid #b5a47733;font-size:14px;line-height:1.7}
#career-growth-dialog #career-learned summary{cursor:pointer;color:#c4c7ae}
#career-growth-dialog #career-choice-footer{flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 26px;border-top:1px solid #9f8d5b66;background:#19271ff5}
#career-growth-dialog #career-choice-footer[hidden]{display:none}
#career-growth-dialog #career-choice-footer>div{min-width:0;display:flex;flex-direction:column;gap:4px}
#career-growth-dialog #career-choice-footer small{font-size:12px;color:#afb79e}
#career-growth-dialog #career-selected-name{font-size:16px;line-height:1.5;color:#e3d5af;overflow-wrap:anywhere}
#career-growth-dialog #career-confirm{flex:none;min-width:180px;min-height:46px;font-size:16px;padding:10px 20px;border:1px solid #c3a86c;background:linear-gradient(110deg,#78633a,#495b35);color:#f8edcd}
#career-growth-dialog #career-confirm:disabled{opacity:.45;cursor:default}
@media(max-width:800px){
 #career-growth-dialog.career-growth-dialog[open]{width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}
 #career-growth-dialog.career-growth-dialog>header{padding:14px 16px;gap:8px}
 #career-growth-dialog h2{font-size:22px}
 #career-growth-dialog header small{font-size:11px;letter-spacing:.04em}
 #career-growth-dialog #career-defer{font-size:13px;max-width:108px}
 #career-growth-dialog .career-choice-body{padding:16px}
 #career-growth-dialog .career-choice-cards{grid-template-columns:1fr;gap:12px}
 #career-growth-dialog .career-choice-card{min-height:0;padding:16px}
 #career-growth-dialog .career-card-mark{min-height:32px;margin:0}
 #career-growth-dialog .career-card-mark svg{width:32px;height:32px}
 #career-growth-dialog .career-choice-card h3{font-size:22px}
 #career-growth-dialog #career-choice-footer{padding:12px 16px;gap:10px}
 #career-growth-dialog #career-confirm{min-width:120px;padding:10px 12px;font-size:15px}
 #career-growth-dialog #career-selected-name{font-size:14px}
}
@media(prefers-reduced-motion:reduce){#career-growth-dialog .career-choice-card{transition:none}}
#career-companion-choice:not([hidden]) { display:inline-flex; align-items:center; gap:8px; margin:6px 10px; color:var(--text,#dfdbc8); }
#career-companion-select { min-width:130px; max-width:100%; padding:7px 10px; }
