:root {
  font:16px/1.55 system-ui,sans-serif;
  color:#e5eef3;
  background:#101e28;
  color-scheme:dark
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
button,textarea {
  font:inherit
}
button {
  cursor:pointer;
  min-height:44px;
  border:1px solid #6a8999;
  border-radius:8px;
  background:#203d4c;
  color:#f3fbff;
  padding:.6rem .85rem;
  text-align:left;
  overflow-wrap:anywhere
}
button:hover {
  background:#2e5263
}
button:disabled {
  opacity:.55;
  cursor:default
}
button[aria-pressed=true] {
  background:#205a4e;
  border-color:#8ce0bd
}
button:focus-visible,a:focus-visible,textarea:focus-visible,canvas:focus-visible,[tabindex]:focus-visible {
  outline:3px solid #ffce7b;
  outline-offset:3px
}
[hidden] {
  display:none!important
}
h1,h2,h3 {
  line-height:1.22
}
h1 {
  font-size:clamp(1.6rem,3vw,2.8rem)
}
h2 {
  font-size:1.35rem
}
h3 {
  font-size:1.05rem
}
p {
  overflow-wrap:anywhere
}
small,.source,.room-help,.disclosure {
  color:#b9cdd7
}
.brand {
  display:flex;
  align-items:center;
  gap:.8rem;
  padding:1.2rem;
  border-bottom:1px solid #3a5361
}
.brand small {
  margin-left:auto;
  font-size:.7rem
}
.home {
  max-width:1440px;
  margin:auto;
  padding:2rem;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(300px,390px);
  gap:2rem
}
.eyebrow {
  color:#a0dfd4;
  font-size:.8rem;
  letter-spacing:.08em
}
#mission-list {
  display:grid;
  gap:1rem
}
.mission-card {
  padding:1.3rem;
  border-left:5px solid #65d1d6;
  background:linear-gradient(130deg,#294c5f,#172c39)
}
.mission-card.library-kiosk {
  border-left-color:#e0b075;
  background:linear-gradient(130deg,#504231,#282d2e)
}
.mission-card h3 {
  font-size:1.35rem;
  margin:.5rem 0
}
.mission-card p {
  margin:.3rem 0
}
.mission-card span {
  color:#afe9d9
}
.disclosure {
  font-size:.85rem
}
.skip-link {
  position:absolute;
  top:-100px;
  color:white
}
.skip-link:focus {
  top:0;
  background:#101e28;
  padding:1rem;
  z-index:20
}
#mission-dialog {
  padding:0;
  border:1px solid #7894a5;
  border-radius:10px;
  width:calc(100vw - 32px);
  max-width:1800px;
  height:calc(100dvh - 32px);
  max-height:none;
  background:#101e28;
  color:inherit;
  overflow:hidden
}
#mission-dialog::backdrop {
  background:#000c
}
.game-stage {
  height:100%;
  display:flex;
  flex-direction:column;
  position:relative
}
.game-toolbar {
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  padding:.7rem;
  background:#1b303c;
  flex-shrink:0
}
#mission-heading {
  font-size:1.25rem;
  margin:.7rem 1rem .3rem
}
#mission-status {
  margin:0 1rem .6rem;
  max-height:4.5em;
  overflow:auto;
  font-size:.88rem;
  color:#bcdfd7;
  flex-shrink:0
}
.workspace {
  min-height:0;
  flex:1;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(350px,430px);
  gap:1rem;
  padding:0 1rem 1rem
}
#scene-pane {
  display:flex;
  flex-direction:column;
  min-height:0;
  min-width:0
}
#mission-xr {
  flex:1;
  min-height:200px;
  position:relative;
  background:#111d29;
  border:1px solid #5e7480;
  border-radius:8px;
  overflow:hidden
}
#mission-xr canvas {
  display:block;
  width:100%;
  height:100%;
  touch-action:none
}
#room-status {
  font-size:.8rem;
  margin:.4rem 0
}
#station-nav {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.4rem
}
#station-nav button {
  font-size:.8rem
}
.room-help {
  font-size:.75rem;
  margin:.5rem 0 0
}
#mission-content {
  overflow-y:auto;
  min-height:0;
  min-width:0;
  padding:1rem;
  background:#1a303c;
  border:1px solid #536f80;
  border-radius:8px;
  scrollbar-gutter:stable
}
#mission-content h2:first-child {
  margin-top:0
}
#mission-content button {
  display:block;
  width:100%;
  margin:.6rem 0
}
.evidence-nav {
  display:grid;
  gap:.3rem
}
.evidence-nav button {
  font-size:.85rem
}
details {
  border-block:1px solid #536f80;
  padding:.6rem 0
}
summary {
  cursor:pointer
}
blockquote {
  margin:.7rem 0;
  padding-left:1rem;
  border-left:3px solid #e7b874;
  color:#ffe0ad
}
.score {
  color:#a5e2cf;
  margin-top:0
}
.evidence,.decision,.result {
  margin-top:1rem;
  border-top:1px solid #617b88;
  padding-top:1rem
}
.feedback {
  background:#243f47;
  border-left:3px solid #a2ddc9;
  padding:.6rem
}
.table-scroll,.m6-diagram {
  overflow:auto;
  max-width:100%;
  border:1px solid #6d8490
}
table {
  border-collapse:collapse;
  font-size:.85rem;
  width:100%
}
th,td {
  text-align:left;
  vertical-align:top;
  border-bottom:1px solid #526c78;
  padding:.55rem
}
th {
  background:#294754
}
.m6-kv {
  margin:.5rem
}
.m6-kv-row {
  display:flex;
  justify-content:space-between;
  gap:.7rem
}
.m6-kv-row dd {
  margin:0;
  font-weight:bold
}
.m6-banner {
  background:#63432d;
  padding:.5rem
}
.m6-note {
  padding:.5rem
}
.text-mode .workspace {
  grid-template-columns:1fr
}
.text-mode #mission-content {
  max-width:1000px;
  width:100%;
  justify-self:center
}
.chat-covered {
  visibility:hidden
}
#mossy-chat {
  border:1px solid #698997;
  border-radius:10px;
  background:#f1f4ee;
  color:#253b31;
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:auto;
  padding:.8rem
}
#mossy-chat button {
  background:#e3ece4;
  color:#253b31;
  border-color:#7d9987
}
#mossy-chat h2 {
  margin:.3rem 0
}
.mossy-chat-heading {
  display:flex;
  align-items:start;
  gap:.5rem;
  justify-content:space-between
}
.mossy-chat-heading p,.mossy-privacy {
  font-size:.8rem
}
.mossy-chat-heading p {
  margin:.3rem 0
}
.mossy-chat-heading button {
  flex-shrink:0
}
.mossy-privacy {
  margin:.4rem 0
}
#mossy-chat-content {
  min-height:0;
  flex:1;
  display:flex;
  flex-direction:column
}
#home-mossy-chat {
  min-width:0
}
#mossy-chat.home-chat {
  min-height:460px
}
.home-chat .mossy-chat-heading>button {
  display:none
}
.game-stage>#mossy-chat {
  position:absolute;
  z-index:5;
  right:1rem;
  top:150px;
  bottom:1rem;
  width:430px;
  max-width:calc(100% - 2rem)
}
.guide-form textarea {
  color:#253b31;
  background:#fff
}
.guide-transcript {
  max-height:30dvh!important
}
.guide-form {
  padding:.5rem!important
}
/* Compact the surrounding chrome only once the hosted frame is mounted. */
#mossy-chat:has(iframe) { overflow:hidden; padding:.6rem; gap:.25rem; }
#mossy-chat:has(iframe) .mossy-chat-heading { flex-shrink:0; align-items:center; }
#mossy-chat:has(iframe) .mossy-chat-heading h2 { font-size:1.1rem; margin:0; }
#mossy-chat:has(iframe) .mossy-chat-heading p,
#mossy-chat:has(iframe) #mossy-chat-status { display:none; }
#mossy-chat:has(iframe) .mossy-privacy { flex-shrink:0; font-size:.75rem; line-height:1.4; margin:.2rem 0; }
#mossy-chat.home-chat:has(iframe) { height:calc(100dvh - 2rem); min-height:0; }
@media(max-width:850px) {
  .home {
    grid-template-columns:1fr;
    padding:1rem
  }
  .brand small {
    max-width:130px
  }
  .workspace {
    grid-template-columns:1fr;
    overflow-y:auto;
    display:block
  }
  .game-toolbar {
    gap:.3rem;
    padding:.4rem
  }
  .game-toolbar button {
    flex:1;
    font-size:.8rem;
    padding:.5rem
  }
  #mission-heading {
    font-size:1.05rem
  }
  #mission-content {
    overflow:visible;
    margin-top:.8rem
  }
  #scene-pane {
    height:310px
  }
  #mission-xr {
    min-height:150px
  }
  .room-help {
    display:none
  }
  #mission-dialog {
    width:100vw;
    height:100dvh;
    max-width:none;
    border:0;
    border-radius:0
  }
  .game-stage>#mossy-chat {
    top:135px;
    left:.5rem;
    right:.5rem;
    bottom:.5rem;
    width:auto;
    max-width:none
  }
  .guide-transcript {
    max-height:26dvh!important
  }
  .text-mode #mission-content {
    margin-top:0
  }
  .mossy-privacy {
    font-size:.75rem
  }
  .game-stage:has(>#mossy-chat:not([hidden])) .workspace {
    visibility:hidden
  }
  #mission-status {
    max-height:3em
  }
  #home-mossy-chat {
    padding-bottom:1rem
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important
  }
}
