/* OPSEC v2: one-screen command center. See DESIGN.md, "v2 format". */

:root {
  --bg: #070B09;
  --panel: #0C1510;
  --well: #050806;
  --line: #1E4A33;
  --line-2: #2C6B49;
  --head: #C6D4CC;
  --text: #D9E6DF;
  --dim: #86A394;
  --green: #55E39C;
  --green-2: #7BF0B6;
  --purple: #B04DFF;
  --red: #FF3B3B;
  --warn: #F2D447;

  /* Mulvad pop-up */
  --navy: #192E45;
  --navy-2: #294D73;
  --navy-3: #1F3A57;
  --app-red: #E34039;
  --app-green: #44AD4D;

  --px: "Press Start 2P", ui-monospace, monospace;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --app: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gap: 10px;
  --bar: 30px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 400 12px/1.5 var(--mono);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.scan {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(85,227,156,0.03) 0 1px, transparent 1px 3px);
}

/* ---------- Buttons ---------- */
.btn-out, .btn-fill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 0;
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}
.btn-out { background: transparent; border: 1px solid var(--text); color: var(--text); }
.btn-out:hover { background: var(--text); color: var(--bg); }
.btn-fill { background: var(--green); border: 1px solid var(--green); color: var(--bg); }
.btn-fill:hover { background: var(--green-2); border-color: var(--green-2); }
.btn-out.sm { min-height: 26px; padding: 0 10px; font-size: 10px; }

.led { display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: var(--green); box-shadow: 0 0 6px var(--green); animation: blink 2.4s steps(2, end) infinite; }
.led.red { background: var(--red); box-shadow: 0 0 6px var(--red); }
@keyframes blink { 50% { opacity: 0.35; } }
.r { color: var(--red) !important; }

/* ---------- Shell ---------- */
.shell {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  height: 100dvh;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 52px;
  padding: 0 var(--gap) 0 14px;
  border-bottom: 1px solid var(--green);
  background: var(--well);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand-mark { width: 30px; height: 24px; flex: none; shape-rendering: crispEdges; }
.brand-name { font: 400 16px/1 var(--px); color: var(--green); letter-spacing: 0.02em; }
.brand-sub { color: var(--dim); font-size: 11px; white-space: nowrap; }
.top-status { display: flex; gap: 22px; margin: 0 0 0 auto; padding: 0; list-style: none; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--dim); }
.top-status li { display: flex; align-items: center; white-space: nowrap; }
.top-status b { margin-left: 6px; color: var(--green); font-weight: 700; }
.top-buy { min-height: 34px; }

/* CA bar */
.ca {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 var(--gap) 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.ca-k { color: var(--green); font-weight: 700; }
.ca-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 12px/1 var(--mono); color: var(--text); }
.links { display: flex; margin-left: auto; border: 1px solid var(--line-2); }
.lnk {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.lnk + .lnk { border-left: 1px solid var(--line-2); }
.lnk:hover { background: var(--green); color: var(--bg); }

/* Hype ticker */
.tick { height: 28px; overflow: hidden; background: var(--green); color: var(--bg); border-bottom: 1px solid var(--line); }
.tick-run { display: flex; width: max-content; animation: run 48s linear infinite; }
.tick-run span { padding: 0 18px; font: 400 10px/28px var(--px); text-transform: uppercase; white-space: nowrap; }
.tick-run span::after { content: "///"; margin-left: 36px; opacity: 0.55; }
@keyframes run { to { transform: translateX(-50%); } }

/* Main grid */
.grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 380px;
  gap: var(--gap);
  min-height: 0;
  padding: var(--gap);
}
.side, .rgt, .mid { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; min-width: 0; }

/* Panels */
.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line-2);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.panel.flash { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 18px rgba(85,227,156,0.25); }
.ph {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
  height: 26px;
  margin: 0;
  padding: 0 10px;
  background: var(--head);
  color: var(--bg);
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ph > span { font-weight: 700; }
.ph-r { display: flex; align-items: center; margin-left: auto; font-style: normal; font-weight: 400; color: #3E5248; text-transform: none; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
.ph-r .led { background: #1E7A4A; box-shadow: none; }

/* Sidebar menu */
.menu { display: flex; flex-direction: column; flex: none; border: 1px solid var(--line-2); background: var(--panel); }
.menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding: 0 12px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.menu button:last-child { border-bottom: 0; }
.menu button span { color: var(--green); font-weight: 700; }
.menu button:hover, .menu button.on { background: var(--green); color: var(--bg); }
.menu button:hover span, .menu button.on span { color: var(--bg); }

/* Status */
.p-status { flex: 1; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rows { margin: 0 0 10px; padding: 4px 12px; }
.rows div { display: flex; justify-content: space-between; gap: 10px; min-height: 30px; align-items: center; border-bottom: 1px dashed var(--line); font-size: 11px; }
.rows dt { color: var(--dim); text-transform: uppercase; letter-spacing: 0.04em; }
.rows dd { margin: 0; color: var(--green); font-weight: 700; text-align: right; }

.side-buy { flex: none; margin: 0 12px 12px; min-height: 38px; }
.warn { margin: auto 12px 10px; padding: 8px 10px; border: 1px dashed var(--warn); color: var(--warn); font-size: 11px; line-height: 1.5; }

/* ---------- Poster ---------- */
.p-poster { flex: 1; }
.poster {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  overflow: hidden;
  background-color: var(--well);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
}
.poster-side {
  position: absolute;
  top: 14px;
  left: 16px;
  color: var(--green);
  font: 400 8px/1.9 var(--px);
  text-transform: uppercase;
}
.poster-side p { margin: 0; }
.poster-art { display: flex; align-items: flex-end; gap: 14px; }
.char { --h: clamp(90px, calc(100dvh - 640px), 210px); position: relative; margin: 0; width: calc(var(--h) * 1.25); height: var(--h); }
.px-char, .char-img { width: 100%; height: 100%; }
.px-char { shape-rendering: crispEdges; }
.char-img { object-fit: contain; object-position: bottom; image-rendering: auto; }
.char.has-img .px-char { display: none; }
.poster-h { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; text-align: center; max-width: 100%; }
.poster-k {
  font: 400 clamp(20px, 2.3vw, 34px)/1.1 var(--px);
  color: var(--text);
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--purple);
}
.poster-v {
  display: inline-block;
  max-width: 100%;
  padding: 7px 14px 9px;
  background: var(--red);
  color: #FFFFFF;
  font: 400 clamp(12px, 1.25vw, 18px)/1.45 var(--px);
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #6B0F0F;
}
.poster-v.flip { animation: flip 260ms steps(3, end); }
@keyframes flip { 0% { clip-path: inset(0 0 100% 0); } 100% { clip-path: inset(0); } }
.poster-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.eye-glow { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { opacity: 0.55; } }

/* ---------- Stack ---------- */
.p-stack { flex: none; }
.stack { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; padding: 6px; }
.ico {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 70px;
  padding: 4px 2px;
  background: none;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--text);
  cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.ico:hover { background: rgba(85,227,156,0.08); border-color: var(--line-2); }
.ico:active { background: rgba(85,227,156,0.18); }
.ico-tile { display: grid; place-items: center; width: 36px; height: 36px; }
.ico-img { width: 36px; height: 36px; object-fit: contain; pointer-events: none; transition: transform 160ms var(--ease); }
.ico:hover .ico-img { transform: translateY(-2px); }
.ico-l { max-width: 100%; font-size: 10px; line-height: 1.2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Rate ---------- */
.p-rate { flex: none; }
.rate { padding: 12px; }
.rate-q { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; min-height: 40px; }
.rate-n { color: var(--green); font: 400 10px/1.6 var(--px); }
.rate-t { margin: 0; font-size: 13px; line-height: 1.45; }
.rate-a { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.rate-a button { min-height: 36px; background: transparent; border: 1px solid var(--line-2); border-radius: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease); }
.rate-a button[data-a="no"]:hover { background: var(--green); border-color: var(--green); color: var(--bg); }
.rate-a button[data-a="yes"]:hover { background: var(--red); border-color: var(--red); color: #FFF; }
.meter { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin-top: 12px; }
.meter i { height: 8px; background: var(--line); }
.meter i.no { background: var(--green); }
.meter i.yes { background: var(--red); }
.rate-res { display: flex; flex-direction: column; gap: 8px; }
.rate-k { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.rate-v { margin: 0; font: 400 13px/1.6 var(--px); text-transform: uppercase; color: var(--green); }
.rate-v.bad { color: var(--red); }
.rate-s { margin: 0; color: var(--dim); font-size: 11px; }
.rate-btns { display: flex; gap: 8px; margin-top: 4px; }
.rate-btns .btn-fill { flex: 1; }

/* ---------- opsec.lover ---------- */
.p-lover { flex: none; }
.files { list-style: none; margin: 0; padding: 4px 0; }
.files button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 28px; padding: 0 12px; background: none; border: 0; text-align: left; font-size: 11px; cursor: pointer; transition: background-color 160ms var(--ease); }
.files button:hover { background: rgba(85,227,156,0.1); }
.files .ft { width: 30px; color: var(--green); font-size: 10px; font-weight: 700; }
.files .fs { margin-left: auto; color: var(--dim); font-size: 10px; }

/* ---------- Log ---------- */
.p-log { flex: 1; min-height: 120px; }
.term-wrap { flex: 1; min-height: 0; overflow: auto; background: var(--well); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.term { list-style: none; margin: 0; padding: 8px 12px; font-size: 11px; line-height: 19px; }
.term li { padding-left: 2ch; text-indent: -2ch; overflow-wrap: anywhere; }
.term .t { color: var(--dim); }
.term .s { color: var(--green); font-weight: 700; }
.term .bad .s { color: var(--red); }
.term li:last-child::after { content: "_"; margin-left: 4px; color: var(--green); animation: blink 1s steps(2, end) infinite; }

/* ---------- Footer bar ---------- */
.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--bar);
  padding: 0 var(--gap) 0 14px;
  border-top: 1px solid var(--line-2);
  background: var(--well);
  font-size: 11px;
  color: var(--dim);
}
.bar-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-ip { color: var(--warn); white-space: nowrap; }
.bar-ip.on { color: var(--green); }
.tray-vpn { position: relative; display: grid; place-items: center; width: 28px; height: 28px; background: none; border: 0; cursor: pointer; }
.tray-vpn:hover { background: rgba(255,255,255,0.08); }
.tray-vpn svg { width: 20px; height: 20px; }
.tray-dot { position: absolute; right: 1px; bottom: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--app-red); border: 2px solid var(--well); }
.tray-dot.on { background: var(--app-green); }
.bar-clock { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Fake app windows ---------- */
.wins { position: fixed; inset: 0; z-index: 700; pointer-events: none; }
.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  background: var(--panel);
  border: 1px solid var(--green);
  box-shadow: 8px 8px 0 rgba(0,0,0,0.65), 0 0 0 100vmax rgba(5,8,6,0);
  pointer-events: auto;
  animation: open 200ms var(--ease);
}
@keyframes open { from { opacity: 0; transform: scale(0.97); } }
.win.wide { width: 560px; }
.win-h {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 30px;
  padding: 0 4px 0 10px;
  background: var(--head);
  color: var(--bg);
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.win-h:active { cursor: grabbing; }
.win-t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-x { display: grid; place-items: center; width: 26px; height: 26px; background: none; border: 0; cursor: pointer; }
.win-x:hover { background: var(--red); color: #FFF; }
.win-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.win-b { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.win.flush { width: auto; }
.win.flush .win-b { padding: 0; overflow: hidden; }
.win.flush .fa { position: relative; max-width: calc(100vw - 18px); max-height: calc(100dvh - 48px); overflow: hidden; }
.win:not(.top) .win-h { background: #7E8E86; }

.applog { list-style: none; margin: 0; padding: 10px 12px; min-height: 84px; background: var(--well); border: 1px solid var(--line); line-height: 20px; }
.applog li::before { content: "> "; color: var(--green); }
.verdict { margin: 10px 0 0; padding: 8px 10px; border: 1px dashed var(--warn); color: var(--warn); font-weight: 700; }
.verdict[hidden] { display: none; }
.app-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.app-top .ico-img { width: 32px; height: 32px; }
.app-top b { font: 400 11px/1.3 var(--px); text-transform: uppercase; color: var(--green); }
.note { margin: 0; padding: 12px; min-height: 120px; background: #F4F1E6; color: #111; font: 400 13px/1.6 var(--mono); white-space: pre-wrap; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bar) + 16px);
  z-index: 860;
  transform: translateX(-50%);
  padding: 9px 14px;
  background: var(--well);
  border: 1px dashed var(--warn);
  color: var(--warn);
  font-size: 11px;
  white-space: nowrap;
  animation: open 160ms var(--ease);
}

/* ---------- Mulvad pop-up ---------- */
.app {
  position: fixed;
  right: 12px;
  bottom: calc(var(--bar) + 10px + env(safe-area-inset-bottom, 0px));
  z-index: 850;
  width: 300px;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  background: var(--navy);
  border-radius: 12px;
  color: #FFFFFF;
  font-family: var(--app);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  transform-origin: bottom right;
  animation: pop 220ms var(--ease);
}
.app[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(8px); } }
.app-head { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 8px 0 14px; background: var(--app-red); transition: background-color 300ms var(--ease); }
.app[data-state="on"] .app-head { background: var(--app-green); }
.app[data-state="connecting"] .app-head { background: var(--navy-2); }
.app-logo { width: 34px; height: 34px; flex: none; }
.lg-bg { fill: var(--navy); }
.lg-hood { fill: #0E1B2A; }
.lg-face { fill: #FFFFFF; }
.lg-eye { fill: var(--navy); }
.app-id { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.app-name { font: 700 18px/1 var(--app); text-transform: uppercase; letter-spacing: 0.02em; }
.app-meta { font-size: 12px; color: rgba(255,255,255,0.75); }
.app-x { display: grid; place-items: center; width: 36px; height: 36px; background: none; border: 0; cursor: pointer; }
.app-x svg { width: 18px; height: 18px; fill: none; stroke: #FFFFFF; stroke-width: 2; }
.app-panel { padding: 14px; background: var(--navy-3); }
.app-status { margin: 0; font: 700 13px/1.2 var(--app); letter-spacing: 0.04em; text-transform: uppercase; color: var(--app-red); }
.app[data-state="on"] .app-status { color: var(--app-green); }
.app[data-state="connecting"] .app-status { color: #FFFFFF; }
.app-loc { margin: 4px 0 0; font: 700 24px/1.15 var(--app); }
.app-route { margin: 2px 0 0; font-size: 13px; color: rgba(255,255,255,0.72); }
.app-log { list-style: none; margin: 10px 0 0; padding: 0; min-height: 40px; font: 400 11px/20px var(--mono); color: rgba(255,255,255,0.72); }
.app-log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-log li.ok::after { content: " ok"; color: var(--app-green); }
.ab { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 42px; margin-top: 8px; border: 0; border-radius: 4px; font: 600 16px/1 var(--app); color: #FFFFFF; cursor: pointer; transition: filter 160ms var(--ease), background-color 300ms var(--ease); }
.ab:hover { filter: brightness(1.1); }
.ab:disabled { opacity: 0.5; cursor: default; filter: none; }
.ab-blue { margin-top: 12px; background: var(--navy-2); }
.ab-green { background: var(--app-green); }
.ab-red { background: var(--app-red); }

/* ---------- Mid widths ---------- */
@media (max-width: 1360px) {
  .grid { grid-template-columns: 200px minmax(0, 1fr) 340px; }
  .top-status li:nth-child(2) { display: none; }
}
@media (max-width: 1120px) and (min-width: 861px) {
  .brand-sub { display: none; }
  .grid { grid-template-columns: 180px minmax(0, 1fr) 300px; }
  .stack { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
/* Short desktop windows: tighten the stack so the poster keeps its room. */
@media (min-width: 861px) and (max-height: 820px) {
  .ico { height: 62px; gap: 4px; }
  .ico-tile, .ico-img { width: 32px; height: 32px; }
  .menu button { min-height: 30px; }
  .rows div { min-height: 27px; }
}

/* ---------- Phone ---------- */
@media (max-width: 860px) {
  body { overflow: auto; }
  .shell { display: block; height: auto; min-height: 100dvh; padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom, 0px)); }
  .topbar { position: sticky; top: 0; z-index: 600; height: 48px; gap: 12px; padding-top: env(safe-area-inset-top, 0px); height: calc(48px + env(safe-area-inset-top, 0px)); }
  .brand-sub, .top-status { display: none; }
  .top-buy { margin-left: auto; min-height: 32px; padding: 0 10px; }
  .ca { flex-wrap: wrap; height: auto; padding: 8px 12px; row-gap: 8px; }
  .links { width: 100%; margin-left: 0; }
  .lnk { flex: 1; justify-content: center; min-height: 34px; padding: 0 6px; }
  .grid { display: flex; flex-direction: column; padding: 12px; gap: 12px; }
  .side, .mid, .rgt { display: contents; }
  .menu { display: none; }
  .p-poster { order: 1; }
  .p-stack { order: 2; }
  .p-rate { order: 3; }
  .p-log { order: 4; flex: none; height: 200px; }
  .p-lover { order: 5; }
  .p-status { order: 6; flex: none; overflow: visible; }
  .poster { padding: 64px 12px 18px; }
  .poster-side { font-size: 6px; top: 10px; left: 10px; }
  .char { --h: 104px; }
  .poster-k { font-size: 20px; }
  .poster-v { font-size: 12px; }
  .stack { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ico { height: 76px; }
  .ico-tile, .ico-img { width: 40px; height: 40px; }
  .p-stack .ph-r { display: none; }
  .bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; height: calc(var(--bar) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .bar-l { display: none; }
  .bar-ip { margin-right: auto; }
  .win, .win.wide, .win.flush { position: fixed; left: 8px !important; right: 8px; top: 8px !important; width: auto; max-height: calc(100dvh - var(--bar) - 16px); }
  .win.flush .fa { width: 100% !important; max-height: calc(100dvh - var(--bar) - 50px); }
  .toast { white-space: normal; max-width: calc(100vw - 32px); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}

/* ---------- X button, live CA ---------- */
.x-btn {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  min-height: 40px; padding: 0 16px 0 12px;
  background: #FFFFFF; color: #000000; text-decoration: none;
  font: 700 13px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  transition: background-color 160ms var(--ease), transform 120ms var(--ease);
}
.x-btn svg { width: 22px; height: 22px; fill: currentColor; }
.x-btn:hover { background: var(--green); }
.x-btn:active { transform: scale(0.97); }
.lnk-x svg { width: 15px; height: 15px; fill: currentColor; }
.bar { position: relative; z-index: 750; }
.bar-ca {
  display: inline-flex; align-items: stretch; flex: none; max-width: 46vw;
  height: 32px; padding: 0; border: 1px solid var(--green); background: var(--bg);
  font: 400 11px/1 var(--mono); color: var(--text); cursor: pointer;
}
.bar-ca-k { display: grid; place-items: center; padding: 0 10px; background: var(--green); color: var(--bg); font-weight: 700; }
.bar-ca-v { display: block; align-self: center; min-width: 0; max-width: 260px; padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-ca-b { display: grid; place-items: center; padding: 0 12px; border-left: 1px solid var(--green); color: var(--green); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.bar-ca:hover .bar-ca-b { background: var(--green); color: var(--bg); }
.tray-vpn img { width: 24px; height: 24px; border-radius: 50%; }
img.app-logo { width: 36px; height: 36px; border-radius: 50%; flex: none; }
@media (max-width: 860px) {
  .x-btn { min-height: 34px; padding: 0 10px; gap: 6px; }
  .x-btn span { display: none; }
  .win.flush .fa { height: calc(100dvh - var(--bar) - 50px) !important; }
  .bar-ca-v { display: none; }
}
