/* Each scene waits for the visitor. Scrolling remains free. */
.memory-phases, .memory-controls { display: none; }
.pilot-memory:not(.is-guided) .memory-scene { display: none; }
body .pilot-memory.is-guided { padding-block: 36px 24px; }
body .pilot-memory.is-guided .memory-heading { justify-content: center; text-align: center; }
body .pilot-memory.is-guided .memory-heading h2 { width: 100%; font-size: clamp(25px, 3vw, 38px); }
body .pilot-memory.is-guided .memory-heading h2 > span { display: none; }
body .pilot-memory.is-guided .memory-scene { height: 520px; margin: 32px auto 0; overflow: hidden; }
body .pilot-memory.is-guided .memory-building { top: 57%; width: 400px; height: auto; }
body .pilot-memory.is-guided .memory-document { width: 235px; font-size: 14px; padding: 14px; }
body .pilot-memory.is-guided .memory-document-minutes { top: 150px; left: 3%; }
body .pilot-memory.is-guided .memory-document-contract { top: 240px; right: 3%; }
body .pilot-memory.is-guided .memory-document-history { top: 390px; bottom: auto; left: 7%; }
body .pilot-memory.is-guided .memory-source-document { left: 8%; top: 195px; }
body .pilot-memory.is-guided .pilot-answer { top: 230px; left: 54%; width: 320px; margin: 0; }
body .pilot-memory.is-guided .memory-phases { display: grid; position: absolute; inset: 36px 0 auto; z-index: 3; text-align: center; pointer-events: none; }
.memory-phase { grid-area: 1 / 1; margin: 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.4; color: #f5f3ed; }
.memory-phase small { font-size: .65em; color: #b7cbd0; }
body .pilot-memory.is-guided .pilot-processing,
body .pilot-memory.is-guided .memory-center-label { display: none; }
body .pilot-memory.is-guided .memory-resolution { display: grid; opacity: 0; }
body .pilot-memory.is-guided .pilot-retrieval-question > span { display: none; }
body .pilot-memory.is-guided .pilot-retrieval-question { display: block; inset: 100px auto auto 22%; width: 56%; padding: 18px 22px; border: 1px solid #88a5b4; border-radius: 18px 18px 4px 18px; background: #203f54; box-shadow: 0 12px 28px #0002; z-index: 4; }
body .pilot-memory.is-guided .pilot-retrieval-question::after { content: ''; position: absolute; right: 24px; bottom: -8px; width: 14px; height: 14px; border-right: 1px solid #88a5b4; border-bottom: 1px solid #88a5b4; background: #203f54; transform: rotate(45deg); }
body .pilot-memory.is-guided .pilot-retrieval-question p { margin: 0; font-size: clamp(20px, 2vw, 26px); line-height: 1.35; }
body .pilot-memory.is-guided .memory-figure > figcaption { height: auto; padding: 6px 0 16px; margin: 0; font-size: 12px; }
body .pilot-memory.is-guided .memory-bottom { gap: 16px; flex-wrap: wrap; }
.memory-controls button { font: inherit; color: #e1e9ed; background: transparent; border: 0; border-bottom: 1px solid #738f9e; min-height: 44px; cursor: pointer; padding: 8px 0; }
.memory-controls button:hover { color: #ffbc83; }
.memory-controls button:focus-visible { outline: 2px solid #ffbc83; outline-offset: 5px; }
.memory-controls button[hidden] { display: none; }
body .pilot-memory.is-guided .memory-bottom { justify-content: center; }
body .pilot-memory.is-guided .memory-bottom > span { display: none; }
body .pilot-memory.is-guided .memory-controls { display: grid; width: 100%; grid-template-columns: minmax(0, 360px); justify-content: center; justify-items: stretch; gap: 8px; }
.memory-next-slot { display: grid; width: 100%; min-height: 54px; }
.memory-next-slot > * { grid-area: 1 / 1; }
.memory-controls [data-memory-next] { width: 100%; padding: 14px 20px; color: #102c40; background: #ffb779; border: 1px solid #ffcfaa; border-radius: 7px; font-weight: 650; line-height: 1.35; }
.memory-controls [data-memory-next]:hover { background: #ffd0a9; color: #102c40; }
.memory-playing { align-self: center; text-align: center; visibility: hidden; color: #b7cbd0; }
[data-running="true"] [data-memory-next] { visibility: hidden; }
[data-running="true"] .memory-playing { visibility: visible; }
.memory-secondary { min-height: 44px; text-align: center; }
.memory-step-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media(max-width:800px) {
 body .pilot-memory.is-guided .memory-scene { height: 560px; }
 body .pilot-memory.is-guided .memory-building { width: 280px; top: 66%; }
 body .pilot-memory.is-guided .memory-document { width: 210px; padding: 14px; font-size: 13px; }
 body .pilot-memory.is-guided .memory-document-minutes { top: 160px; left: calc(50% - 105px); }
 body .pilot-memory.is-guided .memory-document-contract { top: 160px; right: auto; left: calc(50% - 105px); }
 body .pilot-memory.is-guided .memory-document-history { top: 160px; left: calc(50% - 105px); }
 body .pilot-memory.is-guided .memory-source-document { top: 440px; left: 0; width: 155px; font-size: 12px; }
 body .pilot-memory.is-guided .pilot-answer { top: 215px; left: 5%; width: 90%; padding: 14px 16px; }
 body .pilot-memory.is-guided .memory-bottom > span { display: none; }
 body .pilot-memory.is-guided .memory-controls { width: 100%; justify-content: center; }
 body .pilot-memory.is-guided .memory-toolbar { margin-bottom: 16px; }
}

/* Visible playback controls are omitted by request; offscreen and reduced-motion handling stays in the controllers. */
.hero-process-control, [data-service-pause], .day-toggle, .trust-replay,
.invite-pause, .system-rotation-control, [data-memory-toggle],
.hero-process-story__footer { display: none !important; }
body .pilot-memory { margin: 24px 24px 40px; border: 1px solid #234359; border-radius: 20px; box-shadow: 0 16px 44px #102c4010; }
body .pilot-memory.is-guided .memory-controls [data-memory-next] { font-size: 18px; min-height: 58px; }
body .pilot-memory.is-guided .memory-controls [data-memory-replay] { font-size: 15px; }
body .pilot-memory.is-guided .memory-figure > figcaption { padding: 0; height: 0; }
body .pilot-memory.is-guided .memory-bottom { border-top: 0; }
@media(max-width:800px) {
 body .pilot-memory { margin: 18px 10px 28px; border-radius: 14px; }
 body .pilot-memory > .content-wrap { width: calc(100% - 28px); }
 body .pilot-memory.is-guided .memory-controls [data-memory-next] { font-size: 17px; }
}

@media(max-width:800px) {
 body .pilot-memory.is-guided .pilot-retrieval-question { top: 100px; left: 4%; width: 92%; padding: 16px 18px; }
 body .pilot-memory.is-guided .pilot-retrieval-question p { font-size: 19px; }
}

@media(max-width:800px) { body .pilot-memory.is-guided .memory-document .document-mark { display: none; } }

@media(min-width:651px) and (max-width:800px) { body .pilot-memory.is-guided .memory-source-document { width: 190px; } }

/* Match the other scenes' tap cue, without changing the button label. */
.memory-next-slot { position: relative; }
.memory-tap { display: none; position: absolute; width: 30px; height: 34px; right: -16px; bottom: -9px; overflow: visible; pointer-events: none; }
.is-guided:not([data-started]) .memory-tap { display: block; }
.memory-tap .service-tap-hand { fill: #fff7e9; stroke: #123653; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transform-origin: 50% 85%; animation: memory-point-tap 2.8s cubic-bezier(.22,1,.36,1) infinite; }
.memory-tap .service-tap-ring { fill: none; stroke: #fff7e9; stroke-width: 1.5; opacity: 0; transform-origin: 13px 7px; animation: memory-point-ring 2.8s ease-out infinite; }
@keyframes memory-point-tap { 0%,60%,100% { transform: translateY(3px) rotate(-9deg); } 18%,32% { transform: translateY(-3px) rotate(-3deg); } 42% { transform: translateY(1px) rotate(-7deg); } }
@keyframes memory-point-ring { 0%,16%,48%,100% { opacity: 0; transform: scale(.65); } 24% { opacity: .85; transform: scale(1); } 44% { opacity: 0; transform: scale(1.7); } }

/* Desktop player: leave a light surround and keep the controls inside the viewport. */
@media(min-width:801px) {
 body .pilot-memory { width: min(1120px, calc(100% - 96px)); margin: 32px auto 48px; }
 body .pilot-memory.is-guided { padding-block: 14px 12px; }
 body .pilot-memory > .content-wrap { width: calc(100% - 64px); }
 body .pilot-memory.is-guided .memory-toolbar { margin-bottom: 4px; }
 body .pilot-memory.is-guided .memory-toolbar a { min-height: 28px; }
 body .pilot-memory.is-guided .memory-heading h2 { margin: 0; font-size: 30px; }
 body .pilot-memory.is-guided .memory-scene { height: clamp(370px, calc(100svh - 330px), 460px); margin-top: 10px; }
 body .pilot-memory.is-guided .memory-phases { top: 12px; }
 body .pilot-memory.is-guided .memory-phase { font-size: 24px; }
 body .pilot-memory.is-guided .memory-building { width: 320px; top: 56%; }
 body .pilot-memory.is-guided .memory-document { width: 210px; padding: 12px; }
 body .pilot-memory.is-guided .memory-document-minutes { top: 130px; }
 body .pilot-memory.is-guided .memory-document-contract { top: 190px; }
 body .pilot-memory.is-guided .memory-document-history { top: 270px; }
 body .pilot-memory.is-guided .memory-source-document { top: 150px; }
 body .pilot-memory.is-guided .pilot-retrieval-question { top: 65px; padding: 12px 18px; }
 body .pilot-memory.is-guided .pilot-retrieval-question p { font-size: 22px; }
 body .pilot-memory.is-guided .pilot-answer { top: 170px; width: 290px; padding: 14px 18px; }
 body .pilot-memory.is-guided .pilot-answer p { font-size: 15px; line-height: 1.45; margin-top: 10px; }
 body .pilot-memory.is-guided .pilot-answer small { font-size: 11px; line-height: 1.45; margin-top: 10px; padding-top: 10px; }
 body .pilot-memory.is-guided .memory-bottom { padding-top: 0; }
 body .pilot-memory.is-guided .memory-controls { gap: 0; }
 body .pilot-memory.is-guided .memory-controls [data-memory-next] { min-height: 50px; padding-block: 10px; }
 body .pilot-memory.is-guided .memory-progress { margin-top: 4px; }
 body .pilot-memory.is-guided .resolution-line { font-size: clamp(34px, 4.5vw, 60px); }
}

body .pilot-memory.is-guided .pilot-file-raw { overflow-wrap: normal; font-size: 13px; }

.memory-phase { display: grid; }
.memory-typed-layer { grid-area: 1 / 1; }
.memory-letter { color: inherit; font: inherit; }
body .pilot-memory.is-guided .pilot-retrieval-question::after { opacity: var(--bubble-tail-opacity, 1); }

/* Browser chrome leaves less room on phones: trim empty space, not readable content. */
@media(max-width:800px) {
 body .pilot-memory.is-guided .memory-scene { height:480px; margin-top:16px; }
 body .pilot-memory.is-guided .memory-phases { top:18px; }
 body .pilot-memory.is-guided .memory-building { top:60%; }
 body .pilot-memory.is-guided .memory-source-document { top:380px; }
 body .pilot-memory.is-guided .pilot-answer { top:200px; }
 body .pilot-memory.is-guided .memory-bottom { padding-top:8px; }
}
