/* Layout: header de marquesina, selector de ciudades en rejilla, pestañas por tipo y tarjetas en columnas que se apilan en móvil */
:root {
  /* Look único: negro difuminado con resplandor vino, a pedido del usuario */
  --bg: #0b0809;
  --bg-glow: rgba(142, 27, 51, .28);
  --surface: rgba(30, 24, 27, .82);
  --ink: #f2e9ec;
  --muted: #a8989e;
  --line: #2f2629;
  --accent: #d24a66;
  --accent-ink: #ffffff;
  --gold: #d2a75a;
  --danger: #ff8a80;
  --ok: #7fcf9c;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 10px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { min-height: 100vh; background: radial-gradient(ellipse 90% 60% at 50% -10%, var(--bg-glow), transparent 70%), radial-gradient(ellipse 70% 50% at 100% 100%, rgba(255,255,255,.04), transparent 70%), linear-gradient(180deg, #161113 0%, var(--bg) 55%, #050404 100%); background-color: var(--bg); background-attachment: fixed; color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; padding-block: 0 48px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; line-height: 1.1; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 20px 8px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 10px; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; }
.brand h1 { font-size: clamp(28px, 5vw, 40px); font-style: italic; font-weight: 700; }
.brand small { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.hero { padding-block: 28px 8px; display: grid; gap: 10px; }
.hero p { color: var(--muted); max-width: 62ch; margin: 0; font-size: 16px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

.cities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-block: 20px; }
@media (max-width: 720px) { .cities { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.city { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px 16px; cursor: pointer; display: grid; gap: 6px; transition: border-color .15s, transform .15s; }
.city:hover { border-color: var(--accent); transform: translateY(-2px); }
.city h3 { font-size: 26px; font-style: italic; }
.city .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.city .dept { font-size: 13px; color: var(--muted); }

.cityhead { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 24px 12px; }
.cityhead h2 { font-size: clamp(34px, 7vw, 56px); font-style: italic; }
.citypick { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tab { border: 0; background: none; padding: 10px 12px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.tab .n { font-family: var(--mono); font-size: 11px; color: var(--gold); margin-left: 4px; }

.sectionbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 16px; }
.sectionbar p { margin: 0; color: var(--muted); max-width: 60ch; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.cover { aspect-ratio: 16 / 10; max-width: 100%; background: var(--line); display: grid; place-items: center; overflow: hidden; }
.cover img, .cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .ph { font-family: var(--display); font-style: italic; font-size: 48px; color: var(--muted); }
.card .body { padding: 14px 16px 16px; display: grid; gap: 8px; min-width: 0; }
.card h3 { font-size: 22px; }
.card .when { font-family: var(--mono); font-size: 12px; color: var(--accent); font-variant-numeric: tabular-nums; }
.card .txt { margin: 0; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.card .kv { font-size: 13px; color: var(--muted); display: grid; gap: 2px; overflow-wrap: anywhere; }
.card .kv b { color: var(--ink); font-weight: 600; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; cursor: pointer; }
.card video { width: 100%; max-width: 100%; border-radius: 6px; }
.card .actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 4px; }
.tag { justify-self: start; display: inline-block; font-size: 11px; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--muted); }

.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px 20px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }

.subscribe { margin-top: 40px; background: linear-gradient(135deg, rgba(142,27,51,.35), rgba(20,15,17,.9)); border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius); padding: 24px 20px; display: grid; gap: 14px; }
.subscribe h2 { font-size: 28px; font-style: italic; }
.subscribe p { margin: 0; opacity: .8; max-width: 60ch; }
.subscribe form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; }
.subscribe input, .subscribe select { width: 100%; border-radius: 8px; border: 1px solid var(--line); padding: 9px 10px; background: var(--bg); color: var(--ink); }
.subscribe .btn.primary { background: var(--accent); }
.subscribe label { font-size: 12px; display: grid; gap: 4px; }
.interests { display: flex; gap: 10px; flex-wrap: wrap; grid-column: 1 / -1; font-size: 13px; }
.interests label { display: flex; gap: 4px; align-items: center; }
.interests input { width: auto; }

dialog { border: 1px solid var(--line); border-radius: var(--radius); background: #1a1417; color: var(--ink); padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgba(20, 8, 12, .55); }
.dlg { padding: 20px; display: grid; gap: 12px; }
.dlg h2 { font-size: 26px; font-style: italic; }
.field { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.field input, .field textarea, .field select { font-weight: 400; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: var(--bg); width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }
.dlg .foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.err { color: var(--danger); font-size: 13px; margin: 0; }

.admin { margin-top: 24px; border: 1px solid var(--gold); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; background: var(--surface); }
.admin h2 { font-size: 24px; font-style: italic; }
.stats { display: flex; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 10; max-width: calc(100vw - 32px); }
.notice { font-size: 13px; color: var(--muted); border-left: 3px solid var(--gold); padding: 6px 10px; background: var(--surface); }
@media (prefers-reduced-motion: reduce) { .city { transition: none; } .city:hover { transform: none; } }

/* Portada del mes */
.cover-month { position: relative; margin-top: 20px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); min-height: clamp(340px, 55vw, 480px); display: grid; align-items: end; background: #151012; }
.cover-month img.bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-month::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,4,4,0) 25%, rgba(5,4,4,.65) 60%, rgba(5,4,4,.95) 100%); }
.cover-month .cm-body { position: relative; z-index: 1; padding: 24px 20px; display: grid; gap: 8px; max-width: 70ch; }
.cover-month h2 { font-size: clamp(32px, 7vw, 60px); font-style: italic; color: #fff; }
.cover-month p { margin: 0; color: #e9dde1; font-size: 16px; white-space: pre-line; }
.cover-month .cm-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.cover-month .cm-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.cover-month.empty-cover { min-height: 0; align-items: center; border-style: dashed; }
.cover-month.empty-cover::after { display: none; }
a.btn { text-decoration: none; display: inline-block; }

/* Perfiles */
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { color: var(--accent); }
.txt.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.prof-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 28px; align-items: start; }
@media (max-width: 720px) { .prof-grid { grid-template-columns: 1fr; } }
.prof-photo { aspect-ratio: 4 / 5; max-width: 100%; border-radius: 14px; overflow: hidden; background: #151012; border: 1px solid var(--line); display: grid; place-items: center; }
.prof-photo img { width: 100%; height: 100%; object-fit: cover; }
.prof-photo .ph { font-family: var(--display); font-style: italic; font-size: 96px; color: var(--muted); }
.prof-info { display: grid; gap: 12px; min-width: 0; }
.prof-info h2 { font-size: clamp(36px, 7vw, 60px); font-style: italic; }
.prof-info .kv { font-size: 15px; gap: 4px; }
.prof-info .txt { white-space: pre-line; overflow-wrap: anywhere; margin: 0; font-size: 16px; max-width: 65ch; }
h3.sub { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 400; margin-bottom: 6px; }
.prof-section { margin-top: 32px; display: grid; gap: 10px; }
.prof-video { width: 100%; max-width: 720px; border-radius: 10px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.keep { display: flex; flex-wrap: wrap; gap: 8px; }
.keep label { position: relative; display: block; }
.keep img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; display: block; }
.keep input { position: absolute; top: 4px; left: 4px; }
.check { display: flex; gap: 6px; align-items: center; font-size: 13px; }
fieldset.acct { border: 1px solid var(--gold); border-radius: 10px; padding: 12px; display: grid; gap: 10px; margin: 0; }
fieldset.acct legend { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); padding: 0 6px; }
.rowbtns { white-space: nowrap; }
.rowbtns .btn + .btn { margin-left: 4px; }
.dlg > .btn { text-align: left; }
