:root {
  --bg: #ffffff;
  --bg-soft: #f4f5f2;
  --surface: #ffffff;
  --text: #16181a;
  --text-soft: #4a4f55;
  --muted: #6b7178;
  --line: #e2e4e0;
  /* From the logo: black wordmark + golden sun (#e19921). Text uses a darker
     gold so it keeps >= 4.5:1 contrast on white. */
  --brand: #8a5a00;
  --brand-strong: #6b4500;
  --gold: #e19921;
  --accent: #e19921;
  --local: #1f7a3f;
  --local-bg: #eef6ef;
  --video-bg: #111417;
  --video-text: #f2f4f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06);
  --serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121416; --bg-soft: #1a1d20; --surface: #181b1e; --text: #eceef0; --text-soft: #c4c8cc;
    --muted: #949aa1; --line: #2b2f33; --brand: #f0b54a; --brand-strong: #f6c86f; --gold: #e19921; --accent: #e19921;
    --local: #5cc27a; --local-bg: #16231a; --video-bg: #0a0c0d; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121416; --bg-soft: #1a1d20; --surface: #181b1e; --text: #eceef0; --text-soft: #c4c8cc;
  --muted: #949aa1; --line: #2b2f33; --brand: #f0b54a; --brand-strong: #f6c86f; --gold: #e19921; --accent: #e19921;
  --local: #5cc27a; --local-bg: #16231a; --video-bg: #0a0c0d; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--text); color: var(--bg); padding: 8px; z-index: 100; }

/* ---------- masthead ---------- */
/* Slim fixed header (logo row + sections bar) in dark army blue, the same
   in light and dark mode; the page scrolls underneath it. The grid has two
   equal side columns so the logo sits exactly in the centre. */
.site-head { --head-bg: #1f2d3d; --head-bg-2: #18232f; --head-text: #eef1f4; --head-muted: #a9b4c0;
  position: sticky; top: 0; z-index: 30; background: var(--head-bg); color: var(--head-text);
  border-top: 3px solid var(--gold); box-shadow: 0 2px 10px rgba(0, 0, 0, .22); }
.masthead { background: transparent; }
.masthead-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px 16px 10px; }  /* breathing room around the logo (user request) */
.masthead-center { display: flex; flex-direction: column; align-items: center; }
/* Full-width line between the logo row and the sections: date + weather, centred */
.head-strip { border-top: 1px solid rgba(255, 255, 255, .12); background: rgba(0, 0, 0, .12); }
.head-strip-inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 22px; padding: 6px 16px; min-height: 40px; }
.head-date { color: var(--head-muted); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.head-strip .wx-chips { display: flex; }
/* desktop: the date sits right of the menu button, the weather alone in the strip under the logo */
.head-date-strip { display: none; }
.masthead-left .head-date { overflow: hidden; text-overflow: ellipsis; }
.logo { display: flex; align-items: center; justify-self: center; color: var(--head-text); }
.logo:hover { color: var(--head-text); }
.logo-img { height: 46px; width: auto; }
/* Optical centring: the artwork's visual weight (the lettering) sits ~9% right
   of the image centre, so the image is nudged left; the date stays centred. */
.site-head .logo-img { height: 60px; }  /* Crónicas del Valle wordmark (6:1), centred */
.site-head .icon-btn { color: var(--head-text); }
.site-head .icon-btn:hover { background: rgba(255, 255, 255, .1); }
.site-head .search-form input { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: var(--head-text); }
.site-head .search-form input::placeholder { color: var(--head-muted); }
.site-head .wx-chips { gap: 12px; color: var(--head-text); }
.site-head .wx-chips:hover { color: var(--head-text); }
.site-head .wx-chips:hover .wx-chip-place { color: var(--gold); }
.site-head .wx-chip-temp { font-size: 1.05rem; }
.site-head .wx-chip-place { font-size: .68rem; }
.site-head .wx-chip-place small { color: var(--head-muted); font-size: .64rem; }
.site-head .wx-chip .wx-icon { width: 20px; height: 20px; }
.logo-for-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-for-light { display: none; } :root:not([data-theme="light"]) .logo-for-dark { display: block; } }
:root[data-theme="dark"] .logo-for-light { display: none; }
:root[data-theme="dark"] .logo-for-dark { display: block; }
.logo-text { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; letter-spacing: -.5px; white-space: nowrap; }
.masthead-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.search-form input { width: 180px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft); color: var(--text); font: inherit; font-size: .9rem; }
.icon-btn { background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; border-radius: 50%; display: inline-flex; }
.icon-btn:hover { background: var(--bg-soft); }

.sections-nav { background: var(--head-bg-2); border-top: 1px solid rgba(255, 255, 255, .08); }
.sections-nav ul { list-style: none; margin: 0 auto; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.sections-nav ul::-webkit-scrollbar { display: none; }
.sections-nav a { display: block; padding: 7px 10px 5px; font-size: .84rem; font-weight: 600; white-space: nowrap; color: var(--head-muted); border-bottom: 3px solid transparent; }
.sections-nav a:hover, .sections-nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }
.sections-nav a.nav-local { color: #8fd8a6; }
.sections-nav a.nav-zone { color: var(--head-text); }
.sections-nav a.nav-home { color: var(--head-text); }
/* anchors and focused elements must not hide under the fixed header */
html { scroll-padding-top: 166px; }

/* ---------- drawer ---------- */
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); background: var(--surface); z-index: 50; overflow-y: auto; box-shadow: 4px 0 24px rgba(0,0,0,.2); padding: 16px; }
.drawer[hidden], .drawer-backdrop[hidden] { display: none; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer-head .logo-text { font-size: 1.4rem; }
.drawer ul { list-style: none; padding: 0; margin: 0; }
.drawer li a { display: block; padding: 11px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.drawer-search input { width: 100%; padding: 9px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); color: var(--text); font: inherit; }

/* ---------- ticker ---------- */
.ticker { display: flex; align-items: stretch; margin: 16px 0; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.ticker-label { background: var(--gold); color: #141414; font-weight: 700; font-size: .8rem; text-transform: uppercase; padding: 8px 12px; white-space: nowrap; display: flex; align-items: center; }
/* one headline at a time, the latest 10 rotating every 5 s (site.js) */
.ticker-items { position: relative; flex: 1; min-width: 0; min-height: 38px; }
.ticker-items a { position: absolute; left: 12px; right: 12px; top: 50%; font-size: .9rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; visibility: hidden; transform: translateY(calc(-50% + 8px));
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; }
/* the old headline leaves first, the new one comes in after it (never overlapping) */
.ticker-items a.is-on { opacity: 1; visibility: visible; transform: translateY(-50%);
  transition: opacity .35s ease .25s, transform .35s ease .25s, visibility 0s linear .25s; }
@media (max-width: 760px) {
  .ticker-label { font-size: .7rem; padding: 6px 8px; }
  .ticker-items { min-height: 44px; }
  .ticker-items a { left: 10px; right: 10px; font-size: .84rem; line-height: 1.25; white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
@media (prefers-reduced-motion: reduce) { .ticker-items a, .ticker-items a.is-on { transition: none; } }

/* ---------- layout ---------- */
main { padding-bottom: 32px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; margin-top: 8px; }
.main-col { min-width: 0; align-self: start; }
.rail { min-width: 0; align-self: start; }
.grid { display: grid; gap: 20px; margin: 20px 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- cards ---------- */
.card-link { display: block; color: inherit; }
.card-link:hover .card-title, .card-link:hover .hero-title, .row-link:hover .row-title { color: var(--brand); }
.media { position: relative; aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; border-radius: var(--radius); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media-hero { aspect-ratio: 16 / 9; margin-top: 14px; }
.media-thumb { width: 110px; flex: 0 0 110px; aspect-ratio: 4 / 3; }
.img-fallback { width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 10px; background: linear-gradient(135deg, #1c1c1c 0%, #3b2a07 100%); }
.img-fallback span { color: var(--gold); font-family: var(--serif); font-weight: 700; font-size: 1.1rem; }
.media-thumb .img-fallback span { font-size: .75rem; }
.play-badge { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.72); color: #fff; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.card-body { padding-top: 10px; }
.kicker { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--brand); margin-bottom: 4px; }
.kicker-local { color: var(--local); }
.card-title { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; line-height: 1.25; }
.card-lg .card-title { font-size: 1.5rem; }
.card-sm .card-title { font-size: 1rem; }
.card-summary { color: var(--text-soft); font-size: .93rem; margin: 6px 0 0; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.source { font-weight: 700; color: var(--text-soft); }

.hero { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.hero-title { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.12; letter-spacing: -.5px; margin-top: 2px; }
.hero-summary { font-size: 1.08rem; color: var(--text-soft); margin: 10px 0 0; }

.row-item + .row-item { border-top: 1px solid var(--line); }
.row-link { display: flex; gap: 12px; padding: 12px 0; }
.row-title { font-family: var(--serif); font-size: 1rem; line-height: 1.25; font-weight: 700; }

/* ---------- blocks ---------- */
.block { margin: 32px 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; border-top: 3px solid var(--text); padding-top: 8px; }
.block-head h2 { font-family: var(--sans); font-size: 1.15rem; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; }
.more { font-size: .85rem; font-weight: 700; color: var(--brand); }
.block-feature { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; margin-top: 16px; }
.block-local { background: var(--local-bg); padding: 16px; border-radius: var(--radius); }
.block-local .block-head { border-top-color: var(--local); }
.block-local .block-head h2 a { color: var(--local); }
.block-local-main { margin-top: 24px; padding: 18px; border: 2px solid var(--local); }
.block-local-main .block-head h2 { font-size: 1.4rem; }
.block-cordoba .block-head { border-top-color: var(--gold); }
.credit { font-size: .8rem; color: var(--muted); margin: 6px 0 14px; }
.article-body p { font-family: var(--serif); font-size: 1.12rem; line-height: 1.7; margin: 0 0 1.1em; }
.block-videos { background: var(--video-bg); color: var(--video-text); padding: 16px; border-radius: var(--radius); }
.block-videos .block-head { border-top-color: var(--accent); }
.block-videos .card-meta, .block-videos .source { color: #b9bfc5; }

/* ---------- rail ---------- */
.rail-box { border-top: 3px solid var(--accent); padding-top: 10px; margin-bottom: 28px; }
.rail-local { border-top-color: var(--local); }
.rail-title { font-size: 1rem; font-weight: 800; text-transform: uppercase; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.latest { list-style: none; padding: 0; margin: 0; }
.latest li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.latest time { display: block; font-size: .74rem; font-weight: 700; color: var(--brand); }
.latest a { font-weight: 600; font-size: .93rem; line-height: 1.3; }
.ranked { padding: 0; margin: 0; list-style: none; counter-reset: rank; }
.ranked li { counter-increment: rank; display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: .93rem; }
.ranked li::before { content: counter(rank); font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--brand); line-height: 1; min-width: 22px; }

/* ---------- article ---------- */
.crumbs { font-size: .82rem; color: var(--muted); margin: 18px 0 10px; }
.crumbs a { color: var(--brand); font-weight: 600; }
.article-title { font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1.12; letter-spacing: -.5px; }
.article-lead { font-size: 1.18rem; color: var(--text-soft); margin: 14px 0; line-height: 1.45; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--muted); padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.article-figure { margin: 18px 0; }
.article-figure img { width: 100%; border-radius: var(--radius); }
.article-figure figcaption { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; margin: 18px 0; background: #000; border-radius: var(--radius); overflow: hidden; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.read-original { display: inline-block; margin: 18px 0 8px; padding: 12px 18px; background: var(--text); color: var(--bg); font-weight: 700; border-radius: var(--radius); }
.read-original:hover { background: var(--brand); color: var(--bg); }

/* ---------- lists / pages ---------- */
.page-head { margin: 22px 0 4px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 3px solid var(--text); padding-bottom: 10px; }
.page-head h1 { font-family: var(--serif); font-size: 2rem; }
.page-search { display: flex; gap: 6px; }
.page-search input { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; min-width: 220px; }
.page-search button, .btn { background: var(--text); color: var(--bg); border: 0; padding: 8px 14px; border-radius: var(--radius); font: inherit; font-weight: 700; cursor: pointer; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn-sm { padding: 4px 8px; font-size: .8rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 24px 0; font-weight: 600; }
.pager a { color: var(--brand); }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.empty h1 { font-family: var(--serif); color: var(--text); margin-bottom: 10px; }
.empty a { color: var(--brand); font-weight: 700; }

/* ---------- footer ---------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 28px 0 12px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 28px; }
.footer h3 { font-size: .85rem; text-transform: uppercase; margin-bottom: 8px; }
.footer-logo { height: 60px; margin-bottom: 8px; }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; font-size: .9rem; }
.footer-links li { padding: 2px 0; }
.footer-contact { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--gold); background: var(--surface); border-radius: var(--radius); }
.footer-contact h3 { margin-bottom: 4px; color: var(--text-soft); }
.footer-mail { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.footer-mail:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 12px; font-size: .8rem; }

/* ---------- admin ---------- */
.admin-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.admin-head-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.admin-head .logo-text { font-size: 1.3rem; }
.admin-nav { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: .9rem; }
.admin-nav form { margin: 0; }
.admin-main { padding-top: 20px; }
.admin-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat-num { display: block; font-size: 1.25rem; font-weight: 800; }
.stat-label { color: var(--muted); font-size: .8rem; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; overflow-x: auto; }
.panel h2 { font-size: 1.1rem; margin-bottom: 12px; }
.settings-form label, .login-box label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
.settings-form input, .login-box input, .filters input, .filters select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; }
.filters { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.filters input { flex: 1 1 260px; width: auto; margin: 0; }
.filters select { width: auto; margin: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 12px; }
.table th, .table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; }
.table tr.disabled { opacity: .5; }
.table .actions { display: flex; gap: 6px; }
.table .actions form { margin: 0; }
.good { color: var(--local); font-weight: 700; }
.bad { color: var(--accent); font-weight: 700; }
.alert { background: var(--local-bg); border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--radius); margin: 0 0 14px; }
.alert-error { background: #fdecea; color: #8a1c0b; }
.photo-cell { min-width: 210px; max-width: 240px; }
.photo-cell small { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.admin-thumb { width: 120px; height: 75px; object-fit: cover; border-radius: 3px; background: var(--bg-soft); }
.photo-form { display: flex; gap: 4px; margin: 6px 0 4px; }
.photo-form input { min-width: 0; flex: 1; padding: 4px 6px; font: inherit; font-size: .78rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.login-box { max-width: 360px; margin: 60px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.login-box h1 { font-size: 1.4rem; margin-bottom: 16px; }

/* Home rail on desktop: "Últimas noticias" is trimmed so the rail ends with the
   Punilla block (site.js fits it; without JS show 5). Phones keep the full list. */
@media (min-width: 1001px) {
  .latest[data-fit-rail]:not(.is-fitted) li:nth-child(n+6) { display: none; }
  .latest[data-fit-rail] li[hidden] { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .masthead-inner { padding: 10px 8px 8px; gap: 8px; }
  .search-form { display: none; }
  .logo-img { height: 36px; }
  .site-head .logo-img { height: 34px; }  /* 6:1 wordmark: ~207px wide, clears the menu and theme buttons */
  html { scroll-padding-top: 160px; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .block-feature { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .card-lg .card-title { font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .media-thumb { width: 92px; flex-basis: 92px; }
}

/* ---------- weather ---------- */
.masthead-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wx-icon { flex: none; }
.wx-sun circle { fill: var(--gold); }
.wx-sun line { stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; }
.wx-moon { fill: #9aa7c7; }
.wx-cloud { fill: #c9ced6; stroke: #8f97a3; stroke-width: 1.5; }
.wx-drop line { stroke: #3d8ee6; stroke-width: 2.6; stroke-linecap: round; }
.wx-bolt { fill: var(--gold); }
.wx-snow circle { fill: #8fc3f2; }
.wx-fog line { stroke: #8f97a3; stroke-width: 2.4; stroke-linecap: round; }
.wx-chips { display: flex; gap: 14px; color: var(--text); }
.wx-chips:hover { color: var(--text); }
.wx-chips:hover .wx-chip-place { color: var(--brand); }
.wx-chip { display: inline-flex; align-items: center; gap: 6px; }
.wx-chip-temp { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; line-height: 1; }
.wx-chip-place { display: flex; flex-direction: column; font-size: .74rem; font-weight: 700; line-height: 1.15; }
.wx-chip-place small { font-weight: 500; color: var(--muted); font-size: .7rem; }
.wx-chips-mobile { display: none; }
/* the whole strip is one link: children never catch the tap (some mobile
   browsers drop taps that land on SVG icons inside a link) */
.wx-chips * { pointer-events: none; }
.wx-chips { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: rgba(225, 153, 33, .25); }

.wx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.wx-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; box-shadow: var(--shadow);
  background-image: linear-gradient(160deg, rgba(225,153,33,.10), transparent 55%); }
.wx-card-night { background-image: linear-gradient(160deg, rgba(70,90,150,.16), transparent 60%); }
.wx-card-main { border: 2px solid var(--gold); }
.wx-card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.wx-card-head h2 { font-family: var(--serif); font-size: 1.35rem; }
.wx-zone { font-size: .72rem; text-transform: uppercase; letter-spacing: .4px; font-weight: 800; color: var(--local); }
.wx-now { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.wx-temp { font-family: var(--serif); font-size: 3.4rem; font-weight: 700; line-height: 1; }
.wx-now-detail { display: flex; flex-direction: column; font-size: .85rem; color: var(--text-soft); gap: 2px; }
.wx-now-detail strong { color: var(--text); font-size: .98rem; }
.wx-days { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; text-align: center; }
.wx-days li { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .8rem; }
.wx-day { font-weight: 800; color: var(--text-soft); }
.wx-range b { font-weight: 800; }
.wx-rain { color: #2f7fd6; font-weight: 700; font-size: .72rem; }


/* Consulta catastral popup: fades and rises in, sinks out (site.js toggles .is-open) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.catastro-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 20px 22px; border: 0; border-top: 4px solid var(--gold);
  border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 18px 50px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(18px) scale(.97);
  transition: opacity .26s ease, transform .32s cubic-bezier(.2, .8, .2, 1); }
.catastro-dialog.is-open { opacity: 1; transform: none; }
.catastro-dialog::backdrop { background: rgba(10, 12, 14, .62); opacity: 0; transition: opacity .26s ease; }
.catastro-dialog.is-open::backdrop { opacity: 1; }
.catastro-result > * { animation: dp-rise .3s ease both; }
.catastro-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.catastro-head h2 { margin: 0; font-family: var(--serif); font-size: 1.35rem; }
.catastro-close { background: none; border: 0; color: var(--muted); font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.catastro-close:hover { color: var(--text); }
.catastro-help { margin: 0 0 12px; font-size: .9rem; color: var(--text-soft); }
.catastro-form { display: flex; gap: 8px; }
.catastro-form input { flex: 1; min-width: 0; padding: 10px 12px; font: inherit; font-size: 1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--text); }
.catastro-form button { padding: 10px 18px; font: inherit; font-weight: 800; border: 0; border-radius: var(--radius); background: var(--gold); color: #141414; cursor: pointer; }
.catastro-form button:disabled { opacity: .6; cursor: progress; }
.catastro-result { margin-top: 14px; }
.catastro-result:empty { display: none; }
.catastro-msg { margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--bg-soft); font-size: .92rem; }
.catastro-msg.is-error { border-left: 3px solid #d61f1f; }
.catastro-card { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.catastro-card + .catastro-card { margin-top: 10px; }
.catastro-card h3 { margin: 0 0 8px; font-size: 1.02rem; }
.catastro-card dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 0; font-size: .9rem; }
.catastro-card dt { color: var(--muted); }
.catastro-card dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.catastro-source { margin: 14px 0 0; font-size: .74rem; color: var(--muted); }
@media (max-width: 520px) {
  .catastro-dialog { padding: 16px; }
  .catastro-card dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .catastro-card dd { margin-bottom: 6px; }
}
.padron-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; margin-bottom: 26px; border-radius: 8px;
  background: linear-gradient(140deg, #141414 0%, #2d2208 100%); color: #f4f4f0; border-left: 5px solid var(--gold); }
.padron-card:hover { color: #fff; }
.padron-card-kicker { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--gold); }
.padron-card strong { font-family: var(--serif); font-size: 1.45rem; }
.padron-card span { font-size: .9rem; color: #d9d9d4; }
.padron-card .padron-card-cta { color: var(--gold); font-weight: 800; }
/* rail call-to-action cards: padrón (gold), festivales (pink), catastro (green) */
.rail-ctas { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.rail-ctas .padron-card { margin-bottom: 0; }
.padron-card.cta-fest { background: linear-gradient(140deg, #141414 0%, #2e0b1f 100%); border-left-color: #ec7fbd; }
.padron-card.cta-fest .padron-card-kicker, .padron-card.cta-fest .padron-card-cta { color: #f4a6d2; }
.padron-card.cta-catastro { background: linear-gradient(140deg, #141414 0%, #082a1a 100%); border-left-color: #62d394; }
.padron-card.cta-catastro .padron-card-kicker, .padron-card.cta-catastro .padron-card-cta { color: #93e3b5; }
@media (max-width: 760px) {
  /* phone: smaller cards, no description line */
  .rail-ctas { gap: 8px; margin-bottom: 20px; }
  .rail-ctas .padron-card { padding: 10px 12px; gap: 2px; border-left-width: 4px; }
  .rail-ctas .padron-card strong { font-size: 1.1rem; }
  .rail-ctas .padron-card span:not(.padron-card-kicker):not(.padron-card-cta) { display: none; }
  .rail-ctas .padron-card-kicker { font-size: .64rem; }
  .rail-ctas .padron-card-cta { font-size: .82rem; }
}
.footer-links-single { columns: 1; margin-bottom: 10px; }

@media (max-width: 1000px) { .wx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .wx-grid { grid-template-columns: minmax(0, 1fr); }
}
.deg { font-family: var(--sans); font-weight: 600; font-size: .6em; vertical-align: .45em; margin-left: 1px; }

/* ---------- live TV ---------- */
.live-badge { display: inline-flex; align-items: center; gap: 6px; background: #d61f1f; color: #fff; font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 3px; white-space: nowrap; vertical-align: middle; }
.live-badge .live-dot { background: #fff; width: 7px; height: 7px; }
.live-box { margin-bottom: 26px; border-top: 3px solid #d61f1f; padding-top: 10px; }
.live-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.live-name { font-weight: 800; font-size: .92rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-expand { font-size: .78rem; font-weight: 700; color: var(--brand); white-space: nowrap; }
.live-slot { aspect-ratio: 16 / 9; background: #000; border-radius: 6px; }
.live-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.live-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-float { position: relative; }
.live-float-close { display: none; }
.live-float.is-floating { position: fixed; right: 18px; bottom: 18px; width: 380px; z-index: 60; box-shadow: 0 10px 34px rgba(0,0,0,.4); border-radius: 8px;
  animation: live-pop .2s ease-out; }
.live-float.is-floating .live-float-close { display: flex; align-items: center; justify-content: center; position: absolute; top: -12px; right: -12px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%; border: 0; background: #141414; color: #fff; font-size: 1.1rem; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
@keyframes live-pop { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .live-float.is-floating { animation: none; } }
.live-note { font-size: .74rem; color: var(--muted); margin: 6px 0 0; }
.live-page { max-width: 980px; margin: 18px auto 10px; }
.live-page .live-frame { border-radius: 8px; box-shadow: var(--shadow); }
.page-head h1 .live-badge { font-family: var(--sans); font-size: .8rem; margin-right: 6px; }
.sections-nav a.nav-live { color: #ff6b6b; display: flex; align-items: center; gap: 6px; }
.sections-nav a.nav-live .live-dot { background: #ff6b6b; width: 7px; height: 7px; }
.live-banner { display: none; }
@media (max-width: 1000px) {
  .rail .live-box { display: none; }
  .live-mobile-slot.has-player { margin-top: 14px; }
  .live-mobile-slot .live-box { margin-bottom: 4px; }
  .live-float.is-floating { width: min(64vw, 300px); right: 12px; bottom: 12px; }
  .live-float.is-floating .live-float-close { top: -10px; right: -6px; }
  .live-banner { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 10px 12px; border-radius: 6px;
    background: #141414; color: #f4f4f0; }
  .live-banner:hover { color: #fff; }
  .live-banner-text { flex: 1; font-size: .9rem; }
  .live-banner-cta { color: var(--gold); font-weight: 800; white-space: nowrap; }
}

/* ---------- sponsors (auspiciantes) ---------- */
.sponsor-card { position: relative; margin-bottom: 28px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.sponsor-card.sponsor-dark { background: radial-gradient(circle at 50% 35%, #2a1012 0%, #121212 70%); border-color: #2a2a2a; }
.sponsor-label { position: absolute; top: 8px; left: 10px; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #a8a8a2; }
.sponsor-link { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px 14px; text-align: center; color: #f4f4f0; }
.sponsor-link img { width: 100%; max-width: 220px; height: auto; transition: transform .2s ease; }
.sponsor-link:hover img { transform: scale(1.03); }
.sponsor-tagline { font-family: var(--serif); font-style: italic; font-size: .9rem; color: #d9d9d4; }
.sponsor-cta { font-size: .8rem; font-weight: 800; color: #ff5a6a; }
.sponsor-link:hover .sponsor-cta { color: #fff; }
.sponsor-card:not(.sponsor-dark) .sponsor-link, .sponsor-card:not(.sponsor-dark) .sponsor-tagline { color: var(--text-soft); }
.sponsor-strip { background: #121212; border-bottom: 1px solid #2a2a2a; margin: -28px 0 24px; }
.sponsor-strip-inner { display: flex; align-items: center; gap: 18px; padding-top: 10px; padding-bottom: 10px; }
.sponsor-strip-title { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #a8a8a2; white-space: nowrap; }
.sponsor-strip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.sponsor-strip-list img { height: 54px; width: auto; opacity: .9; transition: opacity .2s; }
.sponsor-strip-list a:hover img { opacity: 1; }
@media (max-width: 1000px) {
  .sponsor-card { max-width: 420px; margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) { .sponsor-link img { transition: none; } }

/* ---------- admin: visitas ---------- */
.visits-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 14px; }
.visits-head h1 { font-size: 1.5rem; margin: 0; }
.range-tabs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.range-tabs a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; font-weight: 600; }
.range-tabs a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.day-chart { display: block; width: 100%; height: 180px; margin-top: 10px; }
.day-chart .bar { fill: var(--accent); }
.day-chart .bar:hover { fill: var(--brand); }
.day-chart-axis { display: flex; justify-content: space-between; margin-top: 4px; }
.visits-map { height: 420px; border-radius: var(--radius); border: 1px solid var(--line); margin: 10px 0 8px; z-index: 0; }
.visits-grid { margin-top: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 760px) { .visits-map { height: 320px; } .visits-grid { grid-template-columns: minmax(0, 1fr); } }

/* live status: red pulsing only when really on air */
.live-badge[data-status="replay"] { background: #4a4f55; }
.live-badge[data-status="offline"], .live-badge[data-status="unknown"] { background: #6b7178; }
.live-badge:not([data-status="live"]) .live-dot { animation: none; border-radius: 1px; width: 0; height: 0; background: none;
  border-left: 7px solid #fff; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.live-badge[data-status="offline"] .live-dot, .live-badge[data-status="unknown"] .live-dot { display: none; }
.sections-nav a.nav-live:not([data-status="live"]) { color: inherit; }
.sections-nav a.nav-live:not([data-status="live"]) .live-dot { animation: none; background: var(--muted); }
.live-box:has(.live-badge:not([data-status="live"])) { border-top-color: #6b7178; }

.photo-credit { font-size: .72rem; color: var(--muted); margin: 6px 0 0; }

/* admin visits map: numbered markers coloured by visits (yellow → dark red) */
.map-levels { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip { font: inherit; font-size: .82rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.visit-marker { display: flex !important; align-items: center; justify-content: center; border-radius: 50%; font: 800 12px/1 var(--sans);
  color: #1b1b1b; border: 2px solid rgba(255,255,255,.9); box-shadow: 0 1px 4px rgba(0,0,0,.45); width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.visit-marker.vb-1 { background: #ffe08a; }
.visit-marker.vb-2 { background: #fdb04b; width: 34px; height: 34px; margin: -17px 0 0 -17px; }
.visit-marker.vb-3 { background: #f2742d; color: #fff; width: 38px; height: 38px; margin: -19px 0 0 -19px; }
.visit-marker.vb-4 { background: #d63a1f; color: #fff; width: 44px; height: 44px; margin: -22px 0 0 -22px; font-size: 13px; }
.visit-marker.vb-5 { background: #8e1414; color: #fff; width: 50px; height: 50px; margin: -25px 0 0 -25px; font-size: 14px; }
.visits-legend { background: rgba(255,255,255,.94); color: #1b1b1b; padding: 8px 10px; border-radius: 6px; font: 12px/1.6 var(--sans);
  box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.visits-legend strong { display: block; margin-bottom: 2px; }
.visits-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.2); }
.visits-swatch.vb-1 { background: #ffe08a; } .visits-swatch.vb-2 { background: #fdb04b; } .visits-swatch.vb-3 { background: #f2742d; }
.visits-swatch.vb-4 { background: #d63a1f; } .visits-swatch.vb-5 { background: #8e1414; }

/* admin: AI keys */
.keys-title { font-size: 1.4rem; margin: 0 0 6px; }
.keys-form { display: grid; grid-template-columns: 1.2fr 1fr 1.6fr auto; gap: 10px; align-items: end; margin: 14px 0 6px; }
.keys-form label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 700; }
.keys-form input, .keys-form select { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.key-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.key-actions { display: flex; gap: 6px; }
.key-actions form { margin: 0; }
.key-off { opacity: .6; }
.tag { display: inline-block; font-size: .7rem; font-weight: 800; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: var(--bg-soft); border: 1px solid var(--line); margin-left: 4px; }
.tag-off { background: #6b7178; color: #fff; border-color: #6b7178; }
.tag-bad { background: #b3261e; color: #fff; border-color: #b3261e; }
.btn-danger { color: #b3261e; }
progress.usage { width: 110px; height: 10px; vertical-align: middle; accent-color: #2e8b57; }
progress.usage.usage-mid { accent-color: #e19921; }
progress.usage.usage-full { accent-color: #b3261e; }
@media (max-width: 760px) { .keys-form { grid-template-columns: minmax(0, 1fr); } }

/* ---------- festivales ---------- */
.fest-section { margin-top: 22px; }
.fest-title { font-family: var(--serif); font-size: 1.4rem; border-top: 3px solid var(--gold); padding-top: 8px; margin-bottom: 12px; }
.fest-month { font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 18px 0 10px; }
.fest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.fest-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.fest-off { opacity: .7; }
.fest-media { position: relative; aspect-ratio: 16 / 9; background: var(--bg-soft); overflow: hidden; }
.fest-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }  /* portraits never stretch the card */
.fest-date { position: absolute; left: 10px; bottom: 10px; background: #1f2d3d; color: #fff; font-weight: 800; font-size: .8rem; padding: 4px 9px; border-radius: 4px; border-left: 3px solid var(--gold); }
.fest-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.fest-name { font-family: var(--serif); font-size: 1.15rem; line-height: 1.2; }
.fest-place { margin: 0; color: var(--text-soft); font-size: .88rem; }
.fest-lineup { margin: 0; font-size: .85rem; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fest-price { margin: 0; font-size: .85rem; font-weight: 700; }
.fest-link { margin-top: auto; font-weight: 700; color: var(--brand); font-size: .88rem; }
.fest-zone, .fest-status { align-self: flex-start; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 2px 7px; border-radius: 3px; }
.fest-zone { background: var(--local-bg); color: var(--local); }
.fest-zone-near { background: var(--bg-soft); color: var(--text-soft); }
.fest-status { background: #d61f1f; color: #fff; }
.fest-source { margin-top: 22px; }
.fest-source a { text-decoration: underline; }
.fest-mini { list-style: none; margin: 0; padding: 0; }
.fest-mini li + li { border-top: 1px solid var(--line); }
.fest-mini a { display: flex; flex-direction: column; padding: 8px 0; font-size: .9rem; }
.fest-mini-date { font-size: .72rem; font-weight: 800; text-transform: uppercase; color: var(--brand); }
.fest-mini-all { display: block; margin-top: 6px; font-weight: 700; font-size: .85rem; color: var(--brand); }
.rail-title a { color: inherit; }
@media (max-width: 1000px) { .fest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .fest-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- festival posters ---------- */
.fest-media-poster img { object-position: center; }
.fest-notice { margin-top: 22px; }
.fest-notice p { margin: 0 0 8px; }
.fest-notice a { text-decoration: underline; }

/* ---------- gentle motion across the site ---------- */
@keyframes dp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dp-slide-in { from { transform: translateX(-100%); } to { transform: none; } }
main#contenido { animation: dp-rise .35s ease both; }
a, .icon-btn, .btn, .sections-nav a, .drawer li a, .fest-link, .catastro-close, .catastro-form button {
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, opacity .18s ease; }
.media img, .fest-media img { transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease; }
.card-link:hover .media img, .row-link:hover .media img, .fest-card:hover .fest-media img { transform: scale(1.035); }
.fest-card, .padron-card, .sponsor-card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.fest-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.drawer:not([hidden]) { animation: dp-slide-in .28s cubic-bezier(.2, .8, .2, 1); }
.drawer-backdrop:not([hidden]) { animation: dp-fade .25s ease; }
.btn:active, .catastro-form button:active { transform: scale(.98); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .card-link:hover .media img, .fest-card:hover .fest-media img, .fest-card:hover { transform: none; }
}

/* ---------- note locality map (Georef + OpenStreetMap) ---------- */
.loc-box .rail-title { margin-bottom: 10px; }
.loc-map { height: 190px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); z-index: 0; }
.loc-map .leaflet-control-attribution { font-size: 9px; background: rgba(255,255,255,.75); }
.loc-map .leaflet-control-zoom a { width: 26px; height: 26px; line-height: 26px; font-size: 15px; }
.loc-name { margin: 8px 0 2px; font-size: .9rem; }
.loc-more { font-weight: 700; font-size: .86rem; color: var(--brand); }
.loc-credit { margin: 6px 0 0; font-size: .72rem; color: var(--muted); }
a.places:hover { color: var(--brand); }
/* dark mode: same OSM tiles, inverted to a dark map that follows the site theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .loc-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.6); }
  :root:not([data-theme="light"]) .loc-map .leaflet-control-attribution { background: rgba(24,27,30,.8); color: #b9bec4; }
  :root:not([data-theme="light"]) .loc-map .leaflet-control-attribution a { color: #e8b04f; }
  :root:not([data-theme="light"]) .loc-map .leaflet-bar a { background: #23272b; color: #eceef0; border-color: #3a3f44; }
}
:root[data-theme="dark"] .loc-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.6); }
:root[data-theme="dark"] .loc-map .leaflet-control-attribution { background: rgba(24,27,30,.8); color: #b9bec4; }
:root[data-theme="dark"] .loc-map .leaflet-control-attribution a { color: #e8b04f; }
:root[data-theme="dark"] .loc-map .leaflet-bar a { background: #23272b; color: #eceef0; border-color: #3a3f44; }

/* phone: date on its own row, the three weather chips (La Falda, Córdoba,
   Buenos Aires) compact on one row below it */
@media (max-width: 760px) {
  .head-strip-inner { flex-direction: column; gap: 4px; padding: 5px 8px 6px; }
  .head-date { font-size: .7rem; }
  .head-strip .wx-chips { gap: 12px; }
  .head-date-top { display: none; }  /* no room beside the menu on a phone */
  .head-date-strip { display: inline; }
  .head-strip .wx-chip { gap: 4px; }
  .head-strip .wx-icon { width: 20px; height: 20px; }
  .head-strip .wx-chip-temp { font-size: 1.05rem; }
  .head-strip .wx-chip-place { font-size: .66rem; white-space: nowrap; }
  .head-strip .wx-chip-place small { font-size: .62rem; white-space: nowrap; }
}
@media (max-width: 360px) {
  .head-strip .wx-icon { display: none; }
}

/* Admin: hand-written note editor */
.note-editor { max-width: 860px; }
.note-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
.note-form input[type=text], .note-form input[type=url], .note-form input[type=datetime-local],
.note-form input[type=file], .note-form select, .note-form textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; font-weight: 400; }
.note-form textarea { resize: vertical; line-height: 1.5; }
.note-form label.radio { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-bottom: 8px; }
.note-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photo-modes { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 4px; margin: 0 0 16px; }
.photo-modes legend { font-weight: 700; padding: 0 6px; }
.photo-modes .pm { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.photo-modes:has(#m-subir:checked) .pm-subir, .photo-modes:has(#m-commons:checked) .pm-commons { display: block; }
.note-current { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.note-actions { display: flex; gap: 10px; margin-top: 8px; }
.note-delete { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 640px) {
  .note-row { grid-template-columns: 1fr; }
  .admin-head-inner { height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .admin-nav { flex-wrap: wrap; gap: 10px; }
}

/* ---------- "sitio en desarrollo" notice (DIARIO_DEV_BANNER) ----------
   Fixed in the middle of the screen while scrolling. Translucent and
   click-through (except the email link) so the news underneath stays usable;
   below the drawer (40) and the floating live player (60). */
.dev-banner { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 35;
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 10px; background: rgba(176, 106, 0, .9); color: #fff;
  font-weight: 600; font-size: .95rem; line-height: 1.35; text-align: center;
  box-shadow: 0 8px 28px rgba(0,0,0,.3); pointer-events: none; }
.dev-banner a { color: #fff; text-decoration: underline; pointer-events: auto; overflow-wrap: anywhere; }
@media (max-width: 600px) { .dev-banner { font-size: .85rem; padding: 10px 14px; } }
@media print { .dev-banner { display: none; } }

/* ---------- admin: social networks (app/social/) ---------- */
.tag-ok { background: #1e7a46; color: #fff; border-color: #1e7a46; }
.alert-warn { background: #fff4d6; color: #5c4400; border-color: #e7c66a; }
.social-accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.social-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.social-card h3 { font-size: 1rem; margin-bottom: 8px; }
.social-card p { margin: 0 0 6px; }
.social-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 8px; }
.social-actions form { margin: 0; }
.page-pick { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.page-pick h3 { font-size: 1rem; margin-bottom: 8px; }
.settings-form label.radio, .settings-form label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.settings-form label.radio input, .settings-form label.check input { width: auto; margin: 3px 0 0; flex: none; }
.settings-form select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; }
.social-settings fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 4px; margin: 0 0 14px; min-width: 0; }
.social-settings legend { font-weight: 800; padding: 0 6px; }
.social-nets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.social-steps { padding-left: 20px; margin: 12px 0; line-height: 1.6; }
.social-steps li { margin-bottom: 8px; }
.social-steps code, .panel code { overflow-wrap: anywhere; }
.soc-status { font-weight: 700; white-space: nowrap; }
.soc-publicado { color: var(--local); }
.soc-error { color: #b3261e; }
.soc-reintento, .soc-aprobacion { color: #a05a00; }
.soc-cancelado { color: var(--muted); }
.social-text { white-space: pre-wrap; font: inherit; background: var(--bg-soft); padding: 10px; border-radius: var(--radius); }
.social-img { max-width: 100%; width: 360px; border-radius: var(--radius); border: 1px solid var(--line); }
.filters label.small { display: flex; align-items: center; gap: 6px; }
.filters label.small input { flex: none; width: auto; }
.static-page { max-width: 760px; margin: 24px auto 40px; line-height: 1.65; }
.static-page h1 { margin-bottom: 14px; }
.static-page h2 { font-size: 1.2rem; margin: 22px 0 8px; }
.static-page ul { padding-left: 20px; }
@media (max-width: 760px) { .social-accounts, .social-nets { grid-template-columns: minmax(0, 1fr); } }

/* Redes → Configuración: notice after saving, next to the form and the button */
#configuracion { scroll-margin-top: 16px; }
.alert-ok { background: #e6f4ea; color: #14532d; border-color: #9fd3ae; }
.cfg-notice { font-weight: 600; }
.cfg-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cfg-saved { color: #14532d; background: #e6f4ea; border: 1px solid #9fd3ae; border-radius: var(--radius); padding: 6px 10px; font-weight: 600; }
.cfg-failed { color: #8a1c0b; background: #fdecea; border-radius: var(--radius); padding: 6px 10px; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .alert-ok, :root:not([data-theme="light"]) .cfg-saved { background: #12331f; color: #b7ebc6; border-color: #2f6b43; }
  :root:not([data-theme="light"]) .cfg-failed { background: #3a1410; color: #f5b8ae; }
}
:root[data-theme="dark"] .alert-ok, :root[data-theme="dark"] .cfg-saved { background: #12331f; color: #b7ebc6; border-color: #2f6b43; }
:root[data-theme="dark"] .cfg-failed { background: #3a1410; color: #f5b8ae; }

/* Note page, one column: the «Dónde» map between the note and «Más de…» (moved by site.js) */
.loc-slot:empty { display: none; }
.loc-slot .loc-box { margin: 26px 0 30px; }
