@keyframes ops-rattle {0%{transform:translateX(-3px)}100%{transform:translateX(3px)}}
.station-gate {width:min(910px,calc(100vw - 28px));max-height:min(93dvh,980px);overflow:auto;padding:0;margin:auto;border:2px solid #77868c;border-radius:0;background:#0a141a;color:#e5e7e5;box-shadow:0 22px 65px #000;overscroll-behavior:contain}
.station-gate::backdrop {background:rgba(0,0,0,.84)}
.gate-case {border:6px solid #263036;box-shadow:inset 0 0 0 2px #0a1013;background:linear-gradient(145deg,#111e26,#071016 55%,#11191c)}
.gate-top, .gate-bottom {background:linear-gradient(#303940,#131b20 63%,#070b0d);padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:2px solid #53636b;color:#d4d9d9;font-size:11px;font-weight:800;letter-spacing:1.4px}
.gate-stamp b {color:#af424a}
.gate-close {border:1px solid #828d92;background:#131b21;color:#f4f2ed;font-size:11px;font-weight:800;letter-spacing:.6px;padding:9px 12px;white-space:nowrap}
.gate-close span {font-size:20px;line-height:0;vertical-align:middle;margin-left:10px}
.gate-close:hover {background:#522029}
.gate-interior {padding:28px 30px 30px;position:relative;isolation:isolate;background:radial-gradient(circle at 50% 56%,#26323b,#071119 72%)}
.gate-ident {text-align:center;position:relative;z-index:1}
.gate-ident>span {display:block;color:#d7a9a6;font-size:12px;letter-spacing:2px;font-weight:800}
.gate-ident h2 {margin:10px 0;font-size:clamp(28px,4.5vw,47px);line-height:1;letter-spacing:1px;text-shadow:0 2px 6px black}
.gate-ident p {margin:0 auto;max-width:600px;color:#cbd4d9;font-size:15px;line-height:1.48}
.gate-physical {height:225px;display:flex;align-items:center;justify-content:center;position:relative;margin:20px auto 15px;overflow:hidden;background:radial-gradient(ellipse at center,rgba(61,78,89,.46),transparent 65%)}
.physical-door, .physical-button, .physical-weight {display:none}
.gate-interior[data-type=door] .physical-door {display:flex}
.gate-interior[data-type=button] .physical-button {display:flex}
.gate-interior[data-type=weight] .physical-weight {display:flex}
.physical-door {width:205px;height:205px;border-radius:50%;position:relative;align-items:center;justify-content:center;border:16px double #64747c;box-shadow:0 0 0 6px #2c353b,0 0 0 10px #151a1e,inset 0 0 0 6px #202a30,inset 0 0 20px #000;background:repeating-conic-gradient(from 0deg,#3b454b 0deg 14deg,#222e34 15deg 29deg,#4d585d 30deg 31deg)}
.door-wheel {width:95px;height:95px;border-radius:50%;border:10px solid #83929a;position:relative;background:#222d32;box-shadow:0 0 0 3px #141e24,inset 0 0 10px #0009}
.door-wheel span {position:absolute;left:50%;top:50%;width:9px;height:120%;background:#89989d;transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(var(--a));box-shadow:0 0 0 1px #111}
.door-wheel span:nth-child(1) {--a:0deg}
.door-wheel span:nth-child(2) {--a:45deg}
.door-wheel span:nth-child(3) {--a:90deg}
.door-wheel span:nth-child(4) {--a:135deg}
.wheel-core {position:absolute;width:30px;height:30px;border-radius:50%;background:radial-gradient(circle at 30% 30%,#8b9699,#283138);border:3px solid #9ca4a4}
.gate-interior.acted .physical-door {animation:ops-rattle .12s 7}
.physical-button {flex-direction:column;align-items:center;justify-content:center;gap:0;filter:drop-shadow(0 9px 12px #000b)}
.button-dome {height:95px;width:154px;border-radius:78px 78px 20px 20px;background:radial-gradient(ellipse at 43% 22%,#d16a68,#6b1c25 59%,#310910 95%);border:4px solid #632026;box-shadow:inset 0 5px 5px #de9a9348,inset 0 -11px 9px #000b;transform-origin:bottom center;transition:transform .1s}
.button-housing {width:214px;height:31px;background:linear-gradient(#757a77,#343f43 50%,#10171b);border:3px solid #131a1d;border-radius:8px}
.gate-interior.acted .button-dome {transform:scaleY(.74)}
.physical-weight {flex-direction:column;align-items:center;gap:7px}
.weight-glass {height:153px;width:172px;border:4px solid #74858d;border-radius:55px 55px 12px 12px;display:flex;justify-content:center;align-items:center;flex-direction:column;background:linear-gradient(90deg,#a3bec117,transparent 30%,#9ec6d814 70%,#a8c3c42a);box-shadow:inset 0 0 15px #53718666,0 0 13px #0008}
.weight-feather {display:block;font-size:60px;color:#e0e4e1;transform:rotate(-18deg);text-shadow:0 0 10px #eee8}
.weight-pan {height:8px;width:104px;margin-top:13px;background:linear-gradient(#9aa5a6,#344d59);border-radius:50%}
.weight-display {font-size:23px;letter-spacing:2px;font-family:monospace;color:#d36567;background:#050b0c;border:2px solid #435057;padding:3px 13px}
.gate-interior.acted .weight-feather {animation:feather-tick .65s ease-in-out}
@keyframes feather-tick {50%{transform:rotate(8deg) translateY(-12px)}}
.gate-console {border:1px solid #6e7b7c;box-shadow:inset 0 1px #b4bbba4c;background:linear-gradient(#141e24,#080f13);display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;padding:16px 19px}
.ledger-label {color:#d69b9b;font-size:10px;font-weight:900;letter-spacing:2px}
.gate-result {font-family:monospace;font-size:15px;line-height:1.4;min-height:45px;margin:10px 0;color:#c5d8dc;font-weight:700}
.gate-counter {color:#9eadb2;font-size:11px;letter-spacing:1px;font-weight:700}
.gate-counter output {color:#eee8de;font-family:monospace}
.gate-controls {max-width:270px;text-align:center}
.gate-action {border:2px solid #a3454a;background:linear-gradient(#602c32,#32131b);color:#f9f0e9;font-size:13px;font-weight:900;letter-spacing:.5px;padding:13px 17px;min-width:204px;min-height:44px;transition:background .2s}
.gate-action:hover {background:#6b333a}
.gate-action:disabled {opacity:.75;cursor:wait}
.gate-build-note {color:#adb9bc;font-size:10px;line-height:1.4;letter-spacing:.6px;margin:9px 0 0}
.gate-bottom {border-top:2px solid #53636b;border-bottom:0;color:#99aab1;font-size:9px;line-height:1.4}
@media(max-width:700px) {
  .station-gate {width:calc(100vw - 10px);max-height:94dvh;border-width:1px}
  .gate-case {border-width:3px}
  .gate-top {padding:9px 8px;letter-spacing:.3px;font-size:9px}
  .gate-close {font-size:9px;padding:8px 7px;letter-spacing:0}
  .gate-close span {font-size:15px;margin-left:3px}
  .gate-interior {padding:18px 12px 14px}
  .gate-ident>span {font-size:10px;letter-spacing:1.4px}
  .gate-ident h2 {font-size:31px}
  .gate-ident p {font-size:13px;line-height:1.43}
  .gate-physical {height:185px;margin:13px auto 12px}
  .physical-door {transform:scale(.78)}
  .button-dome {height:79px;width:132px}
  .button-housing {width:184px}
  .weight-glass {height:128px;width:145px}
  .weight-feather {font-size:47px}
  .weight-display {font-size:17px}
  .gate-console {display:block;padding:12px}
  .gate-result {font-size:13px;min-height:35px}
  .gate-counter {font-size:9px}
  .gate-controls {max-width:none;margin-top:16px}
  .gate-action {width:100%;font-size:13px;min-height:44px}
  .gate-build-note {font-size:9px}
  .gate-bottom {padding:8px;letter-spacing:0;font-size:8px}
}
@media(prefers-reduced-motion:reduce) {
  .button-dome {transition:none!important}
  .gate-interior.acted .weight-feather {animation:none!important}
}
