/* =========================================================
   Mesón El Tamborilero · estilos de la web pública
   Paleta neutra: hueso, piedra, carbón y un dorado suave.
   Para cambiar colores, basta con tocar las variables de :root
   ========================================================= */

@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/eb-garamond-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/eb-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/eb-garamond-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/source-sans-3-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/source-sans-3-latin-600-normal.woff2) format("woff2"); }

:root {
  --bg: #F8F4E9;
  --bg-alt: #F0E9D9;
  --surface: #FFFBF2;
  --ink: #322C22;
  --ink-soft: #5A5144;
  --muted: #7B7161;
  --line: #D9CBAE;
  --gold: #A88B57;
  --gold-ink: #7D6334;
  --accent: #806136;
  --accent-hover: #674C28;
  --on-accent: #FFFFFF;
  --frame: #E8DFCB;
  --frame-shadow: 0 8px 24px rgba(50, 36, 14, .16);
  --card: rgba(255, 248, 233, .65);
  --texture: url(../img/papel.webp);
  --dark: #2B2926;
  --on-dark: #EFE9DE;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-bg: rgba(249, 245, 233, .94);
  --leader: #bdb3a2;
  --map-filter: grayscale(.55) contrast(.95) sepia(.12);
  --open: #3E7B4F;
  --closed: #A3422F;
  color-scheme: light;
  --wrap: 1180px;
  --header-h: 76px;
  --radius: 4px;
}

/* ---------- Modo nocturno ----------
   Automático según el dispositivo, salvo que el visitante elija «claro» u «oscuro» con el botón
   (se guarda en su navegador y se aplica con data-theme en <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #211E19; --bg-alt: #29251F; --surface: #2B2721; --ink: #F2E6D0; --ink-soft: #CFC3AD; --muted: #A39783;
    --line: #463E32; --gold: #C2A770; --gold-ink: #D8BF8A; --dark: #141210; --on-dark: #EFE9DE;
    --accent: #8C6A3A; --accent-hover: #A07B45; --frame: #3E362B; --frame-shadow: 0 10px 28px rgba(0, 0, 0, .5);
    --card: rgba(48, 42, 33, .7); --texture: url(../img/papel-noche.webp);
    --header-bg: rgba(33, 30, 25, .93); --leader: #575148; --map-filter: invert(1) hue-rotate(180deg) grayscale(.45) brightness(.88) contrast(.9);
    --open: #7CC08F; --closed: #E08A76; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #211E19; --bg-alt: #29251F; --surface: #2B2721; --ink: #F2E6D0; --ink-soft: #CFC3AD; --muted: #A39783;
  --line: #463E32; --gold: #C2A770; --gold-ink: #D8BF8A; --dark: #141210; --on-dark: #EFE9DE;
  --accent: #8C6A3A; --accent-hover: #A07B45; --frame: #3E362B; --frame-shadow: 0 10px 28px rgba(0, 0, 0, .5);
  --card: rgba(48, 42, 33, .7); --texture: url(../img/papel-noche.webp);
  --header-bg: rgba(33, 30, 25, .93); --leader: #575148; --map-filter: invert(1) hue-rotate(180deg) grayscale(.45) brightness(.88) contrast(.9);
  --open: #7CC08F; --closed: #E08A76; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; letter-spacing: .005em; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.muted { color: var(--muted); }
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose h3 { font-size: 1.5rem; margin-top: 1.2em; }
.prose blockquote { margin: 1.2em 0; padding-left: 1em; border-left: 2px solid var(--gold); font-family: var(--serif); font-size: 1.35rem; font-style: italic; }

.kicker { font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; margin-bottom: 1.2rem; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7em 1.5em; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: var(--on-accent); font: 600 .95rem/1 var(--sans); letter-spacing: .04em; text-decoration: none; cursor: pointer; box-shadow: 0 1px 0 rgba(0, 0, 0, .04); transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(60, 40, 10, .55); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--accent); }
.btn.ghost:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Ornamento: la guirnalda del logotipo */
.ornament { display: block; width: 92px; height: 32px; margin: 0 auto 1.1rem; background: var(--gold); -webkit-mask: url(../img/ornamento.svg) center / contain no-repeat; mask: url(../img/ornamento.svg) center / contain no-repeat; }
.ornament.left { margin-left: 0; }

/* Aviso superior */
.notice { background: var(--dark); color: var(--on-dark); text-align: center; padding: .65rem 20px; font-size: .95rem; letter-spacing: .02em; }
.notice + .notice { border-top: 1px solid #45413b; }
.notice a { color: #E3D3AE; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand svg { display: block; height: 100%; width: auto; }
.brand-fig { height: 50px; }
.brand-txt { height: 50px; }
/* Logotipo propio subido en Panel → Ajustes */
.brand-img img { display: block; height: 50px; width: auto; max-width: 210px; object-fit: contain; }
.footer-logo-img img { display: block; width: 150px; max-width: 100%; height: auto; }
:root[data-theme="dark"] .brand-img.logo-invert img, :root[data-theme="dark"] .footer-logo-img.logo-invert img { filter: invert(1) hue-rotate(180deg); }
:root[data-theme="dark"] .brand-img.logo-light img, :root[data-theme="dark"] .footer-logo-img.logo-light img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-img.logo-invert img, :root:not([data-theme="light"]) .footer-logo-img.logo-invert img { filter: invert(1) hue-rotate(180deg); }
  :root:not([data-theme="light"]) .brand-img.logo-light img, :root:not([data-theme="light"]) .footer-logo-img.logo-light img { filter: brightness(0) invert(1); }
}
.main-nav { display: flex; gap: 30px; margin-left: auto; }
.main-nav a { text-decoration: none; font-size: .95rem; letter-spacing: .06em; color: var(--ink-soft); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { color: var(--ink); border-bottom-color: var(--gold); }
.main-nav .nav-admin { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.main-nav .nav-sibling { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-ink); font-weight: 600; }
.main-nav .nav-sibling:hover { color: var(--ink); }
.main-nav .nav-sibling svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 1120px) and (max-width: 1439px) { .main-nav { gap: 20px; } .main-nav a { letter-spacing: .04em; } }
@media (min-width: 1120px) and (max-width: 1339px) { .main-nav .nav-admin span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .main-nav .nav-admin { padding-inline: 4px; } }
.main-nav .nav-admin svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-call { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 6px; transition: border-color .2s, background .2s; text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.btn-call svg { width: 17px; height: 17px; fill: var(--gold-ink); }
.btn-call:hover { border-color: var(--accent); color: var(--ink); background: var(--card); }
.btn-panel { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 6px; background: #2F6FDE; color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.btn-panel:hover { background: #2559b8; color: #fff; }
.btn-panel svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-btn { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; flex-shrink: 0; }
.theme-btn:hover { border-color: var(--ink); }
.theme-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .t-light, .theme-btn .t-dark, .theme-btn .t-auto { display: none; }
.theme-btn[data-mode="light"] .t-light, .theme-btn[data-mode="dark"] .t-dark, .theme-btn[data-mode="auto"] .t-auto { display: block; }
.open-status { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 600; color: var(--ink-soft); }
.open-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.open-status.is-open { color: var(--open); }
.open-status.is-open::before { background: var(--open); box-shadow: 0 0 0 4px color-mix(in srgb, var(--open) 20%, transparent); }
.open-status.is-closed { color: var(--closed); }
.open-status.is-closed::before { background: var(--closed); }
.open-status:empty { display: none; }
.hero .open-status { margin-top: 1.6rem; }
.hdr-status { display: none !important; font-size: .85rem; padding-left: 18px; margin-left: 4px; border-left: 1px solid var(--line); white-space: nowrap; }
/* El estado «Abierto/Cerrado» de la cabecera ya no cabe con el menú completo: se muestra en la portada y en el horario */
.visit .open-status { margin: .4rem 0 .2rem; }
.closures { list-style: none; margin: 1rem 0 0; padding: 12px 16px; border-left: 2px solid var(--closed); background: var(--bg-alt); border-radius: 0 var(--radius) var(--radius) 0; font-size: .97rem; }
.closures li + li { margin-top: 4px; }
.closures strong { color: var(--closed); font-weight: 600; }
.btn-review { margin-top: 1.4rem; }
.btn-review svg { width: 18px; height: 18px; fill: currentColor; }
.menu-btn { display: none; width: 46px; height: 46px; margin-right: -10px; border: 0; background: none; cursor: pointer; position: relative; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { position: absolute; left: 12px; width: 22px; height: 1.5px; background: var(--ink); content: ""; transition: transform .25s, top .25s, opacity .2s; }
.menu-btn span { top: 22px; }
.menu-btn span::before { left: 0; top: -7px; }
.menu-btn span::after { left: 0; top: 7px; }
.nav-open .menu-btn span { background: transparent; }
.nav-open .menu-btn span::before { top: 0; transform: rotate(45deg); }
.nav-open .menu-btn span::after { top: 0; transform: rotate(-45deg); }

/* Portada */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero-title { font-size: clamp(3rem, 7.2vw, 5.6rem); line-height: .98; margin-bottom: 1.6rem; }
.hero-lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.2rem; }
.hero-img { margin: 0; position: relative; }
.hero-img img { width: auto; height: auto; max-width: 100%; max-height: 78vh; }
.hero-img .img-empty { width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius); }

/* Portada con pase de varias fotos (Panel → Portada). Viven dentro del mismo marco que la foto fija. */
.hero-slides { position: relative; width: 100%; max-width: 560px; aspect-ratio: 4 / 5; max-height: 78vh; margin-inline: auto; overflow: hidden; isolation: isolate; }
.hero-slides .hero-slide { position: absolute; inset: 0; margin: 0; }
.hero-slides .hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Transiciones entre fotos: por defecto, fundido. La foto que entra va encima. */
.hero-slides .hero-slide { opacity: 0; z-index: 0; transition: opacity 1.2s ease, transform 1.1s var(--ease, ease), clip-path 1.2s ease, filter 1.1s ease; }
.hero-slides .hero-slide.is-off { opacity: 1; z-index: 1; }
.hero-slides .hero-slide.is-on { opacity: 1; z-index: 2; }
.hero-slides .hero-slide.reset, .hero-slides .hero-slide.reset img { transition: none !important; }
/* Efecto «zoom lento»: la foto activa se acerca despacio mientras se ve */
.hero-slides.fx-zoom .hero-slide img { transform: scale(1.12); transition: transform var(--hero-dur, 8s) linear; }
.hero-slides.fx-zoom .hero-slide.is-on img, .hero-slides.fx-zoom .hero-slide.is-off img { transform: scale(1); }
.hero-slides.fx-zoom .hero-slide.is-off { opacity: 0; }
.hero-slides.fx-fundido .hero-slide.is-off, .hero-slides.fx-desenfoque .hero-slide.is-off { opacity: 0; }
.hero-slides.fx-deslizar .hero-slide { opacity: 1; transform: translateX(100%); }
.hero-slides.fx-deslizar .hero-slide.is-on { transform: none; }
.hero-slides.fx-deslizar .hero-slide.is-off { transform: translateX(-25%); }
.hero-slides.fx-cortina .hero-slide { opacity: 1; clip-path: inset(0 100% 0 0); }
.hero-slides.fx-cortina .hero-slide.is-on, .hero-slides.fx-cortina .hero-slide.is-off { clip-path: inset(0); }
.hero-slides.fx-desenfoque .hero-slide { filter: blur(16px); transform: scale(1.05); }
.hero-slides.fx-desenfoque .hero-slide.is-on { filter: none; transform: none; }
/* Botón para pausar las fotos */
.hero-pause { position: absolute; right: 16px; bottom: 16px; z-index: 3; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255, 252, 240, .5); border-radius: 50%; background: rgba(40, 28, 12, .4); color: #fff; cursor: pointer; transition: background .2s, border-color .2s; }
.hero-pause:hover, .hero-pause:focus-visible { background: rgba(40, 28, 12, .72); border-color: #fff; }
.hero-pause i { width: 10px; height: 12px; border-inline: 3px solid currentColor; }
.hero-pause.is-paused i { width: 0; height: 0; border: 0; border-left: 11px solid currentColor; border-block: 7px solid transparent; margin-left: 3px; }
.hero-edit { display: inline-block; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) {
  .hero-slides .hero-slide, .hero-slides .hero-slide img { transition: none !important; }
  .hero-pause { display: none; }
}

/* Marco de las fotos: el mismo en portada, «Nosotros», galería y visor */
.framed, .fx-photo img, .gallery-grid a, .lightbox img, .hero-slides { border: 8px solid var(--frame); box-shadow: var(--frame-shadow); background: var(--frame); }

/* Fotos destacadas (portada y «Nosotros»), con un brillo suave que recorre la foto cada pocos segundos. */
.fx-photo { position: relative; isolation: isolate; width: fit-content; max-width: 100%; margin-inline: auto; }
.fx-photo img { display: block; }
.fx-photo::after {
  content: ""; position: absolute; inset: 8px; z-index: 1; pointer-events: none;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 252, 240, .42) 48%, rgba(255, 252, 240, .12) 54%, transparent 62%) no-repeat;
  background-size: 300% 100%; background-position: 130% 0;
  mix-blend-mode: screen;
  animation: fx-shine 9s ease-in-out infinite;
}
.about-img.fx-photo::after { animation-delay: 4.5s; }
@keyframes fx-shine {
  0%, 62% { background-position: 130% 0; }
  92%, 100% { background-position: -30% 0; }
}
:root[data-theme="dark"] .fx-photo::after { background-image: linear-gradient(110deg, transparent 38%, rgba(255, 240, 210, .22) 48%, rgba(255, 240, 210, .06) 54%, transparent 62%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fx-photo::after { background-image: linear-gradient(110deg, transparent 38%, rgba(255, 240, 210, .22) 48%, rgba(255, 240, 210, .06) 54%, transparent 62%); } }

/* Galería: el mismo brillo al pasar el ratón */
.gallery-grid a { position: relative; }
.gallery-grid a::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%) no-repeat; background-size: 300% 100%; background-position: 130% 0; transition: background-position .9s ease; }
.gallery-grid a:hover::after { background-position: -30% 0; }
.img-empty { display: grid; place-items: center; background: var(--bg-alt); color: var(--muted); min-height: 240px; }

/* Platos del día */
.daily { margin-top: calc(clamp(56px, 8vw, 112px) * -.5); padding-bottom: 40px; }
.daily-card { max-width: 760px; margin: 0 auto; padding: 36px clamp(22px, 5vw, 48px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.daily-card .dish-list { text-align: left; }

/* Secciones */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto clamp(36px, 5vw, 56px); }
.section-intro { color: var(--ink-soft); font-size: 1.1rem; }
.section-note { color: var(--muted); font-style: italic; margin: -.4rem 0 1rem; }

/* Carta */
.carta-tools { position: sticky; top: var(--header-h); z-index: 20; background: var(--header-bg); backdrop-filter: saturate(1.2) blur(8px); padding: 10px 0; margin: 0 auto 36px; max-width: 900px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; }
.carta-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.carta-tabs::-webkit-scrollbar { display: none; }
.carta-tabs a { flex-shrink: 0; text-decoration: none; padding: 8px 16px; border-radius: 999px; font-size: .92rem; color: var(--ink-soft); border: 1px solid transparent; }
.carta-tabs a:hover { border-color: var(--line); color: var(--ink); }
.carta-tabs a.active { border-color: var(--accent); color: var(--on-accent); background: var(--accent); }
.al-filter { position: relative; flex-shrink: 0; }
.al-filter summary { list-style: none; cursor: pointer; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; }
.al-filter summary::-webkit-details-marker { display: none; }
.al-filter summary::after { content: " ▾"; color: var(--muted); }
.al-filter[open] summary, .al-filter.active summary { border-color: var(--ink); }
.al-filter.active summary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.al-filter-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, 90vw); padding: 14px 14px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 30px -18px rgba(0,0,0,.3); }
.al-filter-panel > p:first-child { margin: 0 4px 6px; font-size: .9rem; color: var(--muted); }
.al-filter-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.al-filter-status { margin: 8px 4px 0; font-size: .88rem; color: var(--gold-ink); }
.al-filter-status:empty { display: none; }
.al-filter-opts label { display: flex; align-items: center; gap: 8px; font-size: .9rem; padding: 5px 4px; cursor: pointer; border-radius: 4px; }
.al-filter-opts label:hover { background: var(--bg); }
.al-filter-opts input { accent-color: var(--ink); }
.al-filter-opts .al { width: 24px; height: 24px; }

.carta-sections { max-width: 760px; margin-inline: auto; }
.carta-section { margin-bottom: 56px; scroll-margin-top: var(--carta-offset, 170px); }
.carta-section[hidden] { display: none; }
.carta-section-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; text-align: center; position: relative; }
.carta-section-head h3 { margin: 0; font-size: 2rem; }
.carta-section-head::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 64px; height: 3px; margin-left: -32px; background: var(--gold); border-radius: 2px; }
.carta-section .section-note { text-align: center; }
.price-labels { display: flex; justify-content: flex-end; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 -4px; }
.price-labels span, .cols .price { width: 74px; text-align: right; }
.dish-list { list-style: none; margin: 0; padding: 0; }
.dish { padding: 12px 4px 13px; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); scroll-margin-top: var(--carta-offset, 170px); }
.dish.flash { animation: dish-flash 2.4s ease; }
@keyframes dish-flash { 0%, 30% { background: color-mix(in srgb, var(--gold) 26%, transparent); } 100% { background: transparent; } }
.dish:last-child { border-bottom: 0; }
.dish[hidden] { display: none; }
.dish-head { display: flex; align-items: baseline; gap: 0; }
.dish h4 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; margin: 0; letter-spacing: .01em; }
.leader { flex: 1; border-bottom: 2px dotted var(--leader); transform: translateY(-4px); min-width: 16px; margin-inline: 14px 10px; }
.prices { display: flex; flex-shrink: 0; }
.price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; color: var(--gold-ink); }
.dish-desc { margin: 2px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.08rem; color: var(--ink-soft); line-height: 1.3; }
.dish-al { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.al { width: 24px; height: 24px; flex-shrink: 0; }
.dish-al .al { width: 26px; height: 26px; }
.al-legend { max-width: 900px; margin: 24px auto 0; padding: 28px clamp(20px, 4vw, 40px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.al-legend h3 { font-size: 1.4rem; margin-bottom: 14px; }
.al-legend ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; }
.al-legend li { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.al-legend .al { width: 32px; height: 32px; }
.al-note { font-size: .9rem; color: var(--muted); margin: 0; }
.no-results { text-align: center; color: var(--muted); font-style: italic; }

/* Nosotros */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about-img { margin: 0; }
.about-img img { width: auto; height: auto; max-width: 100%; max-height: 70vh; }
.about-text .prose { font-size: 1.12rem; color: var(--ink-soft); }

/* Galería */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 32px; }
.filters button { font: inherit; font-size: .95rem; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; min-height: 40px; }
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 370px)); justify-content: center; gap: clamp(16px, 2.4vw, 26px); }
.gallery-grid li[hidden] { display: none; }
.gallery-grid li.is-over { display: none; }   /* v049 · más allá de las que se ven de entrada (botón «Ver todas las fotos») */
.gallery-grid a { display: block; overflow: hidden; aspect-ratio: 4 / 3; transition: transform .3s ease, box-shadow .3s ease; }
.gallery-grid a:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -10px rgba(50, 36, 14, .45); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; }
.gallery-grid a:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(26, 24, 22, .94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(92vw, 1400px); text-align: center; }
.lightbox img { max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); width: auto; margin: 0 auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lb-cap { display: block; }
.lb-tools { display: flex; justify-content: center; gap: 10px; margin-top: 14px; font-style: normal; }
.lightbox .lb-tool { position: static; display: inline-flex; align-items: center; gap: 8px; width: auto; height: 42px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 6px; background: rgba(255, 255, 255, .06); color: #fff; font: 600 .92rem/1 var(--sans); text-decoration: none; opacity: 1; cursor: pointer; transition: background .2s, border-color .2s; }
.lightbox .lb-tool:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.lb-tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-msg { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); padding: 8px 16px; border-radius: 6px; background: #fff; color: #222; font-size: .92rem; font-weight: 600; }
.lb-msg[hidden] { display: none; }
.lightbox figcaption { color: var(--on-dark); margin-top: 12px; font-family: var(--serif); font-size: 1.2rem; font-style: italic; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; width: 56px; height: 56px; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* Dónde estamos */
.visit-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: stretch; }
.visit-info .prose { color: var(--ink-soft); }
address { font-style: normal; margin: 1.4rem 0; font-size: 1.08rem; line-height: 1.6; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mail { margin-top: 1rem; }
.hours-title { margin-top: 2.4rem; font-size: 1.7rem; }
.hours { margin: 0; }
.hours > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.hours .today { color: var(--gold-ink); }
.hours small { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: 2px; }
.hours-note { margin-top: .8rem; color: var(--muted); font-size: .95rem; }
.map { min-height: 440px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-alt); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 440px; border: 0; filter: var(--map-filter); }

/* Pie */
.site-footer { background: var(--dark); color: var(--on-dark); padding: 64px 0 28px; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: #E3D3AE; }
.footer-grid { display: grid; grid-template-columns: 200px 1fr auto; gap: 48px; align-items: start; }
.footer-brand svg { width: 150px; height: auto; color: #D0BB8A; }
.footer-claim { font-family: var(--serif); font-size: 1.6rem; font-style: italic; color: #E3D3AE; }
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid currentColor; transition: background .2s, color .2s, border-color .2s; }
.social svg { width: 21px; height: 21px; }
.social-light a { color: var(--ink); border-color: var(--line); }
.social-light a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.social-dark { margin-top: 18px; }
.social-dark a { color: var(--on-dark); border-color: rgba(239, 233, 222, .35); }
.social-dark a:hover { background: #D0BB8A; border-color: #D0BB8A; color: var(--dark); }
.follow { display: flex; align-items: center; gap: 14px; margin-top: 1.2rem; }
.follow > span { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; }
.legal-links { display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }
.legal-links .login-link { opacity: .55; margin-top: 10px; }
.copy { text-align: center; font-size: .85rem; opacity: .6; margin: 48px 0 0; }
.footer-credit { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 0 8px; margin-left: 10px; }
.footer-credit .sep { opacity: .4; }
.footer-credit .credit-logo { display: inline-flex; line-height: 0; transition: opacity .2s; }
.footer-credit .credit-logo:hover { opacity: .75; }
.footer-credit .credit-logo img { height: 24px; width: auto; display: block; }
.footer-credit .credit-mail { text-underline-offset: 3px; }
@media (max-width: 560px) {
  .copy { display: flex; flex-direction: column; align-items: center; gap: 8px; }
  .copy .footer-credit { margin-left: 0; }
  .copy .footer-credit > .sep:first-child { display: none; }
  .site-footer { padding-bottom: 80px; } /* holgura para que el botón «volver arriba» no tape el pie */
}
.legal-dialog { max-width: 720px; width: calc(100% - 32px); max-height: 85vh; border: 0; border-radius: var(--radius); padding: 32px clamp(20px, 5vw, 44px); background: var(--surface); color: var(--ink); }
.legal-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.legal-dialog form { margin-top: 24px; text-align: right; }

/* ---------- Tablet y móvil ---------- */
@media (max-width: 1119px) {
  .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0; padding: 8px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(0,0,0,.25); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; white-space: normal; }
  .nav-open .main-nav { transform: none; opacity: 1; visibility: visible; }
  .menu-btn { display: block; }
  .btn-call { margin-left: auto; }
  .main-nav ~ .btn-panel { margin-left: 0; }
}
@media (max-width: 980px) {
  .hero-grid, .about-grid, .visit-grid { grid-template-columns: 1fr; }
  .hero-img { order: -1; }
  .hero-img img { max-height: 52vh; }
  .hero-img.fx-photo, .about-img.fx-photo { margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .map, .map iframe { min-height: 340px; }
}
@media (max-width: 600px) {
  :root { --header-h: 64px; }
  body { font-size: 1rem; }
  .brand-txt { height: 34px; }
  .brand-fig { height: 40px; }
  .brand-img img { height: 40px; max-width: 160px; }
  .btn-call span { display: none; }
  .theme-btn { width: 40px; height: 40px; }
  .btn-panel { padding: 10px; }
  .btn-panel span { display: none; }
  .btn-call { padding: 10px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .al-filter-panel { left: 0; right: 0; width: auto; }
  .price-labels span, .cols .price { width: 62px; }
  .cols3 .price, .price-labels.cols3 span { width: 60px; }
  .cols3 .price { font-size: .93rem; }
  .leader { margin-inline: 8px 6px; }
  .gallery-grid a, .fx-photo img, .lightbox img { border-width: 6px; }
  .fx-photo::after { inset: 6px; }
  .dish h4 { font-size: 1rem; }
}
@media (max-width: 600px) { .header-inner { gap: 8px; } .brand { gap: 8px; } }
@media (max-width: 339px) { .brand-txt { display: none; } }
@media (max-width: 430px) { .header-inner:has(.btn-panel) .brand-txt { display: none; } }

@media print {
  .site-header, .notice, .editbar, .hero, .gallery, .map, .site-footer, .carta-tools, .daily { display: none !important; }
  .carta { border: 0; }
  body { background: #fff; }
}

/* =========================================================
   Efectos (se activan/desactivan en Panel → Ajustes → Efectos)
   - html.fx      : animaciones (aparición, guirnalda, tambor, profundidad)
   - html.paper   : textura de papel
   Quien tenga «reducir animaciones» en su dispositivo no ve ninguna animación.
   ========================================================= */

/* 1 · Aparición suave al bajar (solo cuando el script está listo, para no ocultar nada si falla) */
.fx-ready .rv { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--rv-delay, 0s); }
.fx-ready .rv.is-in { opacity: 1; transform: none; }
.fx-ready .dish.rv { transform: translateY(12px); transition-duration: .55s; }

/* 2 · La guirnalda se dibuja desde el centro hacia los lados */
.fx-ready .ornament.rv { transform: none; clip-path: inset(0 50% 0 50%); transition: clip-path 2s cubic-bezier(.45, 0, .25, 1) .2s, opacity .5s ease .2s; }
.fx-ready .ornament.rv.is-in { clip-path: inset(0 0 0 0); }

/* 3 · El tamborilero «toca» el tambor: ondas desde el parche */
.brand-fig { position: relative; }
.brand-fig .drum-wave { position: absolute; left: 42.7%; top: 48.3%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 1.5px solid var(--gold); border-radius: 50%; opacity: 0; pointer-events: none; }
.fx .brand.drumming .drum-wave { animation: drum-wave 1.1s cubic-bezier(.2, .6, .3, 1) forwards; }
.fx .brand.drumming .drum-wave:nth-child(2) { animation-delay: .18s; }
.fx .brand.drumming .drum-wave:nth-child(3) { animation-delay: .36s; }
.fx .brand.drumming .brand-fig svg { animation: drum-hit .36s ease-in-out 2; }
@keyframes drum-wave { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(4.2); opacity: 0; } }
@keyframes drum-hit { 0%, 100% { transform: none; } 40% { transform: translateY(1px) rotate(-1.5deg); } }

/* 6 · Textura de papel: fondo crema con grano, detrás del contenido (versión clara en modo nocturno) */
.paper body { background-image: var(--texture); background-repeat: repeat; }
@media print { .paper body { background-image: none; } }

/* 7 · Profundidad: las fotos destacadas se desplazan un poco más despacio que la página */
.fx .fx-photo { translate: 0 var(--plx, 0px); }

/* 8 · Carta: los platos responden al pasar el ratón */
.leader { position: relative; }
.leader::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -1px; border-bottom: 1px dotted var(--gold-ink); transition: right .55s cubic-bezier(.3, .6, .2, 1); }
.dish h4 { transition: color .25s ease; }
.dish-al .al { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
@media (hover: hover) {
  .dish:hover h4 { color: var(--gold-ink); }
  .dish:hover .leader::after { right: 0; }
  .dish:hover .dish-al .al { transform: scale(1.14); }
  .dish:hover .dish-al .al:nth-child(2) { transition-delay: .03s; }
  .dish:hover .dish-al .al:nth-child(3) { transition-delay: .06s; }
  .dish:hover .dish-al .al:nth-child(4) { transition-delay: .09s; }
  .dish:hover .dish-al .al:nth-child(n+5) { transition-delay: .12s; }
}

/* Carta en móvil y tablet pequeña: las secciones se reparten en varias filas centradas
   (sin tira que se salga de la pantalla) junto al botón de alérgenos */
@media (max-width: 760px) {
  .carta-tools { flex-wrap: wrap; justify-content: center; gap: 6px; padding: 8px 0 10px; margin-bottom: 24px; }
  .carta-tabs { display: contents; }
  .carta-tabs a { padding: 6px 12px; font-size: .86rem; border-color: var(--line); background: var(--surface); }
  .carta-tabs a.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .al-filter { position: static; }
  .al-filter summary { padding: 6px 12px; font-size: .86rem; }
  .al-filter-panel { top: calc(100% + 6px); left: 0; right: 0; width: auto; }
}

/* =========================================================
   v014 · Especialidades de la casa y buscador de la carta
   ========================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center-note { text-align: center; }

.specials-grid { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: clamp(16px, 2.4vw, 26px); max-width: 1060px; }
.specials-grid:has(> li:only-child) { max-width: 420px; }
.specials-grid:has(> li:nth-child(2):last-child) { max-width: 760px; }
.special a { display: flex; flex-direction: column; align-items: center; height: 100%; padding: 28px 22px 24px; text-align: center; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.special a:hover { color: var(--ink); transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 16px 30px -18px rgba(60, 40, 10, .5); }
.special-mark { font-size: 2.2rem; line-height: 1; color: var(--gold); margin-bottom: .5rem; }
.special h3 { font-size: 1.7rem; margin: 0 0 .4rem; }
.special p { margin: 0 0 1rem; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink-soft); line-height: 1.35; }
.special-more { margin-top: auto; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--gold-ink); }
.special a:hover .special-more span { display: inline-block; transform: translateX(3px); transition: transform .2s; }

.carta-search { position: relative; max-width: 480px; margin: -12px auto 22px; text-align: center; }
.carta-search svg { position: absolute; left: 15px; top: 24px; transform: translateY(-50%); width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.carta-search input { width: 100%; height: 48px; padding: 0 16px 0 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: 400 1rem/1 var(--sans); transition: border-color .2s, box-shadow .2s; }
.carta-search input::placeholder { color: var(--muted); }
.carta-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.carta-search-status { margin: 8px 0 0; font-size: .92rem; color: var(--gold-ink); }
.carta-search-status:empty { display: none; }
.dish mark { background: color-mix(in srgb, var(--gold) 32%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }

.price-labels { padding-right: 4px; }
.price.note { font-weight: 600; }
.daily-card .price-labels { max-width: none; }
@media (max-width: 600px) {
  .carta-search { margin-top: -8px; }
  .special a { padding: 22px 18px 20px; }
}

/* =========================================================
   v015 · Hoy en el mesón, agotados, fotos de especialidades, barra inferior en el móvil
   ========================================================= */
.daily-card h2 { font-size: clamp(2rem, 4vw, 2.7rem); }
.today-text { font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; color: var(--ink); max-width: 34em; margin: 0 auto 1.2rem; }
.today-sub { font-size: 1.5rem; margin: 1.4rem 0 .3rem; }
.today-sold { margin: 1.4rem 0 0; padding: 10px 14px; border-left: 2px solid var(--closed); background: color-mix(in srgb, var(--closed) 7%, transparent); text-align: left; font-size: .97rem; }
.today-sold strong { color: var(--closed); font-weight: 600; }

.sold-badge { flex-shrink: 0; align-self: center; margin-left: 10px; padding: 2px 8px; border: 1px solid var(--closed); border-radius: 4px; color: var(--closed); font: 600 .7rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.dish.sold-out h4, .dish.sold-out .dish-desc { opacity: .6; }
.dish.sold-out .price { text-decoration: line-through; opacity: .55; }
.special .sold-badge { margin: 0 0 .8rem; }

.special a.has-photo { padding-top: 0; overflow: hidden; }
.special-photo { display: block; width: calc(100% + 44px); margin: 0 -22px 0; aspect-ratio: 4 / 3; border-bottom: 8px solid var(--frame); background: var(--frame); overflow: hidden; }
.special-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.special a:hover .special-photo img { transform: scale(1.04); }
.special a.has-photo .special-mark { margin-top: -1.1rem; position: relative; z-index: 1; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: 1.5rem; }

.today-hours { display: flex; align-items: center; gap: 8px; margin: .5rem 0 0; font-size: .95rem; color: var(--ink-soft); }
.today-hours svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: var(--gold-ink); stroke-width: 1.8; stroke-linecap: round; }
.today-hours a { color: var(--gold-ink); }
.carta-updated { margin: .6rem 0 0; font-size: .85rem; letter-spacing: .04em; color: var(--muted); }

.mbar { display: none; }
@media (max-width: 760px) {
  .mbar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: flex; background: var(--accent); box-shadow: 0 -6px 18px rgba(0, 0, 0, .18); padding-bottom: env(safe-area-inset-bottom); }
  .mbar a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; color: var(--on-accent); text-decoration: none; font: 600 .95rem/1 var(--sans); letter-spacing: .02em; }
  .mbar a + a { border-left: 1px solid rgba(255, 255, 255, .28); }
  .mbar a:hover, .mbar a:active { background: var(--accent-hover); color: var(--on-accent); }
  .mbar svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  body.has-mbar { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }
  .hero-actions .hero-way { display: none; }
}
@media print { .mbar { display: none !important; } }

/* v017 · Mapa propio (OpenStreetMap) */
.map-osm { position: relative; z-index: 0; isolation: isolate; height: 100%; min-height: 440px; background: var(--bg-alt); }
.map-osm .leaflet-tile-pane { filter: var(--map-filter); }
.map-osm.leaflet-container { font-family: var(--sans); background: var(--bg-alt); }
.map-osm.leaflet-container .leaflet-control-attribution { color: var(--ink-soft); }
.map-osm.leaflet-container .leaflet-bar a { background: var(--surface); color: var(--ink); border-color: var(--line); }
.map-osm.leaflet-container .leaflet-popup-content-wrapper, .map-osm.leaflet-container .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.map-osm.leaflet-container .tm-popup a { color: var(--gold-ink); }
.map-fallback { display: grid; place-items: center; height: 100%; min-height: inherit; color: var(--gold-ink); font-weight: 600; }
@media (max-width: 980px) { .map-osm { min-height: 340px; height: 340px; } }
.section.visit { scroll-margin-top: -40px; }

/* =========================================================
   v020 · Eventos y grupos, botón para subir
   ========================================================= */
.hero-groups { display: inline-flex; align-items: center; gap: 6px; margin-top: 1.1rem; font-weight: 600; font-size: .95rem; color: var(--gold-ink); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); padding-bottom: 2px; }
.hero-groups:hover { color: var(--ink); border-bottom-color: var(--ink); }
.hero-groups + .open-status { display: flex; }
.groups-facts { list-style: none; margin: 0 auto 22px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; }
.groups-facts li { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 600; }
.groups-facts svg { width: 26px; height: 26px; fill: none; stroke: var(--gold-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.groups-occ { list-style: none; margin: 0 auto 48px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 860px; }
.groups-occ li { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; color: var(--ink-soft); background: var(--card); }
.groups-sub { text-align: center; font-size: 1.9rem; margin-bottom: 22px; }
.groups-menus { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 380px)); justify-content: center; gap: clamp(16px, 2.4vw, 26px); }
.gmenu { padding: 28px 26px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; position: relative; }
.gmenu::before { content: "❧"; display: block; color: var(--gold); font-size: 1.6rem; line-height: 1; margin-bottom: .4rem; }
.gmenu h4 { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; margin: 0 0 .2rem; }
.gmenu-price { font-size: 1.35rem; font-weight: 600; color: var(--gold-ink); margin: 0 0 1rem; font-variant-numeric: tabular-nums; }
.gmenu-price small { font-size: .8rem; font-weight: 400; color: var(--muted); }
.gmenu ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.gmenu ul li { font-family: var(--serif); font-size: 1.08rem; line-height: 1.35; color: var(--ink-soft); padding: 7px 0; border-top: 1px dashed var(--line); }
.gmenu-min { margin: 14px 0 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.groups-note { text-align: center; color: var(--muted); font-style: italic; margin: 18px auto 0; max-width: 40em; }
.groups-contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: start; margin-top: clamp(48px, 6vw, 72px); }
.groups-talk h3, .groups-form h3 { font-size: 1.8rem; }
.groups-talk p { color: var(--ink-soft); }
.groups-form { padding: clamp(22px, 3.5vw, 36px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.gf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.gf-wide { grid-column: 1 / -1; }
.groups-form label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.groups-form input:not([type="checkbox"]), .groups-form select, .groups-form textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: 400 1rem/1.3 var(--sans); }
.groups-form textarea { resize: vertical; min-height: 100px; }
.groups-form input:focus, .groups-form select:focus, .groups-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.groups-form .is-bad { border-color: var(--closed) !important; }
.gf-err { color: var(--closed); font-size: .85rem; font-weight: 600; }
.gf-check { flex-direction: row !important; align-items: flex-start; gap: 10px !important; margin-top: 16px; font-weight: 400 !important; font-size: .92rem !important; }
.gf-check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); flex-shrink: 0; }
.gf-check a { color: var(--gold-ink); }
.gf-hint { font-size: .85rem; color: var(--muted); margin: 8px 0 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { padding: 12px 14px; border-radius: 6px; margin: 0 0 16px; font-weight: 600; }
.form-msg.ok { background: color-mix(in srgb, var(--open) 12%, transparent); color: var(--open); }
.form-msg.err { background: color-mix(in srgb, var(--closed) 10%, transparent); color: var(--closed); }
.groups-form button[disabled] { opacity: .6; cursor: wait; }
@media (max-width: 860px) { .groups-contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .gf-grid { grid-template-columns: 1fr; } }

/* Botón discreto para volver arriba */
.to-top { position: fixed; z-index: 55; right: 18px; bottom: 18px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--header-bg); backdrop-filter: blur(6px); color: var(--ink); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .25s, background .2s, color .2s, border-color .2s; }
.to-top.show { opacity: .85; transform: none; pointer-events: auto; }
.to-top:hover { opacity: 1; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.to-top[hidden] { display: grid; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.is-editing .to-top, body:has(.editbar) .to-top { bottom: 92px; }
@media (max-width: 760px) { body.has-mbar .to-top { bottom: calc(54px + 14px + env(safe-area-inset-bottom)); right: 14px; } }
@media print { .to-top { display: none !important; } }
.groups-form [hidden] { display: none !important; }
@media (max-width: 600px) { .groups-facts { flex-direction: column; align-items: center; gap: 10px; } .groups-facts li { text-align: left; max-width: 320px; } }

/* =========================================================
   v021 · Repaso general (contraste, móvil, tabletas, carga de fotos)
   ========================================================= */
.main-nav .nav-admin { color: var(--ink-soft); }
.map-osm.leaflet-container .leaflet-control-attribution { opacity: .85; }
/* Las fotos de portada y «Nosotros» reservan su hueco antes de cargar (sin saltos):
   el ancho sale de la proporción de la foto (--ar) y de la altura máxima permitida */
.hero-img.fx-photo[style*="--ar"] { width: min(100%, calc(78vh * var(--ar))); }
.about-img.fx-photo[style*="--ar"] { width: min(100%, calc(70vh * var(--ar))); }
.fx-photo[style*="--ar"] img { width: 100%; height: auto; max-height: none; }
@media (max-width: 980px) { .hero-img.fx-photo[style*="--ar"] { width: min(100%, calc(52vh * var(--ar))); } }
/* Enlace de grupos de la portada: más fácil de pulsar */
.hero-groups { min-height: 40px; padding-block: 8px; }
.brand { min-width: 40px; min-height: 44px; }
/* Menús de grupo y galería: en tabletas caben dos por fila */
.groups-menus, .gallery-grid { display: flex; flex-wrap: wrap; justify-content: center; }
.groups-menus > li { flex: 1 1 300px; max-width: 400px; }
.gallery-grid > li { flex: 1 1 280px; max-width: 370px; }
@media (max-width: 600px) { .groups-menus > li, .gallery-grid > li { max-width: none; } }
/* v049 · En el móvil, la galería en 2 columnas de miniaturas con marco fino: al tocar una, se abre en grande */
@media (max-width: 600px) {
  .gallery-grid { gap: 10px; justify-content: flex-start; }
  .gallery-grid > li { flex: 0 0 calc(50% - 5px); min-width: 0; }
  .gallery-grid a { border-width: 4px; }
}
/* «Síguenos»: en pantallas estrechas el texto va encima de los iconos */
@media (max-width: 420px) { .follow { flex-direction: column; align-items: flex-start; gap: 8px; } }
/* Crédito del mapa legible también en modo oscuro (sigue siendo mínimo) */
.map-osm.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 70%, transparent) !important; border-radius: 4px 0 0 0; text-shadow: none; color: var(--ink-soft); opacity: .9; }
/* Al imprimir sale solo la carta */
@media print { .groups, .specials, .about, .visit, .carta-search, .hero-groups, .al-filter, .mbar, .to-top { display: none !important; } }

/* Instalar como app: discreto, nunca sale solo. Pie en el ordenador; final del menú en móvil y tableta */
.foot-install, .nav-install { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.foot-install svg, .nav-install svg { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.foot-install:not([hidden]) { display: inline-flex; align-items: center; gap: 6px; opacity: .55; }
.foot-install:hover { opacity: 1; color: #E3D3AE; }
.nav-install { display: none !important; }
@media (max-width: 980px) {
  .foot-install { display: none !important; }
  .nav-install:not([hidden]) { display: flex !important; align-items: center; gap: 8px; padding: 14px 0; font-size: .95rem; letter-spacing: .06em; color: var(--muted); }
}
.install-dialog { max-width: 480px; }
.install-dialog [data-for][hidden] { display: none; }

/* ---------- Idiomas ---------- */
.hdr-lang { display: inline-flex; align-items: center; margin-right: -14px; font: 600 .78rem/1 var(--sans); letter-spacing: .12em; flex-shrink: 0; }
.hdr-lang a { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 6px; color: var(--ink-soft); text-decoration: none; opacity: .7; }
.hdr-lang a + a { border-left: 1px solid var(--line); }
.hdr-lang a:hover { opacity: 1; color: var(--ink); }
.hdr-lang a[aria-current] { opacity: 1; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .4em; }
.main-nav .nav-lang { display: none; align-items: center; gap: 8px; }
.main-nav .nav-lang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
@media (max-width: 980px) {
  .main-nav .nav-lang { display: flex; }
  .hdr-lang { margin-right: -8px; }
}
@media (max-width: 600px) {
  /* En el móvil solo se ve el otro idioma (el actual ya se sabe), y en pantallas muy estrechas va dentro del menú */
  .hdr-lang { margin-right: -4px; }
  .hdr-lang a[aria-current] { display: none; }
  .hdr-lang a + a { border-left: 0; }
}
@media (max-width: 379px) { .hdr-lang { display: none; } }
.foot-lang { margin: 1rem 0 0; }
.foot-lang a { display: inline-flex; align-items: center; gap: 8px; }
.foot-lang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.lang-bar { position: fixed; z-index: 70; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; width: max-content; max-width: calc(100% - 24px); padding: 12px 14px 12px 20px; border-radius: var(--radius, 8px); background: var(--dark); color: var(--on-dark); box-shadow: 0 18px 40px rgba(0, 0, 0, .3); font-size: .95rem; }
.lang-bar p { margin: 0; }
.lang-bar .btn { min-height: 40px; padding: .5em 1.1em; }
.lang-bar-x { width: 40px; height: 40px; border: 0; background: none; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; opacity: .75; }
.lang-bar-x:hover { opacity: 1; }
@media (max-width: 760px) { body.has-mbar .lang-bar { bottom: calc(54px + 12px + env(safe-area-inset-bottom)); } }
/* Editando en inglés: lo que falta por traducir o ha cambiado en español */
.is-editing .tr-falta, .is-editing .tr-pendiente { position: relative; outline: 2px dashed #D9A440 !important; outline-offset: 6px; }
.is-editing .tr-falta { opacity: .75; font-style: italic; }
.is-editing .tr-falta::after, .is-editing .tr-pendiente::after { position: absolute; right: -6px; top: -26px; padding: 3px 9px; border-radius: 999px; background: #8A5800; color: #fff; font: 600 .72rem/1.2 var(--sans); font-style: normal; letter-spacing: .02em; text-transform: none; white-space: nowrap; pointer-events: none; z-index: 5; }
.is-editing .tr-falta::after { content: "Sin traducir · se ve en español"; }
.is-editing .tr-pendiente::after { content: "Pendiente: el español ha cambiado"; }

/* Aviso para el personal mientras la web está «en construcción» (el público no lo ve) */
.cons-flag { position: fixed; left: 12px; bottom: 78px; z-index: 90; max-width: min(92vw, 520px); margin: 0; padding: 10px 14px; border-radius: 10px; background: #FFF4DE; border: 1px solid #E8C97A; color: #5B4208; font: 400 .88rem/1.4 system-ui, sans-serif; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .45); }
.cons-flag a { color: inherit; font-weight: 600; }
@media (max-width: 700px) { .cons-flag { bottom: 132px; } }
@media print { .cons-flag { display: none; } }

/* v031 · Especialidades en «cinta en movimiento» (Panel → Ajustes → Especialidades) */
.mq-view { position: relative; overflow: hidden; margin: 0 calc(50% - 50vw); padding: 6px 0 18px; cursor: grab; touch-action: pan-y; -webkit-mask: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%); mask: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%); }
.mq-view.is-drag { cursor: grabbing; }
.mq-view .specials-grid { display: flex; gap: clamp(16px, 2vw, 26px); width: max-content; max-width: none !important; margin: 0; padding: 0 0 0 20px; overflow: visible; will-change: transform; grid-template-columns: none; }
.mq-view .special { flex: 0 0 clamp(250px, 26vw, 320px); opacity: 1 !important; transform: none !important; }
.mq-view .special a { user-select: none; -webkit-user-drag: none; height: 100%; }
.mq-view .special a:hover { transform: none; }
.mq-view .special img { pointer-events: none; }
.mq-view.is-drag .special a { pointer-events: none; }

/* Pie de página en tres columnas, como el del museo (v042): marca · Visítanos · De interés (+ idioma y textos legales) */
.footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; }
.footer-brand .footer-claim { margin: 20px 0 0; max-width: 17em; font-size: 1.3rem; line-height: 1.35; }
.site-footer .foot-col h2 { margin: 0 0 16px; font: 600 .74rem/1.3 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: #D0BB8A; }
.site-footer .foot-col p { margin: 0 0 12px; font-size: .97rem; line-height: 1.6; }
.site-footer .foot-links { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 8px; font-size: .97rem; }
.site-footer .foot-col .social { margin-top: 18px; }
.site-footer .foot-col .foot-lang { margin: 16px 0 0; }
.site-footer .foot-col .legal-links { margin-top: 20px; }
.site-footer .foot-col .legal-links a { opacity: .75; text-decoration: none; }
.site-footer .foot-col .legal-links a:hover { opacity: 1; text-decoration: underline; }
.site-footer .foot-col .legal-links .login-link { opacity: .5; margin-top: 6px; }
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
}

/* =========================================================
   v043 · Secciones que se ordenan en el panel: una línea fina entre cada dos
   ========================================================= */
main > .section + .section, main > .daily + .section:not(.specials) { border-top: 1px solid var(--line); }
main > .section:last-of-type { border-bottom: 1px solid var(--line); }
main > .section.visit { border-bottom: 0; }

/* ---------- Agenda ---------- */
.events { list-style: none; margin: 0 auto; padding: 0; max-width: 1060px; border-top: 1px solid var(--line); }
.event { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px clamp(18px, 3vw, 40px); align-items: start; padding: clamp(22px, 3vw, 32px) 0; border-bottom: 1px solid var(--line); }
.event.has-img { grid-template-columns: 96px minmax(0, 1fr) auto 200px; }
.ev-date { display: flex; flex-direction: column; align-items: flex-start; }
.ev-date b { font: 400 3.4rem/.9 var(--serif); color: var(--gold-ink); font-variant-numeric: lining-nums; white-space: nowrap; }
.ev-date.is-range b { font-size: 2.5rem; }
.ev-date b i { font-style: normal; color: var(--gold); margin: 0 .04em; }
.ev-date span { margin-top: 8px; font: 600 .76rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; }
.ev-date small { margin-top: 6px; font: italic 400 1.02rem/1.15 var(--serif); color: var(--muted); }
.ev-body h3 { font-size: clamp(1.45rem, 2.3vw, 1.85rem); margin-bottom: .35em; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 .7em; font-size: .93rem; color: var(--muted); }
.ev-meta span { display: inline-flex; align-items: center; gap: 7px; }
.ev-meta svg { width: 17px; height: 17px; fill: none; stroke: var(--gold-ink); stroke-width: 1.7; stroke-linecap: round; }
.ev-desc { color: var(--ink-soft); max-width: 40em; margin: 0; }
.ev-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; text-align: right; }
.ev-price { margin: 0; font: 400 1.65rem/1 var(--serif); white-space: nowrap; }
.ev-book { min-height: 42px; padding: .55em 1.2em; }
/* Miniatura: siempre 4:3 y con la foto ENTERA (sea cartel vertical o foto apaisada); el hueco se rellena con la misma foto desenfocada */
.ev-img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--bg-alt); box-shadow: var(--frame-shadow); isolation: isolate; }
.ev-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ev-img .ev-img-bg { inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(16px) saturate(1.1) brightness(.82); }
.ev-img .ev-img-fg { object-fit: contain; transition: transform .35s ease; }
.ev-img:hover .ev-img-fg { transform: scale(1.04); }
.ev-zoom { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(20, 18, 15, .55); color: #fff; opacity: .85; transition: opacity .2s; }
.ev-zoom svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ev-img:hover .ev-zoom, .ev-img:focus-visible .ev-zoom { opacity: 1; }
.ev-body h3 a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s; }
.ev-body h3 a:hover, .ev-body h3 a:focus-visible { background-size: 100% 1px; color: var(--gold-ink); }
.ev-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ev-more { display: inline-block; margin-top: .5em; color: var(--gold-ink); font-weight: 600; font-size: .92rem; text-decoration: none; }
.ev-more:hover { text-decoration: underline; }

/* Ventana del evento: la foto en grande (con sus proporciones) y toda la información */
/* La ventana nunca pasa del alto de la pantalla: la foto se ajusta entera a ese alto y, si el texto es muy largo,
   se desplaza solo el texto (por dentro). Ordenador/tablet: foto a la izquierda y texto a la derecha. Móvil: foto arriba. */
.ev-dialog { position: fixed; width: fit-content; max-width: min(1100px, calc(100vw - 48px)); max-height: min(90dvh, 820px); padding: 0; border: 0; border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, .45); overflow: hidden; }
.ev-dialog::backdrop { background: rgba(18, 16, 13, .78); }
.ev-dlg-body { display: flex; max-height: min(90dvh, 820px); }
.ev-close { position: absolute; z-index: 3; top: 12px; right: 12px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(20, 18, 15, .62); color: #fff; cursor: pointer; backdrop-filter: blur(4px); }
.ev-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ev-close:hover { background: var(--accent); }
.evd-img { flex: 0 1 auto; min-width: 0; margin: 0; display: flex; align-items: center; justify-content: center; background: #1E1B17; }
.evd-img img { display: block; width: auto; height: auto; max-width: min(58vw, 640px); max-height: min(90dvh, 820px); object-fit: contain; }
.evd-text { flex: 1 0 340px; width: 400px; max-width: 460px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding: clamp(26px, 3vw, 40px) clamp(22px, 3vw, 36px); }
.ev-dlg-body > .evd-text:only-child { width: min(600px, calc(100vw - 48px)); max-width: none; padding-right: 64px; }
.evd-date { margin: 0 0 .4em; padding-right: 40px; color: var(--gold-ink); font: 600 .78rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.evd-title { font-size: clamp(1.7rem, 2.6vw, 2.3rem); margin-bottom: .4em; }
.evd-desc { color: var(--ink-soft); font-size: 1.04rem; }
.evd-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-top: 1.3em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.evd-foot .ev-price { font-size: 1.8rem; }
.evd-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.evd-actions .btn { min-height: 44px; }
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .ev-dialog { width: calc(100vw - 24px); max-width: 560px; max-height: calc(100dvh - 24px); }
  .ev-dlg-body { flex-direction: column; max-height: calc(100dvh - 24px); }
  .evd-img { flex: 0 0 auto; }
  .evd-img img { max-width: 100%; max-height: 42dvh; }
  .evd-text { flex: 1 1 auto; width: auto; max-width: none; min-height: 0; padding: 20px 20px 22px; }
  .ev-dlg-body > .evd-text:only-child { width: auto; }
  .evd-actions, .evd-actions .btn { width: 100%; }
}
.ev-now { display: inline-block; margin: 0 0 10px; padding: 3px 11px; border-radius: 999px; background: var(--open); color: #fff; font: 600 .74rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
:root[data-theme="dark"] .ev-now { color: #14231a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ev-now { color: #14231a; } }
.ev-stamp { display: inline-block; margin: 0 0 12px; padding: 5px 11px 4px; border: 2px solid var(--gold-ink); border-radius: 4px; outline: 1px solid var(--gold-ink); outline-offset: 2px; color: var(--gold-ink); font: 700 .7rem/1.15 var(--sans); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; transform: rotate(-3deg); transform-origin: left center; }
.event.is-past .ev-date, .event.is-past .ev-body > :not(.ev-stamp), .event.is-past .ev-side, .event.is-past .ev-img { opacity: .55; }
.event.is-past .ev-img img { filter: grayscale(1); }
@media (max-width: 760px) {
  .event, .event.has-img { grid-template-columns: 70px minmax(0, 1fr); }
  .ev-date b { font-size: 2.6rem; }
  .ev-date.is-range b { font-size: 1.75rem; }
  .ev-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; text-align: left; }
  .ev-img { grid-column: 2; grid-row: 1; width: 100%; }
  .event.has-img .ev-body { grid-row: 2; }
  .event.has-img .ev-date { grid-row: 1 / 3; }
}

/* ---------- Vídeos «Nos han visitado» ---------- */
/* v047 · Cuadrícula sin desplazamiento lateral: 4 por fila en ordenador, 3 en tablet y 2 en el móvil */
.vid-row { list-style: none; margin: 0 auto; padding: 6px 0 4px; max-width: 988px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 232px)); justify-content: center; gap: 20px; }
.vid { min-width: 0; }
.vid-card { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #1E1B17; color: #fff; text-align: left; cursor: pointer; box-shadow: var(--frame-shadow); isolation: isolate; transition: transform .25s, box-shadow .25s; }
.vid-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px -12px rgba(40, 26, 6, .55); }
.vid-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.vid-cover, .vid-cover img, .vid-cover video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .28) 0, transparent 22%, transparent 52%, rgba(0, 0, 0, .78) 100%); }
/* Tarjeta sin portada: a juego con la web (papel, marco fino con los colores de la red y su logotipo) */
.vid-card.no-cover { background: var(--surface); color: var(--ink); border: 1px solid var(--line); text-shadow: none; }
.vid-card.no-cover::before { content: ""; position: absolute; inset: 7px; z-index: 1; pointer-events: none; border-radius: 10px; padding: 2px; background: var(--ring, linear-gradient(45deg, #F9CE34, #EE2A7B 50%, #6228D7)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: .75; }
.vid-card.no-cover.is-tiktok { --ring: linear-gradient(45deg, #25F4EE, #2B2926 50%, #FE2C55); }
.vid-card.no-cover .vid-cover::after { display: none; }
.vid-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 18px 90px; background: var(--card); }
.vid-ph-logo { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 22px; color: #fff; background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%); box-shadow: 0 8px 20px -8px rgba(80, 30, 60, .5); }
.vid-card.is-tiktok .vid-ph-logo { background: #111; box-shadow: -3px -3px 0 #25F4EE inset, 3px 3px 0 #FE2C55 inset, 0 8px 20px -8px rgba(0, 0, 0, .5); }
.vid-ph-logo svg { width: 42px; height: 42px; }
.vid-ph-name { font: italic 400 1.15rem/1.2 var(--serif); color: var(--muted); text-align: center; }
.vid-ph-who { max-width: 100%; margin-top: 2px; font: 600 .98rem/1.25 var(--sans); letter-spacing: -.005em; color: var(--ink); text-align: center; overflow-wrap: anywhere; }
.vid-ph-who + .vid-ph-name { margin-top: -8px; font-size: 1rem; }
.vid-card.no-cover .vid-play { top: auto; bottom: 74px; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px -6px rgba(60, 40, 10, .6); }
.vid-card.no-cover:hover .vid-play { background: var(--accent-hover); }
.vid-card.no-cover .vid-plat { display: none; }
.vid-card.no-cover .vid-info { color: var(--ink); text-align: center; align-items: center; }
.vid-card.no-cover .vid-info small { opacity: .8; }
.vid-play { position: absolute; z-index: 1; top: 50%; left: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 251, 242, .92); color: #2B2926; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); transition: transform .25s, background .25s; }
.vid-play svg { width: 26px; height: 26px; margin-left: 4px; fill: currentColor; }
.vid-card:hover .vid-play { transform: scale(1.08); background: #fff; }
.vid-plat { position: absolute; z-index: 1; top: 12px; right: 12px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .45); backdrop-filter: blur(4px); }
.vid-plat svg { width: 17px; height: 17px; }
.vid-info { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 3px; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.vid-info strong { font: 600 .98rem/1.2 var(--sans); overflow-wrap: anywhere; }
.vid-info small { font: italic 400 1.02rem/1.25 var(--serif); opacity: .92; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Cuántos se ven de entrada (el resto, con «Ver más vídeos») */
.vid-grid:not(.show-all) .vid:nth-child(n+9) { display: none; }
.more-wrap { margin: clamp(20px, 3vw, 30px) 0 0; text-align: center; }
.more-wrap:has(> [hidden]) { display: none; }
@media (max-width: 1024px) { .vid-row { max-width: 716px; grid-template-columns: repeat(auto-fit, minmax(180px, 220px)); } }
@media (max-width: 600px) {
  .vid-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 460px; }
  .vid-row:has(> li:only-child) { grid-template-columns: minmax(0, 220px); }
  .vid-grid:not(.show-all) .vid:nth-child(n+5) { display: none; }
  .vid-card { border-radius: 12px; }
  .vid-play { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
  .vid-play svg { width: 21px; height: 21px; }
  .vid-info { left: 10px; right: 10px; bottom: 10px; }
  .vid-info strong { font-size: .88rem; }
  .vid-info small { font-size: .92rem; -webkit-line-clamp: 2; }
  .vid-ph { gap: 8px; padding: 12px 8px 92px; }
  .vid-ph-logo { width: 54px; height: 54px; border-radius: 16px; }
  .vid-ph-logo svg { width: 30px; height: 30px; }
  .vid-ph-who { font-size: .84rem; }
  .vid-ph-name { font-size: .92rem; }
  .vid-ph-who + .vid-ph-name { display: none; }   /* en el móvil sobra: el logotipo ya dice qué red es */
  .vid-card.no-cover .vid-play { bottom: 46px; }
  .vid-card.no-cover::before { inset: 5px; }
}

/* Ventana del vídeo */
.vid-dialog { width: fit-content; max-width: none; max-height: none; margin: auto; padding: 0; border: 0; background: transparent; color: var(--on-dark); overflow: visible; }
.vid-dialog::backdrop { background: rgba(18, 16, 13, .88); }
.vid-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.vid-stage { position: relative; width: min(92vw, calc((100dvh - 150px) * 9 / 16), 420px); aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.vid-stage.is-instagram { aspect-ratio: 400 / 710; width: min(92vw, calc((100dvh - 170px) * 400 / 710), 420px); background: #fff; }
.vid-stage.is-instagram iframe { background: #fff; }
.vid-stage iframe, .vid-stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.vid-stage video { object-fit: contain; }
.vid-stage .vid-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #bbb; font-size: .95rem; }
.vid-close { position: absolute; z-index: 3; top: -6px; right: -60px; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.vid-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.vid-close:hover { background: var(--accent); border-color: var(--accent); }
@media (max-width: 620px) { .vid-close { top: auto; bottom: calc(100% + 8px); right: 0; } .vid-box { margin-top: 56px; } .vid-stage, .vid-stage.is-instagram { width: min(92vw, calc((100dvh - 190px) * 9 / 16)); } }
.vid-foot { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: .95rem; text-align: center; max-width: 420px; }
.vid-who { font-weight: 600; }
.vid-profile { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: 3px; }
.vid-profile:hover { color: var(--gold); text-decoration-color: currentColor; }
.vid-ext { color: var(--gold); }
.vid-ext:hover { color: #fff; }
.vid-help { margin: 0; max-width: 400px; font-size: .86rem; line-height: 1.45; text-align: center; color: rgba(239, 233, 222, .85); }
.vid-help a { color: var(--gold); }
.vid-cookies { margin: 0; max-width: 380px; font-size: .8rem; line-height: 1.4; text-align: center; color: rgba(239, 233, 222, .7); }

/* ---------- Reseñas de Google ---------- */
.stars { display: inline-flex; gap: 2px; vertical-align: -2px; }
.stars svg { width: 18px; height: 18px; }
.stars .s0 { fill: var(--line); }
.stars .s1 { fill: #D9A21B; }
.rev-summary { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; margin: .4rem 0 0; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.rev-summary strong { font: 400 1.7rem/1 var(--serif); }
.rev-summary .stars svg { width: 20px; height: 20px; }
.rev-summary > span:last-child { color: var(--ink-soft); font-size: .95rem; }
.rev-list { list-style: none; margin: 0 auto; padding: 0; max-width: 1120px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(16px, 2.4vw, 26px); }
.rev-list:has(> li:only-child) { max-width: 520px; }
.rev-list:has(> li:nth-child(2):last-child) { max-width: 820px; }
.rev { min-width: 0; }
.rev-list.has-open { align-items: start; }   /* v051 · al desplegar una reseña, las demás no se estiran */
.rev figure { position: relative; height: 100%; display: flex; flex-direction: column; margin: 0; padding: 26px 24px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.rev figure::before { content: "\201C"; position: absolute; top: 2px; right: 18px; font: 400 4.6rem/1 var(--serif); color: var(--gold); opacity: .35; }
.rev-text { margin: 12px 0 18px; font: 400 1.14rem/1.55 var(--serif); color: var(--ink); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }   /* v050 · justificado, con guiones para que no queden huecos grandes */
.rev-text p { margin: 0; }
.rev-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.rev-more { align-self: flex-start; margin: -10px 0 16px; padding: 0; border: 0; background: none; color: var(--gold-ink); font: 600 .92rem/1.4 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rev figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.rev-avatar { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-alt); color: var(--gold-ink); font: 400 1.25rem/1 var(--serif); border: 1px solid var(--line); }
.rev figcaption strong { display: block; font-weight: 600; font-size: .98rem; line-height: 1.25; }
.rev figcaption small { display: block; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.rev figcaption a { color: inherit; }
.rev-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(22px, 3vw, 34px); }
.rev-actions .btn-review { margin-top: 0; }
.rev-actions .ext { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Reseñas: de entrada 6 en ordenador y 3 en el móvil (una debajo de otra); el resto, con «Ver más reseñas» */
.rev-wrap:not(.show-all) .rev:nth-child(n+7) { display: none; }
@media (max-width: 700px) {
  .rev-list, .rev-list:has(> li:only-child), .rev-list:has(> li:nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr); max-width: 560px; gap: 14px; }
  .rev-wrap:not(.show-all) .rev:nth-child(n+4) { display: none; }
}
@media print { .vid-grid, .rev-actions, .rev-more, .more-wrap { display: none !important; } .rev-wrap .rev { display: block !important; } .rev-list { grid-template-columns: 1fr 1fr; } .rev-text.is-clamped { display: block; } }
