@font-face {
  font-family: Montserrat;
  src: url("fonts/montserrat-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("fonts/montserrat-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("fonts/montserrat-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070708;
  --panel: #121214;
  --panel-2: #161618;
  --line: #26262b;
  --line-2: #323238;
  --text: #f4f4f5;
  --muted: #9a9aa3;
  --fg: #070708;
  --ok: #3ecf8e;
  --ok-dim: #1e5c42;
  --wait: #d4a017;
  --danger: #e11d2e;
  --sans: Montserrat, system-ui, -apple-system, sans-serif;
  --r: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html {
  color-scheme: dark;
  background: var(--bg);
}
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
body.is-pairing,
body.is-modal { overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: #2a2a32; color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2e2e34; border-radius: 99px; }

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 7, 8, .78);
  backdrop-filter: saturate(1.35) blur(18px);
  -webkit-backdrop-filter: saturate(1.35) blur(18px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0);
}
.top-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  padding: 12px 20px 8px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px;
  letter-spacing: -0.03em;
  min-width: 0;
}
.logo {
  width: 32px; height: 32px;
  display: block;
  object-fit: contain;
  background: transparent;
  filter: none !important;
}
.logo.lg {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  animation: logoIn .55s cubic-bezier(.2,.8,.2,1);
}
.brand .ver {
  color: var(--muted); font-weight: 500; font-size: 11px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  letter-spacing: 0;
}
.meta {
  display: flex; gap: 8px; align-items: center;
  color: var(--muted); font-size: 12px; font-weight: 500;
  flex-wrap: wrap; justify-content: flex-end;
}
.sn {
  max-width: 11ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #0c0c0e;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
body.is-live .status-chip {
  border-color: #245a42;
  color: var(--ok);
  background: #0d1814;
}
body.is-pairing .status-chip {
  border-color: #4a3a12;
  color: var(--wait);
}
.pill.charge { color: var(--ok); border-color: #245a42; background: #0d1814; }
.pill.unlock { color: var(--ok); border-color: #245a42; }
.pill.lock { color: var(--muted); }
.cells {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.cell {
  background: #0c0c0e;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 2px;
  text-align: center;
}
.cell b { display: block; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cell span { color: var(--muted); font-size: 10px; font-weight: 600; }
.cell.low { border-color: #5a1c24; color: #ff7a86; background: #160b0e; }
.cell.hi { border-color: #245a42; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3a3a40; transition: background .2s ease; flex: 0 0 auto; }
.dot.on { background: var(--ok); animation: glow 2.2s ease-in-out infinite; }
.dot.wait { background: var(--wait); animation: pulse 1.1s ease-in-out infinite; }

.banner {
  display: none; margin: 0; padding: 8px 20px; font-size: 12px; font-weight: 600;
  background: #2a1014; color: #ffb8bf; border-bottom: 1px solid #4a1c24;
}
.banner.show { display: block; animation: dropIn .22s ease; }
.banner.ok {
  background: #10261c;
  color: #9eecc8;
  border-bottom-color: #245a42;
}

.tabs {
  display: flex; gap: 2px; padding: 0 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tabs button {
  border: 0; background: transparent; color: var(--muted);
  padding: 11px 14px 12px; font-weight: 650; font-size: 13px;
  white-space: nowrap; border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--text); }

.main {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 28px 22px calc(64px + env(safe-area-inset-bottom, 0px));
  flex: 1;
}
.main { position: relative; }
.view { display: none !important; }
.view.active, .view.leave { display: block !important; }
.view.active { animation: viewIn .45s cubic-bezier(.16, 1, .3, 1); }
.view.leave {
  position: absolute; left: 0; right: 0; top: 0;
  pointer-events: none;
  animation: viewOut .32s ease forwards;
}

.page-head { margin-bottom: 22px; }
h2 { font-size: 28px; margin: 0 0 6px; font-weight: 650; letter-spacing: -0.04em; }
h2 .ver { color: var(--muted); font-weight: 500; font-size: 13px; letter-spacing: 0; }
.lead { color: var(--muted); margin: 0 0 18px; font-size: 13px; font-weight: 500; }
.page-head .lead { margin: 0; }
.note { color: var(--muted); font-size: 12px; margin: 10px 0 0; font-weight: 500; }
.note:empty { display: none; }
.note.ok { color: var(--ok); }
.note.err { color: #ff7a86; }
.warn {
  color: #e8a0a6;
  font-size: 12px;
  margin: 10px 0 0;
  font-weight: 500;
  line-height: 1.5;
}

.card {
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 18px 16px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--line-2); }
.card h3 {
  margin: 0 0 14px; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted); font-weight: 650;
}
.card.fold { padding-bottom: 14px; }
.card.fold > h3 {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
  min-height: 28px;
}
.card.fold > h3:after {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .22s ease;
  flex: 0 0 auto;
}
.card.fold.is-open > h3 { margin-bottom: 14px; }
.card.fold.is-open > h3:after { transform: rotate(225deg); }
.card.fold.is-open > :not(h3) { animation: foldIn .38s cubic-bezier(.16, 1, .3, 1); }
.card.fold:not(.is-open) > :not(h3) { display: none !important; }
.card.fold .fold-hint {
  display: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  margin-left: auto;
  margin-right: 10px;
}
.card.fold:not(.is-open) > h3 .fold-hint { display: inline; }
.vip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid #4a3a12;
  background: #1a1408;
  color: var(--wait);
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 700;
  vertical-align: 1px;
}

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.wrap { margin-top: 12px; }
.k {
  color: var(--muted); font-size: 12px; font-weight: 600;
  min-width: 44px;
}
.actions { margin-top: 14px; }

.btn {
  border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 650;
  background: var(--text); color: var(--fg); font-size: 13px;
  transition: transform .12s ease, filter .12s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0); filter: none; }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.btn.ghost:hover { border-color: #4a4a52; filter: none; background: #18181c; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
}
.btn.ico svg { display: block; }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: none; transform: none; }
.btn.is-on, .seg button.is-on {
  background: var(--text); color: var(--fg); border-color: var(--text);
}

.seg {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 4px; background: #0c0c0e;
  border: 1px solid var(--line); border-radius: 12px;
}
.foc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 12px;
  margin: 8px 0 4px;
}
.foc-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.foc-grid input {
  width: 100%;
  background: #0c0c0e;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  font-variant-numeric: tabular-nums;
}
.seg button {
  flex: 1; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  padding: 9px 8px; font-size: 12px; font-weight: 650;
  transition: color .15s ease, background .15s ease;
  min-width: 64px;
}
.seg button:hover { color: var(--text); }
.seg button.is-on { background: var(--text); color: var(--fg); }
.seg button:disabled { opacity: .38; cursor: not-allowed; }
.model-seg { margin: 0 auto 14px; max-width: 380px; }
.lang-seg { padding: 2px; gap: 2px; }
.lang-seg button { min-width: 36px; padding: 6px 8px; font-size: 11px; }
body.is-hud .tabs, body.is-hud .stats, body.is-hud .card, body.is-hud .foot,
body.is-kiosk .tabs button:not([data-view="dash"]) { display: none !important; }
body.is-kiosk .tabs button[data-view="dash"] { pointer-events: none; }
body.hide-sn .sn, body.hide-sn #liveSn, body.hide-sn #fcSn { filter: blur(6px); }
body.is-hud .cluster { margin: 0; border: 0; background: transparent; box-shadow: none; }
.kv-stack#tripHist div, .kv-stack#flashHist div { font-size: 12px; }

.ctrl {
  display: grid; grid-template-columns: 1fr auto;
  gap: 4px 12px; align-items: baseline; margin: 0 0 14px;
}
.ctrl label { font-weight: 600; font-size: 13px; }
.ctrl .val { font-size: 13px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.ctrl input[type=range] {
  grid-column: 1 / -1;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 99px;
  background: #2a2a2e; outline: none;
}
.ctrl input[type=range].hot { background: #4a1c24; }
.ctrl input[type=range].hot::-webkit-slider-thumb { background: var(--danger); }
.ctrl input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--text); border: 0;
  box-shadow: 0 0 0 3px rgba(244, 244, 245, .12);
}
.ctrl input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text); border: 0;
}

input[type=file] { display: none !important; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.kv div {
  display: flex; justify-content: space-between; gap: 12px;
  align-items: baseline; border-bottom: 1px solid #1e1e22; padding: 9px 0;
}
.kv span { color: var(--muted); font-size: 12px; font-weight: 500; }
.kv b { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }

.swatch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.swatch.dense { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .swatch.dense { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .swatch, .kv { grid-template-columns: 1fr; } }
.sw { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; padding: 8px 0; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw i {
  flex: 0 0 36px; height: 20px; border-radius: 99px;
  background: #2a2a2e; position: relative;
  transition: background .16s ease;
}
.sw i:after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: #9a9aa2; top: 2px; left: 2px; transition: transform .16s ease, background .16s ease;
}
.sw input:checked + i { background: var(--ok-dim); }
.sw input:checked + i:after { transform: translateX(16px); background: var(--ok); }
.sw span { font-size: 13px; }

.cluster {
  background: linear-gradient(180deg, #16161a 0%, #101012 100%);
  border: 1px solid var(--line);
  border-radius: 18px; padding: 8px 12px 16px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), var(--shadow);
}
.gauge {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 260 / 178;
  height: auto;
  overflow: visible;
}
.gauge::before { display: none; }
.gauge svg { width: 100%; height: 100%; display: block; overflow: visible; position: relative; z-index: 1; }
.g-track, .g-fill { fill: none; stroke-width: 11; stroke-linecap: round; }
.g-track { stroke: #1c1c21; }
.g-fill {
  stroke: var(--ok);
  stroke-dasharray: 427;
  stroke-dashoffset: 427;
  transition: stroke-dashoffset .12s linear, stroke .2s ease;
  filter: none;
}
.g-ptrack, .g-pfill { fill: none; stroke-width: 5; stroke-linecap: round; }
.g-ptrack { stroke: #18181c; }
.g-pfill {
  stroke: var(--text);
  stroke-dasharray: 352;
  stroke-dashoffset: 352;
  transition: stroke-dashoffset .2s linear, stroke .2s ease;
}
.g-tick { stroke: #4a4a52; stroke-width: 1.5; stroke-linecap: round; }
.g-tick.maj { stroke: #d8d8de; stroke-width: 2.2; }
.g-lab {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-anchor: middle;
  dominant-baseline: middle;
}
.g-lim { fill: var(--text); stroke: var(--bg); stroke-width: 1.5; opacity: 0; }
.gauge .readout {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 54%;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
.speed {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: clamp(48px, 14vw, 72px);
  font-weight: 650;
  line-height: 0.9;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}
.speed small {
  font-size: 10px;
  color: var(--muted);
  margin: 4px 0 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 650;
}
.watts {
  margin-top: 6px;
  font-size: clamp(15px, 4.6vw, 20px);
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.watts small { font-size: 10px; color: var(--muted); margin-left: 4px; font-weight: 600; }
.watts.hot { color: var(--danger); }
.sess {
  margin: 2px 0 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}
.spark { display: block; width: 100%; height: 44px; margin: 0 0 8px; }
.trip {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid #1e1e22;
}
.trip-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.trip-k { font-size: 11px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.trip-time {
  margin-right: auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 650;
}
#btnTripRec.is-on {
  background: var(--danger); color: #fff; border-color: var(--danger);
  animation: recPulse 1.5s ease-in-out infinite;
}
.trip-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
}
.trip-grid div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.trip-grid b {
  font-size: 18px; font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.trip-grid span { color: var(--muted); font-size: 11px; font-weight: 500; }
.kv b.cfw { color: var(--ok); }
.meta-line {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin: 10px 0 0; color: var(--muted); font-size: 12px;
}
.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 650; font-size: 11px;
  background: #0c0c0e;
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 12px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}
.stat .n { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.stat .n small { font-size: 11px; color: var(--muted); margin-left: 4px; font-weight: 500; letter-spacing: 0; }
.stat .l {
  color: var(--muted); font-size: 10px; font-weight: 650;
  margin-top: 4px; letter-spacing: 0.1em; text-transform: uppercase;
}
.bat {
  height: 3px; background: #2a2a2e; border-radius: 99px;
  margin-top: 10px; overflow: hidden;
}
.bat > i {
  display: block; height: 100%; width: 0;
  background: var(--ok);
  transition: width .45s ease, background .3s ease;
}
.stat.low .n { color: #ff7a86; }
.stat.low .bat > i { background: var(--danger); }
.tick { animation: tick .28s ease; }

.center { text-align: center; padding: 36px 0 28px; animation: viewIn .35s ease; }
.gate-shot {
  background: transparent;
  border-radius: 0;
  padding: 4px 8px 8px;
  margin: 0 auto 18px;
  max-width: 360px;
  box-shadow: none;
}
.gate-shot img {
  width: 100%;
  max-height: 168px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45));
}
#gateTitle { font-size: 28px; margin-bottom: 8px; }
#idleActions { margin-top: 6px; }
#idleActions .btn { min-height: 44px; min-width: 112px; }
#btnConnect { min-width: 156px; padding: 12px 22px; }
#live.enter { animation: viewIn .35s ease; }
.bar { height: 3px; background: #1c1c1f; border-radius: 99px; overflow: hidden; margin-top: 14px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--text); transition: width .15s linear; }
.ota-bar { height: 6px; margin: 18px 0 10px; }
.drop {
  border: 1px dashed var(--line); border-radius: var(--r);
  padding: 28px; text-align: center; color: var(--muted); margin-bottom: 12px;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.drop:hover, .drop.over { border-color: #f1f1f2; color: var(--text); background: #161618; }
.log {
  font-size: 12px; background: #080809;
  border: 1px solid var(--line); border-radius: var(--r); padding: 12px;
  min-height: 220px; max-height: 440px; overflow: auto; color: #9a9aa2; white-space: pre-wrap;
  font-weight: 500;
}
.log .err { color: #ff7a86; }
.log .ok { color: #5ed39a; }
.diag {
  font-size: 11px;
  background: #080809;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0 0;
  max-height: 280px;
  overflow: auto;
  color: #9a9aa2;
  white-space: pre-wrap;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  background: #0c0c0e;
}
.chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
}
.card.is-locked { position: relative; }
.ug-preview {
  height: 8px;
  border-radius: 99px;
  margin: 14px 0 12px;
  background: var(--ug, #e11d2e);
  box-shadow: 0 0 18px color-mix(in srgb, var(--ug, #e11d2e) 55%, transparent);
}
.ug-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.ug-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #3a3a42;
  background: var(--ug, #888);
  padding: 0;
  cursor: not-allowed;
}
#ugCard:not(.is-locked) .ug-dot { cursor: pointer; }
#ugCard:not(.is-locked) .ug-dot.ug-custom input { pointer-events: auto; }
.ug-dot.is-on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--text); }
.ug-dot.ug-custom {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    conic-gradient(from 90deg, #e11d2e, #e8a020, #3ecf8e, #2ec4e8, #3b6cff, #b44dff, #e11d2e);
}
.ug-dot.ug-custom input {
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  border: 0;
  padding: 0;
}
.foot {
  border-top: 1px solid var(--line);
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px));
  color: var(--muted); font-size: 12px;
}

.about-head { text-align: center; margin-bottom: 24px; }
.about-logo {
  width: 64px; height: 64px;
  margin: 8px auto 14px;
  display: block;
  background: transparent;
  filter: none !important;
}
.about-copy {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  margin: 0;
}
.card .about-copy + .actions { margin-top: 16px; }
.kv-stack { grid-template-columns: 1fr; }
.people {
  display: grid;
  gap: 0;
}
.people > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 4px 0 2px;
}
.people span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.people b { font-weight: 650; font-size: 20px; letter-spacing: -0.03em; }
a.btn { display: inline-block; text-decoration: none; text-align: center; }

.overlay {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: rgba(4, 4, 5, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn .18s ease;
  overflow: auto;
  padding: 16px 0;
}
.overlay.legal {
  z-index: 100;
  background: #070708;
  padding: 24px 16px;
  align-items: start;
  overflow: auto;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.legal-sheet {
  width: min(480px, calc(100% - 32px));
  margin: auto;
  text-align: left;
  padding: 32px 28px 26px;
}
.legal-sheet h2 { text-align: center; }
.legal-sheet .about-logo { margin-bottom: 10px; }
.legal-body {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  margin: 14px 0 0;
}
.legal-body p { margin: 0 0 12px; }
.legal-body p:last-child { margin-bottom: 0; }
.legal-sheet .warn { text-align: center; margin: 16px 0 12px; }
.legal-sheet #legalGo { width: 100%; min-height: 44px; margin-top: 0; }

.models {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 560px) {
  .models { grid-template-columns: 1fr 1fr 1fr; }
}
.model {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #101012;
}
.model.is-now { border-color: #3a3a42; }
.model-shot {
  background: #0c0c0e;
  height: 118px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
}
.model-shot img {
  max-width: 100%;
  max-height: 102px;
  object-fit: contain;
  display: block;
}
.model-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px 12px;
}
.model-meta b { font-size: 13px; font-weight: 650; }
.model-meta span { color: var(--muted); font-size: 11px; font-weight: 600; }
.model.is-now .model-meta span { color: var(--ok); }
body:not(.model-g3) [data-g3-only] { display: none !important; }
body:not(.model-zt3) [data-zt3-only] { display: none !important; }
body:not(.model-g3):not(.model-zt3) [data-flash-only] { display: none !important; }
body.model-g3 [data-nocfw], body.model-zt3 [data-nocfw] { display: none !important; }
.overlay[hidden] { display: none !important; }
body:not(.is-legal) #legalOverlay { display: none !important; }
.sheet {
  width: min(360px, calc(100% - 24px));
  background: linear-gradient(180deg, #18181c, var(--panel));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: sheetIn .42s cubic-bezier(.16, 1, .3, 1);
}
.sheet h2 { margin-bottom: 6px; }
.sheet .lead { margin: 0 0 8px; min-height: 1.3em; white-space: pre-wrap; word-break: break-word; }
.sheet .btn { margin-top: 8px; min-width: 120px; }
#btnCancelWait { position: relative; z-index: 2; min-height: 44px; width: 100%; }
.sheet.danger { border-color: #5a1c24; }
.sheet.danger h2 { color: #ff7a86; }

.pair-visual {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
}
.pair-visual > * {
  grid-area: 1 / 1;
  place-self: center;
}
.spin-wrap {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  animation: spin .8s linear infinite;
}
.spin { width: 44px; height: 44px; display: block; }
.spin-wrap[hidden], .pwr[hidden] { display: none !important; }
.spin .track { fill: none; stroke: #2a2a2e; stroke-width: 3; }
.spin .arc {
  fill: none; stroke: #f1f1f2; stroke-width: 3;
  stroke-linecap: round; stroke-dasharray: 34 80;
}
.pwr {
  position: relative;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  color: var(--text);
}
.pwr svg { width: 22px; height: 22px; position: relative; z-index: 1; }
.pwr-pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  animation: radar 1.6s ease-out infinite;
}
.pwr-pulse:before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  animation: radar 1.6s ease-out infinite .45s;
}
.steps {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; margin: 18px 0 22px; height: 8px;
}
.steps i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #3a3a40;
  transition: background .2s ease, transform .2s ease;
}
.steps i.done { background: var(--ok); }
.steps i.now { background: var(--text); transform: scale(1.25); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 3px #3ecf8e18; }
  50% { box-shadow: 0 0 0 6px #3ecf8e28; }
}
@keyframes radar {
  0% { transform: scale(1); opacity: .55; }
  100% { transform: scale(1.55); opacity: 0; }
}
@keyframes viewIn {
  from { opacity: 0; transform: translate3d(0, 56px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes viewOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translate3d(0, -32px, 0); }
}
@keyframes foldIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: none; }
}
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(48px) scale(.92); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@keyframes logoIn {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: none; }
}
@keyframes tick {
  0% { opacity: .4; }
  100% { opacity: 1; }
}
@keyframes recPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 46, .4); }
  50% { box-shadow: 0 0 0 6px rgba(225, 29, 46, 0); }
}

@media (max-width: 640px) {
  .top-row { padding: 8px 12px 6px; gap: 8px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand .ver { display: none; }
  .meta { flex-wrap: nowrap; gap: 6px; }
  .tabs { padding: 0 6px; }
  .tabs button { padding: 10px 11px 11px; font-size: 12px; }
  .main { padding: 16px 12px calc(48px + env(safe-area-inset-bottom, 0px)); }
  .cluster { padding: 4px 8px 14px; border-radius: 14px; }
  .center { padding: 16px 0 12px; }
  #gateTitle { font-size: 24px; }
  #idleActions .btn { min-width: 0; flex: 1 1 42%; }
  .status-chip { max-width: 42vw; overflow: hidden; }
  #status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .spin-wrap, .pwr-pulse, .pwr-pulse:before, .dot.wait, .dot.on,
  .view.active, .center, #live.enter, .overlay, .sheet, .logo.lg, .tick, .banner.show,
  #btnTripRec.is-on {
    animation: none !important;
  }
  .btn:hover { transform: none; }
  .g-fill { filter: none; }
}

/* ——— compliance v1200: consent banner, footer links, contrast ——— */
.consent[hidden] { display: none !important; }
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; justify-content: center; padding: 12px; pointer-events: none; }
.consent-card { pointer-events: auto; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px; max-width: 620px; width: 100%; box-shadow: var(--shadow); display: grid; gap: 10px; }
.consent-card b { font-size: 14px; color: var(--text); }
.consent-card p { margin: 0; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.legal-agree { padding: 10px 0 0; }
.legal-agree span { color: var(--text); }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.foot-links { display: inline-flex; gap: 6px; align-items: center; }
.linklike { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 12px; padding: 0; }
.linklike:hover, .linklike:focus-visible { color: var(--text); }

/* ——————— v1500 polish: boot screen, motion, depth ——————— */

/* ambient depth: two slow drifting glows behind everything */
body:before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 70vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(42% 55% at 18% 8%, rgba(225, 29, 46, .10), transparent 70%),
    radial-gradient(38% 48% at 82% 0%, rgba(120, 140, 255, .07), transparent 72%),
    radial-gradient(46% 40% at 50% 22%, rgba(255, 255, 255, .035), transparent 70%);
  filter: blur(6px);
  animation: vexDrift 26s ease-in-out infinite alternate;
}
@keyframes vexDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.08); }
}
.app { position: relative; z-index: 1; }

/* boot screen */
#vexBoot .vex-boot {
  position: absolute; inset: 0;
  display: grid; place-items: center; align-content: center;
  gap: 18px; text-align: center;
  transition: opacity .62s cubic-bezier(.16, 1, .3, 1), transform .62s cubic-bezier(.16, 1, .3, 1), filter .5s ease;
}
#vexBoot.is-done { pointer-events: none; }
#vexBoot.is-done .vex-boot { opacity: 0; transform: scale(1.05); filter: blur(8px); }
.vex-boot-mark { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.vex-boot-mark img { width: 62px; height: 62px; object-fit: contain; animation: vexLogoIn .8s cubic-bezier(.16, 1, .3, 1) both; }
.vex-boot-mark:before,
.vex-boot-mark:after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  animation: vexRing 2.4s cubic-bezier(.2, .7, .3, 1) infinite;
}
.vex-boot-mark:after { animation-delay: 1.2s; }
@keyframes vexRing {
  0%   { transform: scale(.72); opacity: 0; }
  35%  { opacity: .55; }
  100% { transform: scale(1.25); opacity: 0; }
}
@keyframes vexLogoIn {
  from { opacity: 0; transform: scale(.82) translateY(6px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.vex-boot-word {
  font-size: 17px; font-weight: 700; letter-spacing: .42em; text-transform: uppercase;
  padding-left: .42em;
  background: linear-gradient(90deg, #ffffff, #9a9aa3 45%, #ffffff);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: vexWord 2.4s linear infinite, vexLogoIn .7s .1s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes vexWord { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.vex-boot-bar {
  width: min(190px, 52vw); height: 2px; border-radius: 2px;
  background: rgba(255, 255, 255, .09); overflow: hidden;
}
.vex-boot-bar i {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, transparent, #fff 40%, #e11d2e);
  border-radius: 2px;
  animation: vexLoad 1.15s ease-in-out infinite;
}
@keyframes vexLoad {
  0%   { transform: translateX(-105%); }
  100% { transform: translateX(260%); }
}
.vex-boot-note { color: var(--muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }

/* app entrance once the loader is gone */
html.vex-ready .top { animation: vexDrop .6s cubic-bezier(.16, 1, .3, 1) both; }
html.vex-ready .main { animation: vexUp .62s .06s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes vexDrop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes vexUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* nav progress bar */
.vex-bar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  z-index: 90; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(244, 244, 245, 0), #f4f4f5 55%, #e11d2e);
  box-shadow: 0 0 12px rgba(244, 244, 245, .35);
  transition: width .42s cubic-bezier(.2, .9, .25, 1), opacity .3s ease;
}
.vex-bar.go { opacity: .9; }

/* sliding tab indicator */
.tabs { position: relative; }
.tab-ink {
  position: absolute; bottom: 0; left: 0; height: 2px; width: 0;
  pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(244, 244, 245, 0), #f4f4f5 25%, #f4f4f5 75%, rgba(244, 244, 245, 0));
  border-radius: 2px;
  transition: transform .42s cubic-bezier(.34, 1.25, .64, 1), width .42s cubic-bezier(.34, 1.25, .64, 1), opacity .3s ease;
}
.tab-ink.ready { opacity: 1; }

/* smoother view swaps */
.view.active { animation: viewIn2 .5s cubic-bezier(.16, 1, .3, 1); }
.view.leave { animation: viewOut2 .3s cubic-bezier(.4, 0, 1, 1) forwards; }
@keyframes viewIn2 {
  from { opacity: 0; transform: translateY(10px) scale(.994); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes viewOut2 {
  from { opacity: 1; transform: none; filter: none; }
  to   { opacity: 0; transform: translateY(-6px) scale(.996); filter: blur(4px); }
}

/* staggered card entrance */
.vex-in { animation: riseIn .5s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 26ms); }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* card life */
.card:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 12px 34px rgba(0, 0, 0, .34);
}
.card:active { transform: translateY(0); }

/* model tiles */
.model { transition: border-color .22s ease, transform .28s cubic-bezier(.16, 1, .3, 1), box-shadow .28s ease; }
.model:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 14px 30px rgba(0, 0, 0, .38); }
.model.is-now:hover { border-color: #55555f; }
.model-shot { position: relative; overflow: hidden; }
.model-shot img { transition: transform .5s cubic-bezier(.16, 1, .3, 1), filter .4s ease; }
.model:hover .model-shot img { transform: scale(1.06) translateY(-2px); }
.model-shot:after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 42%;
  left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .07), transparent);
  transform: skewX(-14deg);
}
.model:hover .model-shot:after { animation: shine 1.05s ease; }
@keyframes shine { from { left: -60%; } to { left: 118%; } }

/* gate hero: parallax slot + crossfade */
.gate-shot { perspective: 900px; }
.gate-shot img { transition: transform .45s cubic-bezier(.16, 1, .3, 1), opacity .3s ease, filter .3s ease; transform-style: preserve-3d; }
.gate-shot img.shot-swap { opacity: 0; filter: blur(7px); }
.gate-shot img.shot-in { animation: shotIn .52s cubic-bezier(.16, 1, .3, 1); }
@keyframes shotIn {
  from { opacity: 0; filter: blur(7px); }
  to   { opacity: 1; filter: none; }
}

/* controls feel */
.tabs button { transition: color .18s ease, border-color .18s ease, transform .24s cubic-bezier(.34, 1.3, .64, 1); }
.tabs button:active { transform: scale(.95); }
.seg button { transition: background .22s ease, color .22s ease, transform .26s cubic-bezier(.34, 1.35, .64, 1); }
.seg button:active { transform: scale(.94); }
.seg button.is-on { animation: segPop .3s cubic-bezier(.34, 1.4, .64, 1); }
@keyframes segPop { from { transform: scale(.92); } to { transform: scale(1); } }
.btn { transition: transform .16s cubic-bezier(.34, 1.3, .64, 1), filter .16s ease, background .16s ease, border-color .16s ease, box-shadow .2s ease; }
.btn:active { transform: scale(.97) translateY(1px); }
.btn:not(.ghost) { position: relative; overflow: hidden; }
.btn:not(.ghost):after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(0, 0, 0, .1), transparent);
  transform: skewX(-16deg);
}
.btn:not(.ghost):hover:after { animation: shine 0.85s ease; }

/* brand wordmark */
.brand { background-image: linear-gradient(92deg, #fff 30%, #b8b8c0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand .logo, .brand .ver { -webkit-text-fill-color: initial; }

/* live numbers pop */
.vex-pop { animation: vexPop .4s cubic-bezier(.34, 1.5, .64, 1); }
@keyframes vexPop { from { transform: scale(1.06); filter: brightness(1.25); } to { transform: none; filter: none; } }

/* custom BLE studio card */
body:not(.model-g3):not(.model-f3) [data-cble] { display: none !important; }
.card.cble {
  border-color: #33333b;
  background: linear-gradient(180deg, #1a1a1f 0%, var(--panel) 100%);
  position: relative;
  overflow: hidden;
}
.card.cble:before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--danger), rgba(225, 29, 46, 0));
}
.card.cble .btn { background: var(--text); color: var(--fg); text-decoration: none; display: inline-block; }
.card.cble .cble-tag {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 99px;
  border: 1px solid #3d3d46; color: var(--muted);
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.kv a { color: var(--text); text-decoration: none; border-bottom: 1px solid #3d3d46; padding-bottom: 1px; }
.kv a:hover { border-bottom-color: var(--text); }

/* scroll a touch nicer */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  body:before, .vex-in, .tab-ink, .vex-bar,
  html.vex-ready .top, html.vex-ready .main,
  .vex-boot-mark img, .vex-boot-mark:before, .vex-boot-mark:after, .vex-boot-word, .vex-boot-bar i,
  .view.active, .view.leave, .seg button.is-on, .gate-shot img.shot-in, .vex-pop {
    animation: none !important;
  }
  #vexBoot { display: none !important; }
  .model:hover, .card:hover, .btn:hover { transform: none; }
}

/* v1500 finish: clearer card surfaces + control details */
.card {
  background:
    radial-gradient(130% 90% at 50% 0%, rgba(255, 255, 255, .03), transparent 62%),
    linear-gradient(180deg, #17171b 0%, #121214 100%);
}
.model { background: #131316; }
.model-shot { background: #0d0d10; }
.tabs button { user-select: none; }
.card.fold > h3 { border-radius: 6px; }
.card.fold > h3:hover { color: var(--text); }
.card.fold > h3:after { transition: transform .3s cubic-bezier(.34, 1.4, .64, 1), border-color .2s ease; }
.card.fold > h3:hover:after { border-color: var(--text); }
.kv > div { transition: background .2s ease; border-radius: 6px; }
.kv > div:hover { background: rgba(255, 255, 255, .022); }
.stat { transition: transform .3s cubic-bezier(.16, 1, .3, 1), border-color .2s ease; }
.stat:hover { transform: translateY(-2px); border-color: var(--line-2); }
@media (prefers-reduced-motion: reduce) {
  .stat:hover, .card:hover { transform: none; }
}

/* ——————— v1600: guía, explicaciones y ayudas ——————— */

/* línea de ayuda dentro de las tarjetas */
.help {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: #a4a4ad;
  font-size: 12.5px;
  line-height: 1.6;
  font-weight: 500;
  margin: -4px 0 14px;
  text-align: left;
}
.help:empty { display: none; }
.help:before {
  content: "i";
  flex: 0 0 auto;
  width: 15px; height: 15px; margin-top: 1px;
  border: 1px solid #3d3d46;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700;
  color: var(--muted);
}
.gate-help { max-width: 480px; margin: 16px auto 0; }
.gate-help:before { margin-top: 1px; }

.link-quiet {
  display: inline-block;
  margin-top: 18px;
  background: none; border: 0;
  color: var(--muted);
  font-size: 12.5px; font-weight: 600;
  border-bottom: 1px dashed #3d3d46;
  padding: 2px 0;
  transition: color .18s ease, border-color .18s ease;
}
.link-quiet:hover { color: var(--text); border-bottom-color: var(--text); }

/* pasos numerados */
.steps-list { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps-list li {
  counter-increment: st;
  position: relative;
  padding: 11px 13px 11px 44px;
  border-radius: 10px;
  background: #101013;
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
  transition: border-color .2s ease;
}
.steps-list li:hover { border-color: var(--line-2); }
.steps-list li:before {
  content: counter(st);
  position: absolute;
  left: 12px; top: 11px;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--text); color: var(--fg);
  font-size: 11px; font-weight: 700;
}

/* checklist */
.checklist { display: grid; gap: 8px; }
.chk {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101013;
  cursor: pointer;
  font-size: 13px;
  transition: border-color .2s ease, background .2s ease;
}
.chk:hover { border-color: var(--line-2); }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk i {
  width: 19px; height: 19px; flex: 0 0 auto;
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
  display: grid; place-items: center;
  transition: background .18s ease, border-color .18s ease;
}
.chk i:after {
  content: "";
  width: 9px; height: 5px; margin-top: -2px;
  border-left: 2px solid var(--fg);
  border-bottom: 2px solid var(--fg);
  transform: rotate(-45deg) scale(.4);
  opacity: 0;
  transition: opacity .15s ease, transform .22s cubic-bezier(.34, 1.4, .64, 1);
}
.chk input:checked + i { background: var(--ok); border-color: var(--ok); }
.chk input:checked + i:after { opacity: 1; transform: rotate(-45deg) scale(1); }
.chk input:checked ~ span { color: var(--muted); text-decoration: line-through; text-decoration-color: #44444d; }
.chk:focus-within { border-color: var(--line-2); }

/* listas term / explicación */
.glist, .gloss { display: grid; gap: 8px; }
.glist > div, .gloss > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101013;
  transition: border-color .2s ease, background .2s ease;
}
.glist > div:hover, .gloss > div:hover { border-color: var(--line-2); }
.glist b, .gloss b { font-size: 12.5px; font-weight: 700; letter-spacing: -0.01em; }
.glist span, .gloss span { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.gloss > div { grid-template-columns: 120px 1fr; }
.gloss b { color: var(--ok); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
@media (max-width: 560px) {
  .glist > div, .gloss > div { grid-template-columns: 1fr; gap: 5px; }
}

/* viñetas simples */
.bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.bullets li { position: relative; padding-left: 20px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.bullets li:before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: #4c4c55;
}

/* preguntas frecuentes */
.faq { display: grid; gap: 8px; }
.faq details { border: 1px solid var(--line); border-radius: 10px; background: #101013; overflow: hidden; }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 12px 14px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: color .18s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:after {
  content: ""; width: 7px; height: 7px; flex: 0 0 auto;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .28s cubic-bezier(.34, 1.4, .64, 1), border-color .2s ease;
}
.faq details[open] summary:after { transform: rotate(225deg); }
.faq summary:hover { color: var(--text); }
.faq summary:hover:after { border-color: var(--text); }
.faq p { margin: 0; padding: 0 14px 14px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.faq details[open] p { animation: foldIn .3s cubic-bezier(.16, 1, .3, 1); }

@media (prefers-reduced-motion: reduce) {
  .faq details[open] p, .chk i:after { animation: none !important; }
}

/* v1600: enlace discreto a la guía, versión compacta dentro de las cabeceras */
.link-quiet.sm { margin: 0 0 16px; font-size: 12px; }
