/* ShemaKoli — hoja de estilos */

/* ---------- Fuentes (alojadas localmente: sin llamadas a terceros, RGPD) ---------- */
@font-face { font-family: "Frank Ruhl Libre"; font-weight: 500; font-display: swap; src: url(../fonts/frank-ruhl-libre-hebrew-500-normal.woff2) format("woff2"); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Frank Ruhl Libre"; font-weight: 500; font-display: swap; src: url(../fonts/frank-ruhl-libre-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Frank Ruhl Libre"; font-weight: 500; font-display: swap; src: url(../fonts/frank-ruhl-libre-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Frank Ruhl Libre"; font-weight: 700; font-display: swap; src: url(../fonts/frank-ruhl-libre-hebrew-700-normal.woff2) format("woff2"); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Frank Ruhl Libre"; font-weight: 700; font-display: swap; src: url(../fonts/frank-ruhl-libre-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Frank Ruhl Libre"; font-weight: 700; font-display: swap; src: url(../fonts/frank-ruhl-libre-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Assistant"; font-weight: 400; font-display: swap; src: url(../fonts/assistant-hebrew-400-normal.woff2) format("woff2"); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Assistant"; font-weight: 400; font-display: swap; src: url(../fonts/assistant-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Assistant"; font-weight: 400; font-display: swap; src: url(../fonts/assistant-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Assistant"; font-weight: 600; font-display: swap; src: url(../fonts/assistant-hebrew-600-normal.woff2) format("woff2"); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Assistant"; font-weight: 600; font-display: swap; src: url(../fonts/assistant-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Assistant"; font-weight: 600; font-display: swap; src: url(../fonts/assistant-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Assistant"; font-weight: 700; font-display: swap; src: url(../fonts/assistant-hebrew-700-normal.woff2) format("woff2"); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Assistant"; font-weight: 700; font-display: swap; src: url(../fonts/assistant-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Assistant"; font-weight: 700; font-display: swap; src: url(../fonts/assistant-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f7f3ea;
  --bg-2: #efe8d9;
  --surface: #fffdf8;
  --ink: #1b2236;
  --ink-2: #4a5268;
  --muted: #737a8c;
  --line: #e2d9c6;
  --navy: #16213e;
  --navy-2: #22305a;
  --gold: #b8862f;
  --gold-ink: #241a06;
  --gold-soft: #f3e6c8;
  --link: #24427f;
  --ok: #2f7a4a;   --ok-bg: #e5f2e8;
  --warn: #8a5a00; --warn-bg: #fbefd2;
  --err: #a43131;  --err-bg: #f8e3e1;
  --info: #24427f; --info-bg: #e3eaf7;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(22,33,62,.06), 0 6px 20px rgba(22,33,62,.06);
  --serif: "Frank Ruhl Libre", "Times New Roman", serif;
  --sans: "Assistant", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1424; --bg-2: #151c31; --surface: #182039;
    --ink: #ece6d8; --ink-2: #c4bfb2; --muted: #9096a6; --line: #2a3352;
    --navy: #0b1020; --navy-2: #1a2445;
    --gold: #d6a650; --gold-ink: #1d1404; --gold-soft: #3a2f17;
    --link: #a9c0ee;
    --ok: #7fd09b; --ok-bg: #173523; --warn: #f0c66b; --warn-bg: #3a2d10;
    --err: #f09a9a; --err-bg: #3d1a1a; --info: #a9c0ee; --info-bg: #1b2747;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    --wa: #25a35a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1424; --bg-2: #151c31; --surface: #182039;
  --ink: #ece6d8; --ink-2: #c4bfb2; --muted: #9096a6; --line: #2a3352;
  --navy: #0b1020; --navy-2: #1a2445;
  --gold: #d6a650; --gold-ink: #1d1404; --gold-soft: #3a2f17;
  --link: #a9c0ee;
  --ok: #7fd09b; --ok-bg: #173523; --warn: #f0c66b; --warn-bg: #3a2d10;
  --err: #f09a9a; --err-bg: #3d1a1a; --info: #a9c0ee; --info-bg: #1b2747;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-bottom: 96px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: 1.5rem; }
.h3 { font-size: 1.25rem; margin-top: 1.6em; }
.h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img, svg, video, iframe { max-width: 100%; }
code { font-size: .9em; background: var(--bg-2); padding: .1em .35em; border-radius: 5px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.break { word-break: break-all; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
.narrow { max-width: 680px; }
.section { padding-block: 32px; }
.section-title { font-size: 1.55rem; margin-bottom: 18px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; }
.lead-sm { color: var(--ink-2); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .08s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: color-mix(in srgb, var(--gold) 88%, #fff); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-danger { background: var(--err); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.danger { color: var(--err) !important; }
form.inline { display: inline; }

/* ---------- Cabecera ---------- */
.site-header { background: var(--navy); color: #f4ecd9; position: sticky; top: 0; z-index: 40; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font: 700 1.3rem/1 var(--serif); letter-spacing: .01em; }
.brand-he { font: 500 .85rem/1.2 var(--serif); color: #d8b56d; }
.site-nav { display: flex; align-items: center; gap: 18px; margin-inline-start: auto; }
.site-nav a, .site-nav .linklike { color: #f4ecd9; text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover, .site-nav .linklike:hover { color: #fff; text-decoration: underline; }
.site-nav .btn-gold { color: var(--gold-ink); text-decoration: none; }
.site-nav .nav-search input[type=search] {
  width: 200px; height: 38px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; padding: 0 14px; font: inherit; font-size: .95rem;
}
.site-nav .nav-search input::placeholder { color: rgba(244,236,217,.6); }
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; font-weight: 700; font-size: .85rem; letter-spacing: .06em;
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 12px;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); min-width: 150px; z-index: 50;
}
.lang-menu li a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--ink) !important; }
.lang-menu li a:hover, .lang-menu li a[aria-current] { background: var(--gold-soft); text-decoration: none !important; }
.nav-toggle { display: none; margin-inline-start: auto; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 22px; height: 2px; background: #f4ecd9; border-radius: 2px; position: relative; margin: auto; content: "";
}
.nav-toggle .bars::before { position: absolute; top: -7px; }
.nav-toggle .bars::after { position: absolute; top: 7px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; inset-inline: 0; top: 68px; background: var(--navy-2);
    flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 18px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  }
  .site-nav.open { display: flex; }
  .site-nav > a, .site-nav > form.inline .linklike { padding: 10px 4px; }
  .site-nav .nav-search input[type=search] { width: 100%; height: 44px; }
  .hero::after { width: 240px; height: 240px; opacity: .05; }
  .site-nav .btn-gold { margin-block: 6px; }
  .lang-menu ul { position: static; margin-top: 8px; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(214,166,80,.22), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #f4ecd9; padding: 64px 0 72px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset-inline-end: -60px; bottom: -80px; width: 380px; height: 380px;
  background: url(../img/mark.svg) no-repeat center / contain; opacity: .08; pointer-events: none;
}
.hero h1 { max-width: 20ch; color: #fff; }
.hero .lead { color: #dcd3bf; }
.eyebrow { color: #d8b56d; font-weight: 600; letter-spacing: .02em; margin-bottom: 14px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero .btn-ghost { color: #f4ecd9; border-color: rgba(244,236,217,.35); }
.hero .btn-ghost:hover { border-color: #d8b56d; }

/* ---------- Secciones (categorías) ---------- */
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cat-tile {
  display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 16px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cat-tile:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-he { font: 700 1.45rem/1.3 var(--serif); color: var(--gold); text-align: end; }
.cat-name { font-weight: 700; font-size: 1.02rem; }
.cat-count { font-size: .82rem; color: var(--muted); }

/* ---------- Tarjetas de melodía ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 18px; margin-bottom: 14px; }
.mel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
@media (max-width: 400px) { .mel-list { grid-template-columns: 1fr; } }
.mel-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; transition: border-color .15s; }
.mel-card:hover { border-color: var(--gold); }
.mel-body { min-width: 0; }
.mel-title { font: 700 1.08rem/1.3 var(--sans); margin: 0 0 2px; }
.mel-title a { color: var(--ink); text-decoration: none; }
.mel-title a:hover { text-decoration: underline; }
.mel-meta { margin: 0; font-size: .88rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.tag { display: inline-block; font-size: .82rem; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--gold-soft); color: var(--ink); text-decoration: none; }
.pdf-flag { font-size: .72rem; font-weight: 700; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }

.play-btn {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--navy); position: relative; transition: transform .1s, background .15s;
}
.play-btn::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0;
  border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--gold);
  transform: translateX(2px);
}
[dir="rtl"] .play-btn::before { transform: translateX(2px); } /* el triángulo de "play" no se invierte */
.play-btn.is-playing::before { width: 12px; height: 15px; border: 0; border-inline: 4px solid var(--gold); transform: none; }
.play-btn:hover { transform: scale(1.06); }
.play-btn.sm { width: 36px; height: 36px; }
.play-btn.sm::before { border-width: 6px 0 6px 10px; }
.play-btn.sm.is-playing::before { width: 10px; height: 12px; border-width: 0 3px; }
@media (prefers-color-scheme: dark) { .play-btn { background: var(--gold-soft); } }

/* ---------- Cabecera de página ---------- */
.page-head { background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 28px 0 22px; }
.page-head h1 { margin-bottom: 6px; }
.title-he { color: var(--gold); font-weight: 500; margin-inline-start: 10px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.mel-byline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--ink-2); margin: 0; }
.dot { color: var(--muted); }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=search] { flex: 1; min-width: 200px; max-width: 420px; }
.chip { padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; }
.chip.on { background: var(--navy); color: #f4ecd9; border-color: var(--navy); }

/* ---------- Página de melodía ---------- */
.melody-layout, .review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
@media (max-width: 860px) { .melody-layout, .review-layout { grid-template-columns: 1fr; } }
.player-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.big-audio { width: 100%; display: block; }
.player-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.2rem; margin-top: 1.6em; }
.prose ul { padding-inline-start: 1.2em; }
.pdf-embed { margin-top: 20px; }
.pdf-embed summary, .report summary { cursor: pointer; font-weight: 600; color: var(--link); }
.pdf-embed iframe { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 12px; background: #fff; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 20px; font-size: .95rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts-inline { background: none; border: 0; padding: 0; }
.share { margin-bottom: 20px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.share-ico { font-size: .88rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.share-ico:hover { border-color: var(--gold); }
.report { border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- Formularios ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
.form small { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: 400 1rem/1.4 var(--sans);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
input[type=file] { font: inherit; font-size: .95rem; }
.form label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; accent-color: var(--gold); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 18px; margin: 0; display: flex; flex-direction: column; gap: 14px; background: var(--surface); }
legend { font-weight: 700; padding: 0 6px; font-family: var(--serif); font-size: 1.1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
.consent-box { background: var(--bg-2); }
.consent-text {
  max-height: 300px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: .88rem; line-height: 1.55; white-space: normal;
}
.legal .consent-text { max-height: none; }
.form-errors { background: var(--err-bg); color: var(--err); border-radius: var(--radius-sm); padding: 12px 14px; }
.form-errors p { margin: 0; }
.search-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.search-form input { flex: 2; min-width: 200px; }
.search-form select { flex: 1; min-width: 160px; }
.w-num { width: 80px; }

/* ---------- Subida de audio ---------- */
.audio-box { gap: 12px; }
.tabs { display: flex; gap: 6px; background: var(--bg-2); padding: 4px; border-radius: 999px; width: fit-content; }
.tab { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font: 600 .95rem var(--sans); color: var(--ink-2); cursor: pointer; }
.tab.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.drop {
  position: relative; display: flex !important; align-items: center; justify-content: center; text-align: center;
  min-height: 110px; border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; cursor: pointer;
  background: var(--bg); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.drag { border-color: var(--gold); background: var(--gold-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-text { font-weight: 600; color: var(--ink-2); }
.recorder { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 0; }
.rec-btn { width: 68px; height: 68px; border-radius: 50%; border: 3px solid var(--err); background: var(--surface); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.rec-btn span { width: 30px; height: 30px; border-radius: 50%; background: var(--err); transition: all .15s; }
.rec-btn.on span { width: 22px; height: 22px; border-radius: 5px; }
.rec-btn.on { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--err) 20%, transparent); } }
@media (prefers-reduced-motion: reduce) { .rec-btn.on { animation: none; } }
.rec-time { font: 700 1.6rem/1 var(--sans); }
.rec-meter { flex: 1; min-width: 120px; max-width: 240px; height: 40px; }
.progress { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.audio-status audio { width: 100%; margin-top: 6px; }

/* ---------- Avisos ---------- */
.flashes { padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--err-bg); color: var(--err); }
.flash-info { background: var(--info-bg); color: var(--info); }
.empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); }
.err-code { font: 700 4rem/1 var(--serif); color: var(--gold); margin-bottom: 8px; }

/* ---------- Cómo funciona ---------- */
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; counter-reset: s; }
.how-steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; counter-increment: s; }
.how-steps li::before { content: counter(s); font: 700 1.6rem/1 var(--serif); color: var(--gold); margin-bottom: 6px; }
.how-steps span { color: var(--ink-2); font-size: .95rem; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--bg-2); }
.table tr:last-child td { border-bottom: 0; }
.prose .table { border: 1px solid var(--line); margin-bottom: 1em; }
.row-alert td { background: color-mix(in srgb, var(--warn-bg) 60%, transparent); }
.row-muted td { opacity: .6; }
.cats-table input { min-height: 38px; padding: 6px 10px; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); vertical-align: middle; }
.badge-pending { background: var(--warn-bg); color: var(--warn); }
.badge-approved { background: var(--ok-bg); color: var(--ok); }
.badge-rejected { background: var(--err-bg); color: var(--err); }

/* ---------- Admin ---------- */
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; padding-top: 16px; }
.admin-nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.admin-nav a.on { background: var(--navy); color: #f4ecd9; }
.admin-nav .count { font-size: .78rem; background: var(--bg-2); color: var(--ink-2); border-radius: 99px; padding: 1px 7px; margin-inline-start: 4px; }
.admin-nav .count.alert { background: var(--err); color: #fff; }
.review-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.reject-form { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.delete-form { margin-top: 24px; }
.checks { list-style: none; padding: 0; margin: 0; }

/* ---------- Paginación ---------- */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pager span[aria-current] { background: var(--navy); color: #f4ecd9; border-color: var(--navy); }

/* ---------- Pie ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 28px 0 90px; font-size: .95rem; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-row p { max-width: 50ch; margin: 6px 0 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-2); }

/* ---------- Mini reproductor ---------- */
.mini-player { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; background: var(--navy); color: #f4ecd9; box-shadow: 0 -6px 24px rgba(0,0,0,.2); padding-bottom: env(safe-area-inset-bottom); }
.mini-row { display: flex; align-items: center; gap: 14px; height: 68px; }
.mp-toggle { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); cursor: pointer; position: relative; flex-shrink: 0; }
.mp-toggle::before { content: ""; position: absolute; inset: 0; margin: auto; width: 12px; height: 15px; border-inline: 4px solid var(--gold-ink); }
.mp-toggle.paused::before { width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--gold-ink); transform: translateX(2px); }
.mp-info { flex: 1; min-width: 0; }
.mp-title { display: block; color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-bar input { width: 100%; accent-color: var(--gold); height: 18px; margin: 2px 0 0; }
.mp-time { font-size: .85rem; color: #cfc6b2; font-variant-numeric: tabular-nums; min-width: 40px; }
.mp-close { background: none; border: 0; color: #cfc6b2; font-size: 1.6rem; cursor: pointer; width: 36px; height: 36px; }
[dir="rtl"] .mp-bar input { direction: ltr; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 80; box-shadow: var(--shadow); }

/* ---------- Hebreo ---------- */
[lang="he"], [dir="rtl"] { font-feature-settings: normal; }
html[lang="he"] body { font-size: 18px; }

.site-nav .nav-search input[type=search]:focus { border-color: var(--gold); background: rgba(255,255,255,.14); }

/* ---------- Donaciones ---------- */
.site-nav .nav-donate { color: #e6c27a; }
.donate-lead { max-width: 60ch; }
.pay-grid { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pay-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; }
.pay-name { font: 700 1.15rem/1.2 var(--serif); }
.pay-value { font-size: 1.05rem; background: var(--bg-2); padding: 6px 10px; border-radius: 8px; word-break: break-all; width: fit-content; max-width: 100%; }
.pay-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.donate-receipt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: start; }
.donate-receipt > div { max-width: 46ch; }
@media (max-width: 860px) { .donate-receipt { grid-template-columns: 1fr; } }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.donate-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 26px; border-radius: var(--radius); background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.donate-band > div { min-width: 0; max-width: 60ch; }
.donate-band .section-title { margin-bottom: 6px; }
.donate-band p { margin: 0; color: var(--ink-2); }
.don-total { font-size: 1.05rem; }
.don-total strong { font: 700 1.4rem var(--serif); margin-inline-start: 6px; }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.admin-cols summary { cursor: pointer; margin-bottom: 12px; }
.actions-cell { white-space: nowrap; }
.actions-cell form { margin-inline-end: 8px; }

/* ---------- Condiciones de la aportación ---------- */
.pact { background: var(--info-bg); border-radius: var(--radius-sm); padding: 14px 18px; }
.pact h2 { margin: 0 0 6px; color: var(--info); }
.pact ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; font-size: .93rem; }

/* ---------- Compartir ---------- */
:root { --wa: #1f8f4e; --wa-ink: #ffffff; }
.ico { width: 18px; height: 18px; flex-shrink: 0; }
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-wa:hover { background: color-mix(in srgb, var(--wa) 88%, #000); }
.share-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.share-bar-label { font-weight: 700; font-family: var(--serif); font-size: 1.05rem; }
.share-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 520px) { .share-bar-actions { width: 100%; } .share-bar-actions .btn { flex: 1 1 auto; } }

.share-btn {
  flex-shrink: 0; margin-inline-start: auto; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center; transition: border-color .15s, color .15s, transform .1s;
}
.share-btn svg { width: 18px; height: 18px; }
.share-btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }

.mp-share { background: none; border: 1px solid rgba(244,236,217,.3); color: #f4ecd9; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.mp-share svg { width: 17px; height: 17px; }
.mp-share:hover { border-color: #d8b56d; color: #d8b56d; }

.share-sheet { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 28, .55); }
.sheet-panel { position: relative; width: 100%; max-width: 440px; background: var(--surface); color: var(--ink); border-radius: 18px; padding: 18px 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { margin: 0; font-family: var(--serif); font-size: 1.25rem; }
.sheet-x { background: none; border: 0; font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer; width: 40px; height: 40px; }
.sheet-what { margin: 4px 0 14px; overflow-wrap: anywhere; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sheet-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; font: 600 .88rem var(--sans); cursor: pointer; }
.sheet-opt:hover { border-color: var(--gold); }
.sheet-opt .dotc { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); }
.sheet-opt.wa .dotc { background: #25d366; }
.sheet-opt.tg .dotc { background: #2aabee; }
.sheet-opt.fb .dotc { background: #1877f2; }
.sheet-opt.xx .dotc { background: #111; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.sheet-opt.em .dotc { background: var(--gold); }
.sheet-opt.cp .dotc { background: var(--ink-2); }
.sheet-link { margin-top: 12px; }
.sheet-link input { font-size: .85rem; min-height: 40px; }
@media (max-width: 520px) {
  .share-sheet { align-items: flex-end; padding: 0; }
  .sheet-panel { max-width: none; border-radius: 18px 18px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}
html.sheet-open { overflow: hidden; }

/* ---------- Texto PDF en la página ---------- */
.pdf-view { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pdf-pages { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.pdf-pages canvas { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); -webkit-user-select: none; user-select: none; }
