@import url("/static/fonts/fonts.css");
@import url("/static/jugador.css");
@import url("/static/pasos.css");

:root {
  --bg: #0f0f0f; --card: #1a1a1a; --card-2: #232323; --text: #f4f4f0; --muted: #9a9a94; --line: #2c2c2c;
  --lime: #d4f54c; --lime-ink: #111; --b: #8f8f88;
  --accent: var(--lime); --accent-2: #2a3312; --warn: #f0c64a; --warn-bg: #2b2510; --err: #ff7b6b;
  --radius: 24px;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font: 16px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
       background: var(--bg); color: var(--text); padding-bottom: calc(96px + env(safe-area-inset-bottom, 0)); }
body.noscroll { overflow: hidden; }
a { color: var(--lime); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h1, h2 { letter-spacing: -.02em; }
h2 em, h1 em { font-style: normal; color: var(--lime); }
.note { font-family: "Caveat", cursive; color: var(--lime); font-size: 1.45rem; line-height: 1.05; }
.hint { color: var(--muted); font-size: .92rem; margin: 4px 0 0; }
.center { text-align: center; }
main { max-width: 1040px; margin: 0 auto; padding: 4px 16px 40px; }
header { max-width: 1040px; margin: 0 auto; padding: 8px 16px 0; }
header h1 { margin: 0; font-size: 1.8rem; font-weight: 800; }
header p { margin: 4px 0 0; color: var(--muted); }

/* Barra superior */
.topline { max-width: 1040px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top, 0)) 16px 8px;
           display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(212,245,76,.15); }
.iconbtn { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; background: var(--card);
           color: var(--text); display: grid; place-items: center; border: 0; cursor: pointer; }

/* Portada */
.hero { position: relative; border-radius: 28px; overflow: hidden; background: #0b0b0b; min-height: 480px;
        display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; margin: 4px 0 16px; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(15,15,15,.96) 85%); }
.hero > *:not(img) { position: relative; z-index: 1; }
.hero h1 { margin: 0; font-size: 2.6rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
.hero p { margin: 10px 0 0; color: #d0d0cb; max-width: 440px; }
.hero .note { position: absolute; top: 20px; left: 22px; transform: rotate(-6deg); }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 22px; }
.how div { background: var(--card); border-radius: 20px; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.how b { width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); display: grid; place-items: center; font-size: .9rem; }
.how span { font-size: .85rem; font-weight: 600; line-height: 1.25; }

.sectionhead { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.sectionhead h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.chip { min-height: 38px; padding: 0 16px; border-radius: 99px; border: 1px solid #3a3a3a; background: none; color: var(--text); font-weight: 700; }

/* Tarjetas genéricas */
.card { background: var(--card); border: 0; border-radius: var(--radius); padding: 20px; margin: 14px 0; }
.card h2 { margin: 0 0 8px; font-size: 1.3rem; font-weight: 800; }
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .95rem; }
select, input[type=number], input[type=text], input:not([type]), input[type=file], textarea { width: 100%; padding: 14px; font: inherit; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--text); }
textarea { resize: vertical; }
select:focus, input:focus, textarea:focus { outline: 2px solid var(--lime); border-color: transparent; }
details summary { cursor: pointer; font-weight: 600; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 22px; border: 0; border-radius: 99px; font: inherit; font-size: 1rem;
  font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .12s, opacity .2s; }
button:active, .button:active { transform: scale(.98); }
.primary { background: var(--lime); color: var(--lime-ink); width: 100%; margin-top: 18px; }
.primary::after { content: "→"; font-weight: 800; }
.secondary { background: var(--card-2); color: var(--text); }
.ic { width: 18px; height: 18px; }
button:disabled { opacity: .4; cursor: default; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.actions > * { flex: 1 1 200px; margin-top: 0; }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 12px 0; }
.bar > div { height: 100%; background: var(--lime); width: 0; transition: width .6s; border-radius: 99px; }
.stage { font-weight: 700; }
.warn { background: var(--warn-bg); color: var(--warn); border-radius: 16px; padding: 12px 14px; margin: 8px 0; font-size: .92rem; }
.error { color: var(--err); white-space: pre-wrap; font: 12px/1.4 ui-monospace, monospace;
         background: var(--bg); padding: 10px; border-radius: 12px; overflow-x: auto; }
.frame-wrap { position: relative; width: 100%; touch-action: manipulation; }
.frame-wrap img { width: 100%; display: block; border-radius: 16px; user-select: none; }
.frame-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.steps span { padding: 6px 12px; border-radius: 99px; border: 1px solid #3a3a3a; font-size: .85rem; }
.steps span.on { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.steps span.done { background: var(--accent-2); color: var(--lime); border-color: transparent; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); background: var(--card-2); border-radius: 20px; overflow: hidden; }
.stat { padding: 14px 12px; text-align: center; }
.stat b { display: block; font-size: 1.4rem; font-weight: 800; }
.stat span { color: var(--muted); font-size: .82rem; }

/* Lista de partidos */
ul.jobs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
ul.jobs > li { background: var(--card); border-radius: 24px; overflow: hidden; }
ul.jobs > li:first-child:not(.empty):not(.hint) { background: var(--lime); }
ul.jobs > li:first-child:not(.empty) a { color: var(--lime-ink); }
ul.jobs > li:first-child:not(.empty) .jinfo span { color: #3a4a10; }
ul.jobs > li:first-child:not(.empty) .badge { background: rgba(0,0,0,.12); color: var(--lime-ink); }
ul.jobs > li.hint { background: none; }
ul.jobs a { display: block; position: relative; color: var(--text); text-decoration: none; }
.thumb { aspect-ratio: 16/8; background: #000 linear-gradient(135deg, #1f1f1f, #121212); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); opacity: .85; display: block; }
.jinfo { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 2px; padding-right: 64px; }
.jinfo b { font-size: 1.1rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jinfo span { color: var(--muted); font-size: .85rem; }
ul.jobs .badge { position: absolute; top: 12px; left: 12px; background: rgba(15,15,15,.75); backdrop-filter: blur(6px); }
.go { position: absolute; right: 14px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%; background: #0f0f0f;
      color: var(--lime); display: grid; place-items: center; }
.go svg { width: 18px; height: 18px; }
li.empty { padding: 26px 20px; text-align: center; display: flex; flex-direction: column; gap: 6px; grid-column: 1/-1; }
li.empty b { font-size: 1.15rem; }
li.empty span { color: var(--muted); }
#mlist { display: block; }
#mlist li { background: none; border-top: 1px solid var(--line); border-radius: 0; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 99px;
         background: var(--card-2); color: var(--muted); white-space: nowrap; }
.badge.done { color: var(--lime); }
.badge.running, .badge.queued, .badge.checking { color: var(--warn); }
.badge.error { color: var(--err); }
video { width: 100%; border-radius: 16px; background: #000; }

/* Hoja de subida (pasos) */
.sheet { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
         display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet[hidden] { display: none; }
.sheetbox { width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto; background: var(--bg);
            border-radius: 28px 28px 0 0; padding: 14px 20px calc(20px + env(safe-area-inset-bottom, 0));
            animation: up .25s ease-out; display: flex; flex-direction: column; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheethead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 26px; height: 6px; border-radius: 99px; background: var(--line); transition: background .2s; }
.dots i.on { background: var(--lime); }
.step h2 { font-size: 1.8rem; font-weight: 800; margin: 10px 0 2px; }
.step { min-height: 340px; }
.drop { margin: 18px 0 0; border: 2px dashed #3a3a3a; border-radius: 24px; padding: 34px 16px; text-align: center;
        display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; transition: border-color .2s, background .2s; }
.drop svg { width: 40px; height: 40px; color: var(--lime); }
.drop b { font-size: 1.05rem; word-break: break-all; }
.drop span { color: var(--muted); font-size: .9rem; font-weight: 500; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop.over, .drop.ok { border-color: var(--lime); background: rgba(212,245,76,.06); }
.tip { margin-top: 16px; background: var(--card); border-radius: 20px; padding: 14px 16px; color: #d0d0cb; font-size: .92rem; }
.tip .note { display: block; font-size: 1.3rem; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.choice { min-height: 96px; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 0; padding: 14px 16px;
          border-radius: 22px; background: var(--card); color: var(--text); border: 2px solid transparent; text-align: left; }
.choice b { font-size: 1.05rem; }
.choice span { color: var(--muted); font-size: .85rem; font-weight: 500; }
.choice.on { background: var(--lime); color: var(--lime-ink); }
.choice.on span { color: #3a4a10; }
.adv { margin-top: 16px; background: var(--card); border-radius: 18px; padding: 14px 16px; }
.adv summary { color: var(--muted); }
.sheetfoot { margin-top: auto; padding-top: 8px; }

/* Pantalla del partido */
.jobhero { max-width: 1040px; margin: 0 auto; padding: 0 16px; position: relative; }
.jobhero img { width: 100%; aspect-ratio: 16/7; object-fit: cover; border-radius: 24px; filter: grayscale(1) contrast(1.1); opacity: .7; display: block; }
.jobhero div { padding: 14px 4px 0; }
.jobhero img + div { position: absolute; left: 28px; right: 28px; bottom: 16px; padding: 0; }
.jobhero h1 { margin: 6px 0 0; font-size: 1.9rem; font-weight: 800; line-height: 1.1; word-break: break-word; }
.jobhero .hint { color: #d0d0cb; }
.vs { display: flex; justify-content: space-between; align-items: center; font-weight: 800; margin-bottom: 6px; }
.vs .ta { color: var(--lime); }
.vs .tb { color: var(--text); }
.cmp { padding: 12px 0; border-top: 1px solid var(--line); }
.cmp:first-child { border-top: 0; }
.cmpnums { display: flex; justify-content: space-between; align-items: baseline; }
.cmpnums span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.cmpnums b { font-size: 1.25rem; font-weight: 800; min-width: 90px; color: #cfcfca; }
.cmpnums b:last-child { text-align: right; }
.cmpnums b.win { color: var(--text); }
.cmpbar { display: flex; gap: 4px; height: 8px; margin-top: 8px; }
.cmpbar i { display: block; height: 100%; border-radius: 99px; background: var(--lime); transition: width .6s; }
.cmpbar i + i { background: #4a4a46; }
.warnbox { background: var(--warn-bg); color: var(--warn); border-radius: 18px; padding: 12px 16px; margin: 14px 0 0; }
.warnbox summary { display: flex; justify-content: space-between; list-style: none; }
.warnbox summary::-webkit-details-marker { display: none; }
.warnbox summary span { text-decoration: underline; font-weight: 600; }
.warnbox p { margin: 10px 0 0; font-size: .9rem; color: #e7d9a8; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--lime);
           animation: spin 1s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Menú de abajo */
nav.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom, 0)); z-index: 20;
             display: flex; align-items: center; gap: 8px; background: rgba(26,26,26,.92); backdrop-filter: blur(12px);
             border-radius: 99px; padding: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
nav.tabbar a { display: flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: .9rem;
               font-weight: 700; padding: 10px 16px; border-radius: 99px; }
nav.tabbar a.on { color: var(--lime-ink); background: var(--lime); }
nav.tabbar a.plus { width: 52px; height: 52px; padding: 0; justify-content: center; background: var(--text); color: var(--bg); }
nav.tabbar a.plus svg { width: 26px; height: 26px; stroke-width: 2.5; }

/* Computador: portada a dos columnas */
@media (min-width: 900px) {
  .home { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0 28px; align-items: start; }
  .home .hero { grid-row: span 2; position: sticky; top: 16px; min-height: 640px; }
  .home .how { margin-top: 4px; }
  .home > section:last-child { grid-column: 2; }
  ul.jobs { grid-template-columns: 1fr; }
  .sheet { align-items: center; }
  .sheetbox { border-radius: 28px; }
  .hero h1 { font-size: 3.4rem; }
}
.cmpnums b { white-space: nowrap; } .cmpnums small { font-size: .7em; font-weight: 600; margin-left: 2px; color: var(--muted); } .cmpnums span { text-align: center; padding: 0 6px; }

/* Modo claro: para usar al sol en la cancha */
:root[data-theme="light"] {
  --bg: #f4f5ef; --card: #ffffff; --card-2: #eceee6; --text: #111311; --muted: #5f645a; --line: #dfe2d8;
  --lime-ink: #111; --accent-2: #eef7c9; --warn: #8a5a00; --warn-bg: #fff3d1; --err: #b3261e;
}
:root[data-theme="light"] .hero h1, :root[data-theme="light"] .hero p, :root[data-theme="light"] .jobhero h1 { color: #f4f4f0; }
:root[data-theme="light"] .hero .note, :root[data-theme="light"] h1 em, :root[data-theme="light"] h2 em,
:root[data-theme="light"] .kicker, :root[data-theme="light"] .vs .ta { color: #5d7a00; }
:root[data-theme="light"] .hero h1 em { color: var(--lime); }
:root[data-theme="light"] .go { background: #111; }
:root[data-theme="light"] nav.tabbar { background: rgba(255,255,255,.94); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
:root[data-theme="light"] nav.tabbar a.plus { background: #111; color: #fff; }
:root[data-theme="light"] .iconbtn { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
:root[data-theme="light"] .cmpbar i + i, :root[data-theme="light"] .bandbar i.grey { background: #b9bdb0; }
:root[data-theme="light"] .cmpnums b { color: #6b6f64; }
:root[data-theme="light"] .cmpnums b.win { color: var(--text); }
:root[data-theme="light"] .tip, :root[data-theme="light"] #errhint, :root[data-theme="light"] .fixlist ol,
:root[data-theme="light"] .ptags span { color: #3a3d36; }
:root[data-theme="light"] .warnbox p { color: #6b4a00; }
:root[data-theme="light"] .drop svg, :root[data-theme="light"] .qref span b, :root[data-theme="light"] .plist .av,
:root[data-theme="light"] .qname i, :root[data-theme="light"] .rtips li svg { color: #5d7a00; }
:root[data-theme="light"] .sheet { background: rgba(0,0,0,.35); }
:root[data-theme="light"] .badge.done { color: #4a6500; }
:root[data-theme="light"] .jobhero img { opacity: .9; }
:root[data-theme="light"] .jobhero img + div::before { content: ""; }
.themebtn svg { width: 20px; height: 20px; }
.editbtn { background: none; border: 0; min-height: 0; padding: 4px; color: inherit; opacity: .8; vertical-align: middle; }
.editbtn svg { width: 18px; height: 18px; }
.tname { cursor: pointer; border-bottom: 1px dashed currentColor; }

/* Portada: la imagen completa arriba y el texto debajo, sin taparla */
.hero { min-height: 0; padding: 0 0 22px; justify-content: flex-start; }
.hero::after { display: none; }
.hero img { position: relative; inset: auto; display: block; width: 100%; height: auto; max-height: 520px;
            object-fit: contain; object-position: center; }
.hero > div { padding: 4px 22px 0; }
.hero h1 { margin-top: -8px; }

/* Campos: 16 px evita el zoom automático del iPhone */
input, select, textarea { font-size: 16px !important; }
.sqhead, .sqrow { display: grid; grid-template-columns: 74px 1fr 44px; gap: 8px; align-items: center; }
.sqhead { color: var(--muted); font-size: .8rem; font-weight: 700; padding: 0 2px 6px; }
.sqrow { margin-bottom: 8px; }
.sqrow input { padding: 12px; }
.sqrow .sqnum { text-align: center; font-weight: 800; }
/* Pestañas del partido */
.jobtabs { position: sticky; top: 0; z-index: 15; background: var(--bg); padding: 8px 0; margin: 0 0 4px; }
.jobtabs .segs { margin: 0; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border-radius: 20px;
          padding: 16px; margin-top: 18px; cursor: pointer; }
.toggle b { display: block; }
.toggle span { color: var(--muted); font-size: .88rem; }
.toggle input { width: 52px; height: 30px; appearance: none; background: #3a3a3a; border-radius: 99px; position: relative; flex: none;
                cursor: pointer; transition: background .2s; border: 0; padding: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle input:checked { background: var(--lime); }
.toggle input:checked::after { left: 25px; background: #111; }
.whydis { color: var(--muted); font-size: .85rem; text-align: center; margin: 8px 0 0; }
nav.tabbar { gap: 2px; } nav.tabbar a { padding: 10px 12px; font-size: .82rem; } nav.tabbar a:not(.on):not(.plus) svg { margin-right: -2px; }
.offtab { display: none !important; }

/* Usuario que vuelve: misma portada grande; solo se ocultan los 3 pasos de bienvenida */
body.returning .how { display: none; }

/* Estado del partido legible sobre cualquier miniatura */
ul.jobs .badge { background: #0f0f0f !important; color: #f4f4f0 !important; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
ul.jobs .badge.done::before { content: "● "; color: var(--lime); }
ul.jobs .badge.running::before, ul.jobs .badge.queued::before { content: "● "; color: #f0c64a; }
ul.jobs .badge.error::before { content: "● "; color: #ff7b6b; }
.cmp.nodata .cmpnums b { color: var(--muted); }
.cmp.nodata .hint { margin-top: 4px; font-size: .82rem; }
/* Modo claro: barras con lima más oscuro para que se vean sobre blanco */
:root[data-theme="light"] .cmpbar i:first-child, :root[data-theme="light"] .bandbar i:not(.grey),
:root[data-theme="light"] .bar > div, :root[data-theme="light"] .qbar i { background: #8fb300; }

/* Portada: fondo igual al de la imagen */
.hero { background: #0e0e0e; }

/* Menú con 5 opciones: solo el activo muestra su nombre */
nav.tabbar { gap: 0; padding: 6px; }
nav.tabbar a { padding: 10px 12px; font-size: .8rem; gap: 6px; }
nav.tabbar a:not(.on):not(.plus) { font-size: 0; gap: 0; }

/* Resumen de equipos: cada fila dice qué mide y quién ganó, en palabras */
.sumtitle { margin: 0 0 12px; }
.teamkey { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.tk { display: flex; align-items: center; gap: 6px; font-weight: 800; min-width: 0; }
.tk i { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--lime); }
.tk.b i { background: #6a6a64; }
.tk .tname { cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk .pen { width: 14px; height: 14px; opacity: .55; flex: none; }
.cmphead { text-align: center; margin-bottom: 2px; }
.cmplabel { display: block; font-weight: 800; font-size: .95rem; }
.cmphead small { color: var(--muted); font-size: .78rem; }
.cmpverdict { margin: 6px 0 0; text-align: center; font-size: .82rem; color: var(--muted); }
.cmpverdict b { color: var(--text); }
.cmpmiss { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); text-align: center; }
:root[data-theme="light"] .tk.b i { background: #b9bdb0; }

/* Marking the pitch: the finger drags points, it must not scroll the page. */
#calib .frame-wrap { touch-action: none; }

/* Folded short pieces under the players list */
.pmore { list-style: none; text-align: center; padding: 14px 4px 4px; }
.pmore button { background: transparent; color: var(--lime); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.pmore small { display: block; margin-top: 6px; opacity: .7; }

/* Unreliable figures (moving camera + one marked image): big red notice, greyed rows */
.alertbox { background: rgba(229, 83, 61, .14); border: 1px solid #e5533d; border-radius: 20px; padding: 14px 16px; margin: 0 0 12px; }
.alertbox b { color: #ff8a73; display: block; margin-bottom: 4px; }
.alertbox p { margin: 0; font-size: .9rem; }
.cmp.unreliable { opacity: .38; filter: grayscale(1); }

/* Friendly "match not found" page */
main.notfound { max-width: 420px; margin: 18vh auto 0; padding: 0 24px; text-align: center; }
main.notfound h1 em { color: var(--lime); font-style: normal; }
main.notfound .btn { display: inline-block; margin-top: 18px; background: var(--lime); color: #111; padding: 12px 22px; border-radius: 999px; font-weight: 800; text-decoration: none; }

/* «¿Quién es quién?»: confirm the number read (and a name) without a squad */
.qnew { margin: 10px 0 4px; }
.qnewrow { display: flex; gap: 8px; align-items: center; }
.qnewrow input { min-width: 0; background: var(--card-2, #222); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font: inherit; }
.qnewrow input[type="number"] { width: 4.2em; flex: none; text-align: center; font-weight: 800; }
.qnewrow input[type="text"] { flex: 1; }
.qnewrow .chip { flex: none; }

/* Match screen: "Mi jugador" and the moments tapped while recording */
.extra { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.extra h3 { margin: 0 0 6px; }
.extra h3 em { color: var(--lime); font-style: normal; }
.cmpnums.mine { justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.evlist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Material Symbols Rounded (Google, Apache License 2.0), inline paths: filled shapes, not strokes */
svg.ms { fill: currentColor !important; stroke: none !important; stroke-width: 0 !important; flex: none; }
.ms-inline { width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: .3em; }

/* Partido: dónde jugó cada equipo + forma del bloque (todas las pantallas) */
.hmgrid { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 12px 0 6px; }
.hmgrid figure { margin: 0; }
.hmgrid figcaption { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 6px; }
.hmgrid img { width: 100%; display: block; border-radius: 16px; background: #0e0e0e; }
.dot.t0, .dot.t1 { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--lime); }
.dot.t1 { background: #6a6a64; }
.shapetab { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .92rem; }
.shapetab th { text-align: right; color: var(--muted); font-weight: 700; padding: 6px 4px; }
.shapetab td { text-align: right; padding: 9px 4px; border-top: 1px solid var(--line); font-weight: 700; }
.shapetab td:first-child { text-align: left; color: var(--muted); font-weight: 600; }
.shapetab.unreliable td:not(:first-child) { opacity: .4; }
/* Cifras clave: solo en computador (web.css) */
.kpistrip { display: none; }

/* Inicio: saludo y totales (solo computador, web.css) */
.dash { display: none; }

/* Grabar: la versión para computador (QR) solo se ve en web.css */
.webrec { display: none; }
.lastm { display: none; }
.namelink { color: var(--lime); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.qwhy { margin: 4px 0 18px; padding: 14px 16px; border-radius: 14px; background: rgba(212,245,60,.07); border: 1px solid rgba(212,245,60,.22); }
.qwhy p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.qwhy p + p { margin-top: 8px; }
.qwhy b { color: var(--text); }
.drop { position: relative; }
.dropclear { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; width: auto; min-height: 0;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card, #171717); color: var(--text);
  font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; }
.dropclear:hover { border-color: #e5533d; color: #ff8a73; }
.dropclear svg { width: 16px; height: 16px; color: currentColor; }
.pitchprev, .pphelp { display: none; }
.cprog, .ctips, .fcap { display: none; }
/* Marcar la cancha: margen gris alrededor de la imagen para tocar esquinas que quedan fuera */
#calib .frame-wrap { padding: 44px 14%; border-radius: 20px; border: 1px dashed #3a3a3a;
  background: repeating-linear-gradient(45deg, #181818 0 8px, #1e1e1e 8px 16px); }
#calib .frame-wrap::before { content: "zona fuera de la imagen"; position: absolute; top: 5px; left: 0; right: 0; text-align: center;
  color: #777; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
#calib .frame-in { position: relative; }
#calib .frame-wrap #overlay { overflow: visible; pointer-events: none; }
.cmiss { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(212,245,60,.07); border: 1px solid rgba(212,245,60,.22); }
.cmiss summary { cursor: pointer; font-weight: 800; color: var(--lime); }
.cmiss p { margin: 8px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.cmiss b { color: var(--text); }
/* Cámara que se mueve: elegir el punto en una mini cancha en vez de una lista */
.msteps { margin: 10px 0 4px; padding-left: 20px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.msteps b { color: var(--text); }
.lmpick { margin: 12px 0; padding: 12px; border-radius: 18px; background: #141414; border: 1px solid var(--line); }
#lmpitch { width: 100%; height: auto; display: block; }
#lmpitch .pf { fill: #2f6b2a; stroke: rgba(255,255,255,.85); stroke-width: .6; }
#lmpitch .pl { fill: none; stroke: rgba(255,255,255,.85); stroke-width: .6; }
#lmpitch .pt { fill: #8a8a8a; font: 700 3.4px "Plus Jakarta Sans", sans-serif; text-anchor: middle; text-transform: uppercase; letter-spacing: .3px; }
#lmpitch .lmdot { cursor: pointer; outline: none; }
#lmpitch .hit { fill: transparent; stroke: none; }
#lmpitch .dot { fill: #fff; stroke: #111; stroke-width: .7; transition: r .15s; }
#lmpitch .lmdot:hover .dot, #lmpitch .lmdot:focus .dot { fill: #d4f54c; }
#lmpitch .lmdot.done .dot { fill: #4cc172; }
#lmpitch .lmdot.on .dot { fill: #d4f54c; r: 3.6; stroke: #111; stroke-width: 1; }
.lmnow { margin: 10px 0 0; font-size: .92rem; color: var(--muted); }
.lmnow b { color: var(--lime); }
.lmcount { margin: 4px 0 0; font-size: .8rem; font-weight: 800; color: var(--text); }
#mlist li span { font-size: .9rem; }
.lmside { display: block; text-align: center; color: #8a8a8a; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 2px 0; }
.tbar { margin: 10px 0 0; padding: 12px 14px; border-radius: 16px; background: #141414; border: 1px solid var(--line); }
.thint { margin: 0 0 10px; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.thint b { color: var(--lime); }
.trow { display: flex; align-items: center; gap: 10px; }
.trow input[type="range"] { flex: 1; min-width: 0; accent-color: var(--lime); height: 28px; }
.tstep { flex: none; width: auto; min-height: 0; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: #1f1f1f; color: var(--text); font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; }
.tstep:hover { border-color: var(--lime); }
.ttime { flex: none; min-width: 44px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.mchips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; }
.mchips li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 999px;
  background: rgba(76,193,114,.14); border: 1px solid rgba(76,193,114,.45); font-size: .84rem; font-weight: 700; }
.mchips .mx { width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.08);
  color: var(--text); font-size: 1rem; line-height: 1; cursor: pointer; }
.mchips .mx:hover { background: #e5533d; }

/* Avisos (SweetAlert2) con el diseño de HL90 */
.swal2-container.swal2-backdrop-show { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.hlpop { width: min(440px, 92vw); padding: 26px 24px 22px; border-radius: 26px; background: #161616; color: var(--text, #f4f4f0);
  border: 1px solid #2c2c2c; box-shadow: 0 30px 80px rgba(0,0,0,.6); font-family: inherit; }
.hltitle { padding: 6px 0 0; color: var(--text, #f4f4f0); font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.hltext { margin: 8px 0 0; padding: 0; color: #a7a7a1; font-size: .95rem; line-height: 1.5; }
.hlacts { gap: 10px; margin: 22px 0 0; width: 100%; flex-wrap: nowrap; }
.hlok, .hlcancel { flex: 1; min-height: 48px; padding: 0 18px; border-radius: 14px; border: 0; font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer; }
.hlok { background: #d4f54c; color: #111; }
.hlok:hover { filter: brightness(1.05); }
.hlok.hldanger { background: #e5533d; color: #fff; }
.hlcancel { background: #242424; color: var(--text, #f4f4f0); border: 1px solid #333; }
.hlcancel:hover { border-color: #d4f54c; }
.hlinput.swal2-input { width: auto; margin: 16px 0 0; height: 50px; border-radius: 14px; border: 1px solid #333; background: #0f0f0f; color: #f4f4f0;
  font: inherit; font-size: 1rem; box-shadow: none; }
.hlinput.swal2-input:focus { border-color: #d4f54c; box-shadow: 0 0 0 3px rgba(212,245,76,.18); }
.hlpop .swal2-icon { margin: 4px auto 6px; transform: scale(.8); }
.hlpop .swal2-icon.swal2-question { border-color: #d4f54c; color: #d4f54c; }
.hlpop .swal2-icon.swal2-warning { border-color: #f0c64a; color: #f0c64a; }
:root[data-theme="light"] .hlpop { background: #fff; color: #111; border-color: #e6e6e0; }
:root[data-theme="light"] .hltitle { color: #111; }
:root[data-theme="light"] .hlcancel { background: #f1f1ec; color: #111; border-color: #ddd; }
:root[data-theme="light"] .hlinput.swal2-input { background: #fafaf7; color: #111; border-color: #ddd; }

/* Video analizado: dónde queda guardado (Google Drive) */
.drivenote { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px;
  background: #141414; border: 1px solid var(--line); }
.drivenote > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.drivenote b { font-size: .92rem; }
.drivenote span { color: var(--muted); font-size: .84rem; }
.drivenote .chip { width: auto; flex: none; text-decoration: none; }
.drivenote.saved { border-color: rgba(76,193,114,.5); background: rgba(76,193,114,.08); }
.drivenote.saved > svg { width: 26px; height: 26px; color: #4cc172; flex: none; }
.drivenote.error, .drivenote.no_drive { border-color: rgba(240,198,74,.45); background: rgba(240,198,74,.07); }
.dspin { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 3px solid rgba(212,245,76,.25); border-top-color: var(--lime); animation: dspin 1s linear infinite; }
@keyframes dspin { to { transform: rotate(360deg); } }
.hltoast.hlpop { width: auto; padding: 12px 16px; border-radius: 16px; }
.swal2-popup.swal2-toast.hltoast { background: #161616; color: #f4f4f0; border: 1px solid rgba(76,193,114,.5); box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.swal2-popup.swal2-toast.hltoast .swal2-title { color: #f4f4f0; font-weight: 800; font-size: .95rem; }
.swal2-popup.swal2-toast.hltoast .swal2-html-container { color: #a7a7a1; font-size: .85rem; }
.needdrive { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px;
  background: rgba(240,198,74,.08); border: 1px solid rgba(240,198,74,.45); }
.needdrive > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.needdrive b { font-size: .92rem; }
.needdrive span { color: var(--muted); font-size: .84rem; }
.needdrive .chip { width: auto; flex: none; }

/* ---------------------------------------------------------------- Calca la cancha */
#calcar .klead { color: var(--muted); font-size: .92rem; line-height: 1.5; margin: 4px 0 12px; }
#calcar .klead b { color: var(--text); }
.ksize { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; }
.kchip { flex: 0 0 auto; min-height: 0; padding: 8px 12px; border-radius: 12px; border: 1px solid #2e2e2e; background: var(--card); color: var(--text);
  font: 700 .82rem "Plus Jakarta Sans", sans-serif; display: grid; text-align: left; cursor: pointer; }
.kchip small { color: var(--muted); font-weight: 600; font-size: .7rem; }
.kchip.on { border-color: var(--lime); background: rgba(212,245,60,.1); }
.kpitchwrap { border-radius: 16px; background: #13170f; border: 1px solid #262b22; padding: 8px; transition: box-shadow .2s; }
.kpitchwrap.nudge { box-shadow: 0 0 0 3px var(--lime); }
.kpitch { display: block; width: 100%; height: auto; }
.kpitch .kp-field { fill: #1f4a1b; }
.kpitch .kp-line { stroke: rgba(255,255,255,.75); stroke-width: 3; fill: none; }
.kpitch .kp-view { fill: rgba(255,255,255,.12); stroke: #fff; stroke-width: 2; stroke-dasharray: 8 6; pointer-events: none; }
.kpitch .kp-cam { fill: #8b8f86; font: 700 18px "Plus Jakarta Sans", sans-serif; text-anchor: middle; }
.kpitch .kp-dot { cursor: pointer; }
.kpitch .kp-dot circle { fill: rgba(212,245,60,.25); stroke: var(--lime); stroke-width: 3; transition: r .15s; }
.kpitch .kp-dot:hover circle, .kpitch .kp-dot:focus circle { fill: rgba(212,245,60,.55); outline: none; }
.kpitch .kp-dot.on circle { fill: var(--lime); stroke: #111; }
.kpitch .kp-dot.sel circle { fill: #fff; stroke: var(--lime); stroke-width: 5; }
.kpitch .kp-dot.bad circle { fill: #ff6b5a; stroke: #fff; }
.kpitch .kp-dot text { fill: #111; font: 800 17px "Plus Jakarta Sans", sans-serif; text-anchor: middle; pointer-events: none; }
.kstep { margin: 12px 0 8px; font-size: .95rem; line-height: 1.4; color: #d6d6cf; min-height: 2.8em; }
.kstep b { color: var(--lime); }
#calcar .kframe { height: min(88vw, 560px); padding: 0; margin: 0 -8px; border-radius: 20px; border: 1px dashed #3a3a3a; touch-action: none; overflow: hidden;
  background: repeating-linear-gradient(135deg, #141414 0 10px, #181818 10px 20px); cursor: crosshair; }
#calcar .kframe::before { content: "zona fuera de la imagen"; position: absolute; top: 8px; left: 0; right: 0; text-align: center;
  font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6a6a6a; }
#calcar .frame-in { position: absolute; left: 0; top: 0; width: 100%; }
#calcar .kframe.dragging .frame-in { transition: none; }
.kview { position: absolute; right: 10px; bottom: 10px; z-index: 4; min-height: 0; padding: 8px 12px; border-radius: 999px; border: 1px solid #3a3a3a;
  background: rgba(17,17,17,.9); color: var(--text); font: 700 .8rem "Plus Jakarta Sans", sans-serif; cursor: pointer; }
.kview:hover { border-color: var(--lime); color: var(--lime); }
#calcar .kframe img { border-radius: 10px; pointer-events: none; }
#calcar .kover { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.kover .ko-line { fill: none; stroke: #d4f54c; stroke-linecap: round; stroke-linejoin: round; opacity: .9; filter: drop-shadow(0 0 2px rgba(0,0,0,.8)); }
.kover .ko-pt circle { fill: none; stroke: #d4f54c; }
.kover .ko-pt line { stroke: #fff; }
.kover .ko-pt rect { fill: #d4f54c; }
.kover .ko-pt.bad circle { stroke: #ff6b5a; } .kover .ko-pt.bad rect { fill: #ff6b5a; }
.kover .ko-pt text { fill: #111; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; text-anchor: middle; }
.kover .ko-ghost { fill: none; stroke: rgba(255,255,255,.75); stroke-dasharray: 3 3; }
.kover .ko-ghost.want { stroke: #fff; animation: kwant 1s ease-in-out infinite; }
@keyframes kwant { 50% { opacity: .35; } }
.kloupe { position: absolute; width: 110px; height: 110px; border-radius: 50%; border: 3px solid var(--lime); background-repeat: no-repeat;
  box-shadow: 0 10px 30px rgba(0,0,0,.6); pointer-events: none; z-index: 3; }
.kloupe i { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #000; }
.kq { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: #1a1a1a; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.kq:empty { display: none; }
.kq.good { background: rgba(212,245,60,.14); color: #e8ffa0; }
.kq.ok { background: #1f2414; color: #d8e8a8; }
.kq.bad { background: #3a1a17; color: #ffb4ab; }
.kmiss { margin-top: 14px; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.kmiss summary { cursor: pointer; color: var(--lime); font-weight: 700; }
.kmiss a { color: var(--lime); }
.kmiss .secondary { width: 100%; margin: 6px 0; }

/* Upload · step 3 summary: only on computers, where it fills the left column */
.sumcard { display: none; }
.bar.wait > div { width: 35% !important; animation: barwait 1.1s ease-in-out infinite alternate; }
@keyframes barwait { from { margin-left: 0; } to { margin-left: 65%; } }
#send.busy { opacity: .75; cursor: progress; }
