:root {
  --ink: #161711;
  --wall: #c8c1ae;
  --paper: #e9e1c8;
  --steel-light: #b8b9b4;
  --steel-mid: #73756f;
  --steel-dark: #343630;
  --amber: #ffb000;
  --amber-dim: #6b4c12;
  --red: #bd2b22;
  --red-dark: #57140f;
  --green: #263b31;
  --light-level: 1;
  --elevator-speed: 1;
  color-scheme: dark;
  font-family: "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body {
  min-width: 300px;
  min-height: 100vh;
  margin: 0;
  padding: 28px;
  overflow-x: hidden;
  color: #11120e;
  background-color: var(--wall);
  background-image:
    repeating-linear-gradient(91deg, transparent 0 4px, rgba(255,255,255,.045) 4px 5px),
    repeating-linear-gradient(3deg, transparent 0 23px, rgba(41,39,30,.05) 23px 24px);
}

button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 9px 12px;
  color: #111;
  background: var(--amber);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.building-shell {
  position: relative;
  display: grid;
  grid-template-columns: 236px minmax(560px, 1fr) 178px;
  gap: 18px;
  width: min(1380px, 100%);
  height: min(830px, calc(100vh - 56px));
  min-height: 660px;
  margin: 0 auto;
}

.building-plaque,
.control-panel {
  position: relative;
  align-self: center;
  border: 3px solid #484942;
  box-shadow: 0 12px 25px rgba(34,31,23,.24), inset 0 0 0 2px rgba(255,255,255,.22);
}

.building-plaque {
  min-height: 570px;
  padding: 29px 22px 22px;
  background: var(--paper);
  transform: rotate(-.35deg);
}
.plaque-screws i,
.panel-screws i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4c4d48;
  box-shadow: inset 1px 1px 0 #a9aaa4;
}
.plaque-screws i:nth-child(1), .panel-screws i:nth-child(1) { top: 9px; left: 9px; }
.plaque-screws i:nth-child(2), .panel-screws i:nth-child(2) { top: 9px; right: 9px; }
.plaque-screws i:nth-child(3), .panel-screws i:nth-child(3) { bottom: 9px; left: 9px; }
.plaque-screws i:nth-child(4), .panel-screws i:nth-child(4) { right: 9px; bottom: 9px; }
.plaque-kicker,
.controls-label,
.floor-label,
.system-message,
.stop-message,
.stop-label {
  margin: 0;
  font: 700 11px/1.3 "Courier New", monospace;
  letter-spacing: .1em;
}
.building-plaque h1 {
  margin: 18px 0 12px;
  font-size: clamp(52px, 5vw, 72px);
  line-height: .78;
  letter-spacing: -.075em;
}
.plaque-subtitle { margin: 0 0 26px; font-weight: 900; line-height: 1.08; letter-spacing: .04em; }
.inspection-list { margin: 0; border-top: 2px solid #111; font: 700 10px/1.25 "Courier New", monospace; }
.inspection-list div { padding: 9px 0; border-bottom: 1px solid rgba(17,17,17,.55); }
.inspection-list dt { margin-bottom: 3px; text-transform: uppercase; opacity: .55; }
.inspection-list dd { margin: 0; text-transform: uppercase; }
.source-dossier {
  position: absolute;
  right: 19px;
  bottom: 25px;
  left: 19px;
  display: block;
  color: #8b2019;
  font-family: "Courier New", monospace;
  text-decoration: none;
  transform: rotate(1.3deg);
}
.origin-record {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-bottom: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(157,40,31,.75);
  background: rgba(157,40,31,.035);
}
.origin-badge {
  padding: 4px 5px 3px;
  color: var(--paper);
  background: #9d281f;
  font: 900 10px/1 "Courier New", monospace;
  letter-spacing: -.04em;
}
.origin-copy { min-width: 0; }
.origin-copy small,
.origin-copy strong { display: block; }
.origin-copy small {
  margin-bottom: 2px;
  font: 700 8px/1 "Courier New", monospace;
  letter-spacing: .08em;
  opacity: .72;
}
.origin-copy strong {
  font: 900 9px/1.1 "Courier New", monospace;
  letter-spacing: -.01em;
}
.origin-arrow { font: 900 15px/1 "Courier New", monospace; }
.source-stamp {
  display: block;
  padding: 10px;
  border: 2px solid #9d281f;
  color: #8b2019;
  font: 900 13px/1.1 "Courier New", monospace;
}
.source-stamp span { font-size: 10px; }
.source-dossier:hover .origin-record,
.source-dossier:focus-visible .origin-record { background: rgba(157,40,31,.1); }
.source-dossier:hover .source-stamp,
.source-dossier:focus-visible .source-stamp {
  color: var(--paper);
  background: #8b2019;
}
.source-dossier:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }

.elevator-car {
  display: grid;
  grid-template-rows: 92px minmax(0, 1fr) 30px;
  min-width: 0;
  border: 8px solid var(--steel-dark);
  background: var(--steel-mid);
  box-shadow: 0 18px 38px rgba(20,19,15,.4), inset 0 0 0 2px #d2d3ce;
  filter: brightness(var(--light-level));
  transition: filter .25s ease;
}
.indicator-panel {
  display: grid;
  grid-template-columns: 96px minmax(0,1fr) 92px;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border-bottom: 5px solid var(--steel-dark);
  background: repeating-linear-gradient(92deg, #92938e 0 2px, #a7a8a3 2px 4px, #7d7f79 4px 5px);
}
.indicator-status,
.debt-readout {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  background: #0c0e09;
  border: 3px inset #5b5d56;
  text-shadow: 0 0 7px rgba(255,176,0,.55);
}
.indicator-status { gap: 8px; font: 700 30px/1 "Courier New", monospace; }
.up-arrow { animation: arrowBlink 1.2s steps(2,end) infinite; }
.debt-readout { flex-direction: column; min-width: 0; padding: 5px 12px; }
.debt-readout > span { max-width: 100%; overflow: hidden; font: 700 clamp(22px, 3vw, 39px)/1 "Courier New", monospace; letter-spacing: -.07em; white-space: nowrap; }
.debt-readout small { margin-top: 6px; color: #94701d; font: 700 8px/1 "Courier New", monospace; letter-spacing: .11em; }
.chime-toggle { border: 2px outset #bfc0bb; color: #171813; background: #989a94; font: 800 10px/1.2 "Courier New", monospace; cursor: pointer; }

@keyframes arrowBlink { 50% { opacity: .38; } }
@keyframes carShudder { 0%,100% { transform: translateX(0); } 35% { transform: translateX(calc(-1px * var(--elevator-speed))); } 70% { transform: translateX(calc(1px * var(--elevator-speed))); } }

.door-frame {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background-color: #ded6bd;
  background-image:
    linear-gradient(rgba(255,255,255,.12), rgba(0,0,0,.06)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(28,29,24,.035) 79px 80px);
  box-shadow: inset 0 0 38px rgba(30,30,23,.32);
}
.car-light { position: absolute; z-index: 0; top: 0; right: 12%; left: 12%; height: 10px; background: #ffffe1; box-shadow: 0 7px 30px #fffbd2; opacity: .74; }
.floor-content { position: absolute; z-index: 1; inset: 0; }
.floor-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px clamp(25px, 6vw, 74px) 28px;
  overflow-y: auto;
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
}
.floor-panel.active { opacity: 1; transform: none; transition: opacity .3s ease, transform .3s ease; }
.floor-panel.with-call { justify-content: flex-start; }
.floor-story { display: flex; flex: 1 1 auto; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 0; }
.floor-story.source-story { justify-content: flex-start; overflow: hidden; }
.floor-label { align-self: stretch; margin-bottom: 14px; padding-bottom: 7px; border-bottom: 1px solid rgba(17,18,14,.45); text-align: left; }
.floor-panel h2 { margin: 0; max-width: 860px; font-size: clamp(36px, 5.3vw, 70px); line-height: .9; letter-spacing: -.045em; }
.floor-panel h2 em { color: var(--red); font-style: normal; }
.lead { max-width: 630px; margin: 20px auto 25px; font: 700 clamp(17px, 2vw, 23px)/1.25 Arial, Helvetica, sans-serif; letter-spacing: -.018em; }
.lead.compact { margin: 10px auto 14px; font-size: 16px; }
.floor-panel[data-floor="0"] .lead { margin-bottom: 13px; }
.route-notice { display: grid; grid-template-columns: 166px minmax(0,1fr); align-items: stretch; gap: 0; width: min(590px,100%); border: 3px solid #1b251f; color: #efe6cc; background: var(--green); box-shadow: 4px 4px 0 rgba(31,35,28,.24), inset 0 0 0 1px rgba(237,226,194,.22); font-family: "Courier New", monospace; text-align: left; transform: rotate(-.18deg); }
.route-notice > span { display: grid; place-items: center; padding: 9px 11px; color: #1c180d; background: var(--amber); font-size: 9px; font-weight: 900; line-height: 1.2; letter-spacing: .07em; text-align: center; }
.route-rule { display: grid; align-content: center; gap: 3px; padding: 8px 12px; }
.route-rule strong { color: #fff0c8; font-size: 14px; line-height: 1; letter-spacing: .035em; }
.route-rule b { color: #cfc7af; font-size: 9px; line-height: 1.15; letter-spacing: .035em; }
.route-notice small { grid-column: 1 / -1; padding: 5px 8px; border-top: 1px solid rgba(239,230,204,.35); color: #d3cbb4; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-align: center; }

.door {
  position: absolute;
  z-index: 10;
  top: 0;
  bottom: 0;
  width: calc(50% + 1px);
  overflow: hidden;
  border: 2px solid #575852;
  background: repeating-linear-gradient(91deg, #a5a6a1 0 2px, #888a84 2px 4px, #b8b9b4 4px 5px, #81837d 5px 8px);
  box-shadow: inset 0 0 45px rgba(25,26,22,.22);
  transition: transform calc(.54s / var(--elevator-speed)) cubic-bezier(.7,0,.25,1);
  pointer-events: none;
}
.door::before { content: "PUBLIC LIABILITY LIFT"; position: absolute; top: 47%; width: 250px; color: rgba(33,34,29,.32); font: 800 12px/1 "Courier New", monospace; letter-spacing: .13em; }
.door-left { left: 0; transform: translateX(-101%); }
.door-left::before { right: 20px; text-align: right; }
.door-right { right: 0; transform: translateX(101%); }
.door-right::before { left: 20px; text-align: left; }
.door-frame.doors-closed .door { transform: translateX(0); }
.door-grain { position: absolute; inset: 0; opacity: .28; background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(255,255,255,.25) 5px 6px); }
.elevator-car.travelling { animation: carShudder .12s linear infinite; }

.achievement {
  display: grid;
  gap: 3px;
  margin: 0 0 18px;
  padding: 9px 15px;
  border: 3px solid var(--red);
  color: var(--red);
  background: rgba(233,225,200,.84);
  font-family: "Courier New", monospace;
  transform: rotate(-1.5deg);
  animation: stampIn .35s cubic-bezier(.1,.8,.2,1.4);
}
.achievement span { font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.achievement strong { font-size: 23px; }
@keyframes stampIn { from { opacity: 0; transform: scale(1.8) rotate(-9deg); } }

.hero-actions { display: flex; gap: 11px; justify-content: center; margin-top: 14px; }
.industrial-button {
  min-height: 44px;
  padding: 11px 15px;
  border: 3px outset #d1d2cd;
  border-radius: 2px;
  color: #171813;
  background: #9fa19b;
  box-shadow: 0 5px 0 #444640;
  font: 900 12px/1 "Courier New", monospace;
  letter-spacing: .035em;
  cursor: pointer;
}
.industrial-button:hover { background: #b6b8b1; }
.industrial-button:active { transform: translateY(4px); box-shadow: 0 1px 0 #444640; }
.industrial-button.primary { color: #1b1608; background: var(--amber); border-color: #ffd163; box-shadow: 0 5px 0 #79560d; }
.industrial-button.action-button { margin: 16px 0 10px; }
.industrial-button.mini { width: 100%; min-height: 34px; padding: 7px; box-shadow: 0 3px 0 #444640; }
.text-button { margin-top: 18px; padding: 9px 2px 5px; border: 0; border-bottom: 2px solid currentColor; color: #111; background: transparent; font: 900 12px/1 "Courier New", monospace; cursor: pointer; }
.text-button:disabled { opacity: .35; cursor: not-allowed; }
.floor-call { position: relative; display: grid; flex: 0 0 auto; grid-template: "kicker glyph" auto "label glyph" auto / 1fr 44px; gap: 4px 13px; align-items: center; width: 238px; min-width: 238px; margin: 12px auto 34px; padding: 10px 10px 10px 14px; overflow: hidden; border: 3px solid #2a2518; color: #19170f; background: var(--amber); box-shadow: 0 6px 0 #71500d, 0 0 0 0 rgba(255,176,0,.46); text-align: left; animation: callAttention 2.2s ease-in-out infinite; }
.floor-call .call-kicker { grid-area: kicker; font-size: 8px; letter-spacing: .12em; opacity: .64; }
.floor-call strong { grid-area: label; font-size: 14px; letter-spacing: .035em; }
.floor-call .call-glyph { grid-area: glyph; display: grid; place-items: center; align-self: stretch; min-height: 38px; color: var(--amber); background: #171813; font-size: 19px; }
.floor-call:hover { color: #111; background: #ffc13e; transform: translateY(-1px); box-shadow: 0 7px 0 #71500d, 0 0 18px rgba(255,176,0,.48); }
.floor-call:active { transform: translateY(5px); box-shadow: 0 1px 0 #71500d; animation: none; }
.floor-call:disabled { opacity: .76; border-color: #50514b; color: #34352f; background: #a9aaa4; box-shadow: 0 4px 0 #555750; animation: none; cursor: not-allowed; }
.floor-call:disabled .call-glyph { color: #f6e7c9; background: var(--red); }
@keyframes callAttention { 50% { box-shadow: 0 6px 0 #71500d, 0 0 0 8px rgba(255,176,0,0); } }
.system-message { min-height: 16px; margin: 15px 0 0; color: #533d13; }
.punchline { margin: 20px 0 0; font-size: clamp(23px, 3.4vw, 42px); font-weight: 900; line-height: .95; }
.punchline.small { max-width: 650px; font-size: clamp(20px, 2.6vw, 33px); }

.object-scene { display: flex; align-items: center; gap: 22px; margin: 24px 0 4px; font: 900 27px/1 "Courier New", monospace; }
.house-icon { display: grid; place-items: center; width: 80px; height: 68px; border: 5px solid #22231e; font-size: 56px; line-height: 1; }
.bill-stack { padding: 8px 15px; border: 2px dashed #22231e; font-size: 13px; line-height: 1.35; transform: rotate(2deg); }

.lever-unit { display: grid; grid-template-columns: auto minmax(180px, 400px) 52px; align-items: center; gap: 14px; width: min(610px, 100%); margin: 31px auto 4px; padding: 17px; border: 4px solid #30312c; background: #777973; box-shadow: inset 0 0 0 2px #bcbdb7; }
.lever-unit label, .yield-control > span { font: 900 12px/1 "Courier New", monospace; letter-spacing: .09em; }
.lever-unit output { display: grid; place-items: center; height: 42px; color: var(--amber); background: #151610; font: 900 21px/1 "Courier New", monospace; }
input[type="range"] { width: 100%; height: 28px; accent-color: var(--red); cursor: grab; }
input[type="range"]:active { cursor: grabbing; }

.due-date-machine { display: flex; align-items: center; gap: 24px; margin: 26px 0 0; padding: 12px 20px; border: 4px solid #43443f; color: var(--amber); background: #10120d; font: 900 12px/1 "Courier New", monospace; }
.due-date-machine strong { min-width: 100px; padding-left: 19px; border-left: 1px solid var(--amber-dim); font-size: 35px; }
.due-date-machine.rolling strong { animation: yearRoll .38s steps(5,end); }
@keyframes yearRoll { 0% { transform: translateY(-12px); opacity: .2; } 100% { transform: none; opacity: 1; } }

.ceiling-rig { width: min(650px, 100%); margin: 28px auto 0; }
.ceiling-line { position: relative; height: 66px; margin-bottom: 18px; border-top: 8px solid #272822; transition: transform .12s linear; }
.ceiling-line::before, .ceiling-line::after { content: ""; position: absolute; top: -8px; width: 26px; height: 50px; border: 3px solid #272822; border-top: 0; }
.ceiling-line::before { left: 9%; }.ceiling-line::after { right: 9%; }
.ceiling-line span { position: relative; top: 9px; display: inline-block; padding: 6px 10px; color: #f3e9cf; background: var(--red); font: 900 12px/1 "Courier New", monospace; letter-spacing: .05em; }
.ceiling-rig label { display: block; margin-bottom: 4px; font: 900 12px/1 "Courier New", monospace; }
.ceiling-rig.authorized .ceiling-line { border-color: var(--green); }
.ceiling-rig.authorized .ceiling-line span { background: var(--green); }

.price-board { width: min(650px, 100%); margin: 18px auto 14px; border: 4px solid #363832; background: #e8e0c9; }
.price-board div { display: grid; grid-template-columns: 1fr 1fr; padding: 9px 13px; border-bottom: 2px dotted #5b5a50; font: 900 12px/1 "Courier New", monospace; }
.price-board div:last-child { border: 0; color: #f1e6c5; background: var(--red); }
.price-board span { text-align: left; }.price-board strong { text-align: right; }
.yield-control { display: grid; grid-template-columns: auto minmax(150px, 380px) 70px; align-items: center; gap: 13px; width: min(650px,100%); }
.yield-control output { padding: 7px; color: var(--amber); background: #12130f; font: 900 18px/1 "Courier New", monospace; }
.cost-simulator { width: min(650px,100%); margin-top: 9px; border: 3px solid #343630; background: #b8b9b4; font: 900 10px/1 "Courier New", monospace; box-shadow: inset 0 0 0 1px #dedfd9; }
.cost-simulator > div:first-child, .cost-simulator p { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 7px 9px; }
.cost-simulator > div:first-child strong { color: var(--amber); padding: 5px 8px; background: #12130f; font-size: 16px; }
.cost-track { height: 12px; margin: 0 9px; overflow: hidden; border: 2px inset #696b65; background: #292a25; }
.cost-track i { display: block; width: 34%; height: 100%; background: var(--green); transition: width .16s linear, background .16s linear; }
.cost-simulator p { border-top: 1px solid #686962; font-size: 9px; }
.cost-simulator p span { opacity: .65; }
.cost-simulator[data-status="rising"] .cost-track i { background: var(--amber); }
.cost-simulator[data-status="over"] .cost-track i { background: var(--red); }
.cost-simulator[data-status="over"] #load-status { color: #f6e5c8; padding: 4px 6px; background: var(--red); }

.request-stack { display: grid; flex: 1 1 auto; gap: 9px; width: min(720px,100%); min-height: 0; max-height: 315px; overflow-y: auto; text-align: left; }
.request-card { display: grid; grid-template-columns: 132px 1fr; gap: 0; border: 2px solid #292a25; background: rgba(239,231,207,.78); font: 700 11px/1.35 "Courier New", monospace; transform: rotate(var(--tilt,0deg)); }
.request-card span, .request-card strong { padding: 8px 10px; border-bottom: 1px solid rgba(41,42,37,.4); }
.request-card span { color: rgba(22,23,17,.58); }.request-card strong { border-left: 1px solid rgba(41,42,37,.4); }
.request-card a { color: #712019; text-underline-offset: 2px; }
.request-card .status { color: #f3ead1; background: var(--green); }
.record-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; padding: 7px 8px; border-top: 2px solid #292a25; background: #a5a398; }
.record-actions button, .record-actions a { min-height: 30px; margin: 0; padding: 7px 9px; border: 1px solid #1e1f1a; color: #1a1b16; background: #e4dcc5; font: 900 10px/1 "Courier New", monospace; text-decoration: none; cursor: pointer; }
.record-actions button:first-child { color: #f4e6c5; background: var(--red); }
.record-action-status { flex: 1 1 100%; min-height: 11px; margin: 2px 0 0; color: #3d3218; font: 800 9px/1.3 "Courier New", monospace; }
.loading-records { font: 700 11px/1 "Courier New", monospace; }

.roof-grid { display: flex; align-items: flex-start; justify-content: space-around; width: min(680px,90%); height: 34px; margin-bottom: 5px; border-top: 6px dashed var(--red); }
.roof-grid span { width: 8px; height: 32px; background: repeating-linear-gradient(135deg,#222 0 5px,var(--amber) 5px 10px); }
.future-floors { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 20px 0; }
.future-floors span { padding: 7px 10px; border: 2px solid #33342e; background: rgba(234,226,202,.72); font: 900 13px/1 "Courier New", monospace; }
.final-lockup { margin: 0 0 5px; font-size: clamp(27px,4vw,48px); font-weight: 900; line-height: .7; }
.final-lockup span { font: 800 10px/1 "Courier New", monospace; letter-spacing: .11em; }
.roof-ca-strip { display: grid; grid-template-columns: auto minmax(110px,1fr) auto auto; align-items: center; gap: 7px; width: min(680px,100%); margin-top: 11px; padding: 7px; border: 3px solid #2c2d28; background: #8b8d86; box-shadow: inset 0 0 0 1px #c5c6c0; font: 900 9px/1 "Courier New", monospace; text-align: left; }
.roof-ca-strip code { overflow: hidden; padding: 7px; color: var(--amber); background: #10120d; text-overflow: ellipsis; white-space: nowrap; }
.roof-ca-strip button, .roof-ca-strip a { min-height: 29px; padding: 7px 8px; border: 1px solid #171813; color: #171813; background: #e0d8c0; font: 900 9px/1 "Courier New", monospace; text-decoration: none; cursor: pointer; }
.roof-ca-strip button { color: #f7e7c8; background: var(--red); }
.roof-ca-strip small { grid-column: 1 / -1; min-height: 9px; color: #f7e7c8; }
.service-panel { width: min(680px,100%); margin-top: 12px; padding: 12px; border: 4px solid #2c2d28; background: #777973; box-shadow: inset 0 0 0 2px #bfc0bb; text-align: left; }
.service-panel > span { display: block; margin-bottom: 7px; font: 800 9px/1 "Courier New", monospace; }
.service-panel code { display: block; overflow: hidden; padding: 9px; color: var(--amber); background: #0f110c; font: 700 11px/1.2 "Courier New", monospace; text-overflow: ellipsis; white-space: nowrap; }
.service-panel button, .service-panel a { display: inline-block; margin: 9px 7px 0 0; padding: 6px 8px; border: 1px solid #111; color: #111; background: #d8d1bc; font: 900 10px/1 "Courier New", monospace; text-decoration: none; cursor: pointer; }
.service-panel p { margin: 8px 0 0; color: #fff0b9; font: 700 10px/1 "Courier New", monospace; }

.liability-crate { position: absolute; z-index: 4; right: 14px; bottom: 12px; display: grid; grid-template-rows: auto 1fr; width: 126px; min-height: 78px; padding: 8px 10px; border: 4px ridge #6b311d; color: #f0d9af; background: repeating-linear-gradient(90deg,#74371f 0 17px,#5c2818 17px 20px); box-shadow: 6px 7px 0 rgba(31,22,14,.28), inset 0 0 0 2px rgba(245,187,111,.18); font: 900 8px/1 "Courier New", monospace; letter-spacing: .04em; pointer-events: none; transform: scale(var(--crate-scale,1)); transform-origin: right bottom; transition: transform .18s ease; }
.liability-crate::before, .liability-crate::after { content: ""; position: absolute; left: 0; width: 100%; height: 5px; background: #281f18; opacity: .6; }
.liability-crate::before { top: 11px; }.liability-crate::after { bottom: 11px; }
.liability-crate span { z-index: 1; color: #ffc66a; }
.liability-crate strong { z-index: 1; align-self: end; max-width: 83px; font-size: 11px; line-height: .9; }
.liability-crate b { position: absolute; z-index: 1; right: 8px; bottom: 7px; padding: 3px; color: #251b12; background: #d9c791; font-size: 10px; transform: rotate(-3deg); }
.liability-crate[data-stress="high"] { animation: crateRattle .12s linear infinite; }
@keyframes crateRattle { 50% { translate: 1px 0; } }

.archive-replay { position: absolute; z-index: 7; top: 12px; right: 12px; left: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 3px solid #e2d4af; color: #eee2c3; background: #263b31; box-shadow: 5px 5px 0 rgba(24,25,20,.24); font: 900 9px/1.15 "Courier New", monospace; }
.archive-replay div { display: grid; gap: 3px; text-align: left; }
.archive-replay div span { color: #bcb69f; font-size: 8px; }
.archive-replay button { min-height: 30px; padding: 6px 8px; border: 1px solid #eee2c3; color: #eee2c3; background: transparent; font: 900 8px/1 "Courier New", monospace; cursor: pointer; }
.door-frame.archive-mode::after { content: ""; position: absolute; z-index: 5; inset: 0; background: repeating-linear-gradient(0deg,rgba(20,30,25,.07) 0 2px,transparent 2px 5px); pointer-events: none; }
.door-frame.archive-mode .floor-panel { padding-top: 86px; filter: sepia(.25) contrast(.95); }
.door-frame.archive-mode .floor-panel button, .door-frame.archive-mode .floor-panel input { opacity: .48; pointer-events: none; }

.car-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; color: #20211d; background: repeating-linear-gradient(90deg,#989a94 0 2px,#b4b5b0 2px 5px); font: 800 9px/1 "Courier New", monospace; letter-spacing: .07em; }
.control-panel { min-height: 540px; padding: 30px 19px 20px; background: repeating-linear-gradient(91deg, #8e908a 0 2px, #abaca7 2px 4px, #858780 4px 6px); }
.controls-label { margin-bottom: 17px; text-align: center; }
.floor-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.floor-buttons button {
  aspect-ratio: 1;
  border: 5px solid #575952;
  border-radius: 50%;
  color: #21221d;
  background: radial-gradient(circle at 38% 32%,#e3e4df 0 7%,#a5a7a0 8% 48%,#5c5e58 50% 64%,#2f302c 66%);
  box-shadow: inset 0 0 0 2px #d8d9d4, 0 2px 2px rgba(0,0,0,.35);
  font: 900 17px/1 "Courier New", monospace;
  cursor: pointer;
}
.floor-buttons button:hover { filter: brightness(1.15); }
.floor-buttons button.active { color: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim), 0 0 17px rgba(255,176,0,.6), inset 0 0 0 2px #e9eae4; }
.floor-buttons button.replay { color: #d9eedc; box-shadow: 0 0 0 3px var(--green), 0 0 14px rgba(38,59,49,.8), inset 0 0 0 2px #e9eae4; }
.floor-buttons button:disabled { opacity: .3; filter: grayscale(1); cursor: not-allowed; }
.emergency-stop { display: grid; place-items: center; width: 75px; height: 75px; margin: 27px auto 9px; border: 8px solid #575951; border-radius: 50%; color: #f8d8bf; background: radial-gradient(circle at 38% 30%,#f36651 0 5%,var(--red) 8% 47%,var(--red-dark) 49%); box-shadow: 0 7px 0 #292a26, 0 9px 10px rgba(0,0,0,.38); font: 900 13px/1 "Courier New", monospace; cursor: pointer; }
.emergency-stop[aria-pressed="true"] { transform: translateY(6px); box-shadow: 0 1px 0 #292a26; }
.stop-label { text-align: center; }.stop-message { min-height: 28px; margin: 12px -3px 11px; color: #542019; text-align: center; font-size: 8px; }
.mobile-status { display: none; }

.confetti-bit { position: fixed; z-index: 50; top: -20px; width: 8px; height: 16px; background: var(--piece-color); pointer-events: none; animation: cheapConfetti 1.9s cubic-bezier(.13,.74,.39,1) forwards; }
@keyframes cheapConfetti { to { transform: translate(var(--drift), 105vh) rotate(620deg); opacity: .3; } }

@media (max-width: 1060px) {
  body { padding: 18px; }
  .building-shell { grid-template-columns: 190px minmax(480px,1fr) 150px; height: calc(100vh - 36px); }
  .building-plaque { min-height: 525px; padding-inline: 17px; }
  .building-plaque h1 { font-size: 54px; }
  .control-panel { padding-inline: 14px; }
  .floor-panel { padding-inline: 30px; }
}

@media (max-width: 760px) {
  body { min-height: 100svh; padding: 24px 0 0; background: #1e201b; }
  .mobile-status { position: fixed; z-index: 30; top: 0; left: 0; display: flex; justify-content: space-between; width: 100%; height: 24px; padding: 5px 8px; color: #d6d0bd; background: #1b1c18; font: 800 10px/1.4 "Courier New", monospace; letter-spacing: .08em; }
  .building-shell { display: grid; grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) 88px; gap: 0; width: 100%; height: calc(100svh - 24px); min-height: 520px; }
  .building-plaque { display: none; }
  .elevator-car { grid-template-rows: 72px minmax(0,1fr) 22px; min-height: 0; border-width: 4px; box-shadow: none; }
  .indicator-panel { grid-template-columns: 57px minmax(0,1fr) 48px; gap: 4px; padding: 5px; border-bottom-width: 4px; }
  .indicator-status { gap: 3px; font-size: 18px; }
  .debt-readout { padding-inline: 5px; }
  .debt-readout > span { font-size: clamp(15px, 5.3vw, 23px); }
  .debt-readout small { margin-top: 4px; font-size: 6px; letter-spacing: .04em; }
  .chime-toggle { padding: 2px; font-size: 7px; }
  .floor-panel { justify-content: flex-start; padding: 22px 19px 18px; }
  .floor-panel h2 { width: 100%; font-size: clamp(29px, 10.5vw, 44px); }
  .floor-label { margin-bottom: 12px; }
  .lead { margin: 15px auto 19px; font-size: 16px; }
  .floor-panel[data-floor="0"] .lead { margin-bottom: 10px; }
  .route-notice { grid-template-columns: 112px minmax(0,1fr); width: min(330px,100%); }
  .route-notice > span { padding: 7px 8px; font-size: 8px; }.route-rule { padding: 7px 9px; }.route-rule strong { font-size: 12px; }.route-rule b { font-size: 8px; }.route-notice small { font-size: 8px; letter-spacing: .04em; }
  .achievement { margin-bottom: 11px; padding: 6px 10px; }
  .achievement strong { font-size: 18px; }
  .hero-actions { flex-direction: column; width: min(280px,100%); margin-top: 11px; }
  .industrial-button { min-height: 40px; }
  .floor-call { width: min(246px,100%); min-width: 0; margin: 10px auto 72px; }
  .object-scene { margin-block: 18px 0; }
  .lever-unit, .yield-control { grid-template-columns: 1fr 52px; gap: 8px; margin-top: 22px; padding: 10px; }
  .lever-unit label, .yield-control > span { grid-column: 1 / -1; text-align: left; }
  .cost-simulator { margin-top: 7px; }
  .punchline { margin-top: 17px; font-size: 25px; }
  .due-date-machine { margin-top: 21px; }
  .ceiling-rig { margin-top: 22px; }
  .price-board { margin: 14px auto 11px; }
  .price-board div { padding: 7px 8px; font-size: 10px; }
  .floor-panel[data-floor="5"] .floor-story { justify-content: flex-start; overflow-y: auto; }
  .floor-panel[data-floor="5"] h2 { font-size: clamp(27px, 8.7vw, 37px); line-height: .88; }
  .floor-panel[data-floor="5"] .price-board { margin: 8px auto 7px; }
  .floor-panel[data-floor="5"] .yield-control { margin-top: 0; padding: 7px 9px; }
  .floor-panel[data-floor="5"] .cost-simulator { margin-top: 5px; }
  .floor-panel[data-floor="5"] .punchline.small { margin-top: 8px; font-size: 17px; line-height: .95; }
  .floor-panel[data-floor="5"] .floor-call { margin-bottom: 60px; }
  .source-story .request-stack { max-height: none; }
  .request-card { grid-template-columns: 102px 1fr; font-size: 10px; line-height: 1.3; }
  .record-actions button, .record-actions a { flex: 1 1 104px; display: grid; place-items: center; text-align: center; }
  .finale-panel h2 { font-size: clamp(28px,9vw,40px); }
  .future-floors { margin: 13px 0; }
  .final-lockup { font-size: 28px; }
  .roof-ca-strip { grid-template-columns: 62px minmax(0,1fr) auto; gap: 5px; }
  .roof-ca-strip a { grid-column: 2 / -1; text-align: center; }
  .service-panel { padding: 8px; }
  .service-panel code { font-size: 9px; }
  .car-footer { padding-inline: 6px; font-size: 7px; }
  .control-panel { display: grid; grid-template-columns: minmax(0,1fr) 54px; align-items: center; gap: 9px; width: 100%; min-height: 0; height: 88px; padding: 7px 9px; border-width: 4px; box-shadow: none; }
  .controls-label, .stop-label, .stop-message, .control-panel > .down-button, .panel-screws { display: none; }
  .floor-buttons { display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 4px; }
  .floor-buttons button { width: 100%; aspect-ratio: 1; border-width: 3px; font-size: 12px; }
  .emergency-stop { width: 47px; height: 47px; margin: 0; border-width: 5px; box-shadow: 0 4px 0 #292a26; font-size: 9px; }
  .liability-crate { right: 8px; bottom: 7px; width: 88px; min-height: 57px; padding: 6px 7px; border-width: 3px; font-size: 6px; opacity: .96; }
  .liability-crate strong { max-width: 60px; font-size: 8px; }.liability-crate b { right: 5px; bottom: 5px; font-size: 7px; }
  .archive-replay { top: 7px; right: 7px; left: 7px; gap: 6px; padding: 6px 7px; }
  .archive-replay div span { font-size: 6px; }.archive-replay button { min-height: 27px; font-size: 7px; }
  .door-frame.archive-mode .floor-panel { padding-top: 67px; }
}

@media (max-width: 360px), (max-height: 650px) and (max-width: 760px) {
  .building-shell { grid-template-rows: minmax(0,1fr) 70px; min-height: 480px; }
  .elevator-car { grid-template-rows: 64px minmax(0,1fr) 18px; }
  .indicator-panel { grid-template-columns: 49px minmax(0,1fr) 40px; }
  .indicator-status { font-size: 15px; }
  .chime-toggle { font-size: 6px; }
  .floor-panel { padding: 14px 13px 12px; }
  .floor-panel h2 { font-size: clamp(25px,9.6vw,34px); }
  .floor-label { margin-bottom: 8px; font-size: 9px; }
  .lead { margin: 10px auto 13px; font-size: 14px; }
  .floor-panel[data-floor="0"] .lead { margin-bottom: 7px; }
  .route-notice { grid-template-columns: 96px minmax(0,1fr); border-width: 2px; }.route-notice > span { padding: 6px; font-size: 7px; }.route-rule { padding: 6px 7px; }.route-rule strong { font-size: 10px; }.route-rule b { font-size: 7px; }.route-notice small { padding-block: 4px; font-size: 7px; }
  .achievement { margin-bottom: 8px; }
  .achievement span { font-size: 8px; }.achievement strong { font-size: 15px; }
  .industrial-button { min-height: 36px; padding: 8px 10px; font-size: 10px; }
  .text-button { margin-top: 11px; font-size: 10px; }
  .floor-call { grid-template-columns: 1fr 38px; gap: 3px 9px; margin: 8px auto 0; padding: 7px 7px 7px 10px; }
  .floor-call strong { font-size: 11px; }.floor-call .call-kicker { font-size: 6px; }.floor-call .call-glyph { min-height: 32px; font-size: 15px; }
  .object-scene { margin-top: 11px; transform: scale(.85); }
  .lever-unit { margin-top: 12px; }
  .punchline { margin-top: 10px; font-size: 21px; }
  .system-message { margin-top: 9px; font-size: 8px; }
  .due-date-machine { margin-top: 13px; padding: 8px 13px; }
  .due-date-machine strong { font-size: 26px; }
  .ceiling-rig { margin-top: 14px; }
  .price-board { margin-block: 8px; }
  .yield-control { margin-top: 0; }
  .cost-simulator > div:first-child, .cost-simulator p { padding: 5px 6px; }
  .cost-simulator > div:first-child strong { font-size: 12px; }
  .punchline.small { font-size: 17px; }
  .request-card { grid-template-columns: 92px 1fr; font-size: 9px; }.request-card span, .request-card strong { padding: 5px 6px; }
  .record-actions button, .record-actions a { font-size: 9px; }
  .roof-grid { height: 22px; }.roof-grid span { height: 20px; }
  .future-floors { margin: 7px 0; gap: 4px; }.future-floors span { padding: 4px 6px; font-size: 10px; }
  .final-lockup { font-size: 23px; }
  .roof-ca-strip { margin-top: 6px; padding: 5px; }.roof-ca-strip code, .roof-ca-strip button, .roof-ca-strip a { min-height: 24px; padding: 5px; font-size: 7px; }
  .service-panel { margin-top: 7px; }
  .liability-crate { display: none; }
  .control-panel { height: 70px; grid-template-columns: minmax(0,1fr) 43px; padding: 5px 7px; }
  .emergency-stop { width: 39px; height: 39px; border-width: 4px; font-size: 7px; }
  .capacity { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
