/* tm2027 · Статусный ход — борд живого статусбара. Демо = мини-статусбары
   на общих битовых часах 125 мс; prefers-reduced-motion останавливает всё. */

:root {
  --canvas: #0b0f14;
  --panel: #10151c;
  --bar: #11161d;
  --control: #1b2230;
  --control-hover: #252d3a;
  --selection: #1d365d;
  --selection-border: #5b7cfa;
  --border: #252d38;
  --border-strong: #303947;
  --ink: #f4f7fb;
  --body: #e8edf2;
  --muted: #9aa6b5;
  --live: #62d6a7;
  --live-text: #83d9b2;
  --amber: #d5a64a;
  --blocked: #f19aa7;
  --mono: "Cascadia Mono", "Hack", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--canvas); }

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
  padding-bottom: 84px;
}

.masthead { border-bottom: 1px solid var(--border); background: var(--panel); }
.mast-inner { max-width: 1060px; margin: 0 auto; padding: 40px 24px 32px; }
.mast-brand { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); text-transform: lowercase; }
.mast-dot { color: var(--selection-border); }
h1 { font-size: 34px; font-weight: 650; color: var(--ink); letter-spacing: -.01em; margin: 10px 0 12px; }
.lede { max-width: 72ch; color: var(--body); }

main { max-width: 1060px; margin: 0 auto; padding: 12px 24px; }
.campaign { padding: 36px 0 8px; border-bottom: 1px solid var(--border); }
.campaign:last-of-type { border-bottom: 0; }
.camp-head { display: flex; gap: 16px; align-items: baseline; margin-bottom: 20px; }
.camp-no { font-family: var(--mono); font-size: 26px; color: var(--selection-border); min-width: 34px; text-align: right; }
.camp-head h2 { font-size: 21px; font-weight: 650; color: var(--ink); }
.camp-head p { max-width: 78ch; color: var(--muted); margin-top: 4px; font-size: 13.5px; }

.variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; padding-bottom: 28px; }

.variant {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 80ms linear, background-color 80ms linear;
}
.variant:hover { background: #131a23; border-color: var(--border-strong); }
.variant.picked { background: #12203a; border-color: var(--selection-border); box-shadow: inset 0 0 0 1px var(--selection-border); }

.v-tag {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--border-strong); padding: 1px 7px; border-radius: 3px;
  background: var(--canvas); z-index: 2;
}
.variant.picked .v-tag { color: var(--ink); background: var(--selection); border-color: var(--selection-border); }
.variant h3 { font-size: 15px; font-weight: 650; color: var(--ink); margin: 12px 0 6px; }
.variant > p { font-size: 12.5px; color: var(--muted); }

.stage {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-height: 96px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* ---------- мини-статусбар ---------- */

.sbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 10px;
  background: var(--bar);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
}

.sbar.right { justify-content: flex-end; }
.sbar.wide .s-text { flex: 1; }
.sbar.inv { background: var(--body); }
.sbar.inv .s-text, .sbar.inv .s-lab { color: #11161d; }
.sbar.inv .s-chip { color: #11161d; border-color: #11161d; }

.s-text { color: var(--body); white-space: nowrap; overflow: hidden; }
.s-lab { font-size: 10px; color: #5c6774; }
.s-caret { color: var(--live); }
.s-caret.off { visibility: hidden; }

.s-text.inv { background: var(--body); color: #11161d; }

.s-chip {
  font-size: 9.5px;
  letter-spacing: .05em;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  white-space: nowrap;
  position: relative;
  flex: none;
}

.s-chip.amber { color: var(--amber); border-color: #55462a; }
.s-chip.inv { background: var(--body); color: #11161d !important; border-color: var(--body); }
.s-chip.press { transform: translateY(1px); }

.s-chip.latt.l1::after, .s-chip.latt.l2::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 999px;
  background: repeating-conic-gradient(var(--bar) 0 25%, transparent 0 50%) 0 0 / 4px 4px;
}
.s-chip.latt.l1::after {
  background:
    repeating-conic-gradient(var(--bar) 0 25%, transparent 0 50%) 0 0 / 4px 4px,
    repeating-conic-gradient(transparent 0 25%, var(--bar) 0 50%) 2px 2px / 4px 4px;
}

/* барабан */
.drum { display: flex; flex-direction: column; height: 16px; overflow: hidden; }
.drum i { font-style: normal; height: 16px; line-height: 16px; color: var(--body); flex: none; }
.drum.step1 { margin-top: 0; }
.drum i { transition: none; }
.drum.roll1 i:first-child { margin-top: -8px; }
.drum.roll2 i:first-child { margin-top: -16px; }

/* канвасы */
.cv { image-rendering: pixelated; flex: none; }
#spark { width: 56px; height: 12px; }
#yoyo { width: 56px; height: 8px; }
#ekg2 { width: 48px; height: 12px; }
#thermo { width: 40px; height: 8px; }
#lcd { width: 72px; height: 28px; }
#skyline { width: 52px; height: 14px; }
#anchor { width: 40px; height: 14px; }
#minimap { width: 60px; height: 8px; }

.scan-cv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* одометр */
.odo { display: flex; gap: 1px; flex: none; }
.odo i {
  display: block; width: 11px; height: 15px; line-height: 15px;
  text-align: center; font-family: var(--mono); font-size: 10.5px;
  color: var(--ink); background: #05070a; border: 1px solid var(--border-strong);
  font-style: normal; overflow: hidden;
}
.odo i.roll { animation: odo-roll .125s steps(2, end) 1; }
@keyframes odo-roll { 0% { transform: translateY(5px); } 100% { transform: translateY(0); } }

/* +1 */
.float-one {
  position: absolute; right: 4px; top: -10px;
  font-size: 9px; color: var(--amber);
}

/* колокол-чип */
.s-chip.sw1 { transform: rotate(-4deg); }
.s-chip.sw2 { transform: rotate(3deg); }
.s-chip.sw3 { transform: rotate(-1deg); }

/* эквалайзер */
.vu { display: flex; align-items: flex-end; gap: 2px; height: 10px; flex: none; }
.vu i { width: 4px; background: var(--live); height: 2px; }
.vu i.h1 { height: 4px; }
.vu i.h2 { height: 7px; }
.vu i.h3 { height: 10px; }

/* фосфорные цифры */
.ghostn { position: relative; width: 22px; height: 15px; flex: none; }
.ghostn b, .ghostn em { position: absolute; inset: 0; font-style: normal; font-weight: 400; font-family: var(--mono); font-size: 11px; }
.ghostn b { color: #3a4453; visibility: hidden; }
.ghostn b.show { visibility: visible; }
.ghostn em { color: var(--ink); }

/* флот-доты */
.fleet-dots { display: flex; gap: 4px; }
.fleet-dots i { width: 5px; height: 5px; border-radius: 1px; background: var(--live); }
.fleet-dots i:nth-child(4) { background: var(--amber); }
.fleet-dots i:nth-child(5) { background: #2a3240; }
.fleet-dots i.b0 { opacity: .45; }
.fleet-dots i.b1 { opacity: .7; }
.fleet-dots i.b2 { opacity: 1; }

/* дизер-пульс BACK TO LIVE */
.dith-pulse { position: relative; }
.dith-pulse.p1::after, .dith-pulse.p2::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  background: repeating-conic-gradient(var(--bar) 0 25%, transparent 0 50%) 0 0 / 3px 3px;
}
.dith-pulse.p2::after { background: repeating-conic-gradient(transparent 0 25%, var(--bar) 0 50%) 0 0 / 3px 3px; }

/* заклёпки */
.rivet { width: 2px; height: 2px; background: #3a4453; border-radius: 0; flex: none; }
.rivet.hot { background: var(--amber); box-shadow: 0 0 0 1px #55462a; }

/* фосфорная подсветка чипа */
.glow-target.g2 { box-shadow: 0 0 6px 2px rgba(213, 166, 74, .55); }
.glow-target.g1 { box-shadow: 0 0 5px 1px rgba(213, 166, 74, .3); }
.glow-target.g0 { box-shadow: 0 0 4px 1px rgba(213, 166, 74, .15); }

/* световой шов */
.sbar.seam { overflow: visible; }
.seam-light {
  position: absolute; bottom: -1px; height: 2px; width: 34px;
  background: var(--amber);
  transition: none;
}

/* ---------- pickbar ---------- */

.pickbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bar); border-top: 1px solid var(--border-strong); z-index: 10; }
.pick-inner { max-width: 1060px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px; }
.pick-count { font-size: 12.5px; color: var(--muted); flex: none; }
.pick-codes { flex: 1; font-family: var(--mono); font-size: 12px; color: var(--live-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#copy-btn {
  font-family: inherit; font-size: 12.5px; color: var(--body);
  background: var(--control); border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 6px 14px; cursor: pointer;
}
#copy-btn:hover { background: var(--control-hover); }
#copy-btn.done { color: var(--live-text); border-color: #2c5347; }

@media (prefers-reduced-motion: reduce) {
  body::after {
    content: "MOTION: REDUCED — борд стоит, как стоял бы бар.";
    position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%);
    font-family: var(--mono); font-size: 11px; color: var(--amber);
    background: var(--bar); border: 1px solid #55462a;
    padding: 4px 12px; border-radius: 999px;
  }
}
