/* ============================================================
   Mi Calendario · Transitando la Biblia — hoja de estilos
   Identidad: teal + dorado + azul, tipografía Fraunces/Inter
   ============================================================ */
:root {
  --teal: #1A7B7B; --teal-2: #2A9B9B; --teal-3: #0A5B5B;
  --gold: #C9A961; --gold-2: #E0C98A; --gold-3: #9E7F3C;
  --blue: #6B98B4; --blue-2: #8BB0C6;
  --bg: #F4F7F7; --surface: #FFFFFF; --surface-2: #EEF3F3;
  --text: #1F2A2E; --muted: #5F6E73; --line: #DCE5E6;
  --ok: #2E9E5B; --warn: #D99A1C; --danger: #D64545;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(26,123,123,.10);
  --shadow-sm: 0 2px 8px rgba(26,123,123,.08);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --nav-h: 64px;
}
[data-theme="dark"] {
  --bg: #0F1718; --surface: #162122; --surface-2: #1D2B2C;
  --text: #E8EFEF; --muted: #9FB0B3; --line: #28393B;
  --teal: #3FB3B3; --teal-2: #5BCACA; --teal-3: #2A9B9B;
  --gold: #D9BC75; --gold-3: #C9A961;
  --shadow: 0 6px 24px rgba(0,0,0,.35); --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); color: var(--text); background: var(--bg);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin: 0 0 .4em; color: var(--text); }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .9em; }
a { color: var(--teal); }
button { font: inherit; }
input, textarea, select { font: inherit; color: inherit; }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* --- Layout --- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; background: #fff; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 1.05rem; }
.brand-text small { color: var(--muted); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.topnav { display: none; gap: 4px; margin-left: 12px; }
.topnav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.topnav a.active, .topnav a:hover { color: var(--teal); background: color-mix(in srgb, var(--teal) 10%, transparent); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.view { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 18px 16px calc(var(--nav-h) + 24px); }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: grid; grid-auto-flow: column; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { text-decoration: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 10px; font-size: .72rem; font-weight: 600; }
.bottomnav a .nav-ico { font-size: 1.25rem; line-height: 1; }
.bottomnav a.active { color: var(--teal); }
@media (min-width: 900px) {
  .topnav { display: flex; }
  .bottomnav { display: none; }
  .view { padding-bottom: 40px; }
}

/* --- Componentes --- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; border: 1px solid var(--line); }
.card + .card { margin-top: 14px; }
.card-hero { background: linear-gradient(135deg, var(--teal-3), var(--teal) 55%, var(--blue)); color: #fff; border: none; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.card-hero h1, .card-hero h2, .card-hero h3 { color: #fff; }
.card-hero .muted { color: rgba(255,255,255,.8); }
.card-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.08); }
.card-gold { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 10%, var(--surface)), var(--surface)); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--gold-3); margin-bottom: 6px; }
.card-hero .eyebrow { color: var(--gold-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 999px; padding: 11px 20px; font-weight: 600; cursor: pointer; background: var(--teal); color: #fff; transition: transform .12s, box-shadow .12s, opacity .12s; text-decoration: none; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; width: 100%; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-ghost { background: transparent; color: var(--teal); border: 1.5px solid color-mix(in srgb, var(--teal) 45%, transparent); }
.btn-soft { background: color-mix(in srgb, var(--teal) 12%, transparent); color: var(--teal); }
.btn-gold { background: var(--gold); color: #2B2410; }
.btn-danger { background: var(--danger); }
.btn-light { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.chip-fire { background: linear-gradient(135deg, #FFB347, #FF6A3D); color: #fff; }
.chip-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.chip-warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: #8A5E00; }
.chip-teal { background: color-mix(in srgb, var(--teal) 12%, transparent); color: var(--teal); }
.chip-gold { background: color-mix(in srgb, var(--gold) 25%, transparent); color: var(--gold-3); }
.chip-muted { background: var(--surface-2); color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; }
.input, textarea.input, select.input { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); outline: none; transition: border-color .12s, box-shadow .12s; }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat .v { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--teal); line-height: 1.1; }
.stat .l { font-size: .78rem; color: var(--muted); }
.card-hero .stat { background: rgba(255,255,255,.14); }
.card-hero .stat .v { color: #fff; }
.card-hero .stat .l { color: rgba(255,255,255,.85); }
.progress { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.card-hero .progress { background: rgba(255,255,255,.22); }
.progress > span { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width .6s ease; box-shadow: 0 0 12px color-mix(in srgb, var(--gold) 60%, transparent); }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 60%, var(--surface)) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius-sm); min-height: 20px; }
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.tabs button.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.toasts { position: fixed; top: 14px; right: 14px; left: 14px; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { background: var(--surface); color: var(--text); border-left: 4px solid var(--teal); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: 420px; animation: slideIn .25s ease; pointer-events: auto; font-size: .95rem; }
.toast.success { border-left-color: var(--ok); } .toast.error { border-left-color: var(--danger); } .toast.warning { border-left-color: var(--warn); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }
.fade-in { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }

/* Sheet (panel deslizante para día / formularios) */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8,20,22,.55); backdrop-filter: blur(3px); }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25); overflow: auto; animation: up .28s ease; }
.sheet-content { padding: 22px 18px 32px; max-width: 760px; margin: 0 auto; }
.sheet-close { position: sticky; top: 10px; float: right; margin: 10px 12px 0 0; z-index: 2; }
@keyframes up { from { transform: translateY(40px); opacity: 0 } to { transform: none; opacity: 1 } }
@media (min-width: 900px) {
  .sheet-panel { top: 5vh; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); width: min(820px, 94vw); border-radius: 22px; max-height: 90vh; }
}

/* --- Login --- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--teal) 18%, transparent), transparent), radial-gradient(800px 500px at 110% 110%, color-mix(in srgb, var(--gold) 20%, transparent), transparent); }
.login-card { width: min(460px, 100%); text-align: center; padding: 34px 28px; }
.login-card .brand-mark { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 14px; display: block; box-shadow: var(--shadow); background: #fff; }
.login-card h1 { margin-bottom: 4px; }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 16px 0; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { background: #fff; color: #1F2A2E; border: 1.5px solid var(--line); }
[data-theme="dark"] .btn-google { background: #fff; }

/* --- Hoy --- */
.today-date { font-family: var(--font-display); font-size: 1.05rem; text-transform: capitalize; }
.passage { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.media-box { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); margin: 14px 0; }
.media-box img { display: block; width: 100%; height: auto; }
.media-box video { display: block; width: 100%; max-height: 480px; background: #000; }
.devotional { background: var(--surface-2); border-left: 4px solid var(--teal); border-radius: var(--radius-sm); padding: 18px 20px; font-size: 1.03rem; line-height: 1.75; }
.devotional h1, .devotional h2, .devotional h3 { font-size: 1.1rem; margin: 1.1em 0 .4em; color: var(--teal); }
.devotional h1:first-child, .devotional h2:first-child, .devotional h3:first-child { margin-top: 0; }
.devotional blockquote { margin: .8em 0; padding: .4em 1em; border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); border-radius: 6px; font-style: italic; }
.devotional p { margin: 0 0 .9em; }
.devotional ul, .devotional ol { padding-left: 1.3em; }
.devotional hr { border: none; border-top: 1px solid var(--line); margin: 1.2em 0; }
.devotional.collapsed { max-height: 420px; overflow: hidden; position: relative; }
.devotional.collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; background: linear-gradient(transparent, var(--surface-2)); }
.read-more { display: block; margin: 8px auto 0; }
.status-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 600; margin: 14px 0; }
.status-line.done { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.status-line.pending { background: var(--surface-2); color: var(--muted); }
div.quiz { margin-top: 18px; padding: 18px; border-radius: var(--radius); border: 1.5px solid color-mix(in srgb, var(--blue) 50%, var(--line)); background: color-mix(in srgb, var(--blue) 7%, var(--surface)); }
.quiz-q { background: var(--surface); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.quiz-q .qt { font-weight: 600; margin-bottom: 10px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1.5px solid transparent; background: var(--surface-2); margin-bottom: 8px; cursor: pointer; }
.opt:hover { border-color: var(--teal-2); }
.opt input { margin-top: 3px; accent-color: var(--teal); }
.opt.correct { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.opt.incorrect { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.quiz-result { text-align: center; padding: 14px; border-radius: var(--radius-sm); background: var(--surface); margin-top: 10px; }
.quiz-result .score { font-family: var(--font-display); font-size: 1.8rem; color: var(--teal); font-weight: 700; }
.points-today { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Carrusel de comentarios */
.carousel { overflow: hidden; border-radius: var(--radius); background: var(--surface-2); padding: 12px 0; }
.carousel-track { display: flex; gap: 14px; width: max-content; animation: scrollx 60s linear infinite; }
.carousel-track:hover { animation-play-state: paused; }
.ccard { width: 300px; flex-shrink: 0; background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; border-left: 3px solid var(--teal); box-shadow: var(--shadow-sm); }
.ccard .who { font-weight: 600; color: var(--teal); display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.ccard .what { font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* --- Calendario --- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h2 { text-transform: capitalize; margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.cal-dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 6px 0; }
.cal-day { aspect-ratio: 1; min-width: 0; overflow: hidden; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; position: relative; transition: transform .12s, box-shadow .12s; padding: 4px; }
.cal-day:hover { transform: scale(1.04); box-shadow: var(--shadow-sm); border-color: var(--teal); z-index: 1; }
.cal-day .n { font-weight: 700; font-size: .95rem; }
.cal-day .dots { display: flex; gap: 3px; }
.cal-day .dots i { width: 6px; height: 6px; border-radius: 50%; display: block; background: var(--line); padding: 0; margin: 0; border: 0; }
.cal-day .dots i.text { background: var(--teal); } .cal-day .dots i.quiz { background: var(--blue); } .cal-day .dots i.media { background: var(--gold); }
.cal-day.done { background: linear-gradient(135deg, var(--teal), var(--blue)); color: #fff; border-color: transparent; }
.cal-day.done .dots i { background: rgba(255,255,255,.7); }
.cal-day.today { outline: 2px solid var(--gold); outline-offset: 2px; }
.cal-day.future { opacity: .45; }
.cal-day.empty { visibility: hidden; }
.cal-day.quizdone::after { content: "✓"; position: absolute; top: 3px; right: 6px; font-size: .7rem; font-weight: 800; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: .8rem; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.pending-list { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- Comunidad --- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.podium .place { text-align: center; background: var(--surface); border-radius: var(--radius); padding: 16px 10px; border: 1.5px solid var(--line); }
.podium .place.p1 { order: 2; border-color: var(--gold); background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 16%, var(--surface)), var(--surface)); padding-top: 26px; }
.podium .place.p2 { order: 1; } .podium .place.p3 { order: 3; }
.podium .medal { font-size: 2rem; }
.podium .name { font-weight: 700; margin: 6px 0 2px; word-break: break-word; font-size: .95rem; }
.podium .pts { color: var(--gold-3); font-weight: 800; font-family: var(--font-display); font-size: 1.2rem; }
.podium .mini { font-size: .75rem; color: var(--muted); }
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank { display: flex; align-items: center; gap: 12px; background: var(--surface-2); padding: 10px 14px; border-radius: var(--radius-sm); }
.rank .pos { font-family: var(--font-display); font-weight: 700; width: 36px; color: var(--muted); }
.rank .pos.g { color: #D4A017; } .rank .pos.s { color: #8E9AA3; } .rank .pos.b { color: #B87333; }
.rank .nm { flex: 1; font-weight: 600; }
.rank .sc { font-weight: 800; color: var(--gold-3); }
.rank.me { outline: 2px solid var(--teal); }
.qcard { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; }
.qcard .qh { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.qcard .qtext { white-space: pre-wrap; margin-bottom: 8px; }
.answer { background: var(--surface); border-left: 3px solid var(--teal); border-radius: 8px; padding: 10px 12px; margin-top: 8px; white-space: pre-wrap; }
.answer b { color: var(--teal); }

/* --- Perfil --- */
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar-sm { display: inline-grid; vertical-align: middle; font-family: var(--font-display); font-weight: 700; flex-shrink: 0; }
.rank .avatar-sm, .ccard .avatar-sm { margin-right: 8px; }
.podium .avatar-sm { margin: 0 auto 4px; display: grid; }
.avatar { overflow: hidden; width: 84px; height: 84px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--blue)); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; flex-shrink: 0; }
.pts-day { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pts-day .d { text-transform: capitalize; font-weight: 600; font-size: .92rem; }
.pts-day .b { display: flex; gap: 6px; flex-wrap: wrap; }

/* --- Admin --- */
.adm-day { border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 8px; overflow: hidden; }
.adm-day > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.adm-day > summary::-webkit-details-marker { display: none; }
.adm-day .dn { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; width: 40px; color: var(--teal); }
.adm-day .dt { flex: 1; min-width: 0; }
.adm-day .dt .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-day .dt .s { font-size: .78rem; color: var(--muted); }
.adm-day .flags { display: flex; gap: 4px; }
.adm-day .flags span { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: .8rem; background: var(--surface-2); color: var(--muted); }
.adm-day .flags span.on { background: color-mix(in srgb, var(--teal) 15%, transparent); color: var(--teal); }
.adm-day .body { padding: 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.adm-day[open] > summary { background: color-mix(in srgb, var(--teal) 7%, var(--surface)); }
.editor-wrap { display: grid; gap: 12px; }
@media (min-width: 1000px) { .editor-wrap.split { grid-template-columns: 1fr 1fr; } }
.editor-wrap textarea { min-height: 320px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; }
.preview { background: var(--surface); border-radius: var(--radius-sm); padding: 14px; min-height: 120px; border: 1px dashed var(--line); }
.qedit { background: var(--surface); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; }
.qedit .oi { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qedit .oi input[type="radio"] { accent-color: var(--ok); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: color-mix(in srgb, var(--teal) 10%, var(--surface)); color: var(--teal); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.table-wrap { overflow-x: auto; }
.drop { border: 2px dashed color-mix(in srgb, var(--teal) 40%, var(--line)); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); background: color-mix(in srgb, var(--teal) 4%, var(--surface)); }
.drop.over { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 10%, var(--surface)); }
.import-preview { background: var(--surface); border-radius: var(--radius-sm); padding: 14px; border: 1px solid var(--line); }
.kbd { font-family: ui-monospace, monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .85em; }

/* WhatsApp */
.whatsapp-float { position: fixed; left: 16px; bottom: calc(var(--nav-h) + 14px); width: 54px; height: 54px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(37,211,102,.45); z-index: 35; transition: transform .15s; }
.whatsapp-float:hover { transform: scale(1.08); background: #128C7E; }
@media (min-width: 900px) { .whatsapp-float { bottom: 24px; } }
body.no-nav .whatsapp-float { bottom: 20px; }

@media (max-width: 520px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 16px; }
  .podium { gap: 6px; }
  .podium .medal { font-size: 1.5rem; }
}
@media print { .topbar, .bottomnav, .whatsapp-float { display: none !important; } }

/* Admin en móvil: el título ocupa la fila completa; banderas y estado pasan debajo */
@media (max-width: 640px) {
  .adm-day > summary { flex-wrap: wrap; row-gap: 8px; }
  .adm-day .dt { flex: 1 1 calc(100% - 52px); }
  .adm-day .dt .t { white-space: normal; }
  .adm-day .flags { margin-left: 52px; }
  .adm-day > summary > .chip { margin-left: auto; }
}

/* Doctrina del día / versículo clave / Descubrir más */
.doctrine-chip { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-3); font-size: .85rem; }
.doctrine-chip b { color: var(--text); }
.key-verse { margin-top: 6px; color: var(--muted); font-style: italic; font-size: .95rem; }
.discover { margin-top: 14px; }
.discover .btn-lg { width: auto; margin: 0 auto; display: flex; }
.discover-body { margin-top: 12px; border-left-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--surface)); }

/* Ventana emergente */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8,20,22,.6); backdrop-filter: blur(3px); }
.modal-panel { position: relative; width: min(820px, 100%); max-height: 90dvh; background: var(--surface); border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; animation: up .25s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 1.15rem; }
.modal-body { padding: 18px 20px 24px; overflow: auto; }
.modal-body .devotional { background: transparent; border-left: none; padding: 0; }
.day-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.intro-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.intro-tabs button { border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); padding: 7px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .85rem; }
.intro-tabs button.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.read-links { display: grid; gap: 10px; }
.read-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); text-decoration: none; color: var(--text); font-weight: 600; }
.read-links a:hover { background: color-mix(in srgb, var(--teal) 12%, var(--surface-2)); }
.read-links .v { font-size: .78rem; color: var(--muted); font-weight: 500; }
.version-toggle { display: flex; gap: 6px; margin-bottom: 12px; }
.version-toggle button { flex: 1; }
@media (max-width: 520px) { .modal { padding: 0; align-items: end; } .modal-panel { max-height: 94dvh; border-radius: 20px 20px 0 0; } }

.modal-confirm { max-width: 420px; margin: auto; }
#confirmModal { z-index: 1200; }

/* Acceso completo */
.lock{font-size:.8em;opacity:.8;margin-left:2px}
.quiz-locked{text-align:center;border-style:dashed}
.support p{margin:0 0 12px}
.support-lock{background:var(--soft,#F3F8F7);border-radius:10px;padding:10px 12px;margin-bottom:12px}
.support-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 14px}
.support-cols ul{margin:6px 0 0;padding-left:18px}
.support-cols li{margin:4px 0;font-size:.92rem}
@media (max-width:520px){.support-cols{grid-template-columns:1fr}}
