/* ==========================================================================
   ViajaSeguro — "vidrio sobre Valparaíso de noche"
   ========================================================================== */

@property --p {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

:root {
  /* Paleta */
  --night: #06142a;
  --night-2: #0a1d3a;
  --night-3: #0f2647;
  --cyan: #36d6e7;
  --violet: #7c5cff;
  --bougain: #ff5fa2;
  --red: #ff4757;
  --red-deep: #d81f36;
  --green: #34e3a0;
  --amber: #ffb547;
  --text: #f2f6ff;
  --text-2: rgba(242, 246, 255, 0.7);
  --line: rgba(242, 246, 255, 0.12);
  --error: #ffa6cc;

  /* Vidrio */
  --glass-fill: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)), rgba(9, 24, 52, 0.42);
  --glass-fill-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)), rgba(9, 24, 52, 0.5);
  --glass-blur: blur(24px) saturate(180%);
  --glass-edge: linear-gradient(140deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.14) 28%, rgba(255, 255, 255, 0.04) 55%, rgba(255, 255, 255, 0.16));
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 18px rgba(255, 255, 255, 0.04), inset 0 -10px 24px rgba(0, 0, 0, 0.12), 0 12px 32px rgba(1, 6, 18, 0.45);

  /* Forma */
  --r-sm: 0.75rem;
  --r: 1.125rem;
  --r-lg: 1.5rem;
  --gutter: 1rem;
  --appbar-h: 3.75rem;
  --tabbar-h: 4.25rem;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: dark;
}

html.lg {
  font-size: 118.75%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--night);
  color: var(--text);
  font-family: 'Overpass', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h2 {
  font-weight: 800;
  font-size: 1.1875rem;
  line-height: 1.2;
}
h3 {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.25;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

.ic {
  flex: none;
}

:focus {
  outline: none;
}
h1[tabindex='-1']:focus,
.view:focus:not(:focus-visible) {
  outline: none;
}
.view:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -3px;
  border-radius: 0;
}
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.num,
.tnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.muted {
  color: var(--text-2);
}

.small {
  font-size: 0.875rem;
}
.center {
  text-align: center;
}
.row-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.dlg-form {
  margin-top: 0.75rem;
}

/* ==========================================================================
   Fondo vivo
   ========================================================================== */

.bg,
.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, #0b2142 0%, transparent 60%),
    radial-gradient(90% 60% at 50% 100%, #081a35 0%, transparent 70%),
    var(--night);
  pointer-events: none;
}
.scene {
  position: absolute;
  z-index: 0;
}

.blob {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  opacity: 0.4;
  will-change: transform;
}
.scene .blob {
  width: 130%;
  height: auto;
  aspect-ratio: 1;
}
.blob.b1 {
  background: radial-gradient(closest-side, rgba(54, 214, 231, 0.62), rgba(54, 214, 231, 0) 72%);
  top: -22%;
  left: -30%;
  animation: drift1 46s ease-in-out infinite alternate;
}
.blob.b2 {
  background: radial-gradient(closest-side, rgba(124, 92, 255, 0.7), rgba(124, 92, 255, 0) 72%);
  top: 18%;
  right: -45%;
  animation: drift2 58s ease-in-out infinite alternate;
}
.blob.b3 {
  background: radial-gradient(closest-side, rgba(255, 95, 162, 0.5), rgba(255, 95, 162, 0) 72%);
  bottom: -38%;
  left: -20%;
  animation: drift3 64s ease-in-out infinite alternate;
}
.blob.b4 {
  background: radial-gradient(closest-side, rgba(54, 214, 231, 0.42), rgba(54, 214, 231, 0) 72%);
  bottom: -30%;
  right: -35%;
  opacity: 0.3;
  animation: drift2 72s ease-in-out infinite alternate-reverse;
}
@keyframes drift1 {
  to {
    transform: translate3d(18%, 14%, 0) scale(1.12);
  }
}
@keyframes drift2 {
  to {
    transform: translate3d(-20%, 10%, 0) scale(0.9);
  }
}
@keyframes drift3 {
  to {
    transform: translate3d(16%, -16%, 0) scale(1.08);
  }
}

/* grano sutil para evitar bandas en los degradados */
.scene::after,
.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
}

/* ==========================================================================
   Marco: teléfono en pantallas grandes
   ========================================================================== */

.phone {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
}

.device {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.bg {
  display: none;
}

@media (min-width: 700px) and (min-height: 620px) {
  body {
    display: grid;
    place-items: center;
  }
  .bg {
    display: block;
  }
  .phone {
    width: auto;
    height: min(880px, calc(100dvh - 48px));
    padding: 11px;
    border-radius: 58px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)), rgba(10, 26, 54, 0.3);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.35),
      inset 0 0 0 1px rgba(255, 255, 255, 0.12),
      0 40px 90px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(0, 0, 0, 0.3);
  }
  .phone::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--glass-edge);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
  }
  .device {
    width: 404px;
    height: 100%;
    border-radius: 47px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
  .desk-note {
    display: block;
  }
}

.desk-note {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--text-2);
  white-space: nowrap;
}
@media (max-height: 760px) {
  .desk-note {
    display: none !important;
  }
}

/* ==========================================================================
   Vidrio
   ========================================================================== */

.glass {
  position: relative;
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--r);
  box-shadow: var(--glass-shadow);
  isolation: isolate;
}
.glass::before {
  /* borde con degradado de luz: más brillante arriba a la izquierda */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  z-index: 1;
}
.glass::after {
  /* reflejo especular suave en la parte superior */
  content: '';
  position: absolute;
  inset: 1px 1px auto 1px;
  height: min(48%, 5rem);
  border-radius: inherit;
  border-bottom-left-radius: 50% 30%;
  border-bottom-right-radius: 50% 30%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: -1;
}
.glass.strong {
  background: var(--glass-fill-strong);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass,
  .glass.strong,
  .appbar.scrolled,
  .tabbar,
  .toast,
  .modal {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), rgba(12, 30, 62, 0.94) !important;
  }
  .phone {
    background: rgba(14, 34, 68, 0.9) !important;
  }
}

/* ==========================================================================
   Barra superior
   ========================================================================== */

.appbar {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  min-height: calc(var(--appbar-h) + var(--safe-t));
  padding: calc(var(--safe-t) + 0.5rem) calc(var(--gutter) + var(--safe-r)) 0.5rem calc(var(--gutter) + var(--safe-l));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.25s, box-shadow 0.25s;
  view-transition-name: appbar;
}
.appbar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(180deg, rgba(6, 20, 42, 0.55), rgba(6, 20, 42, 0.3));
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  transition: opacity 0.25s;
}
.appbar.scrolled::before {
  opacity: 1;
}
.appbar[hidden] {
  display: none;
}
.appbar .brand {
  min-width: 44px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  min-height: 44px;
}
.appbar .title {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  font-weight: 800;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.appbar.scrolled .title {
  opacity: 1;
  transform: none;
}
.appbar .spacer {
  flex: 1;
}

.icon-btn {
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  flex: none;
  transition: background-color 0.2s, transform 0.15s;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
.icon-btn:active {
  transform: scale(0.94);
}

.demo-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem 0.25rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  white-space: nowrap;
  flex: none;
}
.demo-tag .ic {
  width: 0.875rem;
  height: 0.875rem;
}

/* ==========================================================================
   Vista y pantallas
   ========================================================================== */

.view {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-top: calc(var(--appbar-h) + var(--safe-t));
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 2.75rem);
  view-transition-name: screen;
}
.view::-webkit-scrollbar {
  display: none;
}
.device.bare .view {
  padding-top: var(--safe-t);
  padding-bottom: var(--safe-b);
}
.device.no-tabs .view {
  padding-bottom: calc(var(--safe-b) + 1.25rem);
}

.screen {
  min-height: 100%;
  padding: 0.5rem calc(var(--gutter) + var(--safe-r)) 1rem calc(var(--gutter) + var(--safe-l));
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.screen > h1:first-child,
.screen > .head:first-child {
  margin-top: 0.25rem;
}

.head {
  display: grid;
  gap: 0.35rem;
}
.head p {
  color: var(--text-2);
}

.section {
  display: grid;
  gap: 0.6rem;
}
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.section-title h2 {
  font-size: 1.0625rem;
}
.section-title a,
.text-link {
  color: #c6f8fc;
  background: none;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 0.5rem;
  padding: 0 0.25rem;
}
.section-title a:hover,
.text-link:hover {
  text-decoration: underline;
}

/* Transiciones entre pantallas (respaldo CSS cuando no hay View Transitions) */
.screen.enter-forward {
  animation: in-forward 0.34s var(--ease-out) both;
}
.screen.enter-back {
  animation: in-back 0.34s var(--ease-out) both;
}
.screen.enter-fade {
  animation: in-fade 0.24s ease both;
}
@keyframes in-forward {
  from {
    opacity: 0;
    transform: translateX(44px);
  }
}
@keyframes in-back {
  from {
    opacity: 0;
    transform: translateX(-44px);
  }
}
@keyframes in-fade {
  from {
    opacity: 0;
  }
}

/* View Transitions API */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-group(screen) {
  overflow: clip;
  animation-duration: 0.34s;
}
::view-transition-old(screen),
::view-transition-new(screen) {
  height: 100%;
  object-fit: none;
  object-position: top;
}
html[data-nav='forward']::view-transition-old(screen) {
  animation: vt-out-left 0.3s var(--ease-out) both;
}
html[data-nav='forward']::view-transition-new(screen) {
  animation: vt-in-right 0.34s var(--ease-out) both;
}
html[data-nav='back']::view-transition-old(screen) {
  animation: vt-out-right 0.3s var(--ease-out) both;
}
html[data-nav='back']::view-transition-new(screen) {
  animation: vt-in-left 0.34s var(--ease-out) both;
}
html[data-nav='fade']::view-transition-old(screen) {
  animation: vt-fade-out 0.18s ease both;
}
html[data-nav='fade']::view-transition-new(screen) {
  animation: vt-fade-in 0.24s ease 0.04s both;
}
::view-transition-group(appbar),
::view-transition-group(tabbar) {
  animation-duration: 0.2s;
}
@keyframes vt-out-left {
  to {
    opacity: 0;
    transform: translateX(-56px);
  }
}
@keyframes vt-in-right {
  from {
    opacity: 0;
    transform: translateX(72px);
  }
}
@keyframes vt-out-right {
  to {
    opacity: 0;
    transform: translateX(56px);
  }
}
@keyframes vt-in-left {
  from {
    opacity: 0;
    transform: translateX(-72px);
  }
}
@keyframes vt-fade-out {
  to {
    opacity: 0;
  }
}
@keyframes vt-fade-in {
  from {
    opacity: 0;
  }
}

/* ==========================================================================
   Barra de pestañas flotante + esfera SOS
   ========================================================================== */

.tabbar {
  position: absolute;
  z-index: 30;
  left: calc(0.75rem + var(--safe-l));
  right: calc(0.75rem + var(--safe-r));
  bottom: calc(var(--safe-b) + 0.75rem);
  height: var(--tabbar-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  padding: 0 0.25rem;
  border-radius: 1.6rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)), rgba(8, 22, 48, 0.55);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  view-transition-name: tabbar;
}
.tabbar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.tabbar[hidden] {
  display: none;
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 44px;
  min-width: 44px;
  padding-top: 0.15rem;
  text-decoration: none;
  color: var(--text-2);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 1.1rem;
  transition: color 0.2s;
}
.tab .ic {
  width: 1.4rem;
  height: 1.4rem;
  transition: transform 0.25s var(--ease-spring);
}
.tab:hover {
  color: var(--text);
}
.tab[aria-current='page'] {
  color: var(--text);
}
.tab[aria-current='page'] .ic {
  transform: translateY(-1px) scale(1.06);
  color: var(--cyan);
}
.tab[aria-current='page']::after {
  content: '';
  position: absolute;
  bottom: 0.4rem;
  width: 1.1rem;
  height: 3px;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(54, 214, 231, 0.8);
}
.tab[aria-current='page'] span {
  margin-bottom: 0.3rem;
}

.tab-sos {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ---- Esfera SOS (pestaña y pantalla) ---- */

.orb {
  --size: 4.4rem;
  --p: 0;
  position: relative;
  width: var(--size);
  height: var(--size);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #fff;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  flex: none;
}
.orb:not(.holding) {
  transition: --p 0.45s var(--ease-out);
}
.tab-sos .orb {
  margin-top: -1.55rem;
}
.orb-glow {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 71, 87, 0.55), rgba(255, 71, 87, 0) 75%);
  opacity: calc(0.55 + var(--p) * 0.45);
  transform: scale(calc(1 + var(--p) * 0.25));
  pointer-events: none;
}
.orb-body {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 115%, rgba(255, 71, 87, 0.75), rgba(255, 71, 87, 0) 70%),
    radial-gradient(circle at 50% 40%, rgba(150, 18, 38, 0.82), rgba(92, 8, 24, 0.92));
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px rgba(255, 160, 170, 0.45),
    inset 0 -10px 18px rgba(30, 0, 6, 0.45),
    0 10px 24px rgba(255, 71, 87, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.4);
  transform: scale(calc(1 - var(--p) * 0.04));
  transition: transform 0.2s;
}
.orb-liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background: linear-gradient(180deg, #ff7884, var(--red) 35%, #e2263c);
  transform: translateY(calc((1 - var(--p)) * 100% + 10%));
}
.orb-wave {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  width: 200%;
  height: 12%;
  color: #ff7884;
  animation: wave 1.6s linear infinite;
}
.orb-wave svg {
  width: 100%;
  height: 100%;
}
@keyframes wave {
  to {
    transform: translateX(-50%);
  }
}
.orb-shine {
  position: absolute;
  left: 16%;
  right: 16%;
  top: 6%;
  height: 38%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  opacity: 0.55;
  pointer-events: none;
}
.orb-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: calc(var(--size) * 0.24);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 6px rgba(60, 0, 10, 0.6);
  line-height: 1;
  padding-top: 0.08em;
}
.orb-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
  overflow: visible;
}
.orb-ring circle {
  fill: none;
  stroke-linecap: round;
}
.orb-ring .track {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 3;
}
.orb-ring .prog {
  stroke: #fff;
  stroke-width: 4;
  stroke-dasharray: 1 1;
  stroke-dashoffset: calc(1 - var(--p));
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
  opacity: calc(var(--p) * 8);
}
.orb:focus-visible {
  outline-offset: 4px;
  border-radius: 50%;
}
.orb.holding .orb-body {
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px rgba(255, 190, 196, 0.7),
    inset 0 -10px 18px rgba(30, 0, 6, 0.45),
    0 12px 36px rgba(255, 71, 87, 0.7),
    0 2px 6px rgba(0, 0, 0, 0.4);
}
.orb-big {
  --size: 13rem;
}
.orb-big .orb-ring .track {
  stroke-width: 2;
}
.orb-big .orb-ring .prog {
  stroke-width: 2.5;
}
.orb-big .orb-body {
  inset: 6%;
}
.orb-big::after {
  /* pulso de reposo */
  content: '';
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.45);
  animation: rest-pulse 2.6s ease-out infinite;
  pointer-events: none;
}
.orb-big.holding::after {
  animation: none;
}
@keyframes rest-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.45);
  }
  70%,
  100% {
    box-shadow: 0 0 0 1.6rem rgba(255, 71, 87, 0);
  }
}

/* ==========================================================================
   Botones
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.125rem;
  min-width: 44px;
  padding: 0.65rem 1.25rem 0.55rem;
  border: 0;
  border-radius: 1rem;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s var(--ease-out), box-shadow 0.2s, background-color 0.2s, opacity 0.2s;
}
.btn .ic {
  width: 1.25rem;
  height: 1.25rem;
}
.btn:active:not(:disabled) {
  transform: scale(0.975);
}
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-block {
  width: 100%;
}

.btn-primary {
  color: #04192b;
  background: linear-gradient(180deg, #7ae9f4 0%, var(--cyan) 55%, #2bbfd6 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -2px 0 rgba(0, 60, 80, 0.2),
    0 8px 22px rgba(54, 214, 231, 0.3);
}
.btn-primary:hover:not(:disabled) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -2px 0 rgba(0, 60, 80, 0.2),
    0 10px 28px rgba(54, 214, 231, 0.45);
}

.btn-glass {
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)), rgba(9, 24, 52, 0.35);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 18px rgba(1, 6, 18, 0.3);
}
.btn-glass:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08)), rgba(9, 24, 52, 0.35);
}

.btn-sos {
  color: #fff;
  background: linear-gradient(180deg, #ff5d6b 0%, var(--red-deep) 60%, #c41a30 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 24px rgba(255, 71, 87, 0.38);
  font-size: 1.125rem;
  font-weight: 900;
}

.btn-quiet {
  color: var(--text);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.btn-quiet:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-danger-quiet {
  color: var(--error);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 166, 204, 0.35);
}

.btn-row {
  display: grid;
  gap: 0.65rem;
}

/* ==========================================================================
   Letrero de micro y patente
   ========================================================================== */

.line-sign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.9em;
  padding: 0.28em 0.5em 0.16em;
  border-radius: 0.38em;
  color: var(--amber);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  background:
    radial-gradient(rgba(255, 181, 71, 0.16) 0.8px, transparent 1.1px) 0 0 / 3px 3px,
    linear-gradient(180deg, #1d1406, #0e0902);
  border: 1px solid rgba(255, 181, 71, 0.38);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 0 16px rgba(255, 181, 71, 0.22), inset 0 0 10px rgba(255, 181, 71, 0.12);
  text-shadow: 0 0 6px rgba(255, 181, 71, 0.85), 0 0 1px rgba(255, 220, 160, 0.9);
  white-space: nowrap;
  flex: none;
}
.line-sign.lg {
  font-size: 1.75rem;
  border-radius: 0.3em;
}
.line-sign.xl {
  font-size: 2.6rem;
  border-radius: 0.24em;
  padding: 0.24em 0.45em 0.12em;
}

.plate {
  display: inline-flex;
  align-items: center;
  padding: 0.22em 0.5em 0.12em;
  border-radius: 0.4em;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  color: var(--text);
  background: rgba(242, 246, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(242, 246, 255, 0.3);
  white-space: nowrap;
  line-height: 1.1;
}
.plate.lg {
  font-size: 1.125rem;
}

/* ==========================================================================
   Pase digital
   ========================================================================== */

.pass {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 1.6;
  max-height: 15rem;
  padding: 1.1rem 1.2rem 1rem;
  border: 0;
  border-radius: 1.4rem;
  text-align: left;
  color: var(--text);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(54, 214, 231, 0.32), transparent 55%),
    radial-gradient(100% 100% at 100% 100%, rgba(124, 92, 255, 0.4), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(10, 28, 60, 0.45);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 -20px 40px rgba(0, 0, 0, 0.12),
    0 18px 40px rgba(1, 6, 18, 0.5);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.pass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.pass::after {
  /* brillo que recorre la tarjeta */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.13) 48%, rgba(255, 255, 255, 0.02) 54%, transparent 60%) no-repeat;
  background-size: 300% 100%;
  background-position: 100% 0;
  animation: sheen 7s ease-in-out 1.2s infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%,
  60% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0% 0;
  }
}
button.pass:hover {
  transform: translateY(-2px);
}
button.pass:active {
  transform: scale(0.985);
}
.pass-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.pass-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 0.9375rem;
}
.pass-nfc {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.pass-chip {
  display: block;
  flex: none;
  width: 2.4rem;
  height: 1.8rem;
  margin: 0.7rem 0 0.6rem;
  border-radius: 0.4rem;
  background:
    linear-gradient(90deg, transparent 32%, rgba(80, 52, 6, 0.35) 33%, transparent 35%, transparent 64%, rgba(80, 52, 6, 0.35) 65%, transparent 67%),
    linear-gradient(0deg, transparent 46%, rgba(80, 52, 6, 0.35) 48%, transparent 52%),
    linear-gradient(140deg, #ffe2a8, #e9b24f 55%, #b9832b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  opacity: 0.9;
}
.pass-name {
  margin-top: auto;
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.15;
}
.pass-meta {
  margin-top: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.5rem;
  font-size: 0.8125rem;
}
.pass-meta b {
  display: block;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.pass-meta .k {
  color: var(--text-2);
  font-weight: 600;
}
.pass-type {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem 0.2rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  font-size: 0.8125rem;
  white-space: nowrap;
}
.pass-type .ic {
  width: 1rem;
  height: 1rem;
}
.pass-hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: -0.35rem;
}
.pass-hint .ic {
  width: 1rem;
  height: 1rem;
}

/* ==========================================================================
   Tarjetas, listas y bloques
   ========================================================================== */

.card {
  padding: 1rem;
}
.card-lg {
  padding: 1.25rem;
}

.trip-live {
  padding: 1rem 1rem 1rem;
  display: grid;
  gap: 0.9rem;
  border-radius: var(--r-lg);
}
.trip-live .row-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  font-size: 0.8125rem;
  color: #8ff3ca;
}
.live-dot::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 227, 160, 0.6);
  animation: live 1.8s ease-out infinite;
}
@keyframes live {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 227, 160, 0.55);
  }
  80%,
  100% {
    box-shadow: 0 0 0 0.55rem rgba(52, 227, 160, 0);
  }
}
.trip-live .meta {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.trip-live .meta b {
  font-weight: 800;
}

.quick[hidden] {
  display: none;
}
.quick {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0.75rem;
}
.quick-btn {
  display: grid;
  align-content: start;
  gap: 1.1rem;
  min-height: 7.25rem;
  padding: 1rem;
  border: 0;
  border-radius: var(--r-lg);
  text-align: left;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s var(--ease-out);
}
.quick-btn:active {
  transform: scale(0.98);
}
.quick-btn .q-ic {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.quick-btn b {
  display: block;
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.2;
}
.quick-btn small {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-2);
  margin-top: 0.15rem;
}
.quick-btn.report {
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(255, 95, 162, 0.28), transparent 60%),
    var(--glass-fill);
}
.quick-btn.rate .q-ic {
  color: var(--amber);
}

.list {
  border-radius: var(--r-lg);
  overflow: hidden;
  padding: 0.25rem 0;
}
.list-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  text-decoration: none;
  transition: background-color 0.2s;
}
a.list-item:hover,
button.list-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.list-item + .list-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: var(--line);
}
.list-item .grow {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}
.list-item .title {
  font-weight: 800;
  line-height: 1.25;
}
.list-item .sub {
  font-size: 0.875rem;
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}
.list-item .chev {
  color: var(--text-2);
  width: 1.15rem;
  height: 1.15rem;
}
.lead-ic {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: 0.8rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.lead-ic .ic {
  width: 1.3rem;
  height: 1.3rem;
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 1rem;
  font-size: 0.9375rem;
}
.kv dt {
  color: var(--text-2);
}
.kv dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

/* Estado de denuncia */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem 0.22rem;
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  flex: none;
}
.pill::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}
.pill.info {
  color: #9eeff7;
  background: rgba(54, 214, 231, 0.14);
  box-shadow: inset 0 0 0 1px rgba(54, 214, 231, 0.3);
}
.pill.violet {
  color: #cdc1ff;
  background: rgba(124, 92, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.42);
}
.pill.ok {
  color: #8ff3ca;
  background: rgba(52, 227, 160, 0.13);
  box-shadow: inset 0 0 0 1px rgba(52, 227, 160, 0.32);
}
.pill.muted {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.pill.changed {
  animation: pill-pop 0.6s var(--ease-spring);
}
@keyframes pill-pop {
  40% {
    transform: scale(1.12);
  }
}

/* Última denuncia en Inicio */
.last-report {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
}
.last-report .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.last-report .code {
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--text-2);
}
.last-report .reason {
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.25;
}
.mini-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}
.mini-steps span {
  height: 0.3rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  position: relative;
}
.mini-steps span.on::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transform-origin: left;
  animation: grow-x 0.8s var(--ease-out) both;
}
.mini-steps span.on:nth-child(2)::after {
  animation-delay: 0.15s;
}
.mini-steps span.on:nth-child(3)::after {
  animation-delay: 0.3s;
}
@keyframes grow-x {
  from {
    transform: scaleX(0);
  }
}

.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 1.75rem 1.25rem;
  border-radius: var(--r-lg);
}
.empty .ic {
  width: 2rem;
  height: 2rem;
  color: var(--text-2);
}
.empty p {
  color: var(--text-2);
  max-width: 26ch;
}

.note {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: var(--r);
  font-size: 0.875rem;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.note .ic {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.05rem;
  color: var(--text);
}
.note strong {
  color: var(--text);
}
.note.sim {
  color: var(--text);
  background: rgba(255, 181, 71, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 181, 71, 0.3);
}
.note.sim .ic {
  color: var(--amber);
}

/* ==========================================================================
   Formularios
   ========================================================================== */

.form {
  display: grid;
  gap: 1.05rem;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field > label,
.field > .label,
fieldset > legend {
  font-weight: 700;
  font-size: 0.9375rem;
}
.field .opt {
  font-weight: 600;
  color: var(--text-2);
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
fieldset > legend {
  padding: 0;
  margin-bottom: 0.45rem;
}
.input {
  width: 100%;
  min-height: 3.125rem;
  padding: 0.8rem 0.95rem 0.7rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(242, 246, 255, 0.2);
  background: rgba(3, 12, 30, 0.42);
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder {
  color: rgba(242, 246, 255, 0.45);
  font-weight: 400;
}
.input:hover {
  border-color: rgba(242, 246, 255, 0.32);
}
.input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(54, 214, 231, 0.28);
  background: rgba(3, 12, 30, 0.55);
}
.input[aria-invalid='true'] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(255, 166, 204, 0.18);
}
textarea.input {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.4;
}
.input.tnum {
  letter-spacing: 0.02em;
}
.hint {
  font-size: 0.8125rem;
  color: var(--text-2);
}
.error-msg {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}
.error-msg .ic {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
}
.error-msg:empty {
  display: none;
}
.counter {
  justify-self: end;
  font-size: 0.75rem;
  color: var(--text-2);
}

/* Selector segmentado */
.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 1.05rem;
  background: rgba(3, 12, 30, 0.42);
  box-shadow: inset 0 0 0 1px rgba(242, 246, 255, 0.14);
}
.seg label {
  position: relative;
  display: block;
}
.seg input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.seg span {
  display: grid;
  place-items: center;
  gap: 0.15rem;
  min-height: 3.25rem;
  padding: 0.45rem 0.25rem 0.35rem;
  border-radius: 0.8rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.15;
  color: var(--text-2);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg span .ic {
  width: 1.15rem;
  height: 1.15rem;
}
.seg input:checked + span {
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(54, 214, 231, 0.55);
}
.seg input:focus-visible + span {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

/* Interruptor */
.switch-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
}
.switch-row .grow {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}
.switch-row .grow b {
  font-weight: 800;
}
.switch-row .grow small {
  font-size: 0.8125rem;
  color: var(--text-2);
}
.switch {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: none;
  width: 3.25rem;
  height: 2rem;
  margin: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: background-color 0.25s;
}
.switch::before {
  content: '';
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #dfe6f5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.28s var(--ease-spring);
}
.switch:checked {
  background: linear-gradient(180deg, #5fe4f0, #27b8d0);
}
.switch:checked::before {
  transform: translateX(1.25rem);
}
.switch:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem 0.4rem;
  border: 0;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease-spring);
}
.chip .ic {
  width: 1rem;
  height: 1rem;
  display: none;
}
.chip[aria-pressed='true'] {
  background: rgba(54, 214, 231, 0.16);
  box-shadow: inset 0 0 0 1.5px rgba(54, 214, 231, 0.75);
}
.chip[aria-pressed='true'] .ic {
  display: block;
  color: var(--cyan);
}
.chip:active {
  transform: scale(0.96);
}

/* Estrellas */
.stars {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  padding: 0;
  margin: 0;
}
.stars input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.stars label {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  cursor: pointer;
  color: rgba(242, 246, 255, 0.32);
  transition: color 0.2s;
}
.stars label .ic {
  width: 2.35rem;
  height: 2.35rem;
  stroke-width: 1.6;
  transition: transform 0.2s;
}
.stars label.on {
  color: var(--amber);
}
.stars label.on .ic {
  fill: var(--amber);
  filter: drop-shadow(0 0 8px rgba(255, 181, 71, 0.55));
}
.stars label.pop .ic {
  animation: star-pop 0.5s var(--ease-spring) both;
}
@keyframes star-pop {
  0% {
    transform: scale(0.6);
  }
  55% {
    transform: scale(1.25) rotate(-8deg);
  }
  100% {
    transform: scale(1);
  }
}
.stars input:focus-visible + label {
  outline: 3px solid var(--cyan);
  outline-offset: 0;
}
.stars-caption {
  text-align: center;
  font-weight: 700;
  min-height: 1.5em;
  color: var(--text-2);
}
.stars-static {
  display: inline-flex;
  gap: 0.1rem;
  color: var(--amber);
  align-items: center;
}
.stars-static .ic {
  width: 0.95rem;
  height: 0.95rem;
}
.stars-static .ic.f {
  fill: var(--amber);
}
.stars-static .ic.e {
  color: rgba(242, 246, 255, 0.28);
}

/* Motivos de reporte */
.reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.reason {
  position: relative;
  display: block;
}
.reason input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.reason .r-box {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  height: 100%;
  min-height: 6.25rem;
  padding: 0.85rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.2;
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease-spring);
}
.reason .r-ic {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
}
.reason .r-ic .ic {
  width: 1.25rem;
  height: 1.25rem;
}
.reason input:checked + .r-box {
  background: rgba(124, 92, 255, 0.2);
  box-shadow: inset 0 0 0 2px rgba(160, 140, 255, 0.85), 0 6px 18px rgba(124, 92, 255, 0.25);
  transform: translateY(-1px);
}
.reason input:checked + .r-box .r-ic {
  background: rgba(160, 140, 255, 0.3);
}
.reason input:focus-visible + .r-box {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

/* Viaje detectado */
.detected {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: var(--r-lg);
}
.detected .d-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.detected .d-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #8ff3ca;
  font-weight: 800;
  font-size: 0.875rem;
}
.detected .d-badge .ic {
  width: 1rem;
  height: 1rem;
}
.detected .d-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.detected .d-meta {
  display: grid;
  gap: 0.3rem;
  font-size: 0.875rem;
  color: var(--text-2);
}
.detected .d-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.detected .d-meta .ic {
  width: 1rem;
  height: 1rem;
}

/* ==========================================================================
   Línea de tiempo
   ========================================================================== */

.timeline {
  --fill: 0;
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0 0;
  display: grid;
  gap: 1.35rem;
}
.timeline::before,
.timeline .tl-fill {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: var(--tl-top, 1.15rem);
  height: var(--tl-h, calc(100% - 4rem));
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
}
.timeline .tl-fill {
  background: linear-gradient(180deg, var(--cyan), var(--green));
  box-shadow: 0 0 10px rgba(54, 214, 231, 0.5);
  transform-origin: top;
  transform: scaleY(var(--fill));
  transition: transform 1.1s var(--ease-out);
}
.tl-step {
  position: relative;
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  gap: 0.85rem;
  align-items: start;
}
.tl-node {
  position: relative;
  z-index: 1;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--night-2);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
  transition: background-color 0.3s, box-shadow 0.3s;
}
.tl-node .ic {
  width: 0.95rem;
  height: 0.95rem;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s, transform 0.4s var(--ease-spring);
}
.tl-step.done .tl-node {
  background: linear-gradient(180deg, #5fe9f5, #2bc6d8);
  box-shadow: 0 0 12px rgba(54, 214, 231, 0.5);
  color: #04192b;
}
.tl-step.done.final .tl-node {
  background: linear-gradient(180deg, #6ff0bf, #22c98a);
  box-shadow: 0 0 14px rgba(52, 227, 160, 0.55);
}
.tl-step.done .tl-node .ic {
  opacity: 1;
  transform: none;
}
.tl-step.current .tl-node {
  box-shadow: inset 0 0 0 2px var(--cyan), 0 0 0 0 rgba(54, 214, 231, 0.6);
  animation: node-pulse 1.8s ease-out infinite;
}
@keyframes node-pulse {
  70%,
  100% {
    box-shadow: inset 0 0 0 2px var(--cyan), 0 0 0 0.6rem rgba(54, 214, 231, 0);
  }
}
.tl-body {
  display: grid;
  gap: 0.2rem;
  padding-top: 0.15rem;
}
.tl-body b {
  font-weight: 800;
}
.tl-body p {
  font-size: 0.9375rem;
  color: var(--text-2);
}
.tl-step:not(.done) .tl-body b {
  color: var(--text-2);
}
.tl-body time {
  font-size: 0.8125rem;
  color: var(--text-2);
  font-weight: 600;
}
.tl-step.done.final .tl-body p {
  color: var(--text);
}

/* ==========================================================================
   Animaciones de respuesta
   ========================================================================== */

/* Check que se dibuja solo */
.draw-check {
  width: 4.5rem;
  height: 4.5rem;
}
.draw-check circle,
.draw-check path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.draw-check .dc-ring {
  stroke: rgba(52, 227, 160, 0.9);
  stroke-width: 2.5;
  animation: draw 0.6s var(--ease-out) 0.05s forwards;
}
.draw-check .dc-tick {
  stroke: var(--green);
  stroke-width: 4;
  animation: draw 0.45s var(--ease-out) 0.5s forwards;
  filter: drop-shadow(0 0 6px rgba(52, 227, 160, 0.6));
}
.draw-check.sm {
  width: 1.5rem;
  height: 1.5rem;
}
.draw-check.sm .dc-tick {
  stroke-width: 5;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.success {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.75rem 1.25rem 1.5rem;
  border-radius: var(--r-lg);
}
.success .draw-check {
  width: 5rem;
  height: 5rem;
  margin-bottom: 0.25rem;
}
.success h1 {
  font-size: 1.6rem;
}
.success p {
  color: var(--text-2);
}
.tracking {
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  padding: 0.35rem 0.9rem 0.15rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.rise {
  animation: rise 0.55s var(--ease-out) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.d1 {
  animation-delay: 0.08s;
}
.d2 {
  animation-delay: 0.16s;
}
.d3 {
  animation-delay: 0.24s;
}
.d4 {
  animation-delay: 0.32s;
}
.d5 {
  animation-delay: 0.4s;
}

/* Ondas NFC */
.nfc-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: 17rem;
  margin: 0.5rem 0;
}
.nfc-wave {
  position: absolute;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  border: 2px solid rgba(54, 214, 231, 0.75);
  box-shadow: 0 0 18px rgba(54, 214, 231, 0.35), inset 0 0 18px rgba(54, 214, 231, 0.25);
  opacity: 0;
  animation: nfc 2.4s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
}
.nfc-wave:nth-child(2) {
  animation-delay: 0.8s;
}
.nfc-wave:nth-child(3) {
  animation-delay: 1.6s;
}
@keyframes nfc {
  0% {
    opacity: 0;
    transform: scale(0.55);
  }
  15% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}
.nfc-stage.fast .nfc-wave {
  animation-duration: 1.1s;
}
.nfc-stage.fast .nfc-wave:nth-child(2) {
  animation-delay: 0.36s;
}
.nfc-stage.fast .nfc-wave:nth-child(3) {
  animation-delay: 0.72s;
}
.nfc-stage.ok .nfc-wave {
  border-color: rgba(52, 227, 160, 0.8);
  box-shadow: 0 0 18px rgba(52, 227, 160, 0.4);
  animation-iteration-count: 1;
}
.nfc-phone {
  position: relative;
  z-index: 1;
  width: 6.75rem;
  height: 11.5rem;
  border-radius: 1.4rem;
  display: grid;
  place-items: center;
  animation: phone-bob 3.2s ease-in-out infinite;
}
.nfc-phone .ic {
  width: 2.6rem;
  height: 2.6rem;
  color: var(--cyan);
}
.nfc-stage.ok .nfc-phone {
  animation: none;
}
.nfc-stage.ok .nfc-phone .ic {
  display: none;
}
.nfc-phone .draw-check {
  width: 3.75rem;
  height: 3.75rem;
}
@keyframes phone-bob {
  50% {
    transform: translateY(-6px) rotate(-2deg);
  }
}
.nfc-status {
  text-align: center;
  font-weight: 800;
  font-size: 1.25rem;
  min-height: 1.6em;
}
.nfc-status.ok {
  color: #8ff3ca;
}
.steps-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}
.steps-dots i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background-color 0.3s, width 0.3s;
}
.steps-dots i.on {
  width: 1.4rem;
  border-radius: 99px;
  background: var(--cyan);
}
.steps-dots i.ok {
  background: var(--green);
}

/* Vinculación del pase */
.link-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  background: rgba(4, 12, 28, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  animation: in-fade 0.3s ease both;
}
.link-box {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 21rem;
  text-align: center;
}
.link-box .pass {
  animation: link-float 1.6s var(--ease-out) both;
}
@keyframes link-float {
  from {
    opacity: 0;
    transform: translateY(40px) rotate(-6deg) scale(0.92);
  }
}
.link-bar {
  width: 100%;
  height: 0.4rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.link-bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform-origin: left;
  transform: scaleX(0);
  animation: link-progress 2.2s var(--ease-out) forwards;
}
@keyframes link-progress {
  to {
    transform: scaleX(1);
  }
}

/* ==========================================================================
   Toasts de vidrio
   ========================================================================== */

.toasts {
  position: absolute;
  z-index: 80;
  top: calc(var(--safe-t) + 0.6rem);
  left: calc(0.75rem + var(--safe-l));
  right: calc(0.75rem + var(--safe-r));
  display: grid;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.75rem 0.9rem;
  border: 0;
  border-radius: 1.15rem;
  text-align: left;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07)), rgba(10, 26, 56, 0.72);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 14px 32px rgba(1, 6, 18, 0.5);
  animation: toast-in 0.55s var(--ease-spring) both;
}
.toast.out {
  animation: toast-out 0.3s ease forwards;
}
.toast .t-ic {
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
}
.toast .t-ic .ic {
  width: 1.1rem;
  height: 1.1rem;
}
.toast.ok .t-ic {
  color: var(--green);
  background: rgba(52, 227, 160, 0.14);
}
.toast.info .t-ic {
  color: var(--cyan);
  background: rgba(54, 214, 231, 0.14);
}
.toast.warn .t-ic {
  color: var(--amber);
  background: rgba(255, 181, 71, 0.14);
}
.toast.sos .t-ic {
  color: #fff;
  background: var(--red-deep);
}
.toast b {
  font-weight: 800;
}
.toast .t-body {
  flex: 1;
  min-width: 0;
}
.toast .t-close {
  color: var(--text-2);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-120%) scale(0.96);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-60%) scale(0.97);
  }
}
button.toast {
  cursor: pointer;
}

/* ==========================================================================
   Diálogos
   ========================================================================== */

.modal {
  width: min(calc(100vw - 2rem), 24rem);
  max-height: calc(100dvh - 2rem);
  padding: 1.35rem;
  border: 0;
  border-radius: 1.6rem;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)), rgba(10, 26, 56, 0.82);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 30px 70px rgba(0, 0, 0, 0.6);
  overflow: auto;
}
.modal::backdrop {
  background: rgba(2, 8, 20, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal[open] {
  animation: modal-in 0.35s var(--ease-spring) both;
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
}
.modal h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.modal p {
  color: var(--text-2);
}
.modal .btn-row {
  margin-top: 1.25rem;
}
.modal.sheet {
  margin: auto auto max(1rem, env(safe-area-inset-bottom));
  width: min(calc(100vw - 1.5rem), 26rem);
}
.sheet-list {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.sheet-opt {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  min-height: 3.5rem;
  border-radius: 1rem;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  text-align: left;
  width: 100%;
}
.sheet-opt[aria-checked='true'] {
  background: rgba(54, 214, 231, 0.14);
  box-shadow: inset 0 0 0 1.5px rgba(54, 214, 231, 0.7);
}
.sheet-opt .grow {
  flex: 1;
  min-width: 0;
  display: grid;
}
.sheet-opt small {
  color: var(--text-2);
  font-size: 0.8125rem;
}

/* ==========================================================================
   Bienvenida
   ========================================================================== */

.device.bare .screen {
  padding: 0;
}
.welcome {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: calc(1.75rem) calc(1.25rem + var(--safe-r)) calc(1rem) calc(1.25rem + var(--safe-l));
  overflow: hidden;
}
.hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58%;
  width: 100%;
  pointer-events: none;
  z-index: 0;
}
.hills .hill {
  animation: hill-rise 1.4s var(--ease-out) both;
}
.hills .hill.h2 {
  animation-delay: 0.12s;
}
.hills .hill.h3 {
  animation-delay: 0.24s;
}
@keyframes hill-rise {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
.hills .win {
  opacity: 0;
  animation: win-on 0.5s ease forwards, win-flicker 6s ease-in-out infinite;
  animation-delay: var(--d, 1s), calc(var(--d, 1s) + 1s);
}
@keyframes win-on {
  60% {
    opacity: 1;
  }
  to {
    opacity: var(--o, 0.85);
  }
}
@keyframes win-flicker {
  0%,
  100% {
    opacity: var(--o, 0.85);
  }
  50% {
    opacity: calc(var(--o, 0.85) * 0.55);
  }
}
.welcome-top {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.75rem;
  animation: rise 0.8s var(--ease-out) 0.2s both;
}
.welcome-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.welcome-brand .brand-mark {
  width: 2.75rem;
  height: 2.75rem;
}
.welcome h1 {
  font-size: 2.6rem;
  letter-spacing: -0.02em;
}
.welcome .tagline {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 19ch;
}
.welcome-card {
  position: relative;
  z-index: 1;
  margin: 0 auto auto;
  padding: 2.25rem 0 2rem;
  width: 86%;
  max-width: 20rem;
  animation: card-float-in 1.5s var(--ease-out) 0.55s both;
}
.welcome-card .pass {
  transform: rotate(-4deg);
  animation: card-idle 6s ease-in-out 2.1s infinite;
}
@keyframes card-float-in {
  from {
    opacity: 0;
    transform: translateY(70px) rotate(8deg) scale(0.9);
  }
}
@keyframes card-idle {
  50% {
    transform: rotate(-3deg) translateY(-6px);
  }
}
.welcome-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 1.6rem;
  animation: rise 0.8s var(--ease-out) 1.1s both;
}
.welcome-actions .btn {
  width: 100%;
}
.welcome-legal {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-2);
  margin-top: 0.85rem;
  animation: rise 0.8s var(--ease-out) 1.3s both;
}
.welcome-legal a {
  font-weight: 800;
  color: var(--text);
}
.qr-banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-top: 1.25rem;
  border-radius: 1.1rem;
  font-size: 0.9375rem;
}
.qr-banner .ic {
  color: var(--cyan);
}

/* ==========================================================================
   Inicio
   ========================================================================== */

.hello {
  display: grid;
  gap: 0.15rem;
}
.hello p {
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.9375rem;
  text-transform: none;
}
.hello h1 {
  font-size: 1.9rem;
}

/* ==========================================================================
   Viaje validado
   ========================================================================== */

.validated-hero {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  text-align: center;
  padding-top: 0.5rem;
}
.fare-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: var(--r-lg);
}
.fare-card .amount {
  font-weight: 900;
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.bus-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--r-lg);
}
.bus-card .b-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.driver-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem;
  border-radius: var(--r-lg);
}
.avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(140deg, rgba(54, 214, 231, 0.45), rgba(124, 92, 255, 0.55));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.avatar.lg {
  width: 4.25rem;
  height: 4.25rem;
  font-size: 1.4rem;
}
.cert {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #8ff3ca;
}
.cert span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.cert .ic {
  width: 0.95rem;
  height: 0.95rem;
}

/* Puntos para el conductor */
.points {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1.75rem 1.25rem;
  border-radius: var(--r-lg);
}
.points h1 {
  font-size: 1.35rem;
}
.points .big {
  font-weight: 900;
  font-size: 3.25rem;
  line-height: 1;
  color: var(--amber);
  text-shadow: 0 0 20px rgba(255, 181, 71, 0.45);
  font-variant-numeric: tabular-nums;
  animation: points-pop 0.7s var(--ease-spring) 0.2s both;
}
@keyframes points-pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

/* ==========================================================================
   SOS
   ========================================================================== */

.sos-stage {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 1.5rem 0 0.5rem;
}
.sos-hint {
  font-weight: 800;
  font-size: 1.125rem;
  text-align: center;
  min-height: 1.5em;
}
.sos-sub {
  text-align: center;
  color: var(--text-2);
  max-width: 30ch;
  font-size: 0.9375rem;
  min-height: 2.8em;
}
.sos-what {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  border-radius: var(--r-lg);
}
.sos-what ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
  counter-reset: s;
}
.sos-what li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.9375rem;
  counter-increment: s;
}
.sos-what li::before {
  content: counter(s);
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.alert-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.alert-head .draw-check {
  width: 3.25rem;
  height: 3.25rem;
  flex: none;
}
.alert-head h1 {
  font-size: 1.6rem;
}
.alert-head p {
  color: var(--text-2);
  font-size: 0.9375rem;
}

.map {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  padding: 0;
}
.map svg {
  width: 100%;
  height: auto;
}
.map .route {
  stroke-dasharray: 6 8;
  animation: route-dash 1.4s linear infinite;
}
@keyframes route-dash {
  to {
    stroke-dashoffset: -28;
  }
}
.map .pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: map-pulse 1.8s ease-out infinite;
}
.map .pulse.p2 {
  animation-delay: 0.9s;
}
@keyframes map-pulse {
  0% {
    transform: scale(0.4);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}
.map-cap {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.9rem;
  font-size: 0.875rem;
  font-weight: 700;
  background: rgba(6, 20, 42, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.map-cap .live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.map-cap .live::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.protocol {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--r-lg);
}
.protocol ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.protocol li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  min-height: 2rem;
  color: var(--text-2);
  transition: color 0.3s;
}
.protocol li .slot {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.protocol li .slot .spin {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--text);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.protocol li.done {
  color: var(--text);
}
.protocol li.done .slot {
  box-shadow: none;
}
.protocol li.done .slot .draw-check {
  width: 1.75rem;
  height: 1.75rem;
}
.protocol li.done .slot .draw-check .dc-ring {
  animation-duration: 0.35s;
}
.protocol li.done .slot .draw-check .dc-tick {
  animation-delay: 0.2s;
  stroke-width: 5;
}

.dock {
  position: absolute;
  z-index: 29;
  left: calc(0.75rem + var(--safe-l));
  right: calc(0.75rem + var(--safe-r));
  bottom: calc(var(--safe-b) + var(--tabbar-h) + 2.4rem);
  view-transition-name: dock;
}
.dock[hidden] {
  display: none;
}
.dock .btn {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 30px rgba(255, 71, 87, 0.45), 0 0 0 6px rgba(6, 20, 42, 0.35);
}
.device.has-dock .view {
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 7rem);
}

/* ==========================================================================
   Viajes
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0.9rem 0.5rem;
  border-radius: var(--r-lg);
}
.stats div {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  text-align: center;
  padding: 0 0.25rem;
}
.stats div + div {
  box-shadow: -1px 0 0 var(--line);
}
.stats b {
  font-weight: 900;
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
}
.stats span {
  font-size: 0.8125rem;
  color: var(--text-2);
  line-height: 1.2;
}
.trip-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
}
.trip-row .when {
  display: grid;
  justify-items: center;
  width: 2.9rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.trip-row .when b {
  font-size: 1.15rem;
  font-weight: 900;
}
.trip-row .when small {
  font-size: 0.75rem;
  color: var(--text-2);
  font-weight: 700;
}
.trip-row .end {
  display: grid;
  justify-items: end;
  gap: 0.25rem;
  font-variant-numeric: tabular-nums;
}
.trip-row .end b {
  font-weight: 800;
}
.month-label {
  font-weight: 800;
  font-size: 0.9375rem;
  color: var(--text-2);
  margin: 0.5rem 0.25rem -0.2rem;
}
.month-label::first-letter {
  text-transform: uppercase;
}

/* ==========================================================================
   Perfil
   ========================================================================== */

.profile-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: var(--r-lg);
}
.profile-head .grow {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}
.profile-head h1 {
  font-size: 1.35rem;
}
.about {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--r-lg);
  font-size: 0.9375rem;
}
.about p {
  color: var(--text-2);
}
.about ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.about li {
  padding: 0.3rem 0.65rem 0.2rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-weight: 700;
  font-size: 0.875rem;
}
.version {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-2);
}

/* ==========================================================================
   Texto grande y pantallas estrechas
   ========================================================================== */

html.lg .reasons {
  grid-template-columns: 1fr;
}
html.lg .reason .r-box {
  min-height: 0;
  grid-template-columns: auto 1fr;
  align-items: center;
}
html.lg .quick {
  grid-template-columns: 1fr;
}
html.lg .quick-btn {
  min-height: 0;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
}
html.lg .tab {
  font-size: 0.625rem;
}
html.lg .welcome h1 {
  font-size: 2.3rem;
}
html.lg .orb-big {
  --size: 11.5rem;
}
html.lg .pass-name {
  font-size: 1.15rem;
}
html.lg .pass {
  aspect-ratio: 1.5;
  max-height: none;
}
html.lg .stats b {
  font-size: 1.2rem;
}
html.lg .kv {
  grid-template-columns: 1fr;
  gap: 0.1rem;
}
html.lg .kv dd {
  text-align: left;
  margin-bottom: 0.55rem;
}
html.lg .seg {
  grid-template-columns: 1fr;
}
html.lg .seg span {
  grid-auto-flow: column;
  justify-content: start;
  gap: 0.6rem;
  padding-left: 0.9rem;
  min-height: 2.9rem;
  font-size: 0.9375rem;
}

@media (max-width: 359px) {
  .reasons {
    grid-template-columns: 1fr;
  }
  .quick {
    grid-template-columns: 1fr;
  }
  .welcome h1 {
    font-size: 2.2rem;
  }
}

/* ==========================================================================
   Reducir movimiento (preferencia del sistema o interruptor en Perfil)
   ========================================================================== */

html.rm *,
html.rm *::before,
html.rm *::after {
  animation-duration: 0.001ms !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
html.rm .blob,
html.rm .pass::after,
html.rm .orb-wave,
html.rm .orb-big::after,
html.rm .live-dot::before,
html.rm .map .route,
html.rm .map .pulse,
html.rm .map-cap .live::before,
html.rm .nfc-phone,
html.rm .welcome-card .pass,
html.rm .tl-step.current .tl-node,
html.rm .hills .win {
  animation: none !important;
}
html.rm .hills .win {
  opacity: var(--o, 0.85);
}
html.rm .nfc-wave {
  animation: none !important;
  opacity: 0.35;
  transform: scale(calc(0.8 + var(--i, 0) * 0.35));
}
html.rm .map .pulse {
  opacity: 0.35;
}
html.rm ::view-transition-group(*),
html.rm ::view-transition-old(*),
html.rm ::view-transition-new(*) {
  animation: none !important;
}

@media (forced-colors: active) {
  .glass,
  .btn,
  .tabbar,
  .toast,
  .modal {
    border: 1px solid CanvasText;
  }
}

noscript p {
  position: fixed;
  inset: auto 1rem 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--night-3);
  color: var(--text);
  z-index: 100;
}

/* ==========================================================================
   v1.1 — Celular con prefijo, modo "en viaje", asistente, iniciación y arranque
   ========================================================================== */

/* Celular con +56 9 fijo */
.phone-input {
  position: relative;
  display: flex;
  align-items: center;
}
.phone-input .prefix {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-48%);
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  padding-right: 0.6rem;
  border-right: 1px solid rgba(242, 246, 255, 0.25);
  line-height: 1.6;
}
.phone-input .input {
  padding-left: 4.6rem;
  letter-spacing: 0.04em;
}

/* --- Viaje activo --- */
.device.traveling .scene::before {
  content: '';
  position: absolute;
  inset: -10% -10% auto;
  height: 55%;
  background: radial-gradient(60% 60% at 50% 0%, rgba(52, 227, 160, 0.2), transparent 70%);
  animation: travel-aura 5s ease-in-out infinite;
}
@keyframes travel-aura {
  50% {
    opacity: 0.55;
  }
}
.hello.compact h1 {
  font-size: 1.5rem;
}

.trip-hero {
  display: grid;
  gap: 0.95rem;
  padding: 1.1rem;
  border-radius: 1.6rem;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(52, 227, 160, 0.2), transparent 55%),
    radial-gradient(90% 90% at 100% 100%, rgba(255, 181, 71, 0.12), transparent 60%),
    var(--glass-fill-strong);
  animation: rise 0.55s var(--ease-out) both, trip-glow 3.2s ease-in-out 0.6s infinite;
}
@keyframes trip-glow {
  0%,
  100% {
    box-shadow: var(--glass-shadow), 0 0 0 1.5px rgba(52, 227, 160, 0.45), 0 0 22px rgba(52, 227, 160, 0.18);
  }
  50% {
    box-shadow: var(--glass-shadow), 0 0 0 1.5px rgba(52, 227, 160, 0.8), 0 0 36px rgba(52, 227, 160, 0.35);
  }
}
.th-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.th-top .live-dot {
  font-size: 0.9375rem;
}
.th-timer {
  font-weight: 900;
  font-size: 1.25rem;
  color: #8ff3ca;
  font-variant-numeric: tabular-nums;
}
.th-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.th-info {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  justify-items: start;
}
.th-track {
  position: relative;
  display: flex;
  align-items: center;
  height: 2.2rem;
  padding: 0 0.2rem;
}
.th-line {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.th-line i {
  display: block;
  height: 100%;
  width: 100%;
  background: repeating-linear-gradient(90deg, var(--green) 0 10px, transparent 10px 18px);
  animation: road 0.9s linear infinite;
  opacity: 0.85;
}
@keyframes road {
  to {
    transform: translateX(18px);
  }
}
.th-stop {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 2px var(--green);
}
.th-stop.b {
  background: var(--green);
}
.th-bus {
  position: absolute;
  top: 50%;
  left: 0;
  width: 2.2rem;
  height: 2.2rem;
  margin-top: -1.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #04192b;
  background: linear-gradient(180deg, #8ff3ca, var(--green));
  box-shadow: 0 0 0 4px rgba(52, 227, 160, 0.22), 0 4px 14px rgba(52, 227, 160, 0.45);
  animation: bus-go 9s ease-in-out infinite;
}
.th-bus .ic {
  width: 1.2rem;
  height: 1.2rem;
}
@keyframes bus-go {
  0% {
    left: 2%;
  }
  85%,
  100% {
    left: calc(98% - 2.2rem);
  }
}
.th-driver {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #8ff3ca;
}
.th-driver .ic {
  width: 1rem;
  height: 1rem;
}
.th-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.th-actions .btn {
  min-height: 2.9rem;
  font-size: 0.9375rem;
}

.pass-mini,
.ask-via {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text);
}
.pass-mini .grow,
.ask-via .grow {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}
.pass-mini b {
  color: #8ff3ca;
}
.pass-mini .chev,
.ask-via .chev {
  color: var(--text-2);
  width: 1.2rem;
  height: 1.2rem;
}
.ask-via {
  background:
    radial-gradient(80% 120% at 0% 50%, rgba(124, 92, 255, 0.25), transparent 70%),
    var(--glass-fill);
}

.tripbar {
  position: absolute;
  z-index: 29;
  left: calc(0.75rem + var(--safe-l));
  right: calc(0.75rem + var(--safe-r));
  bottom: calc(var(--safe-b) + var(--tabbar-h) + 2.5rem);
  view-transition-name: tripbar;
  animation: rise 0.4s var(--ease-out) both;
}
.tripbar[hidden] {
  display: none;
}
.tripbar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.45rem 0.8rem 0.4rem 0.95rem;
  border-radius: 1.1rem;
  text-decoration: none;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(52, 227, 160, 0.22), rgba(52, 227, 160, 0.06)),
    rgba(8, 26, 46, 0.78);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1.5px rgba(52, 227, 160, 0.55), 0 10px 26px rgba(1, 6, 18, 0.45);
}
.tripbar .tb-bus {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tripbar .line-sign {
  font-size: 0.875rem;
}
.tripbar .plate {
  font-size: 0.75rem;
}
.tripbar .tb-time {
  margin-left: auto;
  font-weight: 900;
  color: #8ff3ca;
}
.tripbar .chev {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--text-2);
}
.device.has-tripbar .view {
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 6.5rem);
}

.autoreturn {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-radius: var(--r);
  font-size: 0.9375rem;
  font-weight: 600;
}
.ar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 0.75rem;
}
.ar-bar {
  height: 0.3rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.ar-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transform-origin: left;
  animation: ar 4.5s linear both;
}
@keyframes ar {
  from {
    transform: scaleX(0);
  }
}

/* --- Asistente Vía --- */
.via-avatar {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--cyan), var(--violet) 70%, var(--bougain));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 14px rgba(124, 92, 255, 0.4);
}
.via-avatar .ic {
  width: 55%;
  height: 55%;
}
.via-avatar.sm {
  width: 1.9rem;
  height: 1.9rem;
}
.via-avatar.lg {
  width: 3.25rem;
  height: 3.25rem;
}
.via-btn {
  color: #d9d0ff;
}
.via-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.via-head h1 {
  font-size: 1.5rem;
}
.chat {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}
.msg {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}
.msg.in {
  animation: rise 0.35s var(--ease-out) both;
}
.msg.me {
  justify-content: flex-end;
}
.msg .bubble {
  max-width: 85%;
  padding: 0.7rem 0.9rem;
  border-radius: 1.15rem;
  font-size: 0.9375rem;
  line-height: 1.4;
}
.msg.bot .bubble {
  border-bottom-left-radius: 0.35rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)), rgba(9, 24, 52, 0.5);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.msg.me .bubble {
  border-bottom-right-radius: 0.35rem;
  color: #04192b;
  font-weight: 700;
  background: linear-gradient(180deg, #8eeef7, #4fd9e9);
}
.msg.bot.urgent .bubble {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1.5px rgba(255, 71, 87, 0.75), 0 0 24px rgba(255, 71, 87, 0.25);
}
.msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}
.msg-chips {
  margin-top: 0.7rem;
}
.msg-chips .chip {
  min-height: 2.75rem;
  font-size: 0.875rem;
  text-align: left;
}
.btn-sm {
  min-height: 2.75rem;
  padding: 0.45rem 0.9rem 0.35rem;
  font-size: 0.9375rem;
  border-radius: 0.85rem;
}
.btn-sm .ic {
  width: 1.05rem;
  height: 1.05rem;
}
.msg.typing .bubble {
  display: flex;
  gap: 0.3rem;
  padding: 0.85rem 1rem;
}
.msg.typing i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--text-2);
  animation: typing 1s ease-in-out infinite;
}
.msg.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.msg.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
.chat-reset {
  justify-self: center;
  align-self: center;
}
.composer {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.4rem;
  border-radius: 1.3rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)), rgba(8, 22, 48, 0.82);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 12px 30px rgba(1, 6, 18, 0.5);
}
.composer .input {
  min-height: 2.9rem;
  border-radius: 1rem;
  background: rgba(3, 12, 30, 0.5);
}
.send-btn {
  flex: none;
  width: 2.9rem;
  height: 2.9rem;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #04192b;
  background: linear-gradient(180deg, #7ae9f4, var(--cyan));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 16px rgba(54, 214, 231, 0.35);
}
.send-btn .ic {
  width: 1.2rem;
  height: 1.2rem;
}

/* --- Iniciación --- */
.onboarding {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem calc(1.25rem + var(--safe-r)) 1.25rem calc(1.25rem + var(--safe-l));
  min-height: 100%;
}
.ob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.ob-skip {
  min-height: 2.75rem;
  padding: 0.4rem 1rem 0.3rem;
}
.ob-viewport {
  flex: 1;
  overflow: hidden;
  display: flex;
  touch-action: pan-y;
  margin: 0 -1.25rem;
}
.ob-track {
  display: flex;
  width: 100%;
  transition: transform 0.45s var(--ease-out);
}
.ob-slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  text-align: center;
}
.ob-slide h1 {
  font-size: 1.65rem;
}
.ob-slide p {
  color: var(--text-2);
  font-size: 1.0625rem;
  max-width: 30ch;
  margin: 0 auto;
}
.ob-art {
  display: grid;
  place-items: center;
  min-height: 15rem;
  margin-bottom: 0.75rem;
}
.ob-pass {
  width: 88%;
  max-width: 19rem;
  transform: rotate(-4deg);
}
.ob-report {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  padding: 1.1rem;
  border-radius: 1.4rem;
  width: 86%;
  max-width: 19rem;
  text-align: left;
}
.ob-report .d-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #8ff3ca;
  font-weight: 800;
  font-size: 0.875rem;
}
.ob-report .d-badge .ic,
.ob-anon .ic {
  width: 1rem;
  height: 1rem;
}
.ob-anon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-2);
}
.ob-orb .orb {
  --p: 0.62;
  --size: 10rem;
  pointer-events: none;
}
.ob-chat {
  display: grid;
  gap: 0.6rem;
  width: 88%;
  max-width: 19rem;
  text-align: left;
}
.ob-chat .bubble {
  max-width: 90%;
}
.ob-bottom {
  display: grid;
  gap: 1rem;
}
.ob-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}
.ob-dots i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  transition: width 0.3s var(--ease-out), background-color 0.3s;
}
.ob-dots i.on {
  width: 1.6rem;
  background: var(--cyan);
}

/* --- Arranque: micro cruzando la calle --- */
.splash {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.5rem;
  background:
    radial-gradient(80% 50% at 50% 30%, rgba(54, 214, 231, 0.18), transparent 70%),
    radial-gradient(70% 50% at 80% 80%, rgba(124, 92, 255, 0.22), transparent 70%),
    var(--night);
  transition: opacity 0.4s ease;
}
.splash.out {
  opacity: 0;
  pointer-events: none;
}
.splash-svg {
  width: 100%;
  max-width: 440px;
  height: auto;
}
.splash .sp-bus {
  animation: sp-drive 2.1s linear both;
}
/* Entra, frena en el centro (como en un paradero) y sigue su camino */
@keyframes sp-drive {
  0% {
    transform: translateX(-170px);
    animation-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);
  }
  48% {
    transform: translateX(120px);
    animation-timing-function: ease-in-out;
  }
  62% {
    transform: translateX(132px);
    animation-timing-function: cubic-bezier(0.55, 0, 0.8, 0.4);
  }
  100% {
    transform: translateX(440px);
  }
}
.splash .sp-bounce {
  animation: sp-bounce 0.28s ease-in-out infinite alternate;
}
@keyframes sp-bounce {
  to {
    transform: translateY(-1.5px);
  }
}
.splash .sp-wheel path {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 0.35s linear infinite;
}
.splash .sp-lane {
  animation: sp-lane 0.5s linear infinite;
}
@keyframes sp-lane {
  to {
    stroke-dashoffset: 36;
  }
}
.splash .sp-win {
  opacity: 0;
  animation: in-fade 0.3s ease forwards;
}
.splash .sp-win:nth-child(2n) {
  animation-delay: 0.25s;
}
.splash .sp-win:nth-child(3n) {
  animation-delay: 0.45s;
}
.splash-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 900;
  font-size: 1.6rem;
  animation: rise 0.6s var(--ease-out) 0.7s both;
}
.splash.still .sp-bus {
  animation: none;
  transform: translateX(130px);
}

/* Ajustes para texto grande */
html.lg .appbar .brand span {
  display: none;
}
html.lg .th-actions {
  grid-template-columns: 1fr;
}
html.lg .tripbar .plate {
  display: none;
}

html.rm .th-bus {
  animation: none !important;
  left: 40%;
}
html.rm .th-line i,
html.rm .trip-hero,
html.rm .device.traveling .scene::before,
html.rm .msg.typing i {
  animation: none !important;
}

.msg .tnum {
  white-space: nowrap;
}
