:root {
  --bg: #fff8f3;
  --surface: #ffffff;
  --surface-2: #fdeee6;
  --text: #2a1d1a;
  --muted: #7d6a64;
  --line: #f0dcd2;
  --brand: #ff5a3c;
  --brand-2: #ffa63d;
  --brand-ink: #ffffff;
  --like: #1fb57a;
  --danger: #d6334a;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(120, 50, 30, .12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1210; --surface: #251a17; --surface-2: #322320; --text: #f7ebe6; --muted: #b9a39b;
    --line: #3d2c28; --shadow: 0 10px 30px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.muted { color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }

/* barra superior */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a, .bottomnav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 600; position: relative; }
.topnav a.active, .bottomnav a.active { color: var(--brand); background: var(--surface-2); }
.badge-dot::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.topnav:empty + .lang { margin-left: auto; }
.lang button { border: 0; background: none; padding: 4px 10px; cursor: pointer; font-size: .85rem; color: var(--muted); }
.lang button.on { background: var(--text); color: var(--bg); }
.bottomnav { display: none; }

main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 24px 16px 32px; outline: none; }
.footer { text-align: center; padding: 16px; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }
.footer a { color: var(--muted); margin: 0 8px; }

/* botones y formularios */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .1s, box-shadow .2s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); box-shadow: 0 6px 18px rgba(255, 90, 60, .35); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: none; color: var(--danger); border: 1px solid currentColor; }
.btn-sm { padding: 6px 14px; font-size: .9rem; }
.btn[disabled] { opacity: .6; cursor: default; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input, select, textarea { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; min-height: 90px; }
.check { display: flex !important; grid-template-columns: none; gap: 10px !important; align-items: flex-start; font-weight: 500 !important; }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--brand); }
.error { color: var(--danger); font-weight: 600; min-height: 1.2em; margin: 0; }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }

/* portada */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 24px 0; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -.03em; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 32em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.hero-art { display: none; }
.hero-art .bubble { position: absolute; border-radius: 28px; box-shadow: var(--shadow); }
.hero-art .b1 { inset: 20px 90px 60px 20px; background: linear-gradient(160deg, #ff7a59, #ffb36b); transform: rotate(-6deg); }
.hero-art .b2 { inset: 70px 10px 10px 120px; background: linear-gradient(160deg, #6c5ce7, #ff7aa8); transform: rotate(7deg); }
.hero-art .spark { position: absolute; left: 50%; top: 46%; width: 92px; height: 92px; transform: translate(-50%, -50%); filter: drop-shadow(0 6px 16px rgba(0,0,0,.2)); }
.notice { font-size: .85rem; background: var(--surface-2); border-radius: 12px; padding: 8px 12px; color: var(--muted); }

.auth { max-width: 460px; margin: 0 auto; }

/* descubrir */
.discover { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: 80px; }
.filters h3 { font-size: 1rem; }
.stack { display: grid; justify-items: center; gap: 18px; }
.profile-card { width: min(380px, 100%); background: var(--surface); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.profile-card.leaving-left { animation: out-left .3s forwards; }
.profile-card.leaving-right { animation: out-right .3s forwards; }
@keyframes out-left { to { transform: translateX(-120%) rotate(-12deg); opacity: 0; } }
@keyframes out-right { to { transform: translateX(120%) rotate(12deg); opacity: 0; } }
.photo { position: relative; aspect-ratio: 3 / 4; background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .dots { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; }
.photo .dots span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.45); }
.photo .dots span.on { background: #fff; }
.photo .nav { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.photo .nav button { background: none; border: 0; cursor: pointer; }
.photo .overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 16px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; }
.photo .overlay h2 { margin: 0; font-size: 1.6rem; }
.photo .overlay .meta { opacity: .9; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.25); vertical-align: middle; margin-left: 6px; }
.profile-card .body { padding: 14px 18px 18px; }
.profile-card .body p { margin: 0 0 10px; }
.card-actions { display: flex; justify-content: center; gap: 22px; }
.round { width: 64px; height: 64px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); background: var(--surface); transition: transform .1s; }
.round:active { transform: scale(.92); }
.round svg { width: 28px; height: 28px; }
.round.pass { color: var(--muted); }
.round.like { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; width: 72px; height: 72px; }
.mini-actions { display: flex; gap: 8px; justify-content: flex-end; }
.linkish { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .85rem; text-decoration: underline; padding: 2px 4px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* matches y chat */
.list { display: grid; gap: 8px; }
.list a { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.list a:hover { border-color: var(--brand); }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.list .txt { min-width: 0; }
.list .txt strong { display: block; }
.list .txt span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat { display: grid; grid-template-rows: auto 1fr auto; height: calc(100vh - 190px); min-height: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-head .avatar { width: 42px; height: 42px; }
.chat-head .who { flex: 1; min-width: 0; }
.chat-log { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 75%; padding: 9px 14px; border-radius: 18px; background: var(--surface-2); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.msg time { display: block; font-size: .7rem; opacity: .7; margin-top: 2px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { border-radius: 999px; }
.safety { font-size: .8rem; color: var(--muted); text-align: center; padding: 4px 12px 0; }

/* perfil */
.photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photos-grid .ph { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.photos-grid img { width: 100%; height: 100%; object-fit: cover; }
.photos-grid .ph button { position: absolute; right: 6px; bottom: 6px; }
.photos-grid label.add { display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 14px; aspect-ratio: 3/4; cursor: pointer; color: var(--muted); font-weight: 700; text-align: center; padding: 8px; }
.photos-grid label.add input { display: none; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }

.legal { max-width: 720px; margin: 0 auto; }
.legal h2 { font-size: 1.1rem; margin-top: 1.4em; }

/* toast, diálogo, match */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
dialog { border: 0; border-radius: var(--radius); padding: 24px; width: min(440px, calc(100% - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(30, 10, 5, .55); }
dialog .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.match-pop { text-align: center; }
.match-pop h2 { font-size: 2rem; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.match-pop .pair { display: flex; justify-content: center; margin: 16px 0; }
.match-pop .pair img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.match-pop .pair img + img { margin-left: -20px; }
.match-pop .actions { justify-content: center; }

@media (max-width: 760px) {
  .hero, .discover, .two-col { grid-template-columns: 1fr; }
  .hero-art { height: 240px; order: -1; }
  .filters { position: static; }
  .topnav { display: none; }
  .lang { margin-left: auto; }
  .bottomnav:not(:empty) { display: flex; position: sticky; bottom: 0; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--line); padding: 6px; z-index: 10; }
  .chat { height: calc(100vh - 210px); }
  .form .row { grid-template-columns: 1fr; }
}

/* ===== Planes en grupo ===== */
.small { font-size: .85rem; }
.field { display: grid; gap: 6px; }
.field .label { font-weight: 600; font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: .88rem; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.mini-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.mini-chips span { font-size: .75rem; background: var(--surface-2); border-radius: 999px; padding: 2px 8px; }
.tag { background: var(--surface-2); color: var(--muted); }

.type-networking { --tc: #2d6cdf; }
.type-mixed { --tc: #e2475f; }
.type-friends { --tc: #10a37f; }
.type-badge { display: inline-block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, transparent); padding: 3px 10px; border-radius: 999px; }

/* portada */
.hero-table { position: relative; height: 340px; }
.hero-table .table-top { position: absolute; inset: 70px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; font-size: 64px; box-shadow: var(--shadow); }
.hero-table .seat { position: absolute; width: 58px; height: 58px; border-radius: 50%; border: 4px solid var(--bg); box-shadow: var(--shadow); }
.hero-table .s0 { left: calc(50% - 29px); top: 0; background: #6c5ce7; }
.hero-table .s1 { right: 22px; top: 60px; background: #10a37f; }
.hero-table .s2 { right: 22px; bottom: 60px; background: #2d6cdf; }
.hero-table .s3 { left: calc(50% - 29px); bottom: 0; background: #e2475f; }
.hero-table .s4 { left: 22px; bottom: 60px; background: #f2994a; }
.hero-table .s5 { left: 22px; top: 60px; background: #00a29a; }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.type-card { border-top: 5px solid var(--tc); padding: 18px; }
.type-card h3 { color: var(--tc); }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.how-step .num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--text); color: var(--bg); font-weight: 800; margin-bottom: 8px; }
.notice { margin-top: 20px; }

/* listado de planes */
.filters-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--muted); }
.tab.on { background: var(--tc, var(--text)); border-color: var(--tc, var(--text)); color: #fff; }
.selects { display: flex; gap: 8px; }
.selects select { width: auto; }
.event-list { display: grid; gap: 12px; }
.event-card { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; }
.event-card.is-joined { border-color: var(--brand); }
.event-card h3 { margin: 6px 0 2px; font-size: 1.1rem; }
.event-card p { margin: 0; }
.event-when { font-weight: 600; }
.event-when::first-letter { text-transform: uppercase; }
.event-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; font-size: 28px; }
.event-icon.big { width: 80px; height: 80px; font-size: 40px; flex: none; }
.event-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.joined-tag { font-size: .8rem; font-weight: 700; color: var(--brand); }
.status { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.status-grouped { background: #10a37f; color: #fff; }
.status-unfilled, .status-unplaced { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

/* grupo */
.back-link { display: inline-block; margin-bottom: 12px; text-decoration: none; font-weight: 600; }
.group-head { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.group-head h1 { font-size: 1.5rem; margin: 8px 0; }
.group-head p { margin: 2px 0; text-transform: none; }
.group-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.members { display: grid; gap: 10px; }
.member { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.member p { margin: 4px 0 0; }
.member .mini-actions { justify-content: flex-start; margin-top: 4px; }
.member-cta { align-self: center; }

/* chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 440px; }
.group-grid .chat { position: sticky; top: 80px; height: calc(100vh - 120px); }
.chat-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-body .chat-log { flex: 1; }
.msg .from { display: block; font-size: .75rem; color: var(--brand); }
.list-item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.list-item .txt { flex: 1; min-width: 0; }
.list-item .txt strong { display: block; }
.list-item .txt span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.list-item:hover { border-color: var(--brand); }
h2 + .list { margin-bottom: 24px; }
.profile-foot { display: flex; gap: 12px; justify-content: space-between; margin-top: 24px; flex-wrap: wrap; }
.toast a { color: inherit; }

@media (max-width: 760px) {
  .types, .how, .group-grid { grid-template-columns: 1fr; }
  .hero-table { height: 260px; order: -1; }
  .hero-table .table-top { inset: 55px 70px; }
  .event-card { grid-template-columns: 44px 1fr; }
  .event-card .event-icon { width: 44px; height: 44px; font-size: 22px; }
  .event-cta { grid-column: 1 / -1; }
  .event-cta .btn { width: 100%; }
  .group-grid .chat { position: static; height: 70vh; }
  .group-head { align-items: flex-start; }
  .group-head .event-icon.big { width: 56px; height: 56px; font-size: 28px; }
  .selects { width: 100%; } .selects select { flex: 1; }
}

/* cena semanal y reserva */
.venue-line { font-size: .9rem; margin: 2px 0 !important; }
.reservation { margin-bottom: 20px; border-left: 6px solid var(--muted); }
.reservation.res-requested { border-left-color: #f2994a; }
.reservation.res-confirmed { border-left-color: #10a37f; }
.reservation.res-cancelled { border-left-color: var(--danger); }
.res-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.res-head h2 { margin: 0; font-size: 1.2rem; }
.res-status { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: 4px 12px; border-radius: 999px; color: #fff; background: #f2994a; }
.res-confirmed .res-status { background: #10a37f; }
.res-cancelled .res-status { background: var(--danger); }
.res-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 14px 0 8px; }
.res-grid dt { color: var(--muted); font-size: .9rem; }
.res-grid dd { margin: 0; }
.res-code { font-size: 1.1rem; font-weight: 800; letter-spacing: .08em; background: var(--surface-2); padding: 2px 10px; border-radius: 8px; }
.res-demo { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px; }

/* verificación, buzón */
.verify-banner { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: color-mix(in srgb, #f2994a 16%, var(--surface)); border: 1px solid #f2994a; border-radius: 14px; padding: 10px 14px; margin-bottom: 16px; font-size: .92rem; }
.outbox { display: grid; gap: 12px; }
.mail-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; margin: 0; font-size: .92rem; }

/* verificación de identidad */
.verified-badge { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #10a37f; color: #fff; font-size: 11px; margin-left: 6px; vertical-align: middle; }
.identity .id-steps { padding-left: 20px; line-height: 1.7; }
.id-status { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-weight: 600; }
.id-declined, .id-duplicate, .id-expired_doc, .id-underage { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.id-review, .id-pending { background: color-mix(in srgb, #f2994a 16%, var(--surface)); }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* datos del documento en el perfil */
.id-data { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface-2); }
.id-data-head { font-weight: 700; }
.id-data .res-grid { margin: 8px 0 4px; }
