/* Archivo (SIL Open Font License), subconjunto latino servido desde aquí: sin depender de Google en el local. */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 600 800; font-stretch: 62% 125%; font-display: swap;
  src: url(/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
:root {
  --bg: #0b0a09;
  --bg-2: #151311;
  --bg-3: #1f1c19;
  --line: #2e2a25;
  --cream: #efe7d6;
  --cream-2: #b9b0a0;
  --cream-3: #847c6f;
  --accent: #e0563b;
  --accent-ink: #160907;
  --ok: #9bc59d;
  --radius: 14px;
  --display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--cream); font: 16px/1.45 var(--body);
  min-height: 100dvh; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.screen { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---- marca ---- */
.brand {
  font-family: var(--display); font-weight: 800; font-stretch: 70%; letter-spacing: .02em;
  text-transform: uppercase; font-size: 15px; display: inline-flex; gap: .4em; align-items: baseline;
}
.brand b { color: var(--accent); font-weight: 800; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.count-pill { font-size: 13px; color: var(--cream-2); font-variant-numeric: tabular-nums; }
.count-pill strong { color: var(--cream); }

/* ---- landing ---- */
.hero { min-height: 100dvh; display: flex; flex-direction: column; padding: 22px 0 28px; }
.hero .wrap { flex: 1; display: flex; flex-direction: column; width: 100%; }
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.hero-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 36px 0 24px; }
.kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--cream-3); margin: 0 0 18px; }
h1, .h1 {
  font-family: var(--display); font-weight: 800; font-stretch: 62%; text-transform: uppercase;
  font-size: clamp(54px, 17vw, 96px); line-height: .88; letter-spacing: -.01em; margin: 0;
}
h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 18px; color: var(--cream-2); margin: 22px 0 0; max-width: 30ch; }
.live-count {
  display: flex; align-items: baseline; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line);
}
.live-count .n { font-family: var(--display); font-stretch: 62%; font-weight: 800; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.live-count .l { color: var(--cream-2); font-size: 14px; }
.how { color: var(--cream-3); font-size: 14px; margin: 14px 0 0; }
.hero-cta { display: grid; gap: 10px; }

/* ---- botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); text-decoration: none;
  font-weight: 650; letter-spacing: .01em; transition: transform .12s ease, background .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--cream); color: var(--bg); border-color: var(--cream);
  font-family: var(--display); font-stretch: 75%; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 17px;
}
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link { background: none; border: 0; padding: 6px 0; color: var(--cream-2); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }

/* ---- formularios ---- */
.form { display: grid; gap: 16px; padding: 18px 0 32px; }
.form h2 { font-family: var(--display); font-stretch: 62%; font-weight: 800; font-size: 44px; line-height: .9; text-transform: uppercase; margin: 8px 0 0; }
.form .sub { color: var(--cream-2); margin: -6px 0 4px; }
.field { display: grid; gap: 6px; }
.field label, .label { font-size: 13px; color: var(--cream-2); letter-spacing: .02em; }
.input {
  width: 100%; min-height: 54px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); font-size: 17px; outline: none;
}
.input:focus { border-color: var(--cream-2); }
.input-ig { position: relative; }
.input-ig span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--cream-3); font-size: 17px; pointer-events: none; }
.input-ig .input { padding-left: 34px; }
textarea.input { min-height: 76px; padding: 14px 16px; resize: none; }
.hint { font-size: 12.5px; color: var(--cream-3); }
.error-text { color: var(--accent); font-size: 14px; min-height: 0; }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: 14.5px; color: var(--cream-2); cursor: pointer; }
.check input { appearance: none; width: 26px; height: 26px; margin: 0; border-radius: 8px; border: 1.5px solid var(--cream-3); background: var(--bg-2); display: grid; place-items: center; }
.check input:checked { background: var(--cream); border-color: var(--cream); }
.check input:checked::after { content: ''; width: 12px; height: 7px; border: 2.5px solid var(--bg); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check strong { color: var(--cream); font-weight: 600; }
.consents { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
details.more { border: 1px solid var(--line); border-radius: var(--radius); }
details.more summary { list-style: none; padding: 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: '+'; font-size: 22px; color: var(--cream-3); }
details.more[open] summary::after { content: '–'; }
details.more .inner { padding: 0 16px 16px; display: grid; gap: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2);
  font-size: 14px; color: var(--cream-2); display: inline-flex; align-items: center;
}
.chip[aria-pressed="true"] { background: var(--cream); color: var(--bg); border-color: var(--cream); font-weight: 600; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px 16px; margin: 0 -16px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-scroll .chip { flex: none; }

/* ---- tarjetas ---- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .grid { gap: 14px; } }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card.is-dismissed { opacity: .55; }
.photo { position: relative; aspect-ratio: 1; background: var(--bg-3); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.initials {
  position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-stretch: 62%;
  font-weight: 800; font-size: 64px; color: var(--cream-3); text-transform: uppercase;
  background: repeating-linear-gradient(135deg, var(--bg-3) 0 10px, var(--bg-2) 10px 20px);
}
.photo .tag { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: var(--cream); color: var(--bg); }
.photo .tag.match { background: var(--accent); color: var(--accent-ink); }
.photo .loading { position: absolute; bottom: 8px; left: 8px; right: 8px; font-size: 11px; color: var(--cream-2); text-align: center; }
.card-body { padding: 10px 10px 8px; display: grid; gap: 4px; min-width: 0; }
.card-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-user { font-size: 12.5px; color: var(--cream-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-bio { font-size: 13px; color: var(--cream-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.card-tags span { font-size: 11px; color: var(--cream-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; }
.card-tags span.shared { border-color: var(--cream-3); color: var(--cream); }
.card-actions { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 6px; padding: 8px 10px 10px; margin-top: auto; }
.icon-btn {
  min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--cream);
}
.icon-btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn.liked { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.icon-btn.more { color: var(--cream-3); }

/* tarjeta ancha (matches) */
.row-card { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; padding: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.row-card .photo { border-radius: 10px; }
.row-card .initials { font-size: 34px; }
.row-card .actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; }
.list { display: grid; gap: 10px; }

/* tiras horizontales */
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 10px; }
.section-title h3 { font-family: var(--display); font-stretch: 70%; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: 15px; margin: 0; }
.section-title span { font-size: 12.5px; color: var(--cream-3); }
.strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 0 16px; margin: 0 -16px; scroll-snap-type: x proximity; }
.strip::-webkit-scrollbar { display: none; }
.strip .mini { flex: none; width: 76px; text-align: center; scroll-snap-align: start; background: none; border: 0; padding: 0; }
.strip .mini .photo { border-radius: 50%; border: 2px solid var(--line); }
.strip .mini.new .photo { border-color: var(--cream); }
.strip .mini .initials { font-size: 30px; }
.strip .mini small { display: block; margin-top: 6px; font-size: 12px; color: var(--cream-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .card { flex: none; width: 62%; max-width: 240px; scroll-snap-align: start; }
.featured-head { font-family: var(--display); font-stretch: 62%; font-weight: 800; font-size: 30px; line-height: .9; text-transform: uppercase; margin: 26px 0 12px; }
.featured-head small { display: block; font-family: var(--body); font-stretch: 100%; font-size: 12px; letter-spacing: .12em; color: var(--accent); margin-bottom: 6px; font-weight: 700; }

.prompt { margin: 14px 0 0; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--bg-2); border-radius: 0 12px 12px 0; font-size: 15px; }
.notice { margin: 12px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); font-size: 14px; color: var(--cream-2); }
.notice strong { color: var(--cream); }
.new-banner { position: sticky; top: 62px; z-index: 15; display: flex; justify-content: center; pointer-events: none; height: 0; }
.new-banner button { pointer-events: auto; transform: translateY(6px); box-shadow: 0 8px 24px rgba(0,0,0,.5); }

.empty { text-align: center; padding: 48px 12px; color: var(--cream-2); }
.empty .h1 { font-size: 44px; color: var(--cream); margin-bottom: 12px; }
.sentinel { height: 1px; }
.loader { text-align: center; color: var(--cream-3); font-size: 13px; padding: 18px 0; }
.skel { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: sk 1.4s linear infinite; border-radius: var(--radius); aspect-ratio: .72; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---- navegación inferior ---- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 9px; text-decoration: none; color: var(--cream-3); font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; position: relative; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--cream); }
.badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* ---- diálogos y avisos ---- */
dialog { border: 0; padding: 0; background: transparent; color: var(--cream); max-width: 100vw; max-height: 100dvh; }
dialog::backdrop { background: rgba(5, 4, 3, .82); }
.sheet { width: min(560px, 100vw); background: var(--bg-2); border-radius: 22px 22px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
dialog.bottom { margin: auto auto 0; }
dialog.center { margin: auto; }
.sheet h3 { margin: 0; font-family: var(--display); font-stretch: 70%; font-weight: 800; text-transform: uppercase; font-size: 22px; }
.match-modal { width: min(420px, calc(100vw - 32px)); text-align: center; display: grid; gap: 18px; padding: 28px 20px 20px; background: var(--bg); border: 1px solid var(--line); border-radius: 24px; }
.match-modal .h1 { font-size: 64px; }
.match-modal .h1 em { color: var(--accent); font-style: normal; }
.match-modal .pair { display: flex; justify-content: center; }
.match-modal .pair .photo { width: 120px; border-radius: 50%; border: 3px solid var(--bg); }
.match-modal .pair .photo + .photo { margin-left: -22px; border-color: var(--accent); }
.match-modal .pair .initials { font-size: 44px; }
.toast-host { position: fixed; left: 0; right: 0; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 60; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; background: var(--cream); color: var(--bg); border-radius: 14px; padding: 12px 16px; font-size: 14.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: 520px; animation: tin .22s ease-out; }
.toast.err { background: var(--accent); color: var(--accent-ink); }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 70; background: var(--accent); color: var(--accent-ink); text-align: center; font-size: 13px; font-weight: 700; padding: 6px; }

.me-card { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; margin: 18px 0; }
.me-card .photo { border-radius: 16px; }
.stack { display: grid; gap: 12px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; background: var(--bg-2); }
.panel h4 { margin: 0; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--cream-2); }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 15px; }
.switch { appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--bg-3); border: 1px solid var(--line); position: relative; flex: none; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--cream-3); transition: transform .18s ease; }
.switch:checked { background: var(--cream); }
.switch:checked::after { transform: translateX(20px); background: var(--bg); }
.danger { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.foot { color: var(--cream-3); font-size: 12.5px; text-align: center; padding: 26px 0 10px; }
.foot a { color: var(--cream-2); }

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

/* arreglos tras la prueba en Chrome */
.badge[hidden] { display: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.card-actions { grid-template-columns: 1fr 44px 44px; }
.card-actions .icon-btn span { white-space: nowrap; }
.photo-wrap { position: relative; }
.photo-wrap .tag { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: var(--cream); color: var(--bg); }
.photo-wrap .tag.match { background: var(--accent); color: var(--accent-ink); }
.privacy { padding-top: 24px; padding-bottom: 48px; max-width: 680px; }
.privacy .h1 { font-size: 48px; margin: 20px 0 6px; }
.privacy .stack { gap: 18px; color: var(--cream-2); }
.privacy h4 { color: var(--cream); }
.card-actions { grid-template-columns: minmax(0, 1fr) 44px; }
.photo-more { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(11, 10, 9, .62); color: var(--cream); }
.photo-more svg { width: 18px; height: 18px; }
