/* Exploration owns the screen; conversation and source reading are focused modes. */
body.archive-exploration .game{display:block;max-width:1100px;margin:auto}body.archive-exploration .scene{width:100%}body.archive-exploration .scene canvas{width:100%;height:auto}body.archive-exploration .adventure-tools{display:flex;gap:6px;align-items:center;margin:6px 0;flex-wrap:wrap}.adventure-tools button{padding:7px 12px}.adventure-announcement:empty{display:none}.adventure-announcement{margin:5px 0;color:#f0d3a0;max-width:65ch}body.archive-exploration .portal-controls{margin:4px 0;padding:0;display:flex;gap:8px;align-items:center}body.archive-exploration .portal-hint{font-size:13px;margin:0}body.archive-exploration aside.panel{position:static;transform:none;width:100%;max-width:80ch;min-width:0;margin:8px auto;max-height:none;overflow:visible;background:#152630;overflow-wrap:anywhere}body.archive-exploration aside.panel[hidden]{display:none}body.archive-exploration aside.panel h2{font-size:20px;margin:8px 0}body.archive-exploration #dialog{white-space:pre-line}body.archive-exploration #live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}body.archive-exploration .action-feedback{display:none}body.archive-exploration #hallTaskContext{display:none}body.archive-exploration #guildMenu{max-height:80dvh;overflow:auto}body.archive-exploration #guildMenu .guild-arrival{margin:8px 0}body.archive-exploration #clearRoomExit{display:none}body.archive-exploration .guild-connected-route{display:none}body.archive-exploration .common-room-exit{width:auto;display:inline-block;font-size:14px;padding:7px 10px}body.archive-exploration #guild-satchel{position:static;width:auto;max-width:1100px;margin:8px auto}body.archive-exploration.adventure-reading .adventure-tools{visibility:hidden}body.archive-exploration #openFlowchart{position:static}body.archive-exploration .hud #objective{max-width:52ch}body.archive-exploration #adventureLeads>summary{font-size:16px;color:#efd09b}@media(max-width:600px){body.archive-exploration>header{padding:8px}body.archive-exploration>header h1{font-size:19px}body.archive-exploration .game{padding:6px}.adventure-tools button{padding:7px;font-size:13px}body.archive-exploration aside.panel{padding:12px}body.archive-exploration .portal-controls{align-items:flex-start;flex-wrap:wrap}body.archive-exploration .hud #objective{max-width:48%;font-size:12px}}@media(prefers-reduced-motion:reduce){body.archive-exploration *{scroll-behavior:auto}}

.adventure-quest{display:flex;gap:12px;align-items:baseline;margin:6px 0}.adventure-quest strong{color:#e4c78e;font-size:14px}.adventure-quest #objective{font-size:14px}.adventure-quest[hidden]{display:none}@media(max-width:600px){.adventure-quest{display:block}.adventure-quest #objective{display:block}}

body.archive-exploration #guildMenu .archive-flowchart-launch { position: static; margin: 6px; }
.adventure-quest { display: block; }
.adventure-quest .escape-context { margin: 4px 0 4px 18px; max-width: 68ch; font-size: 14px; }
.adventure-quest summary { color: #efd09b; cursor: pointer; }
.adventure-quest #objective { display: block; padding-left: 18px; }
body.archive-exploration .portal-controls:has(.portal-hint:empty) { display: none; }
body.archive-exploration.hall-exploring.hall-conversation-open .shell { grid-template-columns: minmax(0,1fr); }
body.archive-exploration:has(aside.panel:not([hidden])) :is(.adventure-tools, .adventure-quest, .adventure-announcement, #guildResume) { display: none; }
/* Some investigations keep their only working actions in their room guide. */
body.archive-exploration:has(aside.panel:not([hidden])) .game { display:flex; flex-direction:column; }
body.archive-exploration:has(aside.panel:not([hidden])) .game > #guildMenu { order:-4; }
body.archive-exploration:has(aside.panel:not([hidden])) .game > .scene { order:-3; }
body.archive-exploration:has(aside.panel:not([hidden])) .game > aside.panel { order:-2; }
body.archive-exploration:has(aside.panel:not([hidden])) .game > .guild-arrival { order:-1; }
body.archive-exploration:has(aside.panel:not([hidden])) .game > #firstEveningGuide { background:transparent; border:0; box-shadow:none; }
body.archive-exploration:has(aside.panel:not([hidden])) #firstEveningGuide > :is(h2,.evening-context) { display:none; }
body.archive-exploration:has(#firstEveningGuide:not([hidden])) .adventure-quest { display:none; }

/* In the menu the satchel expands in place. Its old floating offset covers the next control. */
#guildMenu #guild-satchel { transform: none; transition: none; }
#guildMenu #guild-satchel.satchel-closed .satchel-content { display: none; }


/* Keep completed investigations as a single scrollable surface, not a second
   layer on top of a grid/flex form whose author CSS overrides [hidden]. */
:is(#v68LanternOverlay,#v69Overlay,#v73Vietnam,#v74Overlay,#v75Overlay,#v710Proof) [hidden]{display:none!important}
:is(.v68-panel,.v69-panel,.v73-shell,.v74-panel,.v75-panel,.v710-panel):has(>.order-investigation-result){
  display:block;min-width:0;min-height:0;height:auto;max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;
}
.order-investigation-result{width:100%;min-width:0;max-width:680px}
.order-investigation-result .result-controls{grid-template-columns:minmax(0,1fr)}
.order-investigation-result button{max-width:100%;overflow-wrap:anywhere}
.order-investigation-result h3{overflow-wrap:anywhere}
body.archive-exploration .shell{grid-template-columns:minmax(0,1fr)}
body.archive-exploration aside.panel{min-height:0}
body.archive-exploration :is(.adventure-quest,.adventure-tools,.adventure-announcement,#foundingReceiptDisplay,#porterErrand){min-width:0;max-width:100%;overflow-wrap:anywhere}
body.archive-exploration .adventure-quest #objective{max-width:100%;padding:4px 0 0;white-space:normal}
body.archive-exploration .adventure-tools button{min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
body.archive-exploration .adventure-tools button:first-child{background:#d5b77e;color:#172631;font-weight:bold}
body.archive-exploration.adventure-reading .adventure-tools{visibility:visible;display:none}
body.archive-exploration:has(aside.panel:not([hidden])) :is(#porterErrand,#foundingReceiptDisplay,.portal-controls){display:none}
body.archive-exploration #porterErrand[hidden],body.archive-exploration #foundingReceiptDisplay[hidden]{display:none!important}
body.archive-exploration #foundingReceiptDisplay{padding:0;border:0;background:transparent}
body.archive-exploration #foundingReceiptDisplay>summary{cursor:pointer;padding:10px 2px;color:#efd09b}
body.archive-exploration #foundingReceiptDisplay>div{padding:12px;border:1px solid #a78b5c;border-radius:6px;background:#182731}
body.archive-exploration #foundingReceiptDisplay blockquote{overflow-wrap:anywhere}
body.archive-exploration .journal-records ol{padding-inline-start:24px;overflow-wrap:anywhere}
.archive-reader{width:min(720px,calc(100% - 16px));max-width:calc(100% - 16px);max-height:calc(100dvh - 16px);margin:auto;overflow:auto;overscroll-behavior:contain;overflow-wrap:anywhere}
.archive-reader>*{min-width:0}
.archive-reader h2{font-size:clamp(21px,4vw,28px);line-height:1.2}
.archive-reader button{min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.archive-reader textarea,.archive-reader select{min-width:0;max-width:100%;font-size:16px}
.archive-reader .founding-evidence{min-width:0}
.archive-reader .founding-evidence fieldset{max-width:100%;overflow-wrap:anywhere}
.archive-reader .founding-passage span{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){
 body.archive-exploration .scene{min-width:0}
 body.archive-exploration .adventure-tools button:first-child{width:100%}
 body.archive-exploration #dialog{overflow-wrap:anywhere}
 .archive-reader{padding:14px}
 .archive-reader form>button[type=submit]{display:block;width:100%;margin:12px 0 0}
 :is(.v68-top,.v69-header){flex-wrap:wrap}
 :is(.v68-top,.v69-header)>*{min-width:0;max-width:100%}
 :is(.v68-panel,.v69-panel,.v73-shell,.v74-panel,.v75-panel,.v710-panel):has(>.order-investigation-result){max-height:calc(100dvh - 16px)}
}

/* Let an expanded menu take its own space above the scene on narrow screens. */
body.archive-exploration #guildMenu { position: static; inset: auto; min-width: 0; max-width: 100%; }
body.archive-exploration #choices { flex-wrap: wrap; }
body.archive-exploration #choices button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

/* Hide the background menu during a modal and preserve its launcher for keyboard return. */
body.archive-exploration:has(dialog:modal) #guildMenu { visibility: hidden; }
body.archive-exploration #guildMenu dialog:modal { visibility: visible; }

#choices .departure-primary { flex-basis:100%; background:#374936; border:2px solid #e7c77f; color:#fff4d8; font-weight:bold; }

/* Keep room exploration visible without creating another guide or window. */
body.archive-exploration .adventure-tools>.common-room-explore[hidden]{display:none!important}
body.archive-exploration .adventure-tools>.common-room-explore{background:transparent;border-color:#bda06b;color:#f0e4ca;min-height:44px}
body.archive-exploration .adventure-tools>.common-room-explore:hover,body.archive-exploration .adventure-tools>.common-room-explore:focus-visible{background:#354b55}
@media(max-width:600px){body.archive-exploration .adventure-tools>.common-room-explore{width:100%}}

/* Entrance artwork belongs to the existing conversation, never floats over the room. */
#streetEntranceIllustration[hidden]{display:none!important}
#streetEntranceIllustration{display:block;width:min(100%,640px);height:min(42dvh,390px);max-width:100%;object-fit:contain;margin:8px auto;border:1px solid #a78b5c;border-radius:5px;background:#14212a;box-sizing:border-box}
@media(max-width:600px){#streetEntranceIllustration{height:min(34dvh,250px)}}

/* First-evening guidance is one action strip; detailed directions remain readable on demand. */
body.archive-exploration #firstEveningGuide {
  margin: 5px 0 8px;
  padding: 9px 12px;
  border: 1px solid #8e7955;
  border-radius: 7px;
  background: #182b35;
  box-shadow: none;
}
body.archive-exploration #firstEveningGuide #firstEveningTitle {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.3;
}
body.archive-exploration #firstEveningGuide .guild-arrival-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
body.archive-exploration #firstEveningGuide .guild-arrival-actions button {
  min-height: 44px;
  margin: 0;
  padding: 9px 12px;
  width: auto;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.archive-exploration #firstEveningGuide .guild-arrival-actions button:first-child { flex: 1 1 240px; }
body.archive-exploration #firstEveningGuide .guild-arrival-actions button:last-child {
  flex: 0 1 auto;
  color: #efdab5;
  background: transparent;
  font-size: 13px;
}
body.archive-exploration #firstEveningGuide .evening-context { margin: 6px 0 0; }
body.archive-exploration #firstEveningGuide .evening-context summary {
  cursor: pointer;
  color: #dbc89f;
  font-size: 13px;
  padding: 5px 0;
}
body.archive-exploration #firstEveningGuide .evening-context p {
  max-width: 70ch;
  line-height: 1.5;
  margin: 6px 0 2px;
}
/* Keep the praised Next control available, without making it a second gold primary action. */
body.archive-exploration.guild-evening .adventure-tools {
  justify-content: flex-end;
  margin: 3px 0;
}
body.archive-exploration.guild-evening .adventure-tools button:first-child {
  width: auto;
  min-height: 44px;
  padding: 8px 12px;
  background: transparent;
  border-color: #8e7955;
  color: #e6d2ae;
  font-size: 13px;
}
@media (max-width: 600px) {
  body.archive-exploration #firstEveningGuide { padding: 8px 10px; }
  body.archive-exploration #firstEveningGuide .guild-arrival-actions button:first-child { flex-basis: 100%; }
  body.archive-exploration #firstEveningGuide .guild-arrival-actions button:last-child {
    min-height: 44px;
    padding: 5px 8px;
    margin-left: auto;
  }
}

/* Optional view at the Central Park terrace, not a replacement movement map. */
.guild-park-mall-view{display:block;width:100%;height:clamp(100px, 22dvh, 224px);margin:.6rem 0 0;object-fit:cover;object-position:50% 67%;border-radius:5px;border:1px solid #7c6d52}
