/* RecFlying Fase 0. Oscuro por defecto (las fotos resaltan), claro si el sistema lo pide.
   Marca en blanco y negro: sin color de acento. */
:root {
  color-scheme: dark light;
  --bg: #0b0b0c;
  --surface: #17171a;
  --fg: #f5f5f7;
  --muted: #98989f;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #f5f5f7;
  --margin: 16px;
  --pad: 12px;
  --gap: 6px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-display: 'D-DIN', 'DIN Alternate', 'Barlow Semi Condensed', -apple-system, system-ui, sans-serif;
}
@media (min-width: 700px) { :root { --pad: 20px; } }
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f2f2f4;
    --fg: #111113;
    --muted: #66666d;
    --line: rgba(0, 0, 0, 0.14);
    --accent: #111113;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Iconos (SVG en linea) */
[data-ico] { display: inline-flex; width: 22px; height: 22px; }
[data-ico] svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Portada */
.hero {
  position: relative;
  min-height: 68svh;
  display: flex;
  align-items: flex-end;
  padding: calc(env(safe-area-inset-top) + 24px) var(--margin) 32px;
  background: linear-gradient(160deg, #3a2f26 0%, #15151a 70%);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0.25) 100%);
}
.hero-inner { max-width: 720px; color: #fff; }
.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
.hero h1 {
  margin: 0;
  font: 600 clamp(36px, 9vw, 72px) / 0.98 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero p { margin: 12px 0 24px; color: rgba(255, 255, 255, 0.8); font-size: 15px; }
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.ghost:hover { background: #fff; color: #000; }

/* Barra fija: secciones a la izquierda, favoritas y descargar a la derecha */
.bar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: stretch;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.sets {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 var(--margin);
}
.sets::-webkit-scrollbar { display: none; }
.sets button {
  flex: none;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.sets button[aria-pressed='true'] { color: var(--fg); border-bottom-color: var(--fg); }
.actions { flex: none; display: flex; align-items: center; margin-left: auto; padding-right: 6px; }
.tool {
  min-width: 44px;
  min-height: 48px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.tool[aria-pressed='true'] [data-ico] svg { fill: currentColor; }

.menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 8px;
  min-width: 250px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}
.menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.menu button:hover:not(:disabled) { background: var(--surface); }
.menu button:disabled { color: var(--muted); cursor: default; }
.menu small { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.menu [data-ico] { width: 18px; height: 18px; color: var(--muted); }
.menu .sep { margin: 6px 8px; border: 0; border-top: 1px solid var(--line); }
.menu .hint { margin: 2px 12px 8px; font-size: 12px; line-height: 1.4; color: var(--muted); }

/* Modo administrador (solo se muestra con la clave de administrador) */
.admin-only { display: none !important; }
body.admin .admin-only { display: grid !important; }
body.admin .menu button.admin-only { display: flex !important; }
.pill {
  align-self: center;
  margin-right: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ph.is-cover::before {
  content: 'Portada';
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Masonry: columnas con la foto completa (sin recortar). Cada foto se coloca en la columna mas baja. */
.cols { display: flex; align-items: flex-start; gap: var(--gap); padding: var(--gap) var(--pad); }
.col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.ph { position: relative; background: var(--surface); overflow: hidden; }
.ph .open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.4s ease; }
.ph img.ok { opacity: 1; }
.ph:not(.loaded)::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.07) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* Corazon y descarga sobre cada foto */
.acts { position: absolute; z-index: 1; right: 0; bottom: 0; display: flex; }
/* Degradado suave tras los botones para que se lean sobre fotos claras */
.ph.loaded::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 130px;
  height: 76px;
  pointer-events: none;
  background: radial-gradient(ellipse at 100% 100%, rgba(0, 0, 0, 0.5), transparent 70%);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
@media (hover: hover) {
  .ph.loaded::after { opacity: 0; }
  .ph.loaded:hover::after, .ph.loaded:focus-within::after { opacity: 1; }
}
.act {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
  transition: opacity 0.2s ease;
}
.act[aria-pressed='true'] [data-ico] svg { fill: #fff; }
@media (hover: hover) {
  .act { opacity: 0; }
  .ph:hover .act, .ph:focus-within .act, .act[aria-pressed='true'] { opacity: 1; }
}

#sentinel { height: 1px; }
#msg { padding: 32px var(--margin) 96px; color: var(--muted); text-align: center; font-size: 15px; }

/* Aviso breve */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 76px);
  transform: translateX(-50%);
  z-index: 8;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Visor */
dialog#viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  color: #fff;
}
dialog#viewer::backdrop { background: #000; }
#viewer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; touch-action: pan-y; }
.vtools { position: absolute; z-index: 2; top: calc(env(safe-area-inset-top) + 12px); right: 12px; display: flex; gap: 8px; }
.vbtn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(40, 40, 44, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 22px;
  text-decoration: none;
  cursor: pointer;
}
#vfav[aria-pressed='true'] [data-ico] svg { fill: #fff; }
#vprev, #vnext { position: absolute; z-index: 2; top: 50%; }
#vprev { left: 12px; }
#vnext { right: 12px; }
#vcount {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
}

/* Metricas de la prueba (Fase 0) */
#hud {
  position: fixed;
  left: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  z-index: 6;
  max-width: calc(100vw - 24px);
}
#hud button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font-size: 13px;
  cursor: pointer;
}
#hud pre {
  margin: 8px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font: 12px/1.6 ui-monospace, 'SF Mono', Menlo, monospace;
  white-space: pre-wrap;
}

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

/* Inicio de sesion */
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) {
  width: min(92vw, 380px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin)::backdrop { background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) h2 { margin: 0 0 8px; font: 600 24px/1.1 var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--fg);
  font: 16px var(--font); /* 16px evita el zoom automatico de iOS */
}
#login #login-state { min-height: 22px; margin: 12px 0 0; color: var(--fg); font-size: 14px; }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) .ghost, :is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) .solid { min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) .ghost { border-color: var(--line); color: var(--fg); }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) .ghost:hover { background: var(--surface); color: var(--fg); }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) .solid { border: 0; background: var(--fg); color: var(--bg); }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) .solid:disabled { opacity: 0.5; cursor: default; }
#login #login-lead { color: var(--fg); }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) input + label { margin-top: 12px; }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) .check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13px; line-height: 1.35; }
:is(#login, #gate, #share, #invite, #print, #orders, #dates-admin, #reserve, #reservations-admin) .check input { width: 20px; min-height: 20px; margin: 1px 0 0; padding: 0; accent-color: var(--fg); flex: none; }

/* Diálogos de clave del invitado y de compartir (hereda el estilo de #login) */
#share { width: min(92vw, 460px); }
#share .result { display: flex; gap: 8px; margin: 14px 0 0; }
#share .result input { flex: 1; min-width: 0; font-size: 13px; }
#share ul { list-style: none; margin: 14px 0 0; padding: 0; max-height: 160px; overflow: auto; font-size: 13px; color: var(--muted); }
#share li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
#share li button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--fg); font-size: 12px; cursor: pointer; }
#share #share-state, #gate #gate-state { min-height: 22px; margin: 12px 0 0; color: var(--fg); font-size: 14px; }

/* Invitar al cliente (hereda de #login) */
#invite { width: min(92vw, 460px); }
#invite .result { display: flex; gap: 8px; margin: 14px 0 0; }
#invite .result input { flex: 1; min-width: 0; font-size: 13px; }
#invite #invite-state { min-height: 22px; margin: 12px 0 0; color: var(--fg); font-size: 14px; }
#invite input + label { margin-top: 12px; }

/* Mis álbumes */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 24px max(16px, env(safe-area-inset-left)); max-width: 1200px; margin: 0 auto; }
.album-card { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px; background: var(--surface) center / cover no-repeat; color: #fff; text-decoration: none; border: 1px solid var(--line); }
.album-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0) 60%); }
.album-card:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.album-card .meta { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 14px; }
.album-card strong { display: block; font: 600 20px/1.1 var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; }
.album-card span { display: block; margin-top: 4px; font-size: 13px; opacity: 0.8; }

/* Imprimir: botón por foto (solo en modo imprimir), barra de selección y diálogos */
.act.prt { display: none; }
body.print-mode .act.prt { display: grid; opacity: 1; }
.ph.is-print { outline: 3px solid var(--fg); outline-offset: -3px; }
#print-bar { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 14px); transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--fg); color: var(--bg); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4); font-size: 14px; white-space: nowrap; }
#print-bar[hidden] { display: none; }
#print-bar button { min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; border: 1px solid transparent; }
#print-bar .solid { background: var(--bg); color: var(--fg); }
#print-bar .solid:disabled { opacity: 0.4; cursor: default; }
#print-bar .ghost { background: none; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
#print { width: min(94vw, 560px); }
#print .bulk { display: flex; gap: 8px; margin: 0 0 12px; }
#print .bulk select { flex: 1; min-width: 0; }
#print .bulk input { width: 72px; }
#print .bulk button { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--fg); font-size: 12px; cursor: pointer; white-space: nowrap; }
#print ul { list-style: none; margin: 0 0 12px; padding: 0; max-height: 38vh; overflow: auto; }
#print li { display: grid; grid-template-columns: 56px 1fr 72px 36px; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
#print li img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--surface); }
#print li button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
#print select, #print input, #print textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); font: inherit; font-size: 15px; box-sizing: border-box; }
#print textarea { min-height: 0; resize: vertical; }
#print #print-state, #orders #orders-state { min-height: 22px; margin: 8px 0 0; color: var(--fg); font-size: 14px; }
#orders { width: min(94vw, 640px); }
#orders-list { max-height: 60vh; overflow: auto; }
#orders article { padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; }
#orders article h3 { margin: 0; font: 600 16px/1.2 var(--font); }
#orders article small { display: block; margin-top: 2px; color: var(--muted); }
#orders .thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
#orders .thumbs figure { margin: 0; width: 64px; font-size: 11px; color: var(--muted); text-align: center; }
#orders .thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--surface); display: block; }
#orders select, #orders textarea { width: 100%; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; box-sizing: border-box; }
#orders .save { margin-top: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.orders { max-width: 760px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-left)) 24px; }
.orders h2 { margin: 24px 0 8px; font: 600 20px/1.1 var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; }
.orders ul { list-style: none; margin: 0; padding: 0; }
.orders li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.orders li small { display: block; margin-top: 2px; color: var(--muted); }
.orders li .reply { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.orders li button { margin-top: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--fg); font-size: 12px; cursor: pointer; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; margin-left: 6px; }

/* Mis fechas */
.dates .hint { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.dates li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.dates li .when { color: var(--muted); }
.dates li .actions { display: flex; gap: 6px; flex: none; }
.dates form { margin: 20px 0 8px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.dates form h3 { margin: 0 0 12px; font: 600 16px/1.2 var(--font); }
.dates form label { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }
.dates form input[type='text'], .dates form input[type='date'], .dates form select { display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); font: inherit; font-size: 15px; box-sizing: border-box; }
.dates .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dates fieldset { margin: 14px 0 0; padding: 0; border: 0; }
.dates legend { padding: 0; font-size: 13px; color: var(--muted); }
.dates .check { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; color: var(--fg); font-size: 14px; line-height: 1.35; }
.dates .check input { width: 20px; min-height: 20px; margin: 1px 0 0; padding: 0; accent-color: var(--fg); flex: none; }
.dates .consent { margin-top: 18px; }
.dates #date-state { min-height: 20px; margin: 10px 0 0; font-size: 14px; color: var(--fg); }
.dates .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.dates .row .ghost, .dates .row .solid { min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.dates .row .ghost { border: 1px solid var(--line); background: none; color: var(--fg); }
.dates .row .solid { border: 0; background: var(--fg); color: var(--bg); }
#dates-admin { width: min(94vw, 600px); }
#dates-admin ul { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow: auto; }
#dates-admin li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
#dates-admin li small { display: block; color: var(--muted); }
#dates-admin #dates-admin-state { min-height: 22px; margin: 8px 0 0; font-size: 14px; }

/* Fechas de clientes (panel del dueno): formulario dentro del dialogo */
#dates-admin { width: min(94vw, 640px); max-height: 92vh; overflow: auto; }
#dates-admin form { margin: 12px 0 8px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
#dates-admin form h3 { margin: 0 0 8px; font: 600 16px/1.2 var(--font); }
#dates-admin form label { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }
#dates-admin form input[type='text'], #dates-admin form input[type='date'], #dates-admin form select { display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); font: inherit; font-size: 15px; box-sizing: border-box; }
#dates-admin .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#dates-admin fieldset { margin: 12px 0 0; padding: 0; border: 0; }
#dates-admin legend { padding: 0; font-size: 13px; color: var(--muted); }
#dates-admin .check { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; color: var(--fg); font-size: 14px; }
#dates-admin .check input { width: 20px; min-height: 20px; margin: 1px 0 0; padding: 0; accent-color: var(--fg); flex: none; }
#dates-admin #date-state { min-height: 20px; margin: 10px 0 0; font-size: 14px; color: var(--fg); }
#dates-admin .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
#dates-admin .list-title { margin: 16px 0 0; font: 600 14px/1.2 var(--font); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
#dates-admin li .btns { display: flex; gap: 6px; margin-top: 6px; }
#dates-admin li .btns button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--fg); font-size: 12px; cursor: pointer; }

/* Baja de un clic */
#unsub .unsub-actions { display: grid; gap: 10px; margin: 14px 0; max-width: 420px; }
#unsub .solid, #unsub .ghost { min-height: 48px; padding: 0 18px; border-radius: 999px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
#unsub .solid { border: 0; background: var(--fg); color: var(--bg); }
#unsub .ghost { border: 1px solid var(--line); background: none; color: var(--fg); }
#unsub .solid:disabled, #unsub .ghost:disabled { opacity: 0.5; cursor: default; }
#unsub .hint { margin: 0; color: var(--fg); font-size: 15px; }

/* Recordatorios de hoy (panel del dueño) */
#dates-admin .send-box { margin: 12px 0 4px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
#dates-admin .send-box h3 { margin: 0 0 6px; font: 600 16px/1.2 var(--font); }
#dates-admin .send-box .hint { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
#dates-admin .send-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#dates-admin .send-actions button { min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
#dates-admin .send-actions .ghost { border: 1px solid var(--line); background: none; color: var(--fg); }
#dates-admin .send-actions .solid { border: 0; background: var(--fg); color: var(--bg); }
#dates-admin .send-actions button:disabled { opacity: 0.5; cursor: default; }
#dates-admin #send-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 28vh; overflow: auto; font-size: 13px; }
#dates-admin #send-list li { padding: 8px 0; border-top: 1px solid var(--line); }
#dates-admin #send-list small { display: block; color: var(--muted); }
#dates-admin #send-state { min-height: 20px; margin: 8px 0 0; font-size: 14px; color: var(--fg); }

/* Reservas */
.hero .link { display: block; margin: 14px 0 0; padding: 4px 0; border: 0; background: none; color: rgba(255, 255, 255, 0.75); font-size: 13px; letter-spacing: 0.08em; text-decoration: underline; cursor: pointer; }
.hero .solid-hero { margin-right: 8px; }
#reserve { width: min(94vw, 480px); }
#reserve select, #reserve input, #reserve textarea, #reservations-admin select, #reservations-admin textarea { display: block; width: 100%; min-height: 44px; margin: 4px 0 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); font: inherit; font-size: 15px; box-sizing: border-box; }
#reserve textarea, #reservations-admin textarea { min-height: 0; resize: vertical; }
#reserve #reserve-state, #reservations-admin #reservations-admin-state { min-height: 22px; margin: 6px 0 0; font-size: 14px; color: var(--fg); }
#reservations-admin { width: min(94vw, 640px); }
#reservations-admin-list { max-height: 60vh; overflow: auto; }
#reservations-admin article { padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; }
#reservations-admin article h3 { margin: 0; font: 600 16px/1.2 var(--font); }
#reservations-admin article small { display: block; margin-top: 2px; color: var(--muted); }
#reservations-admin .conflict { margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, #f5a524 22%, transparent); font-size: 13px; }
#reservations-admin .save { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }

/* Videos: tarjeta con reproducir + duracion, y reproductor de Drive en el visor */
.ph.is-video { background: var(--surface); }
.ph.is-video .open { cursor: pointer; }
.vbadge { position: absolute; z-index: 1; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 12px; letter-spacing: 0.04em; pointer-events: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.vbadge svg { width: 14px; height: 14px; fill: #fff; stroke: none; }
.ph.is-video .vplay { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ph.is-video .vplay span { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ph.is-video .vplay svg { width: 24px; height: 24px; fill: #fff; stroke: none; margin-left: 3px; }
.ph.is-video.nothumb .vwait { position: absolute; inset: auto 0 36px 0; text-align: center; color: var(--muted); font-size: 12px; }
#viewer iframe { position: absolute; inset: 56px 0 0 0; width: 100%; height: calc(100% - 56px); border: 0; background: #000; }
#viewer iframe[hidden] { display: none; }
#vnote { position: absolute; inset: 56px 0 0 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center; color: #fff; }
#vnote[hidden] { display: none; }
#vnote p { margin: 0; max-width: 420px; font-size: 16px; line-height: 1.45; }
#vnote .solid { min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: #fff; color: #000; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
#viewer.is-video #vcover, #viewer.is-video #vfav, #viewer.is-video #vdl { display: none !important; }

/* Panel de administrador */
.dash { max-width: 1200px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-left)) 48px; }
.dash h2 { margin: 36px 0 12px; font: 600 18px/1.1 var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; }
.dash .banner { margin: 16px 0 0; padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, #f5a524 20%, transparent); font-size: 14px; line-height: 1.4; }
.dash .toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.dash .toolbar button, .dash .card-actions button, .dash .card-actions a { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--fg); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; cursor: pointer; }
.dash .toolbar button:hover, .dash .card-actions button:hover, .dash .card-actions a:hover { background: var(--surface); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 20px 0 0; }
.stat { display: block; width: 100%; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--fg); font: inherit; cursor: pointer; }
.stat:hover { border-color: var(--fg); }
.stat b { display: block; font: 600 34px/1 var(--font-display); letter-spacing: 0.02em; }
.stat span { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.stat.alert b::after { content: ''; display: inline-block; width: 9px; height: 9px; margin-left: 8px; vertical-align: middle; border-radius: 50%; background: #f5a524; }
.dash .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.acard { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
.acard .cover { aspect-ratio: 16 / 9; background: var(--bg) center / cover no-repeat; }
.acard .body { padding: 14px 16px 16px; }
.acard h3 { margin: 0; font: 600 17px/1.2 var(--font); }
.acard small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.dash .card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dash .list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.dash .list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.dash .list li:first-child { border-top: 0; }
.dash .list small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.dash .chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chip { display: inline-block; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; letter-spacing: 0.04em; white-space: nowrap; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.dash .empty { padding: 18px 16px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); font-size: 14px; }
.dash .filter { margin: 0 0 10px; display: flex; gap: 8px; }
.dash .filter select { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font: inherit; font-size: 13px; }
.dash .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* El panel abre con un encabezado compacto: lo importante debe verse sin bajar */
body.dash-mode .hero { min-height: 0; height: auto; padding-top: 40px; padding-bottom: 24px; }
body.dash-mode .hero h1 { font-size: clamp(28px, 5vw, 44px); }
body.dash-mode .hero::before { opacity: 0.4; }

/* Estadisticas del panel */
.dash .stats-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 36px 0 12px; }
.dash .stats-head h2 { margin: 0; }
.dash .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.dash .kpi { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.dash .kpi b { display: block; font: 600 26px/1 var(--font-display); }
.dash .kpi span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.dash .chart { margin: 14px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 18px; }
.dash .chart svg { display: block; width: 100%; height: 150px; }
.dash .chart .legend { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.dash .chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.dash .chart .axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); }
.dash .tops { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.dash .top { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); font-size: 12px; }
.dash .top .ph-box { aspect-ratio: 1; background: var(--bg) center / cover no-repeat; position: relative; }
.dash .top .ph-box span { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 11px; }
.dash .top div.cap { padding: 8px 10px; color: var(--muted); line-height: 1.4; }
.dash .note { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

/* Portada para quien llega por primera vez */
.landing { max-width: 960px; margin: 0 auto; padding: 32px var(--margin) 56px; }
.landing h2 { font-family: var(--font-display); font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; font-weight: 600; }
.landing-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.landing-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.landing-grid h3 { margin: 0 0 8px; font-size: 16px; }
.landing-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.landing .landing-note { margin: 20px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.hero #landing-signup { margin-left: 8px; }
body.landing-mode .hero p { max-width: 520px; }

/* Entrar con Google y WhatsApp */
.google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #1f1f1f; font: inherit; font-size: 15px; cursor: pointer; }
.google svg { width: 18px; height: 18px; }
#login .or { margin: 14px 0 6px; color: var(--muted); font-size: 13px; }
.phone-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.phone-form input { flex: 1 1 220px; }
#phone-state { color: var(--muted); font-size: 13px; }
.list a.link { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

/* Paginas de texto (privacidad) */
.doc { max-width: 720px; margin: 0 auto; padding: 40px var(--margin) 64px; line-height: 1.6; }
.doc h1 { font-family: var(--font-display); font-size: clamp(28px, 6vw, 40px); text-transform: uppercase; margin: 8px 0 4px; }
.doc h2 { font-size: 17px; margin: 28px 0 8px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; color: var(--fg); }
.doc .muted { color: var(--muted); font-size: 14px; }
.doc a { color: var(--fg); }
.doc .eyebrow a { text-decoration: none; letter-spacing: 0.16em; }
.privacy-link { color: var(--muted); }

/* ---------- «Mis proyectos»: pantalla del cliente ---------- */
body.mine-mode .hero { min-height: 38svh; padding-bottom: 28px; }
body.mine-mode .hero h1 { font-size: clamp(32px, 8vw, 56px); }
body.mine-mode .hero p { margin: 8px 0 20px; font-size: 14px; opacity: 0.85; }
body.mine-mode .hero .ghost { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
body.mine-mode .hero .ghost:hover { background: rgba(255, 255, 255, 0.85); }
body.mine-mode .hero .link { display: inline-block; margin: 0 0 0 18px; }
body.mine-mode main { padding-bottom: 48px; }

.sect-title, .card-sec h2, body.mine-mode .orders h2 { margin: 0 0 12px; font: 600 12px/1.2 var(--font); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.sect-title { max-width: 1200px; margin: 28px auto 0; padding: 0 max(16px, env(safe-area-inset-left)); }
body.mine-mode .albums { padding-top: 12px; gap: 14px; }
body.mine-mode .album-card { border-radius: 20px; aspect-ratio: 16 / 11; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); transition: transform 0.25s ease; }
body.mine-mode .album-card:hover { transform: translateY(-2px); }

.card-sec, body.mine-mode .orders:not(.dates-flat) {
  max-width: 728px; width: calc(100% - 32px); margin: 14px auto 0; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
}
body.mine-mode #unsub { max-width: 728px; }
body.mine-mode .orders li:first-child { border-top: 0; padding-top: 4px; }
body.mine-mode .orders li { padding: 12px 0; }
body.mine-mode .orders li strong { font-weight: 600; }
body.mine-mode .orders li button { border-radius: 999px; min-height: 38px; padding: 0 16px; }
.hint { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* Fechas: cuenta regresiva a la derecha */
body.mine-mode .dates li { align-items: center; }
.until { flex: none; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; white-space: nowrap; color: var(--fg); }

/* Casillas como interruptores */
body.mine-mode .dates .check { flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
body.mine-mode .dates .check strong { color: var(--fg); }
body.mine-mode .dates .check input {
  appearance: none; -webkit-appearance: none; flex: none; width: 46px; min-height: 0; height: 28px; margin: 0; padding: 0; border-radius: 14px; cursor: pointer;
  background-color: var(--line); background-image: radial-gradient(circle at 14px 14px, #fff 11px, transparent 12px); transition: background-color 0.2s ease;
}
body.mine-mode .dates .check input:checked { background-color: var(--fg); background-image: radial-gradient(circle at 32px 14px, var(--bg) 11px, transparent 12px); }
body.mine-mode .dates .check input:disabled { opacity: 0.5; }

/* Telefono: pais + numero */
.phone-field { display: flex; gap: 8px; width: 100%; }
.phone-field select, .phone-field input {
  min-height: 48px; margin: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--fg);
  font: inherit; font-size: 16px; box-sizing: border-box;
}
.phone-field select { flex: none; width: auto; max-width: 118px; padding-right: 6px; }
.phone-field input { flex: 1; width: auto; min-width: 0; }
.phone-field select:focus, .phone-field input:focus { outline: 2px solid var(--fg); outline-offset: 1px; }
.phone-form { display: block; margin: 0; }
.phone-form .pill-btn { margin-top: 12px; }
.phone-form .hint { margin: 10px 0 0; min-height: 18px; color: var(--fg); }
.pill-btn { min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg); font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.pill-btn:disabled { opacity: 0.5; }
#login .phone-field { margin-bottom: 4px; }
#login .phone-field select, #login .phone-field input { width: auto; margin: 0; }
#login .phone-field input { width: 100%; }

/* ---------- Panel de administrador: acabado ---------- */
.dash h2, .dash .stats-head h2 { margin: 32px 0 12px; font: 600 12px/1.2 var(--font); letter-spacing: 0.18em; color: var(--muted); }
.dash .stats-head h2 { margin: 0; }
.dash .stats-head { margin: 36px 0 12px; }
.dash .stats-head select { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font: inherit; font-size: 13px; }
.dash .toolbar button { min-height: 40px; padding: 0 18px; }
.stat { padding: 18px; border-radius: 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--fg) 7%, var(--surface)), var(--surface)); transition: border-color 0.2s ease, transform 0.2s ease; }
.stat:hover { transform: translateY(-1px); }
.stat b { font-size: 40px; }
.dash .kpis { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.dash .kpi { padding: 12px; border-radius: 16px; }
.dash .kpi b { font-size: 24px; }
.dash .kpi span { font-size: 11px; line-height: 1.3; }
.dash .chart { padding: 16px; border-radius: 20px; color: var(--fg); background: var(--surface); }
.dash .chart svg { height: 160px; }
.acard, .dash .list, .dash .empty, .dash .top { border-radius: 20px; }
.acard { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.acard h3 { font-size: 18px; }
.chip { padding: 3px 10px; color: var(--muted); font-size: 11px; }
.chip.on { background: none; color: var(--fg); border-color: color-mix(in srgb, var(--fg) 55%, transparent); }
.chip.on::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--fg); vertical-align: 1px; }
.dash .clients li { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px; }
.dash .clients .chips { justify-content: flex-start; }
.dash .clients li > div:first-child { min-width: 0; }
.dash .clients li > div:first-child > div { font-weight: 600; font-size: 15px; }
.wa { display: inline-flex; align-items: center; margin-top: 8px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--fg); text-decoration: none; white-space: nowrap; }
.wa:hover { background: var(--bg); border-color: var(--fg); }
@media (min-width: 720px) {
  .dash .clients li { flex-direction: row; align-items: center; justify-content: space-between; }
  .dash .clients .chips { justify-content: flex-end; }
}

/* ---------- Portada (visitante sin sesion): siempre oscura, cinematografica ---------- */
body.landing-mode { --bg: #0b0b0c; --surface: #151518; --fg: #f5f5f7; --muted: #9b9ba3; --line: rgba(255, 255, 255, 0.14); color-scheme: dark; background: var(--bg); color: var(--fg); }
body.landing-mode main { padding: 0; }
body.landing-mode #msg:empty { display: none; }
.lp { overflow-x: clip; }
.lp-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top) + 12px) max(20px, env(safe-area-inset-left)) 12px; background: rgba(11, 11, 12, 0.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.lp-brand { font: 600 15px/1 var(--font-display); letter-spacing: 0.26em; text-transform: uppercase; color: #fff; text-decoration: none; }
.lp-navlink { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: none; color: #fff; font: inherit; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: background 0.2s ease; }
.lp-navlink:hover { background: rgba(255, 255, 255, 0.08); }

.lp-hero { position: relative; isolation: isolate; display: grid; gap: 36px; align-items: center; max-width: 1120px; margin: 0 auto; padding: 44px 20px 64px; min-height: calc(100svh - 62px); }
.lp-hero::before { content: ''; position: absolute; z-index: -1; inset: -10% -30% auto -30%; height: 90%;
  background: radial-gradient(55% 55% at 78% 18%, rgba(255, 214, 170, 0.16), transparent 70%), radial-gradient(45% 40% at 8% 80%, rgba(255, 255, 255, 0.06), transparent 70%); pointer-events: none; }
.lp-eyebrow { margin: 0 0 18px; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.lp-hero h1 { margin: 0; font: 600 clamp(46px, 12vw, 104px) / 0.94 var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; }
.lp-sub { max-width: 520px; margin: 22px 0 28px; color: rgba(255, 255, 255, 0.74); font-size: 17px; line-height: 1.55; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 1px solid transparent; border-radius: 999px; font: inherit; font-size: 14px; letter-spacing: 0.04em; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.lp-btn svg { width: 18px; height: 18px; flex: none; }
.lp-btn-main { background: #fff; color: #111; font-weight: 600; }
.lp-btn-main:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(255, 255, 255, 0.16); }
.lp-btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.lp-btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.lp-fine { margin: 14px 0 0; color: var(--muted); font-size: 13px; }

.lp-stage { position: relative; width: 100%; max-width: 420px; margin: 0 auto; display: grid; place-items: center; padding: 14px 0; }
.lp-phone { width: min(268px, 68vw); aspect-ratio: 9 / 18.4; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 42px; background: #0e0e10; border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.65), 0 0 0 7px rgba(255, 255, 255, 0.035), inset 0 1px 0 rgba(255, 255, 255, 0.08); transform: rotate(-3deg); animation: lp-float 8s ease-in-out infinite; }
.lp-phone-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 4px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lp-phone-bar i { width: 34px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); }
.lp-tiles { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); gap: 5px; overflow: hidden; border-radius: 20px; }
.lp-tiles b { display: block; border-radius: 7px; background: linear-gradient(160deg, #4a3b2f, #1a1714); }
.lp-tiles b:nth-child(4n + 2) { background: linear-gradient(160deg, #2e3238, #121316); }
.lp-tiles b:nth-child(4n + 3) { background: linear-gradient(160deg, #62513f, #211a14); }
.lp-tiles b:nth-child(4n) { background: linear-gradient(160deg, #3b3b3f, #141416); }
.lp-tiles b:nth-child(5n + 1) { background: linear-gradient(160deg, #75604b, #2a2118); }
.lp-tiles b:nth-child(1), .lp-tiles b:nth-child(8) { background: linear-gradient(160deg, #8a735c, #2f251b); }
.lp-phone-dock { display: flex; justify-content: space-around; padding: 10px 4px 6px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.lp-chip { position: absolute; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(22, 22, 25, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); animation: lp-float2 7s ease-in-out infinite; }
.lp-chip-a { top: 16%; left: 0; }
.lp-chip-b { bottom: 20%; right: 0; animation-delay: -3s; }
@keyframes lp-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(-3deg); } }
@keyframes lp-float2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.lp-sec { max-width: 1120px; margin: 0 auto; padding: 48px 20px; }
.lp-label { margin: 0 0 20px; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.lp-steps { list-style: none; display: grid; gap: 12px; margin: 0; padding: 0; }
.lp-steps li { padding: 24px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); }
.lp-steps span { font: 600 14px/1 var(--font-display); letter-spacing: 0.22em; color: var(--muted); }
.lp-steps h3 { margin: 22px 0 6px; font-size: 20px; }
.lp-steps p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.lp-bento { display: grid; gap: 12px; }
.lp-card { display: flex; flex-direction: column; min-height: 230px; padding: 26px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)); transition: border-color 0.25s ease, transform 0.25s ease; }
.lp-card:hover { border-color: rgba(255, 255, 255, 0.34); transform: translateY(-2px); }
.lp-card svg { width: 32px; height: 32px; margin-bottom: auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lp-card h3 { margin: 28px 0 8px; font-size: 22px; line-height: 1.15; }
.lp-card p { margin: 0; max-width: 460px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.lp-trust ul { list-style: none; display: grid; gap: 22px; margin: 0; padding: 0; }
.lp-trust li { padding-top: 16px; border-top: 1px solid var(--line); }
.lp-trust b { display: block; margin-bottom: 4px; font-size: 15px; }
.lp-trust span { color: var(--muted); font-size: 14px; }
.lp-final { position: relative; isolation: isolate; max-width: 1120px; margin: 24px auto 0; padding: 72px 20px 80px; text-align: center; }
.lp-final::before { content: ''; position: absolute; z-index: -1; inset: 0; background: radial-gradient(50% 70% at 50% 100%, rgba(255, 214, 170, 0.12), transparent 70%); }
.lp-final h2 { margin: 0; font: 600 clamp(32px, 8vw, 60px) / 1 var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; }
.lp-final p { margin: 14px 0 26px; color: var(--muted); }
.lp-final .lp-cta { justify-content: center; }
.lp-foot { display: flex; justify-content: center; gap: 22px; padding: 26px 20px calc(26px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.lp-foot a { color: var(--muted); text-decoration: none; }
.lp-foot a:hover { color: #fff; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease var(--d, 0ms), transform 0.7s ease var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
@media (min-width: 900px) {
  .lp-hero { grid-template-columns: 1.15fr 0.85fr; padding-top: 64px; }
  .lp-steps { grid-template-columns: repeat(3, 1fr); }
  .lp-bento { grid-template-columns: repeat(3, 1fr); }
  .lp-card-wide { grid-column: span 2; }
  .lp-trust ul { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .lp-phone, .lp-chip { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* Fotos reales en la maqueta y tira de trabajos */
.lp-tiles b { background-size: cover; background-position: center; background-color: #1a1714; }
.lp-tiles b:nth-child(1) { background-image: url("/landing/t01.jpg"); }
.lp-tiles b:nth-child(2) { background-image: url("/landing/t02.jpg"); }
.lp-tiles b:nth-child(3) { background-image: url("/landing/t03.jpg"); }
.lp-tiles b:nth-child(4) { background-image: url("/landing/t04.jpg"); }
.lp-tiles b:nth-child(5) { background-image: url("/landing/t05.jpg"); }
.lp-tiles b:nth-child(6) { background-image: url("/landing/t06.jpg"); }
.lp-tiles b:nth-child(7) { background-image: url("/landing/t07.jpg"); }
.lp-tiles b:nth-child(8) { background-image: url("/landing/t08.jpg"); }
.lp-tiles b:nth-child(9) { background-image: url("/landing/t09.jpg"); }
.lp-tiles b:nth-child(10) { background-image: url("/landing/t10.jpg"); }
.lp-tiles b:nth-child(11) { background-image: url("/landing/t11.jpg"); }
.lp-tiles b:nth-child(12) { background-image: url("/landing/t12.jpg"); }
.lp-strip { overflow: hidden; padding: 8px 0 24px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.lp-track { display: flex; width: max-content; animation: lp-marquee 70s linear infinite; }
.lp-set { display: flex; gap: 12px; padding-right: 12px; }
.lp-set img { display: block; height: 260px; width: auto; border-radius: 20px; background: var(--surface); object-fit: cover; }
.lp-strip:hover .lp-track { animation-play-state: paused; }
@keyframes lp-marquee { to { transform: translateX(-50%); } }
@media (min-width: 900px) { .lp-set img { height: 340px; } }
@media (prefers-reduced-motion: reduce) { .lp-track { animation: none; } .lp-strip { overflow-x: auto; } }

/* Casillas del telefono: fotos verticales, con el encuadre hacia arriba (caras y vestidos) */
.lp-tiles b { background-position: center 25%; }
.lp-tiles b:nth-child(n) { background-size: cover; background-position: center 22%; background-repeat: no-repeat; }
