/* Rastro — estilos
   Paleta tomada del logo de la Unidad Canina Rescate Castellón:
   naranja #EF8732 sobre carbón. Tipografías incluidas en la app (sin conexión). */

@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(../fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(../fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url(../fonts/barlow-condensed-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(../fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(../fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url(../fonts/barlow-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url(../fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --bg: #121211;
  --bg-raise: #171715;
  --surface: #1c1c19;
  --surface-2: #262622;
  --line: #2d2c28;
  --line-2: #45433d;
  --text: #f3efe7;
  --text-2: #c4beb2;
  --text-3: #8f897d;

  --orange: #ef8732;
  --orange-deep: #c9661a;
  --orange-ink: #1b1005;
  --orange-soft: rgb(239 135 50 / 0.1);
  --red: #e0453a;
  --red-text: #ff8d81;
  --red-soft: rgb(224 69 58 / 0.1);
  --green: #93c98d;
  --amber: #eab456;

  --orange-text: #ef8732; /* naranja cuando es texto o icono */
  --on-green: #10210e;
  --hero-bg: rgb(28 28 25 / 0.78);
  --strip-bg: rgb(23 23 21 / 0.85);
  --mock-bg: #23231f;
  --mock-raise: #33322c;
  --mock-line: #34332d;
  --toast-action: #9a4a0c;
  --needle-shadow: rgb(0 0 0 / 0.5);
  --icon-shadow: 0 12px 28px rgb(0 0 0 / 0.5), 0 0 0 1px rgb(255 255 255 / 0.06);
  --backdrop: rgb(0 0 0 / 0.65);
  --topo-filter: none;
  --topo-opacity: 0.06;

  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r: 12px;
  --r-lg: 16px;
  --pad: 20px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  color-scheme: dark;
}

/* Tema claro: se lee mejor a pleno sol. Lo activa data-theme="light" en <html>
   (automático según el ajuste del móvil, o elegido en Información). */
:root[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-raise: #fbf9f5;
  --surface: #ffffff;
  --surface-2: #ebe6dc;
  --line: #e0d9cd;
  --line-2: #c9c1b3;
  --text: #171612;
  --text-2: #46433c;
  --text-3: #6c675d;

  --orange-text: #a24d0b;
  --orange-soft: rgb(239 135 50 / 0.13);
  --red: #d63c31;
  --red-text: #b3261e;
  --red-soft: rgb(214 60 49 / 0.08);
  --green: #2e7a31;
  --amber: #8f5f00;

  --on-green: #ffffff;
  --hero-bg: rgb(255 255 255 / 0.82);
  --strip-bg: rgb(255 255 255 / 0.85);
  --mock-bg: #ffffff;
  --mock-raise: #efebe4;
  --mock-line: #e8e2d8;
  --toast-action: var(--orange);
  --needle-shadow: rgb(60 40 20 / 0.25);
  --icon-shadow: 0 10px 24px rgb(60 40 20 / 0.18), 0 0 0 1px rgb(0 0 0 / 0.05);
  --backdrop: rgb(23 22 18 / 0.45);
  --topo-filter: invert(1);
  --topo-opacity: 0.07;

  color-scheme: light;
}

/* iPhone con la app instalada: la hora y la batería salen siempre en blanco, así
   que en el tema claro se pone detrás una franja oscura para que se lean */
:root[data-theme="light"] body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: env(safe-area-inset-top, 0px);
  background: #121211;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 500 18px/1.45 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

[hidden] { display: none !important; }
h1, h2, h3, p, ol, dl, dd { margin: 0; }
a { color: inherit; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.ic {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

/* ---------- Estructura ---------- */

#app { max-width: 520px; margin: 0 auto; }

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-t) + 10px) var(--pad) calc(var(--safe-b) + 20px);
}

/* Curvas de nivel de fondo, muy tenues */
.screen--home, .screen--onb, .screen--install { position: relative; isolation: isolate; }
.screen--home::before, .screen--onb::before, .screen--install::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url(../img/topo.svg) center -40px / 820px auto repeat;
  filter: var(--topo-filter);
  opacity: var(--topo-opacity);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 10%, transparent 80%);
  mask-image: linear-gradient(#000 10%, transparent 80%);
}

/* ---------- Tipografía base ---------- */

.wordmark {
  font: 800 64px/0.88 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.015em;
}
.wordmark--sm { font-size: 27px; line-height: 0.95; }

.eyebrow {
  font: 700 13px/1 var(--f-display);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow--rule { display: flex; align-items: center; gap: 12px; }
.eyebrow--rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.fine { font-size: 14.5px; line-height: 1.45; color: var(--text-3); }

.big-num {
  font: 700 clamp(72px, 25vw, 108px)/0.84 var(--f-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.big-unit {
  font: 600 30px/1 var(--f-display);
  color: var(--text-2);
  margin-left: 6px;
  text-transform: lowercase;
}
.readout-dist { display: flex; align-items: baseline; }

/* ---------- Parche del logo ---------- */

.patch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--orange);
  flex: none;
}
.patch--md { width: 84px; height: 84px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--orange); }
.patch--lg { width: 128px; height: 128px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--orange); }

/* ---------- Botones ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 20px;
  border-radius: var(--r);
  font: 700 20px/1 var(--f-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.08s ease, background-color 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-xl { min-height: 84px; font-size: 26px; }
.btn-sm { min-height: 44px; padding: 0 14px; gap: 8px; font-size: 16px; letter-spacing: 0.05em; }
.btn-sm .ic { width: 18px; height: 18px; }

.btn-primary { background: var(--orange); color: var(--orange-ink); }
.btn-primary:active { background: var(--orange-deep); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:active { background: #c13a30; }
.btn-outline { border: 1px solid var(--line-2); color: var(--text); }
.btn-outline:active { background: var(--surface-2); }
.btn-quiet { min-height: 52px; font-size: 17px; color: var(--text-2); border: 1px solid var(--line-2); }
.btn-quiet .ic { width: 20px; height: 20px; }
.btn-quiet:active { background: var(--surface-2); }

/* Botón principal con «tecla» para el icono, como un mando de equipo */
.btn-key {
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  font-size: clamp(21px, 6.3vw, 26px);
  letter-spacing: 0.045em;
}
.btn-key .btn-label { flex: 1; padding: 0 12px; text-align: center; }
.btn-key-ic {
  align-self: stretch;
  width: 72px;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 0.08);
  border-right: 2px solid rgb(0 0 0 / 0.16);
}
.btn-key-ic--end { border-right: 0; border-left: 2px solid rgb(0 0 0 / 0.16); }
.btn-key-ic .ic { width: 34px; height: 34px; stroke-width: 2.4; }

.btn-lost {
  min-height: 58px;
  border: 2px solid rgb(224 69 58 / 0.7);
  background: var(--red-soft);
  color: var(--red-text);
}
.btn-lost:active { background: rgb(224 69 58 / 0.2); }

.btn.is-busy { pointer-events: none; }
.btn.is-busy::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 35%;
  background: currentColor;
  opacity: 0.5;
  animation: busy 1.1s ease-in-out infinite;
}
@keyframes busy {
  from { transform: translateX(-100%); }
  to { transform: translateX(300%); }
}

.icon-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  color: var(--text-2);
}
.icon-btn:active { background: var(--surface-2); }

.link {
  padding: 10px 0;
  font-size: 15px;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-2);
}

.chip {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font: 500 13px/1 var(--f-mono);
  color: var(--text-2);
  white-space: nowrap;
}

/* Selector de idioma */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}
.seg button {
  padding: 8px 14px;
  border-radius: 999px;
  font: 600 15px/1 var(--f-body);
  color: var(--text-3);
}
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.seg--wide { display: flex; }
.seg--wide button { flex: 1; padding: 13px; font-size: 16px; }

/* ---------- Barra superior ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-text { display: grid; gap: 3px; min-width: 0; }
.brand-unit {
  font: 700 11.5px/1.15 var(--f-display);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--orange-text);
}

.topbar--sub { display: grid; grid-template-columns: 48px 1fr auto; }
.sub-title {
  font: 700 22px/1 var(--f-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Primera vez ---------- */

.onb-top { display: flex; justify-content: flex-end; }
.onb-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 0 34px;
  text-align: center;
}
.onb-hero .wordmark { margin-top: 6px; }
.tagline { max-width: 23ch; font-size: 19px; color: var(--text-2); }

.steps { list-style: none; padding: 0; margin: 8px 0 0; }
.steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.step-n { font: 800 32px/1 var(--f-display); color: var(--orange-text); }
.steps h3 {
  margin-bottom: 4px;
  font: 700 21px/1.1 var(--f-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.steps p { font-size: 17px; color: var(--text-2); }

.warn {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  margin-top: 24px;
  padding: 18px 18px 18px 16px;
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--orange-soft);
}
.warn .ic { width: 28px; height: 28px; color: var(--orange-text); }
.warn h3 {
  margin-bottom: 6px;
  font: 700 20px/1.1 var(--f-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.warn p { font-size: 17px; color: var(--text-2); }

.onb-actions { display: grid; gap: 14px; margin-top: 28px; text-align: center; }

/* ---------- Inicio ---------- */

.status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 16px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--strip-bg);
}

.gps {
  --q: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 13.5px/1 var(--f-mono);
  color: var(--text-2);
}
.gps[data-q="good"] { --q: var(--green); }
.gps[data-q="fair"] { --q: var(--amber); }
.gps[data-q="poor"], .gps[data-q="error"] { --q: var(--red-text); }
.gps[data-q="error"] { color: var(--red-text); }

.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.bars i { width: 4px; border-radius: 1px; background: var(--line-2); }
.bars i:nth-child(1) { height: 5px; }
.bars i:nth-child(2) { height: 8px; }
.bars i:nth-child(3) { height: 11px; }
.bars i:nth-child(4) { height: 14px; }
.gps[data-bars="1"] .bars i:nth-child(-n + 1),
.gps[data-bars="2"] .bars i:nth-child(-n + 2),
.gps[data-bars="3"] .bars i:nth-child(-n + 3),
.gps[data-bars="4"] .bars i:nth-child(-n + 4) { background: var(--q); }
.gps[data-q="searching"] .bars i { animation: scan 1.6s ease-in-out infinite; }
.gps[data-q="searching"] .bars i:nth-child(2) { animation-delay: 0.15s; }
.gps[data-q="searching"] .bars i:nth-child(3) { animation-delay: 0.3s; }
.gps[data-q="searching"] .bars i:nth-child(4) { animation-delay: 0.45s; }
@keyframes scan {
  0%, 100% { background: var(--line-2); }
  40% { background: var(--text-3); }
}

.offline {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 14px/1.1 var(--f-body);
  color: var(--text-3);
  margin-left: auto;
}
.offline .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.offline[data-ready="true"] { color: var(--green); }
.offline[data-ready="false"] .ic { display: none; }

.notice {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  font-size: 16px;
}
.notice--error { border: 1px solid rgb(224 69 58 / 0.5); background: var(--red-soft); color: var(--text-2); }
.notice--error strong { color: var(--red-text); }

.install {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
}
.install-ic { color: var(--orange-text); }
.install-copy { display: grid; gap: 4px; font-size: 16px; }
.install-copy strong { font-weight: 600; color: var(--text); }
.install-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.install-actions .btn-quiet { min-height: 44px; font-size: 15px; border-color: transparent; }

.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0;
}

/* Recuadro con esquinas de visor */
.hero {
  --c: var(--orange);
  --l: 18px;
  --w: 2px;
  display: grid;
  gap: 12px;
  padding: 26px 24px;
  background:
    linear-gradient(var(--c) 0 0) top left / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) top left / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) top right / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) top right / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) bottom left / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) bottom left / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) bottom right / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) bottom right / var(--w) var(--l),
    var(--hero-bg);
  background-repeat: no-repeat;
}
.hero-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hero-meta { font: 500 13px/1.2 var(--f-mono); color: var(--text-3); text-align: right; }
.hero-title {
  font: 700 32px/1.02 var(--f-display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.hero-text { font-size: 17px; color: var(--text-2); }
#home-point .readout-dist { margin-top: 6px; }
#home-dir {
  font: 700 22px/1.1 var(--f-display);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--orange-text);
}

.home-actions { display: grid; gap: 12px; }

/* ---------- Volver al punto ---------- */

.chip--gps[data-q="good"] { color: var(--green); }
.chip--gps[data-q="fair"] { color: var(--amber); }
.chip--gps[data-q="poor"], .chip--gps[data-q="error"] { color: var(--red-text); }
.chip--gps:not([data-q="searching"]) { border-color: color-mix(in srgb, currentColor 40%, transparent); }

.dial-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  padding-top: 14px;
}
.dial { width: min(100%, 46dvh, 400px); height: auto; aspect-ratio: 1; overflow: visible; }
.dial-face { fill: var(--bg-raise); stroke: var(--line-2); stroke-width: 1.5; }
.dial-inner { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 1 7; }
.tick { stroke: var(--text-3); stroke-width: 1.5; }
.tick--major { stroke: var(--text-2); stroke-width: 2; }
.tick--card { stroke: var(--text); stroke-width: 3; }
.tick--north { stroke: var(--orange); stroke-width: 5; }
.dial-letter {
  font: 700 24px var(--f-display);
  fill: var(--text-2);
  text-anchor: middle;
}
.dial-letter--n { fill: var(--orange-text); }
.lubber { fill: var(--text); }
.needle-l { fill: var(--orange); }
.needle-r { fill: var(--orange-deep); }
#needle { filter: drop-shadow(0 8px 12px var(--needle-shadow)); }
.target-dot { fill: var(--orange); stroke: var(--bg-raise); stroke-width: 5; }

.near-ring { fill: none; stroke: var(--orange); stroke-width: 3; }
.near-dot { fill: var(--orange); }
.pulse {
  fill: none;
  stroke: var(--orange);
  stroke-width: 2;
  transform-origin: 0 0;
  animation: pulse 2.2s ease-out infinite;
}
.pulse--2 { animation-delay: 1.1s; }
@keyframes pulse {
  from { transform: scale(1); opacity: 0.8; }
  to { transform: scale(3.1); opacity: 0; }
}

.nav-readout { margin-top: 10px; text-align: center; }
.nav-readout .readout-dist { justify-content: center; }
.readout-sub {
  margin-top: 8px;
  font: 700 19px/1.2 var(--f-display);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-2);
}
.nav-readout.is-near .big-num {
  font-size: clamp(40px, 12vw, 56px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--orange-text);
}
.nav-readout.is-near .readout-sub {
  font: 500 18px/1.4 var(--f-body);
  letter-spacing: 0;
  text-transform: none;
}

.hint {
  min-height: 3em;
  max-width: 34ch;
  margin: 12px auto 0;
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
  color: var(--text-3);
}
.hint.is-warn { color: var(--amber); }

.nav-foot { display: grid; gap: 10px; margin-top: 8px; }
.nav-src { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }

@media (max-height: 720px) {
  .dial { width: min(100%, 40dvh, 400px); }
  .dial-wrap { padding-top: 6px; }
  .screen--nav .big-num { font-size: 64px; }
  .readout-sub { margin-top: 4px; font-size: 17px; }
  .hint { min-height: 2.9em; margin-top: 8px; font-size: 15px; }
}

.portrait-guard { display: none; }
@media (orientation: landscape) and (max-height: 540px) {
  .screen--nav .portrait-guard {
    position: fixed;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--bg);
    font: 700 26px/1.2 var(--f-display);
    text-align: center;
    text-transform: uppercase;
  }
}

/* ---------- Me he perdido ---------- */

.screen--lost .btn-danger { margin-top: 18px; }
.screen--lost > .fine { margin-top: 10px; text-align: center; }

.panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.panel-meta { font: 500 13px/1.2 var(--f-mono); color: var(--text-3); text-align: right; }

.coord-list { display: grid; gap: 12px; margin-bottom: 14px; }
.coord-list div { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px dashed var(--line-2); }
.coord-list dt {
  font: 700 13px/1 var(--f-display);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
}
.coord-list dd { font: 500 23px/1.3 var(--f-mono); letter-spacing: -0.01em; }
#lost-utm { font-size: 18px; white-space: pre-line; }
.coords.is-empty dd { color: var(--text-3); }

.coord-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin-top: 14px; }
.coord-actions .btn {
  flex-direction: column;
  gap: 6px;
  min-height: 70px;
  padding: 10px 6px;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.coord-actions .btn .ic { width: 22px; height: 22px; }

.lost-point-dist { font: 700 30px/1 var(--f-display); letter-spacing: 0.02em; }
.mono-sm { margin-top: 8px; font: 500 14px/1.4 var(--f-mono); color: var(--text-3); }
.mono-sm + .mono-sm { margin-top: 2px; }

.tips { margin-top: 28px; }
.tips ol { list-style: none; counter-reset: tip; display: grid; gap: 14px; margin-top: 16px; padding: 0; }
.tips li {
  counter-increment: tip;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  font-size: 17px;
  color: var(--text-2);
}
.tips li::before {
  content: counter(tip, decimal-leading-zero);
  font: 800 22px/1.15 var(--f-display);
  color: var(--orange-text);
}

/* ---------- Información ---------- */

.info-unit {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.info-unit p { font-size: 17px; color: var(--text-2); }
.info-block { display: grid; gap: 10px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.info-block p { font-size: 17px; color: var(--text-2); }
.info-block .btn { justify-self: start; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.info-foot { padding: 26px 0 6px; text-align: center; font: 500 13px var(--f-mono); color: var(--text-3); }

/* ---------- Instalar ---------- */

.inst-hero { display: flex; align-items: center; gap: 18px; padding: 18px 0 28px; }
.app-icon {
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 22%;
  box-shadow: var(--icon-shadow);
}
.wordmark--md { font-size: 50px; }
.inst-hero .brand-unit { display: block; margin-top: 6px; }

.inst { display: grid; gap: 16px; }
.inst-title {
  font: 700 34px/1.02 var(--f-display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.inst-lead { font-size: 18px; color: var(--text-2); }
.inst-note { font-size: 16px; color: var(--text-3); }
.btn-block { width: 100%; }

.inst-manual { margin-top: 4px; border-top: 1px solid var(--line); }
.inst-manual summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  font: 600 17px/1.3 var(--f-body);
  color: var(--text-2);
  cursor: pointer;
  list-style: none;
}
.inst-manual summary::-webkit-details-marker { display: none; }
.inst-manual summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.inst-manual[open] summary::after { transform: rotate(-135deg); }

/* Pasos numerados unidos por una línea */
.vsteps { list-style: none; counter-reset: vs; margin: 6px 0 0; padding: 0; }
.vsteps li { counter-increment: vs; position: relative; padding: 0 0 28px 52px; }
.vsteps li::before {
  content: counter(vs);
  position: absolute;
  left: 0;
  top: -3px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: var(--orange-ink);
  font: 800 20px/1 var(--f-display);
}
.vsteps li::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 41px;
  bottom: 8px;
  width: 2px;
  background: var(--line-2);
}
.vsteps li:last-child { padding-bottom: 4px; }
.vsteps li:last-child::after { display: none; }
.vsteps h3 { font: 700 21px/1.15 var(--f-display); letter-spacing: 0.02em; text-transform: uppercase; }
.vsteps p { margin-top: 4px; font-size: 16.5px; color: var(--text-2); }

/* Dibujos que imitan lo que se ve en el móvil */
.mock {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--mock-bg);
  color: var(--text-2);
  font: 500 15px/1.25 var(--f-body);
}
.mock .ic { width: 22px; height: 22px; color: var(--text-3); }
.mock-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.mock-url {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--mock-raise);
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-tabs {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--text-3);
  border-radius: 5px;
  font: 700 12px/1 var(--f-body);
  color: var(--text-3);
}
.mock-hl {
  display: grid;
  place-items: center;
  padding: 5px;
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--orange);
  animation: hl 1.8s ease-in-out infinite;
}
.mock .mock-hl .ic { color: var(--orange-text); }
@keyframes hl {
  50% { box-shadow: 0 0 0 2px var(--orange), 0 0 0 7px rgb(239 135 50 / 0.22); }
}

.mock-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.mock-row + .mock-row { border-top: 1px solid var(--mock-line); }
.mock-list--ios .mock-row { justify-content: space-between; }
.mock-row--hl {
  background: var(--orange-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 2px var(--orange);
  border-radius: 0 0 13px 13px;
}
.mock .mock-row--hl .ic { color: var(--orange-text); }

.mock-dialog { display: grid; gap: 14px; padding: 14px; }
.mock-dialog-t { font: 600 16px/1.2 var(--f-body); color: var(--text); }
.mock-app { display: flex; align-items: center; gap: 12px; }
.mock-app img { width: 40px; height: 40px; border-radius: 10px; }
.mock-app span { display: grid; }
.mock-app strong { font-weight: 600; color: var(--text); }
.mock-app small { font-size: 13px; color: var(--text-3); }
.mock-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; color: var(--text-3); }
.mock-actions--top { justify-content: space-between; }
.mock-pill { padding: 7px 14px; border-radius: 999px; font-weight: 600; color: var(--orange-text); }

.mock-home {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  gap: 14px 10px;
  padding: 16px 14px 14px;
}
.tile {
  justify-self: center;
  width: 100%;
  max-width: 52px;
  aspect-ratio: 1;
  border-radius: 22%;
  background: var(--mock-raise);
}
.tile--app {
  display: grid;
  justify-items: center;
  gap: 5px;
  max-width: none;
  aspect-ratio: auto;
  background: none;
}
.tile--app img {
  width: 52px;
  height: 52px;
  border-radius: 22%;
  box-shadow: 0 0 0 2px var(--mock-bg), 0 0 0 4px var(--orange);
}
.tile--app small { font-size: 12px; color: var(--text); }

.qr-frame {
  justify-self: center;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--orange);
}
.qr { width: 220px; height: 220px; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr-url { font: 500 16px/1.3 var(--f-mono); text-align: center; color: var(--text-2); word-break: break-all; }

.done-badge {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--on-green);
}
.done-badge .ic { width: 38px; height: 38px; stroke-width: 3; }

.inst-foot { display: grid; gap: 8px; margin-top: auto; padding-top: 28px; text-align: center; }

/* ---------- Diálogo ---------- */

.dialog {
  width: min(100% - 32px, 440px);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
}
.dialog::backdrop { background: var(--backdrop); }
.dialog form { display: grid; gap: 14px; padding: 22px; }
.dialog-title { font: 700 25px/1.1 var(--f-display); letter-spacing: 0.02em; text-transform: uppercase; }
.dialog-body { display: grid; gap: 10px; font-size: 17px; color: var(--text-2); }
.dialog-body ol { display: grid; gap: 8px; padding-left: 1.3em; }
.dialog-body li::marker { color: var(--orange-text); font-weight: 700; }
.dialog-actions { display: flex; flex-direction: column-reverse; gap: 10px; margin-top: 6px; }
.dialog-actions .btn { min-height: 56px; font-size: 19px; }

/* ---------- Aviso flotante ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 20px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 10px 10px 10px 18px;
  border-radius: var(--r);
  background: var(--text);
  color: var(--bg);
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.45);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.toast-action {
  padding: 10px 12px;
  font: 700 16px/1 var(--f-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--toast-action);
}

.noscript { padding: 24px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
