/* Lesson 07: notice boxes, the 3D house stage, the scenario console and the signs grid. Base tokens come from ../style.css, chips and meters from ../kit.css. */
:root { --warn: #ffb547; --cl: #c98a5e; --cn: #6fb0f0; --cpe: #b5dc5a; }
.notice { margin: 0 0 26px; padding: 16px 20px; border-left: 4px solid var(--warn); background: #2b2416; border-radius: 0 14px 14px 0; }
.notice b { color: var(--warn); font-size: .95rem; }
.notice p { margin: .4rem 0 0; font-size: .9rem; color: #f1e6d0; max-width: 900px; }
.notice-end { margin-top: 8px; }

.cl { color: var(--cl); } .cn { color: var(--cn); } .cpe { color: var(--cpe); } .cpen { color: #8fd0ff; }

.house-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.stage-wrap { position: sticky; top: 12px; min-width: 0; }
.stage { position: relative; isolation: isolate; height: clamp(400px, 66vh, 680px); border-radius: 16px; overflow: hidden; background: #0b1520; border: 1px solid var(--line); touch-action: none; }
.stage-btn { position: absolute; top: 10px; right: 10px; z-index: 2; min-height: 34px; padding: 4px 13px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: #0b1520d9; color: var(--text); border: 1px solid #a9bdc655; }
.stage-btn:hover { background: #203644; }
.stage canvas { display: block; }
.stage-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: var(--muted); font-size: .9rem; }
.stage-hint { font-size: .75rem; color: var(--muted); margin: 6px 2px 0; }
.labels-layer { position: absolute; inset: 0; pointer-events: none; }
.tag3d { pointer-events: auto; min-height: 0; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 650; background: #0b1520d9; color: var(--u); border: 1px solid #f5c76b66; box-shadow: 0 4px 12px #050c1399; transition: opacity .25s; }
.tag3d:hover { background: #203644; }
.tag3d.dim { opacity: .3; }
.tag3d.dev { display: none; font-size: .64rem; padding: 2px 7px; color: #e8eef0; border-color: #a9bdc655; }
.tag3d.dev.show { display: inline-block; }
.value3d { padding: 3px 9px; border-radius: 8px; font-size: .74rem; font-weight: 750; font-variant-numeric: tabular-nums; background: #0b1520e6; color: var(--text); border: 1px solid var(--line); white-space: nowrap; }
.value3d.hot { color: #fff; background: #a3241be6; border-color: #ff5c4d; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 2px 0; font-size: .74rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.lg-l::before { background: #ffb27a; } .lg-n::before { background: #7fd3ff; } .lg-pe::before { background: #9ff0a8; } .lg-d::before { background: #ff4a3d; } .lg-s::before { background: #e3d4ff; }

.console { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.console .group { margin-bottom: 6px; }
.board-chips button { flex: 1; }
.step-card { background: #10202c; border-radius: 14px; padding: 16px 18px; border-left: 3px solid var(--u); }
.step-card h3 { margin-bottom: 8px; }
.step-card p { font-size: .9rem; margin: 0; }
.step-count { font-size: .66rem !important; letter-spacing: .14em; text-transform: uppercase; color: var(--u); font-weight: 700; margin-bottom: 6px !important; }
.control { padding: 8px 2px 0; }
.console .meters { grid-template-columns: 1fr 1fr; margin: 8px 0 2px; }
.console .meters:empty { display: none; }
.console .meters strong { font-size: 1rem; }
.meters strong.ok { color: var(--ok); }
.outcome { margin: 8px 0 0; padding: 12px 14px; border-radius: 12px; font-size: .88rem; border: 1px solid; }
.outcome.ok { background: #16352a; border-color: #7ed6a066; color: #d4f3df; }
.outcome.warn { background: #3a2e14; border-color: #ffb54766; color: #ffe8c2; }
.outcome.dead { background: #4a1f1c; border-color: #ff5c4d88; color: #ffd8d2; }
.outcome b { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.step-nav { display: flex; gap: 8px; margin-top: 10px; }
.step-nav #prev, .step-nav #next { flex: 1; }
.step-nav .primary { background: #3a3220; border-color: #f5c76b88; color: var(--u); font-weight: 650; }
.step-nav .primary:hover { background: #4a4028; }
.part-card { position: relative; margin-top: 12px; padding: 14px 40px 12px 16px; border-radius: 12px; background: #10202c; border: 1px solid var(--line); font-size: .86rem; }
.part-card b { color: var(--u); }
.part-card p { margin: 4px 0 0; color: #d9e6e9; }
.part-card .close { position: absolute; top: 6px; right: 6px; min-height: 30px; width: 30px; padding: 0; font-size: 1rem; }

.signs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.signs article { background: #10202c; border-radius: 14px; padding: 16px; border-top: 3px solid var(--warn); }
.signs b { font-size: .95rem; }
.signs p { font-size: .84rem; color: var(--muted); margin: 6px 0 0; }

@media (max-width: 1000px) {
  .house-layout { grid-template-columns: 1fr; }
  .stage-wrap { position: relative; }
  .signs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .stage { height: 64vh; min-height: 360px; border-radius: 12px; }
  .panel.house-panel { padding: 18px 14px; }
  .signs { grid-template-columns: 1fr; }
  .notice { padding: 14px 16px; }
}

/* Full screen: stage left, console as a scrolling right column; stacked on narrow portrait screens. */
.house-layout.is-full { position: fixed; inset: 0; z-index: 100; height: 100vh; height: 100dvh; margin: 0; padding: 14px; gap: 16px; align-items: stretch; background: var(--bg); }
.is-full .stage-wrap { position: relative; top: 0; display: flex; flex-direction: column; min-height: 0; }
.is-full .stage { flex: 1; height: auto; min-height: 0; }
.is-full .stage-hint { display: none; }
.is-full .console { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.is-full .step-nav { position: sticky; bottom: 0; z-index: 1; margin-top: 6px; padding: 8px 0 2px; background: var(--bg); }
:root.no-scroll, :root.no-scroll body { overflow: hidden; }
@media (max-width: 1000px) {
  .house-layout.is-full { grid-template-columns: 1fr; grid-template-rows: minmax(0, 58fr) minmax(0, 42fr); padding: 10px; gap: 10px; }
  .is-full .legend { display: none; }
}
@media (max-width: 1000px) and (orientation: landscape) {
  .house-layout.is-full { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: none; }
}

#neutral-panel{background:#12232f;border:1px solid #3a515f;border-radius:14px;overflow:hidden}.neutral-toolbar{display:flex;gap:8px;flex-wrap:wrap;padding:12px}#neutral-stage{height:450px;position:relative;overflow:hidden}#neutral-stage canvas{display:block;touch-action:none}.neutral-labels{position:absolute;inset:0;pointer-events:none}.neutral-label{background:#10232deb;color:white;border:1px solid #7b929b;border-radius:7px;padding:5px 10px;text-align:center;white-space:pre-line;font-size:13px}.neutral-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding:16px}.neutral-controls label{display:grid;gap:6px;min-width:0}.neutral-controls input{width:100%}.neutral-controls output{font-weight:700;color:#f6c47b}#neutral-status{padding:0 16px 16px;margin:0;color:#f6c47b}.neutral-note{font-size:13px;color:#a8bac4}.electro-lock-scroll{overflow:hidden}#neutral-panel.electro-fullscreen{position:fixed;inset:0;width:100vw;height:100dvh;z-index:10000;display:flex;flex-direction:column;border-radius:0}#neutral-panel.electro-fullscreen #neutral-stage{flex:1;min-height:120px;height:auto}@media(max-width:650px){#neutral-stage{height:350px}.neutral-controls{gap:8px;padding:12px}.neutral-controls label{font-size:12px}.neutral-label{font-size:11px;padding:3px 5px}.neutral-toolbar button{font-size:12px;padding:8px}#neutral-status{font-size:12px}}
