/* Plates: the signature pictures. */
.plate { margin: .4rem 0 1.6rem; }
.plate-pin { border-block: 1px solid var(--rule); }
.plate-stage { padding: 1rem 0 .7rem; }
.plate-stage.steps { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.plate-cap { font-family: var(--serif); padding-bottom: .15rem; }
.plate-caps { display: grid; margin: 0 0 .1rem; }
.plate-capline { grid-area: 1 / 1; margin: 0; font-size: .9375rem; line-height: 1.42; color: var(--ink-2); opacity: 0; transition: opacity .25s; visibility: hidden; text-wrap: pretty; }
.plate-capline.now { opacity: 1; visibility: visible; }
.plate-ctl { display: flex; align-items: center; justify-content: center; gap: .1rem; }
.plate-btn { width: 2.75rem; height: 2.75rem; flex: none; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: var(--radius); color: var(--ink); }
.plate-btn:hover:not(:disabled) { background: var(--paper-sunk); }
.plate-btn:disabled { opacity: .25; cursor: default; }
.plate-dots { display: flex; align-items: center; justify-content: center; min-width: 0; }
.plate-dot { flex: 0 1 1.5rem; width: 1.5rem; height: 2.75rem; min-width: .9rem; padding: 0; background: none; border: 0; position: relative; }
.plate-dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: .6rem; height: .6rem; margin: -.3rem 0 0 -.3rem; border-radius: 2px; background: var(--rule); transition: background .2s, transform .2s; }
.plate-dot.on::after { background: var(--accent-tint); }
.plate-dot.now::after { background: var(--accent); transform: scale(1.25); }
.plate-still { margin-top: .8rem; font-family: var(--sans); font-size: .875rem; line-height: 1.4; }
.plate-still ol { padding-left: 1.3em; margin: .4rem 0 0; }
.plate-still li { margin: .3em 0; }

/* Shared motion: appear, and nothing loops. */
.fx { transition: opacity .5s var(--ease), transform .6s var(--ease); }
.fx.hide { opacity: 0; transform: translateY(.6rem); pointer-events: none; }
.fig { font-family: var(--sans); font-size: .8125rem; line-height: 1.3; color: var(--ink); position: relative; }
.fig .cursor { height: .95em; }
.fig h5 { font-family: var(--sans); font-size: .75rem; font-weight: 700; margin: 0 0 .35rem; }
.fig .tile { font-size: .8125rem; font-family: var(--sans); font-weight: 550; }
.fig .tile.mono, .fig .mono { font-family: var(--mono); }
.arcs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.arcs path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 3 3; }

/* 1: dolls */
.fig-dolls { display: block; }
.doll { padding: .55rem .5rem .6rem; border: 1.5px solid var(--accent); border-radius: 46% 46% .9rem .9rem / 2.2rem 2.2rem .9rem .9rem; background: color-mix(in srgb, var(--accent-tint) 30%, var(--paper-raised)); text-align: center; transition: opacity .5s var(--ease), transform .55s var(--ease); margin-top: .35rem; }
.doll.d0 { margin-top: 0; }
.doll.d2 { background: color-mix(in srgb, var(--accent-tint) 50%, var(--paper-raised)); }
.doll.d3 { background: color-mix(in srgb, var(--accent-tint) 72%, var(--paper-raised)); }
.doll.d4 { background: var(--accent-tint); color: var(--t-ink); }
.doll.fx.hide { opacity: .32; transform: none; pointer-events: none; }
.doll.fx.hide .doll-name { opacity: 0; }
.doll-name { transition: opacity .4s; }
.doll-name { display: block; font-weight: 650; font-size: .8125rem; line-height: 1.2; }
.doll-drop { display: inline-block; margin: .3rem 0 .1rem; }
.doll-drop.hide { transform: translateY(-2.2rem); }

/* 2: odds */
.odds-bars { display: grid; gap: .25rem; animation: redraw .45s var(--ease); }
@keyframes redraw { from { opacity: .15; transform: translateY(.3rem); } }
.odd { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr) 2.9rem; gap: .4rem; align-items: center; }
.odd-token { overflow-wrap: anywhere; }
.odd-track { height: .85rem; background: var(--paper-sunk); border-radius: 2px; overflow: hidden; display: block; }
.odd-track i { display: block; height: 100%; background: var(--rule-strong); border-radius: 2px; transition: width .4s var(--ease); }
.odd.pick .odd-track i { background: var(--accent); }
.odd.pick .odd-token { font-weight: 700; }
.odd-pct { text-align: right; }
.odds-sentence { font-family: var(--serif); font-size: 1.125rem; line-height: 1.6; margin: .8rem 0 .2rem; min-height: 3.4rem; }
.tile.fly { animation: fly-in .55s var(--ease); margin: 0 .05em; font-family: var(--mono); font-weight: 450; }
@keyframes fly-in { from { transform: translateY(-3.2rem); opacity: 0; } }

/* 3: desk */
.desk-text { font-family: var(--serif); font-size: 1.0625rem; margin: 0 0 .55rem; line-height: 1.5; min-height: 3.2rem; }
.desk-slot { display: inline-block; font-family: var(--mono); font-size: .9em; min-width: 3.2rem; text-align: center; padding: 0 .35em; border: 1.5px dashed var(--rule-strong); border-radius: .25em; }
.desk-slot.filled { border-style: solid; border-color: var(--ink); background: var(--t3); color: var(--t-ink); }
.desk-verdict { display: inline-block; font-family: var(--sans); font-size: .75rem; font-weight: 650; padding: 0 .4em; border-radius: .25em; margin-left: .15em; }
.desk-verdict.hide { display: none; }
.desk-verdict.bad { background: var(--bad-bg); }
.desk-verdict.warn { background: var(--good-bg); }
.desk { position: relative; background: var(--paper-sunk); border-radius: .5rem; padding: .4rem; overflow: hidden; }
.desk svg { display: block; width: 100%; height: auto; }
.knob { fill: var(--paper); stroke: var(--rule-strong); stroke-width: .7; }
.knob-tick { stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; transition: transform .7s var(--ease); }
.desk.frozen .knob { fill: var(--paper-sunk); }
.desk.frozen .knob-tick { stroke: var(--ink-3); }
.desk-stamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-6deg); font-weight: 750; font-size: 1rem; letter-spacing: .03em; text-transform: uppercase; color: var(--bad); border: 3px solid var(--bad); padding: .2rem .7rem; border-radius: .3rem; background: color-mix(in srgb, var(--paper-raised) 88%, transparent); white-space: nowrap; }
.desk-stamp.fx.hide { transform: translate(-50%, -50%) rotate(-6deg) scale(1.5); }

/* 4: meaning */
.fig-meaning { display: grid; }
.mean-map { grid-area: 1 / 1; position: relative; min-height: 15rem; background: var(--paper-sunk); border-radius: .5rem; overflow: hidden; transition: opacity .4s; }
.mean-map.gone { opacity: 0; }
.mean-word { position: absolute; transform: translate(-50%, -50%); font-weight: 600; font-size: .75rem; padding: .05rem .3rem; border-radius: .25rem; transition: left 1s var(--ease), top 1s var(--ease); white-space: nowrap; background: var(--t3); color: var(--t-ink); }
.mean-word.c-cat { background: var(--t1); } .mean-word.c-king { background: var(--t6); } .mean-word.c-soup { background: var(--t3); } .mean-word.c-rain { background: var(--t4); }
.mean-ctx { grid-area: 1 / 1; align-self: center; }
.mean-scale { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .1rem .6rem; align-items: start; }
.mean-track { grid-column: 1 / -1; grid-row: 2; position: relative; height: 1.5rem; border-bottom: 2px solid var(--rule-strong); margin: 0 .6rem; }
.mean-chip { position: absolute; bottom: -.7rem; transform: translateX(-50%); background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 650; padding: .05rem .4rem; border-radius: .25rem; transition: left .8s var(--ease); }
.mean-end { font-size: .75rem; color: var(--ink-2); line-height: 1.2; }
.mean-end.right { text-align: right; }
.mean-sentence { font-family: var(--serif); font-size: 1rem; line-height: 1.45; margin: 1.5rem 0 0; }
.mean-sentence mark { background: none; color: inherit; }
.m-word { font-weight: 700; color: var(--accent) !important; }
.m-attn { border-bottom: 2px solid var(--accent); }

/* 5: pile */
.pile-stage { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: .6rem; min-height: 15.5rem; align-items: end; }
.pile-col { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.pile { display: flex; flex-direction: column; animation: lift .9s var(--ease); }
.pile[data-lift="0"] { animation: redraw .5s var(--ease); }
@keyframes lift { 0% { transform: translateY(0); } 40% { transform: translateY(-1.6rem); } 100% { transform: translateY(0); } }
.pile .sheet { font-size: .6875rem; line-height: 1.3; padding: .16rem .4rem; background: var(--paper); border: 1px solid var(--rule-strong); margin-top: -1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: static; width: auto; max-width: none; border-radius: 0; box-shadow: none; animation: none; border-top-width: 1px; font-family: var(--sans); }
.pile .sheet.system { background: var(--paper-sunk); border-style: dashed; }
.pile .sheet.user { background: var(--t3); color: var(--t-ink); }
.pile .sheet.assistant { background: var(--t2); color: var(--t-ink); }
.desk-top { border-top: 3px solid var(--ink); font-size: .75rem; font-weight: 650; padding-top: .2rem; text-align: center; margin-top: .25rem; }
.pile-side { display: grid; gap: .45rem; align-content: end; min-width: 0; }
.pile-model { background: var(--ink); color: var(--paper); font-weight: 650; text-align: center; padding: .9rem .3rem; border-radius: .5rem; }
.pile-count { margin: 0; font-size: .8125rem; line-height: 1.2; }
.pile-count strong { display: block; font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; }
.pile-turn { margin: 0; font-size: .75rem; color: var(--ink-2); }

/* 6: die */
.fig-die { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: .8rem; align-items: center; }
.die { position: relative; aspect-ratio: 1; border: 2px solid var(--ink); border-radius: .9rem; overflow: hidden; background: var(--paper-sunk); }
.face { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; color: var(--t-ink); transition: left .7s var(--ease), top .7s var(--ease), width .7s var(--ease), height .7s var(--ease); outline: 1px solid var(--paper-raised); text-align: center; padding: .1rem; line-height: 1.15; }
.face.c1 { background: var(--t1); } .face.c2 { background: var(--t2); } .face.c3 { background: var(--t3); } .face.c4 { background: var(--t4); } .face.c5 { background: var(--t5); } .face.c6 { background: var(--t6); }
.face-t { font-size: .6875rem; font-weight: 600; overflow-wrap: anywhere; }
.face-p { font-size: .625rem; }
.dial { display: block; width: 100%; max-width: 9rem; margin: 0 auto; }
.dial-arc { fill: none; stroke: var(--rule-strong); stroke-width: 6; stroke-linecap: round; }
.dial-needle { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; transform-origin: 60px 62px; transition: transform .7s var(--ease); }
.dial-hub { fill: var(--ink); }
.dial-value { font-weight: 650; margin: .25rem 0 .1rem; text-align: center; }
.fig-die .range-ends { margin: 0; font-size: .6875rem; }
.dial-prompt { font-family: var(--serif); font-size: .875rem; line-height: 1.3; margin: .5rem 0 0; color: var(--ink-2); }

/* 7: lamp */
.lamp-text { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.45; margin: 0 0 .7rem; min-height: 7.6rem; }
.lamp-run { background: var(--paper-sunk); }
.lamp-run.again { background: var(--t1); color: var(--t-ink); font-weight: 600; }
.lamp-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.meter, .truth { background: var(--paper-sunk); border-radius: .5rem; padding: .5rem .6rem; display: grid; gap: .25rem; align-content: start; }
.meter-label { font-size: .75rem; font-weight: 650; line-height: 1.2; }
.meter-track { display: block; height: .7rem; background: var(--good-bg); border-radius: 2px; overflow: hidden; }
.meter-track i { display: block; height: 100%; width: 100%; background: var(--good); }
.meter-value { font-size: .75rem; color: var(--ink-2); line-height: 1.2; }
.truth-lamp { display: block; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--ink); transition: background .3s, box-shadow .3s; }
.truth.on .truth-lamp { background: var(--paper-raised); }
.truth.off .truth-lamp { background: var(--bad); }

/* 8: loop */
.fig-loop { display: grid; gap: .7rem; }
.circuit { position: relative; height: 12.5rem; }
.circuit svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wire { fill: none; stroke: var(--rule-strong); stroke-width: 2.5; }
.c-node { position: absolute; transform: translate(-50%, -50%); background: var(--paper-raised); border: 2px solid var(--rule-strong); border-radius: .5rem; padding: .3rem .5rem; font-weight: 600; font-size: .8125rem; text-align: center; width: 7.2rem; line-height: 1.15; transition: background .3s, border-color .3s, color .3s; z-index: 1; }
.c-node.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.spark { position: absolute; width: .9rem; height: .9rem; border-radius: 2px; background: var(--accent); transform: translate(-50%, -50%) translateY(1.5rem); transition: left .6s var(--ease), top .6s var(--ease), opacity .3s; z-index: 2; }
.hand-note { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .1rem; font-weight: 650; text-align: center; color: var(--warn); }
.hand-note.fx.hide { transform: translateX(-50%) translateY(.5rem); }
.fig-hand { width: 2.4rem; height: 2.4rem; fill: var(--warn-bg); stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.loop-side { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .4rem .8rem; align-items: center; }
.loop-tool { grid-column: 1 / -1; margin: 0; font-size: .75rem; background: var(--paper-sunk); padding: .3rem .5rem; border-radius: .3rem; min-height: 2.1rem; overflow-wrap: anywhere; animation: redraw .4s var(--ease); }
.gate { display: flex; align-items: center; gap: .4rem; }
.gate-label { font-weight: 650; }
.gate-bars { display: inline-flex; gap: 2px; }
.gate-bars i { width: .9rem; height: .7rem; border: 1px solid var(--rule-strong); border-radius: 1px; }
.gate-bars i.on { background: var(--accent); border-color: var(--accent); }
.stoplight { display: flex; align-items: center; gap: .25rem; justify-content: flex-end; grid-column: 3; }
.stoplight i { width: .8rem; height: .8rem; border-radius: 50%; background: var(--paper-sunk); border: 1px solid var(--rule-strong); transition: background .3s; }
.stoplight i.go { background: var(--good); border-color: var(--good); }
.stoplight i.stop { background: var(--bad); border-color: var(--bad); }

/* 9: bends */
.bend-chart { display: block; width: 100%; height: auto; }
.axis { stroke: var(--rule-strong); stroke-width: 1; }
.bend-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; transition: stroke-dashoffset .9s var(--ease); }
.bend-marks { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 330 / 104; pointer-events: none; }
.bend-mark { position: absolute; transform: translate(-100%, -100%); white-space: nowrap; font-size: .6875rem; line-height: 1.1; text-align: right; font-weight: 550; }
.bend-mark b { font-weight: 700; }
.bend-mark.fx.hide { transform: translate(-100%, -60%); }
.bend-mark.first { transform: translate(0, -100%); text-align: left; }
.bend-mark.first.fx.hide { transform: translate(0, -60%); }
.lanes { display: grid; gap: .3rem; margin-top: .7rem; }
.lane { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); align-items: center; justify-items: start; border-top: 1px solid var(--rule); padding-top: .3rem; min-height: 2rem; }
.lane-name { font-weight: 650; font-size: .75rem; }
.lane-slot { position: relative; height: 1.6rem; overflow: hidden; display: block; width: 100%; }
.lane-model { position: absolute; left: 0; top: .1rem; transition: transform .8s var(--ease), opacity .6s; }
.lane-model.out { transform: translateX(150%); opacity: 0; }
.lane-model.waiting { transform: translateX(-120%); opacity: 0; }
.lane-model.in { transform: none; opacity: 1; }

/* 10: campus */
.fig-campus { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: .8rem; align-items: end; min-height: 12.5rem; }
.campus { display: flex; align-items: flex-end; gap: .22rem; height: 8.5rem; border-bottom: 3px solid var(--ink); }
.tower { display: grid; grid-template-columns: repeat(2, .5rem); gap: .18rem; padding: .25rem; background: var(--accent-tint); border: 1.5px solid var(--accent); border-bottom: 0; border-radius: .15rem .15rem 0 0; transform-origin: bottom; }
.tower i { height: .5rem; background: color-mix(in srgb, var(--accent) 45%, var(--paper-raised)); border-radius: 1px; }
.tower.fx.hide { transform: scaleY(.2); }
.campus-label { margin: .4rem 0 0; font-weight: 600; min-height: 2.6rem; animation: redraw .4s var(--ease); line-height: 1.25; }
.campus-label .nums { display: block; font-weight: 400; color: var(--ink-2); font-size: .75rem; }
.chat-win { border: 2px solid var(--ink); border-radius: .6rem; overflow: hidden; display: flex; flex-direction: column; background: var(--paper); align-self: stretch; }
.chat-bar { display: flex; gap: 3px; padding: .3rem .4rem; border-bottom: 1px solid var(--rule); }
.chat-bar i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--rule-strong); }
.chat-count { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: .4rem .3rem; }
.chat-count b { font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; animation: redraw .5s var(--ease); }
.chat-count span { font-size: .75rem; color: var(--ink-2); line-height: 1.2; }
.chat-input { height: .55rem; margin: .4rem; border: 1px solid var(--rule-strong); border-radius: .5rem; }

/* 11: constitution */
.fig-constitution { position: relative; min-height: 13.5rem; }
.con-flow { display: grid; grid-template-columns: minmax(0, 1fr) 1.8rem minmax(0, 1fr); gap: .3rem; align-items: center; transition: opacity .4s; }
.con-flow.gone { opacity: 0; pointer-events: none; }
.con-sheet { background: var(--paper); border: 1px solid var(--rule-strong); border-radius: .3rem; padding: .5rem; min-height: 9.8rem; box-shadow: var(--shadow); }
.con-tag { font-weight: 650; font-size: .75rem; display: block; margin-bottom: .4rem; }
.con-lines { display: grid; gap: .45rem; }
.con-lines i { display: block; height: .4rem; background: var(--rule-strong); border-radius: 1px; transition: background .4s; position: relative; }
.con-lines i:nth-child(3n) { width: 72%; }
.con-lines i.strike { background: var(--bad); }
.con-lines i.new { background: var(--good); }
.con-arrow { height: 2px; background: var(--rule); position: relative; }
.con-arrow.on { background: var(--accent); }
.con-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border-left: 7px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; color: var(--rule); }
.con-arrow.on::after { color: var(--accent); }
.con-laws { margin: 0; padding-left: 1.2em; font-size: .75rem; line-height: 1.55; }
.con-critique { grid-column: 1 / -1; margin: .5rem 0 0; font-weight: 650; color: var(--bad); }
.con-tiers { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; align-items: end; text-align: center; font-weight: 650; }
.con-tiers.hide { pointer-events: none; }
.tier-form { display: grid; gap: .3rem; justify-items: center; }
.tier-shape { width: 100%; max-width: 5.2rem; background: var(--paper); border: 1px solid var(--rule-strong); padding: .3rem; display: grid; gap: .16rem; border-radius: .15rem; }
.tier-shape i { display: block; height: .18rem; background: var(--rule-strong); }
.f0 .tier-shape { height: 2rem; align-content: center; }
.f1 .tier-shape { height: 6.2rem; align-content: start; gap: .19rem; }
.f2 .tier-shape { height: 7.6rem; background: var(--accent-tint); border: 2px solid var(--accent); border-left-width: 7px; }
.f3 .tier-shape { height: 11rem; background: var(--accent); border-color: var(--accent); border-left: 10px solid color-mix(in srgb, var(--accent) 70%, var(--ink)); }

/* 12: split */
.split-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: .7rem; align-items: stretch; }
.stock { position: relative; background: var(--paper-sunk); border-radius: .5rem; padding: .4rem; min-height: 6.5rem; }
.stock svg { display: block; width: 100%; height: auto; }
.stock-line { fill: none; stroke: var(--good); stroke-width: 2.5; transition: d .8s var(--ease), stroke .5s; stroke-linejoin: round; }
.stock-line.fell { stroke: var(--bad); }
.stock-note { position: absolute; left: 44%; top: 34%; font-size: .6875rem; line-height: 1.15; }
.stock-note b { display: block; font-family: var(--serif); font-size: 1.25rem; color: var(--bad); }
.stock-name { position: absolute; left: .5rem; bottom: .3rem; font-size: .6875rem; color: var(--ink-2); }
.download { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .2rem; font-weight: 600; font-size: .75rem; border: 1.5px dashed var(--rule-strong); border-radius: .5rem; padding: .3rem; }
.download svg { width: 1.8rem; height: 1.8rem; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.paths { margin-top: .7rem; display: grid; gap: .35rem; }
.path-branch { display: grid; grid-template-columns: minmax(0, 1fr) 1.6rem minmax(0, 1fr); gap: .3rem; align-items: center; }
.path-from { font-weight: 600; background: var(--paper-sunk); border-radius: .3rem; padding: .3rem .45rem; }
.path-line { height: 2px; background: var(--ink-3); }
.path-to { border-radius: .3rem; padding: .3rem .45rem; font-weight: 650; color: var(--ink); }
.path-to.warn { background: var(--warn-bg); }
.path-to.good { background: var(--good-bg); }
.path-note { margin: .25rem 0 0; font-style: italic; font-family: var(--serif); font-size: .875rem; min-height: 2.2rem; }

/* 13: hospital */
.token-row { padding-inline: 2px; display: flex; flex-wrap: wrap; gap: .2rem; margin-bottom: .5rem; min-height: 1.6rem; }
.token-row .tile { font-family: var(--mono); transition: opacity .3s, transform .3s; }
.token-row .waiting { opacity: .35; }
.token-row .passed { opacity: .6; }
.token-row .passing { transform: translateY(-2px); outline: 2px solid var(--accent); }
.doors { display: block; width: 100%; height: auto; }
.hosp-counts { display: grid; gap: .1rem; margin-top: .5rem; font-size: .8125rem; }
.hosp-counts strong { font-family: var(--serif); font-size: 1rem; line-height: 1.25; }

/* 14: ladder */
.ladder-job { margin: 0 0 .4rem; min-height: 2.7rem; line-height: 1.25; }
.ladder-job b { display: block; font-size: .875rem; }
.ladder-job span { color: var(--ink-2); font-size: .75rem; }
.ladder-row { display: grid; grid-template-columns: 7.1rem minmax(0, 1fr) 3rem; gap: .35rem; align-items: center; min-height: 1.15rem; font-size: .6875rem; }
.ladder-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ladder-track { position: relative; height: 1.15rem; border-left: 1px solid var(--rule); background: linear-gradient(var(--rule), var(--rule)) center / 100% 1px no-repeat; display: block; }
.ladder-dot { position: absolute; top: 50%; width: .65rem; height: .65rem; margin: -.325rem 0 0 -.325rem; background: var(--accent); border-radius: 2px; transition: left .8s var(--ease); }
.ladder-cost { text-align: right; white-space: nowrap; font-size: .625rem; }
.ladder-row.axis .ticks { background: none; border: 0; height: 1.1rem; }
.ladder-row.axis em { position: absolute; transform: translateX(-50%); font-style: normal; color: var(--ink-3); font-size: .625rem; white-space: nowrap; }
.ladder-row.axis em:first-child { transform: none; }
.ladder-row.axis em:last-child { transform: translateX(-100%); }

/* 15: layers */
.layer-stack { display: flex; flex-wrap: wrap; gap: .2rem; margin-bottom: .55rem; }
.lay { padding: .18rem .45rem; border-radius: .25rem; font-weight: 600; font-size: .75rem; background: var(--paper-sunk); color: var(--ink-3); transition: background .3s, color .3s; }
.lay.on.c1 { background: var(--t1); } .lay.on.c2 { background: var(--t2); } .lay.on.c3 { background: var(--t3); } .lay.on.c4 { background: var(--t4); } .lay.on.c5 { background: var(--t5); }
.lay.on { color: var(--t-ink); }
.lay.now { outline: 2px solid var(--ink); }
.layer-pair { display: grid; gap: .5rem; }
@media (min-width: 40rem) { .layer-pair { grid-template-columns: 1fr 1.3fr; gap: 1rem; } }
.layer-new { margin: 0; font-size: .8125rem; line-height: 1.32; animation: redraw .4s var(--ease); min-height: 3.4rem; }
.layer-answer { margin: 0; font-family: var(--serif); font-size: .875rem; line-height: 1.42; background: var(--paper-sunk); border-radius: .4rem; padding: .5rem .6rem; min-height: 9.5rem; }

/* 16: handover */
.fig-handover { display: grid; grid-template-columns: minmax(0, 1.1fr) .7rem minmax(0, 1fr); gap: .3rem; min-height: 15.5rem; }
.hand-model { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.bubble { width: 100%; background: var(--paper-sunk); border: 1.5px solid var(--rule-strong); border-radius: .9rem; padding: .5rem; display: flex; flex-wrap: wrap; gap: .18rem; align-content: flex-start; transition: opacity .4s; }
.bubble b { width: 100%; font-size: .75rem; }
.bubble > span:not(.tile) { width: 100%; font-size: .75rem; color: var(--ink-2); }
.bubble .tile { font-size: .6875rem; }
.bubble-in { display: flex; flex-wrap: wrap; gap: .18rem; width: 100%; margin-top: .25rem; }
.bubble.you.emptied .tile { opacity: .25; }
.silhouette { width: 3.4rem; height: auto; fill: var(--ink); margin-top: .35rem; }
.sil-label { font-weight: 650; font-size: .75rem; text-align: center; margin-top: .15rem; }
.hand-wall { background: repeating-linear-gradient(0deg, var(--rule-strong) 0 8px, transparent 8px 13px); width: 3px; justify-self: center; transition: opacity .5s; }
.hand-wall.open { opacity: .15; }
.hand-you { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; align-items: center; }

/* 17: paths */
.fig-paths { position: relative; }
.fig-paths svg { display: block; width: 100%; height: auto; }
.road { fill: none; stroke: var(--rule-strong); stroke-width: 4; stroke-linecap: round; }
.road-loop { fill: none; stroke: var(--rule-strong); stroke-width: 3; stroke-dasharray: 5 4; transition: stroke .3s; }
.road-loop.on { stroke: var(--bad); }
.door-frame { fill: var(--paper-sunk); stroke: var(--ink); stroke-width: 2; }
.door-leaf { fill: var(--accent); transform-box: fill-box; transform-origin: left center; transition: transform .7s var(--ease); }
.door-leaf.open { transform: scaleX(.18); }
.walker { fill: var(--accent); stroke: var(--paper-raised); stroke-width: 2; transition: transform .8s var(--ease); }
.p-label { position: absolute; transform: translateX(-50%); font-weight: 650; font-size: .75rem; text-align: center; white-space: nowrap; }
.p-label.bad { color: var(--bad); }
.p-label.good { color: var(--good); }
.p-label.door-label { background: var(--accent); color: var(--on-accent); padding: 0 .35rem; border-radius: .2rem; }
.p-label.edge-l { left: 0; transform: none; }
.p-label.edge-r { right: 0; transform: none; }
.p-label.edge-r.fx.hide { transform: translateY(.6rem); }
.p-count { position: absolute; transform: translate(-50%, -50%); font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--bad); }

/* 18: stakes */
.fig-stakes { display: grid; gap: .3rem; }
.rung { border: 1.5px solid var(--rule); border-radius: .45rem; padding: .45rem .55rem; transition: border-color .3s, background .3s; }
.rung.on { border-color: var(--accent); }
.rung.now { background: var(--accent-tint); color: var(--t-ink); }
.rung-head { display: flex; flex-wrap: wrap; gap: 0 .5rem; align-items: baseline; }
.rung-head b { font-size: .875rem; }
.rung-head span { font-size: .75rem; opacity: .8; }
.rung-checks { display: flex; flex-wrap: wrap; gap: .2rem; margin-top: .3rem; min-height: 1.5rem; }

/* 19: workshop */
.ws-chat { display: flex; justify-content: space-between; align-items: center; border: 2px solid var(--ink); border-radius: .9rem; padding: .35rem .7rem; color: var(--ink-2); }
.ws-chat i { width: .8rem; height: .8rem; border-radius: 50%; background: var(--ink); }
.ws-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.8rem), 1fr)); gap: .28rem; margin-top: .4rem; }
.ws-tool { background: var(--paper-sunk); border-left: 3px solid var(--accent); padding: .25rem .4rem; border-radius: 0 .3rem .3rem 0; line-height: 1.18; min-height: 2.9rem; }
.ws-tool b { display: block; font-size: .75rem; }
.ws-tool span { font-size: .6875rem; color: var(--ink-2); }
.ws-tool.fx.hide { transform: translateY(-1.5rem) scale(.95); }

/* 20: recipe */
.ingredients { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .2rem; margin-bottom: .6rem; text-align: center; }
.ingredient { transition: opacity .4s, transform .5s var(--ease); }
.ingredient .tile { display: block; font-size: .6875rem; padding: .2rem .1rem; overflow-wrap: anywhere; }
.ingredient.used { opacity: .3; transform: translateY(.45rem); }
.ingredient.now { transform: translateY(.25rem); }
.recipe-sheet { background: var(--paper); border: 1px solid var(--rule-strong); border-radius: .35rem; padding: .55rem .65rem; box-shadow: var(--shadow); display: grid; gap: .4rem; min-height: 11rem; align-content: start; }
.recipe-line { display: grid; gap: .05rem; }
.recipe-line b { font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.recipe-line span { font-family: var(--serif); font-size: .9375rem; line-height: 1.3; }
.recipe-line.fx.hide { transform: translateY(-1.2rem); }

/* 21: coast */
.fig-coast { position: relative; height: 15rem; border-radius: .5rem; overflow: hidden; }
.fig-coast svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.water { fill: var(--t4); }
.land { fill: var(--t5); stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.coast-tag { position: absolute; font-weight: 700; color: var(--t-ink); font-size: .75rem; }
.land-tag { left: .6rem; top: .4rem; }
.water-tag { right: .6rem; bottom: .4rem; }
.coast-task { position: absolute; background: var(--paper-raised); color: var(--ink); padding: .15rem .4rem; border-radius: .25rem; font-weight: 600; font-size: .6875rem; line-height: 1.15; box-shadow: var(--shadow); max-width: 44%; }
.coast-task.fx.hide { transform: translateY(-2.4rem); }
.coast-task.t0 { left: 3%; top: 20%; }
.coast-task.t1 { right: 8%; top: 13%; }
.coast-task.t2 { left: 3%; bottom: 8%; }
.coast-task.t3 { left: 52%; bottom: 22%; }

/* 22: gates */
.gate-service { margin: 0 0 .6rem; min-height: 1.3rem; animation: redraw .4s var(--ease); }
.gate-service b { font-family: var(--serif); font-size: 1rem; }
.gate-road { position: relative; height: 2.2rem; border-bottom: 2px solid var(--rule-strong); margin-bottom: .1rem; }
.paragraph { position: absolute; bottom: .3rem; width: 2.2rem; display: grid; gap: 2px; padding: .25rem; background: var(--t3); border-radius: 2px; transition: left .8s var(--ease); }
.paragraph i { display: block; height: 2px; background: var(--t-ink); opacity: .6; }
.gate-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; }
.gate-col { padding: .35rem .35rem .35rem .5rem; border-left: 3px solid var(--good); position: relative; display: grid; gap: .1rem; align-content: start; transition: border-color .4s; min-height: 6.6rem; }
.gate-col b { font-size: .75rem; line-height: 1.15; }
.gate-state { font-size: .6875rem; line-height: 1.22; color: var(--ink-2); }
.gate-col.closed { border-left-color: var(--bad); background: var(--bad-bg); }
.gate-bar { display: block; height: .4rem; background: var(--good); border-radius: 1px; transition: background .4s, transform .5s var(--ease); transform-origin: left; }
.gate-col.closed .gate-bar { background: var(--bad); }
.gate-col.open .gate-bar { transform: scaleX(.3); }

/* 23: injection */
.fig-inject { position: relative; min-height: 15rem; }
.inj-top { transition: opacity .4s; display: grid; gap: .5rem; }
.inj-top.gone { opacity: 0; pointer-events: none; }
.webpage { position: relative; background: #fbfaf6; color: #2b2720; border: 1px solid var(--rule-strong); border-radius: .4rem; padding: .3rem .55rem .35rem; overflow: hidden; }
.webpage p { margin: .25rem 0; font-size: .75rem; line-height: 1.25; }
.web-bar { display: flex; gap: 3px; align-items: center; border-bottom: 1px solid #d8d2c4; padding-bottom: .2rem; font-size: .625rem; color: #6d675a; }
.web-bar i { width: .4rem; height: .4rem; border-radius: 50%; background: #c9c2b3; }
.web-bar span { margin-left: .3rem; }
.hidden-text { color: #fbfaf6; transition: color .5s; }
.hidden-text.shown { color: #a93a26; font-weight: 600; }
.lens { position: absolute; right: .3rem; top: .9rem; width: 3.3rem; height: 3.3rem; border-radius: 50%; border: 3px solid #2b2720; background: rgb(255 240 190 / 25%); }
.stream { background: var(--paper-sunk); border-radius: .4rem; padding: .35rem .5rem; }
.stream-label { font-weight: 650; font-size: .75rem; display: block; margin-bottom: .2rem; }
.stream-flow { display: flex; flex-wrap: wrap; gap: .25rem; }
.stream-tile { font-family: var(--mono); font-size: .625rem; line-height: 1.25; background: var(--t3); color: var(--t-ink); padding: .1rem .3rem; border-radius: .2rem; }
.trifecta { position: absolute; inset: 0; display: grid; gap: .3rem; align-content: start; }
.trifecta.hide { pointer-events: none; }
.tri { display: flex; gap: .55rem; align-items: center; font-weight: 600; font-size: .875rem; line-height: 1.2; }
.tri-switch { width: 2.5rem; height: 1.35rem; border-radius: .7rem; background: var(--rule); position: relative; flex: none; transition: background .3s; }
.tri-switch i { position: absolute; top: .15rem; left: .15rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--paper-raised); transition: transform .3s var(--ease); }
.tri.on .tri-switch { background: var(--bad); }
.tri.on .tri-switch i { transform: translateX(1.15rem); }
.tri-result { font-family: var(--serif); font-size: 1.0625rem; font-weight: 650; color: var(--bad); margin: .5rem 0 0; animation: redraw .4s var(--ease); }
.tri-result.safe { color: var(--good); }

/* 24: act */
.act-line { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--rule-strong); margin-left: .35rem; }
.act-line li { padding: .22rem 0 .22rem .7rem; position: relative; opacity: .4; transition: opacity .4s; line-height: 1.2; }
.act-line li::before { content: ""; position: absolute; left: -.36rem; top: .42rem; width: .62rem; height: .62rem; border-radius: 2px; background: var(--paper-raised); border: 2px solid var(--rule-strong); transition: background .3s, border-color .3s; }
.act-line li.on { opacity: 1; }
.act-line li.on::before { background: var(--accent); border-color: var(--accent); }
.act-line b { display: block; font-size: .75rem; font-weight: 700; }
.act-line span { font-size: .8125rem; }
.act-card { background: var(--accent-tint); color: var(--t-ink); border-radius: .5rem; padding: .55rem .8rem; margin-top: .55rem; text-align: center; font-family: var(--serif); font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.act-card p { margin: 0; }

/* 25: carrier */
.fig-carrier { display: grid; gap: .6rem; }
.scene-a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: .3rem; align-items: stretch; transition: opacity .4s; }
.scene-a.dim { opacity: .4; }
.win { border: 1.5px solid var(--ink); border-radius: .35rem; padding: .3rem .4rem; display: grid; gap: .22rem; align-content: start; min-height: 4.4rem; }
.win b { font-size: .75rem; }
.win i { height: .28rem; background: var(--rule-strong); border-radius: 1px; }
.carry { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; }
.carrier { position: absolute; top: .1rem; left: 50%; width: 1.7rem; height: 1.7rem; transform: translateX(-50%); transition: transform .8s var(--ease); }
.carrier svg { width: 100%; height: 100%; fill: var(--accent); }
.carrier.to-b { transform: translateX(10%); }
.carrier.to-a { transform: translateX(-110%); }
.carry-label { font-size: .6875rem; font-weight: 650; line-height: 1.15; animation: redraw .4s var(--ease); }
.folder { background: var(--t3); color: var(--t-ink); border-radius: 0 .5rem .5rem .5rem; padding: .5rem .6rem; position: relative; margin-top: .9rem; }
.folder-tab { position: absolute; left: 0; top: -1.15rem; background: var(--t3); padding: 0 .5rem; border-radius: .3rem .3rem 0 0; font-family: var(--mono); font-size: .6875rem; font-weight: 600; line-height: 1.15rem; }
.agent-loop { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: .25rem; }
.agent-loop li { display: flex; gap: .3rem; font-size: .75rem; line-height: 1.15; background: color-mix(in srgb, var(--paper-raised) 55%, transparent); padding: .25rem .35rem; border-radius: .25rem; }
.agent-loop .nums { font-weight: 700; }
.loop-back { display: block; margin-top: .3rem; font-weight: 700; font-size: .8125rem; text-align: center; }

/* 26: session */
.term-mock { background: var(--term-bg); color: var(--term-ink); border-radius: .45rem; padding: .6rem .7rem; font-family: var(--mono); font-size: .75rem; line-height: 1.42; min-height: 13rem; }
.term-mock .tl { margin: 0 0 .3rem; animation: redraw .4s var(--ease); overflow-wrap: anywhere; }
.term-mock .tl.tool { color: var(--term-dim); }
.term-mock .tl.tool::before { content: "$ "; }
.term-mock .tl.agent::before { content: "• "; color: var(--term-acc); }
.term-mock .fresh-session { color: var(--term-acc); }
.term-mock .cursor { background: var(--term-acc); }
.key-hint-row { min-height: 2.6rem; margin-top: .45rem; display: flex; align-items: center; }
.key-hint { display: inline-flex; gap: .5rem; align-items: center; font-weight: 600; animation: redraw .35s var(--ease); line-height: 1.2; }
.key-hint.idle { font-weight: 500; color: var(--ink-2); }
kbd { font-family: var(--mono); font-size: .8125rem; font-weight: 650; background: var(--paper-raised); border: 1px solid var(--ink); border-bottom-width: 3px; border-radius: .3rem; padding: .1rem .45rem; white-space: nowrap; }

/* 27: engine */
.car { position: relative; }
.car svg { display: block; width: 100%; height: auto; }
.car-body { fill: var(--paper-sunk); stroke: var(--ink); stroke-width: 2; }
.car-wheel { fill: var(--ink); }
.car-name { position: absolute; left: 62%; top: 22%; transform: translateX(-50%); font-weight: 750; font-size: .9375rem; }
.harness-parts { position: absolute; left: 44%; right: 12%; top: 38%; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .35rem; font-size: .6875rem; line-height: 1.2; color: var(--ink-2); }
.engine-block { position: absolute; left: 10%; top: 44%; background: var(--accent); color: var(--on-accent); border-radius: .25rem; padding: .25rem .5rem; font-weight: 700; font-size: .8125rem; transition: transform .8s var(--ease), opacity .5s; }
.engine-block.lifted { transform: translateY(-4.6rem) rotate(-4deg); }
.engine-block.old.gone { transform: translateY(-5rem) translateX(-1rem); opacity: 0; }
.engine-block.new { background: var(--ink); color: var(--paper); transform: translateY(-5rem); opacity: 0; }
.engine-block.new.in { transform: none; opacity: 1; }
.server-label { margin: .5rem 0 0; animation: redraw .45s var(--ease); line-height: 1.3; }
.server-label b { font-family: var(--serif); font-size: 1rem; display: inline-block; background: var(--warn-bg); padding: 0 .3rem; border-radius: .2rem; color: var(--ink); }

/* 28: climb */
.climb-ladder { position: relative; display: grid; gap: .25rem; padding-left: 0; }
.climb-rung { border: 1.5px solid var(--rule); border-radius: .4rem; padding: .32rem .6rem; min-height: 2.8rem; transition: background .4s, border-color .4s, color .4s; display: flex; align-items: center; justify-content: flex-end; text-align: right; font-weight: 600; line-height: 1.15; }
.climb-text { max-width: 58%; }
.climb-rung.on.l0 { background: var(--good-bg); border-color: var(--good); }
.climb-rung.on.l1 { background: color-mix(in srgb, var(--warn-bg) 55%, var(--good-bg)); border-color: var(--warn); }
.climb-rung.on.l2 { background: var(--warn-bg); border-color: var(--warn); }
.climb-rung.on.l3 { background: var(--bad-bg); border-color: var(--bad); }
.climb-app { position: absolute; left: .4rem; transition: bottom .8s var(--ease); }
.climb-app .tile { font-size: .75rem; }
.climb-badge { margin: .45rem 0 0; animation: redraw .4s var(--ease); }
.badge { display: inline-block; font-size: .875rem; padding: .08rem .5rem; border-radius: .25rem; }
.badge.l0 { background: var(--good-bg); } .badge.l1, .badge.l2 { background: var(--warn-bg); } .badge.l3 { background: var(--bad-bg); }

/* 29: puzzle */
.puzzle-request { font-family: var(--serif); font-size: 1.0625rem; font-weight: 600; margin: 0 0 .55rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.8rem), 1fr)); gap: .35rem; }
.slot { display: grid; gap: .15rem; }
.slot-name { font-size: .75rem; font-weight: 650; }
.slot-hole { display: grid; min-height: 3.6rem; border: 2px dashed var(--rule-strong); border-radius: .35rem; }
.piece { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: .2rem .35rem; font-size: .75rem; font-weight: 600; line-height: 1.15; border-radius: .25rem; }
.piece.wrong { background: var(--bad-bg); border: 1px solid var(--bad); margin: .3rem .3rem .1rem .3rem; }
.piece.right { background: var(--good-bg); margin: 0; }
.piece.wrong.fx.hide { transform: translateY(-1.4rem) rotate(12deg); }
.piece.right.fx.hide { transform: translateY(1.2rem); }

/* 30: build loop */
.wheel { position: relative; width: min(14.5rem, 100%); aspect-ratio: 1; margin: 0 auto; }
.wheel svg { position: absolute; inset: 14%; width: 72%; height: 72%; overflow: visible; }
.wheel-track { fill: none; stroke: var(--rule-strong); stroke-width: 3; }
.wheel.fail .wheel-track { stroke: var(--bad); }
.wheel-hand { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transform-origin: 50px 50px; transition: transform 1s var(--ease); }
.wheel-step { position: absolute; transform: translate(-50%, -50%); font-weight: 650; font-size: .75rem; background: var(--paper); padding: 0 .15rem; white-space: nowrap; }
.pin-line { position: relative; height: 3.2rem; border-bottom: 2px solid var(--ink); margin-top: .3rem; }
.pin { position: absolute; bottom: -.32rem; transform: translateX(-50%); display: flex; flex-direction: column-reverse; align-items: center; gap: .1rem; font-size: .6875rem; white-space: nowrap; }
.pin em { font-style: normal; font-family: var(--mono); font-size: .625rem; }
.pin i { width: .62rem; height: .62rem; border-radius: 50%; background: var(--accent); }
.pin.fx.hide { transform: translateX(-50%) translateY(-.8rem); }
.pin-head { position: absolute; bottom: -.4rem; width: .8rem; height: .8rem; margin-left: -.4rem; background: var(--ink); border-radius: 2px; transition: left .7s var(--ease); }
.pin-fail { position: absolute; top: 0; transform: translateX(-50%); color: var(--bad); font-weight: 700; font-size: .75rem; white-space: nowrap; }
.build-note { margin: .75rem 0 0; font-family: var(--mono); font-size: .75rem; animation: redraw .35s var(--ease); min-height: 1.1rem; }

/* 31: house: always night, in both themes */
.night { position: relative; background: #1a2030; border-radius: .5rem; overflow: hidden; }
.night svg { display: block; width: 100%; height: auto; }
.house-shape { fill: #2c3346; stroke: #7c86a0; stroke-width: 2; }
.wall { stroke: #7c86a0; stroke-width: 3; stroke-dasharray: 2 200; transition: stroke-dasharray .6s; }
.wall.built { stroke-dasharray: 200 0; stroke: #e7c86e; }
.h-door { transition: fill .4s; stroke: #e7dcc0; stroke-width: 1; }
.h-door.open { fill: #e7c86e; }
.h-door.shut { fill: #3c4560; }
.h-safe { transition: fill .4s; stroke: #e7dcc0; stroke-width: 1; }
.h-safe.open { fill: #e7c86e; }
.h-safe.shut { fill: #3c4560; }
.h-lock { fill: #e7dcc0; transition: opacity .4s; }
.doorstep { fill: #7c86a0; }
.bot { fill: #e8886f; }
.key-mat, .h-label { position: absolute; font-size: .6875rem; font-weight: 650; line-height: 1.1; color: #f1ecdd; transition: opacity .4s, transform .6s var(--ease); }
.key-mat { left: 16%; bottom: 1%; color: #1a2030; background: #e7c86e; padding: 0 .3rem; border-radius: .2rem; }
.key-mat.gone { opacity: 0; transform: translateX(-2rem); }
.h-label.door { left: 20%; top: 50%; transform: translateX(-50%); text-align: center; }
.h-label.safe { left: 39%; top: 44%; transform: translate(-50%, -100%); text-align: center; }
.h-label.room-a { left: 40%; bottom: 6%; font-size: 1rem; }
.h-label.room-b { left: 66%; bottom: 6%; font-size: 1rem; }
.h-label.bots { left: 3%; top: 4%; color: #e8886f; }
.house-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .15rem; }
.house-list li { display: flex; gap: .4rem; align-items: center; opacity: .5; transition: opacity .3s; }
.house-list li.on { opacity: 1; font-weight: 600; }
.house-tick { width: .75rem; height: .75rem; border: 1.5px solid var(--ink-3); border-radius: 2px; flex: none; }
.house-list li.on .house-tick { background: var(--accent); border-color: var(--accent); }

/* 32: request */
.req-road { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; padding-top: 1rem; }
.req-road::before { content: ""; position: absolute; left: 16%; right: 16%; top: .42rem; height: 2px; background: var(--rule-strong); }
.req-node { border: 1.5px solid var(--rule-strong); border-radius: .4rem; padding: .3rem .35rem; text-align: center; line-height: 1.15; transition: background .3s, border-color .3s; min-height: 4.3rem; }
.req-node b { display: block; font-size: .8125rem; }
.req-node span { font-size: .6875rem; color: var(--ink-2); }
.req-node.on { border-color: var(--accent); background: var(--accent-tint); color: var(--t-ink); }
.req-node.on span { color: inherit; }
.req-dot { position: absolute; top: 0; width: .85rem; height: .85rem; margin-left: -.42rem; background: var(--accent); border-radius: 2px; transition: left .7s var(--ease), opacity .3s; }
.req-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .3rem; margin-top: .5rem; }
.meter-box { background: var(--paper-sunk); border-radius: .35rem; padding: .3rem .5rem; display: grid; }
.meter-box span { font-size: .6875rem; color: var(--ink-2); line-height: 1.15; }
.meter-box b { font-family: var(--mono); font-size: .875rem; line-height: 1.3; overflow-wrap: anywhere; }
.meter-box em { font-style: normal; font-size: .6875rem; color: var(--ink-2); line-height: 1.15; }
.mcp-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; margin-top: .55rem; }
.mcp-port { font-weight: 750; background: var(--ink); color: var(--paper); border-radius: .7rem; padding: .1rem .7rem; }
.mcp-plug { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; font-size: .75rem; }
.mcp-plug i { width: 1.25rem; height: .55rem; border-radius: .3rem; border: 2px solid var(--ink); }

/* 33: road map */
.fig-roadmap { display: grid; gap: .15rem; }
.road-end { font-weight: 700; font-family: var(--serif); font-size: 1rem; }
.road-end.finish { color: var(--ink-3); transition: color .3s; }
.road-end.finish.lit { color: var(--accent); }
.stops { list-style: none; padding: 0; margin: .1rem 0 .1rem .55rem; border-left: 2px solid var(--rule-strong); }
.stop { display: flex; gap: .55rem; padding: .18rem 0; align-items: center; margin-left: -.72rem; line-height: 1.2; color: var(--ink-2); }
.stop-dot { width: 1.3rem; height: 1.3rem; flex: none; border-radius: 50%; background: var(--paper-raised); border: 2px solid var(--rule-strong); display: inline-flex; align-items: center; justify-content: center; font-size: .625rem; font-weight: 700; transition: background .3s; }
.stop.lit { color: var(--ink); font-weight: 600; }
.stop.lit .stop-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* 34: river */
.fig-river { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .7rem; }
.river-window { height: 15.5rem; overflow: hidden; background: var(--t4); border-radius: .5rem; padding: .3rem; }
.river-flow { display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; transition: transform 1.1s var(--ease); }
.river-flow .tile.c4 { background: var(--paper-raised); color: var(--ink); }
.river-flow .tile { font-size: .75rem; white-space: nowrap; height: 1.6rem; display: flex; align-items: center; }
.shelf { display: flex; flex-direction: column; gap: .22rem; }
.stone { background: var(--paper-sunk); border: 1px solid var(--rule-strong); border-radius: .4rem .55rem .3rem .5rem; padding: .22rem .45rem; font-weight: 600; font-size: .75rem; line-height: 1.15; }

.fig-checked { font-size: .6875rem; color: var(--ink-3); margin: .35rem 0 0; line-height: 1.2; }
