/* Colores de Fut Red: negro, blanco y el rojo del logo. Solo tema oscuro. */
:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #17171b;
  --text: #ffffff;
  --muted: #a1a1aa;
  --border: #2a2a31;
  --primary: #e8112d;          /* rojo Fut Red */
  --primary-pressed: #c10d25;
  --primary-ink: #ffffff;
  --primary-soft: rgb(232 17 45 / 0.15);
  --success: #22c55e;
  --success-soft: rgb(34 197 94 / 0.14);
  --warning: #f5b301;
  --warning-soft: rgb(245 179 1 / 0.14);
  --danger: #ff5a4f;           /* errores: algo más claro que el rojo de marca y siempre con ⚠️ */
  --danger-soft: rgb(255 90 79 / 0.12);
  --bubble-mine: #e8112d;
  --bubble-other: #24242a;
  --radius: 14px;
  --shadow: none;
  --nav-h: 64px;
  --primary-text: #ff5c70;     /* rojo para texto sobre fondo oscuro (se lee mejor que #e8112d) */
  --surface-2: #202026;
  --font-display: "Saira", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* El atributo hidden siempre oculta, aunque otra regla ponga display. */
[hidden] { display: none !important; }

html, body { margin: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--primary-text); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.45rem; letter-spacing: 0.01em; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  background: #000; color: var(--text); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; color: inherit; text-decoration: none; }
.brand img { height: 20px; width: auto; display: block; }
.link-btn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 4px 8px; }

.view {
  max-width: 560px; margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px);
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 12px;
}

.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 0.85rem; }

/* ---------- Inicio ---------- */
/* Arranque: logo mientras carga la sesión */
.boot { min-height: 70vh; display: grid; place-items: center; }
.boot img { width: min(200px, 60%); height: auto; animation: breathe 1.6s ease-in-out infinite; }

/* En la bienvenida y el arranque no hace falta la barra superior: el logo ya está en grande. */
body[data-route="inicio"].logged-out .topbar,
body[data-route="cargando"] .topbar { display: none; }

/* Bienvenida (sin sesión) */
.welcome {
  min-height: calc(100dvh - 40px);
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
  padding-top: env(safe-area-inset-top);
}
.welcome-brand { position: relative; text-align: center; padding-top: 12px; }
.welcome-glow {
  position: absolute; left: 50%; top: 45%; width: 260px; height: 260px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgb(232 17 45 / 0.35), transparent 65%);
  filter: blur(10px); pointer-events: none; animation: glow 4s ease-in-out infinite;
}
.welcome-logo { position: relative; display: block; width: min(250px, 72%); height: auto; margin: 0 auto 14px; }
.welcome h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* el nombre ya va en el logo */
.welcome-tagline {
  position: relative; margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 700;
  font-size: 1.25rem;
}
.welcome-tagline em { font-style: italic; color: var(--primary-text); }
.welcome-how { display: grid; gap: 16px; }

/* Selector "Soy jugador / Soy un club" con una pastilla que se desliza */
.segmented {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px;
}
.segmented button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  padding: 10px 8px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 0.92rem;
  color: var(--muted); transition: color 0.2s;
}
.segmented button.active { color: var(--primary-ink); }
.segmented-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 999px; background: var(--primary);
  transition: transform 0.28s cubic-bezier(.3, 1.3, .5, 1);
}
.segmented.right .segmented-thumb { transform: translateX(100%); }
.welcome-steps.swap li { animation: rise 0.32s cubic-bezier(.2, .8, .2, 1) both; }
.welcome-steps.swap li:nth-child(2) { animation-delay: 0.05s; }
.welcome-steps.swap li:nth-child(3) { animation-delay: 0.1s; }

/* "Cómo funciona": 3 pasos numerados unidos por una línea */
.welcome-steps {
  list-style: none; padding: 0; margin: 0; counter-reset: paso;
  display: grid; gap: 18px; position: relative;
}
.welcome-steps::before { /* línea vertical que une los números */
  content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px;
  background: linear-gradient(var(--primary), rgb(232 17 45 / 0.15));
}
.welcome-steps li {
  counter-increment: paso; position: relative;
  display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; align-items: center;
}
.welcome-steps li::before {
  content: counter(paso); grid-row: span 2; position: relative;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--primary); color: var(--text);
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1rem;
}
.welcome-steps li:first-child::before { background: var(--primary); }
.welcome-steps b { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.02rem; }
.welcome-steps span { color: var(--muted); font-size: 0.9rem; }
.welcome-actions { display: grid; gap: 10px; }
.welcome > p { margin: 0; }

.back-link {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px; padding: 4px 0;
  color: var(--muted); text-decoration: none; font-weight: 600;
}
.forgot { margin: -6px 0 12px; text-align: right; font-size: 0.88rem; }

/* Contraseña con botón para verla */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; background: none; cursor: pointer; font-size: 1.1rem; border-radius: 8px;
}

/* Interruptor (ajustes) */
.settings { padding: 12px 16px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.switch {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; margin: 0;
  width: 48px; height: 28px; border-radius: 999px; background: var(--border); cursor: pointer;
  transition: background 0.2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform 0.2s cubic-bezier(.3, 1.4, .5, 1);
}
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(20px); }

.role-cards { display: grid; gap: 12px; margin: 24px 0; }
.role-card {
  display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-decoration: none; color: var(--text);
}
.role-card { transition: transform 0.12s ease, border-color 0.15s; }
.role-card:active { border-color: var(--primary); transform: scale(0.98); }
.role-emoji { grid-row: span 2; font-size: 40px; text-align: center; }
.role-card small { color: var(--muted); }
button.role-card { width: 100%; font: inherit; text-align: left; cursor: pointer; }

/* ---------- Google ---------- */
.btn.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #1f1f1f; border: 1px solid #dadce0;
}
.btn.google-btn svg { flex: none; }
.btn.apple-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #000; border: 1px solid #fff;
}
.social-btns { display: grid; gap: 10px; }
.google-note { margin: 10px 0 0; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.85rem; margin: 4px 0 16px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Formularios ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  display: block; width: 100%; min-width: 0; max-width: 100%; margin: 0;
  font: inherit; font-size: 16px; /* 16px evita el zoom automático en iOS */
  line-height: 1.25; padding: 12px; border-radius: 10px;
  border: 1px solid var(--border); background-color: var(--bg); color: var(--text);
}
/* Todos los campos de una línea con la misma altura (input, fecha y desplegable). */
.field input, .field select { height: 48px; }
.field input[type="date"] { -webkit-appearance: none; appearance: none; text-align: left; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
/* Desplegables con la misma flecha en Android, iPhone y ordenador. */
.field select {
  -webkit-appearance: none; appearance: none; padding-right: 36px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent;
}
/* minmax(0, 1fr): las dos columnas miden siempre lo mismo y nunca se salen de la pantalla. */
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.row > .field { min-width: 0; }
.row .field > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; margin: 0; }

/* Casillas en forma de chip (días, horario, puntos fuertes). */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-hint { margin: 0 0 6px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: inline-block; padding: 8px 12px; border-radius: 999px; font-size: 0.9rem;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); user-select: none;
}
.chip span { transition: background 0.15s, border-color 0.15s, transform 0.12s; }
.chip:active span { transform: scale(0.94); }
.chip input:checked + span { animation: pop 0.22s ease; }
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Trayectoria por temporadas */
.tray-row { border: 1px solid var(--border); border-radius: 12px; padding: 12px 12px 6px; margin-bottom: 12px; }
#tray-add { margin-bottom: 16px; }
.tray-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-bottom: 8px; }
.tray-table th { text-align: left; font-size: 0.75rem; color: var(--muted); font-weight: 600; padding: 4px 6px 6px; }
.tray-table td { padding: 8px 6px; border-top: 1px solid var(--border); vertical-align: top; }
.tray-table th:nth-child(n+3), .tray-table td:nth-child(n+3) { text-align: right; white-space: nowrap; }

/* Progreso del perfil del jugador */
.progress-card p { margin: 8px 0 0; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.progress { height: 10px; border-radius: 999px; background: var(--primary-soft); overflow: hidden; }
.progress > div { height: 100%; border-radius: 999px; background: var(--primary); transition: width 0.4s; }

.info-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }

.section-title { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 8px 0 12px; }

.btn {
  display: block; width: 100%; padding: 14px; border: 0; border-radius: 12px;
  background: var(--primary); color: var(--primary-ink);
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; text-align: center; text-decoration: none;
}
.btn { transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s; }
.btn:active:not(:disabled) { background: var(--primary-pressed); transform: scale(0.97); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:active:not(:disabled) { background: var(--surface); }
.btn.google-btn:active:not(:disabled), .btn.apple-btn:active:not(:disabled) { background: #e8e8e8; }
.btn:disabled { opacity: 0.6; }
.btn.secondary { background: var(--primary-soft); color: var(--primary-text); }
.btn.secondary:active:not(:disabled) { background: rgb(232 17 45 / 0.25); }

/* Errores: en caja y con icono, para no confundirlos con el rojo de los botones. */
.error { color: var(--danger); font-size: 0.9rem; margin: 0 0 10px; }
.error:empty { display: none; }
.error:not(:empty) {
  background: var(--danger-soft); border: 1px solid rgb(255 90 79 / 0.35);
  border-radius: 10px; padding: 10px 12px;
}
.error:not(:empty)::before { content: "⚠️ "; }

/* ---------- Búsqueda ---------- */
details.filters summary {
  cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between;
}
details.filters summary::-webkit-details-marker { display: none; }
details.filters summary::after { content: "▾"; color: var(--muted); }
details.filters[open] summary::after { content: "▴"; }
details.filters[open] summary { margin-bottom: 14px; }

.result {
  display: flex; gap: 12px; align-items: center;
  text-decoration: none; color: var(--text);
}
.avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700;
  background: var(--primary-soft); color: var(--primary-text);
}
.avatar.lg { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar.xl { width: 96px; height: 96px; font-size: 2rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

.photo-picker { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.photo-picker > div:last-child { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.btn.small-btn { display: inline-block; width: auto; padding: 10px 14px; font-size: 0.9rem; cursor: pointer; }
.link-btn.danger { color: var(--danger); padding: 4px 0; }

.tutor-box {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 4px 0 16px;
}
.tutor-box .section-title { margin-top: 0; }

.hint { margin: -8px 0 14px; font-size: 0.85rem; color: var(--text); font-weight: 600; min-height: 1em; }
.field select:disabled { opacity: 0.6; }
.result-body { flex: 1; min-width: 0; }
.result-body strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-body .muted { font-size: 0.88rem; }

.score {
  flex: none; min-width: 52px; text-align: center; font-weight: 800;
  padding: 6px 8px; border-radius: 999px; font-size: 0.9rem;
  background: var(--primary); color: var(--primary-ink);
}
.score.mid { background: var(--warning-soft); color: var(--warning); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tag { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; font-size: 0.85rem; }
.tag.strong { background: var(--primary-soft); border-color: transparent; color: var(--primary-text); font-weight: 600; }

.profile-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.stat { background: var(--bg); border-radius: 10px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 1.1rem; }
.stat span { font-size: 0.75rem; color: var(--muted); }

.status-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.status-pill.on { background: var(--success-soft); color: var(--success); }
.status-pill.off { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

/* ---------- Mensajes ---------- */
.conv { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); }
.conv .result-body p { margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 0.9rem; }
.conv.unread .result-body p { color: var(--text); font-weight: 600; }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 0.75rem; font-weight: 700;
  display: inline-grid; place-items: center;
}

.chat-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.chat-head a.back { text-decoration: none; font-size: 1.4rem; padding: 0 4px; }
.chat { display: flex; flex-direction: column; gap: 6px; padding-bottom: 80px; }
.bubble {
  max-width: 80%; padding: 10px 12px; border-radius: 16px;
  white-space: pre-wrap; word-wrap: break-word;
}
.bubble.mine { align-self: flex-end; background: var(--bubble-mine); color: #fff; border-bottom-right-radius: 4px; }
.bubble.other { align-self: flex-start; background: var(--bubble-other); border-bottom-left-radius: 4px; }
.bubble time { display: block; font-size: 0.7rem; opacity: 0.7; margin-top: 4px; text-align: right; }

.composer {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 8px 12px;
}
.composer form { max-width: 560px; margin: 0 auto; display: flex; gap: 8px; }
.composer textarea {
  flex: 1; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  resize: none; height: 44px; max-height: 120px;
}
.composer button {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--primary); color: var(--primary-ink); font-size: 1.1rem; cursor: pointer;
}

.empty { text-align: center; color: var(--muted); padding: 32px 16px; }
.empty .big { font-size: 40px; display: block; margin-bottom: 8px; }

/* ---------- Navegación inferior ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #000; border-top: 1px solid var(--border);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: 0.75rem; position: relative;
}
.bottom-nav a .ico { font-size: 1.35rem; }
.bottom-nav a.active { color: var(--primary-text); font-weight: 700; }
.bottom-nav .badge { position: absolute; top: 8px; left: calc(50% + 6px); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translate(-50%, 20px);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; font-size: 0.9rem;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 20;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Vídeo de highlights ---------- */
.video-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin: 4px 0 12px; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-player { display: block; width: 100%; max-height: 70vh; border-radius: 12px; background: #000; margin: 4px 0 12px; }
.video-upload { margin: -4px 0 16px; }
.video-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }

.update-banner {
  position: fixed; left: 12px; right: 12px; z-index: 30;
  top: calc(env(safe-area-inset-top) + 64px);
  max-width: 536px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--text); color: var(--bg);
  padding: 10px 12px 10px 16px; border-radius: 12px; font-size: 0.9rem;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.2);
}
.update-banner button {
  flex: none; border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer;
  background: var(--primary); color: var(--primary-ink); font: inherit; font-weight: 700;
}

.spinner { display: grid; place-items: center; padding: 48px; }
.spinner span {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

/* ---------- Animaciones ---------- */
/* Cada pantalla entra deslizándose un poco hacia arriba; los bloques, uno tras otro. */
.view-enter > * { animation: rise 0.34s cubic-bezier(.2, .8, .2, 1) both; }
.view-enter > *:nth-child(2) { animation-delay: 0.04s; }
.view-enter > *:nth-child(3) { animation-delay: 0.08s; }
.view-enter > *:nth-child(4) { animation-delay: 0.12s; }
.view-enter > *:nth-child(5) { animation-delay: 0.16s; }
.view-enter > *:nth-child(n+6) { animation-delay: 0.2s; }
.view-enter .welcome > * { animation: rise 0.5s cubic-bezier(.2, .8, .2, 1) both; }
.view-enter .welcome > *:nth-child(2) { animation-delay: 0.1s; }
.view-enter .welcome > *:nth-child(3) { animation-delay: 0.2s; }
.view-enter .welcome > *:nth-child(4) { animation-delay: 0.3s; }
.view-enter .welcome-steps li { animation: rise 0.45s cubic-bezier(.2, .8, .2, 1) both; }
.view-enter .welcome-steps li:nth-child(1) { animation-delay: 0.18s; }
.view-enter .welcome-steps li:nth-child(2) { animation-delay: 0.28s; }
.view-enter .welcome-steps li:nth-child(3) { animation-delay: 0.38s; }
.view-enter .welcome-steps::before { animation: draw 0.6s 0.2s cubic-bezier(.2, .8, .2, 1) both; transform-origin: top; }
@keyframes draw { from { transform: scaleY(0); } }

.enter-pop { animation: pop-in 0.35s cubic-bezier(.2, .9, .3, 1.2) both; }
.error.shake { animation: shake 0.36s ease; }
.bubble.pop { animation: bubble-in 0.28s cubic-bezier(.2, .9, .3, 1.2) both; }
.bubble.mine.pop { transform-origin: bottom right; }
.bubble.other.pop { transform-origin: bottom left; }
.bottom-nav a .ico { transition: transform 0.2s cubic-bezier(.3, 1.6, .5, 1); }
.bottom-nav a.active .ico { transform: translateY(-2px) scale(1.12); }
.progress > div { animation: grow 0.8s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { 50% { transform: scale(1.08); } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes bubble-in { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.04); opacity: 0.85; } }
@keyframes glow { 50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.12); } }
@keyframes grow { from { transform: scaleX(0); } }

/* Quien tenga activado "reducir movimiento" en el móvil no ve animaciones. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
