/* ==========================================================================
   QILIN-86 · Longyuan Range Command — live C2 simulator
   Visual foundation: the original qilin-86-range-command.html (olive desk,
   cream plates, phosphor CRT, red launch, brass keys). Tape/replay removed.
   ========================================================================== */

:root { color-scheme: dark; }
* , *::before, *::after { box-sizing: border-box; }
html { background: #161c17; }
body {
  margin: 0; min-height: 100vh; color: #ecddaf;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, #2c3a2e 0%, transparent 70%),
    repeating-linear-gradient(90deg, #ffffff05 0 1px, transparent 1px 64px),
    #161c17;
  font: 400 14px/1.39 "Segoe UI", "Microsoft YaHei UI", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---- utility bar (site links, sound, pause) -------------------------- */
.ql-util {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  max-width: 1320px; margin: 0 auto; padding: 10px 14px 8px;
  font: 600 11px/1.2 "IBM Plex Mono", Consolas, ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase;
}
.ql-util a { color: #c0bd9e; text-decoration: none; }
.ql-util a:hover { color: #f2c380; }
.ql-util .sp { flex: 1; }
.ql-util button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 10px;
  color: #242d22; background: linear-gradient(#e4d7aa, #b5ac8d); border: 1px solid #171e17; border-radius: 3px;
  box-shadow: inset 0 1px #fff2c666, 0 2px #0d120e; font: inherit; letter-spacing: .06em;
}
.ql-util button[aria-pressed="true"] { background: #516047; color: #f7e5aa; border-color: #ceba7e; }
.ql-util button:active { transform: translateY(1px); }
.ql-util .ql-led { width: 7px; height: 7px; border-radius: 1px; background: currentColor; box-shadow: 0 0 6px currentColor; }

/* ---- the console ------------------------------------------------------ */
#ql86 {
  --metal:#374239; --frame:#222c25; --line:#65715d; --paper:#ecddaf; --muted:#c0bd9e; --green:#acd4a4;
  --amber:#f2c380; --red:#f1a28b; --alarm:#ff7a5c; --screen:#102019; --mono:"IBM Plex Mono","Consolas",ui-monospace,monospace;
  position: relative;
  max-width: 1320px; margin: 0 auto 28px;
  background:#273129; color:var(--paper); border:1px solid #485544; border-radius:5px; overflow:clip;
  box-shadow: 0 30px 80px -30px #000;
}
#ql86 [hidden] { display:none !important; }
#ql86 :where(h1,h2,h3,h4,p,figure,dl,dd,ol,ul) { margin:0; color:inherit; }
#ql86 :where(ol,ul) { padding:0; list-style:none; }
#ql86 :where(button,select,input) { font:inherit; }
#ql86 :where(button,select,input,a):focus-visible { outline:2px solid #fbd88b; outline-offset:2px; }
#ql86 .mono { font-family:var(--mono); font-variant-numeric:tabular-nums; }
#ql86 .sm { font-size:11px; }
#ql86 .xs { font-size:10px; }
#ql86 .zh { display:block; font-size:11px; line-height:1.22; font-weight:400; color:inherit; opacity:.84; }
#ql86 .muted { color:var(--muted); }
#ql86 .gold { color:var(--amber); }
#ql86 .good { color:var(--green); }
#ql86 .warn { color:var(--red); }
#ql86 .row { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
#ql86 .between { justify-content:space-between; }
#ql86 .stack { display:grid; gap:6px; min-width:0; }

/* header plate */
#ql86 .head {
  display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px 13px;
  padding:12px 16px; color:#252e23; border-bottom:3px solid #8e432f;
  background:repeating-linear-gradient(133deg,#5247300c 0 1px,transparent 1px 5px),linear-gradient(110deg,#e8dbb2,#b7b18f);
}
#ql86 .brand { display:flex; gap:11px; align-items:center; min-width:0; }
#ql86 .seal {
  display:grid; place-items:center; align-self:stretch; padding:5px 6px; flex:none; font-size:23px; font-weight:760;
  line-height:1; color:#ffdf9e; background:#9e392c; border:1px solid #7b2e24; box-shadow:inset 0 0 0 2px #983828,inset 0 0 0 3px #d88b60;
}
#ql86 h1 { font:760 clamp(28px,5vw,48px)/.93 "Bahnschrift","Segoe UI",sans-serif; letter-spacing:-.055em; }
#ql86 .sub { font-size:12px; color:#455040; margin-top:4px; font-weight:650; }
#ql86 .id-plate { display:grid; justify-items:end; gap:1px; text-align:right; color:#384739; letter-spacing:.06em; }
#ql86 .id-plate b { display:block; }
#ql86 .id-clock { font:700 22px/1 var(--mono); letter-spacing:.02em; color:#2b3427; font-variant-numeric:tabular-nums; }

/* tabs */
#ql86 .nav { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; padding:6px 10px; border-bottom:1px solid #111b15; background:#252f27; }
#ql86 .switch {
  min-height:31px; min-width:0; padding:5px 7px; border:1px solid #171e17; border-radius:3px; color:#242d22;
  background:linear-gradient(#e4d7aa,#b5ac8d); box-shadow:inset 0 1px #fff2c666,0 2px #1a221a;
  font-size:12px; font-weight:650; line-height:1.19; white-space:normal; overflow-wrap:anywhere; text-align:center;
}
#ql86 .switch:hover:not(:disabled):not([aria-pressed="true"]) { background:linear-gradient(#efe1b4,#cabb92); }
#ql86 .switch:active:not(:disabled) { transform:translateY(1px); box-shadow:inset 0 1px 3px #34392c88; }
#ql86 .switch[aria-pressed="true"] { background:#516047; color:#f7e5aa; border-color:#ceba7e; }
#ql86 .switch[aria-pressed="true"]:hover { background:#59684b; }
#ql86 .switch:disabled { opacity:.5; }
#ql86 .switch.hot { color:#ffe9b1; background:linear-gradient(#8a5434,#6a3b26); border-color:#d0ac61; }
#ql86 .switch.hot:hover:not(:disabled) { background:linear-gradient(#9a6040,#7a4630); }
#ql86 .switch.good-btn { color:#203020; background:linear-gradient(#bfdcae,#8fb586); }
#ql86 .nav .switch { min-height:39px; }
#ql86 .nav .switch[data-alert="true"]::after { content:" ●"; color:#c7402c; }

#ql86 .content { padding:10px; display:grid; gap:8px; background:radial-gradient(ellipse at 8% 3%,#566452,#313d33 66%); }

/* status band + orders */
#ql86 .statusband { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:5px 11px; color:var(--muted); }
#ql86 .status-lamp::before { content:""; display:inline-block; width:7px; height:7px; border-radius:1px; margin-right:5px; background:currentColor; box-shadow:0 0 7px currentColor; vertical-align:1px; }
#ql86 .status-lamp.off::before { background:transparent; box-shadow:inset 0 0 0 1px currentColor; }
#ql86 .caution {
  display:inline-flex; align-items:center; gap:6px; min-height:26px; padding:3px 9px; border:1px solid #6c2a20; border-radius:2px;
  background:#2c1a15; color:#7a4a3e; font:700 11px/1 var(--mono); letter-spacing:.08em;
}
#ql86 .caution[data-state="flash"] { background:#b8321f; color:#fff0d0; border-color:#ff9c7a; animation:ql-flash .5s steps(1) infinite; }
#ql86 .caution[data-state="steady"] { background:#8e2b1d; color:#ffe3c2; border-color:#d86a50; }
@keyframes ql-flash { 50% { background:#3a1a14; color:#a8695a; } }
html.motion-paused #ql86 .caution[data-state="flash"] { animation:none; }
#ql86 .orders {
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:8px;
  padding:6px 8px; border:1px solid #8c9272; background:#2a3527; color:#e8dcae;
}
#ql86 .orders b.tag { padding:2px 6px; background:#e4d7aa; color:#2b3326; font:700 11px/1.2 var(--mono); letter-spacing:.06em; }
#ql86 .orders .otext { font-size:12.5px; line-height:1.3; }
#ql86 .orders .ostate { font:700 11px/1 var(--mono); color:var(--amber); }

/* decks */
#ql86 .deck-grid { display:grid; grid-template-columns:minmax(0,1.89fr) minmax(270px,1fr); gap:9px; align-items:start; }
#ql86 .deck { min-width:0; background:linear-gradient(141deg,#4c5949,#354035 72%); border:1px solid #75816c; border-radius:4px; box-shadow:inset 0 1px #c4baa947,0 1px 2px #171f19; }
#ql86 .strip { padding:7px 8px; background:#2c382e; border-bottom:1px solid #1a241c; color:#e5d5a4; }
#ql86 .deckbody { padding:8px; display:grid; gap:7px; }
#ql86 .bezel { background:#172018; border:1px solid #0e1710; border-radius:10px; padding:8px; box-shadow:inset 0 1px 4px #070f09,0 0 0 2px #87907452; }
#ql86 .screen {
  position:relative; min-width:0; min-height:520px; display:grid; align-content:start; gap:9px; padding:10px;
  border:1px solid #2a4231; border-radius:6px; color:#c0e0b2;
  background:repeating-linear-gradient(0deg,#0812081c 0 1px,transparent 1px 4px),radial-gradient(ellipse at 38% 0%,#284632,#11231a 76%);
  box-shadow:inset 0 0 10px #0a130c;
}
#ql86 .screen h2 { font-size:clamp(17px,2.6vw,22px); font-weight:680; line-height:1.17; letter-spacing:-.028em; }
#ql86 .screen h3 { font-size:13px; }
#ql86 .screen-title { padding-bottom:6px; border-bottom:1px solid #68907770; align-items:flex-end; }
#ql86 .view-code { color:#c4d397; }
#ql86 .panel { min-width:0; padding:7px; background:#18301f; border:1px solid #547861; }
#ql86 .panel > h3 { display:flex; justify-content:space-between; gap:6px; margin-bottom:5px; color:#dfe8bd; font:700 11px/1.2 var(--mono); letter-spacing:.07em; text-transform:uppercase; }
#ql86 .panel > h3 small { color:#9fbf98; font-weight:400; letter-spacing:0; text-transform:none; }

/* photos */
#ql86 .pic { position:relative; min-width:0; margin:0; }
#ql86 .photo { display:block; width:100%; aspect-ratio:2/1; border:1px solid #5a7863; background:#24392e no-repeat; background-size:200% 200%; filter:sepia(.2) saturate(.85); }
#ql86 .photo[data-q="0"] { background-position:0 0; }
#ql86 .photo[data-q="1"] { background-position:100% 0; }
#ql86 .photo[data-q="2"] { background-position:0 100%; }
#ql86 .photo[data-q="3"] { background-position:100% 100%; }
#ql86 .photo.site { background-image:url("../assets/qilin86/silo-site.webp"); }
#ql86 .photo.hall { background-image:url("../assets/qilin86/warhead-hall.webp"); }
#ql86 .pic::after { content:""; position:absolute; inset:0; pointer-events:none; background:repeating-linear-gradient(0deg,#00000030 0 1px,transparent 1px 3px); }
#ql86 .camera-tag { position:absolute; z-index:1; left:5px; top:5px; padding:3px 5px; background:#16261ce5; color:#dfebba; font-size:11px; border:1px solid #7d956e; pointer-events:none; }
#ql86 .camera-tag.r { left:auto; right:5px; }
#ql86 .door-overlay { position:absolute; z-index:1; right:5px; bottom:5px; padding:3px 5px; background:#16261ce5; border:1px solid #7d956e; font:700 11px/1 var(--mono); color:#dfebba; }

/* silo overview */
#ql86 .silo-top { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:8px; align-items:start; }
#ql86 .sys-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
#ql86 .sys { display:grid; grid-template-columns:76px minmax(0,1fr); gap:6px; align-items:center; padding:5px; background:#1b3424; border:1px solid #4f735a; }
#ql86 .sys.bad { border-color:#d8774f; background:#3a2a1c; }
#ql86 .sys .gauge { width:76px; height:52px; display:block; }
#ql86 .sys .s-name { font:700 11px/1.15 var(--mono); color:#dfe8bd; letter-spacing:.05em; }
#ql86 .sys .s-val { font:700 15px/1.1 var(--mono); color:#f3d493; font-variant-numeric:tabular-nums; }
#ql86 .sys .s-note { font-size:11px; color:#a8c79e; line-height:1.2; }
#ql86 .sys .s-btns { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:4px; }
#ql86 .sys .s-btns .switch { min-height:26px; padding:3px 7px; font-size:11.5px; flex:1 1 auto; }
#ql86 .gauge .face { fill:#e3d6ad; }
#ql86 .gauge .rim { fill:#1a221a; }
#ql86 .gauge .tick { stroke:#4b4330; stroke-width:1; }
#ql86 .gauge .redline { fill:none; stroke:#b8432f; stroke-width:3; }
#ql86 .gauge .greenline { fill:none; stroke:#4f7b4b; stroke-width:3; }
#ql86 .gauge .needle { stroke:#8b2f22; stroke-width:1.8; stroke-linecap:round; transform-box:view-box; transform-origin:38px 44px; }
#ql86 .gauge .hub { fill:#3a3124; }
#ql86 .gauge .glass { fill:url(#ql-glass); pointer-events:none; }

#ql86 .bar { position:relative; height:7px; background:#0e1c13; border:1px solid #4f735a; overflow:hidden; }
#ql86 .bar i { position:absolute; inset:0; transform-origin:left; transform:scaleX(var(--v,0)); background:linear-gradient(90deg,#6e9a62,#acd4a4); }
#ql86 .bar.amber i { background:linear-gradient(90deg,#a87a3a,#f2c380); }

/* annunciators */
#ql86 .annun { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; }
#ql86 .lamp {
  display:grid; place-items:center; min-height:30px; padding:3px; text-align:center;
  background:#211d16; border:1px solid #0f0d09; color:#5e5442; font:700 9.5px/1.1 var(--mono); letter-spacing:.04em;
  box-shadow:inset 0 0 0 1px #3c3427;
}
#ql86 .lamp .zh { font-size:9px; }
#ql86 .lamp[data-on="ok"] { background:#25402b; color:#c8f0b5; box-shadow:inset 0 0 8px #6fc06a66, inset 0 0 0 1px #5f9258; }
#ql86 .lamp[data-on="amber"] { background:#5a4320; color:#ffe2a4; box-shadow:inset 0 0 8px #f2b14f88, inset 0 0 0 1px #c29240; }
#ql86 .lamp[data-on="red"] { background:#6e2016; color:#ffd8c6; box-shadow:inset 0 0 10px #ff6a4d99, inset 0 0 0 1px #e0664b; animation:ql-lamp .6s steps(1) infinite; }
#ql86 .lamp[data-on="redsteady"] { background:#6e2016; color:#ffd8c6; box-shadow:inset 0 0 10px #ff6a4d99, inset 0 0 0 1px #e0664b; }
@keyframes ql-lamp { 50% { background:#2c1611; color:#9a5a4b; box-shadow:inset 0 0 0 1px #6e2016; } }
html.motion-paused #ql86 .lamp[data-on="red"] { animation:none; }

/* fault / diagnosis */
#ql86 .fault { border-left:3px solid #e0664b; background:#3d2419; padding:7px; display:grid; gap:6px; color:#ffe2c8; }
#ql86 .fault h4 { font:700 12px/1.2 var(--mono); letter-spacing:.05em; }
#ql86 .fault p { font-size:12px; }
#ql86 .fault .opts { display:grid; gap:4px; }
#ql86 .fault .opts .switch { text-align:left; }
#ql86 .ok-card { border-left:3px solid #82b68d; background:#22412e; padding:6px 7px; font-size:12px; color:#e0edcc; }

/* checklist */
#ql86 .checks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 10px; font:600 11px/1.3 var(--mono); }
#ql86 .checks li { display:flex; justify-content:space-between; gap:6px; padding:2px 0; border-bottom:1px dashed #3f6049; }
#ql86 .checks li b { color:#c96b52; }
#ql86 .checks li.ok b { color:#acd4a4; }

/* missiles: dossier + diagram */
#ql86 .dossier { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:8px; align-items:start; }
#ql86 .data { display:grid; gap:3px; }
#ql86 .data-row { padding:3px 0; border-bottom:1px solid #64836a63; display:flex; justify-content:space-between; flex-wrap:wrap; align-items:baseline; gap:3px 9px; font-size:12px; }
#ql86 .data-row dt { color:#a8c79e; }
#ql86 .data-row dd { font-weight:650; overflow-wrap:anywhere; text-align:right; }
#ql86 .cut-stage {
  position:relative; aspect-ratio:900 / 300; overflow:hidden;
  border:1px solid #729175; background-color:#172d23;
  background-image:linear-gradient(#8cb49b22 1px,transparent 1px),linear-gradient(90deg,#8cb49b22 1px,transparent 1px),radial-gradient(ellipse at 49% 30%,#395947 0%,transparent 68%);
  background-size:24px 24px,24px 24px,100% 100%;
}
#ql86 .cut-stage svg { position:absolute; inset:0; width:100%; height:100%; display:block; }
#ql86 .cut-stage .part { transition:transform 700ms cubic-bezier(.2,.8,.2,1), opacity 400ms; }
#ql86 .cut-stage .part .shell { transition:opacity 500ms; }
#ql86 .cut-stage[data-mode="cutaway"] .part .shell,
#ql86 .cut-stage[data-mode="exploded"] .part .shell { opacity:.18; }
#ql86 .cut-stage .part .inner { opacity:0; transition:opacity 500ms; }
#ql86 .cut-stage[data-mode="cutaway"] .part .inner,
#ql86 .cut-stage[data-mode="exploded"] .part .inner { opacity:1; }
#ql86 .cut-stage .part.sel > .shell > *, #ql86 .cut-stage .part.sel > .inner > * { stroke:#f5d290; stroke-width:2.2; }
#ql86 .cut-stage .leader { stroke:#9fbba4; stroke-dasharray:3 3; opacity:0; transition:opacity 500ms; }
#ql86 .cut-stage[data-mode="exploded"] .leader { opacity:.6; }
html.motion-paused #ql86 .cut-stage .part, html.motion-paused #ql86 .cut-stage .part * { transition:none !important; }
#ql86 .hot[data-part] {
  position:absolute; z-index:1; transform:translate(-50%,-50%); min-width:30px; min-height:22px; padding:2px 5px;
  color:#dfe8bd; background:#16291e; border:1px solid #a7c09a; border-radius:2px; font:700 10.5px/1.1 var(--mono); transition:left 700ms cubic-bezier(.2,.8,.2,1), top 700ms cubic-bezier(.2,.8,.2,1);
}
#ql86 .hot[data-part][aria-pressed="true"] { color:#2f2920; background:#f0c878; border-color:#fae1a0; box-shadow:0 0 0 3px #1e2e2469; }
#ql86 .hot[data-part]:hover:not([aria-pressed="true"]) { background:#3e5643; }
html.motion-paused #ql86 .hot[data-part] { transition:none; }
#ql86 .part-detail { display:grid; gap:4px; padding:7px; background:#20392c; border:1px solid #648372; }
#ql86 .part-detail h3 { font-size:15px; }

/* warheads */
#ql86 .wh-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; align-items:start; }
#ql86 .choice { display:grid; gap:4px; }
#ql86 .choice .switch { text-align:left; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 8px; }
#ql86 .choice .switch small { grid-column:1/-1; font-weight:400; font-size:11px; opacity:.85; }
#ql86 .interlock { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:7px; padding:5px; border:1px solid #4f735a; background:#1b3424; }
#ql86 .interlock .lamp { min-height:24px; min-width:62px; }
#ql86 .archive { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
#ql86 .archive figcaption { font-size:11px; color:#c1d2a8; padding-top:3px; }

/* maps */
#ql86 .map-wrap { position:relative; aspect-ratio:420 / 236; background:#06140c; border:1px solid #5f8c68; overflow:hidden; }
#ql86 .map-wrap canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }
#ql86 .site-mark {
  position:absolute; z-index:1; transform:translate(-50%,-50%); border:1px solid #93b597; border-radius:2px;
  background:#1a3127e6; color:#dfedc9; padding:2px 4px; min-height:20px; font:700 10.5px/1 var(--mono); white-space:nowrap;
}
#ql86 .site-mark.tgt-strategic { border-color:#d98a6a; color:#ffd1bc; }
#ql86 .site-mark.tgt-out { opacity:.45; }
#ql86 .site-mark[aria-pressed="true"] { background:#e8bb72; border-color:#ffe6a3; color:#2e2b21; }
#ql86 .site-mark:hover:not([aria-pressed="true"]) { background:#446252; }
#ql86 .tgt-list { display:grid; gap:3px; }
#ql86 .tgt-list .switch { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:2px 8px; text-align:left; align-items:center; }
#ql86 .tgt-list .switch .cls { font:700 10px/1 var(--mono); padding:2px 4px; background:#2c3a2e; color:#acd4a4; }
#ql86 .tgt-list .switch .cls.strat { background:#5a2418; color:#ffc9b5; }
#ql86 .tgt-list .switch[aria-pressed="true"] .cls { background:#2b3326; }
#ql86 .tgt-list .switch .rng { font:600 11px/1 var(--mono); }
#ql86 .tgt-list .switch .rng.out { color:#9a3a2a; }

/* log */
#ql86 .log-filter { display:flex; flex-wrap:wrap; gap:4px; }
#ql86 .log-filter .switch { min-height:26px; font-size:11.5px; padding:3px 9px; }
#ql86 .log { display:grid; max-height:430px; overflow:auto; font-size:12px; scrollbar-color:#6b8f72 #12241a; }
#ql86 .log-entry { display:grid; grid-template-columns:34px 62px 58px minmax(0,1fr); gap:4px 6px; border-bottom:1px solid #3f5a46; padding:4px 0; }
#ql86 .log-entry .cat-Fault { color:#ff9c7a; }
#ql86 .log-entry .cat-Auth { color:#f2c380; }
#ql86 .log-entry .cat-Launch { color:#ffb49a; }
#ql86 .log-entry .cat-Order { color:#e4d7aa; }

/* command desk */
#ql86 .channel-grid { display:grid; gap:4px; }
#ql86 .channel {
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:3px 7px; align-items:center;
  min-height:32px; width:100%; color:#d8d9ad; background:#283b2d; padding:5px 6px; border:1px solid #71876c; border-radius:2px; text-align:left;
}
#ql86 .channel:hover { background:#364c3a; }
#ql86 .channel[aria-pressed="true"] { background:#465340; border-color:var(--amber); color:#ffe3a4; }
#ql86 .channel .bar { grid-column:1/-1; }
#ql86 .channel .ch-state { font:700 10.5px/1 var(--mono); }
#ql86 .channel .ch-state.fault { color:#ff8f6e; }
#ql86 .channel .ch-state.ready { color:#acd4a4; }
#ql86 .posture { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; }
#ql86 .posture .switch { min-height:40px; font-size:11px; padding:3px; }
#ql86 .posture .switch[aria-pressed="true"][data-p="2"] { background:#8e2b1d; border-color:#ff9c7a; color:#ffe9d2; }
#ql86 .posture .switch[aria-pressed="true"][data-p="1"] { background:#7a5a24; border-color:#f2c380; color:#fff0c8; }
#ql86 .auth { display:grid; gap:5px; padding:6px; background:#222b23; border:1px solid #121a13; box-shadow:inset 0 0 0 2px #a68d4c45; }
#ql86 .auth .msg { padding:5px 6px; background:#e8dcb3; color:#2b2a20; font:600 11px/1.35 var(--mono); border-left:4px solid #9e392c; white-space:pre-wrap; }
#ql86 .auth .msg.none { background:#2d372d; color:#9fae92; border-left-color:#566b55; }
#ql86 .auth .seal-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px; padding:5px 6px; background:#3a2620; border:1px dashed #b3644c; color:#ffd9bd; font:700 12px/1.2 var(--mono); letter-spacing:.12em; }
#ql86 .auth .seal-card.closed { color:#9a6b5c; letter-spacing:.3em; }
#ql86 .auth input {
  width:100%; min-height:32px; padding:4px 8px; color:#f6e3a8; background:#0f1c13; border:1px solid #839676; border-radius:2px;
  font:700 15px/1 var(--mono); letter-spacing:.18em; text-transform:uppercase;
}
#ql86 .auth .row .switch { flex:1 1 auto; }
#ql86 .auth-state { font:700 11px/1.2 var(--mono); letter-spacing:.06em; }
#ql86 .redbox { padding:7px 9px; display:grid; gap:4px; text-align:center; position:relative; background:#222b23; border:1px solid #121a13; box-shadow:inset 0 0 0 2px #a68d4c45; }
#ql86 .launch {
  min-height:55px; width:100%; padding:6px; color:#fff1d0; text-shadow:0 1px #6d271c;
  border:2px solid #712a1e; border-radius:3px; background:linear-gradient(#d75a42,#a12e24 74%,#832d1f);
  box-shadow:inset 0 2px #faa17b92,0 3px #121810;
  font:760 clamp(22px,3.2vw,32px)/1.1 "Microsoft YaHei UI","Noto Sans CJK SC","Segoe UI",sans-serif; letter-spacing:.10em;
}
#ql86 .launch:hover { background:linear-gradient(#e56f4d,#b13b2b); }
#ql86 .launch:active { transform:translateY(2px); }
#ql86 .launch[aria-pressed="true"] { border-color:#e2a363; }
#ql86 .key-rack { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
#ql86 .key-slot { text-align:center; padding:4px; min-width:0; border:1px solid #77876c; background:#28352b; }
#ql86 .key-slot h3 { font-size:12px; font-weight:660; }
#ql86 .key {
  --angle:-44deg; position:relative; display:block; width:82px; height:77px; max-width:100%; margin:0 auto;
  padding:0; border:0; background:transparent; touch-action:none; user-select:none;
}
#ql86 .key-base {
  position:absolute; inset:6px 9px; border-radius:50%; border:2px solid #171c14; box-shadow:inset 0 0 0 4px #81836a,inset 0 0 0 6px #31382a,0 2px 2px #192019;
  background:conic-gradient(from 40deg,#958464,#636250,#c2aa7a,#686553,#958464);
}
#ql86 .turner { position:absolute; left:calc(50% - 23px); top:calc(50% - 25px); width:46px; height:50px; pointer-events:none; transform:rotate(var(--angle)); transition:transform 150ms cubic-bezier(.24,.78,.27,1.13); }
#ql86 .shank { position:absolute; left:19px; top:20px; width:8px; height:24px; background:linear-gradient(90deg,#756040,#dcbe82,#867450); border:1px solid #6d5637; }
#ql86 .keyhead { position:absolute; top:0; left:4px; width:38px; height:25px; border:1px solid #6b5034; border-radius:7px 7px 4px 4px; background:linear-gradient(#e6c78e,#a48452); box-shadow:0 2px 2px #182018,inset 0 1px #f3d794; }
#ql86 .keyhead::after { content:""; position:absolute; inset:7px 11px auto; height:7px; border-radius:4px; background:#343b2b; }
#ql86 .key[aria-pressed="true"] { --angle:44deg; }
#ql86 .key:disabled .key-base { filter:grayscale(.6) brightness(.7); }
#ql86 .key-state { color:#d5c8a0; }
#ql86 .key[aria-pressed="true"] + .key-state { color:#f7d996; }
#ql86 .key-lock { font:700 10.5px/1.25 var(--mono); color:#d59a7c; }
#ql86 .key-lock.open { color:#acd4a4; }
html.motion-paused #ql86 .turner { transition:none; }
#ql86 .line-meter { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(76px,1fr); gap:8px; align-items:center; padding:5px; border:1px solid #788065; background:#303c31; }
#ql86 .line-meter svg { display:block; width:100%; height:67px; }
#ql86 .line-meter b { display:block; font-size:20px; }
#ql86 .line-meter .needle { transform-box:view-box; transform-origin:80px 69px; }

/* launch interface */
#ql86 .launch-rail { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:8px; padding:6px; border:1px solid #8c9272; background:#26392e; }
#ql86 .launch-clock { min-width:96px; color:#ffdb8c; font:700 28px/1 var(--mono); white-space:nowrap; font-variant-numeric:tabular-nums; }
#ql86 .launch-clock.lock { color:#ff8f6e; }
#ql86 .launch-execute, #ql86 .abort {
  min-height:40px; padding:5px 14px; border:1px solid #9d7d54; border-radius:3px; font-weight:760; letter-spacing:.09em;
  box-shadow:inset 0 1px #eab18563,0 2px #17221a;
}
#ql86 .launch-execute { color:#fff1c8; background:linear-gradient(#b94b35,#8f3228); }
#ql86 .launch-execute:hover:not(:disabled) { background:linear-gradient(#d8684a,#a83b2d); }
#ql86 .abort { color:#1f281d; background:linear-gradient(#e8dcb3,#b5ac8d); border-color:#5a6348; }
#ql86 .launch-execute:disabled, #ql86 .abort:disabled { color:#c8ba98; background:#525243; opacity:.7; box-shadow:none; }
#ql86 .seq { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
#ql86 .seq .lamp { min-height:34px; }
#ql86 .launch-screens { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
#ql86 .launch-monitor { min-width:0; background:#14271e; border:1px solid #759076; margin:0; }
#ql86 .launch-monitor h3 { display:flex; align-items:center; flex-wrap:wrap; gap:4px 7px; padding:5px 6px; background:#2a4535; color:#dcdfb3; border-bottom:1px solid #59765f; font-size:12px; }
#ql86 .launch-monitor h3 small { font-size:11px; color:#aebf9c; font-weight:400; }
#ql86 .launch-monitor .cv { position:relative; aspect-ratio:420 / 236; }
#ql86 .launch-monitor .cv canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }
#ql86 .tele { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; }
#ql86 .tele div { padding:5px 6px; background:#0f2117; border:1px solid #547861; }
#ql86 .tele dt { font:600 10px/1 var(--mono); color:#8fb08a; letter-spacing:.08em; }
#ql86 .tele dd { font:700 17px/1.15 var(--mono); color:#e9f3c2; font-variant-numeric:tabular-nums; }
#ql86 .phases { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; }
#ql86 .phases li { padding:3px 2px; text-align:center; font:700 9.5px/1.15 var(--mono); color:#5d7a62; border:1px solid #2e4a37; background:#0f2117; }
#ql86 .phases li.done { color:#acd4a4; border-color:#4f7b4b; }
#ql86 .phases li.now { color:#2a2416; background:#f2c380; border-color:#ffe6a3; }
#ql86 .debrief { display:grid; gap:6px; padding:8px; border:1px solid #f2c380; background:#2b2a1a; color:#f6e7bf; }
#ql86 .debrief h3 { font:700 14px/1.2 var(--mono); letter-spacing:.06em; }
#ql86 .debrief .grade { font:800 40px/1 var(--mono); color:#f2c380; }

/* footer printer */
#ql86 .footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; padding:7px 10px; background:#e8dcb3; border-top:2px solid #8e432f; color:#2b3326; font:600 12px/1.3 var(--mono); }
#ql86 .footer b { letter-spacing:.08em; }
#ql86 .footer .latest { flex:1; min-width:0; text-align:right; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
#ql86 .footer .latest span { display:inline-block; animation:ql-print .6s steps(24) both; }
@keyframes ql-print { from { clip-path:inset(0 100% 0 0); } to { clip-path:inset(0 0 0 0); } }
html.motion-paused #ql86 .footer .latest span { animation:none; }
#ql86 .sr { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

/* end overlay */
#ql86 .endcard {
  position:absolute; inset:0; z-index:10; display:grid; place-items:center; padding:20px;
  background:radial-gradient(ellipse at 50% 40%,#2b120ce6,#070504f5 70%);
}
#ql86 .endcard .box { max-width:620px; display:grid; gap:12px; padding:22px; border:1px solid #8e432f; background:#120c0a; color:#f0dcc0; box-shadow:0 0 60px #000; }
#ql86 .endcard h2 { font:760 clamp(26px,4vw,40px)/1 "Bahnschrift","Segoe UI",sans-serif; letter-spacing:-.03em; color:#ff9c7a; }
#ql86 .endcard p { font-size:14px; line-height:1.5; }
#ql86 .endcard .mono { color:#d9b48a; }
#ql86 .endcard.calm { background:radial-gradient(ellipse at 50% 40%,#1c2a1ee6,#060906f5 70%); }
#ql86 .endcard.calm h2 { color:#acd4a4; }
#ql86 .endcard.calm .box { border-color:#5f8c68; background:#0c130d; }

/* responsive */
@media (max-width:1000px) {
  #ql86 .silo-top, #ql86 .wh-grid, #ql86 .dossier { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:820px) {
  #ql86 .deck-grid { grid-template-columns:minmax(0,1fr); }
  #ql86 .screen { min-height:0; }
}
@media (max-width:560px) {
  #ql86 .head { padding:8px; }
  #ql86 .seal { font-size:18px; }
  #ql86 .id-plate > b, #ql86 .id-plate > span:not(.id-clock) { display:none; }
  #ql86 .id-clock { font-size:17px; }
  #ql86 .nav { grid-template-columns:repeat(3,minmax(0,1fr)); padding:5px 6px; }
  #ql86 .content { padding:6px; }
  #ql86 .screen { padding:7px; }
  #ql86 .deckbody { padding:6px; }
  #ql86 .sys-grid, #ql86 .checks, #ql86 .archive { grid-template-columns:minmax(0,1fr); }
  #ql86 .annun { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #ql86 .launch-screens { grid-template-columns:minmax(0,1fr); }
  #ql86 .launch-rail { grid-template-columns:auto minmax(0,1fr); }
  #ql86 .launch-rail .launch-execute, #ql86 .launch-rail .abort { grid-column:auto; }
  #ql86 .tele { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #ql86 .seq, #ql86 .phases { grid-template-columns:repeat(4,minmax(0,1fr)); }
  #ql86 .hot[data-part] { display:none; }
  #ql86 .orders { grid-template-columns:auto minmax(0,1fr); }
  #ql86 .orders .ostate { grid-column:1/-1; }
  #ql86 .log-entry { grid-template-columns:30px 56px minmax(0,1fr); }
  #ql86 .log-entry .lc { display:none; }
}
@media (pointer:coarse) {
  #ql86 :where(.switch,.channel) { min-height:44px; }
  #ql86 .site-mark { min-height:34px; min-width:38px; }
}

/* ==========================================================================
   CRISIS SKIN · 第二炮兵 strategic command
   Crimson lacquer plaque, gunmetal bunker hardware, posture-driven lighting.
   Overrides the cream range-control look above; mechanics untouched.
   ========================================================================== */
:root { --brass:#d4a843; --brass-hi:#ffe6a0; --brass-lo:#8a6420; --lacquer:#7a1111; --lacquer-d:#5c0b0b; --steel:#262b28; --steel-d:#171a19; --olive-steel:#3f4a3c; --crimson-glow:#ff2a1a; }
html { background:#0b0d0c; }
body {
  color:#e8dcb3;
  background:
    radial-gradient(ellipse 120% 70% at 50% 120%, var(--ql-vig, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 50% -10%, #23292566 0%, transparent 70%),
    repeating-radial-gradient(circle at 30% 40%, #ffffff03 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, #00000022 0 2px, transparent 2px 96px),
    linear-gradient(#121513, #0b0d0c);
  background-attachment: fixed;
  transition: background-color .6s;
}
html[data-ql-posture="1"] body { --ql-vig:#6a3a0c55; }
html[data-ql-posture="2"] body { --ql-vig:#8a0b0b88; }

/* utility bar → dark steel */
.ql-util a { color:#b9ae8c; }
.ql-util a:hover { color:var(--brass-hi); }
.ql-util button { color:#e8dcb3; background:linear-gradient(#353c37,#222724); border-color:#0a0c0b; box-shadow:inset 0 1px #ffffff1c,0 2px #050605; }
.ql-util button[aria-pressed="true"] { background:linear-gradient(#4a3c14,#2e2509); color:var(--brass-hi); border-color:var(--brass); }

/* console shell */
#ql86 {
  --metal:#2a302c; --line:#4b5446; --paper:#e8dcb3; --muted:#a9a58c;
  background:#181c1a; border:1px solid #3c443c; border-radius:4px;
  box-shadow: 0 0 0 4px #0c0e0d, 0 0 0 5px #3a4136, 0 40px 90px -30px #000, 0 0 0 0 transparent;
  transition: box-shadow .8s;
}
#ql86[data-posture="1"] { box-shadow: 0 0 0 4px #0c0e0d, 0 0 0 5px #8a5a1c, 0 40px 90px -30px #000, 0 0 40px -6px #c46a1866; }
#ql86[data-posture="2"] { box-shadow: 0 0 0 4px #0c0e0d, 0 0 0 5px #b3221a, 0 40px 90px -30px #000, 0 0 70px -4px #ff2a1a77; }

/* ---- 1 · command plaque --------------------------------------------- */
#ql86 .head {
  position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:10px 18px;
  padding:16px 22px; color:#f6e7c0; border-bottom:0;
  background:
    linear-gradient(170deg, #ffffff1f 0%, #ffffff00 34%, #00000000 66%, #0000003d 100%),
    repeating-linear-gradient(90deg, #ffffff05 0 1px, transparent 1px 3px),
    linear-gradient(var(--lacquer), var(--lacquer-d));
  box-shadow: inset 0 0 0 2px #2a2f2a, inset 0 0 0 4px var(--brass), inset 0 0 0 5px #5a3d0e, inset 0 -14px 30px #2a0303aa, 0 3px 0 #0b0d0c, 0 4px 0 #3a4136;
}
#ql86 .head::before, #ql86 .head::after {
  content:""; position:absolute; inset:9px; pointer-events:none;
  background:
    radial-gradient(circle at 0 0, #f6dc93 0 1.5px, #8a6420 2.5px 3.5px, transparent 4px) 0 0 / 50% 50% no-repeat,
    radial-gradient(circle at 100% 0, #f6dc93 0 1.5px, #8a6420 2.5px 3.5px, transparent 4px) 100% 0 / 50% 50% no-repeat,
    radial-gradient(circle at 0 100%, #f6dc93 0 1.5px, #8a6420 2.5px 3.5px, transparent 4px) 0 100% / 50% 50% no-repeat,
    radial-gradient(circle at 100% 100%, #f6dc93 0 1.5px, #8a6420 2.5px 3.5px, transparent 4px) 100% 100% / 50% 50% no-repeat;
}
#ql86 .head::after { display:none; }
#ql86 .brand { gap:16px; }
#ql86 .emblem { flex:none; width:clamp(64px,8vw,94px); height:auto; filter:drop-shadow(0 2px 0 #2a0303) drop-shadow(0 0 10px #ffcf6a33); }
#ql86 .titles { display:grid; gap:3px; min-width:0; }
#ql86 .corps { font:900 13px/1.1 "SimHei","Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif; letter-spacing:.42em; color:var(--brass-hi); text-shadow:0 1px #3a0505; }
#ql86 h1 { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 14px; font:900 clamp(34px,5.4vw,58px)/.95 "SimHei","Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif; letter-spacing:.02em; color:#fff3d2; text-shadow:0 2px 0 #3a0505, 0 0 22px #ff6a3a40; }
#ql86 h1 small { font:760 clamp(16px,2vw,22px)/1 "Bahnschrift","Segoe UI",sans-serif; letter-spacing:.14em; color:var(--brass); text-shadow:0 1px #3a0505; }
#ql86 .zsub { font:700 clamp(13px,1.5vw,16px)/1.25 "SimHei","Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif; letter-spacing:.12em; color:#ffe0a6; }
#ql86 .sub { margin:0; font:600 11px/1.3 var(--mono); letter-spacing:.1em; text-transform:uppercase; color:#e6b98a; }
#ql86 .slogan {
  display:grid; gap:4px; justify-items:center; padding:9px 14px 8px; text-align:center;
  background:linear-gradient(#a3151099, #6a0a0899), linear-gradient(var(--lacquer-d), #3e0606);
  border:2px solid var(--brass); border-radius:2px; box-shadow: inset 0 0 0 1px #3e0606, inset 0 0 0 3px #f6dc9366, 0 2px 0 #2a0303, 0 0 18px #ff3a2022;
}
#ql86 .slogan b { font:900 clamp(17px,1.9vw,23px)/1 "SimHei","Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif; letter-spacing:.2em; color:#ffe39a; text-shadow:0 1px 0 #6b4a12, 0 -1px 0 #fff4c8aa; white-space:nowrap; }
#ql86 .slogan span { font:700 12px/1 "SimHei","Microsoft YaHei",sans-serif; letter-spacing:.32em; color:#f6cf86; white-space:nowrap; }
#ql86 .id-plate {
  justify-items:end; gap:2px; padding:8px 11px; color:#a9a58c;
  background:linear-gradient(#141716,#1e2321); border:1px solid #0a0c0b; border-radius:3px;
  box-shadow: inset 0 2px 6px #000, inset 0 0 0 1px #3a4136, 0 1px 0 #ffffff14;
}
#ql86 .id-plate b { color:var(--brass); font-family:"SimHei","Microsoft YaHei",var(--mono); letter-spacing:.14em; }
#ql86 .id-clock { color:#ffcf6a; font-size:26px; text-shadow:0 0 10px #ffb02e88; }
#ql86 #ql86-date { color:#d9b06a; }
#ql86 .cmc-lock {
  grid-column:1/-1; display:none; align-items:center; justify-content:center; gap:4px 14px; flex-wrap:wrap; padding:6px 10px; margin:2px -8px -6px;
  background:repeating-linear-gradient(-45deg,#c8a020 0 8px,#111 8px 16px); border:1px solid var(--brass);
}
#ql86 .cmc-lock span, #ql86 .cmc-lock small { padding:3px 10px; background:#0d0303; }
#ql86 .cmc-lock span { font:900 15px/1.1 "SimHei","Microsoft YaHei",sans-serif; letter-spacing:.24em; color:#ff4a3a; text-shadow:0 0 10px #ff2a1aaa; }
#ql86 .cmc-lock small { font:700 10.5px/1.2 var(--mono); letter-spacing:.14em; color:#ffcf6a; }
#ql86[data-cmc="auth"] .cmc-lock { display:flex; animation:ql-slam .45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes ql-slam { from { opacity:0; transform:scale(1.18); } to { opacity:1; transform:none; } }

/* ---- tabs → backlit enamel keys --------------------------------------- */
#ql86 .nav { background:linear-gradient(#1d2220,#141716); border-bottom:1px solid #050606; padding:7px 10px; gap:5px; }
#ql86 .switch {
  color:#e8dcb3; background:linear-gradient(#3a423c,#252b27 60%,#1f2421); border:1px solid #0a0c0b;
  box-shadow: inset 0 1px #ffffff22, inset 0 -2px 0 #00000055, 0 2px #050606; text-shadow:0 1px #000;
}
#ql86 .switch:hover:not(:disabled):not([aria-pressed="true"]) { background:linear-gradient(#465049,#2c332e 60%,#252b27); }
#ql86 .switch:active:not(:disabled) { box-shadow: inset 0 2px 4px #000c; }
#ql86 .switch[aria-pressed="true"] {
  color:#ffe39a; border-color:var(--brass); background:linear-gradient(#5a4614,#3a2d0b 70%,#2e2409);
  box-shadow: inset 0 0 12px #ffb02e55, inset 0 1px #fff0b844, 0 0 0 1px #0a0c0b, 0 0 12px #ffb02e33;
}
#ql86 .switch[aria-pressed="true"]:hover { background:linear-gradient(#6a5418,#43340d 70%,#352a0a); }
#ql86 .switch.hot { color:#ffe9c8; background:linear-gradient(#9a1a12,#6a0c08); border-color:#e0a050; }
#ql86 .switch.hot:hover:not(:disabled) { background:linear-gradient(#b0241a,#7a110b); }
#ql86 .switch.good-btn { color:#dff6cf; background:linear-gradient(#2f5a32,#1d3a20); border-color:#7fbf74; }
#ql86 .switch.good-btn:hover:not(:disabled) { background:linear-gradient(#3a6a3c,#244726); }
#ql86 .nav .switch[aria-pressed="true"] { color:#1a1406; background:linear-gradient(#ffd77a,#e0a83a 60%,#b9862a); border-color:#fff0b8; text-shadow:none; box-shadow: inset 0 1px #fff7d6, 0 0 14px #ffb02e66, 0 2px #050606; }
#ql86 .nav .switch[aria-pressed="true"] .zh { opacity:1; }

/* ---- 2 · CMC crisis board ----------------------------------------- */
#ql86 .crisis {
  display:grid; grid-template-columns:auto minmax(0,1fr) minmax(150px,auto); align-items:stretch; gap:8px;
  padding:6px 10px; background:linear-gradient(#0f1110,#161a18); border-bottom:1px solid #050606;
  box-shadow: inset 0 1px #ffffff0a;
}
#ql86 .cr-lamps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; }
#ql86 .cr-lamp { min-height:34px; min-width:72px; padding:3px 6px; gap:1px; }
#ql86 .cr-lamp b { font:900 12px/1 "SimHei","Microsoft YaHei",sans-serif; letter-spacing:.08em; }
#ql86 .cr-lamp small { font:700 8.5px/1 var(--mono); letter-spacing:.06em; }
#ql86 .cr-ticker { display:flex; align-items:stretch; min-width:0; border:1px solid #3a1010; background:#0a0505; box-shadow: inset 0 2px 6px #000; }
#ql86 .cr-tag {
  display:grid; place-items:center; flex:none; padding:0 10px; font:900 15px/1 "SimHei","Microsoft YaHei",sans-serif; letter-spacing:.14em;
  color:#fff0d0; background:linear-gradient(#b3221a,#6a0c08); border-right:1px solid var(--brass);
}
#ql86 .crisis[data-stage="2"] .cr-tag, #ql86 .crisis[data-stage="3"] .cr-tag { animation:ql-tag 1s steps(1) infinite; }
@keyframes ql-tag { 50% { opacity:.45; } }
#ql86 .cr-window { position:relative; flex:1; min-width:0; overflow:hidden; display:flex; align-items:center;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 3%,#000 97%,transparent); mask-image:linear-gradient(90deg,transparent,#000 3%,#000 97%,transparent); }
#ql86 .cr-tape { display:flex; width:max-content; animation:ql-tape 36s linear infinite; will-change:transform; }
#ql86 .cr-run { display:flex; align-items:center; flex:none; }
#ql86 .cr-item { padding:0 12px; font:600 11.5px/1.2 var(--mono); letter-spacing:.06em; color:#ffb48a; white-space:nowrap; }
#ql86 .cr-item b { font:800 13px/1.2 "SimHei","Microsoft YaHei",sans-serif; color:#ffd79a; letter-spacing:.06em; margin-right:6px; }
#ql86 .cr-code { padding:1px 6px; font:700 10.5px/1.2 var(--mono); letter-spacing:.12em; color:#6dd16a; border:1px solid #2a4a2a; background:#081208; white-space:nowrap; }
#ql86 .crisis[data-stage="3"] .cr-item { color:#ff8a6a; }
@keyframes ql-tape { to { transform:translateX(-50%); } }
html.motion-paused #ql86 .cr-tape, html.motion-paused #ql86 .cr-tag { animation-play-state:paused; }
#ql86 .cr-tension { display:grid; align-content:center; gap:3px; padding:3px 8px; border:1px solid #2a2f2c; background:#101312; color:#a9a58c; }
#ql86 .tbar { --v:.2; display:block; height:8px; background:#1d221f; border:1px solid #050606; position:relative; overflow:hidden; }
#ql86 .tbar i { position:absolute; inset:0; transform-origin:0 50%; transform:scaleX(var(--v)); transition:transform .8s;
  background:repeating-linear-gradient(90deg,transparent 0 6px,#101312 6px 8px),linear-gradient(90deg,#6dd16a,#ffcf6a 50%,#ff3a2a); background-size:auto, 100% 100%; }
#ql86 .cr-tension b { color:#ffcf6a; letter-spacing:.08em; }
#ql86 .cr-tension b.hi { color:#ff6a4d; text-shadow:0 0 8px #ff2a1a88; }

/* ---- content well, status, orders -------------------------------- */
#ql86 .content { background:radial-gradient(ellipse at 10% 0%,#2a302c,#171a19 70%); }
#ql86 .statusband { color:#a9a58c; }
#ql86 .orders { border:1px solid #3a4136; border-left:4px solid #b3221a; background:linear-gradient(90deg,#2a0e0c,#1c201e 45%); color:#ecdcb8; }
#ql86 .orders b.tag { background:linear-gradient(#b3221a,#7a1111); color:#ffe39a; border:1px solid var(--brass); }
#ql86 .orders .otext b { color:#ffe0a6; }

/* ---- 3 · bunker hardware: decks + rivets ---------------------------- */
#ql86 .deck {
  position:relative;
  background:
    radial-gradient(circle at 9px 9px, #8c9284 0 1.6px, #2b302b 2.4px 3.4px, transparent 4px),
    radial-gradient(circle at calc(100% - 9px) 9px, #8c9284 0 1.6px, #2b302b 2.4px 3.4px, transparent 4px),
    radial-gradient(circle at 9px calc(100% - 9px), #8c9284 0 1.6px, #2b302b 2.4px 3.4px, transparent 4px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), #8c9284 0 1.6px, #2b302b 2.4px 3.4px, transparent 4px),
    repeating-linear-gradient(90deg,#ffffff04 0 1px,transparent 1px 4px),
    linear-gradient(160deg,#2f3530,var(--steel) 45%,#1c201e);
  border:1px solid var(--olive-steel); border-radius:3px;
  box-shadow: inset 0 1px #ffffff14, inset 0 0 0 3px #11141300, 0 2px 0 #050606, 0 0 0 0 transparent;
  transition: box-shadow .8s, border-color .8s;
}
#ql86[data-posture="1"] .deck { border-color:#8a5a1c; box-shadow: inset 0 1px #ffffff14, 0 2px 0 #050606, 0 0 18px -4px #e07a1866, inset 0 0 22px -10px #e07a1866; }
#ql86[data-posture="2"] .deck { border-color:#b3221a; box-shadow: inset 0 1px #ffffff14, 0 2px 0 #050606, 0 0 26px -4px #ff2a1a88, inset 0 0 30px -10px #ff2a1a77; }
#ql86 .strip {
  padding:8px 22px; color:var(--brass); text-shadow:0 1px #000, 0 -1px #ffffff12; letter-spacing:.1em;
  background:linear-gradient(#1b1f1d,#141716); border-bottom:1px solid #050606; box-shadow: inset 0 -1px #ffffff0d;
}
#ql86 .strip b { text-transform:uppercase; }
#ql86 .bezel { background:#0d100e; border:1px solid #050606; border-radius:12px; box-shadow: inset 0 3px 8px #000, 0 0 0 2px #2f3630, 0 0 0 3px #0a0c0b; }
#ql86 .control-body > section > strong { color:var(--brass); letter-spacing:.08em; }
#ql86 .channel { background:#161a18; border-color:#3a4136; color:#d8d9ad; }
#ql86 .channel:hover { background:#1f2421; }
#ql86 .channel[aria-pressed="true"] { background:linear-gradient(#2e2610,#1c1a12); border-color:var(--brass); }

/* posture switches: lit per level */
#ql86 .posture .switch[aria-pressed="true"][data-p="0"] { color:#d4f7c4; background:linear-gradient(#244a2a,#14301a); border-color:#6dd16a; box-shadow: inset 0 0 14px #6dd16a44, 0 0 10px #6dd16a33; }
#ql86 .posture .switch[aria-pressed="true"][data-p="1"] { color:#fff0c8; background:linear-gradient(#8a5a14,#5a3a0a); border-color:#ffcf6a; box-shadow: inset 0 0 14px #ffb02e66, 0 0 12px #ffb02e44; }
#ql86 .posture .switch[aria-pressed="true"][data-p="2"] { color:#fff0e0; background:linear-gradient(#c41e14,#7a0c08); border-color:#ff9c7a; box-shadow: inset 0 0 16px #ff6a4d88, 0 0 16px #ff2a1a77; }

/* lamps: engraved backlit tiles */
#ql86 .lamp { background:#141210; border-color:#050505; color:#4f473a; box-shadow: inset 0 0 0 1px #2c2720, inset 0 2px 3px #000; text-shadow:0 1px #000; }
#ql86 .lamp[data-on="ok"] { background:#1f4a26; color:#d8ffc6; text-shadow:0 0 6px #6dd16a; box-shadow: inset 0 0 12px #6dd16a77, inset 0 0 0 1px #6fae62; }
#ql86 .lamp[data-on="amber"] { background:#6a4a12; color:#fff0c0; text-shadow:0 0 6px #ffb02e; box-shadow: inset 0 0 12px #ffb02e99, inset 0 0 0 1px #d4a843; }
#ql86 .lamp[data-on="red"], #ql86 .lamp[data-on="redsteady"] { background:#8a1610; color:#fff0e6; text-shadow:0 0 6px #ff6a4d; box-shadow: inset 0 0 14px #ff4a3aaa, inset 0 0 0 1px #ff8a6a; }
#ql86 .annun-sec .annun { grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; padding:4px; background:#0a0b0a; border:1px solid #050606; box-shadow: inset 0 2px 6px #000; }
#ql86 .lamp.tile { min-height:38px; gap:1px; border-radius:1px; }
#ql86 .lamp.tile b { font:900 12.5px/1 "SimHei","Microsoft YaHei",sans-serif; letter-spacing:.1em; }
#ql86 .lamp.tile small { font:700 8.5px/1 var(--mono); letter-spacing:.08em; opacity:.9; }
#ql86[data-posture="1"] .cr-lamp[data-on="amber"] { animation:ql-pulse 2.4s ease-in-out infinite; }
#ql86[data-posture="2"] .cr-lamp[data-on="red"], #ql86[data-posture="2"] .lamp.tile[data-on="redsteady"] { animation:ql-pulse 1.1s ease-in-out infinite; }
@keyframes ql-pulse { 50% { opacity:.62; } }
html.motion-paused #ql86 .lamp { animation:none !important; }

/* auth: CMC lock-in */
#ql86 .auth { position:relative; background:#121513; border:1px solid #050606; box-shadow: inset 0 0 0 2px #d4a84330, inset 0 2px 6px #000; }
#ql86[data-cmc="auth"] .auth { border-color:#ff4a3a; box-shadow: inset 0 0 0 2px #ff2a1a88, 0 0 18px #ff2a1a66; }
#ql86[data-cmc="auth"] .auth::before {
  content:"中央军委核反击授权 · 已验证"; display:block; padding:6px 4px; text-align:center;
  font:900 14px/1.1 "SimHei","Microsoft YaHei",sans-serif; letter-spacing:.2em; color:#ffe39a;
  background:linear-gradient(#c41e14,#6a0c08); border:2px solid var(--brass); box-shadow: inset 0 0 0 1px #3e0606, 0 0 16px #ff2a1a88;
  animation:ql-slam .45s cubic-bezier(.2,1.6,.4,1) both;
}

/* launch box: hazard frame, recessed well, flip-up guard */
#ql86 .redbox {
  padding:10px; gap:6px; border:1px solid #050606;
  background:
    linear-gradient(#141716,#141716) padding-box content-box,
    repeating-linear-gradient(-45deg,#d4a420 0 10px,#121212 10px 20px);
  box-shadow: inset 0 0 0 1px #000, 0 2px 0 #050606;
}
#ql86 .redbox > .gold { padding-bottom:2px; }
#ql86 .well { position:relative; padding:7px; background:#0a0b0a; border:1px solid #000; border-radius:4px; box-shadow: inset 0 4px 10px #000, inset 0 0 0 1px #2f3630; perspective:500px; }
#ql86 .launch {
  position:relative; border:2px solid #3e0606; border-radius:4px; color:#fff1d0; text-shadow:0 2px #3e0606;
  background:linear-gradient(#e0402e,#a4140f 60%,#6a0c08);
  box-shadow: inset 0 2px #ff9a7a, inset 0 -4px 0 #4a0606, 0 4px 0 #1a0303, 0 6px 10px #000;
  font-family:"SimHei","Microsoft YaHei","PingFang SC",sans-serif; font-weight:900; letter-spacing:.24em;
}
#ql86 .launch:hover { background:linear-gradient(#f0503a,#b81a12 60%,#7a110b); }
#ql86 .launch:active { transform:translateY(3px); box-shadow: inset 0 2px #ff9a7a, inset 0 -2px 0 #4a0606, 0 1px 0 #1a0303; }
#ql86[data-posture="2"] .launch { box-shadow: inset 0 2px #ffb49a, inset 0 -4px 0 #4a0606, 0 4px 0 #1a0303, 0 0 26px #ff2a1acc; }
#ql86 .guard {
  position:absolute; inset:4px; z-index:2; pointer-events:none; display:grid; place-items:end center; padding-bottom:4px;
  border:2px solid #ff8a6a88; border-radius:5px;
  background:linear-gradient(170deg,#ff6a4d55,#c41e1433 40%,#7a0c0844), repeating-linear-gradient(90deg,#ffffff0a 0 2px,transparent 2px 9px);
  box-shadow: inset 0 1px #ffd0c088, 0 4px 6px #0008;
  transform-origin:50% 0; transform:rotateX(0deg); transition:transform .55s cubic-bezier(.3,1.5,.5,1), opacity .55s;
}
#ql86 .guard .hinge { position:absolute; left:12%; right:12%; top:-5px; height:7px; border-radius:3px; background:linear-gradient(#e8ecd8,#7a8070 60%,#3a4036); box-shadow:0 1px 2px #000; }
#ql86 .guard em { font:900 10.5px/1 "SimHei","Microsoft YaHei",sans-serif; font-style:normal; letter-spacing:.18em; color:#ffe0d0; text-shadow:0 1px #000; padding:2px 6px; background:#2a0303aa; }
#ql86[data-posture="2"] .guard { transform:rotateX(78deg); opacity:.55; }
html.motion-paused #ql86 .guard { transition:none; }

/* dual key: recessed steel cups */
#ql86 .key-slot { position:relative; padding:6px 4px 5px; border:1px solid #050606; border-radius:3px; background:radial-gradient(ellipse at 50% 55%,#2a2f2c,#121513 70%); box-shadow: inset 0 3px 8px #000, 0 1px #ffffff12; }
#ql86 .key-slot h3 { display:inline-flex; align-items:center; gap:5px; padding:2px 8px; margin-bottom:3px; font-size:11px; color:#e8dcb3; background:linear-gradient(#3a423c,#1f2421); border:1px solid #000; border-radius:2px; box-shadow: inset 0 1px #ffffff1a; }
#ql86 .key-slot h3 span { font:900 13px/1 "SimHei","Microsoft YaHei",sans-serif; color:var(--brass-hi); letter-spacing:.1em; }
#ql86 .seat-led { width:7px; height:7px; border-radius:50%; background:#3a1010; box-shadow: inset 0 1px 1px #000; }
#ql86 .key-slot:has(.key:not(:disabled)) .seat-led { background:#ffb02e; box-shadow:0 0 6px #ffb02e; }
#ql86 .key-slot:has(.key[aria-pressed="true"]) .seat-led { background:#ff3a2a; box-shadow:0 0 8px #ff3a2a; }
#ql86 .key-lock { color:#ff9c7a; }
#ql86 .line-meter { border-color:#3a4136; background:#141716; box-shadow: inset 0 2px 6px #000; }

/* event printer: dark steel slot, amber dot-matrix */
#ql86 .footer {
  background:linear-gradient(#1b1f1d,#121513); border-top:2px solid var(--brass); color:#ffcf6a;
  box-shadow: inset 0 3px 6px #000;
}
#ql86 .footer b { color:var(--brass); font-family:"SimHei","Microsoft YaHei",var(--mono); }
#ql86 .footer .latest { color:#ffcf6a; text-shadow:0 0 6px #ffb02e66; }

/* endcard restart button keeps the crimson key */
#ql86 .endcard .box { border-color:var(--brass); box-shadow:0 0 0 3px #0a0505, 0 0 60px #000; }

/* crisis skin · responsive */
@media (max-width:1000px) {
  #ql86 .head { grid-template-columns:minmax(0,1fr) auto; }
  #ql86 .slogan { grid-column:1/-1; grid-row:2; justify-self:stretch; }
  #ql86 .crisis { grid-template-columns:minmax(0,1fr) minmax(130px,auto); }
  #ql86 .cr-ticker { grid-column:1/-1; grid-row:2; }
}
@media (max-width:560px) {
  #ql86 .head { grid-template-columns:minmax(0,1fr); padding:12px 12px 10px; gap:8px; }
  #ql86 .head::before { inset:5px; }
  #ql86 .brand { gap:10px; }
  #ql86 .emblem { width:58px; }
  #ql86 .corps { font-size:10.5px; letter-spacing:.26em; }
  #ql86 .zsub { font-size:12px; letter-spacing:.06em; }
  #ql86 .sub { display:none; }
  #ql86 .slogan { grid-row:auto; padding:6px 8px; }
  #ql86 .slogan b { font-size:16px; letter-spacing:.14em; }
  #ql86 .slogan span { font-size:10.5px; letter-spacing:.2em; }
  #ql86 .id-plate { grid-template-columns:auto auto; justify-content:space-between; align-items:center; justify-items:start; }
  #ql86 .id-plate > b { display:block; }
  #ql86 .crisis { grid-template-columns:minmax(0,1fr); padding:5px 6px; gap:5px; }
  #ql86 .cr-lamps { grid-column:1/-1; }
  #ql86 .cr-lamp { min-width:0; }
  #ql86 .cr-ticker { grid-row:auto; min-height:28px; }
  #ql86 .cr-tag { font-size:13px; padding:0 7px; }
  #ql86 .strip { padding:7px 14px; }
  #ql86 .annun-sec .annun { grid-template-columns:repeat(4,minmax(0,1fr)); }
  #ql86 .lamp.tile b { font-size:11px; letter-spacing:.04em; }
}
