/* admin.css — the panel is calm and neutral on purpose: it is generic, the brand lives on the public page.
   Mobile first (390 px). Colors: text #1A1A1A, secondary #6B665F (5.2:1 on the background, 5.7:1 on white). */

:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --line: #e6e3dd;
  --line-strong: #cfcbc3;
  --ink: #1a1a1a;
  --muted: #6b665f;
  --danger: #b42318;
  --warn-bg: #fff4dc;
  --warn-line: #f0d79b;
  --warn-ink: #5c3b00;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font);
}
body.lock { overflow: hidden; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { max-width: 100%; }
svg { display: block; flex: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.pad { padding: 32px 0; }

/* ---------- app shell ---------- */

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
main { padding: 16px 16px calc(112px + env(safe-area-inset-bottom)); }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
  background: var(--bg);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.topbar h1 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.save-status { margin-top: 2px; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.save-status[data-state="error"] { color: var(--danger); }

.live-status { margin: 0 16px; font-size: 14px; color: var(--muted); }
.live-status[data-state="ok"] { color: #1d6b3a; }
.live-status[data-state="stale"] { color: var(--warn-ink); }
.live-status .live-hint { display: block; }

.tabs {
  display: flex; gap: 4px; margin: 4px 16px 0; padding: 4px;
  background: #ece9e3; border-radius: 12px;
}
.tabs [role="tab"] {
  flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: transparent;
  font-size: 15px; font-weight: 600; color: #4a4640;
}
.tabs [aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }

.banner {
  display: flex; align-items: center; gap: 12px; margin: 8px 16px 0; padding: 12px 14px;
  background: #fdecea; border: 1px solid #f3c1bb; border-radius: 12px; color: #7a1a10; font-size: 15px;
}
.banner p { flex: 1; }
.banner-demo {
  flex-direction: column; align-items: stretch; gap: 10px;
  background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink);
}
.banner-demo .btn { align-self: flex-start; }
.demo-pill {
  display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink);
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}

.bottombar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; gap: 10px; width: min(100%, 560px);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(246, 245, 242, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.bottombar .btn { flex: 1; padding: 0 12px; white-space: nowrap; }
.bottombar #btn-add { flex: 1.35; }
/* demo: la etiqueta larga del botón de publicar baja a dos líneas en vez de salirse de la pantalla */
.bottombar.is-demo .btn { min-width: 0; }
.bottombar.is-demo #btn-add { flex: 1; }
.bottombar.is-demo #btn-publish { flex: 1.1; white-space: normal; font-size: 14px; line-height: 1.2; padding: 0 10px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px;
  font-size: 16px; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-small { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.is-busy, .btn-icon:disabled, .act:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.is-busy, .btn.is-disabled { pointer-events: none; }
.btn.is-disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 10px 0 4px;
  border: 0; background: transparent; font-size: 16px; font-weight: 600; border-radius: 10px;
}
.btn-icon {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink);
}
.btn-icon-danger { color: var(--danger); }
@media (hover: hover) {
  .btn-secondary:hover, .btn-icon:hover:not(:disabled), .btn-ghost:hover, .act:hover:not(:disabled) { background: #efede8; }
  .btn-primary:hover:not(:disabled) { background: #000; }
}

/* ---------- cards ---------- */

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

.profile { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; padding: 14px; }
.profile .btn { grid-column: 1 / -1; }
.avatar {
  display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden;
  border-radius: 50%; background: #ece9e3; color: var(--muted);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.profile-text { min-width: 0; }
.profile-cover { grid-column: 1 / -1; height: 72px; margin: -4px 0 0; overflow: hidden; border-radius: 10px; background: #ece9e3; }
.profile-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

.section-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-size: 17px; }
.count-pill { padding: 1px 9px; border-radius: 99px; background: #ece9e3; color: #4a4640; font-size: 13px; font-weight: 600; }

.blocks { display: grid; gap: 12px; }
.block { padding: 6px 6px 8px; }
.block.is-hidden { border-style: dashed; }
.block.is-hidden .block-main { opacity: 0.65; }
.block.is-incomplete { border-color: #e0b44a; }
.block-main {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px;
  border: 0; border-radius: 10px; background: transparent; text-align: left;
}
.type-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #f1efea; flex: none; }
.block-text { display: block; min-width: 0; flex: 1; }
.block-title { display: block; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.block-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; font-size: 14px; color: var(--muted); }
.badge { padding: 1px 8px; border-radius: 99px; background: #ece9e3; color: #4a4640; font-size: 12px; font-weight: 600; }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); }
.block-actions {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin-top: 6px; padding-top: 6px;
  border-top: 1px solid var(--line);
}
.act {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; padding: 4px 0; border: 0; border-radius: 10px; background: transparent;
  font-size: 12px; font-weight: 500; color: #3b3832;
}
.act-danger { color: var(--danger); }

.empty { display: grid; justify-items: center; gap: 12px; padding: 36px 16px; text-align: center; color: var(--muted); }

/* ---------- layers: sheets, full screen, dialogs ---------- */

.layer { position: fixed; inset: 0; z-index: 50; }
.backdrop { position: absolute; inset: 0; background: rgba(26, 26, 26, 0.45); animation: fade 0.18s ease-out; }
.panel { position: absolute; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.panel:focus { outline: none; }
.layer-sheet .panel {
  left: 0; right: 0; bottom: 0; margin: 0 auto; width: min(100%, 560px); max-height: 90vh; max-height: 90dvh;
  border-radius: 20px 20px 0 0; animation: rise 0.22s ease-out;
}
.layer-full .panel { inset: 0; margin: 0 auto; width: min(100%, 560px); animation: rise 0.22s ease-out; }
.layer-dialog { display: flex; align-items: center; justify-content: center; padding: 16px; }
.layer-dialog .panel { position: relative; width: min(100%, 380px); border-radius: 18px; animation: pop 0.18s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } }

.sheet-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; flex: none;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.layer-sheet .sheet-head { padding-top: 8px; }
.sheet-head > :first-child { justify-self: start; }
.sheet-head > :last-child { justify-self: end; }
.sheet-head-small { grid-template-columns: 1fr auto; padding-left: 20px; }
.sheet-head-small .sheet-title { text-align: left; }
.sheet-title { font-size: 17px; text-align: center; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px calc(28px + env(safe-area-inset-bottom)); }

.dialog-body { padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); }
.dialog-title { font-size: 19px; line-height: 1.25; }
.dialog-text { margin-top: 8px; color: var(--muted); }
.dialog-actions { display: flex; gap: 10px; margin-top: 20px; }
.dialog-actions .btn { flex: 1; }

.notice {
  margin-bottom: 16px; padding: 10px 12px; border: 1px solid var(--warn-line); border-radius: 12px;
  background: var(--warn-bg); color: var(--warn-ink); font-size: 15px;
}

/* ---------- forms ---------- */

.field { margin: 0 0 18px; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.field label, .label, legend { font-size: 15px; font-weight: 600; }
legend { padding: 0; margin-bottom: 6px; }
.label { display: block; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); font-size: 14px; }
.count { display: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.count.show { display: inline; }
input[type="text"], input[type="url"], input[type="tel"], input[type="date"], input[type="password"], textarea {
  display: block; width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); color: var(--ink);
  font: inherit; font-size: 16px; /* 16px avoids the iOS zoom on focus */
}
textarea { resize: vertical; min-height: 96px; line-height: 1.4; }
::placeholder { color: var(--muted); opacity: 1; }
input:focus, textarea:focus { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.hint { margin-top: 6px; font-size: 14px; color: var(--muted); }
.err { margin-top: 6px; font-size: 14px; color: var(--danger); font-weight: 500; }
.hint:empty, .err:empty { display: none; }
.group-title { margin: 26px 0 12px; font-size: 16px; }

.seg-row { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #ece9e3; }
.seg-wide { margin-bottom: 16px; }
.seg-opt { position: relative; flex: 1; }
.seg-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg-opt span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px;
  border-radius: 9px; font-size: 15px; font-weight: 600; text-align: center; color: #4a4640;
}
.seg-opt input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 1px; }
.seg-opt input:disabled + span { opacity: 0.4; }

.check { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 500; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--ink); }

.picker-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); text-align: left; font-size: 16px;
}
.picker-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #f1efea; }
.picker-val { flex: 1; }
.picker-go { color: var(--muted); }
.picker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.picker-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 76px; padding: 8px 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  font-size: 12px; line-height: 1.2; text-align: center; overflow-wrap: anywhere;
}
.picker-cell[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
/* Biblioteca de íconos en secciones (solo el panel alojado la prende): un título chico y la misma grilla de 4 columnas. */
.picker-sections { display: grid; gap: 22px; }
.picker-sec-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); }

.img-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.thumb {
  display: grid; place-items: center; width: 80px; height: 80px; flex: none; overflow: hidden;
  border-radius: 12px; background: #ece9e3; color: var(--muted);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-side { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
/* Los botones (Subir / Quitar) miden lo mismo (.btn-small: 44 px) y se reparten el renglón por igual (hasta 240 px cada uno); si no entran juntos, bajan uno debajo del otro, con el mismo ancho. */
.img-side .btn { flex: 1 1 0; min-width: max-content; max-width: 240px; min-height: 44px; margin: 0; padding: 0 14px; font-size: 15px; font-weight: 600; white-space: nowrap; }
/* El aro de foco es solo del botón que lo tiene (el de subir es una etiqueta: el foco lo lleva el input que va justo después). */
.img-side label.btn:has(+ input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.img-side .hint { flex: 1 0 100%; margin: 0; }
.img-side .hint:empty { display: none; }
.hint.is-error, .is-error { color: var(--danger); }

.sub-card { margin-bottom: 14px; padding: 14px 14px 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.group { margin-bottom: 18px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 16px; background: #fbfaf8; }
.group > .field { background: transparent; }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.item-title { font-weight: 700; font-size: 15px; }
.item-actions { display: flex; }

/* add-block sheet */
.type-list { display: grid; gap: 10px; }
.type-row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 10px 14px 10px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-align: left;
}
.type-row:disabled { opacity: 0.45; cursor: not-allowed; }
.type-text { display: grid; gap: 2px; }
.type-name { font-weight: 700; }
.type-desc { font-size: 14px; color: var(--muted); }
/* real miniatures: text on top, the page snippet below; the mini floats over an empty slot inside the button, so the whole card stays one tappable button */
.type-item { position: relative; }
.type-item.has-mini .type-row { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 10px 10px; }
.type-item.has-mini .type-text { padding: 0 4px; }
.mini-slot { display: block; width: var(--mw); height: var(--mh); margin: 0 auto; }
.mini { position: absolute; left: 50%; bottom: 10px; box-sizing: content-box; width: var(--mw); height: var(--mh); transform: translateX(-50%); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; pointer-events: none; }
.mini iframe { display: block; border: 0; pointer-events: none; transform: scale(var(--ms)); transform-origin: top left; }
.type-item:has(.type-row:disabled) .mini { opacity: 0.45; }
.sk { display: flex; width: 76px; height: 56px; flex: none; padding: 8px; gap: 4px; border-radius: 10px; background: #ece9e3; overflow: hidden; }
.sk i { display: block; height: 5px; border-radius: 3px; }
.sk-destacado, .sk-tarjeta { flex-direction: column; gap: 5px; }
.sk-destacado { background: var(--ink); }
.sk-destacado i { background: rgba(255, 255, 255, 0.75); width: 60%; }
.sk-destacado i + i { width: 85%; background: rgba(255, 255, 255, 0.4); }
.sk-destacado b { display: block; height: 10px; margin-top: auto; border-radius: 6px; background: #fff; }
.sk-tarjeta { background: #fff; border: 1px solid var(--line-strong); }
.sk-tarjeta i { background: #8c867c; width: 55%; }
.sk-tarjeta i + i { width: 85%; background: #cfcbc3; }
.sk-tarjeta b { display: block; width: 45%; height: 9px; margin-top: auto; border-radius: 5px; background: var(--ink); }
.sk-fila { align-items: center; background: #fff; border: 1px solid var(--line-strong); }
.sk-fila u { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); flex: none; }
.sk-fila i { flex: 1; background: #8c867c; }
.sk-fila s { width: 6px; height: 6px; border-top: 2px solid #8c867c; border-right: 2px solid #8c867c; transform: rotate(45deg); flex: none; }
.sk-libros { align-items: stretch; padding: 6px 10px; }
.sk-libros u { flex: 1; border-radius: 2px; background: #6b665f; }
.sk-libros u:nth-child(2) { background: #8c867c; }
.sk-libros u:nth-child(3) { background: #b7b1a6; }
.sk-redes { align-items: center; justify-content: center; gap: 6px; }
.sk-redes u { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.sk-video, .sk-consulta, .sk-descargable { flex-direction: column; background: #fff; border: 1px solid var(--line-strong); }
.sk-video { gap: 5px; padding: 6px; }
.sk-video u { position: relative; flex: 1; border-radius: 4px; background: #6b665f; }
.sk-video u::after { content: ""; position: absolute; top: 50%; left: 50%; margin: -4px 0 0 -3px; border-style: solid; border-width: 4px 0 4px 7px; border-color: transparent transparent transparent #fff; }
.sk-video i { width: 60%; background: #8c867c; }
.sk-musica { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: 22px 8px 8px; gap: 4px; background: #fff; border: 1px solid var(--line-strong); }
.sk-musica u { border-radius: 4px; background: #6b665f; }
.sk-musica i { align-self: center; background: #8c867c; }
.sk-musica b { display: block; grid-column: 1 / -1; border-radius: 6px; background: #ece9e3; border: 1px solid var(--line-strong); }
.sk-consulta { gap: 4px; }
.sk-consulta i { width: 60%; background: #8c867c; }
.sk-consulta b { display: block; position: relative; height: 10px; border-radius: 6px; background: #ece9e3; border: 1px solid var(--line-strong); }
.sk-consulta b::before { content: ""; position: absolute; top: 1px; left: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.sk-descargable { gap: 4px; }
.sk-descargable u { flex: 1; border-radius: 4px; background: #b7b1a6; }
.sk-descargable i { width: 55%; background: #8c867c; }
.sk-descargable b { display: block; height: 8px; border-radius: 5px; background: var(--ink); }
.sk-productos, .sk-eventos, .sk-pestanas { display: grid; background: #fff; border: 1px solid var(--line-strong); }
.sk-productos { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 5px; gap: 4px 5px; padding: 6px; }
.sk-productos u { border-radius: 3px; background: #6b665f; }
.sk-productos u + u { background: #b7b1a6; }
.sk-productos i { width: 70%; background: #8c867c; }
.sk-coleccion { padding: 8px 0 8px 8px; }
.sk-coleccion u { flex: none; width: 26px; border-radius: 4px; background: #6b665f; }
.sk-coleccion u:nth-child(2) { background: #8c867c; }
.sk-coleccion u:nth-child(3) { background: #b7b1a6; }
.sk-eventos { grid-template-columns: 16px 1fr; grid-template-rows: 1fr 1fr; align-items: center; gap: 5px; padding: 6px; }
.sk-eventos u { height: 16px; border-radius: 4px; background: var(--ink); }
.sk-eventos i { height: 5px; background: #8c867c; }
.sk-pestanas { grid-template-columns: 1fr 1fr; grid-template-rows: 12px 5px 1fr; gap: 5px; padding: 6px; }
.sk-pestanas b { position: relative; grid-column: 1 / -1; border-radius: 6px; background: #ece9e3; }
.sk-pestanas b::before { content: ""; position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); border-radius: 4px; background: var(--ink); }
.sk-pestanas i { grid-column: 1 / -1; width: 55%; background: #8c867c; }
.sk-ubicacion { display: grid; grid-template-columns: 14px 1fr; grid-template-rows: 14px 6px 6px; align-items: center; gap: 5px; padding: 6px; background: #fff; border: 1px solid var(--line-strong); }
.sk-ubicacion u { height: 14px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg) scale(0.85); background: var(--ink); }
.sk-ubicacion i { width: 70%; background: #8c867c; }
.sk-ubicacion b { display: block; grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #ece9e3; border: 1px solid var(--line-strong); }
.sk-pestanas u { border-radius: 3px; background: #b7b1a6; }
.sk-testimonios { flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line-strong); }
.sk-testimonios i { width: 85%; background: #cfcbc3; }
.sk-testimonios i + i { width: 60%; }
.sk-testimonios u { width: 12px; height: 12px; margin-top: auto; border-radius: 50%; background: var(--ink); }
.sk-preguntas { flex-direction: column; justify-content: center; gap: 4px; }
.sk-preguntas b { display: block; height: 10px; border-radius: 5px; background: #fff; border: 1px solid var(--line-strong); }
.sk-preguntas b:first-child { height: 14px; }
.sk-galeria { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; padding: 6px; }
.sk-galeria u { border-radius: 3px; background: #6b665f; }
.sk-galeria u:nth-child(2), .sk-galeria u:nth-child(3) { background: #b7b1a6; }
.sk-cupon { flex-direction: column; justify-content: center; gap: 5px; background: #fff; border: 1px solid var(--line-strong); }
.sk-cupon i { width: 55%; background: #8c867c; }
.sk-cupon b { display: block; height: 14px; border-radius: 5px; border: 1.5px dashed var(--ink); }
.sk-mails { flex-direction: column; justify-content: center; gap: 4px; background: #fff; border: 1px solid var(--line-strong); }
.sk-mails i { width: 50%; background: #8c867c; }
.sk-mails b { display: block; height: 10px; border-radius: 5px; background: #ece9e3; border: 1px solid var(--line-strong); }
.sk-mails u { display: block; height: 8px; border-radius: 5px; background: var(--ink); }

/* ---------- preview ---------- */

.preview-stage { flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 0; padding: 0; }
.preview-stage > p { padding: 40px 16px; }
.phone { flex: 1; width: 100%; max-width: 440px; min-height: 0; overflow: hidden; background: #fff; }
.phone iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (min-width: 600px) {
  .preview-stage { padding: 12px 0; }
  .phone { border: 8px solid var(--ink); border-radius: 34px; }
}

/* ---------- stats ---------- */

.total { padding: 18px; text-align: center; }
.total-n { font-size: 44px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-list { display: grid; gap: 10px; margin-top: 14px; }
.stat { padding: 14px; }
.stat-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.stat-title { font-weight: 700; overflow-wrap: anywhere; }
.stat-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { height: 8px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: #ece9e3; }
.bar span { display: block; height: 100%; border-radius: 99px; background: var(--ink); }
.bar-small { height: 5px; margin-top: 6px; }
.more summary { display: flex; align-items: center; min-height: 44px; margin-top: 4px; font-size: 15px; font-weight: 600; cursor: pointer; }
.more summary::after { content: ""; width: 8px; height: 8px; margin: -3px 0 0 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s; }
.more[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.more summary::-webkit-details-marker { display: none; }
.more summary { list-style: none; }
.more ul { display: grid; gap: 12px; margin: 4px 0 6px; }

/* ---------- toasts ---------- */

#toasts {
  position: fixed; left: 0; right: 0; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 100;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none;
}
.toast {
  max-width: 100%; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff;
  font-size: 15px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); pointer-events: auto; animation: rise 0.2s ease-out;
}
.toast-error { background: var(--danger); }
.toast p + p { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- pantallas de entrada y de preparación (gate.js) ---------- */

#app.is-gated .tabs, #app.is-gated main, #app.is-gated #bottombar, #app.is-gated #live-status { display: none; }
.gate { padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
.gate-card { display: grid; gap: 14px; padding: 22px 18px; }
.gate-card h2 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.gate-card .field { margin: 0 0 14px; }
.gate-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #f1efea; }
.notice {
  padding: 12px 14px; border: 1px solid #f3c1bb; border-radius: 12px; background: #fdecea; color: #7a1a10; font-size: 15px;
}
