:where([hidden]){display:none!important}
.v45-journey-bar{display:grid;grid-template-columns:64px minmax(180px,1fr) auto auto;gap:12px;align-items:center;margin:12px 0 18px;padding:10px 12px;border:1px solid rgba(39,139,119,.28);border-radius:20px;background:linear-gradient(115deg,rgba(255,255,255,.96),rgba(228,251,244,.92));box-shadow:0 8px 24px rgba(12,63,60,.08)}
.v45-journey-face,.v45-recommendation-face{display:block;width:60px;height:60px;border-radius:18px;border:3px solid #fff;box-shadow:0 5px 14px rgba(15,54,60,.18)}
.v45-journey-bar>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 10px;min-width:0}.v45-journey-bar small{width:100%;font-size:.78rem;font-weight:900;letter-spacing:.1em;color:#298774}.v45-journey-bar b{font-size:1.12rem;color:#103b43}.v45-journey-bar span:not(.v45-journey-face){font-size:.92rem;color:#4d6870}
.v45-journey-bar button{min-height:46px;padding:9px 15px;border:1px solid #63bca9;border-radius:14px;background:#fff;color:#164b50;font:800 .92rem/1.2 inherit;cursor:pointer;box-shadow:0 3px 0 rgba(26,107,91,.16)}.v45-journey-bar button:last-child{background:#176f63;color:#fff;border-color:#176f63}.v45-journey-bar button:hover,.v45-journey-bar button:focus-visible{transform:translateY(-1px);box-shadow:0 5px 0 rgba(26,107,91,.18);outline:3px solid rgba(255,207,75,.65);outline-offset:2px}
.v45-crew-recommendations{margin:16px 0 22px;border:1px solid rgba(29,132,112,.3);border-radius:24px;background:rgba(255,255,255,.94);box-shadow:0 12px 30px rgba(13,73,71,.09);overflow:hidden}
.v45-recommendation-toggle{display:grid;width:100%;grid-template-columns:64px 1fr auto;gap:14px;align-items:center;padding:14px 18px;border:0;background:linear-gradient(100deg,#e8fff7,#fff8cf 58%,#ffe9f3);text-align:left;color:#133b43;cursor:pointer}.v45-recommendation-toggle>span:nth-child(2){display:grid;gap:3px}.v45-recommendation-toggle small{font-size:.78rem;font-weight:900;letter-spacing:.08em;color:#9a6531}.v45-recommendation-toggle b{font-size:1.28rem;line-height:1.25}.v45-recommendation-toggle em{font-size:.9rem;font-style:normal;color:#526a70}.v45-recommendation-toggle strong{display:flex;align-items:center;gap:8px;padding:10px 13px;border-radius:13px;background:#176f63;color:#fff;font-size:.9rem}.v45-recommendation-toggle i{font-size:1.25rem;font-style:normal}.v45-recommendation-toggle:focus-visible{outline:4px solid #ffd555;outline-offset:-4px}
.v45-recommendation-body{padding:18px}.v45-recommendation-count{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:13px}.v45-recommendation-count b{font-size:.9rem;letter-spacing:.08em;color:#176f63}.v45-recommendation-count span{font-size:.9rem;color:#60747a}
.v45-recommendation-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.v45-recommendation-card{display:flex;flex-direction:column;min-width:0;padding:15px;border:1px solid #c9e3dd;border-radius:18px;background:#fff;box-shadow:0 5px 15px rgba(15,63,66,.06)}.v45-recommendation-card header{display:flex;justify-content:space-between;gap:10px;align-items:center}.v45-recommendation-card header span{font-weight:950;color:#db725b}.v45-recommendation-card header small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#65767c}.v45-recommendation-card h3{margin:9px 0 7px;font-size:1.1rem;line-height:1.25;color:#153e47}.v45-recommendation-spec{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:10px}.v45-recommendation-spec span{padding:4px 7px;border-radius:999px;background:#edf8f5;color:#315c5c;font-size:.78rem;font-weight:800}.v45-recommendation-headline{color:#a04d61;font-size:.88rem}.v45-recommendation-card p{flex:1;margin:7px 0 13px;color:#465f65;font-size:.9rem;line-height:1.6}.v45-recommendation-card footer{display:grid;grid-template-columns:1fr 1fr;gap:7px}.v45-recommendation-card footer button,.v45-recommendation-more{min-height:44px;border:1px solid #4ea692;border-radius:12px;background:#fff;color:#175b53;font-weight:900;cursor:pointer}.v45-recommendation-card footer button:first-child{background:#16806f;color:#fff}.v45-recommendation-card footer button:focus-visible,.v45-recommendation-more:focus-visible{outline:3px solid #ffd454;outline-offset:2px}.v45-recommendation-more{display:block;margin:16px auto 0;padding:8px 24px;background:#143f47;color:#fff}
.v45-recommendation-close{display:block;min-height:48px;margin:10px auto 0;padding:9px 22px;border:1px solid #4ea692;border-radius:12px;background:#fff;color:#175b53;font-weight:900;cursor:pointer}.v45-recommendation-close:focus-visible{outline:3px solid #ffd454;outline-offset:2px}
.v45-model-specs{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.v45-model-specs span{padding:6px 9px;border:1px solid rgba(78,166,146,.42);border-radius:999px;background:#effaf6;color:#205c55;font-size:.82rem;font-weight:900}
@media(max-width:920px){.v45-recommendation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v45-journey-bar{grid-template-columns:58px minmax(150px,1fr) auto}.v45-journey-bar button:last-child{grid-column:2/4}}
@media(max-width:600px){html,body{max-width:100%;overflow-x:hidden}.mgx-route-bar{position:relative!important;top:auto!important}.screen{max-width:100%}.v45-journey-bar{grid-template-columns:54px 1fr;gap:9px;margin:8px 0 14px;padding:9px;border-radius:17px}.v45-journey-face{width:52px;height:52px;border-radius:15px}.v45-journey-bar>div{align-content:center}.v45-journey-bar button,.v45-journey-bar button:last-child{grid-column:auto;min-height:48px;width:100%;padding:8px 9px}.v45-journey-bar button:last-child{grid-column:1/3}.v45-recommendation-toggle{position:sticky;top:68px;z-index:4;grid-template-columns:54px 1fr;padding:12px;gap:10px;box-shadow:0 8px 18px rgba(13,73,71,.12)}.v45-recommendation-face{width:52px;height:52px;border-radius:15px}.v45-recommendation-toggle b{font-size:1.05rem}.v45-recommendation-toggle em{font-size:.84rem}.v45-recommendation-toggle strong{grid-column:1/3;justify-content:center;min-height:45px}.v45-recommendation-body{padding:12px}.v45-recommendation-count{align-items:flex-start;flex-direction:column}.v45-recommendation-grid{grid-template-columns:1fr}.v45-recommendation-card{padding:14px}.v45-recommendation-card h3{font-size:1.08rem}.v45-recommendation-card p{font-size:.92rem}.v45-recommendation-card footer{grid-template-columns:1fr}.v45-recommendation-card footer button{min-height:48px}}
@media(max-width:600px){.mgx-route-bar{margin-top:71px!important}.v45-journey-bar button{grid-column:1/3!important}}
@media(max-width:390px){.v45-journey-bar{margin-inline:-2px}.v45-journey-bar small{font-size:.72rem}.v45-journey-bar b{font-size:1rem}.v45-recommendation-toggle{padding:10px}.v45-recommendation-body{padding:10px}.v45-recommendation-card{border-radius:15px}}

/* v46: the upper strip identifies the chosen partner; all journey-changing
   actions live together in the bottom coach card. */
.v45-journey-bar{grid-template-columns:64px minmax(0,1fr)}
.crew-coach-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-width:230px}
.crew-coach-actions button{min-height:46px;padding:9px 12px;border:1px solid color-mix(in srgb,var(--member-color) 60%,#fff);border-radius:13px;color:#fff;background:transparent;cursor:pointer;font-size:.88rem!important;font-weight:900;line-height:1.2;white-space:nowrap}
.crew-coach-actions .crew-coach-more{grid-column:auto;justify-self:stretch}
.crew-coach-actions .crew-coach-wte{border-color:#fff2a8;color:#173f47;background:#fff2a8}
.crew-coach-actions button:focus-visible{outline:3px solid #ffd454;outline-offset:2px}

/* Large optional collections are painted only near the viewport. The content
   remains complete, while layout and image work stay bounded on long pages. */
.v45-recommendation-card,.scrap-card,.atlas-card,.fd-card{content-visibility:auto;contain-intrinsic-size:auto 280px}
#tour-nodes,#atlas-list,.v45-recommendation-grid,.scrapbook-grid{contain:layout paint style}
html[data-meguru-memory="compact"] .paper-noise{display:none}
html[data-meguru-memory="compact"] .confetti,
html[data-meguru-memory="compact"] .sparks,
html[data-meguru-memory="compact"] .ambient-orb{display:none!important}
html[data-meguru-memory="compact"] :where(.tour-node,.plant-monitor,.draft-visual)::before{animation:none!important}
html[data-meguru-memory="compact"] #tour-screen :where(.tour-atmosphere i,.map-scan,.dice.is-rolling){animation:none!important}
html[data-meguru-memory="compact"] #tour-screen :where(.world-board,.plant-passport,.v47-tour-command-row,.v45-recommendation-card){box-shadow:none!important}
html[data-meguru-memory="compact"] #tour-screen :where(.continent,#tour-route-lines .route-glow){filter:none!important}
html[data-meguru-memory="compact"] #tour-screen .tour-node,
html[data-meguru-memory="compact"] #tour-screen .tour-node::before{transition:none!important}
html[data-meguru-memory="compact"] #tour-screen .tour-node::before{box-shadow:0 0 0 2px #0b1014!important}
html[data-meguru-memory="compact"] #tour-screen .tour-node.is-current::before{box-shadow:0 0 0 3px #0b1014!important}
#tour-screen button{touch-action:manipulation}
button,a,[role="button"],summary{touch-action:manipulation}

/* Mobile and adaptive safe mode retain the information and colour system but
   remove compositor-heavy decoration.  These effects are optional; controls,
   scores and illustrations remain intact. */
@media(max-width:600px),(prefers-reduced-motion:reduce){
  :where(#design-screen,#build-screen,#operate-screen,#result-screen) :where(.draft-scan,.draft-callout,.plant-diagram::after,.model-runner button.is-next,.furnace-fire i,.turbine-wheel,.flow-arrow i,.workpiece.is-working){animation:none!important}
  :where(#design-screen,#build-screen,#operate-screen,#result-screen) :where(.draft-visual,.draft-plant-card,.plant-monitor,.op-module,.model-base,.score-board,.decision-overlay){backdrop-filter:none!important;filter:none!important}
  :where(#design-screen,#build-screen,#operate-screen,#result-screen) :where(.draft-card,.spec-row i,.level-meter i,.charge-unit i){transition-duration:.08s!important}
}
html[data-meguru-safe-mode="true"] :where(.screen,.guide-modal,.crew-modal,.facility-directory-modal) *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
html[data-meguru-safe-mode="true"] :where(.screen,.guide-modal,.crew-modal,.facility-directory-modal) :where(.paper-noise,.confetti,.sparks,.ambient-orb,.draft-scan,.draft-callout,.map-scan){display:none!important}
html[data-meguru-safe-mode="true"] :where(.screen,.guide-modal,.crew-modal,.facility-directory-modal) :where(.world-board,.plant-passport,.draft-plant-card,.draft-console,.model-kit-panel,.plant-monitor,.score-board,.decision-overlay){backdrop-filter:none!important;filter:none!important;box-shadow:none!important}

@media(max-width:820px){.crew-coach-actions{grid-column:2;min-width:0;width:100%}.crew-coach-actions button{white-space:normal}}
@media(max-width:600px){.v45-journey-bar{grid-template-columns:54px minmax(0,1fr)}.crew-coach-actions{grid-column:1/3;grid-template-columns:1fr 1fr}.crew-coach-actions button{min-height:48px}}
@media(max-width:390px){.crew-coach-actions{grid-template-columns:1fr}.crew-coach-actions button{width:100%;justify-self:stretch}}

/* Sixty glowing pseudo-elements can exhaust the paint budget on a phone even
   when the DOM stays constant. Keep visited/current state vivid with colour
   and borders, but remove the accumulating blur layers below 900 px. */
@media(max-width:900px),(pointer:coarse){
  #tour-screen .tour-node,#tour-screen .tour-node::before{transition:none!important}
  #tour-screen .tour-node::before{box-shadow:0 0 0 2px #0b1014!important}
  #tour-screen .tour-node.is-current::before{box-shadow:0 0 0 3px #0b1014!important}
}

/* v47: one two-row command dock replaces five repeated Tour menus. */
.v47-tour-command-dock{display:grid;gap:9px;margin:12px 0 18px;color:#113b45}
.v47-tour-command-row{position:relative;display:grid;grid-template-columns:58px minmax(210px,1fr) auto;gap:13px;align-items:center;min-height:78px;padding:10px 12px;overflow:hidden;border:1px solid rgba(91,215,190,.38);border-radius:19px;background:linear-gradient(105deg,rgba(232,255,247,.97),rgba(244,252,255,.96) 52%,rgba(255,248,217,.94));box-shadow:0 8px 22px rgba(7,45,55,.13)}
.v47-tour-command-row::after{position:absolute;right:-52px;width:150px;height:150px;border:26px solid rgba(86,217,191,.08);border-radius:50%;content:"";pointer-events:none}
.v47-tour-destination-row{border-color:rgba(255,207,75,.42);background:linear-gradient(105deg,rgba(255,249,221,.97),rgba(238,255,248,.96) 52%,rgba(255,235,244,.94))}
.v47-command-portrait,.v47-command-compass{position:relative;z-index:1;display:grid;place-items:center;width:54px;height:54px;border:2px solid #fff;border-radius:16px;box-shadow:0 5px 14px rgba(13,63,69,.16)}
.v47-command-portrait{padding:0;cursor:pointer}
.v47-command-compass{color:#fff;background:linear-gradient(145deg,#176f69,#36b996);font-size:1.55rem;font-weight:950}
.v47-command-copy{position:relative;z-index:1;display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 9px;min-width:0}
.v47-command-copy small{width:100%;color:#24836f;font-size:.76rem;font-weight:950;letter-spacing:.1em}
.v47-tour-destination-row .v47-command-copy small{color:#a16a1e}
.v47-command-copy b{overflow:hidden;color:#123d46;font-size:1.08rem;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.v47-command-copy span{color:#536f75;font-size:.86rem}
.v47-command-actions{position:relative;z-index:1;display:flex;justify-content:flex-end;gap:7px;min-width:0}
.v47-command-actions button{min-height:44px;padding:8px 13px;border:1px solid rgba(28,123,106,.48);border-radius:12px;color:#17594f;background:rgba(255,255,255,.9);box-shadow:0 3px 0 rgba(31,119,103,.14);cursor:pointer;font:900 .86rem/1.15 inherit;white-space:nowrap}
.v47-command-actions button:hover,.v47-command-actions button:focus-visible,.v47-command-actions button.is-active{color:#fff;background:#167563;border-color:#167563;transform:translateY(-1px);outline:3px solid rgba(255,211,84,.72);outline-offset:2px}
.v47-destination-actions button:first-child{color:#163f49;background:#fff0a8;border-color:#e5c85f}
.v47-destination-actions button:first-child:hover,.v47-destination-actions button:first-child:focus-visible{color:#163f49;background:#ffe46f}
.has-v47-tour-dock>#mgx-tour-story>summary,.has-v47-tour-dock>#mgx-tour-atlas>summary{display:none}
.has-v47-tour-dock>#mgx-tour-story[open],.has-v47-tour-dock>#mgx-tour-atlas[open]{margin-top:16px}
.v47-panel-close{position:sticky;top:88px;z-index:8;display:block;min-height:46px;margin:0 0 14px auto;padding:9px 16px;border:1px solid #5eab9b;border-radius:12px;color:#16584f;background:#fff;box-shadow:0 8px 22px rgba(12,58,61,.16);cursor:pointer;font-weight:900}
.v47-panel-close:hover,.v47-panel-close:focus-visible{color:#fff;background:#176f63;outline:3px solid #ffd454;outline-offset:2px}
#mgx-tour-story,#mgx-tour-atlas,#tour-crew-recommendations{scroll-margin-top:96px}
.v47-recommendation-heading{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:14px 18px;background:linear-gradient(100deg,#e8fff7,#fff8cf 58%,#ffe9f3)}
.v47-recommendation-heading div{display:grid;gap:3px}.v47-recommendation-heading small{color:#946128;font-size:.76rem;font-weight:950;letter-spacing:.09em}.v47-recommendation-heading b{color:#133b43;font-size:1.18rem}.v47-recommendation-heading button{min-height:44px;padding:8px 15px;border:0;border-radius:12px;color:#fff;background:#176f63;cursor:pointer;font-weight:900}
#tour-screen.has-v47-tour-dock>.crew-coach{display:none!important}

@media(max-width:900px){.v47-tour-command-row{grid-template-columns:54px minmax(0,1fr)}.v47-command-actions{grid-column:2;justify-content:flex-start;flex-wrap:wrap}.v47-command-actions button{flex:1 1 auto}.v47-command-copy b{white-space:normal}}
@media(max-width:600px){.v47-tour-command-dock{gap:8px;margin:8px 0 14px}.v47-tour-command-row{grid-template-columns:48px minmax(0,1fr);gap:9px;min-height:0;padding:10px;border-radius:16px}.v47-command-portrait,.v47-command-compass{width:46px;height:46px;border-radius:14px}.v47-command-copy small{font-size:.69rem}.v47-command-copy b{font-size:.98rem}.v47-command-copy span{width:100%;font-size:.8rem}.v47-command-actions{grid-column:1/3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.v47-destination-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.v47-command-actions button{min-height:48px;padding:8px 6px;white-space:normal}.v47-recommendation-heading{align-items:flex-start;padding:12px}.v47-recommendation-heading b{font-size:1.02rem}}
@media(max-width:390px){.v47-destination-actions{grid-template-columns:1fr 1fr}.v47-destination-actions button:first-child{grid-column:1/3}.v47-tour-command-row{margin-inline:-2px}.v47-command-copy span{display:none}}

/* v52: the old phone carousel placed section labels in the same flex row as
   topic cards. A narrow label could wrap to hundreds of pixels and stretch
   every card, producing the apparently blank/tall navigation seen at 390 px.
   Keep every choice visible in a bounded two-column grid instead. */
@media(max-width:620px){
  #learn-screen .learning-shell{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-auto-rows:max-content!important;align-items:start!important}
  #learn-screen .learning-topic-nav{position:static!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:max-content!important;align-content:start!important;align-items:start!important;gap:9px!important;width:100%!important;height:auto!important;min-height:0!important;overflow:visible!important;scroll-snap-type:none!important}
  #learn-screen .learning-topic-nav :where(.learning-discovery-meter,.learning-nav-label){grid-column:1/-1!important;width:auto!important;min-width:0!important}
  #learn-screen .learning-topic-nav button{align-self:start!important;flex:none!important;grid-template-columns:34px minmax(0,1fr)!important;grid-template-rows:auto!important;width:100%!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:68px!important;padding:8px!important;scroll-snap-align:none!important}
  #learn-screen .learning-topic-nav button>span{grid-row:1!important;width:30px!important;height:30px!important}
  #learn-screen .learning-topic-nav button small{display:none!important}
  #learn-screen .learning-topic-nav button::after{right:6px!important}
  #learn-screen .learning-topic-nav .learning-nav-label{margin-block:5px 0!important;padding-top:6px!important}
  #learn-screen .learning-topic-nav button[data-learning-topic="atlas"]{grid-column:1/-1!important}
  #learn-screen .learning-topic-nav b{overflow-wrap:anywhere}
}
