/* FreePets — estilos. Modo claro y oscuro con las mismas variables; «Usar el del dispositivo» sigue
   prefers-color-scheme. Los colores de acento del perfil tienen un tono para cada modo, elegido
   para mantener contraste AA (tools/contrast.cjs). Sin estilos en línea: la CSP los bloquea.
   Criterio de diseño: un fondo, una tinta y un acento (frambuesa); el acento lleno solo en
   acciones y marcas chicas, sus tintes claros en las áreas. Sin degradés, sin sombras en reposo,
   superficies separadas por un paso de tono o una línea de 1 px. */

:root {
  --bg: #fbf8f9;
  --surface: #ffffff;
  --surface-2: #f3eff1;
  --text: #17131a;
  --muted: #5d5760;
  --border: #e6e0e3;
  --primary: #b8336a;
  --primary-hover: #9c2a59;
  --on-primary: #ffffff;
  --link: #9c2a59;
  --soft: #fdf0f6;
  --soft-ink: #6b1d3e;
  --focus: #1d4ed8;
  --ok-bg: #e3f5e9; --ok-text: #14532d;
  --warn-bg: #fff4d6; --warn-text: #713f12;
  --danger: #b91c1c; --danger-bg: #fdecec; --danger-text: #7f1d1d;
  --info-bg: #e8f0fe; --info-text: #1e3a8a;
  --float: 0 8px 28px rgb(23 19 26 / .14);
  --radius: 10px;
  --radius-sm: 8px;
  --header-h: 60px;
  --accent: var(--primary); --on-accent: var(--on-primary); --accent-ink: var(--link);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121013;
  --surface: #1b181c;
  --surface-2: #262227;
  --text: #f4f1f3;
  --muted: #b3acb4;
  --border: #353036;
  --primary: #f28cb6;
  --primary-hover: #f7aecb;
  --on-primary: #2a0b19;
  --link: #f6a6c7;
  --soft: #37182a;
  --soft-ink: #fac6dc;
  --focus: #93c5fd;
  --ok-bg: #12301e; --ok-text: #b7f0c9;
  --warn-bg: #3a2c0b; --warn-text: #fde68a;
  --danger: #f87171; --danger-bg: #3b1515; --danger-text: #fecaca;
  --info-bg: #172447; --info-text: #c7d7fe;
  --float: 0 10px 32px rgb(0 0 0 / .5);
  --accent: var(--primary); --on-accent: var(--on-primary); --accent-ink: var(--link);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #121013;
    --surface: #1b181c;
    --surface-2: #262227;
    --text: #f4f1f3;
    --muted: #b3acb4;
    --border: #353036;
    --primary: #f28cb6;
    --primary-hover: #f7aecb;
    --on-primary: #2a0b19;
    --link: #f6a6c7;
    --soft: #37182a;
    --soft-ink: #fac6dc;
    --focus: #93c5fd;
    --ok-bg: #12301e; --ok-text: #b7f0c9;
    --warn-bg: #3a2c0b; --warn-text: #fde68a;
    --danger: #f87171; --danger-bg: #3b1515; --danger-text: #fecaca;
    --info-bg: #172447; --info-text: #c7d7fe;
    --float: 0 10px 32px rgb(0 0 0 / .5);
    --accent: var(--primary); --on-accent: var(--on-primary); --accent-ink: var(--link);
    color-scheme: dark;
  }
}

/* Accent colours of a profile (each person chooses theirs): [light] / [dark]. */
.accent-naranja { --accent: #b13f0a; --accent-ink: #9a360a; }
.accent-coral { --accent: #b42318; --accent-ink: #a11f15; }
.accent-rosa { --accent: #be185d; --accent-ink: #a3154f; }
.accent-violeta { --accent: #6d28d9; --accent-ink: #5b21b6; } /* taste-skill-ignore: colour the person chooses for their own profile */
.accent-azul { --accent: #1d4ed8; --accent-ink: #1e40af; }
.accent-turquesa { --accent: #0f766e; --accent-ink: #0d6560; }
.accent-verde { --accent: #15803d; --accent-ink: #166534; }
.accent-ambar { --accent: #92400e; --accent-ink: #854d0e; }
[class*="accent-"] { --on-accent: #ffffff; }
:root[data-theme="dark"] .accent-naranja { --accent: #ff9a5c; --accent-ink: #ffad7a; }
:root[data-theme="dark"] .accent-coral { --accent: #ff8f80; --accent-ink: #ffa498; }
:root[data-theme="dark"] .accent-rosa { --accent: #f9a8d4; --accent-ink: #fbb6dc; }
:root[data-theme="dark"] .accent-violeta { --accent: #c4b5fd; --accent-ink: #cfc3fe; }
:root[data-theme="dark"] .accent-azul { --accent: #93c5fd; --accent-ink: #a7d0fe; }
:root[data-theme="dark"] .accent-turquesa { --accent: #5eead4; --accent-ink: #7ff0dd; }
:root[data-theme="dark"] .accent-verde { --accent: #86efac; --accent-ink: #9ff3bd; }
:root[data-theme="dark"] .accent-ambar { --accent: #fcd34d; --accent-ink: #fde07a; }
:root[data-theme="dark"] [class*="accent-"] { --on-accent: #14100c; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .accent-naranja { --accent: #ff9a5c; --accent-ink: #ffad7a; }
  :root[data-theme="system"] .accent-coral { --accent: #ff8f80; --accent-ink: #ffa498; }
  :root[data-theme="system"] .accent-rosa { --accent: #f9a8d4; --accent-ink: #fbb6dc; }
  :root[data-theme="system"] .accent-violeta { --accent: #c4b5fd; --accent-ink: #cfc3fe; }
  :root[data-theme="system"] .accent-azul { --accent: #93c5fd; --accent-ink: #a7d0fe; }
  :root[data-theme="system"] .accent-turquesa { --accent: #5eead4; --accent-ink: #7ff0dd; }
  :root[data-theme="system"] .accent-verde { --accent: #86efac; --accent-ink: #9ff3bd; }
  :root[data-theme="system"] .accent-ambar { --accent: #fcd34d; --accent-ink: #fde07a; }
  :root[data-theme="system"] [class*="accent-"] { --on-accent: #14100c; }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-tap-highlight-color: transparent; }
@media (pointer: fine) { html { overscroll-behavior: none; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
@media (min-width: 860px) { body { padding-bottom: 0; } }
img, video, canvas { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
a, button, summary, label, select, input[type=checkbox], input[type=radio] { touch-action: manipulation; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 1.15rem + 1.6vw, 2.25rem); font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 650; }
.h3, h3 { font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 .8rem; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; } /* skip-link target, not a control */
:target { scroll-margin-top: calc(var(--header-h) + 16px); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .5rem 1rem; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(680px, 100% - 2rem); }
.page-pad { padding-block: 1.5rem 3rem; }
.center { text-align: center; }
.muted, .meta { color: var(--muted); }
.meta { font-size: .92rem; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-bottom: .35rem; }
.lead { font-size: 1.06rem; color: var(--muted); }
.lead strong { color: var(--text); font-variant-numeric: tabular-nums; }
.hint { font-size: .88rem; color: var(--muted); }
.empty { color: var(--muted); }
.icon { flex: none; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.inline { display: inline; }
.ok-text { color: var(--ok-text); display: flex; gap: .3rem; align-items: center; }
.warn-text { color: var(--warn-text); }
.big-icon { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--soft); color: var(--soft-ink); margin-bottom: 1rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-weight: 600; font-size: inherit; }
.link-btn:hover { color: var(--text); text-decoration: underline; }

/* ------------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--border); }
.header-row { height: var(--header-h); display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.2rem; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--on-primary); }
.main-nav { display: none; gap: .15rem; margin-left: 1rem; }
.main-nav a { color: var(--text); text-decoration: none; padding: .45rem .75rem; border-radius: 999px; font-weight: 600; display: flex; align-items: center; gap: .35rem; transition: background-color .15s; }
.main-nav a:hover { background: var(--surface-2); }
.main-nav a[aria-current] { background: var(--soft); color: var(--soft-ink); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
@media (min-width: 860px) { .main-nav { display: flex; } }
@media (max-width: 859px) { .hide-mobile { display: none !important; } }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .badge { color: #1a0505; }
.badge[hidden] { display: none; }

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--float); padding: .4rem; z-index: 50; display: grid; gap: 2px; overscroll-behavior: contain; } /* taste-skill-ignore: real overlay (menu) */
.menu-panel a, .menu-panel button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .6rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); }
.menu-who { padding: .4rem .7rem .6rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; display: grid; }
.menu-who span { color: var(--muted); font-size: .9rem; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; transition: background-color .15s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn[disabled] { opacity: .4; cursor: default; }
.user-summary { border-radius: 50%; }
.when-dark { display: none; }
:root[data-theme="dark"] .when-dark { display: inline; }
:root[data-theme="dark"] .when-light { display: none; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .when-dark { display: inline; } :root[data-theme="system"] .when-light { display: none; } }

.theme-switch fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 2px; }
.theme-switch legend { font-weight: 700; padding: .3rem .7rem; }
.theme-option { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border-radius: 8px; cursor: pointer; }
.theme-option:hover { background: var(--surface-2); }
.theme-option:has(input:checked) { background: var(--soft); font-weight: 700; color: var(--soft-ink); }
.theme-option input { accent-color: var(--primary); }
.theme-switch .hint { padding: .2rem .7rem 0; margin: 0; }

.banner { padding: .7rem 0; font-weight: 600; }
.banner .wrap { display: flex; gap: .5rem; align-items: center; }
.banner-ok { background: var(--ok-bg); color: var(--ok-text); }
.banner-info { background: var(--info-bg); color: var(--info-text); }
.banner a { color: inherit; }

/* ------------------------------------------------------------------ buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1.15rem; border-radius: 999px; border: 1px solid transparent; font-weight: 650; text-decoration: none; cursor: pointer; line-height: 1.2; transition: background-color .15s, border-color .15s, transform .1s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--text) 25%, var(--border)); }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
:root[data-theme="dark"] .btn-danger { color: #1a0505; }
.btn-google { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-google:hover { background: var(--surface-2); }
.btn-sm { min-height: 36px; padding: .35rem .9rem; font-size: .9rem; }
.btn-lg { min-height: 52px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.btn-row form { margin: 0; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.file-btn { position: relative; }
.form label.btn { display: inline-flex; width: auto; justify-self: start; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.pad { padding: 1.1rem; }
@media (min-width: 640px) { .pad { padding: 1.4rem; } }
.card + .card, .card + form, form + .card { margin-top: 1rem; }

.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; }
.form small { font-weight: 400; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: .6rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background-color: var(--surface); color: var(--text);
  transition: border-color .15s;
}
input:not([type=checkbox]):not([type=radio]):hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--border)); }
select option { background-color: var(--surface); color: var(--text); }
textarea { resize: vertical; min-height: 90px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
input[type=file] { padding: .5rem 0; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .9rem; margin: 0; display: grid; gap: .8rem; }
legend { font-weight: 700; padding: 0 .3rem; }
.check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: .55rem !important; font-weight: 500 !important; cursor: pointer; }
.check input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.row-2, .row-3 { display: grid; gap: 1rem; }
@media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } .row-3 { grid-template-columns: repeat(3, 1fr); } }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: grid; place-items: center; padding: 0 .7rem; border: 1px solid var(--border); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--surface-2); color: var(--muted); }
.input-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
.inline-form { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 640px) { .inline-form { grid-template-columns: auto 1fr auto; } }
.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); background: var(--danger-bg); color: var(--danger-text); font-weight: 600; }
.alert-ok { background: var(--ok-bg); color: var(--ok-text); }
.alert-warn { background: var(--warn-bg); color: var(--warn-text); }
.divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); margin: 1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.stack-sm { margin-bottom: .5rem; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }

/* ------------------------------------------------------------------ home: feed + rail */
.home-grid { display: grid; gap: 2rem; padding-block: 1.2rem 3rem; }
@media (min-width: 1000px) { .home-grid { grid-template-columns: minmax(0, 600px) 330px; justify-content: center; gap: 3.5rem; padding-top: 1.8rem; } }
.feed-col { min-width: 0; }
.feed-tabs { margin: .2rem 0 1rem; }
.feed { display: grid; gap: 1rem; }
.feed-wrap { width: min(600px, 100% - 2rem); }
@media (max-width: 639px) { .feed-wrap { width: 100%; } .feed-wrap .comments-block { padding-inline: 1rem; } }

.rail { display: none; }
@media (min-width: 1000px) { .rail { display: grid; gap: 1.8rem; align-content: start; position: sticky; top: calc(var(--header-h) + 1.5rem); max-height: calc(100dvh - var(--header-h) - 2rem); overflow-y: auto; scrollbar-width: none; padding-bottom: 1rem; } }
.rail-block h2 { margin-bottom: .7rem; }
.rail-join { padding: 0; }
.rail-join p { font-size: .95rem; color: var(--muted); }
.quiet-btn { border-color: transparent; background: transparent; }
.rail-links, .rail-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.rail-links a, .rail-list a { display: flex; align-items: center; gap: .8rem; padding: .55rem .6rem; margin-inline: -.6rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; transition: background-color .15s; }
.rail-links a:hover, .rail-list a:hover { background: var(--surface-2); }
.rail-links .icon { color: var(--primary); }
.rail-links span, .rail-list span { display: grid; min-width: 0; line-height: 1.3; }
.rail-links small, .rail-list small { color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.thumb { flex: none; width: 52px; height: 52px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.rail-person { display: flex; align-items: center; gap: .7rem; padding: .3rem 0; }
.rail-person a { padding: 0; margin: 0; }
.rail-person a:hover { background: none; text-decoration: underline; }
.rail-foot { margin: .6rem 0 0; font-size: .92rem; font-weight: 600; }
.strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.strip-head a { font-weight: 600; font-size: .92rem; }

/* «Buscan familia» inside the feed (phones and tablets) */
.strip { padding: .9rem 0 .4rem; }
@media (min-width: 1000px) { .strip { display: none; } }
@media (max-width: 639px) { .strip { padding-inline: 1rem; } }
.strip ul { list-style: none; display: flex; gap: .7rem; overflow-x: auto; padding: .4rem 0 .6rem; margin: 0; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip ul::-webkit-scrollbar { display: none; }
.strip li { flex: none; width: 136px; scroll-snap-align: start; }
.strip li a { display: grid; gap: .1rem; color: var(--text); text-decoration: none; }
.strip-img { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); color: var(--muted); margin-bottom: .35rem; }
.strip-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.strip li a:hover img { transform: scale(1.04); }
.strip strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip span:last-child { color: var(--muted); font-size: .85rem; }

/* ------------------------------------------------------------------ posts (feed de fotos) */
.post { padding-bottom: .4rem; }
@media (min-width: 640px) { .post + .post, .feed > .post ~ .post { border-top: 1px solid var(--border); padding-top: .6rem; } .post-media { border-radius: var(--radius); overflow: hidden; } .post-head, .post-actions, .post-likes, .post-body, .post-more, .comments-preview, .post-reply, .post-body-lead { padding-inline: 0; } .post-actions { margin-inline: -.6rem; } }
@media (max-width: 639px) { .feed-col .feed, .feed-wrap { margin-inline: -1rem; } .feed-wrap { margin-inline: 0; } .feed-col .feed { gap: .6rem; } }
.post-head { display: flex; align-items: center; gap: .65rem; padding: .7rem .9rem; }
.post-head .who { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.who-name { color: var(--text); font-weight: 650; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-name:hover { text-decoration: underline; }
.post-head .handle { font-size: .86rem; }
.post-time { color: var(--muted); font-size: .86rem; text-decoration: none; flex: none; }
.post-time:hover { text-decoration: underline; }
.post-media { display: grid; gap: 2px; background: var(--surface-2); }
.post-media.count-2, .post-media.count-3, .post-media.count-4 { grid-template-columns: 1fr 1fr; }
.post-media.count-3 > :first-child { grid-column: 1 / -1; }
.post-media img { width: 100%; object-fit: cover; }
.post-media:not(.count-1) img { aspect-ratio: 1; }
.post-media.count-1 img { height: auto; /* keeps the width×height ratio of the file, so space is held before it loads */ max-height: min(78vh, 750px); object-fit: cover; }
.post-media.count-3 > img:first-child { aspect-ratio: 2 / 1; }
.post-media video { width: 100%; max-height: min(78vh, 750px); background: #000; }
.post-actions { display: flex; align-items: center; gap: .1rem; padding: .35rem .45rem 0; }
.post-actions form { margin: 0; display: contents; }
.act { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; color: var(--text); cursor: pointer; text-decoration: none; transition: background-color .15s, transform .12s; }
.act:hover { background: var(--surface-2); }
.act:active { transform: scale(.88); }
.act-quiet { color: var(--muted); }
.act-spacer { flex: 1; }
.like-btn[aria-pressed="true"] { color: var(--primary); }
.like-btn[aria-pressed="true"] svg path { fill: currentColor; }
.like-btn.pop svg { animation: pop .35s ease-out; }
@keyframes pop { 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
.post-likes { padding: 0 .9rem; margin: .1rem 0 .3rem; font-weight: 650; font-size: .95rem; font-variant-numeric: tabular-nums; }
.post-body { padding: 0 .9rem; overflow-wrap: anywhere; }
.post-body p { margin-bottom: .4rem; }
.post-body > .who-inline + p { display: inline; }
.post-body-lead { padding: .1rem .9rem .5rem; font-size: 1.12rem; line-height: 1.5; }
.who-inline { color: var(--text); font-weight: 650; text-decoration: none; }
.who-inline:hover { text-decoration: underline; }
.post-more { padding: 0 .9rem; margin: .2rem 0; }
.post-more a { color: var(--muted); text-decoration: none; }
.post-more a:hover { text-decoration: underline; }
.comments-preview { list-style: none; padding: 0 .9rem; margin: .2rem 0; display: grid; gap: .15rem; }
.comments-preview li { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-reply { display: block; padding: .5rem .9rem .85rem; color: var(--muted); text-decoration: none; font-size: .94rem; }
.post-reply:hover { color: var(--text); }
.post-text .post-likes { margin-top: 0; }

/* Comunidad estilo mensajes cortos (Twitter): avatar al costado, texto primero, fotos debajo. */
.tweet { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .75rem; padding: .9rem 1rem .35rem; }
.feed > .tweet + .tweet { border-top: 1px solid var(--border); }
@media (min-width: 640px) { .feed > .tweet ~ .tweet { padding-top: .9rem; } .tweet .post-actions { margin-inline: 0; } }
.tweet-avatar { padding-top: .1rem; }
.tweet-main { min-width: 0; }
.tweet-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .35rem; line-height: 1.3; }
.tweet-head .who-name { max-width: 100%; }
.tweet-head .handle, .tweet-dot { color: var(--muted); font-size: .92rem; }
.tweet-head .post-time { font-size: .92rem; }
.tweet-body { margin-top: .2rem; font-size: 1.04rem; line-height: 1.5; overflow-wrap: anywhere; }
.tweet-body p { margin: 0 0 .45rem; }
.tweet-body p:last-child { margin-bottom: 0; }
.tweet-full .tweet-body { font-size: 1.15rem; }
.tweet-media { margin-top: .65rem; border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); overflow: hidden; }
.tweet-media.count-1 img, .tweet-media video { max-height: 510px; }
.tweet-actions { gap: 1.5rem; padding: .3rem 0 0; margin-left: -.7rem; }
.tweet-actions .act { width: auto; min-width: 44px; height: 40px; padding: 0 .7rem; border-radius: 999px; display: inline-flex; gap: .4rem; color: var(--muted); }
.tweet-actions .like-btn[aria-pressed="true"] { color: var(--primary); }
.act-count { font-size: .9rem; font-variant-numeric: tabular-nums; min-width: 1ch; }
@media (max-width: 639px) { .feed-col .feed > .tweet { padding-inline: 1rem; } }

/* post page: comments */
.comments-block { margin-top: 1.4rem; }
.comments { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .9rem; }
.comment { display: flex; gap: .7rem; align-items: flex-start; }
.comment-main { min-width: 0; flex: 1; }
.comment-main p { margin: 0; overflow-wrap: anywhere; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; font-size: .84rem; color: var(--muted); margin-top: .15rem; }
.comment-meta form { margin: 0; }
.comment-meta a { color: var(--muted); font-weight: 600; text-decoration: none; }
.comment-meta a:hover { color: var(--text); text-decoration: underline; }
.comment:target .comment-main { background: var(--soft); border-radius: 8px; padding: .3rem .5rem; margin: -.3rem -.5rem; }
.comment-form-wrap { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); background: var(--bg); padding: .6rem 0; border-top: 1px solid var(--border); }
@media (min-width: 860px) { .comment-form-wrap { bottom: 0; } }
.comment-form { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: end; }
.comment-form .alert { grid-column: 1 / -1; margin: 0; }
.comment-form textarea { min-height: 46px; max-height: 160px; resize: none; border-radius: 22px; padding-inline: 1rem; }
.signin-cta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }

/* ------------------------------------------------------------------ choose what to publish */
.entry-grid { display: grid; gap: .6rem; margin-top: 1.2rem; }
.entry { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color .15s, background-color .15s; }
.entry:hover { border-color: var(--primary); background: var(--soft); }
.entry-icon { display: grid; place-items: center; flex: none; color: var(--primary); }
.entry-text { display: grid; gap: .1rem; flex: 1; }
.entry-text strong { font-size: 1.1rem; }
.entry-text span { color: var(--muted); }
.section { margin-top: 2.2rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.section-head a { display: inline-flex; align-items: center; gap: .2rem; font-weight: 600; }

/* ------------------------------------------------------------------ catalog & zone search */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.2rem; }
.page-head .lead { margin: 0; }
.catalog h1 { margin-bottom: .1rem; }
.count-line { color: var(--muted); margin: 0 0 1rem; font-variant-numeric: tabular-nums; }
/* «Filtro +»: the text and the plus are one button that opens the filter sheet */
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .8rem; margin-bottom: 1.2rem; min-height: 40px; }
.filter-toggle { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .3rem .3rem 0; color: var(--text); font-weight: 650; font-size: 1.02rem; text-decoration: none; border-radius: 999px; }
.filter-plus { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--text); color: var(--bg); transition: transform .15s; }
.filter-toggle:hover .filter-plus { transform: rotate(90deg); }
.filter-summary { color: var(--muted); font-size: .94rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.filter-clear { font-size: .94rem; font-weight: 600; }
.filter-form { display: grid; gap: 1.1rem; }
.zone-field { display: grid; gap: .3rem; min-width: 0; }
.zone-field label, .choice legend, .legend-like { font-weight: 650; font-size: .92rem; margin: 0 0 .1rem; padding: 0; }
.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.choice legend { width: 100%; margin-bottom: .4rem; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 36px; padding: .3rem .9rem; border-radius: 999px; background: var(--surface-2); font-weight: 600; font-size: .92rem; transition: background-color .15s, color .15s; }
.pill:hover span { background: color-mix(in srgb, var(--text) 10%, var(--surface-2)); }
.pill input:checked + span { background: var(--text); color: var(--bg); }
.pill input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.sheet-actions { position: sticky; bottom: -1.2rem; display: flex; justify-content: space-between; gap: .5rem; padding: .8rem 0 1.2rem; margin-bottom: -1.2rem; background: var(--surface); }
.sheet-actions .btn-primary { flex: 1; max-width: 260px; }
.zones ul { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.zones a { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .45rem .3rem .85rem; border-radius: 999px; background: var(--surface-2); color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; transition: background-color .15s; }
.zones a:hover { background: var(--soft); color: var(--soft-ink); }
.zone-count { display: inline-grid; place-items: center; min-width: 24px; padding: 0 .4rem; height: 22px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.empty-state { padding: 2rem 1rem; text-align: center; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.empty-state h2 { color: var(--text); }
.empty-state .btn-row { justify-content: center; }

.grid { display: grid; gap: 1rem .9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Listing card: one vertical box; photo fills it, text inside over a dark band at the bottom. */
.listing-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 3 / 4; isolation: isolate; }
.lc-link { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; color: #fff; text-decoration: none; }
.lc-link:focus-visible { outline-offset: -3px; border-radius: var(--radius); }
.lc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .4s; }
.lc-link:hover .lc-img { transform: scale(1.04); }
.lc-empty { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 30%; color: var(--muted); z-index: -2; }
/* Neutral scrim under the text (the one place a fade is allowed: legibility over a photo). */
.lc-link::after { content: ""; position: absolute; inset: 40% 0 0; z-index: -1; background: linear-gradient(to bottom, rgb(10 8 10 / 0), rgb(10 8 10 / .55) 35%, rgb(10 8 10 / .86)); } /* taste-skill-ignore: scrim under text on a photo */
.lc-top { display: flex; flex-wrap: wrap; gap: .35rem; padding: .6rem; }
.lc-text { display: grid; gap: .15rem; padding: .8rem .8rem .85rem; text-shadow: 0 1px 2px rgb(0 0 0 / .45); } /* taste-skill-ignore: legibility over a photo */
.lc-title { margin: 0 0 .15rem; font-size: 1.02rem; line-height: 1.25; font-weight: 700; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-line { display: flex; align-items: center; gap: .3rem; font-size: .84rem; color: rgb(255 255 255 / .92); min-width: 0; }
.lc-line .icon { flex: none; }
.lc-facts { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.listing-card .tag { background: rgb(255 255 255 / .92); color: #17131a; text-shadow: none; }
.listing-card .tag-done { background: #dcfce7; color: #14532d; }
.listing-card.is-resolved .lc-img { filter: grayscale(.35); }
@media (min-width: 760px) { .lc-title { font-size: 1.08rem; } }
.tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 650; background: var(--surface-2); color: var(--text); }
.tag-adoption { background: var(--soft); color: var(--soft-ink); }
.tag-sighting { background: var(--warn-bg); color: var(--warn-text); }
.tag-done { background: var(--ok-bg); color: var(--ok-text); }
.tag-expired { background: var(--warn-bg); color: var(--warn-text); }
.tag-live { background: var(--ok-bg); color: var(--ok-text); }
.more { display: flex; justify-content: center; margin-top: 1.5rem; }

.listing-grid { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .listing-grid { grid-template-columns: 1.1fr 1fr; align-items: start; gap: 2.5rem; } .gallery { position: sticky; top: calc(var(--header-h) + 1rem); } }
.gallery { display: grid; gap: .5rem; grid-template-columns: repeat(3, 1fr); }
.gallery-item { margin: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); aspect-ratio: 1; position: relative; }
.gallery-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery-item.is-main { grid-column: 1 / -1; aspect-ratio: 4 / 3; border-radius: var(--radius); }
.listing-info h1 { margin-bottom: .5rem; }
.listing-info .seen { color: var(--text); font-weight: 600; }
.author { display: flex; align-items: center; gap: .8rem; margin: 1rem 0; }
.author > div { display: grid; }
.handle { color: var(--muted); text-decoration: none; font-size: .92rem; }
a.handle:hover { color: var(--link); text-decoration: underline; }
.description { margin-top: 1.2rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin: 0 0 1rem; }
.facts div { background: var(--surface-2); border-radius: var(--radius-sm); padding: .6rem .8rem; }
.facts dt { font-size: .82rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 650; }
.owner-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: 1.2rem; background: var(--soft); border-color: transparent; color: var(--soft-ink); }
.owner-bar p { margin: 0; }
.report-link { color: var(--muted); font-size: .88rem; display: inline-flex; align-items: center; gap: .3rem; }

.photo-edit { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.photo-edit li { display: grid; gap: .3rem; }
.photo-edit img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; }
.previews { display: flex; flex-wrap: wrap; gap: .5rem; }
.previews:empty { display: none; }
.preview { position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.preview img, .preview video { width: 100%; height: 100%; object-fit: cover; }
.preview span { position: absolute; left: 4px; bottom: 4px; background: rgb(0 0 0 / .65); color: #fff; font-size: .72rem; padding: 0 5px; border-radius: 6px; }
.preview.is-bad { outline: 3px solid var(--danger); }
.field-error { color: var(--danger-text); background: var(--danger-bg); padding: .5rem .7rem; border-radius: 8px; font-weight: 600; font-size: .9rem; }

.mine-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.mine-item { display: grid; grid-template-columns: 88px 1fr; gap: .9rem; padding: .9rem; }
.mine-item.is-expired { background: color-mix(in srgb, var(--warn-bg) 55%, var(--surface)); }
.mine-thumb { display: block; width: 88px; height: 88px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.mine-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mine-body h2 a { color: var(--text); text-decoration: none; }
.mine-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; }
.mine-actions form { margin: 0; }
@media (min-width: 760px) { .mine-item { grid-template-columns: 96px 1fr auto; align-items: center; } .mine-thumb { width: 96px; height: 96px; } .mine-actions { grid-column: auto; justify-content: flex-end; max-width: 340px; } }

/* ------------------------------------------------------------------ avatars & stories */
.avatar { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; padding: 0; border: 0; background: var(--surface-2); color: var(--text); text-decoration: none; cursor: pointer; overflow: visible; }
.avatar img, .avatar .avatar-initial { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .avatar-initial { display: grid; place-items: center; font-weight: 750; background: color-mix(in srgb, var(--accent) 20%, var(--surface)); color: var(--accent-ink); }
.av-sm { width: 36px; height: 36px; font-size: .9rem; }
.av-md { width: 48px; height: 48px; }
.av-lg { width: 64px; height: 64px; font-size: 1.4rem; }
.av-xl { width: 128px; height: 128px; font-size: 2.8rem; }
.avatar.ring { padding: 2.5px; background: var(--primary); }
.avatar.ring img, .avatar.ring .avatar-initial { border: 2.5px solid var(--bg); }
.avatar.ring-seen { background: var(--border); }
button.avatar { transition: transform .15s; }
button.avatar:active { transform: scale(.94); }
span.avatar { cursor: default; }
.story-tray { margin: 1rem 0 .4rem; overflow-x: auto; scrollbar-width: none; }
.story-tray::-webkit-scrollbar { display: none; }
.story-tray ul { list-style: none; display: flex; gap: .9rem; padding: .3rem .1rem .5rem; margin: 0; }
.story-tray li { display: grid; justify-items: center; gap: .3rem; width: 72px; flex: none; }
.tray-name { font-size: .8rem; color: var(--text); text-decoration: none; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-name:hover { text-decoration: underline; }
.tray-add { display: grid; justify-items: center; gap: .3rem; text-decoration: none; color: var(--text); }
.add-ring { border: 2px dashed var(--border); color: var(--primary); background: var(--surface); transition: border-color .15s; }
.tray-add:hover .add-ring { border-color: var(--primary); }

.story-viewer { position: fixed; inset: 0; z-index: 100; background: rgb(8 6 8 / .94); display: grid; place-items: center; color: #fff; overscroll-behavior: contain; }
.story-viewer[hidden] { display: none; }
.sv-frame { position: relative; width: min(440px, 100vw); height: min(100dvh, 820px); display: flex; flex-direction: column; background: #000; overflow: hidden; }
@media (min-width: 600px) { .sv-frame { border-radius: 14px; height: min(92dvh, 820px); } }
.sv-progress { display: flex; gap: 4px; padding: 10px 10px 0; position: absolute; top: 0; left: 0; right: 0; z-index: 3; }
.sv-bar { flex: 1; height: 3px; background: rgb(255 255 255 / .35); border-radius: 3px; overflow: hidden; }
.sv-bar i { display: block; height: 100%; width: 0; background: #fff; }
.sv-bar.done i { width: 100%; }
.sv-head { position: absolute; top: 18px; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: .6rem; padding: 0 10px; text-shadow: 0 1px 3px rgb(0 0 0 / .6); } /* taste-skill-ignore: legibility over a photo */
.sv-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.sv-user { color: #fff; font-weight: 700; text-decoration: none; }
.sv-user:hover { text-decoration: underline; }
.sv-time { color: rgb(255 255 255 / .8); font-size: .85rem; }
.sv-close { margin-left: auto; background: rgb(0 0 0 / .35); color: #fff; border-color: transparent; font-size: 1.6rem; line-height: 1; }
.sv-stage { flex: 1; display: grid; place-items: center; }
.sv-stage img, .sv-stage video { width: 100%; height: 100%; object-fit: contain; }
.sv-prev, .sv-next { position: absolute; top: 70px; bottom: 90px; width: 35%; background: transparent; border: 0; color: #fff; cursor: pointer; z-index: 2; display: flex; align-items: center; opacity: 0; transition: opacity .15s; }
.sv-prev { left: 0; justify-content: flex-start; padding-left: 6px; }
.sv-next { right: 0; justify-content: flex-end; padding-right: 6px; }
.sv-prev:hover, .sv-next:hover, .sv-prev:focus-visible, .sv-next:focus-visible { opacity: 1; }
.sv-caption { position: absolute; bottom: 54px; left: 0; right: 0; text-align: center; padding: .6rem 1rem; margin: 0; background: rgb(0 0 0 / .55); z-index: 3; }
.sv-caption:empty { display: none; }
.sv-own { position: absolute; bottom: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; z-index: 3; font-size: .9rem; }
.sv-own[hidden] { display: none; }
.btn-ghost-light { background: rgb(255 255 255 / .14); color: #fff; border-color: rgb(255 255 255 / .3); }
.sv-report { position: absolute; bottom: 16px; right: 14px; color: rgb(255 255 255 / .85); font-size: .85rem; z-index: 3; }

/* ------------------------------------------------------------------ profile */
.cover { height: 170px; position: relative; overflow: hidden; }
@media (min-width: 760px) { .cover { height: 240px; } }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-patitas, .cover-thumb.cover-patitas { background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23ffffff' fill-opacity='.18'%3E%3Ccircle cx='14' cy='22' r='4'/%3E%3Ccircle cx='22' cy='14' r='4'/%3E%3Ccircle cx='32' cy='14' r='4'/%3E%3Ccircle cx='40' cy='22' r='4'/%3E%3Cellipse cx='27' cy='32' rx='8' ry='7'/%3E%3Ccircle cx='54' cy='58' r='3'/%3E%3Ccircle cx='60' cy='52' r='3'/%3E%3Ccircle cx='67' cy='52' r='3'/%3E%3Ccircle cx='73' cy='58' r='3'/%3E%3Cellipse cx='63.5' cy='65' rx='6' ry='5'/%3E%3C/g%3E%3C/svg%3E"); }
/* Flat colour fields (no gradients): each preset is one colour of a real place. */
.cover-atardecer { background: #c2410c; }
.cover-pradera { background: #3f6212; }
.cover-oceano { background: #0e7490; }
.cover-lavanda { background: #a78bfa; } /* taste-skill-ignore: colour the person chooses for their own profile */
.cover-noche { background: #1e1b3a; }
.cover-foto { background: var(--surface-2); }
.profile-head { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; align-items: start; margin-top: -56px; position: relative; }
.profile-avatar .avatar { border: 4px solid var(--bg); background-color: var(--bg); }
.profile-avatar .avatar.ring { border: 0; }
.profile-id { margin-top: 64px; min-width: 0; }
.profile-id h1 { margin: 0; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); overflow-wrap: anywhere; }
.profile .handle { color: var(--accent-ink); font-weight: 600; }
.profile-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; }
.profile-actions form { margin: 0; }
.menu-right { right: 0; left: auto; }
@media (min-width: 760px) { .profile-head { grid-template-columns: auto 1fr auto; } .profile-actions { grid-column: auto; margin: 72px 0 0; } }
.profile-about { margin-top: 1rem; }
.counts { display: flex; gap: 1.2rem; font-variant-numeric: tabular-nums; }
.counts a { color: var(--text); text-decoration: none; }
.counts a:hover { text-decoration: underline; }
.bio { max-width: 62ch; }
.social { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 0; }
.social a { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; transition: border-color .15s; }
.social a:hover { border-color: var(--accent); color: var(--accent-ink); }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-top: 1.4rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .7rem 1rem; color: var(--muted); text-decoration: none; font-weight: 650; border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { font-size: .78rem; background: var(--surface-2); padding: 0 .45rem; border-radius: 999px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tabs.small { margin: 1rem 0; }
.feed-tabs { margin-top: .4rem; }

.avatar-editor { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 640px) { .avatar-editor { grid-template-columns: auto 1fr; } .avatar-editor > form:last-child { grid-column: 2; } }
.cropper { display: grid; gap: .8rem; }
.cropper[hidden] { display: none; }
.crop-stage { width: min(320px, 100%); aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #111; cursor: grab; touch-action: none; position: relative; user-select: none; }
.crop-stage canvas { width: 100%; height: 100%; }
.crop-stage::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 9999px rgb(0 0 0 / .45); pointer-events: none; } /* taste-skill-ignore: crop mask, not decoration */
.crop-preview { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .9rem; }
.crop-preview canvas.round { border-radius: 50%; border: 1px solid var(--border); }
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.swatch { display: inline-flex !important; align-items: center; gap: .4rem !important; padding: .35rem .7rem .35rem .4rem; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-weight: 600 !important; }
.swatch input { position: absolute; opacity: 0; }
.swatch-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); }
.swatch:has(input:checked) { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: -1px; }
.swatch:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.cover-option { display: grid !important; gap: .3rem !important; cursor: pointer; font-weight: 600 !important; font-size: .9rem; }
.cover-option input { position: absolute; opacity: 0; }
.cover-thumb { display: block; height: 64px; border-radius: 8px; border: 2px solid var(--border); overflow: hidden; }
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cover-option:has(input:checked) .cover-thumb { border-color: var(--accent); outline: 2px solid var(--accent); }
.cover-option:has(input:focus-visible) .cover-thumb { outline: 3px solid var(--focus); outline-offset: 2px; }
.links-edit { padding: 0; list-style: none; display: grid; gap: .4rem; margin: 0 0 1rem; }
.links-edit li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem .7rem; background: var(--surface-2); border-radius: 8px; }
.links-edit li > span:first-child { display: flex; align-items: center; gap: .4rem; min-width: 0; overflow-wrap: anywhere; }
.edit-profile .card { margin-top: 1rem; }

/* ------------------------------------------------------------------ people & community */
.people { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; }
.person { display: flex; align-items: center; gap: .8rem; padding: .6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.person > div { display: grid; flex: 1; min-width: 0; }
.people.compact .person { border: 0; padding: .4rem 0; background: none; }
.search-inline { display: flex; gap: .5rem; width: min(100%, 420px); }
.search-inline.big { width: 100%; margin-bottom: 1rem; }
.community-grid { display: grid; gap: 1.5rem; margin-top: 1rem; }
@media (min-width: 960px) { .community-grid { grid-template-columns: minmax(0, 600px) 300px; justify-content: center; gap: 3rem; } }
@media (max-width: 639px) { .community .feed { margin-inline: -1rem; gap: .6rem; } }
.composer textarea { min-height: 80px; }
.composer-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }

/* «+» next to the title and the floating composer (a dialog: bottom sheet on phones) */
.title-row { display: flex; align-items: center; gap: .7rem; }
.title-row h1 { margin: 0; }
.community-head { align-items: center; }
.add-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--on-primary); text-decoration: none; transition: background-color .15s, transform .12s; }
.add-btn:hover { background: var(--primary-hover); }
.add-btn:active { transform: scale(.92); }
.join-line { margin: .4rem 0 1rem; }
.sheet { border: 0; padding: 0; margin: auto; width: min(560px, 100vw - 2rem); max-height: min(88dvh, 760px); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--float); overscroll-behavior: contain; } /* taste-skill-ignore: real overlay (dialog) */
.sheet[open] { display: flex; flex-direction: column; }
.sheet::backdrop { background: rgb(10 8 10 / .55); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem .8rem .7rem 1.2rem; border-bottom: 1px solid var(--border); }
.sheet-head h2 { margin: 0; }
.sheet-close { border: 0; background: transparent; }
.sheet-body { padding: 1rem 1.2rem 1.2rem; overflow-y: auto; }
.sheet .composer textarea { border: 0; padding: .2rem 0; min-height: 120px; background: transparent; resize: none; font-size: 1.08rem; }
.sheet .composer textarea:focus-visible { outline: none; }
.composer-who { display: flex; align-items: center; gap: .6rem; }
@media (max-width: 639px) {
  .sheet { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .sheet[open] { animation: sheet-up .25s ease-out; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
/* Without the modal API (dialog opened by the server after an error) it still shows on top. */
.sheet[open]:not(:modal) { position: fixed; inset: 0; z-index: 90; }

/* ------------------------------------------------------------------ chat */
.inbox { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.inbox-item { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: background-color .15s; }
.inbox-item:hover { background: var(--surface-2); }
.inbox-item.is-unread { border-color: var(--primary); background: var(--soft); }
.inbox-item.is-unread .inbox-last { color: var(--text); font-weight: 600; }
.inbox-link { flex: 1; min-width: 0; display: grid; gap: .1rem; color: var(--text); text-decoration: none; }
.inbox-top { display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; }
.inbox-top time { margin-left: auto; font-size: .8rem; }
.inbox-last { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat { display: flex; flex-direction: column; min-height: calc(100dvh - var(--header-h) - 80px); padding-bottom: 1rem; }
.chat-head { position: sticky; top: var(--header-h); z-index: 5; display: flex; align-items: center; gap: .7rem; padding: .7rem 0; background: var(--bg); border-bottom: 1px solid var(--border); }
.chat-head .who { display: grid; line-height: 1.25; }
.messages { list-style: none; padding: 1rem 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.msg { display: grid; gap: .25rem; max-width: 82%; }
.msg-mine { align-self: flex-end; justify-items: end; }
.msg-theirs { align-self: flex-start; }
.bubble { padding: .6rem .85rem; border-radius: 18px; background: var(--surface-2); overflow-wrap: anywhere; }
.msg-mine .bubble { background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; }
.msg-theirs .bubble { border-bottom-left-radius: 6px; }
.bubble-hidden { font-style: italic; opacity: .75; }
.msg-meta { font-size: .75rem; color: var(--muted); }
.msg-meta a { color: var(--muted); }
.ref-card { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; max-width: 340px; transition: border-color .15s; }
.ref-card:hover { border-color: var(--primary); }
.ref-card img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.ref-card span { display: grid; line-height: 1.3; }
.ref-card small { color: var(--muted); }
.ref-gone { opacity: .8; }
.ref-top { margin: 1rem 0 0; max-width: none; }
.composer-chat { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); display: flex; gap: .5rem; align-items: flex-end; padding: .6rem 0; background: var(--bg); }
@media (min-width: 860px) { .composer-chat { bottom: 0; } }
.composer-chat textarea { min-height: 46px; max-height: 160px; border-radius: 22px; }
.composer-chat .btn { width: 46px; padding: 0; flex: none; }
.composer-chat .alert { position: absolute; bottom: 100%; left: 0; right: 0; }

/* ------------------------------------------------------------------ misc */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6rem; }
blockquote { margin: .6rem 0; padding: .6rem .9rem; background: var(--surface-2); border-radius: 8px; overflow-wrap: anywhere; }
.mod-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.site-footer { margin-top: 2rem; padding: 1.4rem 0 1.8rem; color: var(--muted); font-size: .86rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-row p { margin: 0; }
.menu-theme { border-top: 1px solid var(--border); margin-top: .3rem; padding-top: .3rem; }
.menu-theme .theme-switch legend { font-size: .9rem; color: var(--muted); font-weight: 600; }
.footer-row a { color: var(--muted); }
.footer-row a:hover { color: var(--text); }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: var(--surface); border-top: 1px solid var(--border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
.tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; padding: 6px 0; }
.tabbar a[aria-current] { color: var(--text); }
.tabbar a[aria-current] .icon { color: var(--primary); }
.tabbar .badge { position: absolute; top: 0; right: 22%; }
.tabbar .tab-publish { justify-self: center; width: 48px; height: 40px; border-radius: 12px; background: var(--primary); color: var(--on-primary); place-items: center; padding: 0; }
@media (min-width: 860px) { .tabbar { display: none; } }

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

/* Photo description in the composer: shown once a photo is chosen (the previews are not empty). */
.alt-field { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
.alt-field small { font-weight: 400; color: var(--muted); }
.previews:empty + .alt-field { display: none; }

/* Home: pets in adoption as square «states» in a sideways row */
.adopt-tray { margin: .9rem 0 .6rem; }
.adopt-tray ul { list-style: none; display: flex; gap: .65rem; margin: 0; padding: .2rem 0 .5rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
.adopt-tray ul::-webkit-scrollbar { display: none; }
@media (max-width: 639px) { .adopt-tray ul { margin-inline: -1rem; padding-inline: 1rem; scroll-padding-inline: 1rem; } }
.adopt-tray li { flex: none; scroll-snap-align: start; }
.at-tile { display: grid; gap: .3rem; width: 96px; color: var(--text); text-decoration: none; }
@media (min-width: 640px) { .at-tile { width: 108px; } }
.at-img { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); color: var(--muted); outline: 2.5px solid var(--primary); outline-offset: 2px; margin: 4px; transition: transform .15s; }
.at-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.at-tile:hover .at-img { transform: scale(1.03); }
.at-tile:active .at-img { transform: scale(.96); }
.at-place { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem .4rem .3rem; font-size: .7rem; font-weight: 600; color: #fff; background: linear-gradient(to bottom, rgb(10 8 10 / 0), rgb(10 8 10 / .75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; } /* taste-skill-ignore: scrim under text on a photo */
.at-name { font-size: .8rem; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 2px; }
.at-add .at-img { outline: 2px dashed var(--border); outline-offset: 0; background: var(--surface); color: var(--primary); }
.at-add:hover .at-img { outline-color: var(--primary); }
.at-more .at-img { outline-color: var(--border); outline-offset: 0; font-weight: 700; color: var(--text); font-size: .9rem; }

/* Back arrow in the top bar on secondary screens */
.back-btn { border-color: transparent; background: transparent; margin-left: -.5rem; flex: none; }
.back-btn:hover { background: var(--surface-2); }
@media (max-width: 639px) { .brand.has-back .brand-mark { display: none; } }

/* Beta pública */
.beta-note { margin: 0; padding: .55rem 1rem; background: #fff3c4; color: #4d3a00; font-size: .9rem; line-height: 1.4; text-align: center; text-wrap: balance; }
[data-theme="dark"] .beta-note { background: #3d3000; color: #ffe8a0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .beta-note { background: #3d3000; color: #ffe8a0; } }
.beta-card p { margin: 0; }

/* Presentación al inicio (celular) y página «Nosotros» */
.intro-card { position: relative; margin: 0 0 1rem; padding: 1rem 3rem 1rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.intro-card h2 { margin: 0 0 .35rem; font-size: 1.05rem; line-height: 1.3; text-wrap: balance; }
.intro-card p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.intro-card .intro-actions { margin-top: .75rem; }
.intro-close { position: absolute; top: .4rem; right: .4rem; margin: 0; }
.intro-close .icon-btn { width: 44px; height: 44px; }
@media (min-width: 1000px) { .intro-card { display: none; } }
.rail-about p { margin: 0 0 .4rem; color: var(--muted); }
.about h1 { text-wrap: balance; }
.about-lead { font-size: 1.12rem; }
.about .btn-row { margin-top: 1.5rem; }
