/* ═══════════════════════════════════════════════════════════════════════════
   Brutus — Registro fácil (carril básico)

   Una pregunta por pantalla, botones grandes. Reglas de la casa (iguales que
   quick-log.css): CERO colores fijos (tokens globales + color-mix con fallback),
   móvil primero, objetivos táctiles ≥ 56px en lo importante, inputs a 16px+
   (iOS hace zoom por debajo), foco visible, animaciones que respetan
   prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════════════ */

.el-overlay {
  --el-surface: var(--card, #1a1a2e);
  --el-surface-2: color-mix(in srgb, var(--card, #1a1a2e) 88%, var(--text, #f0f0f0) 12%);
  --el-line: var(--border, #2a2a4a);
  --el-fg: var(--text, #f0f0f0);
  --el-fg-dim: color-mix(in srgb, var(--text-dim, #999) 78%, var(--text, #f0f0f0) 22%);
  --el-accent: var(--accent, #ff6b35);
  --el-accent-soft: var(--accent-bg-subtle, rgba(255, 107, 53, 0.12));
  --el-accent-line: var(--accent-border, rgba(255, 107, 53, 0.35));
  --el-danger: var(--danger, #e74c3c);
  --el-ok: var(--success, #2ecc71);

  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.el-overlay[hidden] { display: none; }
.el-overlay.is-open { opacity: 1; }
html.el-locked #screen-content { overflow: hidden !important; }

.el-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  height: 96dvh;
  max-height: min(96dvh, calc(100dvh - 4px - env(safe-area-inset-top, 0px)));
  background: var(--el-surface);
  color: var(--el-fg);
  border: 1px solid var(--el-line);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transform: translateY(24px);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0.0, 1);
}
.el-overlay.is-open .el-sheet { transform: translateY(0); }
.el-sheet:focus { outline: none; }
@media (min-width: 760px) {
  .el-overlay { align-items: center; }
  .el-sheet { height: min(86dvh, 820px); border-radius: 22px; border-bottom: 1px solid var(--el-line); }
}

.el-body { display: flex; flex-direction: column; flex: 1; min-height: 0; position: relative; }

/* ─── Cabecera ──────────────────────────────────────────────────────────── */
.el-top {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 10px 8px;
  border-bottom: 1px solid var(--el-line);
}
.el-top-title { flex: 1; min-width: 0; text-align: center; padding-top: 2px; }
.el-top-title h2 { margin: 0; font-size: 1.15rem; line-height: 1.25; font-weight: 800; }
.el-progress { height: 5px; margin: 8px 10px 0; border-radius: 3px; background: var(--el-surface-2); overflow: hidden; }
.el-progress i { display: block; height: 100%; background: var(--el-accent); border-radius: 3px; transition: width 0.25s ease; }
.el-progress-txt { margin-top: 3px; font-size: 0.78rem; color: var(--el-fg-dim); }
.el-icon-btn, .el-icon-spacer { flex: 0 0 44px; width: 44px; height: 44px; }
.el-icon-btn {
  border: none; background: transparent; color: var(--el-fg); font-size: 1.35rem; line-height: 1;
  border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.el-icon-btn:hover { background: var(--el-surface-2); }
.el-help-btn {
  font-weight: 800; font-size: 1.15rem; color: var(--el-accent);
  border: 2px solid var(--el-accent-line); width: 36px; height: 36px; flex-basis: 36px; margin: 4px 4px 0 0;
  border-radius: 50%;
}

/* ─── Cuerpo con scroll y pie ───────────────────────────────────────────── */
.el-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 24px; -webkit-overflow-scrolling: touch; }
.el-foot {
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--el-line);
  background: var(--el-surface);
}
.el-foot-col { display: flex; flex-direction: column; gap: 10px; }
.el-lead { margin: 0 0 14px; font-size: 1.02rem; line-height: 1.45; color: var(--el-fg); }
.el-hint { margin: 10px 0 0; font-size: 0.9rem; line-height: 1.4; color: var(--el-fg-dim); }
.el-empty { margin: 14px 0; color: var(--el-fg-dim); text-align: center; }
.el-sub { margin: 12px 0 6px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--el-fg-dim); }
.el-label { display: block; margin: 18px 0 8px; font-size: 1rem; font-weight: 700; }
.el-error {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-weight: 600; line-height: 1.4;
  color: var(--el-fg); background: color-mix(in srgb, var(--el-danger) 16%, var(--el-surface));
  border: 1px solid color-mix(in srgb, var(--el-danger) 60%, transparent);
}
.el-note {
  margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--el-accent-soft);
  border: 1px solid var(--el-accent-line); font-size: 0.95rem; line-height: 1.4;
}

/* ─── Botones ───────────────────────────────────────────────────────────── */
.el-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 14px; cursor: pointer;
  font-size: 1rem; font-weight: 700; border: 2px solid transparent; color: var(--el-fg);
  background: var(--el-surface-2);
}
.el-btn-big { width: 100%; min-height: 58px; font-size: 1.12rem; margin-top: 10px; }
.el-foot .el-btn-big { margin-top: 0; }
.el-btn-primary { background: color-mix(in srgb, var(--el-accent) 55%, var(--el-surface)); color: #fff; }
.el-btn-primary.is-ready { background: var(--el-accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--el-accent) 40%, transparent); }
.el-btn-primary[disabled] { opacity: 0.7; cursor: progress; }
.el-btn-outline { background: transparent; border-color: var(--el-accent-line); color: var(--el-fg); }
.el-btn-ghost { background: transparent; color: var(--el-fg-dim); }
.el-row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.el-row-btns .el-btn { flex: 1 1 140px; }
.el-link {
  background: none; border: none; color: var(--el-accent); font-size: 1rem; font-weight: 700;
  text-decoration: underline; cursor: pointer; padding: 10px 6px; min-height: 44px;
}
.el-link-small { font-size: 0.9rem; min-height: 36px; }
.el-foot-links { text-align: center; margin-top: 18px; }
.el-btn:focus-visible, .el-tile:focus-visible, .el-chip:focus-visible, .el-grid-item:focus-visible,
.el-pick:focus-visible, .el-icon-btn:focus-visible, .el-link:focus-visible, .el-input:focus-visible,
.el-step-btn:focus-visible {
  outline: 3px solid var(--el-accent); outline-offset: 2px;
}

/* ─── Inicio: baldosas ─────────────────────────────────────────────────── */
.el-tile {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  min-height: 68px; padding: 12px 14px; margin: 0 0 10px; cursor: pointer;
  background: var(--el-surface-2); color: var(--el-fg);
  border: 2px solid var(--el-line); border-radius: 16px;
}
.el-tile:active { transform: scale(0.99); }
.el-tile:hover { border-color: var(--el-accent-line); }
.el-tile-icon { font-size: 1.9rem; flex: 0 0 44px; text-align: center; line-height: 1; }
.el-tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.el-tile-text b { font-size: 1.05rem; line-height: 1.25; }
.el-tile-text small { font-size: 0.88rem; color: var(--el-fg-dim); line-height: 1.3; }
.el-tile-small { min-height: 56px; }
.el-tile-repeat { border-color: var(--el-accent-line); background: var(--el-accent-soft); }
.el-tick {
  position: absolute; top: 8px; right: 10px; font-size: 0.9rem; color: var(--el-ok); font-weight: 800;
}

.el-card {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; margin: 0 0 14px; border-radius: 16px;
  background: var(--el-surface-2); border: 1px solid var(--el-line);
}
.el-card small { display: block; color: var(--el-fg-dim); margin-top: 2px; line-height: 1.35; font-size: 0.9rem; }
.el-practice { border-color: var(--el-accent-line); background: var(--el-accent-soft); }
.el-draft-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.el-draft-actions .el-btn { flex: 1 1 130px; min-height: 46px; }

/* ─── Opciones (chips) y rejillas ──────────────────────────────────────── */
.el-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.el-choices-top { margin-top: 20px; }
.el-choices-col { flex-direction: column; }
.el-chip {
  min-height: 52px; padding: 10px 18px; border-radius: 14px; font-size: 1rem; font-weight: 700; cursor: pointer;
  border: 2px solid var(--el-line); background: var(--el-surface-2); color: var(--el-fg); text-align: left;
}
.el-choices-col .el-chip { width: 100%; }
.el-chip.is-on { border-color: var(--el-accent); background: var(--el-accent-soft); }
.el-chip.is-on::before { content: '✔ '; color: var(--el-accent); }
.el-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 4px; }
.el-grid-item {
  min-height: 60px; padding: 10px; border-radius: 14px; font-size: 1rem; font-weight: 700; cursor: pointer;
  border: 2px solid var(--el-line); background: var(--el-surface-2); color: var(--el-fg);
}
.el-grid-item.is-on { border-color: var(--el-accent); background: var(--el-accent-soft); }

/* ─── Entradas ─────────────────────────────────────────────────────────── */
.el-input {
  font-size: 1.1rem; padding: 10px 12px; min-height: 52px; border-radius: 12px; width: 100%;
  background: var(--bg, var(--el-surface)); color: var(--el-fg); border: 2px solid var(--el-line);
  box-sizing: border-box;
}
.el-input-wide { width: 100%; }
.el-input-num { text-align: center; font-weight: 700; font-size: 1.25rem; }
.el-input-time { text-align: center; font-weight: 800; font-size: 2rem; min-height: 70px; }
.el-time { display: flex; align-items: flex-end; gap: 8px; }
.el-time label { display: flex; flex-direction: column; gap: 4px; flex: 1; font-size: 0.85rem; color: var(--el-fg-dim); text-align: center; }
.el-time i { font-size: 2rem; font-style: normal; font-weight: 800; padding-bottom: 14px; }
.el-mini { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; font-size: 0.82rem; color: var(--el-fg-dim); }

.el-stepper {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px;
  border: 2px solid var(--el-line); border-radius: 16px; background: var(--el-surface-2);
}
.el-step-btn {
  flex: 0 0 64px; height: 64px; border-radius: 12px; border: none; cursor: pointer; font-size: 2rem; font-weight: 800;
  background: var(--el-accent-soft); color: var(--el-accent);
}
.el-step-btn:active { transform: scale(0.96); }
.el-step-val { flex: 1; text-align: center; display: flex; flex-direction: column; line-height: 1.1; }
.el-step-val b { font-size: 2.1rem; }
.el-step-val small { color: var(--el-fg-dim); font-size: 0.85rem; }

/* ─── Filas de ejercicio y series ──────────────────────────────────────── */
.el-ex {
  display: grid; grid-template-columns: 1fr 44px; gap: 8px 6px; padding: 12px; margin-bottom: 10px;
  border: 2px solid var(--el-line); border-radius: 16px; background: var(--el-surface-2);
}
.el-ex-name {
  grid-column: 1; text-align: left; background: none; border: none; color: var(--el-fg); cursor: pointer; padding: 4px 0;
  display: flex; flex-direction: column; min-height: 44px;
}
.el-ex-name b { font-size: 1.08rem; line-height: 1.25; }
.el-ex-name small { color: var(--el-accent); font-size: 0.82rem; font-weight: 700; }
.el-ex-del { grid-column: 2; grid-row: 1; }
.el-ex-fields { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-end; }
.el-ex-note { font-size: 0.9rem; color: var(--el-fg-dim); padding: 6px 0; }
.el-set { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
.el-set-n {
  flex: 0 0 30px; height: 52px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--el-fg-dim);
}
.el-set-x { font-size: 1.4rem; font-weight: 800; padding-bottom: 12px; color: var(--el-fg-dim); }
.el-pick {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left;
  min-height: 56px; padding: 10px 14px; margin-bottom: 8px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--el-line); background: var(--el-surface-2); color: var(--el-fg);
}
.el-pick b { font-size: 1.02rem; }
.el-pick small { color: var(--el-fg-dim); font-size: 0.82rem; }
.el-pick:hover { border-color: var(--el-accent-line); }

/* ─── Revisión y éxito ─────────────────────────────────────────────────── */
.el-summary {
  display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px;
  background: var(--el-accent-soft); border: 1px solid var(--el-accent-line);
}
.el-summary p { margin: 0; font-size: 1.08rem; line-height: 1.45; font-weight: 600; }
.el-summary-ico { font-size: 2.2rem; }
.el-when { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 8px; font-weight: 700; }
.el-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-height: 44px; cursor: pointer; }
.el-check input { width: 22px; height: 22px; }
.el-success { text-align: center; }
.el-success-ico {
  width: 84px; height: 84px; margin: 12px auto; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem; color: #fff; background: var(--el-ok);
}
.el-success-sentence { margin: 6px 0 12px; font-size: 1.15rem; font-weight: 700; line-height: 1.4; }
.el-progress-card {
  margin-top: 18px; padding: 14px; border-radius: 16px; background: var(--el-surface-2); border: 1px solid var(--el-line);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.el-dots { display: flex; gap: 8px; }
.el-dot {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  background: var(--el-surface); border: 2px dashed var(--el-line); filter: grayscale(1); opacity: 0.55;
}
.el-dot.is-on { filter: none; opacity: 1; border: 2px solid var(--el-ok); }
.el-progress-card small { color: var(--el-fg-dim); }

/* ─── Práctica y ayuda ─────────────────────────────────────────────────── */
.el-coach {
  margin: 0 0 16px; padding: 12px; border-radius: 16px; background: var(--el-accent-soft); border: 2px dashed var(--el-accent-line);
}
.el-coach-tag { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; color: var(--el-accent); margin-bottom: 6px; }
.el-coach p { margin: 8px 0 0; line-height: 1.45; font-size: 0.98rem; }
.el-board {
  margin: 0; padding: 10px 12px; border-radius: 10px; white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.92rem; line-height: 1.45; background: var(--el-surface); border: 1px solid var(--el-line); color: var(--el-fg);
}
.el-board-mine { border-color: var(--el-accent-line); background: color-mix(in srgb, var(--el-accent) 8%, var(--el-surface)); font-family: inherit; }

.el-help {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; background: rgba(0, 0, 0, 0.5);
}
.el-help-card {
  width: 100%; max-height: 92%; overflow-y: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--el-surface); border-top: 1px solid var(--el-line); border-radius: 20px 20px 0 0;
}
.el-help-card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.el-help-cols { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 10px 0; }
.el-help-tag { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--el-fg-dim); margin-bottom: 4px; }
.el-help-list { margin: 10px 0 16px; padding-left: 20px; line-height: 1.5; }
.el-help-list li { margin-bottom: 6px; }
@media (min-width: 520px) { .el-help-cols { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .el-overlay, .el-sheet, .el-progress i { transition: none; }
  .el-tile:active, .el-step-btn:active { transform: none; }
}
@media (prefers-contrast: more) {
  .el-tile, .el-chip, .el-grid-item, .el-input, .el-pick, .el-ex { border-color: var(--el-fg); }
}

/* Enlace del composer completo hacia el registro fácil (discreto). */
.wc-easy-link {
  margin-top: 2px; padding: 4px 0; background: none; border: none; cursor: pointer;
  font-size: 0.82rem; font-weight: 700; color: var(--accent, #ff6b35); text-decoration: underline;
}
.wc-easy-link[hidden] { display: none; }

.el-pair { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.el-pair .el-chip { flex: 1 1 140px; text-align: center; min-height: 56px; }

/* Guía: un ejemplo de cada tipo */
.el-guide-item { margin: 0 0 16px; padding: 14px; border-radius: 16px; background: var(--el-surface-2); border: 1px solid var(--el-line); }
.el-guide-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 1.05rem; }
.el-guide-head .el-tile-icon { flex-basis: 36px; font-size: 1.6rem; }
.el-foot-links { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* Último paso: resumen vivo y opciones plegadas */
.el-sum { margin-top: 18px; }
.el-sum:empty { display: none; }
.el-more { margin-top: 16px; padding: 4px 14px 14px; border-radius: 14px; border: 1px solid var(--el-line); background: var(--el-surface-2); }
.el-more > summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 700; list-style: none; }
.el-more > summary::-webkit-details-marker { display: none; }
.el-more > summary::before { content: '＋'; margin-right: 8px; color: var(--el-accent); font-weight: 800; }
.el-more[open] > summary::before { content: '−'; }
.el-tag {
  display: inline-block; padding: 1px 8px; margin-right: 4px; border-radius: 8px; font-size: 0.75rem; font-weight: 800;
  color: var(--el-accent); background: var(--el-accent-soft); border: 1px solid var(--el-accent-line);
}

[data-repq], [data-pickq] { margin-bottom: 12px; }

/* Equipo */
.el-tile-on { border-color: var(--el-accent); background: var(--el-accent-soft); }
.el-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 64px; padding: 12px 14px; margin: 0 0 10px;
  border: 2px solid var(--el-line); border-radius: 16px; background: var(--el-surface-2); color: var(--el-fg); cursor: pointer;
}
.el-opt.is-on { border-color: var(--el-accent); background: var(--el-accent-soft); }
.el-opt-ico { font-size: 1.6rem; flex: 0 0 38px; text-align: center; }
.el-partner { margin-bottom: 4px; }
.el-ok { margin: 6px 0 0; color: var(--el-ok); font-weight: 700; font-size: 0.92rem; }
.el-chip-s { min-height: 44px; padding: 6px 12px; font-size: 0.9rem; }
.el-chip small { font-weight: 600; color: var(--el-fg-dim); }
.el-ex-team { grid-column: 1 / -1; margin-top: 4px; gap: 8px; }

/* El aviso flotante de compartir tapaba los botones de la hoja: aquí hay un botón Compartir propio. */
html.el-locked .share-nudge { display: none !important; }

/* Pantalla vacía que ya trae su botón «Registrar» (primer momento, Mi nivel…); el flotante sería el mismo botón por segunda vez. */
html:has([data-reg-cta]) .wc-fab { display: none !important; }
