/* Advisor dialogues replace the top instruction row without resizing the game scene. */
.journey-advisor-layer { position:fixed; inset:0; z-index:1200; display:flex; align-items:flex-end; justify-content:flex-end; padding:clamp(20px,4vw,64px); background:#010710b3; box-sizing:border-box; }
.journey-coach.advisor-dialog { width:min(1040px,100%); margin:0; max-height:calc(100dvh - 40px); color:#e8f6fc; filter:drop-shadow(0 16px 22px #0009); }
.advisor-dialog > .tc-cut-body { display:grid; grid-template-columns:32% minmax(0,1fr); gap:0; padding:0; min-height:350px; }
.advisor-dialog > .tc-cut-glass { background:linear-gradient(115deg,#071b29fa,#04101afc); }
.journey-advisor-portrait { align-self:stretch; min-width:0; position:relative; margin:18px 0 12px 14px; }
.journey-advisor-portrait img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; object-position:center bottom; }
.advisor-dialog .journey-coach-copy { align-self:center; padding:38px 40px 30px 24px; }
.advisor-eyebrow { display:block; font-size:12px; font-weight:800; letter-spacing:.12em; color:#7cdbef; }
.advisor-dialog h2 { margin:18px 0; font-size:clamp(24px,2.2vw,34px); line-height:1.15; color:#f0fbff; }
.advisor-dialog p { margin:0; font-size:17px; line-height:1.6; color:#daeaf2; }
.advisor-dialog-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px 22px; margin-top:26px; }
.advisor-dialog .journey-continue.learning-cut-action { width:min(300px,100%); min-height:46px; height:48px; font:700 15px/1.2 system-ui,sans-serif; }
.advisor-look-around { border:0; background:none; padding:8px 0; color:#a9c5d3; font:14px/1.4 system-ui,sans-serif; text-decoration:underline; cursor:pointer; }
.advisor-progress { display:block; margin-top:20px; color:#8aabbc; font-size:12px; letter-spacing:.13em; }
.advisor-reopen { position:fixed; bottom:18px; right:22px; z-index:150; padding:12px 20px; border:1px solid #4192a8; color:#d5f2fc; background:linear-gradient(#163445,#07141f); font:700 14px/1.3 system-ui,sans-serif; clip-path:polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px); cursor:pointer; box-shadow:0 6px 20px #0009; }
/* The welcome illustration lives INSIDE one frame. No rectangular shadow/backplate outside it. */
.training-welcome { min-height:100dvh; padding:clamp(20px,4vw,70px); justify-content:center; width:100%; max-width:none; margin:0; background:url('assets/ui/hq/city-loop-poster.jpg') center/cover no-repeat; }
.training-welcome-panel { width:min(1000px,100%); filter:none; background:none; box-shadow:none; border:0; }
.training-welcome-panel > .tc-cut-body { display:grid; grid-template-columns:34% minmax(0,1fr); gap:0; padding:0; min-height:480px; }
.training-welcome-panel > .tc-cut-glass { background:linear-gradient(110deg,#091e2af8,#030d18fa); }
.learning-welcome-portrait { position:relative; min-width:0; margin:24px 0 14px 18px; }
.learning-welcome-portrait img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; object-position:center bottom; }
.learning-welcome-copy { padding:46px 40px 38px 20px; align-self:center; }
.learning-advisor-head { padding-bottom:14px; }
.training-welcome h1 { font-size:clamp(28px,3vw,40px); }
.training-welcome .learning-welcome-copy > p { font-size:18px; line-height:1.6; color:#d7eaf3; margin-bottom:26px; }
.training-welcome .training-welcome-start { height:50px; min-height:50px; font-size:16px; }
.bv2 .bv2-guide-face { background:#071522 url('assets/ui/training/advisor-portrait-v2.png') center top / contain no-repeat; height:135px; clip-path:none; box-shadow:none; }
/* Slim controls: text centered in the entire button, independent of the advisor's outer grid. */
.bv2 .bv2-guide .bv2-gbtn.learning-cut-action { height:40px; min-height:40px; margin:0; }
.bv2 .bv2-guide .bv2-gbtn.learning-cut-action > .tc-cut-body { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; grid-template-columns:none; gap:0; padding:0 8px; white-space:nowrap; line-height:1; }
.bv2 .bv2-guide .bv2-guide-btns { justify-content:flex-start; align-items:center; gap:10px; }
.bv2 .bv2-guide .tc-cut-body .bv2-guide-face { background-color:transparent; }
@media (min-width:768px) {
  .bv3.is-learning .bv3-guide .bv2-gbtn.learning-cut-action { width:132px; height:max(38px,calc(28px / var(--bv2s,1))); font-size:max(13px,calc(11px / var(--bv2s,1))); }
}
/* Keep the desktop city in one viewport; do not enlarge both rows to fixed 212px. */
@media (min-width:1440px) {
  .desktop .city-hub { width:calc(100% - 32px); gap:14px; }
  .desktop .city-panorama { min-height:0; height:clamp(300px,calc((100dvh - 86 * var(--u)) * .49),440px); }
  .desktop .city-cards-row.wide { grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
  .desktop .city-cards-row.narrow { grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; }
  .desktop .city-card { height:clamp(140px,calc((100dvh - 86 * var(--u)) * .21),188px); }
  .desktop .city-title { width:min(42%,600px); }
  .desktop .city-title h1 { font-size:clamp(34px,2.3vw,44px); }
  .desktop .city-card-text { top:15px; left:52px; right:14px; gap:4px; }
  .desktop .city-card-text strong { font-size:16px; }
  .desktop .city-card-text em { font-size:13px; line-height:1.3; -webkit-line-clamp:2; }
  .desktop .city-card-go { min-height:32px; bottom:12px; font-size:12px; }
}
@media (max-width:767px) {
  .journey-advisor-layer { padding:12px; align-items:center; }
  .advisor-dialog > .tc-cut-body { grid-template-columns:90px minmax(0,1fr); min-height:0; }
  .journey-advisor-portrait { margin:18px 0 20px 8px; }
  .advisor-dialog .journey-coach-copy { padding:28px 24px 24px 12px; }
  .advisor-dialog h2 { font-size:24px; }
  .advisor-dialog p { font-size:15px; }
  .advisor-dialog .journey-continue.learning-cut-action { font-size:13px; }
  .training-welcome-panel > .tc-cut-body { grid-template-columns:1fr; min-height:0; }
  .learning-welcome-portrait { height:150px; margin:16px 20px 0; }
  .learning-welcome-copy { padding:16px 30px 30px; }
}
@media (max-height:650px) {
  .advisor-dialog > .tc-cut-body { min-height:0; }
  .advisor-dialog .journey-coach-copy { padding-block:26px; }
  .advisor-dialog h2 { margin-block:12px; }
  .advisor-dialog p { font-size:15px; line-height:1.45; }
  .advisor-dialog-actions { margin-top:18px; }
  .advisor-progress { margin-top:12px; }
}

.app.desktop:has(.training-welcome) > main { background:none; }
/* Owner review: no image-search affordance on decorative portraits. */
.advisor-portrait-art { position:absolute; inset:0; display:block; background:url('assets/ui/training/advisor-portrait-v2.png') center bottom / contain no-repeat; pointer-events:none; }
.journey-advisor-layer { align-items:center; }
/* A reserved footer belongs to the layout; it cannot cover a game action. */
.app.desktop.has-journey-advisor { grid-template-rows:calc(86 * var(--u)) minmax(0,1fr) 56px; }
.app.desktop.has-journey-advisor > main { grid-row:2; height:100%; min-height:0; overflow:auto; }
.app.desktop.has-journey-advisor > nav { grid-row:2 / 4; height:100%; }
.advisor-dock { grid-column:2; grid-row:3; display:flex; align-items:center; justify-content:flex-end; padding:6px 20px; background:#05121deb; border-top:1px solid #275267; z-index:10; }
.advisor-dock .advisor-reopen { position:relative; bottom:auto; right:auto; box-shadow:none; padding:9px 20px; min-height:40px; }
.app.journey-first-steps > .advisor-dock { grid-column:1 / -1; }
@media (max-width:767px) {
  .advisor-dock { grid-column:1 / -1; grid-row:auto; }
  .has-journey-advisor > main { min-height:0; }
}
@media (min-width:768px) {
  .desktop .org-scene-status > .org-status-icon { left:18px; top:50%; width:26px; height:30px; transform:translateY(-50%); }
  .desktop .org-scene-status > div:not(.org-status-actions) { left:55px; width:calc(100% - 85px); }
  .desktop .org-scene-status.has-actions > div:not(.org-status-actions) { left:55px; width:calc(100% - 230px); }
}
@media (min-width:768px) and (max-width:1200px) {
  .desktop .org-scene-status.has-actions > div:not(.org-status-actions) { width:calc(100% - 215px); }
}

.advisor-inspection-label { margin-right:auto; color:#a6c2d0; font:13px/1.3 system-ui,sans-serif; }
.advisor-dock { gap:14px; }
/* Registration must grow with its content inside platform iframes: never clip Save. */
.app[data-route="BOOT"] .boot-screen-registration:not(.landing-screen) .boot-registration { width:min(390px,calc(100vw - 32px)); height:auto; aspect-ratio:auto; padding:44px 54px; max-height:calc(100dvh - 32px); overflow-y:auto; bottom:16px; }
.app[data-route="BOOT"] .boot-screen-registration:not(.landing-screen) .boot-registration-content { position:relative; inset:auto; padding:0; min-height:0; display:flex; flex-direction:column; gap:8px; overflow:visible; }
.app[data-route="BOOT"] .boot-screen-registration:not(.landing-screen) .boot-registration-content > * { flex-shrink:0; margin-block:0; }
.app[data-route="BOOT"] .boot-screen-registration:not(.landing-screen) .boot-registration-content h2 { font-size:20px; line-height:1.15; }
.app[data-route="BOOT"] .boot-screen-registration:not(.landing-screen) .boot-registration-content header p { font-size:12px; line-height:1.35; }
.app[data-route="BOOT"] .boot-screen-registration:not(.landing-screen) .boot-registration-content label > span { font-size:12px; }
.app[data-route="BOOT"] .boot-screen-registration:not(.landing-screen) .boot-registration-content input { height:44px; font-size:16px; }
.app[data-route="BOOT"] .boot-screen-registration:not(.landing-screen) .boot-registration-submit { min-height:44px; font-size:14px; margin-top:8px; }
