/* ==========================================================
   Ameibo · Estilos (diseño pensado para móvil)
   ========================================================== */
:root {
  --brand: #127C5A;
  --brand-2: #0E6249;
  --brand-soft: #E3F3EC;
  --like: #16A34A;
  --nope: #E5484D;
  --bg: #F6F5F1;
  --card: #FFFFFF;
  --text: #1C1F1E;
  --muted: #6B716E;
  --line: #E6E4DE;
  --warn: #B45309;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(20, 30, 25, .10);
  --tabbar: 64px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #DCE5E0; }
body { display: flex; justify-content: center; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: .5em 0; line-height: 1.45; }
.small { font-size: .82rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.warn { color: var(--warn); }

/* ---------- Contenedor "teléfono" ---------- */
#phone {
  position: relative; width: 100%; max-width: 480px; height: 100dvh;
  background: var(--bg); display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 560px) {
  body { align-items: center; }
  #phone { height: min(100dvh - 40px, 900px); border-radius: 32px; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
}
#view { flex: 1; overflow-y: auto; display: flex; flex-direction: column; padding-bottom: 16px; }
#view.chat-view { overflow: hidden; padding-bottom: 0; }
.pad { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Iconos ---------- */
.ic { width: 24px; height: 24px; flex: none; }
.ic.sm { width: 18px; height: 18px; vertical-align: -4px; }
.ic.xs { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------- Cabecera ---------- */
header.top {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px 10px;
  padding-top: max(14px, env(safe-area-inset-top)); position: sticky; top: 0; z-index: 5; background: var(--bg);
}
header.top h1 { font-size: 1.25rem; flex: 1; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--text); cursor: pointer; flex: none;
}

/* ---------- Botones ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 14px 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card);
  font-weight: 600; cursor: pointer; text-align: center; color: var(--text);
}
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:active { background: var(--brand-2); }
.btn.primary:disabled { opacity: .45; }
.btn.ghost { background: transparent; }
.btn.ghost.light { color: #fff; border-color: rgba(255,255,255,.5); }
.btn.ok { background: var(--like); border-color: var(--like); color: #fff; }
.btn.danger { background: transparent; color: var(--nope); border-color: #F3C6C7; }
.btn.sm { width: auto; padding: 9px 14px; font-size: .9rem; border-radius: 12px; }
.round {
  width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--shadow);
  display: grid; place-items: center; cursor: pointer; transition: transform .12s;
}
.round:active { transform: scale(.92); }
.round .ic { width: 30px; height: 30px; }
.round.nope { color: var(--nope); }
.round.like { color: var(--like); }
.round.like .ic { fill: var(--like); }
.round.info { width: 48px; height: 48px; color: var(--muted); }
.round.info .ic { width: 22px; height: 22px; }
.round.sm { width: 42px; height: 42px; }
.round.sm .ic { width: 20px; height: 20px; }
.round.primary { background: var(--brand); color: #fff; }

/* ---------- Formularios ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 1rem; font-weight: 400;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
textarea { resize: vertical; }
.error { color: var(--nope); font-size: .88rem; margin: 0; }
input[type=range] { width: 100%; accent-color: var(--brand); }
.range-label { display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.range-label b { color: var(--brand); }

fieldset.accept { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
fieldset.accept legend { font-weight: 700; font-size: .9rem; padding: 0 6px; }
.radio, .check { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; padding: 8px 0; font-weight: 500 !important; font-size: .95rem !important; cursor: pointer; }
.radio input, .check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.check { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 6px; padding-inline-start: 30px; }
.chip { display: inline-flex !important; cursor: pointer; }
.chip input { display: none; }
.chip span { padding: 7px 11px; border-radius: 999px; border: 1.5px solid var(--line); font-size: .8rem; font-weight: 500; background: #fff; }
.chip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-2); font-weight: 600; }

/* ---------- Etiquetas ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 5px 10px; border-radius: 999px; background: #F0EFEA; font-size: .78rem; font-weight: 600; }
.tag.value { background: var(--brand-soft); color: var(--brand-2); }
.tag.ok, .pill.ok { background: #DCFCE7; color: #166534; }
.pill { font-style: normal; padding: 4px 9px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.pill.off { background: #E7E5E4; color: #57534E; }

/* ---------- Acceso ---------- */
.auth { padding: 40px 24px 24px; display: flex; flex-direction: column; gap: 14px; justify-content: center; min-height: 100%; }
.brand { text-align: center; margin-bottom: 10px; }
.logo { width: 76px; height: 76px; border-radius: 24px; background: var(--brand); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; box-shadow: 0 10px 30px rgba(18,124,90,.35); }
.logo .ic { width: 40px; height: 40px; }
.brand h1 { font-size: 2rem; }
.brand p { color: var(--muted); }

/* ---------- Cajas ---------- */
.card-box { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.hero-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 8px auto; }
.hero-icon .ic { width: 34px; height: 34px; }
.empty { text-align: center; padding: 30px 24px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }

/* ---------- Elegir objeto ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick {
  position: relative; background: var(--card); border: 2px solid transparent; border-radius: var(--radius); padding: 10px;
  display: flex; flex-direction: column; gap: 4px; text-align: start; box-shadow: var(--shadow); cursor: pointer; color: var(--text);
}
.pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.pick.sel { border-color: var(--brand); }
.pick .pill { position: absolute; top: 16px; inset-inline-start: 16px; }
.pick.add { align-items: center; justify-content: center; border: 2px dashed var(--line); box-shadow: none; background: transparent; color: var(--brand); min-height: 180px; }

/* ---------- Explorar / swipe ---------- */
.explore-top { gap: 12px; }
.offer-chip {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 0;
  background: var(--card); box-shadow: var(--shadow); cursor: pointer; text-align: start; min-width: 0;
}
.offer-chip img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.offer-chip span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.offer-chip small { font-size: .7rem; color: var(--muted); }
.offer-chip b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.filter-line { padding: 0 20px; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck { position: relative; flex: 1; min-height: 400px; margin: 4px 16px 0; }
.swipe-card {
  --like: 0; --nope: 0;
  position: absolute; inset: 0; background: var(--card); border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,.12);
  overflow: hidden; display: flex; flex-direction: column; touch-action: none; user-select: none; cursor: grab;
  transform: translateY(calc(var(--i) * 10px)) scale(calc(1 - var(--i) * .04));
  transition: transform .28s ease, opacity .28s ease;
}
.swipe-card:active { cursor: grabbing; }
.swipe-card .photo { flex: 1; min-height: 0; background-size: cover; background-position: center; position: relative; }
.card-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.card-info h2 { font-size: 1.3rem; }
.card-info .desc { margin: 0; color: #3F4442; font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stamp {
  position: absolute; top: 26px; padding: 6px 12px; border: 4px solid; border-radius: 10px; font-weight: 900; font-size: 1.5rem; letter-spacing: 1px; background: rgba(255,255,255,.75);
}
.like-stamp { left: 20px; color: var(--like); transform: rotate(-14deg); opacity: var(--like); }
.nope-stamp { right: 20px; color: var(--nope); transform: rotate(14deg); opacity: var(--nope); }
.likes-mine { position: absolute; inset-inline-start: 12px; bottom: 12px; background: rgba(255,255,255,.95); padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--brand-2); }
.swipe-card.fly-right { transform: translate(150%, -30px) rotate(25deg) !important; opacity: 0; }
.swipe-card.fly-left { transform: translate(-150%, -30px) rotate(-25deg) !important; opacity: 0; }
.actions { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 16px 0 4px; }
.deck .empty { position: absolute; inset: 0; justify-content: center; }

/* ---------- Propuestas ---------- */
.group { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.group-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.group-head img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.group-head > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.prop { display: flex; align-items: center; gap: 8px; }
.prop.filtered { opacity: .75; }
.prop-main { flex: 1; display: flex; gap: 10px; align-items: center; background: none; border: 0; padding: 4px 0; text-align: start; cursor: pointer; min-width: 0; }
.prop-main img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.prop-main div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prop-actions { display: flex; gap: 8px; }
.hidden-toggle { background: #FFF7ED; color: var(--warn); border: 0; border-radius: 10px; padding: 9px; cursor: pointer; font-weight: 600; }
.hidden-list { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Listas (matches, inventario) ---------- */
.list { display: flex; flex-direction: column; gap: 10px; padding: 4px 16px 16px; }
.match-row, .inv-row {
  display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text);
}
.match-row .grow, .inv-row .grow { display: flex; flex-direction: column; gap: 2px; }
.match-row.unseen b { color: var(--brand-2); }
.pair-thumbs { position: relative; width: 64px; height: 56px; flex: none; }
.pair-thumbs img { position: absolute; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }
.pair-thumbs img:first-child { left: 0; top: 0; }
.pair-thumbs img:last-child { right: 0; bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex: none; }
.inv-row img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.inv-row.traded { opacity: .6; }
.section-title { margin: 10px 4px 0; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Chat ---------- */
.chat-top h1 { font-size: 1.1rem; }
.chat-top .grow { display: flex; flex-direction: column; }
.deal { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 4px 16px 10px; }
.deal button { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--card); border: 0; border-radius: 14px; padding: 6px; box-shadow: var(--shadow); cursor: pointer; text-align: start; min-width: 0; }
.deal img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }
.deal span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.swap-ic { font-size: 1.3rem; color: var(--brand); }
.small-btn { width: auto; margin: 0 16px 8px; padding: 10px; font-size: .9rem; }
.messages { flex: 1; overflow-y: auto; padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); }
.msg { max-width: 78%; padding: 10px 13px; border-radius: 18px; line-height: 1.35; font-size: .95rem; word-wrap: break-word; }
.msg time { display: block; font-size: .68rem; opacity: .6; margin-top: 3px; }
.msg.in { align-self: flex-start; background: var(--card); border-end-start-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.msg.out { align-self: flex-end; background: var(--brand); color: #fff; border-end-end-radius: 6px; }
.sys { align-self: center; text-align: center; font-size: .78rem; color: var(--muted); background: #EDEBE5; padding: 6px 12px; border-radius: 999px; max-width: 90%; }
.composer { display: flex; gap: 8px; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.composer input { border-radius: 999px !important; }
.closed-note { padding: 14px; margin: 0; background: var(--card); border-top: 1px solid var(--line); }

/* ---------- Detalle de objeto ---------- */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 6px; flex: none; }
.gallery img { width: 100%; flex: none; aspect-ratio: 4/3; object-fit: cover; scroll-snap-align: center; }
.sheet-panel .gallery img { border-radius: 16px; }

/* ---------- Fotos del formulario ---------- */
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--card); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph button { position: absolute; top: 4px; inset-inline-end: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ph.add { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px dashed var(--line); background: transparent; color: var(--brand); cursor: pointer; font-weight: 600; }

/* ---------- Perfil ---------- */
.profile { display: flex; align-items: center; gap: 14px; }
.profile > div:last-child { display: flex; flex-direction: column; }
.avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; }

/* ---------- Barra inferior ---------- */
#tabbar {
  display: flex; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--line); flex: none;
}
#tabbar a { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #9AA09D; font-size: .68rem; font-weight: 600; }
#tabbar a.active { color: var(--brand); }
#tabbar .badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--nope); color: #fff; font-size: .68rem; font-style: normal; display: grid; place-items: center; }

/* ---------- Hoja inferior ---------- */
#sheet { position: absolute; inset: 0; z-index: 30; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .25s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; background: var(--bg);
  border-radius: 24px 24px 0 0; padding: 8px 16px max(16px, env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .25s ease;
}
#sheet.open .sheet-backdrop { opacity: 1; }
#sheet.open .sheet-panel { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: #CFCBC2; margin: 0 auto 12px; }
.sheet-body { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }
.sheet-body form { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Modal de match ---------- */
#modal { position: absolute; inset: 0; z-index: 40; background: linear-gradient(160deg, #147F5C, #0A3C2D); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .3s; }
.match { text-align: center; color: #fff; display: flex; flex-direction: column; gap: 12px; width: 100%; }
.match h2 { font-size: 2.4rem; font-weight: 900; font-style: italic; }
.match-pair { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0; }
.match-pair img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.match-pair span { font-size: 2rem; }
.match-items { opacity: .95; }
.match .btn.primary { background: #fff; color: var(--brand-2); border-color: #fff; }
@keyframes fade { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Aviso ---------- */
#toast {
  position: absolute; left: 16px; right: 16px; bottom: calc(var(--tabbar) + 14px); z-index: 50; background: #1C1F1E; color: #fff;
  padding: 12px 16px; border-radius: 14px; font-size: .9rem; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: all .25s;
}
#toast.show { opacity: 1; transform: none; }
#toast.clickable { pointer-events: auto; cursor: pointer; }

/* ---------- Exploración general y ofertas ---------- */
.all-ic { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.all-ic .ic { width: 20px; height: 20px; }
.offer-chip .all-ic { flex: none; display: grid; }
.pick.all { flex-direction: row; align-items: center; gap: 12px; padding: 14px; }
.pick.all > span:last-child { display: flex; flex-direction: column; }
.likes-mine.soft { color: var(--text); font-weight: 600; max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.target-mini { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 14px; padding: 8px; }
.target-mini img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.target-mini div { display: flex; flex-direction: column; min-width: 0; }
.offer-list { display: flex; flex-direction: column; gap: 8px; }
.offer-opt { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; font-weight: 600; }
.offer-opt input { width: 20px; height: 20px; accent-color: var(--brand); }
.offer-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.filter-items { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.filter-item { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 8px 12px 8px 8px; color: var(--text); }
.filter-item img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.filter-item div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.filter-item > span { color: var(--brand); font-weight: 600; }

/* ---------- Cabecera de Explorar y filtros por categoría ---------- */
.brand-mini { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.filter-btn { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 0; background: var(--card); box-shadow: var(--shadow); font-weight: 700; cursor: pointer; }
.fcount { font-style: normal; background: var(--brand); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; font-size: .75rem; }
button.filter-line { background: none; border: 0; text-align: start; cursor: pointer; display: block; width: 100%; }
.chips.wide { padding: 4px 0 12px; }
.chips.wide .chip span { font-size: .85rem; padding: 9px 13px; }
.top-check { border-top: 0 !important; margin-top: 0 !important; padding-top: 4px !important; }
.note { background: #FFF7ED; color: #7C2D12; border-radius: 12px; padding: 10px 12px; font-size: .88rem; margin: 0; }

/* ---------- Botones de cierre del intercambio (chat) ---------- */
.trade-btns { display: flex; gap: 8px; margin: 0 16px 8px; }
.trade-btns .small-btn { flex: 1; margin: 0; padding: 10px 8px; font-size: .85rem; }
.trade-btns .btn.danger { background: var(--card); }
.match-row .grow .pill { align-self: flex-start; }

/* ---------- Botón Publicar en la barra inferior ---------- */
#tabbar a.main { color: var(--brand); }
.plus-btn { width: 44px; height: 44px; margin-top: -18px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(18,124,90,.4); border: 3px solid var(--card); box-sizing: content-box; }
#tabbar a { font-size: .64rem; }

/* ---------- Denuncia (chat) ---------- */
.report-btn { display: flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 999px; border: 1.5px solid #F3C6C7; background: var(--card); color: var(--nope); font-weight: 600; font-size: .8rem; cursor: pointer; flex: none; }
.report-btn:disabled { color: var(--muted); border-color: var(--line); cursor: default; }
.offer-opt:has(input[type=radio]) { font-weight: 500; }

/* ---------- Idiomas ---------- */
.auth select.lang-mini { width: auto; align-self: center; padding: 8px 12px; font-size: .85rem; border-radius: 999px; }
/* Árabe: lectura de derecha a izquierda. El gesto de swipe no cambia (derecha = me interesa). */
[dir=rtl] a.icon-btn .ic, [dir=rtl] .composer .ic { transform: scaleX(-1); }
[dir=rtl] .chips.wide { padding-inline-start: 0; }
[dir=rtl] .stamp { letter-spacing: 0; }
/* Textos escritos por usuarios en otro alfabeto: cada párrafo usa su propia dirección */
.card-info .desc, .msg, .sheet-body > p { unicode-bidi: plaintext; }

/* ---------- Secciones de los filtros de Explorar ---------- */
.filter-title { margin: 6px 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------- Recuperar descartados (filtros de Explorar) ---------- */
.restore-list { display: flex; flex-direction: column; gap: 6px; }
.restore-btn { padding: 10px 12px; font-size: .88rem; background: var(--card); }
.restore-btn:disabled { opacity: .45; cursor: default; }

/* ---------- Logotipo (propuesta C: de la a a la b) ---------- */
:root { --accent: #C2410C; }
.wm { font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-weight: 700; letter-spacing: -.04em; line-height: 1; color: var(--text); direction: ltr; unicode-bidi: isolate; display: inline-block; }
.wm .wa { color: var(--brand); }
.wm .wb { color: var(--accent); }
.wm.xl { font-size: 4.2rem; }
.wm.md { font-size: 2.4rem; margin-bottom: 14px; }
.wm.sm { font-size: 1.75rem; }
.wm-mark { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0 14px; color: var(--text); }
.wm-mark i { width: 10px; height: 10px; border-radius: 50%; }
.wm-mark .wa { background: var(--brand); }
.wm-mark .wb { background: var(--accent); }
.wm-mark .ic { width: 24px; height: 24px; }

/* ---------- Botón Matches destacado en naranja (segundo color de la marca) ---------- */
#tabbar a.main.accent, #tabbar a.main.accent.active { color: var(--accent); }
#tabbar a.accent .plus-btn { background: var(--accent); box-shadow: 0 6px 16px rgba(194,65,12,.4); }
#tabbar a.main .badge { top: -13px; left: calc(50% + 8px); background: #1C1F1E; border: 2px solid var(--card); box-sizing: border-box; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 4px; }

/* ==========================================================
   Explorar: cuadrícula de 4 fichas + ficha ampliada
   ========================================================== */
#view.explore-view { padding-bottom: 0; overflow: hidden; }
.back-pill { display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 16px 0 10px; border-radius: 22px; border: 0; background: var(--card); box-shadow: var(--shadow); font-weight: 700; cursor: pointer; color: var(--text); }
[dir=rtl] .back-pill .ic { transform: scaleX(-1); }

/* --- Cuadrícula --- */
.grid4 { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; padding: 2px 16px 96px; }
.grid4.n1, .grid4.n2 { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.gcard { position: relative; min-height: 0; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; }
.gcard.gone { opacity: 0; transform: scale(.85); }
.gcard-open { all: unset; box-sizing: border-box; width: 100%; height: 100%; display: flex; flex-direction: column; cursor: pointer; }
.gcard-open:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; border-radius: 18px; }
.gphoto { position: relative; flex: 1; min-height: 0; background-size: cover; background-position: center; display: block; }
.gbadge { position: absolute; left: 6px; right: 6px; bottom: 6px; background: rgba(255,255,255,.95); color: var(--brand-2); font-size: .68rem; font-weight: 700; padding: 4px 8px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ginfo { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 10px 10px; }
.ginfo b { font-size: .88rem; line-height: 1.2; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ginfo .tag { font-size: .7rem; padding: 2px 8px; }
.ginfo .small { font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.gcard-x { position: absolute; top: 6px; inset-inline-end: 6px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: var(--nope); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.gcard-x .ic { stroke-width: 2.8; }
.pass-all {
  position: absolute; left: 50%; bottom: calc(var(--tabbar) + 26px); transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 24px 0 9px; border-radius: 30px; border: 0;
  background: var(--card); box-shadow: 0 10px 28px rgba(20,30,25,.22); font-weight: 700; font-size: 1rem; cursor: pointer; color: var(--text); white-space: nowrap;
}
.pass-all > span { width: 42px; height: 42px; border-radius: 50%; background: #FDECEC; color: var(--nope); display: grid; place-items: center; }
.pass-all > span .ic { stroke-width: 3; }
.pass-all:active { transform: translateX(-50%) scale(.96); }

/* --- Ficha ampliada con botones flotantes --- */
.detail-area { position: relative; flex: 1; min-height: 0; margin: 0 16px; }
.swipe-card.big { inset: 0 0 34px 0; }
.swipe-card.big .card-info { padding-bottom: 66px; }
.float-btn { position: absolute; z-index: 4; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; cursor: pointer; transition: transform .12s; padding: 0; }
.float-btn:active { transform: scale(.92); }
.float-btn.nope, .float-btn.like { width: 88px; height: 88px; bottom: 6px; }
.float-btn.nope { left: -10px; background: var(--nope); color: #fff; box-shadow: 0 12px 28px rgba(229,72,77,.38); }
.float-btn.like { right: -10px; background: var(--like); color: #fff; box-shadow: 0 12px 28px rgba(22,163,74,.38); }
.float-btn.nope .ic, .float-btn.like .ic { width: 42px; height: 42px; stroke-width: 3; }
.float-btn.like .ic { fill: #fff; }
.float-btn.info { width: 58px; height: 58px; bottom: 30px; left: 50%; margin-left: -29px; background: #fff; color: var(--text); box-shadow: 0 10px 24px rgba(20,30,25,.22); }
.float-btn.info .ic { width: 28px; height: 28px; }
