/* Galerías · Xtra PC — "invitación de papel": marfil, champán y el azul de la marca.
   Diseñado en Floot (proyecto "Galerías Diseño"); tipografía servida desde /shared/fonts. */
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 600; font-display: swap; src: url('/shared/fonts/cormorant-600-italic.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('/shared/fonts/cormorant-500.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('/shared/fonts/cormorant-600.woff2') format('woff2'); }

:root {
  --azul: #29a9e1; --azul-osc: #1477a8; --azul-hover: #10648e;
  --bg: #fbf7f1; --card: #fffdf9; --surface: #f4ebe0; --muted-bg: #efe6da;
  --txt: #1b2a36; --muted: #6b6256; --border: #e6dccf; --tint: #e6f2f8; --tint-txt: #0f5c82;
  --ok: #2f7d57; --ok-bg: #e7f3ec; --off: #8a5a00; --off-bg: #fbf0dc; --danger: #b3402f;
  --radius: 14px; --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(74, 52, 30, .06), 0 2px 8px rgba(74, 52, 30, .05);
  --shadow-md: 0 2px 4px rgba(74, 52, 30, .05), 0 10px 24px rgba(74, 52, 30, .08);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--txt); line-height: 1.55;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(1200px 480px at 50% -140px, #fff 0%, transparent 70%), var(--bg);
  background-attachment: fixed;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 56px; }
.wrap.narrow { max-width: 560px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.2rem; }
p { margin: 0 0 .8em; }
a { color: var(--azul-osc); }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

/* Encabezado: logo de Xtra PC y la leyenda Galerías */
.top { background: transparent; border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; gap: 14px; padding-top: 12px; padding-bottom: 8px; }
.top img { width: 150px; height: auto; display: block; margin: -10px 0 -14px -8px; }
.top .tag { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.45rem; color: var(--azul-osc); }
.top .spacer { flex: 1; }

/* Tarjetas de papel */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 24px; margin: 20px 0; }
.card > h1:first-child, .card > h2:first-child { text-align: center; }

/* Portada del evento */
.hero { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; margin: 16px 0 0; }
.hero .cover-art, .hero .cover { display: block; width: 100%; height: 200px; object-fit: cover; margin: 0; border-radius: 0; }
.hero .cover-art {
  background:
    radial-gradient(120px 120px at 18% 30%, rgba(255, 255, 255, .75), transparent 70%),
    radial-gradient(180px 140px at 85% 80%, rgba(41, 169, 225, .35), transparent 70%),
    linear-gradient(135deg, #f3dfd0 0%, #ecd3c4 40%, #cfe6f2 100%);
}
.hero-body { text-align: center; padding: 0 24px 30px; margin-top: -1.1rem; }
.kicker { display: inline-block; margin: 0; padding: 4px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.names { margin: 12px 0 0; font-style: italic; font-size: clamp(2.6rem, 12vw, 3.9rem); line-height: 1.02; letter-spacing: -.01em; overflow-wrap: anywhere; }
.date { margin: 12px 0 0; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 220px; margin: 16px auto; }
.ornament i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent); }
.ornament b { width: 7px; height: 7px; transform: rotate(45deg); background: var(--azul); border-radius: 1px; }
.welcome { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.3rem; line-height: 1.45; color: var(--muted); }
.section-title { text-align: center; margin-top: 44px; }
.section-title h2 { font-style: italic; font-size: 2rem; margin: 0; }

/* Formularios */
label { display: block; font-weight: 600; font-size: .85rem; letter-spacing: .03em; color: var(--muted); margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 20px; min-height: 50px; color: var(--txt);
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg);
}
select { border-radius: var(--radius); padding-inline: 16px; }
textarea { min-height: 96px; border-radius: var(--radius); padding: 14px 18px; resize: vertical; }
input[type=file] { border-radius: 999px; padding: 6px 8px; background: var(--bg); color: var(--muted); font-size: .9rem; }
input[type=file]::file-selector-button {
  margin-right: 12px; padding: 9px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--tint); color: var(--tint-txt); font: inherit; font-weight: 700;
}
input[type=file]::file-selector-button:hover { background: #d4e9f3; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .tile:focus-visible, .open:focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(41, 169, 225, .38); border-color: var(--azul);
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 0 0 auto; }
.row .grow { flex: 1 1 200px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 1rem; letter-spacing: 0; color: var(--txt); margin: 12px 0; }
.check input { width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 6px; accent-color: var(--azul-osc); }

/* Botones en píldora: primario azul-osc con texto blanco */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 24px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  background: var(--azul-osc); color: #fff; box-shadow: 0 8px 18px rgba(20, 119, 168, .22);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--azul-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--azul-osc); border-color: var(--azul-osc); box-shadow: none; }
.btn.ghost:hover { background: var(--tint); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); box-shadow: none; }
.btn.block { width: 100%; }
.btn.big { min-height: 58px; font-size: 1.08rem; margin-top: 16px; }
.btn.small { min-height: 38px; padding: 6px 16px; font-size: .9rem; box-shadow: none; }

/* Estados en tonos apagados */
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--muted-bg); color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.off { background: var(--off-bg); color: var(--off); }
.banner { padding: 12px 16px; border-radius: var(--radius); margin: 14px 0; background: var(--off-bg); color: var(--off); font-size: .95rem; }
.banner.ok { background: var(--tint); color: var(--tint-txt); }
.error { color: var(--danger); font-weight: 600; text-align: center; margin: 12px 0 0; }
.error:empty { display: none; }
.hint { text-align: center; font-size: .82rem; color: var(--muted); margin: 12px 0 0; }

/* Progreso de subida */
#queue { margin-top: 20px; }
.file { padding: 12px 0; border-top: 1px solid var(--border); }
.file .name { display: flex; justify-content: space-between; gap: 10px; font-size: .94rem; word-break: break-all; }
.bar { height: 5px; border-radius: 999px; background: var(--muted-bg); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--azul), var(--azul-osc)); transition: width .2s; }
.file.done .bar > i { background: var(--ok); }
.file.done .muted { color: var(--ok); font-weight: 600; }
.file.fail .bar > i { background: var(--danger); }

/* Mosaico de recuerdos, como un álbum */
.grid { columns: 2; column-gap: 12px; margin-top: 16px; }
@media (min-width: 600px) { .grid { columns: 3; } }
.tile { position: relative; display: block; width: 100%; margin: 0 0 12px; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; background: var(--muted-bg); box-shadow: var(--shadow); break-inside: avoid; transition: transform .22s, box-shadow .22s; }
.tile:nth-child(3n + 1) { aspect-ratio: 3 / 4; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tile .open { position: absolute; inset: 0; border: 0; padding: 0; background: none; cursor: pointer; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .play { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; display: grid; place-items: center; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--azul-osc); box-shadow: var(--shadow-md); font-size: 1.1rem; padding-left: 3px; }
.tile .who { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 8px; font-size: .78rem; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(40, 26, 14, .6)); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 6px; z-index: 2; }
.tile .acts button { min-width: 42px; min-height: 42px; border-radius: 50%; border: 0; font-size: 1.1rem; cursor: pointer; background: rgba(255, 253, 249, .94); box-shadow: var(--shadow); color: var(--txt); }

/* Pestañas */
.tabs { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.tabs .btn { background: transparent; color: var(--azul-osc); border-color: var(--border); box-shadow: none; }
.tabs .btn.on { background: var(--azul-osc); color: #fff; border-color: var(--azul-osc); }

/* Visor */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(27, 20, 14, .93); display: grid; place-items: center; padding: 12px; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 88vh; border-radius: 14px; }
.lightbox .close { position: absolute; top: 12px; right: 12px; }

/* Tabla del administrador */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.scroll { overflow-x: auto; }
.mono { font-family: ui-monospace, 'SF Mono', Consolas, monospace; letter-spacing: .08em; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--txt); color: var(--bg); padding: 10px 20px; border-radius: 999px; z-index: 60; max-width: 90vw; }
footer.sign { margin-top: 44px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
