/* Locura Familiar · web del juego (móvil primero) */
:root {
  --ink: #141a26; --ink-2: #4a5160; --paper: #fffdf8; --line: #e4e1d8;
  --teal: #1fb8a6; --coral: #ff7f6e; --yellow: #ffd166; --bg1: #cdf3ee; --bg2: #ffe7e1;
  --c: var(--teal); --radius: 20px; --shadow: 0 14px 34px rgba(20, 26, 38, .14);
}
.lf-body { margin: 0; min-height: 100vh; background: linear-gradient(160deg, var(--bg1), #fff 45%, var(--bg2)) no-repeat; background-size: 100% 100%; color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.lf-app, .lf-embed { max-width: 640px; margin: 0 auto; padding: 14px 16px 40px; box-sizing: border-box; color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.lf-app *, .lf-embed * { box-sizing: border-box; }
.lf-app button, .lf-embed button { font-family: inherit; }
.lf-hidden { display: none !important; }
.lf-sr { position: absolute; left: -9999px; }

/* cabecera */
.lf-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.lf-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.lf-brand-mark { font-size: 34px; line-height: 1; }
.lf-brand-text { font-weight: 900; font-size: 17px; line-height: .9; letter-spacing: -.3px; }
.lf-nav { display: flex; gap: 6px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 4px; }
.lf-navbtn { border: 0; background: transparent; border-radius: 999px; padding: 8px 12px; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.lf-navbtn.is-active { background: var(--ink); color: #fff; }

/* buscador */
.lf-search { display: flex; gap: 8px; background: #fff; border: 2px solid var(--ink); border-radius: 18px; padding: 8px; box-shadow: var(--shadow); }
.lf-search input { flex: 1; min-width: 0; border: 0; font-size: 18px; font-weight: 700; padding: 10px 12px; outline: 0; background: transparent; text-transform: uppercase; font-family: inherit; }
.lf-search button { background: var(--ink); color: #fff; border: 0; border-radius: 12px; padding: 10px 18px; font-weight: 900; font-size: 16px; cursor: pointer; }
.lf-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; align-items: center; }
.lf-chip { border: 2px solid var(--ink); background: #fff; border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.lf-chip.is-on { background: var(--ink); color: #fff; }
.lf-chip.lf-chip-type { border-color: var(--c); }
.lf-chip.lf-chip-type.is-on { background: var(--c); border-color: var(--c); color: #fff; }
.lf-chip-kids.is-on { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.lf-quick-label { width: 100%; font-size: 12px; color: var(--ink-2); font-weight: 700; margin-top: 4px; }

/* mensajes */
.lf-msg { margin-top: 16px; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.lf-msg.error { border-color: #c1121f; background: #fff3f0; }
.lf-hero { text-align: center; padding: 26px 8px 10px; }
.lf-hero h1 { font-size: 34px; line-height: .9; margin: 0 0 8px; font-weight: 900; letter-spacing: -1px; }
.lf-hero p { margin: 0; color: var(--ink-2); font-weight: 600; }
.lf-hero .lf-hero-stats { font-size: 13px; margin-top: 8px; }

/* carta */
.lf-card { margin-top: 16px; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lf-card.is-sab { background: #fff3f0; }
.lf-card-band { display: flex; align-items: center; gap: 10px; background: var(--c); color: #fff; padding: 12px 16px; font-weight: 900; font-size: 18px; letter-spacing: .3px; }
.lf-card-band .lf-card-icon { font-size: 26px; line-height: 1; }
.lf-card-band .lf-card-label { flex: 1; }
.lf-card-band .lf-card-id { font-size: 13px; background: rgba(0,0,0,.28); padding: 4px 9px; border-radius: 999px; letter-spacing: 1px; }
.lf-card-body { padding: 14px 16px 16px; }
.lf-reader { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: var(--ink-2); background: #f5f3ec; border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; }
.lf-reader.secret { background: #fff6c7; color: #5a4300; }

.lf-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.lf-mode { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 6px; text-align: center; cursor: pointer; font-weight: 900; font-size: 13px; color: var(--ink-2); }
.lf-mode small { display: block; font-weight: 800; font-size: 11px; margin-top: 2px; }
.lf-mode.is-on { border-color: var(--c); background: var(--c); color: #fff; }
.lf-mode.is-on.hardcore { background: #c1121f; border-color: #c1121f; }
.lf-mode-text { font-size: 14px; color: var(--ink); background: #f5f3ec; border-left: 5px solid var(--c); border-radius: 0 10px 10px 0; padding: 8px 12px; margin-bottom: 12px; }
.lf-mode-text b { color: var(--ink); }

.lf-prompt { font-size: 24px; font-weight: 900; line-height: 1.15; margin: 8px 0 12px; }
.lf-prompt.quote { font-style: italic; font-weight: 800; }
.lf-prompt.small { font-size: 19px; }
.lf-sub { font-size: 15px; color: var(--ink-2); font-weight: 700; margin: -6px 0 12px; }
.lf-options { display: grid; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.lf-options li { background: #f5f3ec; border-radius: 10px; padding: 8px 12px; font-weight: 800; }
.lf-forbidden { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.lf-forbidden span { background: #ffe1dd; color: #8a0c14; border: 1px solid #f3b4ad; border-radius: 999px; padding: 5px 10px; font-weight: 800; text-decoration: line-through; }
.lf-forbidden span.dim { opacity: .35; text-decoration: none; }
.lf-secret { position: relative; }
.lf-secret-cover { position: absolute; inset: 0; background: #141a26; color: #fff; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 900; cursor: pointer; text-align: center; padding: 10px; }
.lf-secret-cover small { font-weight: 600; opacity: .8; }

.lf-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 900; font-size: 15px; cursor: pointer; text-decoration: none; background: var(--ink); color: #fff; line-height: 1.1; }
.lf-btn.secondary { background: #e8f8f6; color: var(--ink); border: 2px solid var(--c); }
.lf-btn.danger { background: var(--coral); color: var(--ink); }
.lf-btn.ghost { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.lf-btn.yellow { background: var(--yellow); color: var(--ink); }
.lf-btn.wide { width: 100%; }
.lf-btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.lf-btn:disabled { opacity: .45; cursor: default; }
.lf-timer { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.lf-timer.running { background: #c1121f; color: #fff; }
.lf-timer.done { background: var(--yellow); color: var(--ink); animation: lf-blink .6s 4; }
@keyframes lf-blink { 50% { opacity: .3; } }

.lf-hints { margin-top: 12px; background: #eefcfb; border: 2px dashed var(--teal); border-radius: 14px; padding: 12px; }
.lf-hints p { margin: 0 0 8px; font-weight: 700; font-size: 14px; }
.lf-hint-nums { display: flex; gap: 6px; flex-wrap: wrap; }
.lf-hint-nums button { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; font-weight: 900; font-size: 18px; cursor: pointer; }
.lf-hint-nums button.used { background: var(--ink); color: #fff; }
.lf-hint-shown { margin-top: 8px; background: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 800; }
.lf-answer { margin-top: 12px; background: #fff2bd; border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; }
.lf-answer h3 { margin: 0 0 4px; font-size: 13px; letter-spacing: 1px; color: var(--ink-2); }
.lf-answer .lf-answer-main { font-size: 20px; font-weight: 900; }
.lf-answer p { margin: 6px 0 0; }
.lf-score-box { margin-top: 12px; border-top: 2px solid var(--line); padding-top: 12px; }
.lf-score-box p { margin: 0 0 8px; font-weight: 800; font-size: 14px; }
.lf-score-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lf-score-row label { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; font-weight: 700; background: #f5f3ec; border-radius: 10px; padding: 6px 10px; }
.lf-card-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.lf-rules-mini { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.lf-rules-mini b { color: var(--ink); }

/* árbitro */
.lf-ref { margin-top: 16px; }
.lf-panel { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px; }
.lf-panel h2 { margin: 0 0 10px; font-size: 18px; }
.lf-panel h2 small { font-weight: 700; color: var(--ink-2); font-size: 13px; }
.lf-teams { display: grid; gap: 10px; }
.lf-team { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.lf-team.is-turn { border-color: var(--teal); background: #eefcfb; }
.lf-team-name { border: 0; background: transparent; font: inherit; font-weight: 900; font-size: 17px; width: 100%; min-width: 0; color: var(--ink); }
.lf-team-meta { display: flex; gap: 10px; font-size: 12px; color: var(--ink-2); font-weight: 700; flex-wrap: wrap; }
.lf-team-meta button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 2px 8px; font-weight: 800; cursor: pointer; font-size: 12px; }
.lf-score { display: flex; align-items: center; gap: 6px; }
.lf-score b { font-size: 30px; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.lf-score button { width: 38px; height: 38px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; font-weight: 900; font-size: 18px; cursor: pointer; }
.lf-ref-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.lf-bigtimer { text-align: center; }
.lf-bigtimer .lf-digits { font-size: 64px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; margin: 6px 0; }
.lf-bigtimer.running .lf-digits { color: #c1121f; }
.lf-winner { background: var(--yellow); border-radius: 12px; padding: 10px 12px; font-weight: 900; text-align: center; margin-bottom: 10px; }

/* reglas */
.lf-rules h2 { font-size: 18px; margin: 0 0 8px; }
.lf-rules ul, .lf-rules ol { padding-left: 20px; margin: 0; }
.lf-rules li { margin-bottom: 6px; }
.lf-typegrid { display: grid; gap: 8px; }
.lf-typerow { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; border-left: 5px solid var(--c); background: #f8f7f2; border-radius: 0 12px 12px 0; padding: 8px 10px; }
.lf-typerow .ic { font-size: 26px; line-height: 1; }
.lf-typerow b { display: block; }
.lf-typerow small { color: var(--ink-2); display: block; margin-top: 2px; }

/* modal */
.lf-modal { position: fixed; inset: 0; background: rgba(20,26,38,.6); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 9999; }
.lf-modal-box { background: #fff; border: 2px solid var(--ink); border-radius: 18px; padding: 18px; max-width: 380px; width: 100%; box-shadow: var(--shadow); }
.lf-modal-box h2 { margin: 0 0 6px; font-size: 20px; }
.lf-modal-box p { margin: 0 0 14px; color: var(--ink-2); font-weight: 600; }

.lf-foot { text-align: center; margin-top: 30px; font-size: 12px; color: var(--ink-2); font-weight: 700; }

@media (max-width: 420px) {
  .lf-prompt { font-size: 21px; }
  .lf-navbtn { padding: 7px 9px; font-size: 12px; }
  .lf-search input { font-size: 16px; }
}

/* ---------- pantalla de acceso ---------- */
.lf-body.lf-locked { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.lf-login-wrap { width: 100%; max-width: 440px; }
.lf-login { position: relative; background: #fff; border: 2px solid var(--ink); border-radius: 26px; padding: 28px 22px 22px; box-shadow: var(--shadow); overflow: hidden; }
.lf-login-art { position: absolute; right: -10px; top: -14px; width: 150px; height: 120px; pointer-events: none; }
.lf-login-card { position: absolute; width: 46px; height: 64px; border-radius: 8px; border: 2px solid var(--ink); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 6px 14px rgba(20,26,38,.18); }
.lf-login-card.c1 { left: 20px; top: 26px; transform: rotate(-14deg); background: #e8f8f6; }
.lf-login-card.c2 { left: 58px; top: 18px; transform: rotate(4deg); background: #f3eefb; }
.lf-login-card.c3 { left: 96px; top: 30px; transform: rotate(18deg); background: #e9f1ff; }
.lf-login-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.lf-login h1 { font-size: 30px; line-height: 1; margin: 0 0 8px; letter-spacing: -.6px; font-weight: 900; }
.lf-login-text { margin: 0 0 16px; color: var(--ink-2); font-weight: 600; }
.lf-login-error { background: #fff3f0; border: 2px solid #c1121f; color: #8a0c14; border-radius: 12px; padding: 10px 12px; font-weight: 800; margin-bottom: 14px; }
.lf-login-form { display: grid; gap: 12px; }
.lf-login-form label { font-weight: 800; font-size: 13px; color: var(--ink-2); display: grid; gap: 5px; }
.lf-login-form input[type=text], .lf-login-form input[type=password] { width: 100%; border: 2px solid var(--ink); border-radius: 14px; padding: 13px 14px; font: inherit; font-size: 17px; font-weight: 700; color: var(--ink); background: #fff; outline: 0; }
.lf-login-form input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(31,184,166,.25); }
.lf-pass-wrap { position: relative; display: block; }
.lf-pass-wrap input { padding-right: 52px; }
.lf-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 20px; cursor: pointer; padding: 6px; }
.lf-remember { display: flex !important; align-items: center; gap: 8px; font-size: 14px !important; color: var(--ink) !important; }
.lf-remember input { width: 20px; height: 20px; accent-color: var(--teal); }
.lf-login-form .lf-btn { margin-top: 6px; font-size: 17px; padding: 15px; background: var(--ink); }
.lf-login-foot { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-2); font-weight: 600; text-align: center; }
.lf-embed .lf-login-wrap { margin: 0 auto; }
.lf-user { display: inline-flex; gap: 6px; align-items: center; }
.lf-user a { color: var(--ink-2); }
