/* Project Room Template v1. Opt-in pilot; no Corridor/White Room rules. */
.prompt-world[data-room-shell] {
  --presentation-floor-bottom: clamp(8.5rem, 16dvh, 11rem);
  --back-wall-floor-y: 55%;
  background: #07151d;
}
.prompt-world::before, .prompt-world::after { display: none; }
.prompt-world[data-room-shell] .room-scene {
  position: relative; width: 100%; height: 100svh; height: 100dvh;
  min-height: 0; padding: 0; margin: 0; overflow: hidden; isolation: isolate;
}
.room-scene .room-architecture { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.briefing-back-wall {
  position: absolute; inset: 8% 10% auto; height: 47%;
  border: 1px solid #70e5ca1d;
  background: radial-gradient(ellipse at 50% 25%, #15323c99, #07151d 74%);
  box-shadow: inset 0 -40px 60px #02070b66, 0 0 70px #49e5db08;
}
.briefing-floor {
  position: absolute; top: var(--back-wall-floor-y); inset-inline: 0; bottom: 0;
  border-top: 1px solid #78b4bd38;
  background: radial-gradient(ellipse at 50% 0, #24595b33, transparent 39%), linear-gradient(#070f16, #02070c);
}
.briefing-floor::after { content: ""; position: absolute; top: 0; left: 20%; right: 20%; height: 19%; background: linear-gradient(#56d9ca13, transparent); filter: blur(12px); }
.briefing-side { position: absolute; top: 8%; bottom: 45%; width: 10%; background: linear-gradient(90deg, #020609, #14323b55); }
.briefing-side--left { left: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 135%); border-right: 1px solid #82c3c929; transform: skewY(18deg); transform-origin: right; }
.briefing-side--right { right: 0; transform: skewY(-18deg); transform-origin: left; border-left: 1px solid #82c3c929; background: linear-gradient(-90deg, #020609, #14323b55); }
.prompt-world[data-room-shell] .prompt-nav {
  position: absolute; z-index: 25; inset: max(1rem, env(safe-area-inset-top)) 2rem auto;
  flex-direction: row; align-items: center; font-size: .75rem;
}
.prompt-world[data-room-shell] .project-wall {
  position: absolute; z-index: 3; top: clamp(4.75rem, 10dvh, 7rem); left: 50%;
  width: min(80%, 72rem); height: 36dvh; min-height: 0; margin: 0; padding: 1rem;
  display: grid; grid-template-columns: .8fr 1.2fr; grid-template-rows: 1fr; gap: 1.25rem;
  transform: translateX(-50%); transform-origin:50% 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  border: 1px solid #70e5ca45; border-radius: 3px;
  background: linear-gradient(135deg, #19414d55, #071724b3);
  box-shadow: 0 0 24px #70e5ca12, inset 0 0 26px #72b7ff08;
}
.prompt-world:not([data-project-screen]) .project-wall,
.prompt-world[data-project-screen="stowed"] .project-screen,
.prompt-world[data-project-screen="retracting"] .project-screen { opacity:0; transform:translateX(-50%) translateY(-118%) scaleY(.92); pointer-events:none; }
.prompt-world[data-project-screen="deploying"] .project-screen,
.prompt-world[data-project-screen="deployed"] .project-screen { opacity:1; transform:translateX(-50%) translateY(0) scaleY(1); }
.prompt-world .project-screen { height:clamp(18rem,48dvh,34rem); max-height:calc(100dvh - var(--presentation-floor-bottom) - 5.75rem); transition:transform .72s cubic-bezier(.22,.78,.22,1),opacity .38s ease; will-change:transform,opacity; }
.prompt-world[data-project-screen="deploying"] .project-screen { box-shadow:0 0 38px #70e5ca24,inset 0 0 30px #72b7ff0d; }
.project-wall::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14; background: repeating-linear-gradient(transparent 0 3px, #70e5ca16 4px); }
.prompt-world.is-entering-project-room .project-wall { animation:none; }
.prompt-world[data-room-shell] .prompt-copy { padding: 0; min-height: 0; overflow: visible; }
.prompt-world[data-room-shell] .prompt-copy h1 { font-size: clamp(1.5rem, 2.5vw, 2.5rem); line-height: 1.04; letter-spacing: -.045em; margin: .25rem 0 .6rem; }
.prompt-world[data-room-shell] .prompt-copy > p { font-size: .875rem; line-height: 1.45; margin: .35rem 0; }
.prompt-world[data-room-shell] .prompt-copy .signature-kicker { font: 700 .75rem/1.4 var(--project-font-mono); color: #70e5ca; }
.prompt-world[data-room-shell] .prompt-copy [data-project-visit-copy] { font-size: .75rem; }
.prompt-world[data-room-shell] .prompt-machine {
  min-height: 0; max-height: none; padding: 0; overflow: visible;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; contain: none;
}
.prompt-world .project-display::before { display: none; }
.prompt-world .project-display-label { font-size: .75rem; margin: 0 0 .5rem; }
.prompt-world .prompt-machine ol { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin: 0 0 .55rem; }
.prompt-world .prompt-machine li { padding: .45rem; gap: .5rem; min-width: 0; font-size: .75rem; line-height: 1.4; border: 1px solid #70e5ca25; transition: opacity .25s, background .25s, color .25s; }
.prompt-world .prompt-machine li.is-presented { color: #e6fffa; background: #70e5ca18; border-color: #70e5ca; box-shadow: 0 0 15px #70e5ca22; }
.prompt-world[data-briefing-active="true"] .prompt-machine li:not(.is-presented):not(.was-presented) { opacity: .2; }
.prompt-world [data-brief-target].is-laser-target,
.prompt-world .back-projection .is-laser-target {
  outline: 1px solid color-mix(in srgb, var(--world-accent, #70e5ca) 82%, white);
  outline-offset: 3px;
  background-color: color-mix(in srgb, var(--world-accent, #70e5ca) 14%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--world-accent, #70e5ca) 28%, transparent);
  filter: brightness(1.12);
  transition: outline-color .2s, background-color .2s, box-shadow .2s, filter .2s;
}
.prompt-world .compiler-actions { display: flex; gap: .5rem; }
.prompt-world .prompt-action, .prompt-world .prompt-door { width: auto; flex: 1 1 0; min-width: 0; min-height: 44px; margin: 0; padding: .45rem .6rem; border-radius: 3px; font-size: .75rem; line-height: 1.35; gap: .25rem; }
.prompt-world .prompt-door span { font-size: .65rem; }
.prompt-world .prompt-message { font-size: .75rem; line-height: 1.4; margin: .45rem 0 0; }
.prompt-world .compile-pipeline { font: 700 .75rem/1.5 var(--project-font-mono); color: #b0fff0; margin: .5rem 0; }
.prompt-world .compile-pipeline span { display: inline-block; animation: compile-reveal .7s both; }
.prompt-world .compile-pipeline span:last-child { animation-delay: .7s; }
.prompt-world[data-briefing-paused="true"] .compile-pipeline span { animation-play-state: paused; }
.prompt-world .explore-detail { display: none !important; }
.prompt-world[data-experience-mode="explore"] .explore-detail { display: block !important; }
.prompt-world[data-experience-mode="explore"] .prompt-wordfield { display: flex !important; }
.prompt-world .prompt-wordfield { gap: .3rem; margin: .65rem 0; }
.prompt-world .prompt-wordfield span { font-size: .75rem; padding: .3rem; }
.prompt-world[data-room-shell] .prompt-status { position: absolute; z-index: 24; bottom: max(.35rem, env(safe-area-inset-bottom)); left: 2rem; right: 2rem; margin: 0; font-size: .75rem; }
.prompt-world[data-room-shell] .prompt-resident {
  position: fixed; z-index: 10; inset: 0; width: 100%; height: 100dvh; min-width: 0;
  overflow: hidden; pointer-events: none;
}
.prompt-world[data-room-shell] .prompt-resident canvas { inset: 0; width: 100%; height: 100%; transform: none; animation: none; transition: opacity .4s; filter: brightness(1.1) drop-shadow(0 3px 2px #0006); }
.prompt-world[data-room-shell] .prompt-resident .journey-calibration.resident-stage__threshold {
  position: fixed !important; bottom: calc(var(--presentation-floor-bottom) - 3px) !important;
  left: 50% !important; width: 12rem !important; height: clamp(260px, 58dvh, 520px);
  opacity: 0; visibility: hidden; pointer-events: none;
}
.prompt-world[data-room-shell] .prompt-resident [data-journey-status] {
  position: absolute; top: 2.75rem; bottom: auto; left: 2rem; right: auto;
  max-width: calc(100% - 4rem); font-size: .75rem; line-height: 1.4; padding: .45rem .65rem; white-space: normal;
}
.prompt-world[data-room-shell] .prompt-resident [data-journey-follow] { display: none; }
.prompt-world[data-room-shell] .prompt-resident.is-concealed canvas { opacity: 0 !important; }
.presenter-pointer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 12; pointer-events: none; opacity: 0; transition: opacity .2s; }
.presenter-pointer.is-visible { opacity: .7; }
.presenter-pointer line { stroke: var(--world-accent, #86fff0); stroke-width: 1; filter:drop-shadow(0 0 3px var(--world-accent, #86fff0)); }
.presenter-pointer circle { fill: var(--world-accent, #c8fff5); filter:drop-shadow(0 0 5px var(--world-accent, #c8fff5)); }
.briefing-controls {
  position: absolute; z-index: 25; bottom: max(1.6rem, calc(env(safe-area-inset-bottom) + 1.6rem));
  left: 50%; transform: translateX(-50%); display: flex; gap: .45rem; width: max-content; max-width: calc(100% - 2rem);
}
.briefing-controls button, .briefing-controls a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem .85rem; background: #0b1c27ee; border: 1px solid #70e5ca42; color: #bcddd9; font: 700 .75rem/1.4 var(--project-font-mono); text-decoration: none; cursor: pointer; }
.briefing-controls :disabled { opacity: .35; cursor: default; }
.briefing-controls :focus-visible { outline: 2px solid #70e5ca; outline-offset: 3px; }
.briefing-controls [aria-disabled="true"] { opacity: .35; pointer-events: none; }
@keyframes compile-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes chamber-reveal { from { opacity: .65; transform: translateX(-50%) scale(.985); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@media (max-width: 760px) {
  .prompt-world[data-room-shell] .prompt-nav { inset-inline: .8rem; font-size: .75rem; gap: .6rem; }
  .prompt-nav > a:first-child { display: none; }
  .prompt-world[data-room-shell] .project-wall {
    width: 86%; top: 4.5rem; height: clamp(16rem,42dvh,28rem); max-height:calc(100dvh - var(--presentation-floor-bottom) - 5rem); padding: .65rem;
    grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: start; gap: .35rem;
  }
  .prompt-world[data-room-shell] .prompt-copy h1 { font-size: 1.5rem; margin: .15rem 0; }
  .prompt-world[data-room-shell] .prompt-copy > .signature-kicker { margin: 0; font-size: .75rem; }
  .prompt-copy [data-project-visit-copy] { display: none; }
  .prompt-world .project-display-label { margin-bottom: .3rem; }
  .prompt-world .prompt-machine li { padding: .3rem; font-size: .75rem; gap: .3rem; }
  .prompt-world .prompt-message { margin-top: .3rem; }
  .prompt-world .prompt-door span { display: none; }
  .briefing-controls { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); width: calc(100% - 1.4rem); gap: .3rem; }
  .briefing-controls button, .briefing-controls a { padding: .4rem .3rem; font-size: .75rem; }
  .prompt-world[data-room-shell] .prompt-resident [data-journey-status] { top: 2.75rem; bottom: auto; left: .8rem; padding: .2rem .4rem; font-size: .75rem; max-width: calc(100% - 1.6rem); }
  .prompt-world[data-room-shell] .prompt-status { inset-inline: .8rem; font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .project-wall *, .presenter-pointer { animation: none !important; transition: none !important; }
}
