:root {
  --amber: #ffb347;
  --amber-soft: rgba(255, 179, 71, .55);
  --cyan: #63d7ff;
  --cyan-dim: rgba(99, 215, 255, .35);
  --ink: #d9edf6;
  --muted: #6f8b9c;
  --ok: #74e3b0;
  --bad: #ff6b6b;
  --panel: rgba(9, 19, 27, .55);
  --line: rgba(99, 215, 255, .14);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: "Bahnschrift", "Segoe UI", "Segoe UI Semilight", system-ui, sans-serif;
  background: #04070b;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  letter-spacing: .01em;
  user-select: none;
}

/* ---------------------------------------------------------------- фон */

.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(1100px 700px at 50% 44%, rgba(255, 150, 50, .10), transparent 62%),
    radial-gradient(900px 620px at 50% 52%, rgba(60, 180, 255, .09), transparent 66%),
    linear-gradient(180deg, #04070b, #03060a 45%, #050a0f);
}

.grid {
  position: absolute; inset: -25%;
  background-image:
    linear-gradient(rgba(99, 215, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 215, 255, .05) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0 38%, transparent 76%);
  mask-image: radial-gradient(circle at 50% 50%, #000 0 38%, transparent 76%);
  animation: drift 60s linear infinite;
}

.glow {
  position: absolute; inset: 0;
  background: radial-gradient(680px 680px at 50% 48%, rgba(255, 170, 70, .10), transparent 70%);
  animation: breathe 7s ease-in-out infinite;
}

.scanlines {
  position: absolute; inset: 0; opacity: .5;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 48%, rgba(0, 0, 0, .72) 100%);
}

/* ------------------------------------------------------------- верх */

.topbar {
  position: relative; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px 28px 12px;
  border-bottom: 1px solid rgba(99, 215, 255, .10);
  background: linear-gradient(180deg, rgba(6, 14, 21, .92), rgba(4, 9, 14, .35));
}

.brand { display: flex; align-items: center; gap: 12px; }

.mark { position: relative; width: 34px; height: 34px; }
.mark-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(255, 179, 71, .55);
  box-shadow: 0 0 14px rgba(255, 179, 71, .35), inset 0 0 10px rgba(255, 179, 71, .2);
  animation: spin 22s linear infinite;
  border-top-color: transparent; border-right-color: transparent;
}
.mark-dot {
  position: absolute; inset: 11px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #ffe6bd, #ff9a2e 65%, #b45a00);
  box-shadow: 0 0 12px rgba(255, 160, 60, .8);
}

.brand-text h1 {
  margin: 0; font-size: 20px; font-weight: 400;
  letter-spacing: .52em; color: #eef8ff;
  text-shadow: 0 0 18px rgba(99, 215, 255, .35);
}
.brand-text p {
  margin: 2px 0 0; font-size: 8.5px; letter-spacing: .3em;
  color: var(--muted); text-transform: uppercase;
}

.statusline { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: center; }

.pill {
  font-size: 9px; letter-spacing: .3em; padding: 4px 12px;
  border: 1px solid rgba(255, 179, 71, .45); color: var(--amber);
  background: rgba(255, 179, 71, .06); border-radius: 2px;
  text-transform: uppercase; transition: color .3s, border-color .3s;
}
body[data-state="listening"] .pill { color: var(--cyan); border-color: var(--cyan-dim); background: rgba(99, 215, 255, .07); }
body[data-state="thinking"] .pill { color: #ffe6bd; border-color: rgba(255, 230, 190, .5); }
body[data-state="speaking"] .pill { color: #ffd9a0; border-color: rgba(255, 217, 160, .55); }

.hint { font-size: 10.5px; letter-spacing: .12em; color: var(--muted); }
.clock { text-align: right; }
#clock {
  font-size: 20px; letter-spacing: .14em; color: #ffe2b8;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(255, 179, 71, .35);
}
#date { font-size: 9px; letter-spacing: .22em; color: var(--muted); text-transform: uppercase; margin-top: 2px; }

/* ------------------------------------------------------------ каркас */

.layout {
  position: relative; z-index: 2;
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 300px;
  gap: 16px; padding: 16px 22px 0;
}

.panel {
  position: relative;
  display: flex; flex-direction: column; min-height: 0;
  background: linear-gradient(180deg, rgba(10, 22, 31, .58), rgba(6, 12, 18, .32));
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  clip-path: polygon(0 14px, 14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.panel::before {
  content: ""; position: absolute; left: 0; top: 0; width: 46px; height: 1px;
  background: linear-gradient(90deg, var(--amber), transparent); opacity: .8;
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 14px 8px;
  font-size: 9.5px; letter-spacing: .34em; text-transform: uppercase; color: var(--cyan);
  border-bottom: 1px solid rgba(99, 215, 255, .1);
}
.panel-head.small { padding: 8px 14px 6px; font-size: 9px; color: var(--muted); border-bottom: none; }

.ghost {
  background: transparent; border: 1px solid rgba(99, 215, 255, .22);
  color: var(--muted); font-family: inherit; font-size: 8.5px;
  letter-spacing: .2em; text-transform: uppercase; padding: 3px 8px;
  border-radius: 2px; cursor: pointer; transition: .2s;
}
.ghost:hover { color: var(--amber); border-color: rgba(255, 179, 71, .55); box-shadow: 0 0 12px rgba(255, 179, 71, .18); }

/* ---------------------------------------------------------- журнал */

.log { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; }

.msg {
  border-left: 2px solid var(--cyan-dim);
  padding: 7px 10px 8px;
  background: linear-gradient(90deg, rgba(99, 215, 255, .06), transparent 85%);
  animation: rise .35s ease both;
}
.msg.user {
  border-left-color: var(--amber-soft);
  background: linear-gradient(90deg, rgba(255, 179, 71, .07), transparent 85%);
}
.msg .who {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 8px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.msg.user .who { color: rgba(255, 179, 71, .75); }
.msg .body { font-size: 13px; line-height: 1.52; color: #d8ecf6; white-space: pre-wrap; word-break: break-word; }
.msg.streaming .body::after { content: "▍"; color: var(--amber); animation: blink 1s steps(2) infinite; margin-left: 2px; }

.msg .sources { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.msg .sources span {
  font-family: Consolas, monospace; font-size: 9px; color: var(--cyan);
  border: 1px solid rgba(99, 215, 255, .22); padding: 1px 5px; border-radius: 2px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg img.shot {
  display: block; max-width: 100%; margin-top: 7px;
  border: 1px solid rgba(99, 215, 255, .28); box-shadow: 0 0 18px rgba(99, 215, 255, .12);
}
.msg video.shot {
  display: block; max-width: 100%; max-height: 52vh; margin-top: 7px;
  border: 1px solid rgba(99, 215, 255, .28); box-shadow: 0 0 18px rgba(99, 215, 255, .12);
  background: #000;
}
.msg audio.sound {
  display: block; width: 100%; height: 34px; margin-top: 7px;
  filter: sepia(.25) saturate(1.2) hue-rotate(170deg);
}
.msg .badge {
  font-size: 8px; letter-spacing: .18em; color: var(--amber);
  border: 1px solid rgba(255, 179, 71, .35); padding: 1px 6px; border-radius: 2px;
  text-transform: uppercase;
}

/* ---------------------------------------------------------- реактор */

.stage { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; gap: 2px; }

.reactor {
  position: relative;
  width: min(53vh, 570px);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: auto;
  filter: drop-shadow(0 0 30px rgba(255, 150, 60, .14));
}

/* радиальный «радар»: тонкий сектор, обегающий внешнее кольцо */
.reactor::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg,
    rgba(99, 215, 255, .22), rgba(99, 215, 255, .06) 22deg, transparent 46deg 360deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 0 88%, #000 89% 99%, transparent 100%);
  mask-image: radial-gradient(closest-side, transparent 0 88%, #000 89% 99%, transparent 100%);
  animation: spin 6.5s linear infinite; opacity: .75;
}

.ring { position: absolute; inset: 0; border-radius: 50%; }

.ticks {
  background: repeating-conic-gradient(from 0deg, rgba(255, 191, 100, .72) 0deg .6deg, transparent .6deg 2.6deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 0 92.5%, #000 93% 96.5%, transparent 97%);
  mask-image: radial-gradient(closest-side, transparent 0 92.5%, #000 93% 96.5%, transparent 97%);
  animation: spin 140s linear infinite; opacity: .8;
}

.segments {
  background: repeating-conic-gradient(from 0deg, rgba(99, 215, 255, .5) 0deg 5deg, transparent 5deg 17deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 0 79%, #000 79.5% 84%, transparent 84.5%);
  mask-image: radial-gradient(closest-side, transparent 0 79%, #000 79.5% 84%, transparent 84.5%);
  animation: spin-rev 34s linear infinite; opacity: .7;
}

.arcs {
  background: conic-gradient(from 205deg,
    rgba(255, 179, 71, .95) 0deg 44deg, transparent 44deg 118deg,
    rgba(99, 215, 255, .85) 118deg 166deg, transparent 166deg 246deg,
    rgba(255, 179, 71, .7) 246deg 288deg, transparent 288deg 360deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 0 86.5%, #000 87% 89%, transparent 89.5%);
  mask-image: radial-gradient(closest-side, transparent 0 86.5%, #000 87% 89%, transparent 89.5%);
  animation: spin 19s linear infinite;
  filter: drop-shadow(0 0 9px rgba(255, 179, 71, .45));
}

.inner {
  inset: 15%;
  background: repeating-conic-gradient(from 0deg, rgba(99, 215, 255, .38) 0deg 1.6deg, transparent 1.6deg 9deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 0 71%, #000 72% 75%, transparent 76%);
  mask-image: radial-gradient(closest-side, transparent 0 71%, #000 72% 75%, transparent 76%);
  animation: spin-rev 70s linear infinite; opacity: .85;
}

.core {
  position: absolute; inset: 30%; border-radius: 50%;
  background: radial-gradient(circle at 50% 44%,
    rgba(255, 246, 224, 1), rgba(255, 186, 92, .72) 30%,
    rgba(255, 128, 26, .22) 56%, transparent 74%);
  box-shadow:
    0 0 70px rgba(255, 150, 50, .35),
    0 0 130px rgba(255, 120, 30, .16),
    inset 0 0 44px rgba(255, 225, 180, .35);
  animation: breathe 5.5s ease-in-out infinite;
}
.core::after {
  content: ""; position: absolute; inset: 17%; border-radius: 50%;
  border: 1px solid rgba(255, 226, 180, .35);
  box-shadow: inset 0 0 18px rgba(255, 200, 120, .25);
}

#wave { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.stage-label { position: relative; text-align: center; pointer-events: none; margin-top: 2px; }
.stage-label .state {
  font-size: 10.5px; letter-spacing: .46em; text-transform: uppercase;
  color: var(--amber); text-shadow: 0 0 16px rgba(255, 179, 71, .45); transition: color .3s;
}
body[data-state="listening"] .stage-label .state { color: var(--cyan); text-shadow: 0 0 16px rgba(99, 215, 255, .55); }
body[data-state="thinking"] .stage-label .state { color: #ffe8c8; }
.stage-label .sub { margin-top: 6px; font-size: 9.5px; letter-spacing: .18em; color: var(--muted); }

.subtitle {
  min-height: 22px; max-width: 74ch; text-align: center;
  font-size: 12.5px; line-height: 1.5; color: #9fc4d6;
  letter-spacing: .03em; padding: 0 12px;
  opacity: .85; transition: opacity .3s;
}

body[data-state="listening"] .core { animation-duration: 1.3s; box-shadow: 0 0 100px rgba(99, 215, 255, .45), inset 0 0 44px rgba(200, 240, 255, .4); }
body[data-state="thinking"] .arcs { animation-duration: 4.5s; }
body[data-state="thinking"] .segments { animation-duration: 9s; }
body[data-state="speaking"] .core { animation-duration: 1.7s; }
body[data-state="speaking"] .arcs { animation-duration: 11s; }

/* ------------------------------------------------------ правый блок */

.engines { list-style: none; margin: 0; padding: 10px 14px 4px; display: flex; flex-direction: column; gap: 7px; }
.engines li { display: grid; grid-template-columns: 9px 1fr; gap: 8px; align-items: start; }
.engines .dot {
  width: 6px; height: 6px; margin-top: 4px; border-radius: 50%;
  background: var(--ok); color: var(--ok);
  box-shadow: 0 0 8px currentColor;
}
.engines li.bad .dot { background: var(--bad); color: var(--bad); }
.engines li.bad .eng-name { color: #ffc9c9; }
.eng-name { font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: #d3e9f4; }
.eng-detail { margin-top: 2px; font-family: Consolas, monospace; font-size: 9px; color: var(--muted); word-break: break-word; }

.modules { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 12px 10px; overflow-y: auto; max-height: 24vh; }
.module {
  font-size: 9px; padding: 3px 7px; border-radius: 2px; cursor: pointer;
  color: #a9c8d8; border: 1px solid rgba(99, 215, 255, .16);
  background: rgba(99, 215, 255, .045); transition: .18s;
}
.module:hover { color: #fff; border-color: rgba(255, 179, 71, .5); box-shadow: 0 0 10px rgba(255, 179, 71, .15); }
.module.online::after { content: "онлайн"; font-size: 7px; color: var(--amber); margin-left: 4px; vertical-align: super; }

.meters { padding: 8px 14px; display: flex; flex-direction: column; gap: 8px; }
.meter { display: grid; grid-template-columns: 56px 1fr 42px; align-items: center; gap: 8px; font-size: 8.5px; letter-spacing: .2em; color: var(--muted); }
.bar { height: 4px; background: rgba(99, 215, 255, .1); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--amber)); box-shadow: 0 0 8px rgba(255, 179, 71, .45); transition: width .7s ease; }
.meter b { font-weight: 400; text-align: right; color: #cfe6f2; font-family: Consolas, monospace; font-size: 9px; }

.sys-panel { overflow-y: auto; }

/* ----------------------------------------------------------- эволюция */

.evo { padding: 8px 14px 10px; display: flex; flex-direction: column; gap: 6px; }
.evo-line { display: flex; align-items: center; gap: 8px; font-size: 8.5px; letter-spacing: .16em; color: var(--muted); }
.evo-line b { color: var(--amber); font: 400 15px/1 Consolas, monospace; text-shadow: 0 0 10px rgba(255, 179, 71, .4); }
.evo-bar { flex: 1; height: 3px; background: rgba(99, 215, 255, .12); position: relative; overflow: hidden; }
.evo-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--cyan), var(--amber)); box-shadow: 0 0 8px rgba(255, 179, 71, .5); transition: width .8s ease; }
.evo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 15vh; overflow-y: auto; }
.evo-list li { font-size: 9.5px; line-height: 1.35; color: #b9d6e4; cursor: pointer; padding: 3px 6px; border-left: 1px solid rgba(255, 179, 71, .35); background: rgba(255, 179, 71, .045); }
.evo-list li:hover { color: #fff; background: rgba(255, 179, 71, .1); }
.evo-list li .imp { color: var(--amber); font-family: Consolas, monospace; }
.evo-list li.quiet { cursor: default; border-left-color: rgba(99, 215, 255, .2); background: transparent; color: var(--muted); font-style: italic; }
.evo-foot { font-size: 8.5px; line-height: 1.45; color: var(--muted); font-family: Consolas, monospace; }

/* ---------------------------------------------------- синхронизация */

.sync { padding: 6px 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.sync-line { font-size: 8.5px; line-height: 1.45; color: var(--muted); font-family: Consolas, monospace; word-break: break-word; }
.sync-actions { display: flex; gap: 5px; flex-wrap: wrap; }

.footnote { margin-top: auto; padding: 8px 14px 12px; font-size: 8.5px; letter-spacing: .1em; color: var(--muted); font-family: Consolas, monospace; word-break: break-word; }

/* ------------------------------------------------------------ консоль */

.console {
  position: relative; z-index: 3;
  padding: 10px 26px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 9px;
  background: linear-gradient(0deg, rgba(3, 7, 11, .96), rgba(3, 7, 11, .5) 65%, transparent);
}

.chips { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.chip {
  font-size: 9.5px; letter-spacing: .06em; color: #9fc4d6; cursor: pointer;
  background: rgba(99, 215, 255, .05); border: 1px solid rgba(99, 215, 255, .16);
  padding: 3px 10px; border-radius: 20px; transition: .18s;
}
.chip:hover { color: #fff; border-color: rgba(255, 179, 71, .55); box-shadow: 0 0 12px rgba(255, 179, 71, .18); }

.inputrow { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 1080px; margin: 0 auto; }

/* присланные файлы: плашки над строкой ввода */
.attached { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  width: 100%; max-width: 1080px; margin: 0 auto 8px; }
.attached[hidden] { display: none; }
.chip-file {
  display: inline-flex; align-items: center; gap: 8px; max-width: 340px;
  font-size: 10.5px; letter-spacing: .04em; color: #cfe9f4;
  background: rgba(99, 215, 255, .07); border: 1px solid rgba(99, 215, 255, .28);
  padding: 4px 6px 4px 10px; border-radius: 14px;
}
.chip-file b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-file i { font-style: normal; opacity: .55; font-size: 9px; text-transform: uppercase; }
.chip-file.ok { border-color: rgba(69, 226, 210, .55); }
.chip-file.bad { border-color: rgba(255, 120, 120, .6); color: #ffc9c9; }
.chip-file button {
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font-size: 14px; line-height: 1; opacity: .6; padding: 0 2px;
}
.chip-file button:hover { opacity: 1; }
body.dropping::after {
  content: "отпусти файл — отдам Джарвису"; position: fixed; inset: 12px;
  border: 2px dashed rgba(69, 226, 210, .75); border-radius: 18px;
  display: grid; place-items: center; font-size: 15px; letter-spacing: .08em;
  color: #d9fff9; background: rgba(1, 6, 7, .55); z-index: 9999; pointer-events: none;
}

.round {
  flex: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 179, 71, .45); color: var(--amber);
  background: radial-gradient(circle at 50% 38%, rgba(255, 179, 71, .18), rgba(255, 179, 71, .02));
  display: grid; place-items: center; transition: .2s;
}
.round:hover { color: #ffe4b8; box-shadow: 0 0 18px rgba(255, 179, 71, .3); }
.round.send { border-color: rgba(99, 215, 255, .45); color: var(--cyan);
  background: radial-gradient(circle at 50% 38%, rgba(99, 215, 255, .16), rgba(99, 215, 255, .02)); }
.round.send:hover { color: #d6f4ff; box-shadow: 0 0 18px rgba(99, 215, 255, .3); }

body[data-state="listening"] #mic {
  border-color: var(--cyan); color: #d9f6ff;
  animation: pulse-ring 1.5s ease-out infinite;
}

#prompt {
  flex: 1; height: 44px; padding: 0 20px; font-family: inherit; font-size: 13.5px;
  color: #e8f7ff; background: rgba(8, 18, 26, .65);
  border: 1px solid rgba(99, 215, 255, .18); border-radius: 23px;
  outline: none; transition: .2s; letter-spacing: .015em; user-select: text;
}
#prompt::placeholder { color: #587183; letter-spacing: .06em; }
#prompt:focus { border-color: rgba(255, 179, 71, .5); box-shadow: 0 0 26px rgba(255, 179, 71, .12); background: rgba(10, 22, 31, .8); }

/* ------------------------------------------------------------- прочее */

.boot {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(9, 19, 27, .99), #02050a 72%);
  transition: opacity .9s ease, visibility .9s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(540px, 82vw); }
.boot-logo { text-align: center; font-size: 28px; letter-spacing: .62em; color: #eef8ff; text-shadow: 0 0 26px rgba(99, 215, 255, .5); }
.boot-sub { text-align: center; margin: 9px 0 26px; font-size: 8.5px; letter-spacing: .34em; color: var(--muted); text-transform: uppercase; }
.boot-lines { font-family: Consolas, monospace; font-size: 11.5px; line-height: 1.95; color: #9fd3e6; min-height: 148px; }
.boot-lines .ok { color: var(--ok); }
.boot-lines .bad { color: var(--bad); }
.boot-bar { height: 2px; margin-top: 16px; background: rgba(99, 215, 255, .12); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--amber)); animation: load 1.9s ease forwards; }

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: 118px; transform: translate(-50%, 14px);
  max-width: 70vw; padding: 8px 14px; font-size: 11.5px; color: #ffdcdc;
  background: rgba(26, 10, 10, .92); border: 1px solid rgba(255, 107, 107, .5);
  border-radius: 2px; opacity: 0; pointer-events: none; transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.log::-webkit-scrollbar, .modules::-webkit-scrollbar { width: 6px; }
.log::-webkit-scrollbar-thumb, .modules::-webkit-scrollbar-thumb { background: rgba(99, 215, 255, .22); }
.log::-webkit-scrollbar-track, .modules::-webkit-scrollbar-track { background: transparent; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .92; } 50% { transform: scale(1.035); opacity: 1; } }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(99, 215, 255, .35); }
  70% { box-shadow: 0 0 0 16px rgba(99, 215, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 215, 255, 0); }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes drift { to { transform: translate3d(72px, 72px, 0); } }
@keyframes load { 0% { width: 4%; } 55% { width: 62%; } 100% { width: 100%; } }

@media (max-width: 1180px) {
  .layout { grid-template-columns: 310px minmax(0, 1fr); }
  .sys-panel { display: none; }
}
@media (max-width: 840px) {
  .layout { grid-template-columns: 1fr; padding: 10px 14px 0; }
  .console { padding-left: 12px; padding-right: 12px; }
  .chip { font-size: 9px; }
  #prompt { height: 46px; font-size: 15px; }
  .round { width: 48px; height: 48px; }
  .log-panel { display: none; }
  .reactor { width: min(58vh, 420px); }
  .brand-text p { display: none; }
  .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
/* --------------------------------------------------------------- темы */

body[data-theme="matrix"] {
  --amber: #8dff9a; --cyan: #35e0c0; --ink: #d7ffe4; --muted: #6b9a7c;
  --ok: #7dffb0; --bad: #ff7b7b; --line: rgba(80, 220, 150, .18);
  --panel: rgba(6, 20, 12, .6);
}
body[data-theme="ice"] {
  --amber: #9fdcff; --cyan: #7ff0ff; --ink: #e7f9ff; --muted: #6f93a8;
  --ok: #8ef0d2; --line: rgba(120, 220, 255, .2);
  --panel: rgba(8, 18, 30, .58);
}
body[data-theme="crimson"] {
  --amber: #ff6f6f; --cyan: #ffb36b; --ink: #ffe8e8; --muted: #9c7272;
  --ok: #ffd08a; --line: rgba(255, 110, 110, .2);
  --panel: rgba(28, 8, 10, .6);
}
body[data-theme="mono"] {
  --amber: #e8e8e8; --cyan: #bdbdbd; --ink: #f2f2f2; --muted: #8c8c8c;
  --ok: #d8d8d8; --line: rgba(220, 220, 220, .16);
  --panel: rgba(16, 16, 18, .6);
}

body[data-theme="matrix"] .backdrop,
body[data-theme="matrix"] .reactor { filter: hue-rotate(72deg) saturate(1.05); }
body[data-theme="matrix"] .backdrop { filter: hue-rotate(72deg) saturate(1.05) brightness(.95); }
body[data-theme="ice"] .backdrop,
body[data-theme="ice"] .reactor { filter: hue-rotate(-12deg) saturate(.9) brightness(1.05); }
body[data-theme="crimson"] .backdrop,
body[data-theme="crimson"] .reactor { filter: hue-rotate(-28deg) saturate(1.25); }
body[data-theme="mono"] .backdrop,
body[data-theme="mono"] .reactor { filter: grayscale(1) brightness(1.05); }
body[data-theme="mono"] .backdrop { filter: grayscale(1) brightness(.9); }

.theme-btn { font-size: 14px; padding: 2px 7px; line-height: 1; }
/* ------------------------------------------------- минимализм: только аватар */

.layout { display: block; padding: 0; position: relative; }
.stage { height: 100%; padding: 6px 20px 0; }

.panel {
  display: none;
  position: fixed; top: 86px; bottom: 112px; width: 360px; z-index: 25;
}
body.view-log .log-panel { display: flex; left: 24px; }
body.view-sys .sys-panel { display: flex; right: 24px; width: 330px; }

@media (max-width: 840px) {
  .panel { left: 10px !important; right: 10px !important; width: auto !important;
           top: 76px; bottom: 96px; }
}

/* ответ последнего хода — вместо журнала */
.answer {
  position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%);
  width: min(760px, 86vw); max-height: 30vh; overflow-y: auto;
  padding: 13px 18px; z-index: 6;
  background: rgba(4, 10, 14, .78); border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-wrap;
  box-shadow: 0 0 30px rgba(0, 0, 0, .35);
}
.answer[hidden] { display: none; }
.answer img, .answer video { max-width: 100%; max-height: 24vh; display: block; margin-top: 8px; }
.answer audio { width: 100%; margin-top: 8px; }

/* плеер: окно можно двигать за заголовок и тянуть за угол (03.11.2026) */
.player {
  position: fixed; inset: 0; z-index: 60; display: block;
  background: rgba(2, 4, 7, .72); backdrop-filter: blur(8px);
}
.player[hidden] { display: none; }
.player-frame {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(1100px, 94vw); height: min(680px, 88vh); min-width: 320px; min-height: 220px;
  box-sizing: border-box; display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px 14px; overflow: hidden; touch-action: none;
  background: rgba(6, 12, 18, .92); border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.player.maximized .player-frame {
  left: 0 !important; top: 0 !important; width: 100vw !important; height: 100vh !important;
  transform: none !important;
}
.player-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: move; user-select: none; -webkit-user-select: none;
}
.player-title { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-stage {
  position: relative; flex: 1; min-height: 0; display: grid; place-items: center;
  background: #000; border: 1px solid var(--line); overflow: hidden;
}
.player-stage video, .player-stage img {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  object-fit: contain; display: block; margin: 0; background: #000;
}
.player-stage audio { width: 100%; }
.player-stage > [hidden] { display: none !important; }
.player-grip {
  position: absolute; right: 3px; bottom: 3px; width: 22px; height: 22px;
  cursor: nwse-resize; opacity: .65;
  background:
    linear-gradient(135deg, transparent 46%, var(--cyan) 46%, var(--cyan) 54%, transparent 54%),
    linear-gradient(135deg, transparent 22%, var(--line) 22%, var(--line) 30%, transparent 30%);
}
.player-grip:hover { opacity: 1; }
body.player-busy { cursor: grabbing; user-select: none; }
/* минимализм: подсказки и кнопку темы прячем — всё по запросу */
.chips { display: none; }
.theme-btn { display: none; }
/* ------------------------------------------------ голограмма-проекция */

.reactor { --level: 0; }
.beam {
  position: absolute; left: 20%; right: 20%; bottom: 2%; height: 74%; pointer-events: none;
  background: linear-gradient(180deg, rgba(99, 215, 255, 0), rgba(99, 215, 255, .14));
  clip-path: polygon(48% 0, 52% 0, 100% 100%, 0 100%);
  filter: blur(3px); opacity: .65; animation: beamPulse 5s ease-in-out infinite;
}
@keyframes beamPulse { 0%, 100% { opacity: .5; } 50% { opacity: .8; } }

/* ------------------------------------------------------ медиа-студия */

.studio {
  position: fixed; inset: 0; z-index: 55; display: grid; place-items: center;
  background: rgba(2, 4, 7, .88); backdrop-filter: blur(10px);
}
.studio[hidden] { display: none; }
.studio-frame {
  width: min(1200px, 94vw); height: min(760px, 88vh);
  display: flex; flex-direction: column; gap: 10px; padding: 12px;
  background: rgba(6, 12, 18, .92); border: 1px solid var(--line);
  clip-path: polygon(0 16px, 16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}
.studio-head { display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; letter-spacing: .24em; color: var(--cyan); }
.studio-body { display: grid; grid-template-columns: 280px 1fr; gap: 12px; flex: 1; min-height: 0; }
.studio-list { overflow-y: auto; border: 1px solid var(--line); padding: 6px; }
.studio-item {
  padding: 6px 8px; border-bottom: 1px solid rgba(99, 215, 255, .08);
  font-size: 10px; color: #a9c8d8; cursor: pointer; display: flex; justify-content: space-between; gap: 8px;
}
.studio-item:hover { color: #fff; background: rgba(99, 215, 255, .06); }
.studio-item.active { color: var(--amber); background: rgba(255, 179, 71, .08); }
.studio-item span { color: var(--muted); font-family: Consolas, monospace; }
.studio-main { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.studio-preview {
  flex: 1; min-height: 0; display: grid; place-items: center;
  background: #000; border: 1px solid var(--line); overflow: hidden;
}
.studio-preview video, .studio-preview img { max-width: 100%; max-height: 100%; display: block; }
.studio-preview audio { width: 90%; }
.studio-controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 8.5px; letter-spacing: .1em; color: var(--muted); }
.studio-controls input {
  width: 72px; margin-left: 4px; padding: 3px 5px; font-size: 11px;
  background: rgba(0, 0, 0, .4); border: 1px solid var(--line); color: var(--ink);
}
.studio-status { font-family: Consolas, monospace; font-size: 10px; color: var(--muted); min-height: 16px; }
@media (max-width: 840px) {
  .studio-body { grid-template-columns: 1fr; }
  .studio-list { max-height: 140px; }
}

@keyframes spark {
  0%, 100% { opacity: .12; transform: translateY(0); }
  50% { opacity: .85; transform: translateY(-5px); }
}
/* панель настроек (микрофон/порог) */
.setting-row {
  display: flex; align-items: center; gap: 14px;
  margin: 12px 0; font-size: 13px; color: var(--ink); letter-spacing: .04em;
}
.setting-row span { min-width: 170px; color: var(--muted); text-transform: uppercase; font-size: 11px; }
.setting-row input[type="range"] { flex: 1; accent-color: var(--amber); height: 4px; }
.setting-row b { min-width: 52px; text-align: right; color: var(--amber); font-weight: 600; }

/* =========================================================================
   02.11.2026 — раскладка в три зоны: голограмма | инфо-монитор | док снизу
   ========================================================================= */
.layout {
  display: grid;
  /* сцена голограммы — узкий левый рельс */
  grid-template-columns: minmax(248px, 30%) minmax(0, 1fr);
  gap: 18px;
  padding: 6px 22px 0;
  align-items: stretch;
  min-height: 0;
}
.stage { display: contents; height: auto; padding: 0; }

.zone-monitor {
  grid-column: 2;
  display: flex; flex-direction: column; min-height: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(9, 19, 27, .66), rgba(5, 10, 15, .44));
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .45), 0 0 26px rgba(99, 215, 255, .05);
}
.monitor-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
}
.monitor-utime { color: var(--cyan); letter-spacing: .14em; }
.monitor-body {
  padding: 14px 16px 16px;
  overflow-y: auto; min-height: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.monitor-sec {
  margin-top: 8px; font-size: 9px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--muted);
}
.zone-monitor .subtitle { text-align: left; max-width: none; padding: 0; min-height: 16px; }
.zone-monitor .answer {
  position: static; transform: none; width: auto; max-height: none; left: auto; bottom: auto;
  background: rgba(6, 14, 20, .7);
}
.zone-monitor .engines { padding: 4px 0 0; }
.zone-monitor .meters { padding: 4px 0 0; }

.console { padding: 8px 22px calc(14px + env(safe-area-inset-bottom)); }
.inputrow { max-width: 720px; }
.round.gear { background: rgba(9, 19, 27, .6); color: var(--ink); border-color: var(--line); }
.round.gear:hover { color: var(--amber); border-color: rgba(255, 179, 71, .55); }

/* правки по факту снимка 02.11.2026: монитор вылезал, док уезжал вниз */
.layout { overflow: hidden; min-height: 0; }
.zone-monitor { min-width: 0; }
.monitor-body { min-width: 0; overflow-x: hidden; }
.monitor-body .eng-detail, .monitor-body .eng-name { word-break: break-word; }
.monitor-body .meter { min-width: 0; }

/* док должен быть виден всегда: строка сетки не растёт по контенту */
.layout { grid-template-rows: minmax(0, 1fr); flex: 1 1 0; }
.zone-monitor .meter { display: grid; grid-template-columns: 64px minmax(0, 1fr) 46px; align-items: center; gap: 8px; }
.zone-monitor .meter .bar { min-width: 0; width: auto; }
.zone-monitor .meter b { text-align: right; font-size: 10px; color: var(--cyan); }

/* док фиксируем внизу: при маленьком окне контент его выталкивал */
.console { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; }
.layout { padding-bottom: 108px; max-width: 100%; }
html, body { max-width: 100vw; overflow-x: hidden; }
.zone-monitor { max-width: 100%; }

/* док: возвращаем в обычный поток (fixed ломался из-за темы/фильтров) */
.console { position: relative; left: auto; right: auto; bottom: auto; flex: 0 0 auto; z-index: 5; }
.layout { padding-bottom: 0; }
body { min-height: 0; }

/* док парящий по центру снизу — не зависит от высоты контента */
.console {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 10px; width: min(780px, 94vw);
  padding: 8px 12px 10px; border-radius: 16px;
  background: linear-gradient(0deg, rgba(3, 7, 11, .96), rgba(6, 14, 20, .86));
  border: 1px solid var(--line);
  box-shadow: 0 0 26px rgba(0, 0, 0, .55);
  z-index: 9;
}
.layout { padding-bottom: 104px; }
.zone-monitor { overflow: hidden; }
.zone-monitor .meters, .zone-monitor .meters .bar { max-width: 100%; }

/* --- медиа в правой панели: Jarvis показывает видео/фото/звук у себя --- */
.monitor-media { border-bottom: 1px solid var(--line); background: rgba(3, 8, 12, .55); }
.monitor-media[hidden] { display: none; }
.mm-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 12px; font-size: 9px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted);
}
.mm-actions { display: flex; gap: 6px; }
.mm-actions .ghost { padding: 1px 7px; font-size: 12px; line-height: 1; }
.mm-frame { padding: 0 10px 10px; display: grid; place-items: center; gap: 6px; }
.mm-frame video, .mm-frame img {
  width: 100%; max-height: var(--mm-h, 34vh); border-radius: 8px;
  border: 1px solid var(--line); object-fit: contain; background: #000;
}
/* ручка высоты медиа в мониторе: тянется мышью/пальцем, размер помнится */
.mm-resize {
  position: relative; height: 10px; cursor: ns-resize; touch-action: none;
  border-top: 1px dashed rgba(69, 226, 210, .22);
  background: linear-gradient(180deg, transparent, rgba(69, 226, 210, .10));
}
.mm-resize::after {
  content: ""; position: absolute; left: 50%; top: 3px; width: 46px; height: 3px;
  margin-left: -23px; border-radius: 3px; background: rgba(69, 226, 210, .45);
}
.mm-resize:hover::after { background: var(--cyan); }
body.resizing-media { cursor: ns-resize; user-select: none; }
body.resizing-media .mm-resize::after { background: var(--cyan); }
.mm-frame img { cursor: zoom-in; }
.mm-frame audio { width: 100%; }
.mm-frame > [hidden] { display: none !important; }
/* YouTube и прочие встраиваемые плееры: 16:9, как у видео */
.mm-frame iframe.mm-embed {
  width: 100%; aspect-ratio: 16 / 9; max-height: var(--mm-h, 34vh); border-radius: 8px;
  border: 1px solid var(--line); background: #000;
}
.player-embed {
  position: absolute; inset: 0; width: 100%; height: 100%; max-height: none;
  border: 0; border-radius: 0; background: #000;
}
/* свои страницы в мониторе (/tv.html, /cinema.html) — тянутся на всю высоту ручки */
.mm-frame iframe.mm-page { height: var(--mm-h, 34vh); aspect-ratio: auto; }
.chip[for] { display: inline-flex; align-items: center; cursor: pointer; }

/* =========================================================================
   02.11.2026 — тема «Stark» по референсу Marvel J.A.R.V.I.S.:
   тёмный teal, гексагональная сетка, проводной костюм, плашка POWER LEVEL
   ========================================================================= */
body[data-theme="stark"] {
  --amber: #45e2d2;
  --amber-soft: rgba(69, 226, 210, .55);
  --cyan: #8bf3e6;
  --cyan-dim: rgba(139, 243, 230, .30);
  --ink: #d3f2f2;
  --muted: #4e7f7d;
  --ok: #5ce8c0;
  --bad: #ff6b6b;
  --panel: rgba(4, 20, 22, .55);
  --line: rgba(69, 226, 210, .16);
  background: #010607;
}
body[data-theme="stark"] .backdrop {
  background:
    radial-gradient(900px 620px at 30% 46%, rgba(24, 140, 138, .18), transparent 64%),
    radial-gradient(760px 540px at 80% 44%, rgba(16, 100, 108, .14), transparent 66%),
    linear-gradient(180deg, #01070a, #010506 55%, #01080a);
}
body[data-theme="stark"] .grid {
  background-image:
    linear-gradient(rgba(69, 226, 210, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 226, 210, .05) 1px, transparent 1px);
}

/* гексагоны как на референсе */
.hexes {
  position: absolute; inset: -8%; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'><path d='M28 2 52 16v32L28 62 4 48V16z' fill='none' stroke='%2345e2d2' stroke-opacity='.16' stroke-width='1'/></svg>");
  background-size: 56px 96px;
  -webkit-mask-image: radial-gradient(circle at 45% 50%, #000 0 55%, transparent 88%);
  mask-image: radial-gradient(circle at 45% 50%, #000 0 55%, transparent 88%);
}

/* эмблема J.A.R.V.I.S. в правой панели */
.emblem {
  position: absolute; right: -6%; top: 50%; transform: translateY(-50%);
  width: 74%; max-width: 520px; opacity: .16; pointer-events: none;
  color: var(--amber);
  filter: drop-shadow(0 0 28px rgba(69, 226, 210, .35));
  z-index: 0;
}
.emblem circle { fill: none; stroke: currentColor; stroke-width: 1.2; }
.emblem .emb-word {
  fill: currentColor; font-family: "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 40px; letter-spacing: .06em; opacity: .9;
}
.zone-monitor .monitor-body { position: relative; z-index: 1; }

/* плашка POWER LEVEL под голограммой */
.power {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 3px;
  background: linear-gradient(180deg, rgba(4, 20, 22, .72), rgba(2, 10, 12, .5));
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink); box-shadow: 0 0 18px rgba(69, 226, 210, .12) inset;
}
.power span { color: var(--muted); }
.power i {
  flex: 1; height: 1px; min-width: 60px;
  background-image: linear-gradient(90deg, var(--amber) 40%, transparent 0);
  background-size: 6px 1px; opacity: .5;
}
.power b { color: var(--amber); font-weight: 600; letter-spacing: .12em; }

/* Stark: убираем оставшуюся «янтарность» — всё в teal, как в референсе */
body[data-theme="stark"] .mark-ring {
  border-color: rgba(69, 226, 210, .55);
  box-shadow: 0 0 14px rgba(69, 226, 210, .35), inset 0 0 10px rgba(69, 226, 210, .2);
}
body[data-theme="stark"] .mark-dot {
  background: radial-gradient(circle at 50% 40%, #e6fffd, #45e2d2 65%, #0a6b68);
  box-shadow: 0 0 12px rgba(69, 226, 210, .8);
}
body[data-theme="stark"] .glow {
  background: radial-gradient(680px 680px at 50% 48%, rgba(69, 226, 210, .11), transparent 70%);
}
body[data-theme="stark"] .ticks {
  background: repeating-conic-gradient(from 0deg, rgba(120, 240, 226, .6) 0deg .6deg, transparent .6deg 2.6deg);
}
body[data-theme="stark"] .arcs {
  background: conic-gradient(from 205deg,
    rgba(69, 226, 210, .9) 0deg 44deg, transparent 44deg 118deg,
    rgba(120, 240, 226, .75) 118deg 166deg, transparent 166deg 246deg,
    rgba(69, 226, 210, .6) 246deg 288deg, transparent 288deg 360deg);
}
body[data-theme="stark"] .core {
  background: radial-gradient(circle at 50% 44%,
    rgba(236, 255, 253, 1), rgba(69, 226, 210, .65) 32%, rgba(16, 120, 118, .25) 58%, transparent 76%);
  box-shadow: 0 0 60px rgba(69, 226, 210, .35), inset 0 0 40px rgba(69, 226, 210, .35);
}
body[data-theme="stark"] .beam {
  background: linear-gradient(180deg, rgba(69, 226, 210, 0), rgba(69, 226, 210, .14));
}
/* эмблема не мешает телеметрии */
body[data-theme="stark"] .emblem { opacity: .13; right: -12%; }

body[data-theme="stark"] .emblem { right: 4%; width: 56%; opacity: .12; }
.reactor .beam { opacity: .55; }

/* Голограммы больше нет (03.11.2026), поэтому реактор снова главный:
   кольца, спектр и ядро на полную яркость. */
.reactor .core { opacity: .4; filter: blur(20px); }
.reactor #wave { opacity: .5; }
.reactor .ring { opacity: .8; }

/* место будущего аватара: спокойная надпись вместо пустого пятна */
.holo-empty {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; pointer-events: none; text-align: center;
  animation: holoEmptyPulse 7s ease-in-out infinite;
}
/* тёмная подложка: надпись не теряется в свечении ядра */
.holo-empty::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 74%; aspect-ratio: 2 / 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(2, 10, 12, .82), rgba(2, 10, 12, .35) 62%, transparent 100%);
  pointer-events: none;
}
.holo-empty span, .holo-empty b { position: relative; }
.holo-empty span {
  font-size: 10px; letter-spacing: .42em; text-transform: uppercase;
  color: var(--muted); padding-left: .42em; text-shadow: 0 1px 6px rgba(0, 0, 0, .9);
}
.holo-empty b {
  font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--amber); text-shadow: 0 1px 10px rgba(0, 0, 0, .95);
}
@keyframes holoEmptyPulse { 0%, 100% { opacity: .55; } 50% { opacity: .9; } }

/* ---------------------------- дровер «Инструменты» */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 92vw);
  transform: translateX(102%);
  transition: transform .22s ease;
  background: linear-gradient(180deg, rgba(6, 14, 20, .98), rgba(3, 9, 13, .98));
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(0, 0, 0, .55);
  z-index: 9500;
  display: flex; flex-direction: column; min-height: 0;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--line);
}
.drawer-head .eyebrow {
  font-size: 9px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted);
}
.drawer-head h2 { margin: 2px 0 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.drawer .tabs {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.drawer .tabs button {
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font: inherit; font-size: 11px; padding: 4px 10px; cursor: pointer;
  letter-spacing: .04em;
}
.drawer .tabs button.active { color: var(--ink); border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(99, 215, 255, .18); }
.drawer-body { padding: 12px 14px 18px; overflow-y: auto; min-height: 0; }
.drawer-note { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 6px 0; }
.drawer-form { display: flex; gap: 6px; margin: 4px 0 10px; }
.drawer-form input {
  flex: 1; min-width: 0; background: rgba(4, 12, 18, .9); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 12px;
}
.drawer-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.drawer-list li {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px;
  background: rgba(7, 16, 22, .55); font-size: 12px; color: var(--ink);
}
.drawer-list li em { color: var(--muted); font-size: 10.5px; font-style: normal; }
.drawer-list li span { flex: 1; min-width: 140px; }
.drawer-list li .lvl { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.drawer-list li .lvl.fail { color: #ff7b7b; }
.drawer-list li .lvl.warn { color: #ffcc66; }
.drawer-list li .lvl.info { color: var(--cyan); }
.drawer-list li .lvl.ok { color: #6fe3b4; }
.tile-row { display: flex; gap: 8px; margin: 6px 0; }
.tile {
  flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  background: rgba(7, 16, 22, .55);
}
.tile-k { font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.tile-v { font-size: 16px; color: var(--ink); margin-top: 2px; }
.drawer-results { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted); }
.hit { border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px;
  background: rgba(7, 16, 22, .55); }
.hit-path { color: var(--cyan); font-size: 11px; display: flex; justify-content: space-between; gap: 8px; }
.hit-path em { color: var(--muted); font-style: normal; }
.hit-text { color: var(--ink); margin-top: 4px; line-height: 1.45; }
