/* V7.11: optional Living Memory of the Guild and same-origin source-pack portal. */
#v711Portal[hidden]{display:none!important}
body.v711-modal-open{overflow:hidden}
#v711Portal{position:fixed;inset:0;z-index:70;background:rgba(5,11,20,.92);padding:14px;overflow:auto;color:#f2e5cc}
.v711-shell{max-width:1220px;margin:0 auto;background:#182332;border:1px solid #c3a06a;box-shadow:0 12px 48px rgba(0,0,0,.5);border-radius:12px;min-height:90vh;display:flex;flex-direction:column}
.v711-head{display:flex;justify-content:space-between;gap:16px;align-items:start;padding:16px 20px;border-bottom:1px solid #756346}
.v711-head h2{margin:4px 0 8px;color:#f5dca4}.v711-head p{margin:0;line-height:1.4;color:#d4c3ab}
.v711-head button,.v711-nav button{background:#304456;color:#f4dab0;border:1px solid #c9a66e;border-radius:7px;padding:10px 14px;cursor:pointer}
.v711-nav{padding:10px 20px;display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid #6b5d49}
.v711-nav button[aria-pressed=true]{background:#65503b;border-color:#ffdc97}
.v711-declare,.v711-status{margin:8px 20px;color:#e0d0b2;font-size:14px;line-height:1.5}
.v711-stage{flex:1;min-height:65vh;margin:0 20px 10px;background:#f1e8d6;border:1px solid #7c6d56;border-radius:8px;overflow:hidden}
.v711-stage iframe{display:block;border:0;width:100%;height:68vh;min-height:520px;background:#f4ecda}
.v711-connection{display:block;border:1px solid rgba(199,165,109,.45);padding:8px 10px;border-radius:7px;margin:8px 0}
.v711-source-note{font-size:0.9em;color:#b9b3ac}
@media(max-width:720px){#v711Portal{padding:5px}.v711-shell{min-height:99vh}.v711-head{flex-direction:column}.v711-nav{padding:8px}.v711-stage{margin:0 7px 8px}.v711-stage iframe{height:64vh;min-height:430px}}

.v711-evidence-label{display:block;width:100%;font-weight:600;color:#ebddc0;margin-top:10px}.v711-reasoning{display:block;width:100%;box-sizing:border-box;margin-top:7px;min-height:110px;border-radius:8px;padding:10px;background:#101c28;color:#f2e2c0;border:1px solid #b99869;font:inherit}.v711-evidence-feedback{color:#f2d19e;font-size:.9rem;margin:4px 0}

/* The plan scrolls inside the frame while the exit stays in reach. */
#v711Portal.keeper-focus {overflow:hidden;box-sizing:border-box;width:100dvw;height:100dvh}
#v711Portal.keeper-focus .v711-shell {height:100%;min-height:0}
#v711Portal.keeper-focus .v711-stage {display:flex;min-height:0}
#v711Portal.keeper-focus iframe {flex:1;min-height:0;height:100%}
@media(max-width:720px),(max-height:500px){
 #v711Portal.keeper-focus .v711-head {flex-direction:row;align-items:center;gap:8px;padding:6px 10px}
 #v711Portal.keeper-focus .v711-head h2 {font-size:1.1rem}
 #v711Portal.keeper-focus .v711-head button {min-height:44px;flex-shrink:0;padding:6px 8px}
}

/* One focused surface for the Eye expedition. */
#v711Portal.eye-city-focus .v711-nav,#v711Portal.eye-city-focus #v711Disclaimer,#v711Portal.eye-city-focus .v711-head p,#v711Portal.eye-city-focus #v711Status{display:none!important}
#v711Portal.eye-city-focus .v711-shell{max-width:1220px;min-width:0}
#v711Portal.eye-city-focus .v711-stage{margin:0 6px 6px;min-width:0;background:#192521}
#v711Portal.eye-city-focus .v711-head{align-items:center;flex-direction:row;gap:8px;padding:8px 12px}
#v711Portal.eye-city-focus .v711-head h2{font-size:clamp(1rem,3vw,1.35rem);margin:0;overflow-wrap:anywhere}
#v711Portal.eye-city-focus .v711-head button{min-height:44px;max-width:48%;white-space:normal;flex-shrink:0}

/* Keep the focused Eye host chrome outside the child viewport, including
   landscape heights. The emergency return remains a full-size control. */
#v711Portal.eye-city-focus .v711-head{flex:0 0 auto;min-width:0}
#v711Portal.eye-city-focus .v711-head>div{min-width:0;flex:1 1 auto}
#v711Portal.eye-city-focus .v711-stage{flex:1 1 0;min-height:0;overflow:hidden}
#v711Portal.eye-city-focus iframe{min-height:0;height:100%;min-width:0}
@media(max-height:520px) and (orientation:landscape){
 #v711Portal.eye-city-focus{padding:4px}
 #v711Portal.eye-city-focus .v711-head{padding:3px 8px}
 #v711Portal.eye-city-focus .v711-head h2{font-size:1rem;line-height:1.2}
 #v711Portal.eye-city-focus .v711-head button{padding:4px 8px;min-height:44px;max-width:48%}
 #v711Portal.eye-city-focus .v711-stage{margin:0 4px 4px}
}

/* Living simulations use one child scroll surface. No clipped iframe or
   duplicated navigation over the scene. The original return handler is intact. */
#v711Portal:has(#v711Frame[src^="expansions/merchants-road/"]),
#v711Portal:has(#v711Frame[src^="expansions/living-manuscript-village/"]){box-sizing:border-box;height:100dvh;width:100%;padding:6px;overflow:hidden}
#v711Portal:has(#v711Frame[src^="expansions/merchants-road/"]) .v711-shell,
#v711Portal:has(#v711Frame[src^="expansions/living-manuscript-village/"]) .v711-shell{height:100%;min-height:0;max-width:1260px;overflow:hidden}
#v711Portal:has(#v711Frame[src^="expansions/merchants-road/"]) :is(.v711-nav,.v711-head p,#v711Disclaimer),
#v711Portal:has(#v711Frame[src^="expansions/living-manuscript-village/"]) :is(.v711-nav,.v711-head p,#v711Disclaimer){display:none!important}
#v711Portal:has(#v711Frame[src^="expansions/merchants-road/"]) .v711-head,
#v711Portal:has(#v711Frame[src^="expansions/living-manuscript-village/"]) .v711-head{flex:0 0 auto;position:static;align-items:center;flex-direction:row;padding:8px 12px;gap:8px;min-width:0}
#v711Portal:has(#v711Frame[src^="expansions/merchants-road/"]) .v711-head h2,
#v711Portal:has(#v711Frame[src^="expansions/living-manuscript-village/"]) .v711-head h2{font-size:clamp(1rem,2.6vw,1.3rem);margin:0;overflow-wrap:anywhere}
#v711Portal:has(#v711Frame[src^="expansions/merchants-road/"]) .v711-head button,
#v711Portal:has(#v711Frame[src^="expansions/living-manuscript-village/"]) .v711-head button{flex:0 0 auto;max-width:48%;min-height:44px;padding:6px 10px;white-space:normal}
#v711Portal:has(#v711Frame[src^="expansions/merchants-road/"]) .v711-stage,
#v711Portal:has(#v711Frame[src^="expansions/living-manuscript-village/"]) .v711-stage{flex:1 1 0;min-height:0;min-width:0;margin:0;display:flex;border-radius:0;overflow:hidden}
#v711Portal:has(#v711Frame[src^="expansions/merchants-road/"]) iframe,
#v711Portal:has(#v711Frame[src^="expansions/living-manuscript-village/"]) iframe{height:100%;min-height:0;min-width:0;flex:1}
#v711Portal:has(#v711Frame[src^="expansions/merchants-road/"]) .v711-status,
#v711Portal:has(#v711Frame[src^="expansions/living-manuscript-village/"]) .v711-status{flex:0 0 auto;font-size:12px;margin:4px 10px;line-height:1.3}
