/* =====================================================================
   PATIO ACTIVO · Estilos
   Mobile-first · modo claro/oscuro · impresión de fichas
   ===================================================================== */

:root {
  --naranja: #ff6b35;
  --naranja-2: #ff9f1c;
  --turquesa: #0bb5a6;
  --violeta: #7c5cff;
  --verde: #22b35e;
  --amarillo: #ffc83d;
  --rosa: #ff4d8d;
  --azul: #2f80ed;
  --rojo: #e5484d;

  --bg: #fff8f1;
  --bg-2: #fff1e3;
  --surface: #ffffff;
  --surface-2: #f6f1ea;
  --text: #1f1a17;
  --muted: #6b625b;
  --border: #eadfd3;
  --shadow: 0 2px 4px rgba(60, 30, 10, .05), 0 8px 24px rgba(60, 30, 10, .07);
  --shadow-lg: 0 12px 40px rgba(60, 30, 10, .14);
  --radius: 18px;
  --radius-sm: 12px;
  --focus: 0 0 0 3px rgba(124, 92, 255, .45);
  --campo: #d9f2e2;
  --campo-linea: #ffffff;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Black", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="claro"]) {
    --bg: #14110f;
    --bg-2: #1c1815;
    --surface: #221d1a;
    --surface-2: #2b2521;
    --text: #f5eee8;
    --muted: #b3a79d;
    --border: #3a322c;
    --shadow: 0 2px 4px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
    --campo: #1d3a2a;
    --campo-linea: #cfe9d9;
    color-scheme: dark;
  }
}
:root[data-theme="oscuro"] {
  --bg: #14110f;
  --bg-2: #1c1815;
  --surface: #221d1a;
  --surface-2: #2b2521;
  --text: #f5eee8;
  --muted: #b3a79d;
  --border: #3a322c;
  --shadow: 0 2px 4px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
  --campo: #1d3a2a;
  --campo-linea: #cfe9d9;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  padding-bottom: 76px; /* espacio para la barra inferior en móvil */
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-family: var(--font-display); letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--violeta); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.noscript { padding: 24px; text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, var(--naranja), var(--amarillo));
  box-shadow: 0 4px 12px rgba(255, 107, 53, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 1.1rem; }
.brand-text small { color: var(--muted); font-size: .75rem; }
.mainnav { display: none; gap: 4px; }
.mainnav a {
  text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; color: var(--muted);
}
.mainnav a:hover { background: var(--surface-2); color: var(--text); }
.mainnav a.active { background: var(--text); color: var(--bg); }
.topbar-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 20px; display: grid; place-items: center;
  transition: transform .15s;
}
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn:active { transform: scale(.95); }

/* ---------- Barra inferior (móvil) ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .72rem; font-weight: 600; text-decoration: none; color: var(--muted); padding: 4px 0; border-radius: 10px;
}
.bottomnav a span { font-size: 1.35rem; line-height: 1; }
.bottomnav a.active { color: var(--naranja); background: var(--surface-2); }

@media (min-width: 900px) {
  .mainnav { display: flex; }
  .bottomnav { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Layout ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 16px; min-height: 60vh; outline: none; }
@media (min-width: 700px) { main { padding: 24px; } }
.footer { text-align: center; font-size: .85rem; color: var(--muted); padding: 24px 16px 32px; border-top: 1px solid var(--border); margin-top: 32px; }
.footer p { margin: 0 0 4px; }
.section { margin: 28px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.link-more { font-weight: 700; color: var(--naranja); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: 28px 22px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255,255,255,.25) 0 60px, transparent 61px),
    radial-gradient(circle at 80% 90%, rgba(255,255,255,.15) 0 90px, transparent 91px),
    linear-gradient(135deg, var(--naranja) 0%, #ff4d6d 55%, var(--violeta) 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.hero h1 { color: #fff; margin-bottom: .3em; }
.hero p { font-size: 1.05rem; max-width: 620px; opacity: .95; }
.hero-emojis { position: absolute; right: 16px; bottom: 8px; font-size: 64px; opacity: .22; letter-spacing: 6px; pointer-events: none; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-search { margin-top: 18px; display: flex; gap: 8px; max-width: 560px; }
.hero-search input {
  flex: 1; min-width: 0; padding: 14px 16px; border-radius: 14px; border: none; font-size: 1rem;
  background: rgba(255,255,255,.95); color: #1f1a17;
}
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } .hero { padding: 40px; } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s; }
.stat:hover { transform: translateY(-3px); }
.stat b { display: block; font-size: 1.8rem; font-family: var(--font-display); line-height: 1; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 14px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none;
  background: var(--text); color: var(--bg); transition: transform .12s, box-shadow .12s;
  min-height: 48px;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-light { background: #fff; color: #1f1a17; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-naranja { background: var(--naranja); color: #fff; }
.btn-turquesa { background: var(--turquesa); color: #fff; }
.btn-violeta { background: var(--violeta); color: #fff; }
.btn-verde { background: var(--verde); color: #fff; }
.btn-rojo { background: var(--rojo); color: #fff; }
.btn-sm { padding: 8px 12px; min-height: 38px; font-size: .9rem; border-radius: 10px; }
.btn-xl { padding: 18px 26px; font-size: 1.2rem; min-height: 64px; border-radius: 18px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Tarjetas de categoría ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .cat-grid.cat-5 { grid-template-columns: repeat(5, 1fr); } }
.cat {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s; position: relative; overflow: hidden;
}
.cat:hover { transform: translateY(-3px); border-color: var(--naranja); }
.cat .cat-emoji { font-size: 2rem; line-height: 1; }
.cat b { font-size: 1rem; }
.cat small { color: var(--muted); }
.cat-big { padding: 20px; min-height: 130px; color: #fff; border: none; }
.cat-big small { color: rgba(255,255,255,.9); }
.bg-naranja { background: linear-gradient(135deg, var(--naranja), var(--naranja-2)); }
.bg-turquesa { background: linear-gradient(135deg, var(--turquesa), #22c3e6); }
.bg-violeta { background: linear-gradient(135deg, var(--violeta), #b45cff); }
.bg-verde { background: linear-gradient(135deg, var(--verde), #8bd346); }

/* ---------- Tarjetas de actividad ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-top { display: flex; gap: 12px; align-items: flex-start; padding: 16px 16px 8px; text-decoration: none; }
.card-emoji {
  flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 28px;
  background: var(--surface-2);
}
.t-juego .card-emoji { background: color-mix(in srgb, var(--naranja) 16%, var(--surface)); }
.t-deporte .card-emoji { background: color-mix(in srgb, var(--turquesa) 18%, var(--surface)); }
.t-dinamica .card-emoji { background: color-mix(in srgb, var(--violeta) 16%, var(--surface)); }
.t-material .card-emoji { background: color-mix(in srgb, var(--verde) 18%, var(--surface)); }
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--naranja); }
.card.t-deporte::before { background: var(--turquesa); }
.card.t-dinamica::before { background: var(--violeta); }
.card.t-material::before { background: var(--verde); }
.card h3 { margin: 0 0 4px; font-size: 1.08rem; }
.card-kind { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.card-desc { padding: 0 16px; color: var(--muted); font-size: .93rem; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 14px; }
.fav-btn {
  position: absolute; top: 12px; right: 10px; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: transparent; font-size: 22px; cursor: pointer; line-height: 1;
  filter: grayscale(1); opacity: .55; transition: transform .15s, opacity .15s, filter .15s;
}
.fav-btn:hover { opacity: 1; transform: scale(1.12); }
.fav-btn.on { filter: none; opacity: 1; }
.card .card-top { padding-right: 50px; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--text); white-space: nowrap;
}
.chip.i-baja { background: color-mix(in srgb, var(--verde) 20%, var(--surface)); }
.chip.i-media { background: color-mix(in srgb, var(--amarillo) 30%, var(--surface)); }
.chip.i-alta { background: color-mix(in srgb, var(--rojo) 20%, var(--surface)); }
.chip.ce { background: color-mix(in srgb, var(--violeta) 16%, var(--surface)); }

/* ---------- Explorar / filtros ---------- */
.explore { display: grid; gap: 18px; }
@media (min-width: 980px) { .explore { grid-template-columns: 290px 1fr; align-items: start; } }
.filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
@media (min-width: 980px) { .filters { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; } }
.filters-toggle { display: flex; }
@media (min-width: 980px) { .filters-toggle { display: none; } }
.filters.collapsed .filters-body { display: none; }
@media (min-width: 980px) { .filters.collapsed .filters-body { display: block; } }
.filters h3 { font-size: 1rem; margin: 14px 0 6px; }
.filters-body > .f-group:first-child h3 { margin-top: 4px; }
.search-box { position: relative; }
.search-box input, .input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); font-size: 1rem; min-height: 46px;
}
textarea.input { min-height: 120px; resize: vertical; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  border: 1px solid var(--border); background: var(--bg); padding: 7px 12px; border-radius: 999px; cursor: pointer; font-size: .88rem; font-weight: 600;
  min-height: 36px;
}
.pill[aria-pressed="true"] { background: var(--naranja); color: #fff; border-color: var(--naranja); }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.results-bar .count { font-weight: 700; }
.empty { text-align: center; padding: 40px 16px; background: var(--surface); border: 2px dashed var(--border); border-radius: var(--radius); }
.empty .big { font-size: 3rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
label.lbl { display: block; font-weight: 700; font-size: .9rem; margin: 10px 0 4px; }

/* ---------- Ficha ---------- */
.ficha { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.ficha-head { padding: 22px; position: relative; color: #fff; }
.ficha-head.t-juego { background: linear-gradient(135deg, var(--naranja), #ff4d6d); }
.ficha-head.t-deporte { background: linear-gradient(135deg, var(--turquesa), var(--azul)); }
.ficha-head.t-dinamica { background: linear-gradient(135deg, var(--violeta), var(--rosa)); }
.ficha-head.t-material { background: linear-gradient(135deg, var(--verde), var(--turquesa)); }
.ficha-head h1 { color: #fff; margin: 4px 0 8px; padding-right: 60px; }
.ficha-head .kind { font-weight: 800; text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; opacity: .9; }
.ficha-head .big-emoji { position: absolute; right: 18px; top: 14px; font-size: 52px; }
.ficha-head .chip { background: rgba(255,255,255,.22); color: #fff; }
.ficha-head .lead { font-size: 1.05rem; max-width: 760px; margin: 8px 0 0; opacity: .96; }
.ficha-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ficha-tools .btn { padding: 8px 8px; font-size: .85rem; }
@media (min-width: 700px) { .ficha-tools { display: flex; flex-wrap: wrap; padding: 12px 22px; } .ficha-tools .btn { padding: 8px 12px; font-size: .9rem; } }
.ficha-body { padding: 22px; display: grid; gap: 22px; }
@media (min-width: 900px) { .ficha-body { grid-template-columns: 1fr 360px; } }
.ficha-main > section, .ficha-side > section { margin-bottom: 22px; }
.ficha-main h2, .ficha-side h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ficha ol, .ficha ul { margin: 0; padding-left: 1.3em; }
.ficha li { margin-bottom: 6px; }
.ficha ol.steps { list-style: none; padding: 0; counter-reset: paso; }
.ficha ol.steps li { counter-increment: paso; position: relative; padding: 8px 0 8px 44px; margin: 0; border-bottom: 1px dashed var(--border); }
.ficha ol.steps li:last-child { border-bottom: 0; }
.ficha ol.steps li::before {
  content: counter(paso); position: absolute; left: 0; top: 6px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; background: var(--naranja); color: #fff; font-size: .9rem;
}
.t-deporte-body ol.steps li::before { background: var(--turquesa); }
.t-dinamica-body ol.steps li::before { background: var(--violeta); }
.t-material-body ol.steps li::before { background: var(--verde); }
.box { border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid var(--border); background: var(--bg); }
.box h2 { margin-top: 0; }
.box-seg { background: color-mix(in srgb, var(--rojo) 8%, var(--surface)); border-color: color-mix(in srgb, var(--rojo) 30%, var(--border)); }
.box-inc { background: color-mix(in srgb, var(--violeta) 8%, var(--surface)); border-color: color-mix(in srgb, var(--violeta) 30%, var(--border)); }
.box-var { background: color-mix(in srgb, var(--amarillo) 12%, var(--surface)); border-color: color-mix(in srgb, var(--amarillo) 40%, var(--border)); }
.var-grid { display: grid; gap: 12px; }
@media (min-width: 600px) { .var-grid { grid-template-columns: 1fr 1fr; } }
.var-grid h3 { font-size: 1rem; margin-bottom: 6px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.fact small { display: block; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.fact b { font-size: .98rem; }
.esquema { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px; border: 1px solid var(--border); }
.esquema svg { display: block; width: 100%; height: auto; }
.esquema figcaption { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 6px; }
.curr-list { display: grid; gap: 8px; }
.curr-item { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.curr-item .chip { flex: none; }
.related { display: grid; gap: 8px; }
.related a { display: flex; gap: 10px; align-items: center; text-decoration: none; padding: 8px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); }
.related a:hover { border-color: var(--naranja); }
.breadcrumb { font-size: .9rem; margin-bottom: 12px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }

/* Modo patio: letra grande para leer en el móvil al aire libre */
body.modo-patio .ficha-body { font-size: 1.25rem; }
body.modo-patio .ficha-body h2 { font-size: 1.5rem; }
body.modo-patio .ficha-side .esquema { order: -1; }

/* ---------- Sesión ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: repeat(4, 1fr); align-items: end; } }
.session-part { border-left: 6px solid var(--naranja); padding: 14px 16px; margin: 14px 0; background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); }
.session-part.p-calentamiento { border-color: var(--amarillo); }
.session-part.p-principal { border-color: var(--naranja); }
.session-part.p-calma { border-color: var(--turquesa); }
.session-part h3 { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.s-act { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--border); }
.s-act:first-of-type { border-top: none; }
.s-act .card-emoji { width: 46px; height: 46px; font-size: 24px; }
.s-act a { font-weight: 700; }
.s-act p { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
.s-actions { display: flex; gap: 4px; }

/* ---------- Herramientas ---------- */
.tools-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .tools-grid { grid-template-columns: 1fr 1fr; } }
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.tool h2 { display: flex; align-items: center; gap: 8px; }
.big-clock {
  font-family: ui-monospace, "SF Mono", Consolas, "Roboto Mono", monospace; font-weight: 800;
  font-size: clamp(3.2rem, 14vw, 6rem); text-align: center; line-height: 1; margin: 14px 0; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.big-clock.alarm { color: var(--rojo); animation: pulse .6s infinite alternate; }
@keyframes pulse { to { transform: scale(1.05); } }
.clock-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.laps { list-style: none; padding: 0; margin: 10px 0 0; max-height: 170px; overflow: auto; font-family: ui-monospace, Consolas, monospace; }
.laps li { display: flex; justify-content: space-between; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--turquesa), var(--verde)); width: 0; transition: width .3s linear; }
.interval-phase { text-align: center; font-weight: 800; font-size: 1.4rem; padding: 8px; border-radius: 12px; }
.interval-phase.trabajo { background: color-mix(in srgb, var(--rojo) 20%, var(--surface)); }
.interval-phase.descanso { background: color-mix(in srgb, var(--verde) 22%, var(--surface)); }
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.team { border-radius: 14px; padding: 12px; color: #fff; }
.team h4 { margin: 0 0 6px; color: #fff; }
.team ul { margin: 0; padding-left: 1.1em; }
.team-0 { background: var(--naranja); } .team-1 { background: var(--azul); } .team-2 { background: var(--verde); }
.team-3 { background: var(--violeta); } .team-4 { background: var(--rosa); } .team-5 { background: #b8860b; }
.team-6 { background: var(--turquesa); } .team-7 { background: #555; }
.picked { font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 800; text-align: center; padding: 18px; border-radius: 16px; background: var(--surface-2); margin: 10px 0; min-height: 1.6em; }
.dice-face { font-size: 5rem; text-align: center; line-height: 1.1; }
.fullscreen-clock {
  position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
}
.fullscreen-clock .big-clock { font-size: clamp(5rem, 24vw, 16rem); }

/* ---------- Evaluación ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 700; }
.tab[aria-selected="true"] { background: var(--violeta); color: #fff; border-color: var(--violeta); }
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); }
table.rubric { border-collapse: collapse; width: 100%; min-width: 720px; font-size: .9rem; }
table.rubric th, table.rubric td { border: 1px solid var(--border); padding: 10px; vertical-align: top; text-align: left; }
table.rubric thead th { background: var(--surface-2); }
table.rubric th.l1 { background: color-mix(in srgb, var(--rojo) 18%, var(--surface)); }
table.rubric th.l2 { background: color-mix(in srgb, var(--amarillo) 30%, var(--surface)); }
table.rubric th.l3 { background: color-mix(in srgb, var(--azul) 18%, var(--surface)); }
table.rubric th.l4 { background: color-mix(in srgb, var(--verde) 22%, var(--surface)); }
@media (max-width: 700px) {
  table.rubric { min-width: 0; }
  table.rubric thead { display: none; }
  table.rubric, table.rubric tbody, table.rubric tr, table.rubric th, table.rubric td { display: block; width: 100%; }
  table.rubric tr { border-bottom: 6px solid var(--surface-2); }
  table.rubric th[scope=row] { background: var(--surface-2); }
  table.rubric td::before { content: attr(data-label); display: block; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; }
  table.rubric td.l1::before { color: var(--rojo); } table.rubric td.l2::before { color: #b8860b; }
  table.rubric td.l3::before { color: var(--azul); } table.rubric td.l4::before { color: var(--verde); }
}
table.check { border-collapse: collapse; width: 100%; font-size: .88rem; }
table.check th, table.check td { border: 1px solid var(--border); padding: 6px; text-align: center; }
table.check th.item { text-align: left; min-width: 220px; font-weight: 600; }
table.check thead th { background: var(--surface-2); position: sticky; top: 0; }
table.check td button {
  width: 38px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-weight: 800;
}
table.check td button.v-si { background: var(--verde); color: #fff; border-color: var(--verde); }
table.check td button.v-av { background: var(--amarillo); color: #1f1a17; border-color: var(--amarillo); }
table.check td button.v-no { background: var(--rojo); color: #fff; border-color: var(--rojo); }
.ce-cards { display: grid; gap: 10px; }
@media (min-width: 800px) { .ce-cards { grid-template-columns: repeat(2, 1fr); } }
.ce-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: .85rem; margin: 8px 0; }
.self-eval { display: grid; gap: 10px; }
.self-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; flex-wrap: wrap; }
.faces { font-size: 1.8rem; letter-spacing: 6px; }

/* ---------- Aleatorio / modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(20, 10, 5, .55); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { background: var(--surface); border-radius: 24px; max-width: 520px; width: 100%; padding: 22px; box-shadow: var(--shadow-lg); text-align: center; animation: pop .25s; max-height: 90vh; overflow: auto; }
.modal .big { font-size: 4rem; line-height: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.spin { animation: spin .6s ease-out; }
@keyframes spin { from { transform: rotate(-200deg) scale(.4); } }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 95;
  transition: all .25s; pointer-events: none; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 900px) { .toast { bottom: 30px; } }

.tip { display: flex; gap: 12px; align-items: flex-start; background: color-mix(in srgb, var(--amarillo) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--amarillo) 45%, var(--border)); border-radius: var(--radius); padding: 14px 16px; }
.tip .tip-emoji { font-size: 1.8rem; line-height: 1; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature .fe { font-size: 1.8rem; }
.two-col { display: grid; gap: 14px; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; } }
.kbd { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border); font-size: .88em; }
.day-card { display: grid; gap: 14px; align-items: center; }
@media (min-width: 700px) { .day-card { grid-template-columns: 1fr 260px; } }

/* ---------- Impresión ---------- */
.print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #000 !important; padding: 0; font-size: 11pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .topbar, .bottomnav, .footer, .ficha-tools, .no-print, .fav-btn, .toast, .filters, .breadcrumb, .modal-back { display: none !important; }
  main { padding: 0; max-width: none; }
  .print-only { display: block; }
  .ficha, .panel, .card, .session-part, .tool, .box { box-shadow: none !important; border-color: #bbb !important; }
  .ficha-head { background: #fff !important; color: #000 !important; border-bottom: 3px solid #000; padding: 0 0 10px; }
  .ficha-head h1, .ficha-head .kind { color: #000 !important; }
  .ficha-head .chip { background: #eee !important; color: #000 !important; }
  .ficha-body { display: block; padding: 10px 0; }
  .ficha-side { margin-top: 12px; }
  .ficha-main > section, .ficha-side > section { break-inside: avoid; margin-bottom: 12px; }
  .esquema { max-width: 320px; }
  .box { background: #fff !important; }
  a { text-decoration: none; }
  table.rubric { min-width: 0; font-size: 9pt; }
  .table-wrap { overflow: visible; border: none; }
  table.check td button { border: 1px solid #999; background: #fff !important; color: #000 !important; }
  :root { --surface: #fff; --surface-2: #f2f2f2; --bg: #fff; --text: #000; --muted: #333; --border: #bbb; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   WEB PÚBLICA · Tienda, lista de correo, mapa de comunidades, páginas
   ===================================================================== */
.bg-rojo { background: linear-gradient(135deg, var(--rojo), var(--naranja)); }
.bg-azul { background: linear-gradient(135deg, var(--azul), var(--violeta)); }
@media (min-width: 1000px) { .cat-grid.cat-6 { grid-template-columns: repeat(3, 1fr); } }
.mainnav a.nav-shop { background: var(--naranja); color: #fff; }
.mainnav a.nav-shop:hover { background: var(--naranja-2); color: #fff; }
.footer-links a { color: var(--muted); }
.btn-disabled { opacity: .65; cursor: not-allowed; pointer-events: none; }

/* Mapa esquemático de comunidades */
.map-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); overflow-x: auto; }
.tilemap { display: grid; grid-template-columns: repeat(6, minmax(92px, 1fr)); grid-template-rows: repeat(5, auto); gap: 6px; min-width: 580px; }
.tile {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; padding: 8px; border-radius: 12px;
  text-decoration: none; background: color-mix(in srgb, var(--naranja) 14%, var(--surface)); border: 2px solid transparent; transition: transform .12s;
}
.tile b { font-size: .86rem; line-height: 1.15; }
.tile small { color: var(--muted); font-size: .75rem; }
.tile:hover { transform: translateY(-2px); border-color: var(--naranja); }
.tile.on { background: var(--naranja); color: #fff; }
.tile.on small { color: #fff; }
.tile.empty { background: var(--surface-2); opacity: .7; }

/* Lista de correo */
.lista-box {
  display: grid; gap: 16px; align-items: center; padding: 20px; border-radius: 24px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--amarillo) 30%, var(--surface)), color-mix(in srgb, var(--naranja) 16%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--naranja) 30%, var(--border));
}
@media (min-width: 700px) { .lista-box { grid-template-columns: 120px 1fr; padding: 26px; } }
.lista-cover { font-size: 72px; text-align: center; line-height: 1; }
.lista-form { display: grid; gap: 10px; max-width: 520px; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

/* Productos */
.products { display: grid; gap: 16px; }
@media (min-width: 800px) { .products { grid-template-columns: repeat(2, 1fr); } }
.product { display: grid; grid-template-columns: 1fr; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
@media (min-width: 520px) { .product { grid-template-columns: 170px 1fr; } }
.product-cover { background: var(--surface-2); display: grid; place-items: center; padding: 12px; }
.product-cover img { width: 100%; max-width: 200px; height: auto; border-radius: 8px; box-shadow: var(--shadow); }
.product-cover span { font-size: 64px; }
.product-body { padding: 16px; display: flex; flex-direction: column; }
.product-body h3 { margin: 4px 0 6px; font-size: 1.15rem; }
.product-list { padding-left: 1.2em; margin: 0 0 12px; font-size: .92rem; }
.product-buy { margin-top: auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.price { font-size: 1.5rem; font-family: var(--font-display); }

/* Llamada a la acción en fichas */
.cta-box { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px dashed color-mix(in srgb, var(--naranja) 50%, var(--border)); background: color-mix(in srgb, var(--naranja) 6%, var(--surface)); }
.cta-emoji { font-size: 2rem; line-height: 1; }
.box-origen { background: color-mix(in srgb, var(--turquesa) 8%, var(--surface)); border-color: color-mix(in srgb, var(--turquesa) 30%, var(--border)); }

/* Páginas estáticas (fichas para compartir, tienda, legales) */
.page { max-width: 900px; margin: 0 auto; padding: 16px; }
@media (min-width: 700px) { .page { padding: 24px; } }
.page-wide { max-width: 1180px; }
.legal h2 { margin-top: 1.4em; font-size: 1.2rem; }
.legal p, .legal li { max-width: 72ch; }
.aviso-plantilla { background: color-mix(in srgb, var(--rojo) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--rojo) 40%, var(--border)); border-radius: var(--radius-sm); padding: 12px 14px; margin: 12px 0 20px; }
.hueco { background: color-mix(in srgb, var(--amarillo) 40%, var(--surface)); padding: 0 4px; border-radius: 4px; font-weight: 700; }
.static-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.index-list { columns: 1; padding-left: 1.2em; }
@media (min-width: 700px) { .index-list { columns: 2; } }
.index-list li { break-inside: avoid; margin-bottom: 4px; }
@media (max-width: 480px) {
  .static-nav { flex-wrap: nowrap; gap: 6px; }
  .static-nav .btn { padding: 8px 10px; font-size: .85rem; white-space: nowrap; }
  .topbar:has(.static-nav) .brand-text small { display: none; }
}
.lista-ok { background: var(--card, #fff); border: 2px solid #22b35e; border-radius: 14px; padding: 14px 16px; max-width: 520px; }
.lista-ok p { margin: 0 0 6px; }
