/* BuenosAiresYa Social - hoja de estilos principal (diseño 2.0)
   Sistema de diseño: tokens en :root, modo oscuro automático, componentes redondeados y con profundidad suave. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light dark;
  /* Marca: celeste bonaerense + azul profundo + acento sol */
  --blue: #1a73e0;
  --blue-hover: #145cb3;
  --navy: #0b1f3f;
  --sky: #38a3f5;
  --sun: #f6b40e;
  --brand-grad: linear-gradient(135deg, #38a3f5 0%, #1f5fd6 55%, #5b3fd6 100%);
  --blue-50: #eaf2ff;
  --blue-100: #d3e4ff;
  /* Superficies */
  --bg: #ffffff;
  --bg-grad: none;
  --card: #ffffff;
  --card-2: #f7f9f9;
  --hover: #f0f3f6;
  --line: #eff3f4;
  --line-strong: #cfd9de;
  --text: #16202f;
  --heading: #0b1f3f;
  --muted: #5f6c80;
  --glass: rgba(255, 255, 255, .78);
  /* Estados */
  --green: #14805a;  --green-bg: #e3f6ee;
  --orange: #a45a06; --orange-bg: #fff1dc;
  --red: #d8344c;    --red-bg: #fdeaed;
  --like: #f91880;
  /* Forma y profundidad */
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 60, .05), 0 1px 3px rgba(15, 30, 60, .04);
  --shadow: 0 1px 2px rgba(15, 30, 60, .04), 0 8px 24px -8px rgba(15, 30, 60, .10);
  --shadow-lg: 0 16px 48px -12px rgba(15, 30, 60, .28);
  --ring: 0 0 0 4px rgba(56, 163, 245, .28);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #6aa8ff;
    --blue-hover: #8bbcff;
    --navy: #e8eefb;
    --brand-grad: linear-gradient(135deg, #38a3f5 0%, #3b6fe0 55%, #7a5cf0 100%);
    --blue-50: #14233f;
    --blue-100: #1d3560;
    --bg: #05080f;
    --bg-grad: none;
    --card: #05080f;
    --card-2: #0e1522;
    --hover: #121b2b;
    --line: #1c2738;
    --line-strong: #31425f;
    --text: #e3e9f4;
    --heading: #f1f5fd;
    --muted: #93a0b8;
    --glass: rgba(5, 8, 15, .8);
    --green: #4cd3a0;  --green-bg: #12362b;
    --orange: #f3b25a; --orange-bg: #3a2810;
    --red: #ff7088;    --red-bg: #3c1820;
    --like: #f91880;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -10px rgba(0, 0, 0, .55);
    --shadow-lg: 0 18px 50px -12px rgba(0, 0, 0, .7);
    --ring: 0 0 0 4px rgba(106, 168, 255, .32);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
h1, h2, h3 { color: var(--heading); line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: 1.7rem; font-weight: 800; } h2 { font-size: 1.15rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .9em; }
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(56, 163, 245, .3); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: var(--bg); padding: .6rem 1rem; z-index: 100; border-radius: 0 0 12px 0; }
.skip-link:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.icon { flex: none; vertical-align: middle; }

/* ---- Barra superior (vidrio) ---- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: .6rem 1rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--heading); font-size: 1.15rem; font-weight: 500; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand strong { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; background: var(--brand-grad); color: #fff; border-radius: 12px; font-weight: 800; font-size: .95rem; letter-spacing: -.03em; box-shadow: 0 6px 16px -4px rgba(31, 95, 214, .55), inset 0 1px 0 rgba(255, 255, 255, .35); }
.brand-center { justify-content: center; width: 100%; margin-bottom: 1.4rem; font-size: 1.35rem; }
.brand-center .brand-mark { width: 44px; height: 44px; border-radius: 14px; font-size: 1.1rem; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem; background: var(--hover); border: 1px solid transparent; border-radius: 999px; padding: 0 1rem; max-width: 520px; color: var(--muted); transition: all .2s var(--ease); }
.search input { flex: 1; border: 0; background: transparent; padding: .62rem 0; font: inherit; color: var(--text); min-width: 0; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--sky); background: var(--card); box-shadow: var(--ring); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.icon-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--heading); transition: background .15s, transform .15s; }
.icon-btn:hover { background: var(--hover); text-decoration: none; }
.icon-btn:active { transform: scale(.92); }
.badge-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--like); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--card); }
.avatar-btn { border-radius: 50%; display: block; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--sky); transition: box-shadow .15s; }
.avatar-btn:hover { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--blue); }
.menu { position: relative; }
.menu > summary, .more > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker, .more > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .4rem; box-shadow: var(--shadow-lg); z-index: 60; animation: pop .16s var(--ease); transform-origin: top right; }
.menu-panel a, .menu-panel button { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .65rem .8rem; border: 0; background: none; font: inherit; font-weight: 500; color: var(--text); border-radius: 10px; cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--hover); text-decoration: none; }
.menu-panel form { margin: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---- Avatares ---- */
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--hover); }
.avatar-sm { width: 36px; height: 36px; } .avatar-md { width: 46px; height: 46px; } .avatar-lg { width: 104px; height: 104px; box-shadow: 0 0 0 4px var(--card), 0 0 0 7px var(--sky), var(--shadow); }
.avatar-initials { display: inline-grid; place-items: center; background: var(--brand-grad); color: #fff; font-weight: 700; }
.avatar-sm.avatar-initials { font-size: .95rem; } .avatar-md.avatar-initials { font-size: 1.1rem; } .avatar-lg.avatar-initials { font-size: 2.6rem; }

/* ---- Estructura de 3 columnas ---- */
.shell { max-width: 1240px; margin: 0 auto; padding: 1.1rem 1rem; display: grid; gap: 1.2rem; grid-template-columns: minmax(0, 1fr); padding-bottom: 7rem; }
.col-left, .col-right { display: none; }
.col-main { min-width: 0; }
.col-main:focus { outline: none; }

@media (min-width: 760px) {
  .shell { padding-bottom: 1.5rem; grid-template-columns: 220px minmax(0, 1fr); }
  .shell.no-right { grid-template-columns: 220px minmax(0, 1fr); }
  .col-left { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 76px; align-self: start; }
  .bottom-nav { display: none !important; }
}
@media (min-width: 1100px) {
  .shell.has-right { grid-template-columns: 240px minmax(0, 660px) 320px; justify-content: center; }
  .shell.no-right { grid-template-columns: 240px minmax(0, 840px); justify-content: center; }
  .col-right { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 76px; align-self: start; }
}

.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a { display: flex; align-items: center; gap: .85rem; padding: .7rem .95rem; border-radius: 14px; color: var(--text); font-weight: 600; transition: background .15s, transform .15s; }
.side-nav a .icon { color: var(--muted); transition: color .15s, transform .2s var(--ease); }
.side-nav a:hover { background: var(--hover); text-decoration: none; }
.side-nav a:hover .icon { color: var(--blue); transform: scale(1.1); }
.side-nav a.is-active { background: var(--card); color: var(--blue); font-weight: 700; box-shadow: var(--shadow-sm); }
.side-nav a.is-active .icon { color: var(--blue); }
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.side-card h2 { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; margin-bottom: .75rem; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.plain-list a { display: block; font-weight: 600; color: var(--heading); line-height: 1.35; }
.plain-list a:hover { color: var(--blue); text-decoration: none; }
.footer-links { padding: 0 .4rem; }
.footer-links a { color: var(--muted); }
.site-notice { margin: 0; border-radius: 0; text-align: center; border-width: 0 0 1px; }

/* ---- Menu inferior movil (flotante) ---- */
.bottom-nav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: .25rem; }
.bottom-nav > a, .bottom-nav .more > summary { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem 0 .4rem; color: var(--muted); font-size: .68rem; font-weight: 600; border-radius: 16px; transition: color .15s, background .15s; }
.bottom-nav > a:hover { text-decoration: none; }
.bottom-nav > a.is-active { color: var(--blue); background: var(--blue-50); font-weight: 700; }
.bottom-nav .more { position: relative; }
.more-panel { position: absolute; right: 0; bottom: calc(100% + 14px); min-width: 210px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: .4rem; animation: pop .16s var(--ease); transform-origin: bottom right; }
.more-panel a { display: flex; align-items: center; gap: .65rem; padding: .7rem .8rem; color: var(--text); border-radius: 10px; font-size: .95rem; font-weight: 500; }
.more-panel a:hover { background: var(--hover); text-decoration: none; }

/* ---- Tarjetas, botones, formularios ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.35rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-sm); }
h1 + .card, .card > h1:first-child { margin-top: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .66rem 1.25rem; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; line-height: 1.2; transition: transform .15s var(--ease), box-shadow .2s, background .15s, border-color .15s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: none; }
.btn-dark { background: var(--heading); color: var(--bg); } .btn-dark:hover { filter: opacity(.85); }
.btn-primary:hover { background: var(--blue-hover); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--line-strong); } .btn-outline:hover { background: var(--blue-50); border-color: var(--blue); }
.btn-ghost { background: transparent; color: var(--heading); } .btn-ghost:hover { background: var(--hover); }
.btn-danger { background: var(--red); color: #fff; } .btn-danger:hover { filter: brightness(.92); }
.btn-sm { padding: .42rem .9rem; font-size: .88rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; }

.form { display: flex; flex-direction: column; gap: 1.1rem; margin: 1rem 0; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-weight: 650; font-size: .9rem; color: var(--heading); }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="url"], .field input[type="search"],
.field input[type="datetime-local"], .field input[type="number"], .field select, .field textarea {
  width: 100%; padding: .72rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; color: var(--text); background: var(--card-2); transition: border-color .15s, box-shadow .15s, background .15s; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sky); box-shadow: var(--ring); background: var(--card); }
.field-check { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: .6rem; }
.field-check label { font-weight: 400; flex: 1; }
.field-check input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--blue); }
.field-check .field-error { flex-basis: 100%; }
.req { color: var(--red); }
.help { font-size: .82rem; color: var(--muted); margin: 0; }
.field-error { color: var(--red); font-size: .85rem; font-weight: 500; margin: 0; }
.field-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
input[type="radio"], input[type="checkbox"] { accent-color: var(--blue); }

.alert { padding: .8rem 1.05rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: .95rem; }
.alert-success { background: var(--green-bg); border-color: transparent; color: var(--green); }
.alert-error { background: var(--red-bg); border-color: transparent; color: var(--red); }
.alert-info { background: var(--blue-50); border-color: transparent; color: var(--blue); }
.alert-info a { text-decoration: underline; }
.notice { background: var(--orange-bg); border: 1px solid transparent; color: var(--orange); padding: .7rem .9rem; border-radius: var(--radius-sm); font-size: .9rem; margin: .5rem 0; }

/* ---- Pantallas de acceso ---- */
.auth-body { display: grid; place-items: start center; padding: 3rem 1rem; min-height: 100vh; background-color: var(--bg); background-image: radial-gradient(900px 500px at 50% -10%, rgba(56, 163, 245, .35) 0%, transparent 65%), radial-gradient(700px 400px at 90% 100%, rgba(91, 63, 214, .18) 0%, transparent 60%); }
.auth-card { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 2rem 1.8rem; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.6rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .8rem; border-radius: 999px; background: var(--hover); color: var(--heading); font-size: .82rem; font-weight: 600; border: 1px solid transparent; transition: background .15s, transform .15s, color .15s; }
.chip:hover { text-decoration: none; background: var(--blue-100); color: var(--blue); transform: translateY(-1px); }
.chip-blue { background: var(--blue-50); color: var(--blue); }

.empty-state { text-align: center; padding: 2.6rem 1.4rem; }
.error-code { font-size: 4rem; font-weight: 800; margin: 0; line-height: 1; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prose { max-width: 720px; } .prose h2 { margin-top: 1.4em; } .prose ul { padding-left: 1.2rem; }

/* ---- Pestanas del muro (segmentadas) ---- */
.tabs { display: flex; gap: .25rem; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .3rem; margin-bottom: 1.1rem; overflow-x: auto; box-shadow: var(--shadow-sm); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1; text-align: center; padding: .58rem 1rem; border-radius: 999px; color: var(--muted); font-weight: 650; white-space: nowrap; transition: all .2s var(--ease); }
.tab:hover { text-decoration: none; background: var(--hover); color: var(--heading); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; margin-bottom: 1rem; }
.filter-bar .field { flex: 1 1 160px; }

/* ---- Publicaciones ---- */
.post { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem .55rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-sm); transition: box-shadow .25s var(--ease), border-color .25s, transform .25s var(--ease); animation: rise .4s var(--ease) both; }
.post:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.post-report { box-shadow: inset 4px 0 0 var(--orange), var(--shadow-sm); }
.post-proposal { box-shadow: inset 4px 0 0 var(--green), var(--shadow-sm); }
.post-debate { box-shadow: inset 4px 0 0 var(--blue), var(--shadow-sm); }
.post-editorial { box-shadow: inset 4px 0 0 var(--heading), var(--shadow-sm); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.post-head { display: flex; gap: .8rem; align-items: flex-start; }
.post-head .avatar { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--line-strong); }
.post-head .who { flex: 1; min-width: 0; }
.post-author { font-weight: 700; color: var(--heading); }
.post-meta { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .65rem; }
.post-meta a { color: var(--muted); }
.post-title { font-size: 1.25rem; font-weight: 750; margin: .8rem 0 .35rem; } .post-title a { color: var(--heading); } .post-title a:hover { color: var(--blue); text-decoration: none; }
.post-body { margin: .75rem 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 1.02rem; }
.post-summary { color: var(--muted); }
.post-media { display: grid; gap: 4px; margin: .8rem 0; border-radius: 16px; overflow: hidden; }
.post-media.n1 { grid-template-columns: 1fr; } .post-media.n2, .post-media.n4 { grid-template-columns: 1fr 1fr; } .post-media.n3 { grid-template-columns: 1fr 1fr; }
.post-media img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; background: var(--hover); transition: transform .4s var(--ease); }
.post-media img:hover { transform: scale(1.02); }
.post-media.n1 img { max-height: 540px; }
.link-card { display: flex; align-items: center; gap: .7rem; padding: .75rem 1rem; border: 1px solid var(--line); background: var(--card-2); border-radius: var(--radius-sm); margin: .8rem 0; color: var(--heading); font-size: .9rem; overflow-wrap: anywhere; transition: border-color .15s, background .15s; }
.link-card:hover { text-decoration: none; border-color: var(--sky); background: var(--blue-50); }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .6rem; border-radius: 999px; font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.badge-citizen { background: var(--hover); color: var(--muted); }
.badge-editorial { background: var(--heading); color: var(--bg); }
.badge-report { background: var(--orange-bg); color: var(--orange); }
.badge-debate { background: var(--blue-50); color: var(--blue); }
.badge-proposal { background: var(--green-bg); color: var(--green); }
.badge-official { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-grad); color: #fff; vertical-align: middle; margin-left: 4px; box-shadow: 0 2px 6px -1px rgba(31, 95, 214, .5); }
.status-received, .status-in_review, .status-info_requested { background: var(--orange-bg); color: var(--orange); }
.status-published { background: var(--blue-50); color: var(--blue); }
.status-resolved_with_evidence { background: var(--green-bg); color: var(--green); }
.status-closed { background: var(--hover); color: var(--muted); }
.post-actions { display: flex; align-items: center; gap: .15rem; margin-top: .5rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.post-actions form { display: contents; }
.act { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .8rem; border: 0; background: none; border-radius: 999px; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, transform .15s var(--ease); }
.act:hover { background: var(--hover); text-decoration: none; color: var(--heading); }
.act:active { transform: scale(.92); }
.act.is-on { color: var(--blue); font-weight: 700; background: var(--blue-50); }
.act.is-on .icon { fill: currentColor; fill-opacity: .2; }
.act[aria-label="Me gusta"]:hover { color: var(--like); background: color-mix(in srgb, var(--like) 12%, transparent); }
.act[aria-label="Me gusta"].is-on { color: var(--like); background: color-mix(in srgb, var(--like) 12%, transparent); }
.act[aria-label="Me gusta"].is-on .icon { fill: var(--like); fill-opacity: 1; animation: beat .35s var(--ease); }
@keyframes beat { 0% { transform: scale(.7); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.act-end { margin-left: auto; }
.post-menu { position: relative; }
.post-menu > summary { list-style: none; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: background .15s; }
.post-menu > summary::-webkit-details-marker { display: none; }
.post-menu > summary:hover { background: var(--hover); color: var(--heading); }
.post-menu .menu-panel { min-width: 230px; z-index: 20; }

/* ---- Compositor ---- */
.composer { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1.1rem; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: var(--sky); box-shadow: var(--ring), var(--shadow); }
.composer-row { display: flex; gap: .8rem; }
.composer textarea { width: 100%; min-height: 76px; border: 0; background: transparent; color: var(--text); padding: .5rem .2rem; font: inherit; font-size: 1.08rem; resize: vertical; }
.composer textarea::placeholder { color: var(--muted); }
.composer textarea:focus { outline: none; }
.composer-foot { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-top: .6rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.composer-links { display: flex; flex-wrap: wrap; gap: .1rem; }
.composer-links .btn-sm { padding: .4rem .6rem; font-size: .84rem; }
.composer-foot > .btn-primary { margin-left: auto; }
.composer-links .btn-ghost { color: var(--muted); } .composer-links .btn-ghost:hover { color: var(--blue); background: var(--blue-50); }
.file-btn { cursor: pointer; position: relative; }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-btn:focus-within { outline: 3px solid var(--sky); }

/* ---- Comentarios ---- */
.comments { margin-top: .5rem; }
.comment { display: flex; gap: .7rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.comment-body { flex: 1; min-width: 0; }
.comment-text { margin: .15rem 0 .2rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.comment-replies { margin-left: 2.6rem; }
.comment-form { display: flex; gap: .6rem; margin-top: .7rem; }
.comment-form textarea { flex: 1; min-height: 46px; border: 1px solid var(--line-strong); background: var(--card-2); color: var(--text); border-radius: 22px; padding: .7rem 1rem; font: inherit; resize: vertical; transition: border-color .15s, box-shadow .15s; }
.comment-form textarea:focus { outline: none; border-color: var(--sky); box-shadow: var(--ring); background: var(--card); }
.reply-box > summary { cursor: pointer; font-size: .85rem; color: var(--muted); list-style: none; font-weight: 650; }
.reply-box > summary:hover { color: var(--blue); }
.reply-box > summary::-webkit-details-marker { display: none; }

/* ---- Encuestas ---- */
.poll-opt { display: block; margin: .7rem 0; }
.poll-opt-head { display: flex; justify-content: space-between; gap: 1rem; font-weight: 650; font-size: .95rem; }
progress.poll-bar { width: 100%; height: 12px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--hover); display: block; margin-top: .3rem; }
progress.poll-bar::-webkit-progress-bar { background: var(--hover); }
progress.poll-bar::-webkit-progress-value { background: var(--brand-grad); border-radius: 999px; }
progress.poll-bar::-moz-progress-bar { background: var(--sky); border-radius: 999px; }
.poll-choice { display: flex; gap: .7rem; align-items: center; padding: .8rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); margin: .5rem 0; cursor: pointer; font-weight: 550; transition: all .15s; }
.poll-choice:hover { background: var(--blue-50); border-color: var(--sky); }
.poll-choice:has(input:checked) { background: var(--blue-50); border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }

/* ---- Paginacion ---- */
.pager { display: flex; justify-content: center; gap: .6rem; margin: 1rem 0 2rem; }
.load-more { display: flex; justify-content: center; margin: 1rem 0 2rem; }

/* ---- Perfil ---- */
.profile-head { display: flex; gap: 1.3rem; align-items: center; flex-wrap: wrap; }
.profile-head h1 { margin-bottom: .1em; }
.profile-stats { display: flex; gap: 1.4rem; margin: .6rem 0; font-size: .92rem; color: var(--muted); flex-wrap: wrap; }
.profile-stats strong { color: var(--heading); font-size: 1.15rem; font-weight: 800; margin-right: .15rem; }
.profile-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.profile-actions form { margin: 0; }

/* ---- Articulos (lectura) ---- */
.article { max-width: 740px; }
.article h1 { font-size: 2.15rem; letter-spacing: -.03em; font-weight: 800; }
.article .cover { border-radius: var(--radius); margin: 1.1rem 0; width: 100%; max-height: 440px; object-fit: cover; box-shadow: var(--shadow); }
.article-body { font-size: 1.1rem; line-height: 1.8; overflow-wrap: anywhere; }
.article-body p { margin-bottom: 1.15em; white-space: pre-line; }
.sources li { margin-bottom: .3rem; }
.share-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.news-card { display: grid; gap: 1rem; grid-template-columns: 1fr; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.news-card .thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: var(--hover); }
@media (min-width: 560px) { .news-card.has-thumb { grid-template-columns: 220px 1fr; } }

/* ---- Panel de administracion ---- */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.admin-side { background: linear-gradient(180deg, #0b1f3f 0%, #10234a 55%, #1a2a6a 100%); color: #fff; padding: 1.2rem .9rem; }
.admin-side .brand { color: #fff; margin: 0 .4rem 1.2rem; } .admin-side .brand strong { background: linear-gradient(135deg, #8fd0ff, #b9a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 3px; }
.admin-nav a { display: flex; align-items: center; gap: .65rem; padding: .62rem .85rem; border-radius: 12px; color: #c4d3ee; font-size: .93rem; font-weight: 500; transition: background .15s, color .15s; }
.admin-nav a:hover { background: rgba(255, 255, 255, .09); text-decoration: none; color: #fff; }
.admin-nav a.is-active { background: rgba(255, 255, 255, .17); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--sky); }
.admin-main { padding: 1.4rem; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.admin-top h1 { margin: 0; }
@media (min-width: 900px) {
  .admin-shell { grid-template-columns: 250px 1fr; }
  .admin-nav { flex-direction: column; flex-wrap: nowrap; }
  .admin-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1.1rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -22px; top: -22px; width: 80px; height: 80px; border-radius: 50%; background: var(--brand-grad); opacity: .12; }
.stat-n { font-size: 2rem; font-weight: 800; color: var(--heading); line-height: 1.1; letter-spacing: -.03em; }
.stat-l { font-size: .85rem; color: var(--muted); font-weight: 500; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.1rem; box-shadow: var(--shadow-sm); }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--card-2); white-space: nowrap; font-weight: 700; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--card-2); }
.table tr:last-child td { border-bottom: 0; }
.inline-form { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form select, .inline-form input[type="text"] { padding: .4rem .7rem; border: 1px solid var(--line-strong); background: var(--card-2); color: var(--text); border-radius: 999px; font: inherit; font-size: .88rem; }
.pill { display: inline-block; padding: .14rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--hover); color: var(--muted); }
.pill-green { background: var(--green-bg); color: var(--green); } .pill-red { background: var(--red-bg); color: var(--red); } .pill-orange { background: var(--orange-bg); color: var(--orange); } .pill-blue { background: var(--blue-50); color: var(--blue); }
.disclaimer { font-size: .82rem; color: var(--muted); background: var(--card-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: .6rem .8rem; }
.inline-img-preview { max-width: 160px; border-radius: 12px; }

/* ---- Ajustes ---- */
.grow { flex: 1; min-width: 0; }
.post-actions form.act-end { display: block; margin-left: auto; }
.post .cover { width: 100%; max-height: 380px; object-fit: cover; border-radius: 16px; margin: .7rem 0; background: var(--hover); }
.post-media.n3 img:first-child { grid-column: 1 / -1; }
.notif { display: flex; gap: .9rem; align-items: flex-start; padding: .95rem 0; border-top: 1px solid var(--line); }
.notif:first-child { border-top: 0; }
.notif.is-unread { background: var(--blue-50); margin: 0 -1.35rem; padding-left: 1.35rem; padding-right: 1.35rem; box-shadow: inset 4px 0 0 var(--sky); }
.danger-zone { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.reasons label { display: flex; gap: .7rem; align-items: center; padding: .7rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); margin-bottom: .5rem; cursor: pointer; font-weight: 550; transition: all .15s; }
.reasons label:hover { background: var(--blue-50); border-color: var(--sky); }
.type-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.person { display: flex; gap: .85rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.person .grow a { font-weight: 700; color: var(--heading); }
.search-page { display: flex; gap: .6rem; align-items: center; }
.search-page input[type="search"] { flex: 1; min-width: 0; padding: .75rem 1.1rem; border: 1px solid var(--line-strong); background: var(--card-2); color: var(--text); border-radius: 999px; font: inherit; }
.search-page input[type="search"]:focus { outline: none; border-color: var(--sky); box-shadow: var(--ring); background: var(--card); }

/* ---- Articulos e informes ---- */
.article .lead { font-size: 1.2rem; color: var(--muted); }
.article-body h2 { margin-top: 1.6em; } .article-body h3 { margin-top: 1.3em; }
.article-body blockquote { margin: 1.3em 0; padding: .5em 1.2em; border-left: 4px solid var(--sky); background: var(--card-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); }
.article-body ul, .article-body ol { padding-left: 1.4rem; margin-bottom: 1.1em; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 1.8em 0; }
.article-body p { white-space: normal; }
.chart { margin: 1.5em 0; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-2); }
.chart figcaption { font-weight: 700; color: var(--heading); margin-bottom: .7rem; }
.chart-row { display: grid; grid-template-columns: minmax(80px, 30%) 1fr auto; gap: .7rem; align-items: center; margin: .4rem 0; font-size: .92rem; }
.chart-row progress.poll-bar { margin-top: 0; height: 14px; }
.chart-value { font-weight: 700; color: var(--heading); min-width: 3ch; text-align: right; }

/* Listas con texto y marca de tiempo a los lados (panel y notificaciones) */
.plain-list li { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.plain-list.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem 1rem; }
.toolbar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.row-actions form { margin: 0; }

@media (max-width: 759px) {
  h1 { font-size: 1.45rem; }
  .topbar-inner { gap: .5rem; padding: .5rem .75rem; }
  .brand-name { display: none; }
  .post, .card, .composer { border-radius: 16px; }
  .article h1 { font-size: 1.7rem; }
  .composer-links .btn-sm { padding: .4rem .6rem; }
}

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

/* ---- Portada para visitantes ---- */
.hero { position: relative; overflow: hidden; padding: 2.2rem 1.6rem; border: 0; background: var(--brand-grad); color: #fff; box-shadow: 0 20px 44px -16px rgba(31, 95, 214, .6); }
.hero::before { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(246, 180, 14, .55), transparent 70%); }
.hero h1 { color: #fff; font-size: 2rem; position: relative; }
.hero p { position: relative; max-width: 46ch; }
.hero .muted { color: rgba(255, 255, 255, .85); }
.hero .btn-primary { background: #fff; color: #1f3f9a; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4); }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .5); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .15); }

/* =====================================================================
   Capa "timeline": estructura y componentes inspirados en X/Twitter,
   con la identidad celeste de BuenosAiresYa. Va al final para prevalecer.
   ===================================================================== */
:root { --topbar-h: 57px; --rail-w: 275px; }

/* ---- Estructura: carril izquierdo | columna central | carril derecho ---- */
.shell, .shell.has-right, .shell.no-right { max-width: 1280px; padding: 0; gap: 0; grid-template-columns: minmax(0, 1fr); padding-bottom: 6.5rem; }
.col-main { background: var(--card); min-height: calc(100vh - var(--topbar-h)); }
.rail-brand, .rail-only, .rail-account, .rail-extra, .rail-post, .rail-search { display: none; }
.col-right { display: none; }
.fab { position: fixed; right: 18px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 55; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; box-shadow: 0 10px 24px -6px rgba(26, 115, 224, .65); transition: transform .15s var(--ease); }
.fab:hover { text-decoration: none; transform: scale(1.06); } .fab:active { transform: scale(.92); }

/* Tablet: carril compacto de iconos */
@media (min-width: 760px) {
  .shell, .shell.has-right, .shell.no-right { grid-template-columns: 76px minmax(0, 640px); justify-content: center; padding-bottom: 0; }
  .col-left { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .5rem .3rem; position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); align-self: start; }
  .col-main { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .side-nav { align-items: center; }
  .side-nav a { padding: .8rem; border-radius: 999px; }
  .side-nav a span:not(.nav-ic):not(.badge-count) { display: none; }
  .rail-only { display: flex; }
  .rail-post { display: inline-flex; width: 52px; height: 52px; padding: 0; border-radius: 50%; margin-top: .4rem; }
  .rail-post span { display: none; }
  .fab { display: none; }
}

/* Escritorio: carril completo + carril derecho */
@media (min-width: 1100px) {
  :root { --topbar-h: 0px; }
  .topbar { display: none; }
  .shell, .shell.has-right, .shell.no-right { grid-template-columns: var(--rail-w) 600px 350px; }
  .col-left { align-items: stretch; padding: .4rem .9rem .9rem .5rem; top: 0; height: 100vh; overflow-y: auto; gap: .6rem; scrollbar-width: none; }
  .col-left::-webkit-scrollbar { display: none; }
  .rail-brand { display: inline-flex; align-items: center; gap: .6rem; padding: .6rem .6rem .5rem; color: var(--heading); font-size: 1.2rem; letter-spacing: -.02em; }
  .rail-brand:hover { text-decoration: none; }
  .rail-brand .brand-name { font-weight: 500; } .rail-brand .brand-name strong { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
  .side-nav { align-items: stretch; gap: 2px; }
  .side-nav a { display: flex; padding: .72rem 1rem; border-radius: 999px; font-size: 1.12rem; font-weight: 500; gap: 1.1rem; width: fit-content; max-width: 100%; }
  .side-nav a span:not(.nav-ic):not(.badge-count) { display: inline; }
  .side-nav a.is-active { background: transparent; box-shadow: none; font-weight: 800; color: var(--heading); }
  .side-nav a.is-active .icon { color: var(--heading); stroke-width: 2.4; }
  .side-nav a:hover { background: var(--hover); }
  .rail-post { display: flex; width: 100%; height: auto; padding: .95rem 1rem; border-radius: 999px; font-size: 1.05rem; margin: .5rem 0; }
  .rail-post span { display: inline; }
  .rail-post .icon { display: none; }
  .rail-extra { display: block; }
  .rail-account { display: block; margin-top: auto; position: relative; }
  .col-right { display: flex; flex-direction: column; gap: .9rem; position: sticky; top: 0; align-self: start; padding: .5rem 0 1.5rem 1.6rem; max-height: 100vh; overflow-y: auto; scrollbar-width: none; }
  .col-right::-webkit-scrollbar { display: none; }
  .rail-search { display: flex; position: sticky; top: 0; z-index: 5; margin: 0; max-width: none; background-color: var(--bg); box-shadow: 0 8px 0 var(--bg); }
}

.nav-ic { position: relative; display: inline-grid; }
.nav-ic .badge-count { top: -6px; right: -8px; box-shadow: 0 0 0 2px var(--card); background: var(--blue); }
.rail-account-btn { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 999px; cursor: pointer; list-style: none; transition: background .15s; }
.rail-account-btn::-webkit-details-marker { display: none; }
.rail-account-btn:hover { background: var(--hover); }
.rail-account-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.rail-account-text strong { color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-account-text span { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-account .menu-panel { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; min-width: 260px; transform-origin: bottom left; }

/* Tarjetas laterales: planas, sin borde, como los modulos de X */
.side-card { background: var(--card-2); border: 0; box-shadow: none; border-radius: var(--radius); padding: .9rem 1rem; }
.side-card h2 { font-size: 1.15rem; font-weight: 800; text-transform: none; letter-spacing: -.01em; color: var(--heading); margin-bottom: .6rem; }
.side-card .person { padding: .6rem 0; border-top: 0; }
.side-card .plain-list { gap: .9rem; }
.side-card .plain-list li { display: block; }
.side-card .plain-list li > a { font-weight: 700; }
.side-card .plain-list li .muted { display: block; }
.rail-auth { display: flex; flex-direction: column; gap: .5rem; margin: .8rem 0 0; }
.rail-search.search { border-radius: 999px; background: var(--hover); padding: 0 1.1rem; }

/* ---- Columna central: secciones planas separadas por lineas ---- */
.col-main > h1:first-child, .col-main > .admin-top:first-child, .col-main > .toolbar:first-child { padding: .9rem 1rem; margin: 0; font-size: 1.25rem; border-bottom: 1px solid var(--line); position: sticky; top: var(--topbar-h); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); z-index: 15; }
.col-main > .alert { margin: .8rem 1rem 0; }
.col-main > p, .col-main > nav.type-tabs, .col-main > .filter-bar, .col-main > .search-page, .col-main > form:not(.card):not(.composer) { margin-left: 1rem; margin-right: 1rem; }
.col-main > .article, .col-main > .prose { padding: 0 1rem; }
.col-main > nav.type-tabs { margin-top: 1rem; }
.col-main .card { border-radius: 0; border-width: 0 0 1px; box-shadow: none; background: transparent; margin: 0; padding: 1.1rem 1rem; }
.col-main .card.form { margin: 0; }
.col-main .card h2:first-child { margin-top: 0; }
.col-main .news-card:hover { transform: none; background: var(--card-2); box-shadow: none; }
.empty-state { padding: 3rem 1.4rem; }
.pager { margin: 1.2rem 0 2rem; }
.hero { border-radius: 0; margin: 0; padding: 2rem 1.3rem; box-shadow: none; }

/* ---- Pestanas sticky (subrayado) ---- */
.tabs { position: sticky; top: var(--topbar-h); z-index: 20; display: flex; gap: 0; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; margin: 0; box-shadow: none; }
.tab { position: relative; flex: 1; border-radius: 0; padding: 1rem .8rem; color: var(--muted); font-weight: 600; }
.tab:hover { background: var(--hover); color: var(--heading); }
.tab.is-active { background: transparent; color: var(--heading); font-weight: 800; box-shadow: none; }
.tab.is-active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: var(--blue); transform: translateX(-50%); }
.tabs + .card { margin-top: 0; }

/* ---- Compositor plano ---- */
.composer { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 1rem 1rem .7rem; margin: 0; background: transparent; }
.composer:focus-within { border-color: var(--line); box-shadow: none; }
.composer textarea { font-size: 1.25rem; min-height: 56px; padding: .45rem 0; overflow: hidden; }
.composer-foot { border-top: 0; margin-top: .2rem; padding: 0 0 0 calc(46px + .8rem); }
.composer-links .btn-ghost { color: var(--blue); padding: .45rem .65rem; } .composer-links .btn-ghost:hover { background: var(--blue-50); }
.composer-send { display: flex; align-items: center; gap: .8rem; margin-left: auto; }
.btn-primary[disabled] { opacity: .5; }
.char-counter { display: inline-flex; align-items: center; gap: .4rem; }
.char-counter svg { display: block; }
.char-counter .ring-bg { fill: none; stroke: var(--line-strong); stroke-width: 2.4; }
.char-counter .ring-fg { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.char-counter.is-warn .ring-fg { stroke: var(--sun); }
.char-counter.is-over .ring-fg { stroke: var(--red); }
.char-counter .count-num { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.char-counter.is-over .count-num { color: var(--red); font-weight: 700; }
.thumbs { display: flex; gap: .5rem; flex-wrap: wrap; padding: .4rem 0 .4rem calc(46px + .8rem); }
.thumbs:empty { display: none; }
.thumb-preview { width: 84px; height: 84px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }

/* ---- Publicaciones: avatar a la izquierda, contenido a la derecha ---- */
.timeline { border-top: 0; }
.post, .post:hover { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0 .8rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; padding: .85rem 1rem .4rem; box-shadow: none; animation: none; background: transparent; }
.post[data-href] { cursor: pointer; }
.post[data-href]:hover { background: var(--card-2); }
.post-report, .post-proposal, .post-debate, .post-editorial { box-shadow: none; }
.post-avatar { display: block; }
.post-avatar .avatar { box-shadow: none; }
.post-main { min-width: 0; }
.post-head .avatar { box-shadow: none; }
.post-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35rem; }
.post-time { color: var(--muted); } .post-time:hover { text-decoration: underline; }
.post-title { font-size: 1.1rem; margin: .45rem 0 .2rem; }
.post-body { margin: .3rem 0 .5rem; font-size: 1rem; line-height: 1.45; }
.post-meta { margin-bottom: .1rem; }
.post-media { border-radius: 16px; border: 1px solid var(--line); margin: .6rem 0; }
.post-media.n1 img { max-height: 520px; }
.post-media img:hover { transform: none; }
.post .cover { border-radius: 16px; border: 1px solid var(--line); }
.link-card { border-radius: 16px; background: transparent; }
.chip-row { margin: .3rem 0; }
.post-actions { justify-content: space-between; border-top: 0; margin: .15rem 0 0; padding: 0 0 .3rem; max-width: 100%; }
.post-actions .act-end, .post-actions form.act-end { margin-left: 0; }
.act { padding: .45rem .6rem; margin-left: -.5rem; font-weight: 500; font-size: .86rem; gap: .3rem; }
.act:hover { background: var(--blue-50); color: var(--blue); }
.act.is-on { background: transparent; }
.act[data-copy] [data-label] { display: none; }
.act[data-copy].is-copied [data-label] { display: inline; color: var(--blue); }
.act[aria-label="Me gusta"]:hover, .act[aria-label="Me gusta"].is-on { background: color-mix(in srgb, var(--like) 12%, transparent); }
.badge-official { box-shadow: none; }
.badge { padding: .1rem .5rem; font-size: .66rem; }
.post-menu > summary:hover { background: var(--blue-50); color: var(--blue); }
.post-full-note { display: none; }

/* Publicacion abierta: texto mas grande */
.post:not([data-href]) .post-body { font-size: 1.15rem; line-height: 1.5; }
.post:not([data-href]) .post-title { font-size: 1.35rem; }

/* ---- Comentarios como hilo ---- */
.comments { padding: 0; border-bottom: 0; }
.comments > h2, .comments > p, .comments > form, .comments > .field-error { margin-left: 1rem; margin-right: 1rem; }
.comments > h2 { padding-top: 1rem; font-size: 1.05rem; }
.comment { padding: .85rem 1rem; border-top: 1px solid var(--line); }
.comment-replies { margin-left: 0; }
.comment .comment { padding: .7rem 0 0; margin-top: .6rem; }
.comment-form { align-items: flex-start; }
.comment-form textarea { border-radius: 16px; overflow: hidden; }

/* ---- Perfil con portada ---- */
.profile-card { position: relative; padding-top: 0 !important; }
.profile-card::before { content: ""; display: block; height: 150px; margin: 0 -1rem; background: var(--brand-grad); }
.profile-card.has-cover::before { display: none; }
.profile-cover { display: block; width: calc(100% + 2rem); max-width: none; height: 150px; margin: 0 -1rem; object-fit: cover; background: var(--brand-grad); }
.settings-cover { display: block; width: 100%; max-height: 160px; object-fit: cover; border-radius: var(--radius); margin: .3rem 0 .6rem; }
.profile-card .profile-head { flex-direction: column; align-items: flex-start; gap: .4rem; margin-top: -54px; }
.profile-card .avatar-lg { width: 108px; height: 108px; box-shadow: 0 0 0 4px var(--card); }
.profile-card .avatar-lg.avatar-initials { font-size: 2.8rem; }
.profile-card .profile-actions { position: absolute; right: 1rem; top: 162px; margin: 0; }
.profile-card h1 { font-size: 1.35rem; margin: 0; }
.profile-stats { gap: 1.2rem; font-size: .92rem; }
.profile-stats strong { font-size: 1rem; }

/* ---- Notificaciones, personas, filas ---- */
.notif.is-unread { margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; box-shadow: inset 3px 0 0 var(--blue); }
.person { padding: .8rem 0; }
.tab:focus-visible, .side-nav a:focus-visible { outline-offset: -3px; }

/* ---- Aviso flotante ---- */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 90; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--blue); color: #fff; padding: .7rem 1.2rem; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s var(--ease); max-width: 90vw; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--red); }
@media (min-width: 760px) { .toast { bottom: 32px; } }

/* ---- Movil ---- */
@media (max-width: 759px) {
  .topbar { background: var(--glass); }
  .bottom-nav { left: 0; right: 0; bottom: 0; border-radius: 0; border-width: 1px 0 0; box-shadow: none; padding: 0 0 env(safe-area-inset-bottom); }
  .bottom-nav > a.is-active { background: transparent; }
  .post, .post:hover { grid-template-columns: 40px minmax(0, 1fr); gap: 0 .65rem; padding-left: .8rem; padding-right: .8rem; }
  .post .avatar-md { width: 40px; height: 40px; }
  .composer-foot, .thumbs { padding-left: 0; }
  .composer-links .btn-sm { padding: .4rem .5rem; }
  .profile-card::before { height: 110px; margin: 0 -1rem; }
  .profile-cover { height: 110px; }
  .profile-card .profile-actions { top: 122px; }
}
@media (hover: none) { .post[data-href]:hover { background: transparent; } }
.composer textarea, .composer textarea:focus, .composer textarea:focus-visible { outline: none; box-shadow: none; resize: none; border-radius: 0; }
.side-card .person .grow { line-height: 1.25; }
.col-main .card.hero { background: var(--brand-grad); border-width: 0; padding: 2rem 1.3rem; }

/* ---------- Negocios (clasificados, servicios y comercios) ---------- */
.mk-head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .9rem; margin-bottom: 1.1rem; }
.mk-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.mk-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.mk-thumb { aspect-ratio: 1 / 1; background: var(--card-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mk-noimg { color: var(--muted); }
.mk-info { display: flex; flex-direction: column; gap: .2rem; padding: .7rem .8rem .85rem; }
.mk-price { font-size: 1.15rem; font-weight: 750; color: var(--heading); }
.mk-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-meta { color: var(--muted); font-size: .8rem; display: inline-flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.mk-biz { color: var(--blue); font-weight: 600; }
.mk-logo { aspect-ratio: 16 / 10; }
.mk-initial { font-size: 2.4rem; font-weight: 800; color: var(--blue); }
.mk-detail h2, .mk-business h2 { margin-top: 1rem; font-size: 1.05rem; }
.mk-gallery { display: grid; gap: .4rem; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 1rem; }
.mk-gallery.n1 { grid-template-columns: 1fr; }
.mk-gallery.n2 { grid-template-columns: 1fr 1fr; }
.mk-gallery.n3 { grid-template-columns: 2fr 1fr 1fr; }
.mk-gallery img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; display: block; background: var(--card-2); }
.mk-dtitle { font-size: 1.5rem; margin: .2rem 0; }
.mk-dprice { font-size: 1.8rem; font-weight: 800; color: var(--heading); margin: .1rem 0 .4rem; }
.mk-contact { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .9rem 0; }
.mk-safety ul { margin: .4rem 0 0 1.1rem; padding: 0; color: var(--muted); font-size: .9rem; }
.mk-safety li { margin-bottom: .3rem; }
.mk-bizhead { display: flex; gap: 1rem; align-items: center; margin-bottom: .6rem; }
.mk-bizhead h1 { margin: 0; font-size: 1.4rem; }
.mk-logo-lg { width: 84px; height: 84px; flex: 0 0 84px; border-radius: 20px; overflow: hidden; background: var(--card-2); display: flex; align-items: center; justify-content: center; }
.mk-logo-lg img { width: 100%; height: 100%; object-fit: cover; }
.mk-bizinfo li { display: flex; justify-content: space-between; gap: 1rem; }
.mk-bizinfo li > span:first-child { color: var(--muted); }
.post-listing .mk-feedline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: .2rem 0 .4rem; }
.post-listing .mk-feedprice { font-size: 1.15rem; font-weight: 800; color: var(--heading); }
.check { display: flex; gap: .5rem; align-items: flex-start; margin: .6rem 0; font-size: .92rem; }
.check input { margin-top: .25rem; }
@media (max-width: 600px) { .mk-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; } .mk-gallery.n3 { grid-template-columns: 1fr 1fr; } .mk-dprice { font-size: 1.5rem; } }
