/* Panel de Sitio. Sin librerías: tokens en :root, componentes debajo.
   Tinta y amarillo, Anybody para el logo y los
   titulares, Public Sans para el texto. Las fuentes las sirve la aplicación en /panel/fonts/. */
@font-face { font-family: Anybody; src: url(/panel/fonts/anybody.woff2) format("woff2"); font-weight: 400 900; font-stretch: 50% 150%; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(/panel/fonts/public-sans.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
:root {
  --bg: #f4f5f7; --surface: #fff; --sunken: #eef0f3; --ink: #101820; --muted: #59606b; --line: #dfe2e7; --line-strong: #c6cbd3;
  --brand: #101820; --brand-ink: #F2B705; --brand-soft: #fdf1c4; --yellow: #F2B705;
  --ok: #2b8a57; --warn: #b7791f; --danger: #b23b2e;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(30 28 20 / 0.04), 0 2px 8px rgb(30 28 20 / 0.04);
  --focus: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e141b; --surface: #17212b; --sunken: #121a22; --ink: #f3f1ea; --muted: #aeb4be; --line: #2c3642; --line-strong: #3a4552;
    --brand: #F2B705; --brand-ink: #101820; --brand-soft: #2e2a14;
    --ok: #66c792; --warn: #e3ae4d; --danger: #ec7a6c;
    --shadow: none;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1 { font-family: Anybody, "Arial Narrow", sans-serif; font-weight: 900; font-stretch: 70%; font-size: 2.2rem; line-height: 1; margin: 0; }
h2 { font-size: 1.05rem; margin: 0; }
h3 { font-size: 0.95rem; margin: 1.5rem 0 0.5rem; }
p { margin: 0 0 0.75rem; }
code, pre { font: 0.86em/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
code { overflow-wrap: anywhere; }
pre { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.75rem; overflow-x: auto; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 0.5rem; top: -3rem; background: var(--surface); padding: 0.5rem 0.8rem; border-radius: var(--radius-sm); z-index: 10; }
.skip:focus { top: 0.5rem; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
a .icon:last-of-type:not(:first-child) { width: 0.85em; height: 0.85em; margin-left: 0.2em; opacity: 0.7; }

/* ---------- barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem; height: 3.5rem; padding: 0 1rem; background: var(--yellow); color: #101820; border-bottom: 3px solid #101820; }
.topbar :focus-visible { box-shadow: 0 0 0 3px #101820; }
.logo { display: inline-flex; font-size: 1.95rem; line-height: 0; color: #101820; text-decoration: none; } /* SVG en línea (Host.logo) */
.logo svg { display: block; }
/* Sitio solo: el nombre de la web en lugar del logo */
.logo-text { font-family: Anybody, "Arial Narrow", sans-serif; font-weight: 900; font-stretch: 70%; font-size: 1.5rem; line-height: 1; }
.top-links { display: flex; gap: 1.1rem; align-items: center; font-size: 0.92rem; }
.top-links a, .top-links .link { color: #101820; font-weight: 600; text-decoration: none; }
.top-links a:hover, .top-links .link:hover { text-decoration: underline; }

@media (max-width: 40rem) { .top-links .hide-sm { display: none; } }

.wrap { max-width: 64rem; margin: 0 auto; padding: 1.75rem 1rem 4rem; }
.main-wide { padding: 0; }

/* ---------- panel de una web: barra lateral + contenido ---------- */
.shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; max-width: 76rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.side { position: sticky; top: 5rem; align-self: start; }
.side-back { display: inline-block; font-size: 0.88rem; margin-bottom: 0.8rem; text-decoration: none; }
.side-site { display: flex; gap: 0.7rem; align-items: center; margin-bottom: 1.2rem; }
.side-site > div { display: flex; flex-direction: column; min-width: 0; }
.side-site strong { line-height: 1.25; }
.side-url { font-size: 0.82rem; color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-group { margin: 1rem 0 0.3rem 0.7rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.7rem; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 500; }
.side-nav a:hover { background: var(--sunken); }
.side-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.side-nav .icon { color: var(--muted); }
.side-nav a[aria-current="page"] .icon { color: var(--brand); }
.count { margin-left: auto; min-width: 1.4rem; padding: 0 0.4rem; border-radius: 999px; background: var(--warn); color: #fff; font-size: 0.75rem; font-weight: 700; text-align: center; line-height: 1.4rem; }
.content { min-width: 0; max-width: 54rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.lead { color: var(--muted); margin: 0.35rem 0 0; max-width: 42rem; }
.head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

@media (max-width: 56rem) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-top: 1rem; }
  .side { position: static; min-width: 0; }
  .side-site { margin-bottom: 0.6rem; }
  .side-group { display: none; }
  .side-nav { display: flex; gap: 0.25rem; overflow-x: auto; margin: 0 -1rem; padding: 0 1rem 0.5rem; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .side-nav ul { display: flex; gap: 0.25rem; }
  .side-nav ul + p + ul { padding-left: 0.6rem; margin-left: 0.35rem; border-left: 1px solid var(--line); }
  .side-nav a { white-space: nowrap; padding: 0.45rem 0.65rem; }
  .count { margin-left: 0.2rem; }
}

/* ---------- tarjetas y avisos ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.9rem; }
.card-head a { font-size: 0.9rem; }
.card .intro { margin-top: -0.4rem; }
.card-foot { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
details.card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: ""; margin-left: auto; width: 0.5rem; height: 0.5rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.15s; }
details.card[open] > summary { margin-bottom: 0.9rem; }
details.card[open] > summary::after { transform: rotate(-135deg); }
details.composer-toggle > summary::after { display: none; }
details.composer-toggle:not([open]) { padding: 0; border: 0; background: none; box-shadow: none; }
details.composer-toggle[open] > summary { display: none; }
details:not(.card) > summary { cursor: pointer; color: var(--brand); font-weight: 600; margin: 0.6rem 0; width: fit-content; }
details:not(.card)[open] > summary { margin-bottom: 0.9rem; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.grid-cards .card h2 { margin-bottom: 0.8rem; }

.flash { display: flex; gap: 0.6rem; align-items: center; background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--line)); padding: 0.7rem 1rem; border-radius: var(--radius-sm); margin: 0 0 1rem; }
.flash::before { content: "✓"; font-weight: 800; color: var(--ok); }
.flash.warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.flash.warn::before { content: "!"; color: var(--warn); }
.errors { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line)); border-radius: var(--radius-sm); padding: 0.7rem 1rem; margin-bottom: 1rem; }
.errors p { margin: 0; }
.errors ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); padding: 0.8rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; }
.notice p { margin: 0; }
.blank { text-align: center; padding: 1.5rem 1rem; }
.ok-line::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.notes { color: var(--muted); font-size: 0.9rem; padding-left: 1.2rem; }
.howto { padding-left: 1.2rem; color: var(--muted); font-size: 0.92rem; }
.howto li { margin-bottom: 0.2rem; }
.badge { display: inline-block; font-size: 0.74rem; font-weight: 600; padding: 0.05rem 0.5rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); text-decoration: none; white-space: nowrap; }
.badge.todo { border-color: var(--warn); color: var(--warn); }
.avatar { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; background: var(--accent, var(--brand)); color: var(--on-accent, #fff); font-weight: 700; font-size: 0.9rem; }

/* Estado: punto de color + texto */
.status { display: flex; gap: 0.65rem; align-items: flex-start; margin: 0 0 0.9rem; }
.status p { margin: 0.1rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.status strong + p { margin-top: 0.1rem; }
.status > div > p:first-child { margin-top: 0; color: var(--ink); }
.dot { flex: none; width: 0.7rem; height: 0.7rem; margin-top: 0.42rem; border-radius: 50%; border: 2px solid var(--muted); }
.status.ok .dot { background: var(--ok); border-color: var(--ok); }
.status.todo .dot { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 25%, transparent); }
.status.off { opacity: 0.75; }
.status .inline-form { margin-top: 0.5rem; }
.status-list .status { padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }

/* ---------- inicio ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.stat { display: flex; flex-direction: column; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.stat:hover { border-color: var(--line-strong); }
.stat strong { font-size: 1.6rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.88rem; }
.home { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
@media (max-width: 68rem) { .home { grid-template-columns: 1fr; } }
@media (max-width: 30rem) { .stats { gap: 0.5rem; } .stat { padding: 0.7rem; } .stat strong { font-size: 1.3rem; } }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li + li { border-top: 1px solid var(--line); }
.link-list a { display: flex; flex-direction: column; padding: 0.6rem 0.2rem; text-decoration: none; color: var(--ink); }
.link-list a:hover strong { color: var(--brand); }
.link-list small { color: var(--muted); }
.link-list.attention strong::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--warn); margin-right: 0.45rem; vertical-align: 0.1em; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li + li { border-top: 1px solid var(--line); }
.plain-list a { display: block; padding: 0.55rem 0; color: var(--ink); text-decoration: none; }
.plain-list a:hover { color: var(--brand); }

/* ---------- listas de publicaciones ---------- */
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 0.2rem; }
.item:last-child { padding-bottom: 0; }
.item-main { min-width: 0; flex: 1; }
.item-main > p { margin: 0 0 0.2rem; overflow-wrap: anywhere; }
.item-title { font-weight: 650; }
.item-meta { color: var(--muted); font-size: 0.85rem; }
.item-actions { display: flex; gap: 0.9rem; align-items: flex-start; flex-shrink: 0; font-size: 0.92rem; }
@media (max-width: 36rem) { .item { flex-direction: column; gap: 0.5rem; } }
.mention.pending { border-left: 3px solid var(--warn); padding-left: 0.8rem; }
.mention.rejected .item-main { opacity: 0.6; }
.mention .item-actions { align-items: center; }
.thumbs { display: flex; gap: 0.35rem; margin: 0.4rem 0 0; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--line); }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.1rem 0.55rem; border-radius: 999px; border: 1px solid var(--line); background: var(--sunken); color: var(--muted); font: inherit; font-size: 0.8rem; text-decoration: none; }
.chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.chip.ok::before { content: "✓"; font-weight: 700; }
.chip.error { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.chip.action { color: var(--brand); background: var(--surface); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); cursor: pointer; }
.chip.action:hover { background: var(--brand-soft); }
.photo-edit { display: flex; gap: 0.9rem; align-items: flex-start; margin-bottom: 0.9rem; }
.photo-edit img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: var(--line); flex-shrink: 0; }
.photo-edit > div { flex: 1; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.5rem; background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: var(--radius-sm); padding: 0.45rem 1rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: filter 0.12s, background 0.12s; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--surface); color: var(--brand); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--brand-soft); filter: none; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { min-height: 2rem; padding: 0.2rem 0.7rem; font-size: 0.88rem; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; display: inline-flex; align-items: center; gap: 0.3rem; }
.link.danger, a.danger { color: var(--danger); }
.inline-form { display: inline; margin: 0; }
.actions-row, .row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-top: 0.5rem; }

/* ---------- formularios ---------- */
.form fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
.form fieldset + fieldset { margin-top: 1.6rem; }
.form legend { font-weight: 700; margin-bottom: 0.7rem; padding: 0; }
.form label { display: block; margin-bottom: 0.9rem; }
.form label > span { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.form label abbr { text-decoration: none; color: var(--muted); }
.form small, .form .hint { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }
.form .hint { margin: -0.4rem 0 0.9rem; }
.form input:not([type=color], [type=checkbox], [type=radio], [type=file]), .form textarea, .form select {
  width: 100%; min-height: 2.6rem; padding: 0.5rem 0.7rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; transition: border-color 0.12s, box-shadow 0.12s;
}
.form textarea { resize: vertical; line-height: 1.5; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.form input[readonly] { background: var(--sunken); }
.form input[type=file] { font: inherit; max-width: 100%; }
.form input[type=checkbox], .form input[type=radio] { width: 1.1rem; height: 1.1rem; margin: 0.2rem 0 0; accent-color: var(--brand); flex: none; }
.form label.check { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.6rem; }
.form label.check > span { font-weight: 500; margin: 0; }
.form label.check small { margin-top: 0.15rem; }
.form .color-field { display: flex; align-items: center; gap: 0.75rem; }
.form .color-field span { margin: 0; }
.form input[type=color] { width: 3rem; height: 2.2rem; padding: 0.15rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.9rem; }
@media (max-width: 34rem) { .grid2 { grid-template-columns: 1fr; } }
.choices { display: grid; gap: 0.5rem; }
.form label.choice { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.7rem 0.85rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); margin: 0; cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.form label.choice:hover { border-color: var(--brand); }
.form label.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.form label.choice > span { margin: 0; font-weight: 400; }
.form label.choice small { margin-top: 0.1rem; }
.composer textarea { font-size: 1.02rem; }
.also { margin: 0.4rem 0 0.6rem !important; }
.also legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.also .row { gap: 1.2rem; margin: 0; }
.also label.check { margin: 0; }
details.photos { margin: 0 0 0.8rem; }
details.reveal { margin: 0.4rem 0 0.8rem; }
details.reveal > summary { list-style: none; width: fit-content; margin: 0; }
details.reveal > summary::-webkit-details-marker { display: none; }
details.reveal[open] > summary { display: none; }
.form .copy input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }
.inline-fields { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; }
.inline-fields label { flex: 1 1 16rem; margin: 0; }
.inline-fields .btn { margin-bottom: 0.05rem; }
.affix { display: flex; align-items: center; gap: 0.3rem; color: var(--muted); }
.affix input { flex: 1; min-width: 6rem; }
.affix > span { white-space: nowrap; font-size: 0.85rem; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- acceso y alta ---------- */
.auth { max-width: 27rem; margin: 1.5rem auto 0; }
.auth-wide { max-width: 40rem; }
.auth > h1 { text-align: center; margin-bottom: 1rem; }
.auth > .card { padding: 1.5rem; }
.steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem 1.2rem; list-style: none; padding: 0; margin: 0 0 1.25rem; color: var(--muted); font-size: 0.9rem; }
.steps li span { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--line-strong); margin-right: 0.25rem; font-size: 0.8rem; }
.steps a { color: inherit; }
.steps .current { color: var(--ink); font-weight: 700; }
.steps .current span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.steps .done span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.final h2 { margin-bottom: 0.6rem; }

/* ---------- administrador ---------- */
.filter { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.filter input { width: 100%; min-height: 2.4rem; padding: 0.4rem 0.7rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; }
.site-list { list-style: none; margin: 0; padding: 0; }
.site-list li { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1rem; border-top: 1px solid var(--line); }
.site-list li:first-child { border-top: 0; }
.site-list li:hover { background: var(--sunken); }
.site-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.site-name { font-weight: 650; color: var(--ink); text-decoration: none; }
.site-name::after { content: ""; position: absolute; inset: 0; }
.site-list li { position: relative; }
.site-list .badges, .site-list .ext { position: relative; z-index: 1; }
.badges { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.25rem; }
.badges:empty { display: none; }
.ext { white-space: nowrap; font-size: 0.9rem; }

/* ---------- tablas ---------- */
.table-scroll { overflow-x: auto; }
.dns, .diff { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 0.5rem 0 0.8rem; }
.dns th, .dns td, .diff th, .diff td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.dns th, .diff th { color: var(--muted); font-weight: 600; }
.diff tr.add td:last-child { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.diff tr.change td:last-child { background: color-mix(in srgb, var(--warn) 18%, transparent); }
.diff tr.remove td:last-child { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.diff tr.same { color: var(--muted); }

/* ---------- OpenStreetMap ---------- */
.osm-map { position: relative; height: 20rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #e8e4da; touch-action: none; cursor: grab; margin-bottom: 0.8rem; user-select: none; }
.osm-map[data-editable="1"] { cursor: crosshair; }
.osm-map .tiles { position: absolute; inset: 0; }
.osm-map .tiles img { position: absolute; width: 256px; height: 256px; max-width: none; }
.osm-map .pin { position: absolute; width: 18px; height: 18px; margin: -18px 0 0 -9px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--danger); border: 2px solid #fff; box-shadow: 0 1px 3px #0006; }
.osm-map .pin.other { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; transform: none; background: #3b6fb6; }
.osm-map .map-ui { position: absolute; top: 0.5rem; left: 0.5rem; display: flex; flex-direction: column; gap: 2px; }
.osm-map .map-ui button { width: 2rem; height: 2rem; border: 1px solid #0003; border-radius: 4px; background: #fff; color: #222; font: 700 1.1rem/1 system-ui, sans-serif; cursor: pointer; }
.osm-map .map-attr { position: absolute; right: 0; bottom: 0; background: #fffc; color: #333; font-size: 0.7rem; padding: 0 0.3rem; }
.osm-map .map-attr a { color: #2a5db0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- horario ---------- */
.hours-grid .grid-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.7rem; }
.hours-grid .grid { display: grid; grid-template-columns: 3rem repeat(7, minmax(0, 1fr)); grid-auto-rows: 0.8rem; user-select: none; -webkit-user-select: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hours-grid .head { grid-row: span 2; display: grid; place-items: center; font-size: 0.82rem; font-weight: 700; border-left: 1px solid var(--line); }
.hours-grid .time { font-size: 0.72rem; color: var(--muted); line-height: 1; transform: translateY(-0.35rem); padding-right: 0.4rem; text-align: right; }
.hours-grid .c { border-left: 1px solid var(--line); cursor: pointer; touch-action: none; }
.hours-grid .c.hour { border-top: 1px solid var(--line); }
.hours-grid .c:hover { background: var(--brand-soft); }
.hours-grid .c.on { background: var(--yellow); border-left-color: color-mix(in srgb, var(--yellow) 75%, var(--ink)); }
.hours-grid .c.on.hour { border-top-color: color-mix(in srgb, var(--yellow) 75%, var(--ink)); }
.form .day-fields { margin-top: 1rem; }
.form .day-fields summary { cursor: pointer; font-weight: 600; margin-bottom: 0.6rem; }
.form .day-fields .hint { margin: 0 0 0.7rem; }
.form label.day-field { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.form label.day-field > span { margin: 0; }
.form .special-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.4fr); gap: 0 0.7rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.form .special-row label { margin-bottom: 0.6rem; }
.form .special-row label > span:first-child { font-size: 0.85rem; }
.form .special-row small { display: inline; margin: 0; }
@media (max-width: 52rem) {
  .form .special-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Tipos de publicación (pestañas del compositor) y editor de páginas */
.tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 1rem; }
.tabs a { padding: 0.3rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 0.9rem; }
.tabs a:hover { background: var(--sunken); }
.tabs a[aria-current] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.chip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
p.chip { margin: 0 0 0.6rem; }
.form fieldset.block, .form fieldset.add-block { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.9rem 1rem 0.6rem; margin: 0 0 1rem; }
.form fieldset.block + fieldset.block { margin-top: 0; }
.form fieldset.block > legend, .form fieldset.add-block > legend { font-weight: 700; padding: 0 0.35rem; }
.form fieldset.block:target { border-color: var(--brand); box-shadow: var(--focus); }
.block-actions { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 0.5rem; }
.add-block { background: var(--sunken); }
