/* =====================================================================
   BIZZARRO.APP — estilos
   Celular primero; tablet desde 640px; computadora desde 1024px.
   ===================================================================== */
:root {
  --ink: #1D1630;
  --ink-2: #3A3150;
  --muted: #5A5170;
  --ground: #EEEAF6;
  --card: #FFFFFF;
  --line-soft: #CFC8E0;
  --pink: #D61F78;
  --pink-soft: #F5B8D6;
  --yellow: #FFD23F;
  --sky: #C9E4FF;
  --lilac: #E2DCEE;
  --gold: #B07D0A;
  --gold-shadow: #E6B422;
  --radius: 18px;
  --shadow: 4px 4px 0 var(--ink);
  --font: 'Bricolage Grotesque', 'Trebuchet MS', 'Gill Sans', system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bottomnav-h: 68px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--safe-top) + 80px); }
body {
  margin: 0; overflow-x: hidden; min-height: 100vh; background: var(--ground); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom));
  -webkit-tap-highlight-color: transparent;
}
body.has-modal { overflow: hidden; }
a { color: var(--pink); }
a:hover { color: var(--ink); }
button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.boot { text-align: center; padding: 80px 20px; color: var(--muted); font-size: 18px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Barra superior ---------- */
.demo-banner { background: var(--yellow); color: var(--ink); font-size: 13px; padding: 6px 16px; text-align: center; padding-top: calc(var(--safe-top) + 6px); }
.demo-banner code { font-size: 12px; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; padding-top: var(--safe-top); }
.demo-banner:not([hidden]) + .topbar { padding-top: 0; }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 26px; letter-spacing: -1.2px; line-height: 1; white-space: nowrap; }
.logo span { color: var(--yellow); display: inline-block; transform: rotate(-8deg); }
.logo:hover { color: #fff; }
.topnav { display: none; gap: 4px; }
.topnav a { color: #E3DCF2; text-decoration: none; font-weight: 600; padding: 10px 12px; border-radius: 12px; white-space: nowrap; }
.topnav a.is-active, .topnav a:hover { color: #fff; background: #2C2244; }
.search { display: none; flex: 1; }
.search input { width: 100%; height: 44px; padding: 0 18px; border-radius: 22px; border: 2px solid #fff; background: #2C2244; color: #fff; font: inherit; font-size: 15px; }
.search input::placeholder { color: #B9AFD0; }
.search-mobile { margin-left: auto; }
.topbar .plus-link { display: none; }
.hdr-account { display: flex; align-items: center; gap: 8px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 22px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); font-weight: 800;
  font-size: 15px; text-decoration: none; white-space: nowrap; }
.btn:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--ink); }
.btn--primary { background: var(--pink); color: #fff; }
.btn--primary:hover { color: #fff; }
.btn--yellow { background: var(--yellow); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { color: #fff; }
.btn--ghost { background: transparent; }
.btn--danger { background: #9E1B1B; color: #fff; border-color: #9E1B1B; }
.btn--danger:hover { color: #fff; }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.topbar .btn { border-color: #fff; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 22px;
  border: none; background: transparent; color: var(--ink); text-decoration: none; flex: 0 0 auto; }
.icon-btn:hover { background: var(--lilac); color: var(--ink); }
.icon-btn--light { color: #fff; border: 2px solid #fff; }
.icon-btn--light:hover { background: #2C2244; color: #fff; }
.link-btn { background: none; border: none; padding: 6px 4px; color: var(--pink); font-weight: 600; text-decoration: underline; min-height: 36px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--ink);
  font-weight: 800; font-size: 14px; color: var(--ink); flex: 0 0 auto; }
.account-btn { display: inline-flex; border-radius: 50%; text-decoration: none; }
.account-btn .avatar { border-color: #fff; }

/* ---------- Layout ---------- */
#view { outline: none; }
.page { max-width: 1200px; margin: 0 auto; padding: 18px 12px 40px; }
.layout { display: flex; gap: 32px; align-items: flex-start; }
.col-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.col-side { display: none; }
.narrow { max-width: 720px; margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card--dark { background: var(--ink); color: #fff; }
.card--yellow { background: var(--yellow); }
.h1 { font-size: 44px; font-weight: 800; letter-spacing: -2px; line-height: 1; margin: 6px 0 8px; }
.h2 { font-size: 26px; font-weight: 800; letter-spacing: -.8px; line-height: 1.1; margin: 0 0 6px; }
.h3 { font-size: 20px; font-weight: 800; letter-spacing: -.4px; margin: 0 0 4px; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 56ch; margin: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; color: var(--ink); min-height: 44px; align-self: flex-start; }

/* ---------- Bloques del feed ---------- */
.pinned { position: relative; background: var(--pink); color: #fff; border: 3px solid var(--ink); border-radius: 22px;
  padding: 26px 18px 16px; box-shadow: 6px 6px 0 var(--ink); margin-top: 10px; }
.pinned-badge { position: absolute; top: -16px; left: 16px; transform: rotate(-4deg); background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 10px; padding: 4px 12px; font-weight: 800; font-size: 15px; box-shadow: 2px 2px 0 var(--ink);
  display: flex; align-items: center; gap: 6px; }
.pinned-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: #FFE3F0; margin-bottom: 8px; }
.pinned-meta b { color: #fff; }
.pinned-score { margin-left: auto; background: var(--ink); color: var(--yellow); border-radius: 10px; padding: 2px 10px; font-weight: 800; }
.pinned-text { display: block; color: #fff; text-decoration: none; font-size: 24px; font-weight: 800; line-height: 1.15; letter-spacing: -.6px; margin-bottom: 12px; }
.pinned-text:hover { color: #fff; text-decoration: underline; }
.pinned-runners { display: grid; gap: 10px; border-top: 2px dashed #F59BC6; padding-top: 12px; margin-top: 4px; }
.pinned-runners a { display: flex; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.3; }
.pinned-runners a:hover { text-decoration: underline; }
.pinned-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.pinned-foot a { color: #fff; font-weight: 600; font-size: 14px; }
.pos { flex: 0 0 30px; height: 30px; border-radius: 9px; border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: var(--ink); background: #fff; }
.pos--1 { background: var(--yellow); } .pos--2 { background: var(--lilac); } .pos--3 { background: var(--pink-soft); }

.consigna { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--yellow); border: 2px solid var(--ink);
  border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.consigna-text { flex: 1 1 220px; }
.consigna-text small { display: block; font-size: 14px; font-weight: 600; }
.consigna-text strong { display: block; font-size: 21px; font-weight: 800; line-height: 1.15; letter-spacing: -.4px; }

.composer-prompt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card);
  border: 2px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); color: var(--muted); font-size: 17px; min-height: 64px; }
.composer-prompt strong { color: var(--ink); font-weight: 800; }
.composer-prompt .btn { margin-left: auto; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 22px;
  border: 2px solid var(--ink); background: var(--card); color: var(--ink); font-weight: 800; font-size: 15px; text-decoration: none; }
.tab.is-active { background: var(--ink); color: #fff; }
.tab:hover { color: var(--ink); background: var(--lilac); }
.tab.is-active:hover { color: #fff; background: var(--ink); }

.feed { display: flex; flex-direction: column; gap: 18px; }
.feed-end { text-align: center; color: var(--muted); padding: 20px 10px; min-height: 60px; }

/* ---------- Post ---------- */
.post { position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px 16px 12px; box-shadow: var(--shadow); }
.post--oro { border: 3px solid var(--gold); box-shadow: 6px 6px 0 var(--gold-shadow); }
.post--color { border: 3px solid var(--pink); box-shadow: 6px 6px 0 var(--pink); }
.sticker { position: absolute; top: -14px; right: 18px; transform: rotate(6deg); background: var(--yellow); border: 2px solid var(--ink);
  border-radius: 10px; padding: 3px 12px; font-weight: 800; font-size: 15px; box-shadow: 2px 2px 0 var(--ink); }
.post-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.post-author { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--ink); text-decoration: none; }
a.post-author:hover { text-decoration: underline; color: var(--ink); }
.post-time { font-size: 14px; color: var(--muted); text-decoration: none; }
.chip { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 10px; background: var(--ground); color: var(--ink-2); text-decoration: none; }
.chip:hover { background: var(--lilac); color: var(--ink); }
.law-badge { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 10px; background: var(--ink); color: var(--yellow); }
.post-menu-btn { margin-left: auto; width: 40px; height: 40px; }
.beats-ref { display: block; font-size: 14px; color: var(--ink-2); background: var(--ground); border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; text-decoration: none; }
.beats-ref:hover { background: var(--lilac); color: var(--ink); }
.post-text { margin: 0 0 12px; font-size: 18px; font-weight: 600; line-height: 1.38; letter-spacing: -.2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-text--big { font-size: 24px; font-weight: 800; line-height: 1.22; letter-spacing: -.6px; }
.post-img { border-radius: 12px; border: 2px solid var(--ink); margin-bottom: 12px; max-height: 520px; width: auto; object-fit: contain; background: var(--ground); }
.meter { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.meter-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.meter-bar { flex: 1; height: 10px; border-radius: 5px; background: var(--ground); border: 1.5px solid var(--ink); overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: var(--pink); }
.meter-val { font-weight: 800; font-size: 15px; min-width: 24px; text-align: right; }
.rate-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin: -2px 0 12px; }
.rate-row[hidden] { display: none; }
.rate-btn { min-height: 40px; border-radius: 10px; border: 2px solid var(--ink); background: var(--card); font-weight: 800; padding: 0; }
.rate-btn:hover, .rate-btn.is-on { background: var(--pink); color: #fff; }
.post-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.pill { min-height: 40px; padding: 0 12px; border-radius: 20px; border: 2px solid var(--ink); background: var(--card); color: var(--ink);
  font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.pill b { font-weight: 800; }
.pill:not(:disabled):hover { background: var(--ground); }
.pill.is-on { background: var(--yellow); }
.pill--metoo.is-on { background: var(--pink); color: #fff; }
.pill--beat { background: var(--yellow); font-weight: 800; }
.pill--beat:not(:disabled):hover { background: #FFE07A; }
.post-foot { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; color: var(--muted); align-items: center; }
.post-foot a { color: var(--muted); }
.upgraded { margin-left: auto; font-size: 13px; }
.post--skeleton { height: 170px; display: flex; flex-direction: column; gap: 12px; box-shadow: none; border-color: var(--line-soft); }
.post--skeleton span { display: block; height: 14px; border-radius: 7px; background: var(--ground); }
.post--skeleton span:nth-child(1) { width: 40%; } .post--skeleton span:nth-child(2) { width: 90%; height: 20px; } .post--skeleton span:nth-child(3) { width: 70%; height: 20px; }

/* ---------- Publicidad ---------- */
.ad { border: 2px dashed #8A80A0; border-radius: var(--radius); background: #F7F5FB; padding: 14px 16px; color: var(--muted); min-height: 110px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.ad--placeholder { align-items: center; text-align: center; }
.ad-label { font-size: 12px; font-weight: 600; }
.col-side .ad { min-height: 250px; }

/* ---------- Barra lateral ---------- */
.side-stack { display: flex; flex-direction: column; gap: 20px; }
.counter-num { display: flex; align-items: baseline; gap: 8px; }
.counter-num strong { font-size: 54px; font-weight: 800; letter-spacing: -2.5px; line-height: 1; }
.counter-num span { font-size: 20px; font-weight: 800; }
.counter-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border-top: 2px solid var(--ink); padding-top: 10px; margin-top: 10px; }
.counter-stats strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.counter-stats span { font-size: 13px; color: var(--ink-2); }
.seg { display: flex; border: 2px solid var(--ink); border-radius: 22px; overflow: hidden; margin: 10px 0 14px; background: var(--card); }
.seg button, .seg a { flex: 1; white-space: nowrap; min-height: 42px; border: none; background: transparent; font-weight: 800; font-size: 14px; color: var(--ink);
  padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.seg .is-on { background: var(--pink); color: #fff; }
.seg > * + * { border-left: 2px solid var(--ink); }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rank-list li { display: flex; gap: 12px; align-items: flex-start; }
.rank-list a { color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.3; display: block; }
.rank-list a:hover { text-decoration: underline; }
.rank-list small { color: var(--muted); font-size: 13px; }
.laws-card p { color: #D8D0EA; font-size: 14px; margin: 0 0 10px; }
.laws-card .h3 { color: var(--yellow); }
.laws-card a { color: var(--yellow); font-weight: 600; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 800; font-size: 15px; }
.field small { color: var(--muted); font-size: 13px; }
.input, .textarea, .select { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--ink);
  background: var(--card); color: var(--ink); font: inherit; font-size: 16px; }
.textarea { resize: vertical; min-height: 120px; line-height: 1.45; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin-bottom: 12px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--pink); flex: 0 0 auto; }
.form-msg { font-size: 14px; min-height: 20px; }
.form-msg.is-error { color: #9E1B1B; font-weight: 600; }
.form-msg.is-ok { color: #1F6B3A; font-weight: 600; }
.auth-card { max-width: 440px; margin: 20px auto; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches label { position: relative; }
.swatches input { position: absolute; opacity: 0; }
.swatches span:first-of-type { display: block; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); cursor: pointer; }
.swatches input:checked + span { box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--ink); }
.swatches input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 4px; }

/* ---------- Composer ---------- */
.composer-parent { background: var(--ground); border-radius: 12px; padding: 8px 12px; font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.composer-preview { position: relative; display: inline-block; margin: 8px 0; }
.composer-preview img { max-height: 180px; border-radius: 12px; border: 2px solid var(--ink); }
.composer-preview button { position: absolute; top: 6px; right: 6px; background: var(--card); border: 2px solid var(--ink); }
.composer-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 2px dashed var(--line-soft); padding-top: 12px; margin-top: 4px; }
.char-count { font-size: 13px; color: var(--muted); margin-left: auto; }
.char-count.is-over { color: #9E1B1B; font-weight: 800; }

/* ---------- Modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(29, 22, 48, .55); display: flex; align-items: flex-end; justify-content: center; }
.modal { position: relative; width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; background: var(--card); border: 2px solid var(--ink);
  border-radius: 22px 22px 0 0; padding: 22px 18px calc(18px + var(--safe-bottom)); animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; top: 10px; right: 10px; }
.modal-title { font-size: 24px; font-weight: 800; letter-spacing: -.6px; margin: 0 44px 12px 0; line-height: 1.15; }
.modal-text { font-size: 17px; margin: 8px 44px 0 0; }
.sheet-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.sheet-list .btn { justify-content: flex-start; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 12px); z-index: 60;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: 3px 3px 0 var(--pink);
  transition: opacity .3s, transform .3s; text-align: center; }
.toast--error { background: #9E1B1B; box-shadow: 3px 3px 0 var(--ink); }
.toast.is-out { opacity: 0; transform: translateY(8px); }

/* ---------- Navegación inferior (celular y tablet) ---------- */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 2px solid var(--ink);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
  height: calc(var(--bottomnav-h) + var(--safe-bottom)); padding: 0 6px var(--safe-bottom); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted);
  font-size: 12px; font-weight: 600; min-height: 52px; justify-content: center; }
.bottomnav a.is-active { color: var(--ink); font-weight: 800; }
.bottomnav-post { justify-self: center; width: 56px; height: 56px; border-radius: 28px; background: var(--pink); border: 2px solid var(--ink);
  color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 2px 2px 0 var(--ink); }

/* ---------- Salón de la fama / mejoras / varios ---------- */
.hero-title { font-size: 52px; font-weight: 800; letter-spacing: -2.5px; line-height: .95; margin: 8px 0 12px; }
.year-banner { position: relative; background: var(--ink); color: #fff; border-radius: 24px; padding: 28px 22px; box-shadow: 6px 6px 0 var(--yellow);
  display: flex; gap: 22px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.year-banner h2 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -1.2px; line-height: 1.05; color: var(--yellow); }
.year-banner p { color: #E3DCF2; margin: 10px 0 0; max-width: 46ch; }
.tag-float { position: absolute; top: -16px; right: 22px; transform: rotate(5deg); background: var(--pink); border: 2px solid #fff;
  border-radius: 10px; padding: 3px 12px; font-weight: 800; font-size: 14px; }
.big-num { font-size: 52px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.winner { display: flex; flex-wrap: wrap; background: var(--card); border: 2px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.winner-plaque { flex: 1 1 100%; padding: 14px 18px; border-bottom: 2px solid var(--ink); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.winner-plaque strong { font-size: 24px; font-weight: 800; letter-spacing: -1px; line-height: 1.05; }
.winner-body { flex: 1 1 300px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.winner-text { color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 800; line-height: 1.25; letter-spacing: -.4px; }
.winner-text:hover { text-decoration: underline; color: var(--ink); }
.prize { font-weight: 800; background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; padding: 1px 10px; font-size: 13px; }
.honor { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.honor li a { display: inline-block; padding: 8px 16px; border-radius: 20px; border: 2px solid var(--ink); font-weight: 600; color: var(--ink); text-decoration: none; }
.upgrade-list { display: flex; flex-direction: column; gap: 12px; }
.upgrade { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 18px; border: 2px solid var(--ink); background: var(--card); flex-wrap: wrap; }
.upgrade-price { flex: 0 0 80px; height: 54px; border-radius: 14px; border: 2px solid var(--ink); background: var(--yellow); display: flex;
  align-items: center; justify-content: center; font-size: 20px; font-weight: 800; letter-spacing: -.5px; }
.upgrade strong { display: block; font-size: 19px; font-weight: 800; }
.upgrade span { color: var(--ink-2); font-size: 15px; }
.plus-card ul { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; font-size: 17px; }
.plus-card li { border-bottom: 1px solid #4A3F66; padding-bottom: 8px; }
.prose { max-width: 70ch; }
.prose h2 { font-size: 22px; margin: 22px 0 6px; }
.prose p, .prose li { color: var(--ink-2); }
.comment { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--lilac); }
.comment:first-child { border-top: none; }
.comment-body { flex: 1; min-width: 0; }
.comment-body p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-meta { display: flex; gap: 8px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.comment-meta a { font-weight: 800; color: var(--ink); text-decoration: none; }
.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.badge-plus { background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; padding: 1px 10px; font-weight: 800; font-size: 13px; }

/* =====================================================================
   TABLET (640px o más)
   ===================================================================== */
@media (min-width: 640px) {
  .page { padding: 24px 20px 48px; }
  .search { display: flex; }
  .search-mobile { display: none; }
  .topbar .plus-link { display: inline-flex; }
  .topbar-in { gap: 16px; padding: 12px 20px; }
  .logo { font-size: 30px; }
  .post { padding: 20px 22px 14px; }
  .post-text { font-size: 19px; }
  .post-text--big { font-size: 26px; }
  .pinned { padding: 28px 26px 20px; }
  .pinned-text { font-size: 30px; letter-spacing: -.8px; }
  .pinned-runners { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-wrap { align-items: center; padding: 20px; }
  .modal { border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); padding: 26px 26px 24px; }
  .h1 { font-size: 56px; }
  .hero-title { font-size: 80px; letter-spacing: -4px; }
  .year-banner { padding: 34px; }
  .year-banner h2 { font-size: 44px; }
  .winner-plaque { flex: 0 0 190px; border-bottom: none; border-right: 2px solid var(--ink); flex-direction: column; justify-content: center; gap: 2px; }
}

/* =====================================================================
   COMPUTADORA (1024px o más)
   ===================================================================== */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .bottomnav { display: none; }
  .toasts { bottom: 24px; }
  .topnav { display: flex; }
  .col-side { display: block; flex: 0 0 330px; position: sticky; top: calc(var(--safe-top) + 88px); max-height: calc(100vh - 100px); overflow-y: auto; padding: 0 8px 12px 0; }
  .h1 { font-size: 64px; }
}

/* =====================================================================
   PANEL DE CONTROL
   ===================================================================== */
.panel { display: flex; flex-direction: column; gap: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.panel-h { font-size: 28px; font-weight: 800; letter-spacing: -1px; margin: 18px 0 0; }
.mau-card { display: flex; flex-direction: column; gap: 10px; }
.mau-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.mau-num { display: block; font-size: 56px; font-weight: 800; letter-spacing: -2.5px; line-height: 1; }
.mau-limit { font-weight: 600; font-size: 14px; }
.mau-note { margin: 0; font-weight: 600; }
.progress { height: 16px; border: 2px solid var(--ink); border-radius: 8px; background: var(--card); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--pink); min-width: 2px; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi { background: var(--card); border: 2px solid var(--ink); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi strong { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; overflow-wrap: anywhere; }
.kpi span { font-weight: 600; font-size: 14px; line-height: 1.3; }
.kpi small { color: var(--muted); font-size: 13px; }
.chart-card { padding: 14px 16px; }
.ch-box { overflow-x: auto; }
.ch-box svg { display: block; width: 100%; min-width: 480px; height: auto; }
.ch-grid { stroke: var(--line-soft); stroke-width: 1; }
.ch-txt { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.ch-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ch-legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.two-col { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bars { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr 48px; gap: 10px; align-items: center; font-size: 14px; }
.bar-track { height: 12px; border-radius: 6px; background: var(--ground); border: 1.5px solid var(--ink); overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--pink); }
.bar-val { text-align: right; font-weight: 800; }
.inline-input input { width: 80px; min-height: 36px; border: 2px solid var(--ink); border-radius: 10px; padding: 2px 8px; font: inherit; font-weight: 800; background: var(--card); color: var(--ink); margin-left: 2px; }
.ledger-form { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; margin-top: 8px; }
.ledger-form .field--wide { grid-column: span 2; }
.ledger-form .btn { margin-bottom: 14px; }
@media (max-width: 520px) { .ledger-form .field--wide { grid-column: auto; } }
.table-box { overflow-x: auto; margin-top: 8px; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 6px 8px 6px 0; border-bottom: 2px solid var(--ink); }
table.data td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--lilac); }
table.data .num { text-align: right; white-space: nowrap; }
table.data td.amt-pos { color: #1F6B3A; font-weight: 800; }
table.data td.amt-neg { color: #9E1B1B; font-weight: 800; }
table.data a { color: var(--ink); font-weight: 600; }
.panel-period { margin: 0; font-size: 17px; }
.panel-period b { font-weight: 800; }
.period-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.period-tabs::-webkit-scrollbar { display: none; }
.period-tabs a { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 22px;
  border: 2px solid var(--ink); background: var(--card); color: var(--ink); font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; }
.period-tabs a:hover { background: var(--lilac); color: var(--ink); }
.period-tabs a.is-on { background: var(--ink); color: #fff; }
.period-pick { display: flex; gap: 12px; flex-wrap: wrap; }
.period-pick label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.period-pick .select { width: auto; min-width: 140px; }
.ch-zero { stroke: var(--ink); stroke-width: 1.5; }
.ledger-sub { font-size: 16px; margin: 18px 0 4px; }
table.data tfoot th, table.data tfoot td { border-top: 2px solid var(--ink); border-bottom: none; font-weight: 800; padding-top: 10px; text-align: left; }
table.data tfoot td.num { text-align: right; }

/* =====================================================================
   NOVEDADES 1.2
   ===================================================================== */
.bell { position: relative; }
.bell[hidden] { display: none; }
.bell-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--pink); color: #fff; border: 2px solid var(--ink); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.bell-badge[hidden] { display: none; }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.notif a { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--card); color: var(--ink); text-decoration: none; }
.notif a:hover { background: var(--ground); color: var(--ink); }
.notif.is-new a { box-shadow: 4px 4px 0 var(--pink); }
.notif-dot { flex: 0 0 10px; height: 10px; border-radius: 5px; margin-top: 8px; background: transparent; }
.notif.is-new .notif-dot { background: var(--pink); }
.notif-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.notif-body small { font-size: 13px; }
.notif-new { align-self: flex-start; margin-top: 4px; font-size: 12px; font-weight: 800; background: var(--pink); color: #fff; border-radius: 8px; padding: 2px 8px; }
.captcha { margin: 4px 0 12px; min-height: 65px; }
.chip--warn { background: #FFE1E1; color: #7A1010; }
.mod-item { box-shadow: none; }

/* ---------- Ingreso con Google ---------- */
.btn--google { background: var(--card); min-height: 50px; font-size: 16px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 16px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 2px; background: var(--line-soft); }
[data-google][hidden] { display: none; }
