@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Paleta Finanzauto (finanzauto.com.co / finanzauto.com.pe) con acentos navideños */
:root {
  color-scheme: light;
  --brand: #007e72;
  --brand-dark: #0a5750;
  --brand-deep: #063f3a;
  --brand-2: #1a646e;
  --lime: #8dc03d;
  --lime-2: #a4d233;
  --lime-soft: #edf4d8;
  --mint: #f2f9f8;
  --mint-2: #cce6e3;
  --pine: #0a5750;
  --pine-2: #007e72;
  --pine-3: #1a646e;
  --red: #c8102e;
  --red-2: #e0283f;
  --gold: #f2b632;
  --gold-soft: #edf4d8;
  --cream: #f2f9f8;
  --paper: #ffffff;
  --ink: #3d3d3d;
  --ink-2: #4f4f4f;
  --ink-3: #6b7280;
  --line: #d6e8e5;
  --good: #1f7a3a;
  --warn: #a86200;
  --bad: #b3122b;
  --info: #1d4ed8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(11, 61, 46, .06), 0 6px 18px rgba(11, 61, 46, .07);
  --bar: #007e72;
  --flake: rgba(120, 160, 190, .45);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--pine-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.hidden { display: none !important; }

/* ---------- Nieve (decorativa, respeta "reducir movimiento") ---------- */
.snow, .snow::before, .snow::after {
  position: fixed; inset: -100px 0 0 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(3px 3px at 20px 30px, var(--flake) 50%, transparent 51%),
    radial-gradient(2px 2px at 80px 120px, var(--flake) 50%, transparent 51%),
    radial-gradient(3px 3px at 150px 60px, var(--flake) 50%, transparent 51%),
    radial-gradient(2px 2px at 200px 180px, var(--flake) 50%, transparent 51%),
    radial-gradient(3px 3px at 260px 20px, var(--flake) 50%, transparent 51%);
  background-size: 300px 220px;
  animation: snow 14s linear infinite;
  opacity: .9;
}
.snow::before { content: ""; background-size: 420px 300px; animation-duration: 22s; opacity: .6; }
.snow::after { content: ""; background-size: 520px 380px; animation-duration: 30s; opacity: .45; }
@keyframes snow { from { transform: translateY(0); } to { transform: translateY(220px); } }
@media (prefers-reduced-motion: reduce) { .snow, .snow::before, .snow::after, .lights li { animation: none !important; } }

/* ---------- Encabezado con guirnalda ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(90deg, var(--brand-deep) 0%, var(--brand-dark) 45%, var(--brand) 100%);
  color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.topbar-inner { max-width: 1240px; margin: auto; display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; flex: none; font-weight: 700; font-size: 1.15rem; color: #fff; text-decoration: none; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-sep { width: 1px; height: 30px; background: rgba(255,255,255,.35); }
.brand-sub { font-weight: 400; font-size: .74rem; line-height: 1.25; opacity: .9; }
.login-logo { height: 58px; width: auto; display: block; margin: 0 auto 6px; }
.b-logo { height: clamp(34px, 3.4vw, 56px); width: auto; display: block; }
.brand-badge { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); font-size: 20px; border: 2px solid #fff; }
.brand small { display: block; font-weight: 400; font-size: .72rem; opacity: .85; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: #e9f5ef; text-decoration: none; padding: 7px 11px; border-radius: 999px; font-size: .9rem; }
.nav a:hover { background: rgba(255,255,255,.12); }
.nav a.active { background: var(--lime); color: var(--brand-deep); font-weight: 700; }
.userbox { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.lights { list-style: none; margin: 0; padding: 0 8px; height: 14px; display: flex; justify-content: space-between; overflow: hidden;
  background: linear-gradient(var(--pine-2), var(--pine-2)) center 3px / 100% 2px no-repeat; }
.lights li { width: 9px; height: 13px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; margin-top: 2px; animation: twinkle 1.6s ease-in-out infinite; }
.lights li:nth-child(4n+1) { background: #ff4d5e; }
.lights li:nth-child(4n+2) { background: #ffd23f; animation-delay: .4s; }
.lights li:nth-child(4n+3) { background: #4ade80; animation-delay: .8s; }
.lights li:nth-child(4n+4) { background: #60a5fa; animation-delay: 1.2s; }
@keyframes twinkle { 0%, 100% { opacity: 1; filter: brightness(1.2); } 50% { opacity: .35; filter: brightness(.7); } }

/* ---------- Layout ---------- */
main { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 24px 16px 64px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.grid.sidebar-l { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
.grid.sidebar-r { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); }
@media (max-width: 900px) { .grid.sidebar-l, .grid.sidebar-r { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } .nav { margin-left: 0; } .topbar-inner { flex-wrap: wrap; } }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card.festive { border-top: 4px solid var(--lime); }
.card.gold { background: var(--lime-soft); border-color: #ddf1a5; }
.card h2 { display: flex; align-items: center; gap: 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

.hero {
  background: radial-gradient(1200px 300px at 0% 0%, var(--brand) 0%, var(--brand-dark) 55%, var(--brand-deep) 100%);
  color: #fff; border-radius: 18px; padding: 22px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  border: 2px solid var(--lime); box-shadow: var(--shadow);
}
.hero .avatar-xl { width: 88px; height: 88px; font-size: 50px; }
.hero h1 { color: #fff; margin: 0; }
.hero p { margin: 4px 0 0; opacity: .9; }
.hero .hero-stats { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.hero-stat { text-align: center; min-width: 88px; }
.hero-stat b { display: block; font-size: 1.9rem; color: var(--lime-2); line-height: 1.1; }
.hero-stat span { font-size: .78rem; opacity: .9; }

.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; background: #fff; border: 3px solid var(--gold); flex: none; }
.avatar-xl { border-width: 4px; }

/* ---------- KPI ---------- */
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .label { font-size: .8rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.9rem; font-weight: 700; color: var(--pine); line-height: 1.1; }
.kpi .sub { font-size: .82rem; color: var(--ink-2); }

/* ---------- Barras (una serie, etiqueta directa) ---------- */
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 10px; align-items: center; font-size: .88rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bar-track { position: relative; height: 18px; display: flex; align-items: center; gap: 6px; }
.bar-fill { height: 14px; border-radius: 0 4px 4px 0; background: var(--bar); min-width: 2px; }
.bar-value { font-variant-numeric: tabular-nums; color: var(--ink); font-size: .82rem; white-space: nowrap; }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 18px; border-bottom: 1px solid var(--line); }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.col-fill { width: 70%; max-width: 34px; background: var(--bar); border-radius: 4px 4px 0 0; min-height: 2px; }
.col-val { font-size: .75rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.col-labels { display: flex; gap: 6px; }
.col-labels span { flex: 1; text-align: center; font-size: .72rem; color: var(--ink-3); min-width: 0; overflow: hidden; white-space: nowrap; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #e6f2f0; font-weight: 600; color: var(--ink-2); position: sticky; top: 0; white-space: nowrap; }
tbody tr:hover { background: #f4faf9; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.highlight { background: var(--gold-soft) !important; }
tr.finalist td:first-child { border-left: 4px solid var(--gold); }

/* ---------- Etiquetas de estado (siempre con texto) ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pill.valido { background: #e6f4ea; color: var(--good); border-color: #b7dfc3; }
.pill.no_valido { background: #fde8eb; color: var(--bad); border-color: #f5bcc5; }
.pill.en_revision, .pill.pendiente { background: #fff3db; color: var(--warn); border-color: #f3d7a1; }
.pill.activo { background: #e6f4ea; color: var(--good); }
.pill.cerrado { background: #eceff1; color: #455a64; }
.pill.neutral { background: #eef2f0; color: var(--ink-2); }
.pill.gold { background: var(--lime); color: var(--brand-deep); }
.pill.warn { background: #fff3db; color: var(--warn); }

/* ---------- Formularios ---------- */
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 4px; color: var(--ink-2); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #cfc6b4; border-radius: 10px; padding: 9px 11px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(141, 192, 61, .6); outline-offset: 1px; border-color: var(--pine-3); }
.field { margin-bottom: 14px; }
.field .hint { font-size: .8rem; color: var(--ink-3); margin-top: 3px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 0 0 auto; }
.row .grow { flex: 1 1 200px; }
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-group label { display: flex; align-items: center; gap: 6px; font-weight: 500; border: 1px solid #cfc6b4; border-radius: 999px; padding: 6px 12px; cursor: pointer; background: #fff; }
.radio-group input { width: auto; margin: 0; }
.radio-group label:has(input:checked) { background: var(--pine); color: #fff; border-color: var(--pine); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; border: 0; border-radius: 45px; padding: 10px 20px; cursor: pointer; background: var(--brand); color: #fff; text-decoration: none; transition: background .15s, transform .15s; }
.btn:hover { background: var(--brand-dark); }
.btn.lime { background: var(--lime); color: var(--brand-deep); }
.btn.lime:hover { background: var(--lime-2); }
.btn.secondary { background: var(--brand-deep); }
.btn.secondary:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--pine); border: 1px solid #cfc6b4; }
.btn.ghost:hover { background: #f3eee2; }
.btn.light { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn.small { padding: 5px 12px; font-size: .82rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.alert { border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: .9rem; border: 1px solid; }
.alert.error { background: #fde8eb; border-color: #f5bcc5; color: #7d0c1d; }
.alert.ok { background: #e6f4ea; border-color: #b7dfc3; color: #145a2a; }
.alert.info { background: #eaf1fd; border-color: #c4d6f7; color: #193f8f; }
.alert.warn { background: #fff3db; border-color: #f3d7a1; color: #6e4300; }

/* ---------- Login ---------- */
body.login-mode { --flake: rgba(255, 255, 255, .85); background: radial-gradient(900px 500px at 50% 0%, var(--brand) 0%, var(--brand-dark) 55%, #04302c 100%) fixed; }
.login-wrap { min-height: calc(100vh - 14px); display: grid; place-items: center; padding: 24px 16px; position: relative; z-index: 1; }
.login-card { width: min(440px, 100%); background: var(--paper); border-radius: 20px; box-shadow: 0 10px 40px rgba(0,40,36,.35); overflow: hidden; border: 2px solid var(--lime); }
.login-top { background: linear-gradient(135deg, var(--brand-2), var(--brand) 60%, var(--lime)); color: #fff; text-align: center; padding: 28px 20px 22px; }
.login-top .tree { font-size: 52px; line-height: 1; }
.login-top h1 { color: #fff; margin: 8px 0 4px; font-size: 1.7rem; }
.login-top p { margin: 0; opacity: .9; font-size: .9rem; }
.login-body { padding: 22px; }
.code-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Ficha de cliente ---------- */
.client-list { display: grid; gap: 8px; }
.client-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.client-item:hover { border-color: var(--pine-3); }
.client-item.selected { border-color: var(--brand); background: #e9f5f3; box-shadow: inset 4px 0 0 var(--pine); }
.client-item .ci-icon { font-size: 22px; }
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.dl div { background: #faf7f0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.dl dt { font-size: .74rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.dl dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.dl .big dd { font-size: 1.25rem; color: var(--red); }
.tagline { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Varios ---------- */
.agenda { display: grid; gap: 10px; }
.agenda-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.agenda-item .date { text-align: center; background: var(--pine); color: #fff; border-radius: 10px; padding: 6px; font-weight: 700; line-height: 1.15; }
.agenda-item .date small { display: block; font-weight: 400; font-size: .72rem; color: var(--gold); text-transform: uppercase; }
.agenda-item.today { border: 2px solid var(--red); }
.team-card { display: flex; gap: 12px; align-items: center; }
.members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.member { font-size: .8rem; background: #f3eee2; border-radius: 999px; padding: 2px 9px; }
.member.captain { background: var(--lime); color: var(--brand-deep); font-weight: 700; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.podium .p { text-align: center; background: #fff; border-radius: 14px; border: 1px solid var(--line); padding: 14px 8px; }
.podium .p1 { border: 2px solid var(--gold); padding-top: 22px; }
.podium .medal { font-size: 28px; }
.footer { text-align: center; color: var(--ink-3); font-size: .8rem; padding: 24px 0 8px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 50; background: var(--pine); color: #fff; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); font-weight: 600; max-width: calc(100% - 32px); }
.toast.error { background: var(--red); }
.empty { text-align: center; padding: 28px 12px; color: var(--ink-3); }
.empty .big { font-size: 42px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--pine-2); }
.report-body { white-space: pre-wrap; font-size: .88rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters > * { width: auto; min-width: 150px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(640px, calc(100% - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(11, 61, 46, .45); }
.dialog-head { background: var(--pine); color: #fff; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.dialog-body { padding: 18px; max-height: 70vh; overflow: auto; }
.dialog-foot { padding: 12px 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }

/* ---------- Aldea Cazafallos ---------- */
.world { position: relative; width: 100vw; margin-left: calc(50% - 50vw); margin-top: -24px; height: calc(100vh - 92px); min-height: 520px; overflow: hidden; background: #030817; }
.world-canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; cursor: crosshair; }
.world-hud { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; flex-wrap: wrap; }
.world-card { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: rgba(6, 30, 24, .78); color: #fff; border: 1.5px solid rgba(255, 210, 63, .7); border-radius: 14px; padding: 8px 14px; backdrop-filter: blur(6px); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); max-width: 340px; }
.world-card .small { color: #d7efe4; }
.world-card.quest { border-color: #ffd23f; }
.quest-icon { font-size: 26px; }
.world-help { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 10px; align-items: center; color: #e6f3ee; font-size: .82rem; background: rgba(6, 30, 24, .7); padding: 6px 8px 6px 12px; border-radius: 999px; flex-wrap: wrap; }
.world-minimap { position: absolute; right: 14px; bottom: 14px; width: 180px; height: 100px; background: rgba(6, 30, 24, .75); border: 1.5px solid rgba(255, 210, 63, .7); border-radius: 12px; cursor: pointer; }
.world-prompt { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); background: #b3122b; color: #fff; border: 2px solid #ffd23f; border-radius: 999px; padding: 10px 20px; font: inherit; font-weight: 700; box-shadow: 0 8px 30px rgba(179, 18, 43, .55); cursor: pointer; animation: promptPulse 1.6s ease-in-out infinite; max-width: calc(100% - 32px); }
@keyframes promptPulse { 0%, 100% { box-shadow: 0 8px 30px rgba(179, 18, 43, .45); } 50% { box-shadow: 0 8px 40px rgba(255, 210, 63, .7); } }
.world-dialog .dialog-head { background: linear-gradient(90deg, var(--pine), var(--red)); }
.tree-rank { padding-left: 1.2rem; display: grid; gap: 6px; }
.tree-rank li { display: flex; align-items: center; gap: 8px; }
.tree-rank li.mine { font-weight: 700; color: var(--red); }
.tree-rank .avatar { width: 30px; height: 30px; font-size: 16px; border-width: 2px; }
@media (max-width: 640px) {
  .world { height: calc(100svh - 230px); min-height: 440px; }
  .world-prompt { font-size: .85rem; padding: 8px 14px; bottom: 60px; }
  .world-minimap { width: 126px; height: 70px; }
  .world-help span { display: none; }
  .world-card { max-width: 100%; padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) { .world-prompt { animation: none; } }

/* ---------- Carrera de renos ---------- */
.race { --lane-h: 56px; position: relative; background: linear-gradient(180deg, #0a5750, #063f3a); border-radius: 18px; padding: 10px 12px 12px; color: #fff; box-shadow: inset 0 0 0 2px rgba(141, 192, 61, .5); overflow: hidden; }
.race-head { display: grid; grid-template-columns: 56px minmax(150px, 22%) 1fr 110px; gap: 10px; align-items: center; font-size: .72rem; letter-spacing: .12em; color: #cce6e3; padding: 2px 4px 8px; font-weight: 700; }
.rh-track { display: flex; justify-content: space-between; padding: 0 8px; }
.rh-score { text-align: right; }
.race-body { position: relative; }
.race-lanes { position: relative; transition: height .4s; }
.lane { position: absolute; left: 0; right: 0; top: 0; display: grid; grid-template-columns: 56px minmax(150px, 22%) 1fr 110px; gap: 10px; align-items: center; transition: transform 1.1s cubic-bezier(.65, 0, .25, 1); padding: 3px 4px; }
.lane::before { content: ""; position: absolute; inset: 3px 0; border-radius: 12px; background: rgba(255, 255, 255, .04); transition: background .4s; }
.lane.qualify::before { background: linear-gradient(90deg, rgba(141, 192, 61, .22), rgba(141, 192, 61, .06)); }
.lane.mine::before { background: rgba(255, 210, 63, .18); box-shadow: inset 0 0 0 2px #ffd23f; }
.lane > * { position: relative; }
.lane-pos { font-weight: 800; font-size: 1.2rem; text-align: center; color: #fff; }
.lane.podium .lane-pos { font-size: 1.6rem; }
.lane-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lane-avatar { flex: none; width: calc(var(--lane-h) * .62); height: calc(var(--lane-h) * .62); max-width: 46px; max-height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: calc(var(--lane-h) * .34); border: 3px solid; }
.lane-name { min-width: 0; }
.lane-name b { display: block; font-size: clamp(.8rem, calc(var(--lane-h) * .26), 1.15rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-name small { display: block; color: #b9dcd7; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-track { height: calc(var(--lane-h) - 8px); border-radius: 10px; position: relative; overflow: visible;
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, .07) 46px 48px),
    linear-gradient(180deg, #e9f4f8, #cfe3ec);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), inset 0 2px 0 rgba(255, 255, 255, .6); }
.lane-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed rgba(10, 87, 80, .18); }
.finish { position: absolute; right: 6px; top: 0; bottom: 0; width: 14px; border-radius: 3px;
  background: conic-gradient(#1b1b1b 25%, #fff 0 50%, #1b1b1b 0 75%, #fff 0) 0 0 / 7px 7px; opacity: .85; }
.runner { position: absolute; bottom: 2px; left: 2%; height: calc(var(--lane-h) - 6px); transition: left 1.6s cubic-bezier(.3, .1, .2, 1), transform 1.6s cubic-bezier(.3, .1, .2, 1); z-index: 2; }
.runner-inner { position: relative; height: 100%; display: flex; align-items: flex-end; }
.deer { height: 100%; width: auto; aspect-ratio: 124 / 84; overflow: visible; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .25)); }
.deer .leg { transform-box: fill-box; transform-origin: 50% 0; }
.deer-body { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 2.4s ease-in-out infinite; }
.running .deer-body { animation: gallop .42s ease-in-out infinite; }
.running .deer .f1, .running .deer .b2 { animation: legA .42s ease-in-out infinite; }
.running .deer .f2, .running .deer .b1 { animation: legB .42s ease-in-out infinite; }
.deer-nose { animation: nose 1.6s ease-in-out infinite; }
@keyframes gallop { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9%) rotate(-3deg); } }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.02); } }
@keyframes legA { 0%, 100% { transform: rotate(30deg); } 50% { transform: rotate(-30deg); } }
@keyframes legB { 0%, 100% { transform: rotate(-30deg); } 50% { transform: rotate(30deg); } }
@keyframes nose { 0%, 100% { filter: drop-shadow(0 0 1px #ff2d3d); } 50% { filter: drop-shadow(0 0 5px #ff2d3d); } }
.trail { position: absolute; left: -6px; bottom: 2px; width: 30px; height: 14px; display: none; }
.running .trail { display: block; }
.trail i { position: absolute; bottom: 0; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .95); animation: puff 1s ease-out infinite; }
.trail i:nth-child(2) { animation-delay: .25s; }
.trail i:nth-child(3) { animation-delay: .5s; }
.trail i:nth-child(4) { animation-delay: .75s; }
@keyframes puff { 0% { transform: translate(18px, 0) scale(.4); opacity: .9; } 100% { transform: translate(-26px, -10px) scale(1.4); opacity: 0; } }
.speed { position: absolute; left: -54px; top: 20%; width: 56px; height: 60%; display: none; }
.speed i { position: absolute; left: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, #ffd23f); animation: speed .35s linear infinite; }
.speed i:nth-child(1) { top: 10%; width: 50px; }
.speed i:nth-child(2) { top: 45%; width: 36px; animation-delay: .12s; }
.speed i:nth-child(3) { top: 80%; width: 44px; animation-delay: .22s; }
@keyframes speed { from { transform: translateX(20px); opacity: 1; } to { transform: translateX(-20px); opacity: 0; } }
.runner-inner.boost .speed { display: block; }
.runner-inner.boost .deer { animation: boostGlow 2.6s ease-out; }
@keyframes boostGlow { 0% { filter: drop-shadow(0 0 0 #ffd23f); transform: scale(1); } 15% { filter: drop-shadow(0 0 12px #ffd23f); transform: scale(1.18); } 100% { filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .25)); transform: scale(1); } }
.runner-tag { position: absolute; left: 100%; bottom: 30%; margin-left: 4px; background: #063f3a; color: #fff; font-weight: 800; font-size: .72rem; padding: 1px 7px; border-radius: 999px; white-space: nowrap; border: 1.5px solid #8dc03d; }
.crown { position: absolute; left: 62%; top: -14px; font-size: calc(var(--lane-h) * .36); display: none; animation: crown 1.4s ease-in-out infinite; }
.lane.leader .crown { display: block; }
@keyframes crown { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-4px) rotate(8deg); } }
.lane.leader .deer { filter: drop-shadow(0 0 8px rgba(255, 210, 63, .9)); }
.bubbles { position: absolute; left: 40%; top: 0; }
.bubble { position: absolute; left: 0; top: 0; background: #8dc03d; color: #063f3a; font-weight: 900; padding: 2px 9px; border-radius: 999px; font-size: .95rem; animation: bubble 2.2s ease-out forwards; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
@keyframes bubble { 0% { transform: translateY(6px) scale(.4); opacity: 0; } 15% { transform: translateY(-8px) scale(1.15); opacity: 1; } 100% { transform: translateY(-42px) scale(1); opacity: 0; } }
.lane-score { text-align: right; }
.lane-score b { display: block; font-size: clamp(1rem, calc(var(--lane-h) * .34), 1.7rem); font-weight: 900; color: #a4d233; font-variant-numeric: tabular-nums; line-height: 1.05; }
.lane-score small { color: #b9dcd7; font-size: .72rem; }
.race-cut { position: absolute; left: 0; right: 0; top: 0; height: 0; border-top: 3px dashed #a4d233; transition: transform 1s; z-index: 3; pointer-events: none; }
.race-cut span { position: absolute; right: 120px; top: -12px; background: #a4d233; color: #063f3a; font-weight: 800; font-size: .7rem; padding: 2px 10px; border-radius: 999px; letter-spacing: .04em; }
.race.compact .race-head, .race.compact .lane { grid-template-columns: 40px minmax(120px, 24%) 1fr 84px; gap: 8px; }
.ranking-race { margin-bottom: 16px; }
@media (max-width: 760px) {
  .race-head, .lane, .race.compact .race-head, .race.compact .lane { grid-template-columns: 30px 1fr 64px; }
  .lane-track, .rh-track { grid-column: 1 / -1; grid-row: 2; }
  .lane { align-content: center; row-gap: 4px; }
  .lane-track { height: 44px; }
  .runner { height: 40px; }
  .lane-name small { display: none; }
  .race-cut span { right: 8px; top: -11px; font-size: .62rem; }
}
@media (prefers-reduced-motion: reduce) {
  .deer-body, .running .deer-body, .running .deer .leg, .deer-nose, .trail i, .speed i, .crown, .lights li { animation: none !important; }
  .lane, .runner { transition-duration: .01s; }
}

/* ---------- Tablero para televisor ---------- */
body.board-mode { background: #04302c; overflow: hidden; --flake: rgba(255, 255, 255, .75); }
body.board-mode .footer { display: none; }
.board { position: fixed; inset: 0; display: grid; grid-template-rows: auto auto 1fr auto; color: #fff; z-index: 1;
  background: radial-gradient(1400px 600px at 15% -10%, rgba(141, 192, 61, .25), transparent 60%), radial-gradient(1200px 700px at 100% 0%, rgba(0, 126, 114, .55), transparent 60%), linear-gradient(180deg, #063f3a, #04302c); }
.b-head { display: flex; align-items: center; gap: 24px; padding: 12px 28px 10px; }
.b-brand { display: flex; align-items: center; gap: 18px; }
.b-word { font-weight: 900; font-size: clamp(1.4rem, 2.2vw, 2.4rem); letter-spacing: -.02em; color: #fff; }
.b-sep { width: 2px; height: 46px; background: linear-gradient(#8dc03d, transparent); }
.b-head h1 { margin: 0; color: #fff; font-size: clamp(1.4rem, 2.4vw, 2.6rem); font-weight: 900; letter-spacing: -.02em; }
.b-sub { color: #cce6e3; font-size: clamp(.8rem, 1vw, 1.05rem); }
.b-phase { color: #a4d233; font-weight: 700; }
.b-today { margin-left: auto; display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .08); border: 1.5px solid rgba(164, 210, 51, .7); border-radius: 999px; padding: 6px 8px 6px 16px; }
.b-today-label { font-size: .75rem; font-weight: 800; letter-spacing: .12em; color: #a4d233; }
.b-today-tool { background: #8dc03d; color: #063f3a; font-weight: 800; border-radius: 999px; padding: 6px 14px; font-size: clamp(.85rem, 1vw, 1.1rem); animation: todayPulse 2s ease-in-out infinite; }
@keyframes todayPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(164, 210, 51, .6); } 50% { box-shadow: 0 0 0 10px rgba(164, 210, 51, 0); } }
.b-live { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .1em; font-size: .85rem; }
.b-dot { width: 12px; height: 12px; border-radius: 50%; background: #ff3b4f; box-shadow: 0 0 0 0 rgba(255, 59, 79, .7); animation: live 1.4s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 79, .7); } 100% { box-shadow: 0 0 0 14px rgba(255, 59, 79, 0); } }
.b-clock { font-variant-numeric: tabular-nums; font-size: clamp(1.1rem, 1.6vw, 1.8rem); letter-spacing: 0; }
.b-updated { font-weight: 500; letter-spacing: 0; color: #9cc9c3; font-size: .75rem; }
.b-main { max-width: none; width: 100%; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 440px); gap: 18px; padding: 4px 28px 14px; min-height: 0; }
.b-race { min-height: 0; display: flex; flex-direction: column; }
.b-race .race { flex: 1; min-height: 0; background: rgba(0, 0, 0, .18); backdrop-filter: blur(2px); }
.b-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: hidden; }
.b-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.b-kpi { background: rgba(255, 255, 255, .07); border: 1px solid rgba(204, 230, 227, .2); border-radius: 16px; padding: 10px 14px; }
.b-kpi span { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #b9dcd7; font-weight: 700; }
.b-kpi b { display: block; font-size: clamp(1.5rem, 2.2vw, 2.4rem); font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.b-kpi.main { grid-column: 1 / -1; background: linear-gradient(135deg, #8dc03d, #a4d233); color: #063f3a; border: 0; }
.b-kpi.main span { color: #0a5750; }
.b-kpi.main b { font-size: clamp(2.4rem, 4vw, 4.2rem); }
.b-panel { background: rgba(255, 255, 255, .06); border: 1px solid rgba(204, 230, 227, .18); border-radius: 16px; padding: 12px 14px; min-height: 0; overflow: hidden; }
.b-panel h2 { color: #fff; font-size: 1rem; margin-bottom: 8px; }
.b-feed, .b-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.b-feed li { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; font-size: .86rem; }
.b-feed li.new { animation: feedIn .9s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes feedIn { from { transform: translateX(40px) scale(.9); opacity: 0; background: rgba(164, 210, 51, .4); } to { transform: none; opacity: 1; } }
.f-avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 18px; border: 2.5px solid; }
.f-plus { background: #8dc03d; color: #063f3a; font-weight: 900; border-radius: 999px; padding: 0 7px; font-size: .75rem; }
.f-sub { color: #b9dcd7; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.f-ago { color: #9cc9c3; font-size: .72rem; white-space: nowrap; }
.b-top li { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 8px; align-items: center; font-size: .9rem; }
.t-rank { text-align: center; font-weight: 800; }
.t-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-team { color: #b9dcd7; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.b-top b { color: #a4d233; font-size: 1.05rem; }
.empty-feed { color: #b9dcd7; font-size: .85rem; display: block !important; }
.b-ticker { display: flex; align-items: center; background: #8dc03d; color: #063f3a; font-weight: 800; height: 44px; overflow: hidden; }
.b-ticker-label { flex: none; background: #063f3a; color: #a4d233; padding: 0 18px; height: 100%; display: grid; place-items: center; letter-spacing: .12em; font-size: .8rem; }
.b-ticker-view { overflow: hidden; flex: 1; }
.b-ticker-track { display: inline-flex; white-space: nowrap; animation: ticker 60s linear infinite; font-size: 1.05rem; }
.b-ticker-track span { padding-right: 80px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.b-overlay { position: fixed; inset: 0; pointer-events: none; display: grid; place-items: center; z-index: 10; }
.b-banner { background: rgba(6, 63, 58, .96); border: 4px solid #8dc03d; border-radius: 24px; padding: 22px 44px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(164, 210, 51, .35); animation: bannerIn .7s cubic-bezier(.2, .9, .3, 1.4); max-width: 80vw; }
.b-banner.out { animation: bannerOut .6s ease-in forwards; }
.b-banner-title { font-size: clamp(2rem, 4.2vw, 4.6rem); font-weight: 900; color: #a4d233; letter-spacing: -.02em; }
.b-banner-text { font-size: clamp(1.1rem, 1.9vw, 2rem); font-weight: 700; color: #fff; margin-top: 4px; }
.b-banner.leader .b-banner-title { color: #ffd23f; }
@keyframes bannerIn { from { transform: scale(.4) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bannerOut { to { transform: scale(1.1) translateY(-30px); opacity: 0; } }
.b-confetti { position: fixed; inset: 0; overflow: hidden; }
.b-confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: confetti 2.6s ease-in forwards; }
.b-confetti i:nth-child(3n) { width: 8px; height: 8px; border-radius: 50%; }
@keyframes confetti { to { transform: translateY(110vh) rotate(720deg); } }
.board-locked { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; background: linear-gradient(180deg, #063f3a, #04302c); gap: 8px; padding: 24px; z-index: 1; }
.board-locked h1 { color: #fff; }
.board-locked .big { font-size: 64px; }
@media (prefers-reduced-motion: reduce) { .b-ticker-track { animation-duration: 240s !important; } .b-dot, .b-today-tool { animation: none; } }

/* ---------- Utilidades ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.grow { flex: 1 1 auto; }
.row.center { justify-content: center; }

/* ---------- Reporteador por pasos ---------- */
.wizard { display: grid; gap: 14px; }
.wizard h3 { margin-top: 6px; font-size: .95rem; color: var(--brand-deep); }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: s; }
.stepper li { position: relative; }
.stepper li::after { content: ''; position: absolute; top: 17px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 3px; border-radius: 3px; background: var(--line); }
.stepper li:last-child::after { display: none; }
.stepper li.done::after { background: var(--lime); }
.stepper button { all: unset; display: grid; justify-items: center; gap: 4px; width: 100%; cursor: pointer; text-align: center; }
.stepper button:disabled { cursor: default; }
.stepper button:focus-visible .dot { outline: 3px solid var(--lime); outline-offset: 2px; }
.stepper .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #fff; border: 2px solid var(--line); color: var(--ink-3); transition: all .25s; }
.stepper .lbl { font-size: .78rem; font-weight: 600; color: var(--ink-3); }
.stepper li.current .dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 5px rgba(0, 126, 114, .15); }
.stepper li.current .lbl { color: var(--brand-deep); }
.stepper li.done .dot { background: var(--lime); border-color: var(--lime); color: var(--brand-deep); }
.wiz-body { display: grid; gap: 10px; animation: wizIn .25s ease; }
@keyframes wizIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wiz-foot { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.choice-grid.two { grid-template-columns: repeat(2, 1fr); }
.choice-grid.three { grid-template-columns: repeat(3, 1fr); }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.choice:hover { border-color: var(--brand); transform: translateY(-1px); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--mint); box-shadow: inset 0 0 0 1px var(--brand); }
.choice:has(input:checked)::after { content: '✔'; position: absolute; top: 6px; right: 9px; font-size: .75rem; color: var(--brand); font-weight: 800; }
.choice:has(input:focus-visible) { outline: 3px solid var(--lime); outline-offset: 2px; }
.choice-icon { font-size: 1.35rem; line-height: 1; }
.choice-text { display: grid; min-width: 0; }
.choice-text b { font-size: .92rem; overflow-wrap: anywhere; }
.choice-text small { color: var(--ink-3); font-size: .78rem; }
.choice.big { padding: 16px; }
.choice.big .choice-icon { font-size: 2rem; }
.choice.chip { border-radius: 999px; padding: 7px 14px; }
.choice.chip .choice-icon { font-size: 1rem; }
.choice.chip:has(input:checked)::after { display: none; }
.choice.chip:has(input:checked) { background: var(--brand); color: #fff; }
.locked-tool { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--mint); border: 1.5px solid var(--brand); }
.locked-tool > div { display: grid; }
.quality { margin-top: 6px; }
.quality-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.quality-bar span { display: block; height: 100%; border-radius: 6px; background: #f2b632; transition: width .3s; }
.quality-bar.q3 span { background: var(--lime); }
.quality-bar.q0 span { width: 4% !important; }
.quality ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--ink-3); }
.quality li.ok { color: var(--good); font-weight: 600; }
.dropzone { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 26px 16px; border: 2px dashed #9ccbc5; border-radius: 16px; background: var(--mint); cursor: pointer; transition: all .2s; }
.dropzone:hover, .dropzone.over, .dropzone:focus-visible { border-color: var(--brand); background: #e3f3f1; outline: none; }
.dropzone.over { transform: scale(1.01); box-shadow: 0 0 0 5px rgba(141, 192, 61, .25); }
.dropzone small { color: var(--ink-3); }
.dz-icon { font-size: 2rem; }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.file-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.file-item.error { border-color: #f5bcc5; background: #fde8eb; }
.file-item.done { border-color: #c9e3a0; }
.file-thumb { width: 48px; height: 48px; flex: none; border-radius: 10px; background: var(--mint); display: grid; place-items: center; font-size: 1.4rem; overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.file-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.file-meta small { color: var(--ink-3); font-size: .76rem; }
.progress { height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--brand); transition: width .15s; }
.summary dl { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sum-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.sum-row:last-child { border-bottom: 0; }
.sum-row:nth-child(odd) { background: #fafdfc; }
.sum-row dt { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.sum-row dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.auto-meta { border-radius: 14px; padding: 12px 14px; background: var(--lime-soft); border: 1px solid #ddf1a5; font-size: .86rem; }
.auto-meta ul { margin: 6px 0 0; padding-left: 1.1rem; }
.wiz-done { text-align: center; padding: 24px 8px; display: grid; gap: 8px; justify-items: center; }
.wiz-done .big { font-size: 3rem; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .stepper .lbl { font-size: .68rem; }
  .choice-grid.three, .choice-grid.two { grid-template-columns: 1fr; }
  .sum-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Evidencias y trazabilidad ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.g-item { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: grid; }
.g-item.audio, .g-item.video { grid-column: span 2; }
.g-img { display: block; aspect-ratio: 4 / 3; background: var(--mint); }
.g-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-item video { width: 100%; max-height: 260px; background: #000; }
.g-item audio { width: 100%; padding: 10px 8px 0; }
.g-file { display: grid; place-items: center; aspect-ratio: 4 / 3; font-size: 2.4rem; background: var(--mint); text-decoration: none; }
.g-item figcaption { padding: 6px 9px 8px; display: grid; gap: 1px; font-size: .78rem; }
.g-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-item small { color: var(--ink-3); }
.trace { margin-top: 8px; }
.trace summary, details > summary { cursor: pointer; font-weight: 600; color: var(--brand-dark); }
.timeline { list-style: none; margin: 10px 0 0; padding: 0 0 0 4px; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; position: relative; padding-bottom: 12px; }
.timeline li::before { content: ''; position: absolute; left: 14px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); border: 2px solid var(--mint-2); font-size: .85rem; z-index: 1; }
.tl-admin_reporte_calificado .tl-dot { background: var(--lime-soft); border-color: var(--lime); }
.tl-reporte_calificado_ia .tl-dot { background: #eaf1fd; border-color: #c4d6f7; }
.final-check { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--mint); border: 1px solid var(--mint-2); }
.final-check .section-head { margin-bottom: 8px; }
.meta-line { margin: 4px 0 0; }

/* ---------- Validación de clientes ---------- */
.validator { display: grid; gap: 12px; }
.client-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.client-tab { font: inherit; font-weight: 600; font-size: .86rem; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.client-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.client-tab .chk { font-size: .75rem; border-radius: 999px; padding: 0 6px; background: var(--lime); color: var(--brand-deep); }
.client-tab .chk.no_coincide { background: #f2b632; }
.dl.compact { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.dl.compact .big dd { color: var(--brand-dark); }

/* ---------- Aldea: barra de acciones del agente ---------- */
.world-actions { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; width: min(620px, calc(100% - 24px)); animation: waIn .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes waIn { from { opacity: 0; transform: translate(-50%, 18px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
.wa-title { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(6, 63, 58, .88); color: #fff; font-size: .9rem; backdrop-filter: blur(6px); border: 1px solid rgba(141, 192, 61, .6); }
.wa-title .pill { font-size: .72rem; }
.wa-row { display: flex; gap: 10px; width: 100%; justify-content: center; }
.wa-btn { flex: 1 1 0; display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: #fff; border: 2px solid rgba(255, 255, 255, .25); border-radius: 18px; padding: 12px 16px; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .15s, box-shadow .15s; }
.wa-btn:hover:not(:disabled), .wa-btn:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(141, 192, 61, .45); outline: none; border-color: var(--lime-2); }
.wa-btn:disabled { filter: grayscale(.8); opacity: .65; cursor: not-allowed; }
.wa-btn b { display: block; font-size: 1rem; }
.wa-btn small { display: block; opacity: .85; font-size: .75rem; }
.wa-btn.report { background: linear-gradient(135deg, #007e72, #0a5750); }
.wa-btn.clients { background: linear-gradient(135deg, #8dc03d, #5f8f1f); color: #063f3a; }
.wa-btn.clients small { opacity: .9; }
.wa-ico { font-size: 1.7rem; line-height: 1; }
.wa-info { flex: none; width: 52px; border-radius: 18px; border: 2px solid rgba(255, 255, 255, .3); background: rgba(6, 63, 58, .85); color: #fff; font-size: 1.2rem; cursor: pointer; }
.wa-info:hover { border-color: var(--lime-2); }
.world-dialog.wide { width: min(860px, calc(100% - 24px)); }
.world-dialog.wide .dialog-body { max-height: 80vh; }
@media (max-width: 640px) {
  .world-actions { bottom: 54px; }
  .wa-btn { padding: 10px; gap: 8px; }
  .wa-btn b { font-size: .86rem; }
  .wa-btn small { display: none; }
  .wa-ico { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) { .world-actions, .wiz-body, .wiz-done .big { animation: none; } }
.final-check .row select { width: auto; flex: 0 0 auto; }
.final-check .row .grow { flex: 1 1 260px; }

/* ---------- Mi equipo: personas, líderes y sesiones ---------- */
button.member { font: inherit; font-size: .8rem; border: 1px solid transparent; cursor: pointer; }
button.member:hover { border-color: var(--brand); }
.slot-select { width: auto; padding: 4px 8px; font-size: .82rem; }
.team-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 22px 24px; border-radius: 20px; color: #fff;
  background: linear-gradient(120deg, var(--brand-deep), var(--brand) 60%, color-mix(in srgb, var(--team, var(--lime)) 70%, var(--brand))); box-shadow: var(--shadow); }
.team-hero h1 { margin: 0; color: #fff; }
.team-hero p { margin: 2px 0 0; opacity: .9; }
.team-hero small { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; opacity: .8; }
.team-hero .avatar-xl { width: 72px; height: 72px; font-size: 40px; background: #fff; }
.team-hero-stats { display: flex; gap: 10px; }
.team-hero-stats > div { display: grid; text-align: center; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); border-radius: 14px; padding: 8px 14px; min-width: 86px; }
.team-hero-stats b { font-size: 1.35rem; }
.people { display: grid; gap: 8px; }
.grid-people { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.person { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.person.leader { background: var(--lime-soft); border-color: #cfe59a; }
.person.me { box-shadow: inset 0 0 0 2px var(--brand); }
.person-avatar { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--brand); }
.person.leader .person-avatar { background: var(--brand-deep); }
.person-crown { position: absolute; top: -10px; right: -6px; font-size: .95rem; }
.person-info { display: grid; min-width: 0; flex: 1; }
.person-info b, .person-info a, .person-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-info small { color: var(--ink-3); }
.person-stats { display: grid; text-align: center; }
.person-stats b { font-size: 1.15rem; color: var(--brand-dark); }
.person-stats small { font-size: .7rem; color: var(--ink-3); }
.meetings { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.meeting { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 14px; border: 1px solid var(--line); }
.meeting.today { border-color: var(--lime); background: var(--lime-soft); }
.m-date { flex: none; width: 52px; display: grid; text-align: center; border-radius: 12px; background: var(--brand); color: #fff; padding: 4px 0; }
.m-date b { font-size: 1.3rem; line-height: 1.1; }
.m-date small { font-size: .7rem; text-transform: uppercase; }
.m-tags { display: grid; gap: 4px; justify-items: end; }
.slot-block + .slot-block { margin-top: 14px; }
.leader-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.leader-card { border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 14px; padding: 10px 12px; background: #fff; }
.leader-card.mine { background: var(--lime-soft); }
.leader-card ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; font-size: .88rem; }
.leader-card a { overflow-wrap: anywhere; }
.lc-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lc-head .avatar { width: 30px; height: 30px; font-size: 16px; }
.att-list { display: grid; gap: 10px; }
.att-team { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.att-head { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.att-head .avatar { width: 28px; height: 28px; font-size: 15px; }
.att-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px 0; font-size: .9rem; }
.att-btns { display: flex; gap: 4px; }
.att-btn { font: inherit; font-size: .76rem; font-weight: 600; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 9px; cursor: pointer; }
.att-btn.asistio.on { background: #e6f4ea; border-color: var(--good); color: var(--good); }
.att-btn.falto.on { background: #fde8eb; border-color: var(--bad); color: var(--bad); }
.att-btn.excusa.on { background: #fff3db; border-color: var(--warn); color: var(--warn); }
@media (max-width: 640px) {
  .team-hero-stats { width: 100%; }
  .team-hero-stats > div { flex: 1; min-width: 0; }
  .meeting { flex-wrap: wrap; }
}
.lc-head { flex-wrap: nowrap; }
.lc-head b { flex: 1; min-width: 0; }
.leader-card li a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .team-hero-stats > div { padding: 8px 6px; }
  .team-hero-stats b { font-size: 1.05rem; }
  .team-hero-stats small { font-size: .62rem; letter-spacing: .04em; }
}

/* ---------- Perfiles ---------- */
.pill.role-admin { background: var(--brand-deep); color: #fff; }
.pill.role-coach { background: #ede9fe; color: #5b21b6; }
.pill.role-representante { background: var(--lime); color: var(--brand-deep); }
.pill.role-probador { background: var(--mint); color: var(--brand-dark); border-color: var(--mint-2); }
.coach-check { width: 20px; height: 20px; accent-color: #6d28d9; cursor: pointer; }
.coach-box { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.coach-box .person { background: #f5f3ff; border-color: #ddd6fe; }
.coach-box .person-avatar { background: #6d28d9; }
.lc-coach { margin: 8px 0 0; color: #5b21b6; }

/* ---------- Datos por corregir ---------- */
.card.pending { border-left: 5px solid #f2b632; }
.pending-list { display: grid; gap: 8px; }
.pending-row { display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(220px, 1.4fr) minmax(140px, .8fr) auto; gap: 12px; align-items: end; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pending-who { display: grid; gap: 2px; align-self: center; }
.pending-who small { color: var(--ink-3); }
.pending-issue { color: var(--warn); }
.pending-field { display: grid; gap: 3px; }
.pending-field small { color: var(--ink-3); font-weight: 600; }
.pending-field input.bad { border-color: #f3d7a1; background: #fffaf0; }
.linklike { all: unset; cursor: pointer; color: var(--brand); text-decoration: underline; font-size: .78rem; }
.linklike:focus-visible { outline: 2px solid var(--lime); }
@media (max-width: 760px) { .pending-row { grid-template-columns: 1fr; } }

/* ---------- Resumen de participantes y coaches ---------- */
.summary-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.summary-grid .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.coach-pick { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 8px; border-radius: 12px; background: #f5f3ff; border: 1px solid #ddd6fe; font-size: .85rem; font-weight: 600; color: #5b21b6; }
.coach-pick:not(.has) { background: #fff7ed; border-color: #fed7aa; color: var(--warn); }
.coach-select { flex: 1; min-width: 0; padding: 5px 8px; font-size: .85rem; }
.member-group { margin-top: 10px; }
.member-group .members { margin-top: 4px; }
.mg-title { font-size: .78rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.card > .coach-pick:first-of-type { margin-top: 12px; }

/* ---------- Calendario de sesiones ---------- */
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cal-head { margin: 6px 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); text-align: center; }
.cal-week + .cal-week { margin-top: 8px; }
.cal-day { min-height: 92px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; display: grid; gap: 6px; align-content: start; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--lime); }
.cal-day.holiday { background: repeating-linear-gradient(135deg, #fafafa, #fafafa 8px, #f1f1f1 8px, #f1f1f1 16px); }
.cal-day.has-meeting { background: var(--mint); border-color: var(--mint-2); }
.cal-day.selected { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-date { display: flex; align-items: baseline; gap: 6px; }
.cal-date b { font-size: 1.25rem; color: var(--brand-deep); }
.cal-date span { font-size: .72rem; color: var(--ink-3); text-transform: capitalize; }
.cal-holiday { font-size: .74rem; color: var(--bad); font-weight: 600; }
.cal-test, .cal-fb, .cal-legend-mt { font-size: .74rem; font-weight: 600; border-radius: 8px; padding: 3px 7px; }
.cal-test.p1 { background: #e3f3f1; color: var(--brand-dark); border-left: 3px solid var(--brand); }
.cal-test.p2 { background: #f5f3ff; color: #5b21b6; border-left: 3px solid #7c3aed; }
.cal-fb { background: #fff7ed; color: var(--warn); border-left: 3px solid #f2b632; }
.cal-legend-mt { background: var(--lime-soft); color: var(--brand-deep); border-left: 3px solid var(--lime); }
.cal-meeting { all: unset; cursor: pointer; display: grid; gap: 4px; border-radius: 10px; padding: 6px; background: #fff; border: 1px solid var(--mint-2); border-left: 3px solid var(--lime); }
.cal-meeting:hover, .cal-meeting:focus-visible { border-color: var(--brand); }
.cal-mt-title { font-size: .78rem; font-weight: 700; color: var(--brand-deep); }
.cal-slot { border-top: 1px dashed var(--line); padding-top: 4px; }
.cal-slot-head { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-2); }
.cal-teams { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.cal-team { font-size: .68rem; border: 1px solid; border-left-width: 3px; border-radius: 6px; padding: 1px 5px; background: #fff; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
  .cal-head { display: none; }
  .cal-week { grid-template-columns: 1fr; }
}

/* ---------- Validación final ---------- */
.vq-progress { display: grid; gap: 6px; margin-bottom: 12px; }
.vq-bar { height: 10px; border-radius: 10px; background: var(--line); overflow: hidden; }
.vq-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--lime)); transition: width .4s; }
.vq-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.vq-card { border-top: 4px solid var(--brand); }
.vq-ai { display: grid; justify-items: end; gap: 4px; }
.vq-ai small { color: var(--ink-3); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.vq-decide { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--mint); border: 1px solid var(--mint-2); display: grid; gap: 10px; }
.vq-buttons .btn { flex: 1 1 200px; padding: 14px 20px; font-size: 1.05rem; }
.vq-buttons .btn small { font-weight: 600; opacity: .7; border: 1px solid currentColor; border-radius: 6px; padding: 0 6px; font-size: .72rem; }
.btn.vq-yes { background: var(--good); }
.btn.vq-no { background: var(--bad); }
.rubric { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rubric-total { display: flex; justify-content: space-between; align-items: center; }
.rubric-total b { font-size: 1.4rem; color: var(--brand-deep); }
.rubric-row { display: grid; grid-template-columns: 1fr auto 18px; gap: 8px; align-items: center; font-size: .86rem; }
.rubric-dots { display: flex; gap: 4px; }
.rubric-dots i { width: 22px; height: 8px; border-radius: 4px; background: var(--line); }
.rubric-dots i.on.v1 { background: #f2b632; }
.rubric-dots i.on.v2 { background: var(--brand); }
.interaction { margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--mint-2); background: #fafdfc; }
.transcript { max-height: 320px; overflow: auto; display: grid; gap: 6px; margin-top: 8px; font-size: .86rem; }
.transcript > div { padding: 6px 10px; border-radius: 10px; max-width: 92%; }
.tr-bot { background: var(--mint); justify-self: start; }
.tr-user { background: var(--lime-soft); justify-self: end; }

/* ---------- Llamadas e integraciones ---------- */
.health-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.health { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #fff; display: grid; gap: 4px; }
.health .row { gap: 8px; flex-wrap: nowrap; }
.health b { font-size: .88rem; }
.health small { font-size: .76rem; color: var(--ink-2); overflow-wrap: anywhere; }
.health .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--bad); box-shadow: 0 0 0 3px #fde8eb; }
.health.ok .dot { background: var(--good); box-shadow: 0 0 0 3px #e6f4ea; }
.health.down { border-color: #f5bcc5; }
.live-card { border-left: 6px solid var(--brand); }
.live-card.is-live { border-left-color: var(--bad); background: #fff8f8; }
dialog.wide-dialog { width: min(900px, calc(100% - 24px)); }
dialog.wide-dialog .dialog-body { max-height: 80vh; }
select[multiple] { width: 100%; }
.call-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.call-item { all: unset; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.call-item:hover, .call-item:focus-visible { border-color: var(--brand); }
.call-item > span:last-child { display: grid; gap: 2px; min-width: 0; }
.call-item small { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.call-ico { font-size: 1.4rem; }
label.row input[type="checkbox"], .row > input[type="checkbox"] { width: auto; margin: 0; }

/* ---------- Horario tipo colegio ---------- */
.timetable { overflow: hidden; }
.tt-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tt-chip { font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.tt { display: grid; grid-template-rows: auto 540px; column-gap: 6px; }
.tt-corner { }
.tt-day { text-align: center; padding: 6px 2px 8px; border-radius: 10px 10px 0 0; display: grid; line-height: 1.15; }
.tt-day b { text-transform: capitalize; color: var(--brand-deep); }
.tt-day span { font-size: .78rem; color: var(--ink-3); }
.tt-day.today { background: var(--lime-soft); }
.tt-day.holiday b, .tt-day.holiday span { color: var(--bad); }
.tt-hours { position: relative; }
.tt-hours span { position: absolute; right: 4px; transform: translateY(-50%); font-size: .68rem; color: var(--ink-3); white-space: nowrap; }
.tt-col { position: relative; background: #fafdfc; border: 1px solid var(--line); border-radius: 10px; }
.tt-col.today { background: #f7fbe9; border-color: #cfe59a; }
.tt-line { position: absolute; left: 0; right: 0; border-top: 1px dashed #e3eeec; }
.tt-block { all: unset; box-sizing: border-box; position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 4px 6px; cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; gap: 1px; font-size: .74rem; line-height: 1.2; border-left: 4px solid; box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: transform .12s, box-shadow .12s; }
.tt-block:hover, .tt-block:focus-visible { transform: scale(1.02); box-shadow: 0 6px 16px rgba(6, 63, 58, .18); z-index: 2; outline: none; }
.tt-block b { font-size: .76rem; }
.tt-block small { font-size: .68rem; opacity: .85; }
.tt-block.short { flex-direction: row; align-items: center; gap: 6px; padding: 2px 6px; }
.tt-block.short b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-block.short small { white-space: nowrap; }
.tt-teams { font-weight: 600; }
.k-correo { background: #eaf1fd; border-color: #3b82f6; color: #1e3a8a; }
.k-alineacion { background: var(--lime-soft); border-color: var(--lime); color: var(--brand-deep); }
.k-prueba { background: #e3f3f1; border-color: var(--brand); color: var(--brand-deep); }
.k-feedback { background: #fff3db; border-color: #f2b632; color: #6e4300; }
.k-seleccion { background: #fde8eb; border-color: var(--bad); color: #7d0c1d; }
.k-fase2 { background: #f5f3ff; border-color: #7c3aed; color: #4c1d95; }
.k-deliberacion { background: #ede9fe; border-color: #5b21b6; color: #3b0764; }
.k-festivo { background: repeating-linear-gradient(135deg, #fafafa, #fafafa 8px, #f0f0f0 8px, #f0f0f0 16px); border-color: #cbd5e1; color: #64748b; }
.dialog-head.k-correo, .dialog-head.k-alineacion, .dialog-head.k-prueba, .dialog-head.k-feedback, .dialog-head.k-seleccion, .dialog-head.k-fase2, .dialog-head.k-deliberacion, .dialog-head.k-festivo { border-left: 0; }
.agenda-teams, .pending-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.agenda-team { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: 8px 10px; font-size: .86rem; }
.agenda-team ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 3px; }
.att-tag { margin-left: 6px; font-size: .72rem; font-weight: 600; border-radius: 999px; padding: 0 6px; }
.att-tag.asistio { background: #e6f4ea; color: var(--good); }
.att-tag.falto { background: #fde8eb; color: var(--bad); }
.att-tag.excusa { background: #fff3db; color: var(--warn); }
.tt-list { display: none; }
.tt-list-day h3 { margin: 12px 0 6px; text-transform: capitalize; }
.tt-list-item { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 2px; width: 100%; padding: 8px 10px; border-radius: 10px; border-left: 4px solid; margin-bottom: 6px; font-size: .86rem; }
.tt-list-item span { font-size: .74rem; opacity: .8; }
.confirm-card { border-left: 6px solid var(--lime); margin-bottom: 16px; }
.confirm-card .big { font-size: 2rem; }
.kickoff .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kickoff input[type="datetime-local"] { width: auto; }
@media (max-width: 760px) {
  .tt { display: none; }
  .tt-list { display: block; }
}
.tt-block.short b { flex: 1 1 auto; min-width: 0; }
.tt-block.short small { flex: none; }

/* ---------- Reglas y agenda (ventana) ---------- */
.world-rules-btn { position: absolute; left: 14px; top: 92px; display: flex; gap: 10px; align-items: center; text-align: left; font: inherit; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, rgba(6, 63, 58, .92), rgba(0, 126, 114, .92)); border: 2px solid var(--lime); border-radius: 16px; padding: 8px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.world-rules-btn span:first-child { font-size: 1.5rem; }
.world-rules-btn b { display: block; font-size: .92rem; }
.world-rules-btn small { display: block; font-size: .72rem; opacity: .85; }
.world-rules-btn:hover, .world-rules-btn:focus-visible { transform: translateY(-2px); outline: none; box-shadow: 0 10px 28px rgba(141, 192, 61, .45); }
dialog.rules-popup { width: min(960px, calc(100% - 24px)); }
dialog.rules-popup .dialog-body { max-height: 82vh; }
.rp-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.rp-tabs button { font: inherit; font-weight: 700; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; cursor: pointer; color: var(--brand-deep); }
.rp-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.rp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; counter-reset: none; }
.rp-steps li { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 14px 10px; border-radius: 14px; background: var(--mint); border: 1px solid var(--mint-2); }
.rp-steps p { margin: 0; font-size: .84rem; color: var(--ink-2); }
.rp-step-icon { font-size: 2rem; }
.rp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 14px; }
.rp-facts > div { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.rp-facts p { margin: 4px 0 0; font-size: .84rem; }
.rp-criteria { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.rp-criteria > div { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 10px 6px; border-radius: 12px; background: var(--lime-soft); border: 1px solid #ddf1a5; }
.rp-criteria span { font-size: 1.5rem; }
.rp-criteria small { font-size: .74rem; color: var(--ink-2); }
.rp-quiz { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.rp-q { padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; display: grid; gap: 8px; }
.rp-q p { margin: 0; font-style: italic; }
.rp-q.right { border-color: var(--good); background: #f3fbf5; }
.rp-q.wrong { border-color: var(--bad); background: #fff6f7; }
.rp-res { font-size: .84rem; }
.rp-score { margin-top: 12px; text-align: center; }
.home-section { margin: 22px 0 10px; }
.my-reports { margin-top: 22px; }
@media (max-width: 760px) {
  .rp-criteria { grid-template-columns: repeat(2, 1fr); }
  .world-rules-btn { top: auto; bottom: 110px; left: 10px; padding: 6px 10px; }
  .world-rules-btn small { display: none; }
}
.k-eleccion { background: #e0f2fe; border-color: #0284c7; color: #075985; }
.tt-block.split b { font-size: .7rem; }
.tt-block.split small { font-size: .64rem; }
.election { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #f0f9ff; border: 1px solid #bae6fd; }
.election h3 { margin: 0; color: #075985; }
.election-steps { margin: 8px 0; padding-left: 1.2rem; color: var(--ink-2); }
.vote-list { display: grid; gap: 6px; max-height: 340px; overflow: auto; }
.vote-option { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); cursor: pointer; }
.vote-option:has(input:checked) { border-color: #0284c7; box-shadow: inset 0 0 0 1px #0284c7; }
.vote-option input { width: 18px; height: 18px; margin: 0; accent-color: #0284c7; }
.vote-option .pill { margin-left: 6px; }
.vote-count { font-weight: 700; color: #075985; font-variant-numeric: tabular-nums; }
.tt-block.over { z-index: 1; box-shadow: 0 2px 8px rgba(6, 63, 58, .18); }
