/* The portal keeps its own navigation. The game opens in an expanded in-page
   stage and never requests the browser Fullscreen API. F toggles portal view. */
.cm-microbiomon-page{margin:0;background:#09141c;color:#e8f1eb;font-family:system-ui,sans-serif}.cm-games-layout{display:flex;min-height:100dvh}.cm-games-main{flex:1;min-width:0}.cm-ai-home-header{display:flex;align-items:center;gap:15px;padding:16px 24px;border-bottom:1px solid #ffffff12;background:#09131d}.cm-ai-home-brand{display:flex;flex-direction:column;gap:3px}.cm-ai-home-brand small{color:#96abbf;font-size:11px;letter-spacing:.12em;text-transform:uppercase}.cm-ai-home-brand strong{color:#8ce4dc;font-size:17px}.cm-ai-home-menu{width:42px;height:42px;border:1px solid #ffffff18;border-radius:12px;background:#ffffff0c;color:white;font-size:22px}
#cm-microbiomon{box-sizing:border-box;position:relative;min-height:320px;padding:12px;display:grid;place-items:center;isolation:isolate;background:#09141c}#cm-microbiomon *{box-sizing:border-box}#cm-microbiomon.mm-screen-fill{position:fixed;inset:0;z-index:100000;width:100%;height:100dvh;max-width:none;min-height:0;padding:0;overflow:hidden;overscroll-behavior:none;background:radial-gradient(ellipse at center,#213b42,#09141c 76%)}
#cm-microbiomon .mm-console{display:flex;justify-content:center;align-items:center;width:max-content;max-width:100%;margin:0;padding:0;line-height:0}#cm-microbiomon .mm-stage{position:relative;flex:none;max-width:100%;overflow:hidden;background:#142b31;isolation:isolate}#cm-microbiomon #mm-canvas{display:block;max-width:100%;image-rendering:auto;touch-action:none;outline:none;aspect-ratio:3/2}#cm-microbiomon .mm-ui-source[hidden]{display:none!important}.mm-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.mm-dialog-touch{position:absolute;left:0;bottom:0;height:33%;width:100%;opacity:0;cursor:pointer;border:0;touch-action:manipulation}
/* Touch controls are inside the expanded screen, never a row beneath it. */
.mm-touch-layer{display:none;position:absolute;inset:0;z-index:3;pointer-events:none;user-select:none;-webkit-user-select:none;touch-action:none}.mm-touch-layer button{pointer-events:auto;touch-action:none;-webkit-tap-highlight-color:transparent;cursor:pointer;border:1px solid #e1f4ef66;background:#142e3d80;box-shadow:inset 0 1px 0 #ffffff25,0 2px 7px #0003;color:#f3fff6;font:600 17px/1 system-ui,sans-serif;opacity:.58;transition:opacity .12s,background .12s}.mm-touch-layer button:active,.mm-touch-layer button[aria-pressed=true]{opacity:.95;background:#407e7ac4}.mm-touch-layer button:focus-visible{outline:2px solid #e8d294;outline-offset:2px}.mm-dpad{position:absolute;left:max(14px,env(safe-area-inset-left));bottom:max(20px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:3px}.mm-dpad button{border-radius:10px}.mm-dpad button:first-child{grid-column:2}.mm-dpad button:nth-child(2){grid-column:1;grid-row:2}.mm-dpad button:nth-child(3){grid-column:2;grid-row:2}.mm-dpad button:nth-child(4){grid-column:3;grid-row:2}.mm-touch-actions{position:absolute;right:max(14px,env(safe-area-inset-right));bottom:max(22px,env(safe-area-inset-bottom));display:flex;align-items:end;gap:12px}.mm-touch-actions button{width:46px;height:46px;border-radius:50%}.mm-touch-actions button:last-child{width:55px;height:55px;align-self:start;transform:translateY(-15px);font-size:22px;background:#385c638f}.mm-touch-shortcuts{position:absolute;top:max(14px,env(safe-area-inset-top));right:max(14px,env(safe-area-inset-right));display:flex;gap:7px}.mm-touch-shortcuts button{border-radius:12px;width:44px;height:44px;font-size:17px}.mm-touch-back{display:none;position:absolute;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));width:44px;height:44px;border-radius:12px}
@media(pointer:coarse),(max-width:700px),(max-width:1000px) and (max-height:500px){.mm-touch-layer{display:block}#cm-microbiomon:not([data-interface=world]) .mm-dpad,#cm-microbiomon:not([data-interface=world]) .mm-touch-actions,#cm-microbiomon:not([data-interface=world]) .mm-touch-shortcuts{display:none}#cm-microbiomon[data-interface=panel] .mm-touch-back{display:block}}
@media(max-width:700px) and (orientation:portrait){.mm-dpad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:4px;left:20px;bottom:max(10dvh,env(safe-area-inset-bottom))}.mm-touch-actions{right:24px;bottom:max(10dvh,env(safe-area-inset-bottom))}.mm-touch-actions button:last-child{width:64px;height:64px}.mm-touch-shortcuts{top:max(20px,env(safe-area-inset-top))}}
@media(prefers-reduced-motion:reduce){.mm-touch-layer button{transition:none}}
