@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --ink: #1a1814;
  --muted: #7a7268;
  --paper: #f3efe8;
  --card: #fbf8f3;
  --line: #ddd4c6;
  --bronze: #8a6239;
  --bronze-d: #6e4c2b;
  --forest: #2e3d34;
  --alert: #d32f2f;
  --shadow: 0 18px 50px rgba(26, 24, 20, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 400;
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(138, 98, 57, .08), transparent 55%),
    var(--paper);
  color: var(--ink);
  min-height: 100vh;
  letter-spacing: .01em;
}

h1, h2, h3, .brand, .serif {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: .02em;
}

a { color: var(--bronze-d); text-decoration: none; }
a:hover { color: var(--bronze); }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(251, 248, 243, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand {
  font-size: 26px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  flex: none;
  min-width: 120px;
}
.brand em {
  font-style: italic;
  color: var(--bronze);
  font-weight: 500;
}
.nav {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 2px 4px;
  position: relative;
  z-index: 2;
}
.nav-item {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 52px;
  margin-left: 6px;
  padding: 4px 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 1;
}
.nav-item:hover { color: var(--ink); }
.nav-item.activo {
  color: var(--bronze-d);
}
.nav-item.activo span { font-weight: 700; }
.nav-item.activo .nav-ico,
.nav-item.activo svg {
  color: var(--bronze-d);
  stroke: currentColor;
  stroke-width: 2.2;
}
.nav-item.activo::after {
  content: "";
  width: 16px;
  height: 3px;
  border-radius: 3px;
  background: var(--bronze);
}
.nav-ico,
.nav svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px;
  max-height: 20px;
  display: block;
  overflow: hidden;
  pointer-events: none;
  flex: none;
}
.nav-badge,
.campana-badge {
  position: absolute;
  top: 0;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--alert);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  letter-spacing: 0;
  text-transform: none;
  pointer-events: none;
}

.campana {
  position: relative;
  margin-left: 6px;
  margin-bottom: 2px;
  z-index: 5;
  overflow: visible;
}
.campana-check {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.campana-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--muted);
  position: relative;
}
.campana-check:checked ~ .campana-btn,
.campana-btn:hover { color: var(--ink); }
.campana .nav-ico,
.campana svg {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px;
  max-height: 22px;
}
.campana-badge {
  top: 2px;
  right: 2px;
}
.campana-lista {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(320px, 86vw);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 14px;
  z-index: 40;
}
.campana-check:checked ~ .campana-lista { display: block; }
.campana-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 0 !important;
  font-size: 14px;
  font-weight: 400;
}
.campana-item:last-child { border: 0; padding-bottom: 0; }
.campana a {
  margin-left: 0 !important;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 400;
}
.campana-item .btn { margin-top: 8px; font-size: 12px; padding: 6px 12px; }

.topbar-logo {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin-left: 4px;
  color: inherit;
  text-decoration: none;
}
.topbar-logo:hover { color: inherit; }
.topbar-logo img {
  display: block;
  height: 78px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
  flex: none;
}
.topbar-lema {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.15;
  letter-spacing: .02em;
  color: var(--ink);
  white-space: nowrap;
}

.wrap { max-width: 1080px; margin: 28px auto; padding: 0 20px 64px; }
.grid { display: grid; grid-template-columns: 280px 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 26px;
}
.card h2, .card h3 { margin: 0 0 14px; font-size: 28px; }

.inicio-lado {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bronze);
  padding: 26px 22px 22px;
  min-height: 100%;
  box-shadow: var(--shadow);
}
.inicio-lado .kicker { color: var(--bronze); }
.inicio-lado .meta { color: var(--muted); }
.inicio-hora {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 56px;
  line-height: .95;
  margin: 6px 0 8px;
  letter-spacing: .02em;
  color: var(--ink);
}
.inicio-fecha {
  margin: 0 0 22px;
  color: #3f3a35;
  font-size: 16px;
  font-weight: 400;
  text-transform: capitalize;
}
.inicio-yo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.inicio-yo .avatar {
  border-color: var(--line);
  background: #ece4d8;
}
.inicio-lado .pet-chip {
  color: var(--ink);
  border-color: var(--line);
}
.inicio-atajos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 22px;
}
.inicio-atajos a {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  color: var(--bronze-d);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
}
.inicio-atajos a:hover {
  border-color: var(--bronze);
  color: var(--bronze);
}
.kicker {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 8px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}
.auth-visual {
  background:
    linear-gradient(160deg, rgba(26,24,20,.35), rgba(46,61,52,.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cpath fill='none' stroke='%23c4b49a' stroke-opacity='.18' d='M0 80h160M80 0v160'/%3E%3C/svg%3E"),
    #2e3d34;
  color: #f6f1ea;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 28px 40px 48px;
}
.auth-visual h2 {
  font-size: 48px;
  line-height: 1.1;
  margin: auto 0 12px;
  color: #f6f1ea;
}
.auth-visual p { max-width: 420px; color: #d9d0c4; font-weight: 300; }
.auth-carrusel {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 4 / 3;
  margin: 8px auto 28px;
  overflow: visible;
  background: transparent;
}
.auth-carrusel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
}
.auth-carrusel-slide.is-on { opacity: 1; }
.auth-carrusel-halo {
  position: absolute;
  inset: -28px;
  width: calc(100% + 56px);
  height: calc(100% + 56px);
  object-fit: cover;
  filter: blur(28px);
  opacity: .55;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.auth-carrusel-slide img:not(.auth-carrusel-halo) {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 46%, #000 42%, transparent 78%);
  mask-image: radial-gradient(ellipse 72% 68% at 50% 46%, #000 42%, transparent 78%);
}
.auth-carrusel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 65% at 50% 45%, transparent 40%, rgba(46, 61, 52, .55) 78%, rgba(26, 24, 20, .92) 100%);
}
.auth-carrusel-slide p {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 10%;
  z-index: 3;
  margin: 0;
  max-width: none;
  padding: 0;
  background: none;
  color: #f6f1ea;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 500;
  text-shadow: 0 2px 18px rgba(26, 24, 20, .7);
}
.auth-carrusel-dots {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 6px;
}
.auth-carrusel-dots button {
  width: 8px;
  height: 8px;
  border: 1px solid #c4b49a;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.auth-carrusel-dots button.is-on { background: #c4b49a; }
.auth-form {
  display: grid;
  place-items: center;
  padding: 40px 28px;
  background: var(--paper);
}
.auth-box { width: min(400px, 100%); background: transparent; border: 0; box-shadow: none; padding: 0; }
.auth-box h1 { font-size: 42px; margin: 0 0 8px; }

.input, select, textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  padding: 10px 0;
  font: inherit;
  color: var(--ink);
}
.input:focus, select:focus, textarea:focus {
  outline: none;
  border-bottom-color: var(--bronze);
}
textarea { min-height: 88px; resize: vertical; }
label {
  display: block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 0 6px;
}

.btn {
  display: inline-block;
  border: 1px solid var(--forest);
  cursor: pointer;
  background: var(--forest);
  color: #f6f1ea;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 12px 20px;
  border-radius: 0;
  text-decoration: none;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #f6f1ea; text-decoration: none; }
.btn.sec { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.sage { background: transparent; color: var(--bronze-d); border-color: var(--bronze); }
.btn.block { width: 100%; text-align: center; }
.btn-link {
  background: none; border: 0; padding: 0; color: var(--bronze-d);
  cursor: pointer; font: inherit; letter-spacing: .08em; text-transform: uppercase; font-size: 12px;
}

.avatar {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; background: #ece4d8; border: 1px solid var(--line);
}
.avatar.lg { width: 108px; height: 108px; }
.pet-cover {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  margin: -26px -26px 16px;
  width: calc(100% + 52px);
  background: #ece4d8;
  border-bottom: 1px solid var(--line);
}
.avatar.sm { width: 32px; height: 32px; }

.post { margin-bottom: 22px; }
.post.recien { outline: 2px solid var(--bronze); }
.feed-vivo { margin: 0 0 16px; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.post-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.post-head strong { display: block; font-family: "Cormorant Garamond", serif; font-size: 20px; }
.post-head small { color: var(--muted); letter-spacing: .04em; }
.post-fotos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 8px 0 14px;
}
.post-fotos.varias { grid-template-columns: 1fr 1fr; }
.post-fotos a.foto-abrir {
  display: block;
  height: 280px;
  background: #ece4d8;
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: zoom-in;
}
.post-fotos img.media {
  width: 100%;
  height: 280px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0;
}
.post-fotos video.media {
  width: 100%;
  min-height: 220px;
  height: 280px;
  object-fit: contain;
  background: #1c1916;
  display: block;
}
.post-fotos:not(.varias) video.media {
  height: auto;
  max-height: 460px;
}
.foto-lupa {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(26, 24, 20, .92);
  display: none !important;
  flex-direction: column;
  touch-action: none;
  overscroll-behavior: contain;
}
.foto-lupa.is-on {
  display: flex !important;
}
.foto-lupa-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  flex: 0 0 auto;
}
.foto-lupa-scroll {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px 24px;
}
.foto-lupa-scroll img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transform-origin: center center;
}
.meta { color: var(--muted); font-size: 13px; font-weight: 300; line-height: 1.5; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pets { display: flex; gap: 10px; flex-wrap: wrap; }
.pet-chip {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--line);
  border-radius: 0; padding: 6px 12px 6px 6px;
  color: var(--ink); text-decoration: none; font-size: 13px;
}
.pet-chip.on {
  border-color: var(--forest);
  background: rgba(46, 61, 52, .06);
}
.alert {
  background: transparent;
  border: 1px solid var(--bronze);
  color: var(--bronze-d);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}
.ok { border-color: var(--forest); color: var(--forest); }
.aviso-media { margin: 12px 0 0; }
.user-card { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.user-card.activo { border-color: var(--forest); }
.msg-layout { grid-template-columns: 260px 1fr; }
.msg-chat { min-width: 0; }
.user-card:last-child { border: 0; margin: 0; padding: 0; }
.circulo-persona {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.circulo-persona:last-child { border: 0; margin: 0; padding: 0; }
.circulo-persona .user-card { border: 0; margin: 0; padding: 0; }
.manada-circulo {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(46, 61, 52, .04);
}
.pet-chip.grande { padding: 8px 14px 8px 8px; }
.miembros-mini { margin-bottom: 16px; }
.miembros-mini .pets { margin-top: 8px; }
.pet-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0 0 14px;
  background: transparent;
}
.pet-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
  background: #ece4d8;
}
.pet-card strong { display: block; padding: 0 12px; font-size: 18px; font-family: "Cormorant Garamond", Georgia, serif; }
.pet-card .meta { padding: 0 12px; }
.page-title { font-size: 40px; margin: 0 0 6px; }
.page-lead { margin: 0 0 28px; }
.busca-caja { margin: 0 0 20px; }
.busca-caja .input { width: auto; flex: 1; min-width: 200px; }

.msg-thread { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 22px; max-height: 420px; overflow-y: auto; }
.msg-burbuja {
  max-width: 82%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: transparent;
}
.msg-burbuja.mia { align-self: flex-end; border-color: var(--forest); }
.msg-burbuja.suya { align-self: flex-start; }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { min-height: auto; padding: 20px 24px 28px; }
  .auth-visual h2 { font-size: 32px; }
  .auth-carrusel { aspect-ratio: 16 / 10; width: min(360px, 100%); margin: 4px auto 22px; }
  .auth-carrusel-slide p { font-size: 18px; }
  .grid, .grid-3 { grid-template-columns: 1fr; }
  .msg-layout { display: flex; flex-direction: column; }
  .msg-chat { order: -1; }
  .topbar { padding: 12px 12px; flex-wrap: wrap; gap: 8px; }
  .topbar-logo { flex: 1 1 100%; order: 3; padding: 4px 0; }
  .topbar-logo img { height: 64px; max-width: 74px; }
  .topbar-lema { font-size: 17px; white-space: normal; }
  .nav { margin-left: auto; }
  .nav-item { min-width: 44px; margin-left: 2px; font-size: 9px; padding: 2px 4px; }
  .nav-ico { width: 18px; height: 18px; }
}
