:root {
  --bg: #f4f8fb;
  --bg-elev: #ffffff;
  --bg-soft: #e5eef5;
  --text: #1a2935;
  --text-soft: #4a5d70;
  --text-mute: #7f8d9c;
  --border: #c8d6e2;
  --border-soft: #e2eaf1;
  --accent: #4a90c2;
  --accent-hover: #6cacd3;
  --accent-soft: #dceaf3;
  --highlight: #fff3c4;
  --shadow-sm: 0 1px 2px rgba(30, 50, 70, 0.06);
  --shadow: 0 4px 14px rgba(30, 50, 70, 0.1);
  --shadow-lg: 0 12px 32px rgba(30, 50, 70, 0.15);
  --radius: 10px;
  --radius-sm: 6px;
  --serif: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --arabic: 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-w: 760px;
  --max-w-wide: 1100px;
}

[data-theme="dark"] {
  --bg: #0d1721;
  --bg-elev: #18232e;
  --bg-soft: #1f2b39;
  --text: #d8e4ee;
  --text-soft: #95a8be;
  --text-mute: #6e7f93;
  --border: #2c3a4e;
  --border-soft: #1f2a3a;
  --accent: #6cacd3;
  --accent-hover: #8fc4e0;
  --accent-soft: #1d2c3a;
  --highlight: #3a3c1d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* ===== Header ===== */
.site-header {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-mark {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--serif);
}
.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav a {
  color: var(--text-soft);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.nav a.active { color: var(--accent); background: var(--accent-soft); }
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}
.theme-toggle:hover { background: var(--bg-soft); color: var(--text); border-color: var(--accent); }

.version-select {
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  max-width: 11rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.version-select:hover { border-color: var(--accent); }
.version-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ===== Layout ===== */
main { flex: 1; width: 100%; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 2.5rem 1.2rem; }
.container-wide { max-width: var(--max-w-wide); margin: 0 auto; padding: 2.5rem 1.2rem; }
/* En la home, la tarjeta de aleya va más arriba (el .container sigue al hero) */
.hero + .container { padding-top: 0.5rem; }

/* ===== Hero ===== */
.hero { text-align: center; padding: 1.6rem 1.2rem 0.5rem; max-width: var(--max-w); margin: 0 auto; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.hero p { color: var(--text-soft); font-size: 1.1rem; margin: 0 0 1.8rem; }
.hero-arabic {
  font-family: var(--arabic);
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  color: var(--accent);
  margin: 0 0 0.8rem;
  direction: rtl;
  font-weight: 400;
}
.hero-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.98rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-secondary { background: var(--bg-elev); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-soft); text-decoration: none; border-color: var(--text-mute); }

/* ===== Cards ===== */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow); }
.cards { display: grid; gap: 1rem; margin: 2rem 0; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card-link { text-decoration: none; color: var(--text); display: block; }
.card-link:hover { text-decoration: none; transform: translateY(-2px); }
.card-link h3 { font-family: var(--serif); margin: 0 0 0.5rem; font-size: 1.25rem; color: var(--text); font-weight: 600; }
.card-link p { margin: 0; color: var(--text-soft); font-size: 0.95rem; line-height: 1.5; }

/* ===== Aleya del día ===== */
.vod {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  margin: 2.5rem 0;
  position: relative;
  box-shadow: var(--shadow);
}
.vod-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.vod-arabic {
  font-family: var(--arabic);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 2;
  color: var(--text);
  direction: rtl;
  text-align: right;
  margin: 0 0 1.2rem;
  font-weight: 400;
}
.vod-text {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  line-height: 1.6;
  color: var(--text);
  font-weight: 400;
  margin: 0 0 1rem;
}
.vod-ref { font-size: 0.92rem; color: var(--text-soft); font-style: italic; }
.vod-ref a { color: var(--accent); font-weight: 500; }

/* ===== Aleya aleatoria (home) ===== */
.frag {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  margin: 1rem 0 2.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.frag-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.frag-arabic {
  font-family: var(--arabic);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 2;
  color: var(--text);
  direction: rtl;
  text-align: center;
  margin: 0 auto 1rem;
  max-width: 640px;
}
.frag-body {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  line-height: 1.55;
  color: var(--text);
  text-align: center;
  margin: 0 auto 1.3rem;
  max-width: 620px;
}
.frag-ref {
  font-size: 0.95rem;
  color: var(--text-soft);
  font-style: italic;
  margin: 0 0 1.6rem;
}
.frag-ref a { color: var(--accent); font-weight: 500; font-style: normal; }
.frag-actions { display: flex; justify-content: center; }
.btn-lg { padding: 0.95rem 1.9rem; font-size: 1.05rem; font-weight: 600; }
.btn-lg:disabled { opacity: 0.55; cursor: default; pointer-events: none; }

/* ===== Compartir / Descargar ===== */
.share-wrap {
  position: relative;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.share-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: min(340px, 92vw);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.6rem;
  text-align: left;
}
.share-menu[hidden] { display: none; }
.share-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.98rem;
  padding: 0.65rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.share-item:hover { background: var(--bg-soft); }
.share-sep {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  font-weight: 600;
  padding: 0.7rem 0.7rem 0.4rem;
  border-top: 1px solid var(--border-soft);
  margin-top: 0.4rem;
}
.share-nets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
  padding: 0.2rem 0.3rem 0.3rem;
}
.share-net {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 0.5rem;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.share-net-icon {
  display: inline-grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.75rem;
  font-weight: 800;
}
.share-note {
  margin: 0.25rem 0.3rem 0.35rem;
  color: var(--text-mute);
  font-size: 0.75rem;
  line-height: 1.35;
}
.share-net:hover { filter: brightness(1.08); transform: translateY(-1px); }
.net-wa    { background: #25d366; }
.net-ig    { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.net-fb    { background: #1877f2; }
.net-x     { background: #000; }
.net-tg    { background: #2aabee; }
.net-pin   { background: #e60023; }
.net-gmail { background: #ea4335; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%) translateY(1rem);
  background: var(--text);
  color: var(--bg);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Lector ===== */
.section-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  letter-spacing: -0.005em;
}
.section-sub {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  margin: 2rem 0 0.8rem;
  font-weight: 600;
}

.sura-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.sura-tile {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.15s ease;
}
.sura-tile:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-1px);
}
.sura-num {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 1.8rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 0.15rem 0;
  background: var(--bg);
}
.sura-info { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; flex: 1; }
.sura-info-main {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sura-info-sub {
  font-size: 0.76rem;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Reading view ===== */
.reader-header {
  text-align: center;
  margin: 1.5rem 0 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-soft);
}
.reader-book {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-mute);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.reader-arabic-title {
  font-family: var(--arabic);
  font-size: clamp(2.2rem, 6vw, 3rem);
  color: var(--accent);
  margin: 0 0 0.4rem;
  direction: rtl;
  font-weight: 400;
}
.reader-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.reader-sub {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-mute);
}
.reader-sub span + span::before { content: " · "; margin: 0 0.2rem; }

.basmala {
  text-align: center;
  font-family: var(--arabic);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  color: var(--accent);
  margin: 0 auto 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border);
  direction: rtl;
  font-weight: 400;
  max-width: 600px;
}

.reader-body {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.3rem;
}

.aya {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.aya:last-child { border-bottom: none; }
.aya.highlight { background: var(--highlight); border-radius: var(--radius-sm); padding-left: 0.8rem; padding-right: 0.8rem; }

.aya-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 0.5rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.aya-ar {
  font-family: var(--arabic);
  font-size: clamp(1.4rem, 3.2vw, 1.75rem);
  line-height: 2.1;
  color: var(--text);
  direction: rtl;
  text-align: right;
  margin: 0 0 0.7rem;
  font-weight: 400;
}

.aya-es {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--text);
  margin: 0;
}

/* Navegación entre suras */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-soft);
}
.chapter-nav a {
  flex: 1;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  transition: all 0.15s ease;
  max-width: 48%;
}
.chapter-nav a:hover { background: var(--accent-soft); border-color: var(--accent); text-decoration: none; }
.chapter-nav a.disabled { opacity: 0.4; pointer-events: none; }
.chapter-nav .next { justify-content: flex-end; text-align: right; margin-left: auto; }
.chapter-nav-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-mute); display: block; }
.chapter-nav-text { font-weight: 500; }

/* ===== Buscador ===== */
.search-box { display: flex; gap: 0.5rem; margin: 1.5rem 0; }
.search-input {
  flex: 1;
  padding: 0.85rem 1.1rem;
  font-size: 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-info { color: var(--text-soft); font-size: 0.92rem; margin: 1rem 0; }
.search-result { padding: 1.1rem 0; border-bottom: 1px solid var(--border-soft); }
.search-result:last-child { border-bottom: none; }
.search-ref {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}
.search-ref a { color: var(--accent); }
.search-text { font-family: var(--serif); font-size: 1.08rem; line-height: 1.6; color: var(--text); }
.search-text mark { background: var(--highlight); color: var(--text); padding: 0 2px; border-radius: 2px; }
.search-empty { text-align: center; padding: 3rem 1rem; color: var(--text-mute); }

/* ===== Prose ===== */
.lead { font-family: var(--serif); font-size: 1.2rem; color: var(--text-soft); line-height: 1.65; }
.prose h2 { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; margin: 2.2rem 0 0.6rem; letter-spacing: -0.005em; }
.prose h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin: 1.6rem 0 0.4rem; }
.prose p, .prose ul, .prose ol { margin: 0.8rem 0; line-height: 1.7; }
.prose ul { padding-left: 1.4rem; }
.prose li { margin: 0.3rem 0; }
.callout {
  border-left: 3px solid var(--accent);
  background: var(--bg-elev);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}
.callout p { margin: 0; }
.code-block {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  color: var(--text);
}

/* ===== Loader ===== */
.loader { text-align: center; padding: 4rem 1rem; color: var(--text-mute); }
.loader::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-elev);
  padding: 2rem 1.2rem;
  text-align: center;
  margin-top: 3rem;
  font-size: 0.88rem;
  color: var(--text-soft);
}
.site-footer p { margin: 0.25rem 0; max-width: 720px; margin-left: auto; margin-right: auto; }
.site-footer a { color: var(--text-soft); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; }
.site-footer a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .header-inner { padding: 0.7rem 1rem; }
  .brand { font-size: 1.05rem; }
  .nav a { padding: 0.4rem 0.6rem; font-size: 0.88rem; }
  .nav { flex-wrap: wrap; gap: 0.25rem; }
  .version-select { font-size: 0.8rem; max-width: 9rem; padding: 0.35rem 0.5rem; }
  .container, .container-wide { padding: 1.8rem 1rem; }
  .hero { padding: 2rem 1rem 1.5rem; }
  .vod { padding: 1.5rem 1.2rem; }
  .aya-ar { font-size: 1.35rem; line-height: 2; }
  .aya-es { font-size: 1.05rem; line-height: 1.75; }
  .reader-body { font-size: 1.22rem; }
  .chapter-nav a { padding: 0.7rem 0.85rem; font-size: 0.88rem; }
  .sura-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .nav a { padding: 0.35rem 0.5rem; font-size: 0.82rem; }
  .theme-toggle { width: 34px; height: 34px; }
}

/* Print friendly */
@media print {
  .site-header, .site-footer, .chapter-nav { display: none; }
  body { background: #fff; color: #000; }
  .aya-es, .reader-body { font-size: 12pt; }
}

/* ===== Breadcrumb (páginas estáticas) ===== */
.breadcrumb { max-width: 680px; margin: 0 auto 0.5rem; font-size: 0.82rem; color: var(--text-mute); line-height: 1.5; }
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 0.35rem; color: var(--border); user-select: none; }
.breadcrumb .current { color: var(--text); }

/* Resaltar la aleya al saltar con #vN */
.aya:target { background: var(--highlight); border-radius: 6px; }

/* ===== Marcadores con notas (guardados en el navegador) ===== */
.marcar { max-width: 680px; margin: 2.5rem auto 0; text-align: center; }
.marcar-form { margin: 0 auto; max-width: 520px; display: flex; flex-direction: column; gap: 0.7rem; }
.marcar-form textarea {
  width: 100%; min-height: 4.5rem; padding: 0.75rem 0.95rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elev); color: var(--text); font-family: inherit;
  font-size: 1rem; line-height: 1.5; resize: vertical;
}
.marcar-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.marcar-row { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.marcada {
  max-width: 520px; margin: 0 auto; text-align: left;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 1rem 1.2rem;
}
.marcada-estado { font-weight: 600; color: var(--accent); font-size: 0.9rem; margin-bottom: 0.4rem; }
.marcada-nota { color: var(--text); white-space: pre-wrap; margin: 0.3rem 0 0.8rem; }
.marcada-nota.vacia { color: var(--text-mute); font-style: italic; }
.marcada-link { margin: 0.8rem 0 0; font-size: 0.9rem; }

.marca-item {
  background: var(--bg-elev); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 0.8rem; box-shadow: var(--shadow-sm);
}
.marca-item-ref { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin: 0 0 0.2rem; }
.marca-item-nota { color: var(--text-soft); white-space: pre-wrap; margin: 0.3rem 0; line-height: 1.55; }
.marca-item-nota.vacia { color: var(--text-mute); font-style: italic; }
.marca-item-fecha { font-size: 0.78rem; color: var(--text-mute); }
.marca-item-acciones { margin-top: 0.6rem; display: flex; gap: 1rem; font-size: 0.88rem; }

.marcas-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  flex-wrap: wrap; margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-soft);
}
.marcas-cuenta { color: var(--text-mute); font-size: 0.85rem; }
.marcas-acciones { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.marcas-acciones .btn { padding: 0.55rem 1rem; font-size: 0.9rem; }
