@font-face {
  font-family: 'Ikaros';
  src: url('fonts/Ikaros-Regular.otf') format('opentype');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Ikaros';
  src: url('fonts/Ikaros-Light.otf') format('opentype');
  font-weight: 300;
  font-display: swap;
}

:root {
  /* paleta azul del banner del team */
  --bg: #06090c;
  --bg2: #0b1218;
  --card: #101922;
  --card2: #16222c;
  --border: #223341;
  --accent: #3fb3dc;
  --accent-dark: #1f7ea6;
  /* rojo solo para deudas, avisos y acciones destructivas */
  --red: #e5484d;
  --red-dark: #a13236;
  --green: #2ecc71;
  --yellow: #f1c40f;
  --text: #f2f5f7;
  --muted: #8ea3b0;
  --font-head: 'Ikaros', 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
/* el fondo de la app cubre TODO, incluida el área de la barrita del home (evita el borde negro) */
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  /* sensación de app nativa */
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
  user-select: none;
  -webkit-user-select: none;
}
input, textarea { user-select: text; -webkit-user-select: text; }
img { -webkit-user-drag: none; }
button, .nav-btn, .rsvp-btn { touch-action: manipulation; }
.hidden { display: none !important; }

.ico {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: middle;
}
.ico-fill { fill: currentColor; stroke: none; }
.ico-fill .yt-play { fill: var(--bg); }

/* ===== SPLASH (intro en video) ===== */
.splash {
  position: fixed; inset: 0; z-index: 60;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .35s ease;
}
.splash.hidden { display: none !important; }
.splash.fade { opacity: 0; }
#splash-vid {
  width: 100%; height: 100%; object-fit: cover;
}

.view { animation: viewIn .18s ease; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

h1,h2,h3 { font-family: var(--font-head); letter-spacing: .5px; }
a { color: var(--accent); text-decoration: none; }

/* ===== LOGIN ===== */
.login-screen {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}
.login-box { width: 100%; max-width: 400px; text-align: center; }
.login-logo { width: 88px; height: auto; margin-bottom: 10px; }
.login-title {
  font-size: 42px; font-weight: 700; line-height: 1;
  color: var(--text);
}
.login-title::after { content: ""; display: block; width: 56px; height: 3px; background: var(--accent); margin: 12px auto 0; }
.login-sub { color: var(--muted); font-size: 11px; letter-spacing: 4px; margin: 12px 0 30px; }
.login-box input, .login-box select, .login-box textarea { text-align: left; }
.login-error { color: var(--red); margin-top: 10px; font-weight: 600; }
.login-socials { margin-top: 30px; display: flex; justify-content: center; gap: 18px; }
.login-socials a { color: var(--muted); }
.login-socials a:hover { color: var(--text); }
.login-socials .ico { width: 22px; height: 22px; }
.admin-details { margin: 6px 0 4px; text-align: left; }
.admin-details summary { color: var(--muted); font-size: 13px; cursor: pointer; padding: 6px 0; }

.auth-tabs {
  display: flex; gap: 6px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1; padding: 10px 4px;
  background: none; border: none; border-radius: 9px;
  color: var(--muted); font-family: var(--font-body);
  font-size: 12.5px; font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
.auth-tab.active { background: var(--card2); color: var(--text); }
.auth-intro { color: var(--muted); font-size: 13px; line-height: 1.5; text-align: left; margin: 0 0 16px; }

/* ===== INPUTS / BUTTONS ===== */
input, select, textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  margin-bottom: 12px;
  outline: none;
}
input[type="date"] { -webkit-appearance: none; appearance: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.field-label {
  display: block; text-align: left;
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
  margin: 2px 0 6px;
}
.btn {
  border: none; border-radius: 10px; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 14px;
  padding: 10px 16px;
  background: var(--card2); color: var(--text);
  transition: transform .06s ease, filter .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #04222e; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-big { width: 100%; padding: 14px; font-size: 16px; letter-spacing: 1px; margin-top: 6px; }
.btn-link { background: none; border: none; color: var(--muted); cursor: pointer; margin-top: 16px; font-size: 13px; text-decoration: underline; }
.btn-icon { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.app-header .btn-icon { color: var(--text); filter: drop-shadow(0 1px 4px rgba(0,0,0,.9)); }
.btn-small { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-green { background: var(--green); color: #05230f; }
.btn-outline { background: transparent; border: 1px solid var(--border); }
.btn-danger { background: transparent; border: 1px solid var(--red-dark); color: var(--red); }

/* ===== HEADER / NAV ===== */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: flex-end; gap: 12px;
  min-height: 104px;
  padding: 10px 16px;
  background:
    linear-gradient(180deg, rgba(6,9,12,.1) 40%, rgba(6,9,12,.82) 100%),
    url('banner.jpg') center/cover no-repeat;
  border-bottom: 1px solid var(--border);
}
.header-user { text-shadow: 0 1px 8px rgba(0,0,0,.95); }
.header-text { flex: 1; }
.header-user { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.badge {
  background: var(--accent); color: #04222e;
  font-size: 9px; font-weight: 800; letter-spacing: 1px;
  padding: 2px 6px; border-radius: 4px;
}
.badge-photog { background: #b98cff; }
.badge-admin { background: #4ad2a6; }
.badge-founder { background: #e0b64a; color: #2a1e00; }
.badge-bandido { background: #e0533a; color: #fff; }
/* logo real de Bandidos (reemplaza el badge de texto) */
.badge-bandido-img { height: 17px; width: auto; vertical-align: middle; margin-left: 2px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.role-logo { height: 15px; width: auto; vertical-align: middle; }
.role-checks { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; padding: 8px 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 10px; }
.role-checks .lock-row { margin: 0; }
.guest-banner {
  background: rgba(63,179,220,.12); border: 1px solid var(--accent);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 14px;
  font-size: 13px; color: var(--text);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.guest-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--muted); font-size: 12px; }
.guest-divider::before, .guest-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
/* ===== IDIOMA / JOIN FLOW ===== */
.lang-pills { display: flex; gap: 6px; justify-content: flex-end; margin: -8px 0 10px; }
.lang-pill {
  background: none; border: 1px solid var(--border); color: var(--muted);
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.lang-pill.active { border-color: var(--accent); color: var(--accent); }
.lang-btn { font-size: 11px; font-weight: 800; letter-spacing: 1px; width: auto; padding: 0 10px; }
.join-card {
  display: block; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer; color: var(--text);
  font-family: var(--font-body);
}
.join-card:active, .join-card:hover { border-color: var(--accent); }
.join-card-title { display: block; font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.join-card-sub { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; }
.auth-back { display: block; text-align: left; margin-bottom: 8px; }
.sync-banner { padding: 6px 16px; font-size: 12px; text-align: center; background: var(--bg2); color: var(--muted); border-bottom: 1px solid var(--border); }

.reminders { padding: 10px 14px 0; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.reminder {
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 10px 12px;
  font-size: 13px; font-weight: 600; line-height: 1.4;
}
.reminder.urgent { border-color: var(--red); border-left-color: var(--red); color: #ff8a8d; }
.rem-enable { width: 100%; text-align: center; cursor: pointer; border-style: dashed; color: var(--accent); border-left-color: var(--accent); }

#app { min-height: 100dvh; background: var(--bg); position: relative; }
main { padding: 16px 14px calc(90px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; }

/* ===== ENTRENAMIENTOS ===== */
.train-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.train-card.canceled { opacity: .6; }
.train-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.train-date { font-family: var(--font-head); font-size: 18px; font-weight: 700; }

/* ===== TIMER / BUZZER ===== */
.timer-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px; text-align: center;
}
.timer-display {
  font-family: var(--font-head); font-weight: 700;
  font-size: 68px; line-height: 1; color: var(--text);
  letter-spacing: 1px; margin-bottom: 14px;
  transition: color .1s ease, transform .1s ease;
}
.timer-display.running { color: var(--accent); }
.timer-display.ending { color: var(--red); transform: scale(1.08); }
.timer-presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.tp-btn { min-width: 58px; }
.timer-controls { display: flex; gap: 10px; margin-bottom: 12px; }
.timer-controls .btn { flex: 1; padding: 13px; }
.timer-horns { display: flex; gap: 8px; }
.timer-horns .btn { flex: 1; }
.timer-oneshots { display: flex; gap: 8px; }
.timer-oneshots .btn { flex: 1; }

/* ===== PULL TO REFRESH ===== */
.ptr-indicator {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: calc(46px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  pointer-events: none;
}
.ptr-indicator.ptr-settling { transition: transform .25s cubic-bezier(.2,.9,.3,1); }
.ptr-spinner {
  width: 22px; height: 22px;
  color: var(--accent);
  transition: transform .1s linear;
}
.ptr-indicator.spin .ptr-spinner {
  animation: ptr-spin .7s linear infinite;
}
@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-btn {
  flex: 1; background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: var(--font-body); font-size: 9.5px; font-weight: 600;
  letter-spacing: .2px;
  padding: 10px 0 9px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-top: 2px solid transparent;
}
.nav-btn.active { color: var(--text); border-top-color: var(--accent); }
.nav-btn .ico { width: 20px; height: 20px; }

/* ===== SECTIONS ===== */
.section-title {
  font-size: 22px; font-weight: 700; text-transform: uppercase;
  margin: 6px 0 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.section-title .btn { flex-shrink: 0; }
.subtle { color: var(--muted); font-size: 13px; }

/* ===== EVENT CARDS ===== */
.event-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.event-card.past { opacity: .55; }
.event-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.event-league { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: var(--accent); text-transform: uppercase; }
.event-name { font-family: var(--font-head); font-size: 19px; font-weight: 700; margin: 2px 0 4px; }
.event-meta { font-size: 13px; color: var(--muted); line-height: 1.6; }
.event-countdown {
  text-align: right; flex-shrink: 0; padding-top: 2px;
}
.event-countdown .num { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--text); display: block; line-height: 1; }
.event-countdown .lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; }
.event-countdown.soon .num { color: var(--red); }
.event-fee { margin-top: 10px; font-size: 14px; }
.event-fee b { color: var(--green); }
.fee-pending { color: var(--yellow); }
.cat-switch { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.cat-switch select { width: auto; flex: 1; margin: 0; padding: 8px 10px; font-size: 13px; }

.rsvp-row { display: flex; gap: 8px; margin-top: 12px; }
.rsvp-btn {
  flex: 1; padding: 9px 0; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer;
}
.rsvp-btn.sel-yes { background: rgba(46,204,113,.15); border-color: var(--green); color: var(--green); }
.rsvp-btn.sel-maybe { background: rgba(241,196,15,.12); border-color: var(--yellow); color: var(--yellow); }
.rsvp-btn.sel-no { background: rgba(229,72,77,.12); border-color: var(--red); color: var(--red); }

.roster-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  font-size: 12px; font-weight: 600;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 10px;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip .pface { margin-left: -4px; }

/* carita del jugador (foto de perfil o inicial) reutilizable en chips, pagos, etc. */
.pface {
  border-radius: 50%; object-fit: cover; flex: none;
  background: var(--card2); border: 1px solid var(--border);
}
.pface-i {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; color: var(--text); line-height: 1;
}
/* en Pagos: anillo verde si ya pagó, rojo si debe */
.pf-paid { border: 2px solid var(--green); }
.pf-owes { border: 2px solid var(--red); }
.chip.yes { border-color: var(--green); color: var(--green); }
.chip.maybe { border-color: var(--yellow); color: var(--yellow); }
.chip.paid { border-color: var(--green); }
.chip.paid::after { content: " ✓"; }

.event-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ===== PAGOS ===== */
.pay-event { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.pay-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.pay-head h3 { font-size: 17px; }
.pay-total { font-size: 13px; color: var(--muted); }
.pay-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--bg2);
}
.pay-row:last-child { border-bottom: none; }
.pay-name { flex: 1; font-weight: 600; }
.pay-status { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.st-pendiente { background: rgba(229,72,77,.15); color: var(--red); }
.st-reportado { background: rgba(241,196,15,.15); color: var(--yellow); }
.st-confirmado { background: rgba(46,204,113,.15); color: var(--green); }
.pay-summary {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.stat-box {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; text-align: center;
}
.stat-box .num { font-family: var(--font-head); font-size: 24px; font-weight: 700; display: block; }
.stat-box .lbl { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.num.green { color: var(--green); }
.num.red { color: var(--red); }
.num.yellow { color: var(--yellow); }

/* ===== FOTOS ===== */
.album-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.album-title { font-family: var(--font-head); font-size: 17px; margin-bottom: 2px; }
.album-links { margin: 8px 0; }
.album-link {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.album-link:hover { border-color: var(--accent); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.photo-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 8px; cursor: pointer; background: var(--bg2);
}

/* ===== EQUIPO ===== */
.player-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
}
.player-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--card2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--text);
  flex-shrink: 0;
  position: relative;
}
.player-avatar-img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.player-avatar.own { cursor: pointer; }
.avatar-add {
  position: absolute; right: -3px; bottom: -3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); color: #04222e;
  font-size: 13px; line-height: 15px; text-align: center; font-weight: 700;
  border: 1px solid var(--border);
}
.jersey-num {
  position: absolute; left: -4px; top: -4px;
  min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px;
  background: var(--text); color: var(--bg, #0a1620);
  font-family: var(--font-head); font-weight: 700; font-size: 11px;
  line-height: 18px; text-align: center;
  border: 1px solid var(--border);
}
.standings-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; margin-bottom: 20px;
}
.stand-head { font-family: var(--font-head); font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.stand-block { margin-bottom: 12px; }
.stand-block:last-of-type { margin-bottom: 4px; }
.stand-div { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stand-rank { font-size: 15px; margin: 2px 0 6px; }
.stand-rank b { color: var(--accent); font-size: 18px; }
.stand-rows { display: flex; flex-direction: column; gap: 2px; }
.stand-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 7px; font-size: 13px;
  background: var(--card2);
}
.stand-row.me { background: rgba(63,179,220,.16); border: 1px solid var(--accent); font-weight: 700; }
.sr-rank { width: 22px; color: var(--muted); text-align: center; flex-shrink: 0; }
.stand-row.me .sr-rank { color: var(--accent); }
.sr-team { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-pts { color: var(--muted); flex-shrink: 0; }
.btn-link-sm { background: none; border: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 6px 0 0; }
.invite-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; margin-bottom: 10px; }
.invite-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.layout-grid { display: flex; flex-direction: column; gap: 12px; }
.layout-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.layout-card img { width: 100%; display: block; cursor: zoom-in; background: #fff; }
.layout-cap { padding: 9px 12px; font-weight: 600; font-size: 13px; }
.past-practices { margin-top: -4px; }
.past-practices > summary {
  cursor: pointer; list-style: none;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-weight: 600; font-size: 14px; color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
}
.past-practices > summary::-webkit-details-marker { display: none; }
.past-practices > summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
.past-practices[open] > summary { margin-bottom: 10px; }
.past-practices[open] > summary::after { transform: rotate(180deg); }
.drill-cat { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 6px; }
.drill { background: var(--card); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 7px; padding: 0 12px; }
.drill summary { cursor: pointer; padding: 11px 0; font-weight: 600; font-size: 14px; list-style: none; }
.drill summary::-webkit-details-marker { display: none; }
.drill summary::after { content: "＋"; float: right; color: var(--muted); font-weight: 400; }
.drill[open] summary::after { content: "－"; }
.drill p { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.att-table { display: flex; flex-direction: column; gap: 6px; }
.att-head { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 0 2px; }
.att-head span:not(:first-child), .att-prow .att-cell { text-align: center; }
.att-prow { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: center; background: var(--card2); border-radius: 8px; padding: 8px 10px; }
.att-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.att-name .pface { flex: none; }
.att-cell { display: flex; flex-direction: column; gap: 4px; }
.att-cvals { font-size: 14px; font-weight: 700; }
.att-cvals .subtle { font-weight: 400; font-size: 12px; }
.att-cbar { height: 6px; background: var(--card); border-radius: 3px; overflow: hidden; }
.att-cbar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.player-info { flex: 1; }
.player-name { font-weight: 700; }
.player-sub { font-size: 12px; color: var(--muted); }
.request-card {
  background: var(--card); border: 1px solid var(--yellow);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
}
.request-card p { font-size: 13px; color: var(--muted); margin: 4px 0; }

/* ===== EQUIPO: BLOQUE DEL TEAM ===== */
.team-block { text-align: center; padding: 8px 0 24px; }
.team-logo {
  width: 190px; max-width: 70%; height: auto;
  border-radius: 16px;
}
.social-row { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.social-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 16px;
  color: var(--text); font-size: 13px; font-weight: 600;
}
.social-btn:hover { border-color: var(--muted); }
.social-btn .ico { width: 17px; height: 17px; }
.ico-vid { width: 21px; height: 21px; border-radius: 50%; object-fit: cover; vertical-align: middle; }

.btn-pay { display: block; text-align: center; margin: 4px 0 10px; padding: 11px; }
.steps { margin: 8px 0 4px 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.steps li { margin-bottom: 6px; }
.steps b { color: var(--text); }
.del-x { margin-left: auto; color: var(--muted); font-size: 13px; }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.75);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: var(--bg2);
  border: 1px solid var(--border); border-bottom: none;
  border-radius: 18px 18px 0 0;
  width: 100%; max-width: 560px;
  max-height: 88dvh; overflow-y: auto;
  padding: 20px 18px 28px;
  animation: slideUp .22s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h2 { font-size: 20px; text-transform: uppercase; margin-bottom: 14px; }
.modal-row { display: flex; gap: 10px; }
.modal-row > * { flex: 1; min-width: 0; }
.lock-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin: 4px 0 6px; cursor: pointer; }
.lock-row input { width: auto; min-width: 0; margin: 0; flex: 0 0 auto; }
.pay-tag { font-size: 9px; font-weight: 800; letter-spacing: 1px; background: var(--yellow, #e0b64a); color: #04222e; padding: 2px 6px; border-radius: 4px; vertical-align: middle; }
.album-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.album-share-day { color: var(--accent); }
@keyframes photoFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63,179,220,0); }
  20% { box-shadow: 0 0 0 3px var(--accent); }
}
.photo-flash { animation: photoFlash 1.3s ease 2; border-radius: 12px; }
.modal-row input, .modal-row select { min-width: 0; }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.modal-actions .btn { flex: 1; padding: 13px; }

.empty {
  text-align: center; color: var(--muted);
  padding: 34px 20px; border: 1px dashed var(--border); border-radius: 14px;
  font-size: 14px; line-height: 1.6;
}

/* ===== POLISH ===== */

#toast {
  position: fixed; left: 50%; bottom: 78px; transform: translateX(-50%) translateY(20px);
  z-index: 100;
  background: var(--card2); color: var(--text);
  border: 1px solid var(--accent); border-radius: 12px;
  padding: 11px 18px; font-size: 14px; font-weight: 600;
  max-width: 90vw; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.pay-warn {
  margin-top: 10px;
  background: rgba(229,72,77,.12);
  border: 1px solid var(--red);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px; font-weight: 700; color: #ff6b6b;
}
.pay-info {
  background: var(--card); border: 1px solid var(--green);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 16px;
  font-size: 14px; line-height: 1.5;
}
.pay-info.dim { border-color: var(--border); color: var(--muted); font-size: 13px; }

.chip.count { border-color: var(--muted); color: var(--text); font-weight: 700; }

.event-card.approved { border-color: var(--accent); }
.ev-badge {
  background: var(--accent); color: #04222e;
  font-size: 9px; font-weight: 800; letter-spacing: .5px;
  padding: 2px 6px; border-radius: 4px; margin-left: 4px;
}
.rsvp-locked {
  margin-top: 4px; padding: 9px 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; font-size: 13px; color: var(--muted);
}
.rsvp-deadline { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: center; }
.btn-approve { width: 100%; margin-top: 12px; padding: 11px; }
.league-done {
  margin-top: 12px; padding: 12px 14px;
  background: rgba(46,204,113,.1);
  border: 1px solid var(--green);
  border-radius: 12px;
}
.league-done b { color: var(--green); }
.league-done p { margin: 4px 0 10px; }
.pay-event.all-paid { border-color: var(--green); }

.fund-bar-head {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted);
  margin: 10px 0 5px;
}
.fund-bar {
  height: 9px; border-radius: 6px;
  background: var(--bg2); border: 1px solid var(--border);
  overflow: hidden;
}
.fund-fill {
  height: 100%; border-radius: 6px;
  background: var(--accent);
  transition: width .5s cubic-bezier(.2,.9,.3,1);
}
.fund-fill.full { background: var(--green); }

.league-locked {
  margin-top: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.league-locked .lock-ico { font-size: 20px; opacity: .7; }
.league-locked b { font-size: 14px; }
.league-locked p { margin-top: 2px; }

.att-summary { display: flex; gap: 8px; margin: 10px 0 14px; }
.att-pill {
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 20px;
  background: var(--bg2); border: 1px solid var(--border);
}
.att-pill.yes { border-color: var(--green); color: var(--green); }
.att-pill.maybe { border-color: var(--yellow); color: var(--yellow); }

.att-list { display: flex; flex-direction: column; gap: 10px; }
.att-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px;
}
.att-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.att-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--card2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--text);
}
.att-name { font-weight: 700; font-size: 15px; }
.att-seg { display: flex; gap: 6px; }
.att-b {
  flex: 1; padding: 10px 4px; border-radius: 10px;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: transform .06s ease;
}
.att-b:active { transform: scale(.95); }
.att-b.a-yes { background: rgba(46,204,113,.18); border-color: var(--green); color: var(--green); }
.att-b.a-maybe { background: rgba(241,196,15,.15); border-color: var(--yellow); color: var(--yellow); }
.att-b.a-no { background: rgba(229,72,77,.15); border-color: var(--red); color: var(--red); }
.att-b.a-clear { background: var(--card2); border-color: var(--muted); color: var(--text); }

.lg-info {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 6px;
  font-size: 14px; line-height: 1.7;
}
.lg-h { font-size: 16px; margin: 18px 0 2px; }
.lg-lists { display: flex; gap: 10px; margin-top: 14px; }
.lg-col {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
}
.lg-col > b { display: block; font-size: 13px; margin-bottom: 8px; }
.lg-row { font-size: 13px; padding: 4px 0; }
.exp-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--bg2); }
.exp-row:last-child { border-bottom: none; }
.exp-total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; }
.att-b:last-child { flex: 0 0 44px; }
.past-divider { margin-top: 28px; color: var(--muted); }
.palmares {
  background: var(--card); border: 1px solid var(--accent);
  border-radius: 12px; padding: 10px 14px; margin: -6px 0 14px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.event-result {
  margin-top: 10px; padding: 9px 12px;
  background: rgba(63,179,220,.1); border: 1px solid var(--accent);
  border-radius: 10px; font-size: 14px;
}

.nav-btn { position: relative; }
.nav-btn.has-dot .nav-ico::after {
  content: ""; position: absolute; top: 6px;
  margin-left: 14px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--bg2);
}

.photo-wrap { position: relative; }
.photo-del {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.75); color: #fff;
  border: 1px solid var(--red);
  font-size: 12px; line-height: 1; cursor: pointer;
}
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,.92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  padding: 20px;
}
.lightbox img {
  max-width: 100%; max-height: 80dvh;
  border-radius: 10px; object-fit: contain;
}

/* ===== CÁMARA ===== */
.cam-launch {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px; margin: 4px 0 8px;
}
.fotos-archive-title { font-size: 15px; color: var(--muted); margin: 8px 0 12px; }
.camera {
  position: fixed; inset: 0; z-index: 95;
  background: #000;
  display: flex; align-items: center; justify-content: center;
}
/* solo el video/foto a pantalla completa (hijos directos), NO el logo del botón */
.camera > video, .camera > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.cam-close, .cam-flip {
  position: absolute; top: calc(env(safe-area-inset-top) + 14px);
  z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(0,0,0,.45); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; backdrop-filter: blur(4px);
}
.cam-close { left: 14px; }
.cam-flip { right: 14px; }
.cam-rec {
  position: absolute; top: calc(env(safe-area-inset-top) + 20px); left: 50%;
  transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 7px;
  background: rgba(0,0,0,.5); border-radius: 20px; padding: 6px 14px;
  color: #fff; font-weight: 700; font-size: 14px;
}
.cam-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: recblink 1s infinite; }
@keyframes recblink { 50% { opacity: .3; } }
.cam-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  padding: 20px 20px calc(env(safe-area-inset-bottom) + 28px);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: linear-gradient(0deg, rgba(0,0,0,.55), transparent);
}
.cam-hint { color: rgba(255,255,255,.85); font-size: 13px; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.cam-loading {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: rgba(255,255,255,.9); font-size: 14px; font-weight: 600; z-index: 2;
}
.cam-spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: var(--accent);
  animation: camspin .8s linear infinite;
}
@keyframes camspin { to { transform: rotate(360deg); } }
.cam-lenses {
  display: flex; gap: 4px;
  background: rgba(0,0,0,.4);
  border-radius: 24px; padding: 4px;
  backdrop-filter: blur(6px);
}
.lens-b {
  min-width: 38px; height: 38px; border-radius: 50%;
  background: transparent; border: none;
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.lens-b.active {
  background: rgba(255,255,255,.25);
  color: var(--accent);
  font-size: 13px;
  transform: scale(1.05);
}
.cam-shutter {
  width: 82px; height: 82px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 4px solid #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  padding: 0;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.cam-logo { width: 52px; height: 52px; object-fit: contain; }
.cam-shutter:active { transform: scale(.94); }
.cam-shutter.recording {
  transform: scale(1.15);
  background: var(--red);
  border-color: #fff;
  box-shadow: 0 0 0 6px rgba(229,72,77,.35);
}
.cam-review-actions { display: flex; gap: 10px; width: 100%; }
.cam-review-actions .btn { flex: 1; padding: 13px; }
.camera .btn-link { color: #fff; }
.cam-story-btn { width: 100%; padding: 14px; font-size: 15px; }

/* ===== CARTEL DE INSTALACIÓN ===== */
.install-banner {
  position: fixed; left: 12px; right: 12px; z-index: 80;
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card2);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 14px 38px 14px 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.65);
  animation: bannerUp .4s cubic-bezier(.2,.9,.3,1.2);
  font-size: 13px; line-height: 1.5;
}
@keyframes bannerUp {
  from { transform: translateY(130%); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.ib-logo { width: 40px; height: auto; flex-shrink: 0; margin-top: 2px; }
.ib-body b { display: block; font-family: var(--font-head); font-size: 16px; letter-spacing: .5px; margin-bottom: 6px; }
.ib-step { display: flex; align-items: center; gap: 7px; color: var(--muted); margin-top: 4px; }
.ib-num {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #04222e;
  font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.ib-ico { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; }
.ib-close {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; color: var(--muted);
  font-size: 14px; cursor: pointer; padding: 4px;
}
.ib-arrow {
  text-align: center; color: var(--accent);
  font-size: 16px; margin-top: 8px;
  animation: bounceDown 1.1s ease-in-out infinite;
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); opacity: .7; }
  50% { transform: translateY(7px); opacity: 1; }
}

/* ===== MARCO DE TELÉFONO (pantallas grandes) ===== */
@media (min-width: 700px) {
  html, body { overflow: hidden; height: 100%; }
  body {
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: #050505;
  }
  #app, #login-screen {
    width: 402px;
    height: min(874px, calc(100dvh - 48px));
    min-height: 0;
    border-radius: 44px;
    border: 10px solid #10161c;
    outline: 1px solid #2a3946;
    overflow-y: auto; overflow-x: hidden;
    scrollbar-width: none;
    box-shadow: 0 30px 90px rgba(0,0,0,.85);
    position: relative;
  }
  #app::-webkit-scrollbar, #login-screen::-webkit-scrollbar { display: none; }
  #app { display: flex; flex-direction: column; }
  #app.hidden, #login-screen.hidden { display: none !important; }
  main { flex: 1; width: 100%; }
  #login-screen { min-height: unset; }
  .bottom-nav { position: sticky; bottom: 0; left: auto; right: auto; }
  .modal-backdrop { align-items: center; }
  .modal {
    max-width: 400px;
    border-radius: 18px;
    border: 1px solid var(--border);
  }
  #toast { bottom: 12vh; }
}
