/* Country flags on Windows (Windows has no flag emoji). Twemoji Country Flags — CC-BY 4.0, see fonts/ */
@font-face {
  font-family: 'Twemoji Country Flags';
  src: url('../fonts/TwemojiCountryFlags.woff2') format('woff2');
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  font-display: swap;
}
/* SocialBuzzly — Catch the Trend. Go Viral. — by FreddyDeveloper */
:root {
  --bg: #07060f;
  --bg-2: #0d0b1c;
  --ink: #f4f2ff;
  --ink-2: #c9c6e4;
  --muted: #8c89a8;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --glass: rgba(22, 19, 44, .55);
  --glass-2: rgba(255, 255, 255, .035);
  --yellow: #ffd21f;
  --pink: #ff3d81;
  --violet: #7c5cff;
  --cyan: #00d1ff;
  --green: #2ee59d;
  --orange: #ff8a00;
  --red: #ff4d6d;
  --grad: linear-gradient(100deg, var(--yellow) 0%, var(--pink) 38%, var(--violet) 72%, var(--cyan) 100%);
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px var(--line);
  --font: 'Twemoji Country Flags', 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --display: 'Twemoji Country Flags', 'Sora', 'Inter', system-ui, sans-serif;
  --mono: 'Twemoji Country Flags', 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .85em; background: rgba(255,255,255,.08); padding: .1em .4em; border-radius: 6px; }
.muted { color: var(--muted); margin: .25rem 0 0; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Fondo: aurora + grano ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { width: 52vw; height: 52vw; left: -14vw; top: -18vw; background: radial-gradient(circle, #7c5cff 0%, transparent 65%); }
.aurora span:nth-child(2) { width: 46vw; height: 46vw; right: -12vw; top: 8vh; background: radial-gradient(circle, #ff3d81 0%, transparent 65%); animation-duration: 32s; opacity: .38; }
.aurora span:nth-child(3) { width: 60vw; height: 40vw; left: 20vw; bottom: -26vw; background: radial-gradient(circle, #00d1ff 0%, transparent 65%); animation-duration: 38s; opacity: .28; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 4vh) scale(1.1); }
  100% { transform: translate(-4vw, 8vh) scale(.95); }
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8);
}

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 6px 18px rgba(255, 61, 129, .45)); transition: transform .4s cubic-bezier(.2,.9,.3,1.4); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font: 800 1.25rem/1 var(--display); letter-spacing: -.02em; }
.brand__text strong em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__text small { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; font-weight: 600; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem clamp(16px, 3vw, 32px);
  background: rgba(7, 6, 15, .62);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar__status {
  display: inline-flex; align-items: center; gap: .55rem; margin-left: auto;
  padding: .4rem .85rem; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line);
  font-size: .8rem; color: var(--ink-2); white-space: nowrap;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(46, 229, 157, .6); animation: pulse 2s infinite; }
.pulse.is-warn { background: var(--yellow); }
.pulse.is-err { background: var(--red); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(46, 229, 157, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 229, 157, 0); } }
.topbar__nav { display: flex; gap: .3rem; }
.topbar__nav a {
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .8rem; border-radius: 10px;
  text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .88rem; transition: background .2s, color .2s;
}
.topbar__nav a:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.topbar__nav a.is-active { background: rgba(124, 92, 255, .18); color: #fff; box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .4); }
.topbar__nav svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 1.6rem clamp(16px, 3vw, 32px) 3rem; flex: 1; }
.wrap--narrow { max-width: 920px; }
.section { margin-top: 2.2rem; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1.5rem; margin-bottom: 1rem; }
.section__head h2, .page-title { font: 700 1.45rem/1.2 var(--display); letter-spacing: -.02em; margin: 0; }
.page-title { font-size: 2.2rem; }
.section__head h2 small { font: 500 .95rem var(--font); color: var(--muted); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.kpi { padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; inset: auto -40% -60% auto; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(124,92,255,.25), transparent 70%); }
.kpi--hot::after { background: radial-gradient(circle, rgba(255,61,129,.32), transparent 70%); }
.kpi--budget::after { background: radial-gradient(circle, rgba(46,229,157,.22), transparent 70%); }
.kpi__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
.kpi__value { font: 700 2.1rem/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi__value--sm { font-size: 1.55rem; }
.kpi--hot .kpi__value { background: linear-gradient(90deg, var(--yellow), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi__sub { font-size: .8rem; color: var(--muted); }
.meter { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: .2rem 0; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--yellow)); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.meter i.is-high { background: linear-gradient(90deg, var(--yellow), var(--red)); }

/* ---------- Filtros ---------- */
.filters { margin-top: 1.4rem; padding: .7rem; display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; border-radius: var(--r); }
.seg { display: inline-flex; padding: 4px; gap: 2px; background: rgba(0,0,0,.25); border-radius: 12px; border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: .45rem .85rem; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--ink-2); transition: all .2s; }
.seg button:hover { color: #fff; }
.seg button.is-on { background: linear-gradient(135deg, rgba(124,92,255,.9), rgba(255,61,129,.85)); color: #fff; box-shadow: 0 6px 18px -6px rgba(255,61,129,.6); }
.select { position: relative; }
.select select, .field select {
  appearance: none; -webkit-appearance: none; background: rgba(0,0,0,.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9c6e4' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right .8rem center;
  border: 1px solid var(--line); border-radius: 12px; padding: .55rem 2.2rem .55rem .85rem; cursor: pointer;
}
.select select option, .field select option { background: #15122b; }
.search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: .5rem; padding: 0 .85rem; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: rgba(124,92,255,.7); box-shadow: 0 0 0 4px rgba(124,92,255,.15); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; background: none; outline: none; padding: .58rem 0; min-width: 0; }

.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; user-select: none; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { width: 40px; height: 22px; border-radius: 99px; background: rgba(255,255,255,.12); position: relative; transition: background .25s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.switch input:checked + i { background: linear-gradient(90deg, var(--violet), var(--pink)); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--cyan); outline-offset: 2px; }
.switch input:disabled + i { opacity: .4; }
.switch--row { display: flex; padding: .6rem 0; }
.switch small { display: block; font-weight: 400; color: var(--muted); }

/* ---------- Chips de categoría ---------- */
.chips { display: flex; gap: .55rem; margin-top: 1rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
.chip {
  --c: var(--violet);
  display: inline-flex; align-items: center; gap: .5rem; flex: none;
  padding: .5rem .9rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--glass-2); font-weight: 600; font-size: .86rem; color: var(--ink-2);
  transition: all .2s;
}
.chip:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); color: #fff; transform: translateY(-1px); }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.chip b { font: 700 .75rem var(--mono); padding: .1rem .45rem; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--ink-2); }
.chip.is-on { color: #fff; border-color: var(--c); background: color-mix(in srgb, var(--c) 20%, transparent); box-shadow: 0 8px 26px -10px var(--c); }
.chip.is-on b { background: var(--c); color: #0b0a16; }
.chip.is-empty { opacity: .45; }

/* ---------- Tarjetas "hashtag ideal" ---------- */
.picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.pick {
  --c: var(--violet);
  position: relative; padding: 1.15rem; border-radius: var(--r); overflow: hidden; cursor: pointer;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, rgba(22,19,44,.7)) 0%, rgba(14,12,30,.75) 60%);
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line));
  display: flex; flex-direction: column; gap: .8rem; min-width: 0;
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2), box-shadow .3s, border-color .3s;
  animation: rise .6s cubic-bezier(.2,.8,.2,1) both;
}
.pick:hover { transform: translateY(-4px); box-shadow: 0 26px 60px -24px color-mix(in srgb, var(--c) 70%, transparent); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.pick--top { grid-column: span 2; grid-row: span 2; padding: 1.6rem; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pick__head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.pick__pos { font: 800 .8rem var(--mono); color: var(--muted); }
.pick__name { font: 700 1.25rem/1.2 var(--display); letter-spacing: -.02em; word-break: break-word; margin: .15rem 0 0; }
.pick--top .pick__name { font-size: clamp(1.8rem, 3.2vw, 2.7rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pick__tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.pick__spark { height: 44px; margin-top: auto; }
.pick--top .pick__spark { height: 120px; }
.pick__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.pick__meta div { background: rgba(0,0,0,.22); border-radius: 10px; padding: .45rem .55rem; }
.pick__meta span { display: block; font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.pick__meta b { font: 700 .95rem var(--mono); }
.pick__foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.flags { display: flex; gap: .2rem; font-size: 1.05rem; }
.pick__why { font-size: .88rem; color: var(--ink-2); margin: 0; }

.ring { --p: 50; --c: var(--violet); width: 58px; height: 58px; flex: none; position: relative; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); display: grid; place-items: center; }
.ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #110e24; }
.ring b { position: relative; font: 800 1.05rem var(--mono); }
.ring small { position: absolute; bottom: -1.05rem; font-size: .58rem; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.pick--top .ring { width: 92px; height: 92px; }
.pick--top .ring::before { inset: 7px; }
.pick--top .ring b { font-size: 1.7rem; }

.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: rgba(255,255,255,.07); color: var(--ink-2); white-space: nowrap; }
.tag--cat { background: color-mix(in srgb, var(--c) 18%, transparent); color: color-mix(in srgb, var(--c) 70%, white); }
.tag--ok { background: rgba(46,229,157,.14); color: var(--green); }
.tag--warn { background: rgba(255,210,31,.14); color: var(--yellow); }
.tag--err { background: rgba(255,77,109,.14); color: var(--red); }
.st { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.st--hot { background: linear-gradient(90deg, rgba(255,210,31,.22), rgba(255,61,129,.28)); color: #ffd6e6; box-shadow: 0 0 18px -4px rgba(255,61,129,.7); }
.st--rising { background: rgba(46,229,157,.15); color: var(--green); }
.st--recurring { background: rgba(0,209,255,.14); color: var(--cyan); }
.st--saturated { background: rgba(255,138,0,.15); color: var(--orange); }
.st--cooling { background: rgba(140,137,168,.16); color: var(--muted); }
.st--steady { background: rgba(255,255,255,.07); color: var(--ink-2); }
.st--avoid { background: rgba(255,77,109,.14); color: var(--red); }

.copy { border: 1px solid var(--line-2); background: rgba(255,255,255,.05); border-radius: 10px; padding: .4rem .7rem; cursor: pointer; font-weight: 700; font-size: .8rem; display: inline-flex; gap: .35rem; align-items: center; transition: all .2s; }
.copy:hover { background: #fff; color: #0b0a16; }
.copy svg { width: 14px; height: 14px; }

/* ---------- Tabla ---------- */
.table { overflow: hidden; }
.row {
  display: grid; grid-template-columns: 54px minmax(160px, 2.2fr) 1.1fr 128px 82px 70px 1fr 110px;
  align-items: center; gap: .8rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: rgba(255,255,255,.035); }
.row--head { cursor: default; font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; background: rgba(0,0,0,.2); }
.row--head:hover { background: rgba(0,0,0,.2); }
.row--more { display: block; width: 100%; border: 0; background: rgba(255,255,255,.03); color: var(--ink-2); font-weight: 700; text-align: center; padding: .9rem; }
.row--more:hover { color: #fff; background: rgba(124,92,255,.14); }
.row__score { font: 800 1rem var(--mono); }
.row__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__num { font: 600 .88rem var(--mono); color: var(--ink-2); }
.up { color: var(--green); } .down { color: var(--red); } .new { color: var(--yellow); }
.row svg.spark { width: 100%; height: 26px; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.empty b { display: block; font: 700 1.2rem var(--display); color: var(--ink); margin-bottom: .3rem; }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r); min-height: 160px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Panel lateral de detalle ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(4,3,10,.6); opacity: 0; transition: opacity .3s; backdrop-filter: blur(4px); }
.drawer__panel { position: absolute; top: 0; right: 0; height: 100%; width: min(620px, 100%); border-radius: 0; overflow-y: auto;
  padding: 1.6rem; transform: translateX(100%); transition: transform .45s cubic-bezier(.2,.9,.2,1); background: rgba(13,11,28,.94); }
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__close { position: absolute; top: 1rem; right: 1rem; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.05); cursor: pointer; font-size: 1rem; }
.drawer__close:hover { background: #fff; color: #000; }
.d-title { font: 800 clamp(1.6rem, 4vw, 2.3rem)/1.15 var(--display); letter-spacing: -.03em; margin: .4rem 2.5rem .8rem 0; word-break: break-word; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.d-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1.1rem 0; }
.d-grid div { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: .7rem; }
.d-grid span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.d-grid b { font: 700 1.05rem var(--mono); }
.d-h { font: 700 1rem var(--display); margin: 1.5rem 0 .6rem; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font: 600 10px var(--mono); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; color: var(--ink-2); margin-top: .4rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.days { display: flex; gap: 4px; align-items: flex-end; height: 70px; }
.days span { flex: 1; min-width: 6px; max-width: 26px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--pink), var(--violet)); opacity: .85; position: relative; }
.recat { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .4rem; }
.recat select { flex: 1; min-width: 180px; }
.d-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- Botones / formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .78rem 1.25rem; border-radius: 12px; border: 0; cursor: pointer; font-weight: 700; text-decoration: none; transition: transform .2s, box-shadow .25s, background .2s; }
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--grad); background-size: 160% 100%; color: #0b0a16; box-shadow: 0 12px 30px -10px rgba(255,61,129,.65); }
.btn--primary:hover { background-position: 100% 0; box-shadow: 0 16px 40px -10px rgba(124,92,255,.75); transform: translateY(-1px); }
.btn--ghost { background: rgba(255,255,255,.06); border: 1px solid var(--line-2); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: wait; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field > span { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select { width: 100%; background: rgba(0,0,0,.28); border: 1px solid var(--line-2); border-radius: 12px; padding: .75rem .9rem; outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus { border-color: rgba(124,92,255,.8); box-shadow: 0 0 0 4px rgba(124,92,255,.18); }
.alert { padding: .8rem 1rem; border-radius: 12px; font-size: .9rem; margin-bottom: 1rem; border: 1px solid; }
.alert--warn { background: rgba(255,210,31,.08); border-color: rgba(255,210,31,.3); color: #ffe78a; }
.alert--err { background: rgba(255,77,109,.1); border-color: rgba(255,77,109,.35); color: #ffb3c1; }
.alert--ok { background: rgba(46,229,157,.1); border-color: rgba(46,229,157,.35); color: #9ff5cf; }
.alert--banner { margin-bottom: 1.2rem; }

/* ---------- Login ---------- */
.page-login { justify-content: center; }
.login { flex: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; width: 100%; max-width: 1180px; margin: 0 auto; padding: 3rem clamp(16px, 4vw, 40px); }
.login__title { font: 800 clamp(2.3rem, 5.4vw, 4.4rem)/1.02 var(--display); letter-spacing: -.045em; margin: 2.2rem 0 1rem; }
.login__lead { font-size: 1.12rem; color: var(--ink-2); max-width: 32rem; margin: 0; }
.login__ticker { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.login__ticker li { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .85rem; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); font-weight: 700; font-size: .9rem; animation: float 5s ease-in-out infinite; }
.login__ticker li:nth-child(2) { animation-delay: -1.2s; } .login__ticker li:nth-child(3) { animation-delay: -2.4s; } .login__ticker li:nth-child(4) { animation-delay: -3.6s; }
.login__ticker i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.login__ticker b { color: var(--green); font-family: var(--mono); font-size: .8rem; }
@keyframes float { 50% { transform: translateY(-6px); } }
.login__card { padding: 2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.login__card h2 { font: 700 1.5rem var(--display); margin: 0 0 .2rem; }
.login__by { text-align: center; font-size: .82rem; color: var(--muted); margin: .2rem 0 0; }
.login__by b { color: var(--ink-2); }

/* ---------- Ajustes ---------- */
.status-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.settings { display: flex; flex-direction: column; gap: 1rem; }
.card { padding: 1.4rem; }
.card h2 { font: 700 1.15rem var(--display); margin: 0; }
.countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .6rem; margin-top: 1rem; }
.country input { position: absolute; opacity: 0; }
.country__box { display: flex; align-items: center; gap: .55rem; padding: .7rem .8rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.2); cursor: pointer; transition: all .2s; }
.country__box:hover { border-color: var(--line-2); }
.country input:checked + .country__box { border-color: rgba(124,92,255,.8); background: rgba(124,92,255,.16); box-shadow: 0 8px 22px -12px rgba(124,92,255,.9); }
.country input:focus-visible + .country__box { outline: 2px solid var(--cyan); outline-offset: 2px; }
.country__flag { font-size: 1.3rem; }
.country__name { font-weight: 600; font-size: .9rem; flex: 1; }
.country__lang { font: 700 .65rem var(--mono); padding: .15rem .4rem; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--ink-2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; align-items: end; }
.estimate { padding: .7rem 1rem; border-radius: 12px; background: linear-gradient(135deg, rgba(46,229,157,.12), rgba(0,209,255,.08)); border: 1px solid rgba(46,229,157,.3); }
.estimate span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.estimate strong { font: 800 1.6rem var(--display); color: var(--green); }
.estimate small { display: block; color: var(--muted); font-size: .76rem; }
.estimate.is-over { border-color: rgba(255,77,109,.5); background: rgba(255,77,109,.1); }
.estimate.is-over strong { color: var(--red); }
.actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.runs { display: flex; flex-direction: column; margin-top: .8rem; }
.run { display: grid; grid-template-columns: 12px 150px 60px 1fr; gap: .7rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.run:last-child { border-bottom: 0; }
.run__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.run--error .run__dot { background: var(--red); } .run--budget .run__dot { background: var(--yellow); } .run--running .run__dot { background: var(--cyan); }
.run time { font-family: var(--mono); color: var(--ink-2); font-size: .8rem; }
.run__cost { font-family: var(--mono); font-weight: 700; }
.run__msg { color: var(--muted); }

/* ---------- Toast + pie ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; z-index: 60; padding: .75rem 1.1rem; border-radius: 12px; background: #fff; color: #0b0a16; font-weight: 700; box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); transition: all .35s cubic-bezier(.2,.9,.3,1.3); pointer-events: none; max-width: calc(100% - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: 1.2rem clamp(16px, 3vw, 32px); border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer__by { text-decoration: none; }
.footer__by b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: 50px minmax(140px, 2fr) 1.1fr 128px 82px 1fr; }
  .row .c-spark, .row .c-hours { display: none; }
}
@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login { grid-template-columns: 1fr; padding-top: 2rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar__status { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .picks { grid-template-columns: 1fr; }
  .pick--top { grid-column: auto; grid-row: auto; }
  .row { grid-template-columns: 44px minmax(0, 1fr) auto; padding: .7rem .8rem; }
  .row .c-cat, .row .c-rank, .row .c-flags { display: none; }
  .topbar__nav span { display: none; }
  .kpi__value { font-size: 1.7rem; }
  .run { grid-template-columns: 12px 1fr 60px; }
  .run__msg { grid-column: 2 / -1; }
  .d-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ======================= v1.1 ======================= */
.btn--sm { white-space: nowrap; padding: .5rem .9rem; font-size: .85rem; border-radius: 10px; }
.btn--lg { padding: .95rem 1.5rem; font-size: 1rem; border-radius: 14px; }
.btn--lg svg { width: 20px; height: 20px; }

/* Language switch */
.langsw { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.langsw button { border: 0; background: none; padding: .32rem .6rem; border-radius: 7px; font: 700 .75rem var(--mono); color: var(--muted); cursor: pointer; }
.langsw button.is-on { background: rgba(255,255,255,.12); color: #fff; }
.langsw button:hover { color: #fff; }

/* Google badges */
.tag--google { background: rgba(66,133,244,.16); color: #a8c7ff; gap: .35rem; }
.tag--google b, .gdot, .gmark {
  display: inline-grid; place-items: center; font: 800 .62rem var(--display); width: 16px; height: 16px; border-radius: 50%;
  background: conic-gradient(#4285F4 0 25%, #EA4335 0 50%, #FBBC05 0 75%, #34A853 0); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.gdot { vertical-align: 1px; margin-left: .3rem; }
.gmark { width: 26px; height: 26px; font-size: .85rem; vertical-align: 3px; margin-right: .2rem; }
.gmark--sm { width: 20px; height: 20px; font-size: .7rem; vertical-align: 2px; }

/* Google panel */
.gpanel { padding: 1rem; }
.gtabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.gtabs button { border: 1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 999px; padding: .4rem .8rem; font-weight: 600; font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.gtabs button.is-on { background: rgba(66,133,244,.2); border-color: rgba(66,133,244,.6); color: #fff; }
.glist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .45rem; }
.glist li { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: 12px; background: rgba(0,0,0,.2); border: 1px solid var(--line); min-width: 0; }
.glist li.is-x { border-color: rgba(255,61,129,.45); background: linear-gradient(90deg, rgba(255,61,129,.12), rgba(0,0,0,.2)); }
.glist__rank { font: 700 .75rem var(--mono); color: var(--muted); width: 1.4rem; flex: none; }
.glist__term { flex: 1; min-width: 0; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glist__term:hover { color: #fff; text-decoration: underline; }
.glist__traffic { font: 600 .78rem var(--mono); color: var(--green); white-space: nowrap; }
.glist__traffic small { color: var(--muted); font-family: var(--font); font-weight: 500; }
.xmark { flex: none; font: 800 .65rem var(--display); padding: .1rem .38rem; border-radius: 6px; background: #fff; color: #000; }
.ghits { display: flex; flex-direction: column; gap: .4rem; }
.ghits a { display: flex; gap: .5rem; align-items: baseline; padding: .55rem .75rem; border-radius: 10px; background: rgba(66,133,244,.1); border: 1px solid rgba(66,133,244,.3); text-decoration: none; }
.ghits a span { margin-left: auto; font: 600 .78rem var(--mono); color: var(--ink-2); }

/* Other networks */
.nets { display: flex; flex-wrap: wrap; gap: .45rem; }
.net { --c: #fff; display: inline-flex; align-items: center; gap: .45rem; padding: .48rem .8rem; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); text-decoration: none; font-weight: 600; font-size: .85rem; transition: all .2s; }
.net i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.net:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.net--ig { --c: #E1306C; } .net--tt { --c: #25F4EE; } .net--fb { --c: #1877F2; } .net--yt { --c: #FF0000; } .net--gt { --c: #4285F4; } .net--tc { --c: #FE2C55; }

/* ---------- Landing ---------- */
.page-landing main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); flex: 1; }
.lnav { display: flex; align-items: center; gap: 1.2rem; width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.2rem clamp(16px, 4vw, 40px); }
.lnav__links { display: flex; gap: 1.6rem; margin-left: auto; }
.lnav__links a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.lnav__links a:hover { color: #fff; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem); }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.hero__title { font: 800 clamp(2.8rem, 7vw, 5.6rem)/.98 var(--display); letter-spacing: -.05em; margin: 1.3rem 0 1.2rem; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 36rem; margin: 0; }
.hero__lead b { color: #fff; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero__note { margin: 1.1rem 0 0; font-size: .85rem; color: var(--muted); }
.hero__note b { color: var(--ink-2); }
.hero__visual { position: relative; min-height: 420px; display: grid; place-items: center; padding: 3.2rem 0; }
.mock { width: min(420px, 100%); padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; transform: rotate(-2deg); box-shadow: 0 40px 100px -30px rgba(255,61,129,.45), 0 0 0 1px rgba(255,255,255,.08); animation: hover 7s ease-in-out infinite; }
@keyframes hover { 50% { transform: rotate(-2deg) translateY(-10px); } }
.mock__top { display: flex; justify-content: space-between; align-items: center; }
.mock__name { font: 800 2.2rem/1.1 var(--display); letter-spacing: -.03em; }
.mock__spark { width: 100%; height: 90px; }
.mock .ring { width: 74px; height: 74px; }
.mock .ring b { font-size: 1.4rem; }
.mock__caption { position: absolute; bottom: .4rem; right: 0; font-size: .7rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.floaty { position: absolute; display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: 999px; font-weight: 700; font-size: .9rem; animation: float 6s ease-in-out infinite; }
.floaty i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.floaty b { font: 700 .8rem var(--mono); }
.floaty--1 { top: 0; left: 4%; } .floaty--2 { bottom: 0; left: 12%; animation-delay: -2s; } .floaty--3 { top: 0; right: 4%; animation-delay: -4s; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.strip div { background: rgba(13,11,28,.85); padding: 1.3rem 1.2rem; display: flex; flex-direction: column; gap: .2rem; }
.strip strong { font: 800 1.6rem var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.strip span { color: var(--muted); font-size: .88rem; }
.lsec { padding: clamp(3rem, 8vw, 6rem) 0 0; }
.lsec__title { font: 800 clamp(1.9rem, 4vw, 3rem)/1.1 var(--display); letter-spacing: -.035em; margin: 0 0 2rem; max-width: 20ch; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.feature { padding: 1.5rem; transition: transform .3s, border-color .3s; }
.feature:hover { transform: translateY(-4px); border-color: var(--line-2); }
.feature__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font: 800 1.25rem var(--display); color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); }
.feature h3 { font: 700 1.15rem var(--display); margin: 1rem 0 .4rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: s; }
.steps li { padding: 1.6rem; }
.steps span { font: 800 2.4rem var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps h3 { font: 700 1.2rem var(--display); margin: .4rem 0; }
.steps p { margin: 0; color: var(--ink-2); }
.cta { margin: clamp(3rem, 8vw, 6rem) 0; padding: clamp(1.6rem, 4vw, 3rem); display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(124,92,255,.22), rgba(255,61,129,.16) 60%, rgba(0,209,255,.12)); border-color: rgba(255,255,255,.14); }
.cta h2 { font: 800 clamp(1.6rem, 3.4vw, 2.4rem)/1.15 var(--display); letter-spacing: -.03em; margin: 0 0 .6rem; max-width: 22ch; }
.cta p { margin: 0; color: var(--ink-2); max-width: 46ch; }
.footer--landing { align-items: flex-start; gap: 1rem; }
.footer__legal { display: block; margin-top: .3rem; color: var(--muted); font-size: .75rem; max-width: 60ch; }
.footer__right { display: flex; gap: 1.2rem; align-items: center; }
.footer__right a { text-decoration: none; }
.footer__right a:hover { color: #fff; }
.login__by a { color: var(--ink-2); }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero__visual { min-height: 380px; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
  .lnav__links { display: none; }
  .lnav .btn { margin-left: auto; }
}
@media (max-width: 640px) {
  .features, .steps { grid-template-columns: 1fr; }
  .floaty--2 { left: 0; } .floaty--3 { right: 0; } .floaty--1 { left: 0; }
  .hero__visual { min-height: 0; }
  .mock { transform: none; animation: none; }
  .lnav .brand__text small { display: none; }
  .langsw button { padding: .3rem .45rem; }
  .glist { grid-template-columns: 1fr; }
}

/* v1.2 — period selector */
.seg--period button.is-on { background: linear-gradient(135deg, rgba(0,209,255,.85), rgba(124,92,255,.9)); box-shadow: 0 6px 18px -6px rgba(0,209,255,.6); }
.st--top { background: linear-gradient(90deg, rgba(255,210,31,.25), rgba(255,138,0,.25)); color: #ffe7a3; }
.st--trended { background: rgba(255,255,255,.07); color: var(--ink-2); }
@media (max-width: 640px) { .seg--period { width: 100%; overflow-x: auto; } .seg--period button { flex: 1; white-space: nowrap; } }

/* ======================= v1.3 Hashtag Radar ======================= */
.nowset { margin-top: 1.4rem; padding: 1.2rem 1.4rem; display: grid; grid-template-columns: minmax(200px, 1fr) 2fr auto; gap: 1rem 1.4rem; align-items: center;
  background: linear-gradient(120deg, rgba(255,61,129,.16), rgba(124,92,255,.14) 55%, rgba(0,209,255,.1)); border-color: rgba(255,255,255,.14); }
.nowset__head h2 { font: 700 1.2rem var(--display); margin: 0; }
.nowset__head p { font-size: .85rem; }
.nowset__tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.htag { display: inline-flex; align-items: baseline; gap: .45rem; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.25); border-radius: 999px; padding: .5rem .9rem; font: 700 .95rem var(--display); cursor: pointer; transition: all .2s; }
.htag:hover { background: #fff; color: #0b0a16; }
.htag small { font: 600 .7rem var(--mono); color: var(--green); }
.htag:hover small { color: #0b0a16; }
.radar-tools { align-items: center; }
.addtag { flex: 1; min-width: 240px; display: flex; gap: .5rem; }
.addtag input { flex: 1; min-width: 0; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; padding: .55rem .85rem; outline: none; }
.addtag input:focus { border-color: rgba(124,92,255,.7); box-shadow: 0 0 0 4px rgba(124,92,255,.15); }
.rrow { display: grid; grid-template-columns: 54px minmax(180px, 2fr) 90px 90px 90px 1.3fr 120px 90px; gap: .8rem; align-items: center; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.rrow:last-child { border-bottom: 0; }
.rrow:hover { background: rgba(255,255,255,.035); }
.rrow--head { cursor: default; font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; background: rgba(0,0,0,.2); }
.rrow--head:hover { background: rgba(0,0,0,.2); }
.rrow__tag { display: flex; align-items: center; gap: .45rem; min-width: 0; flex-wrap: wrap; }
.rrow__tag b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.hchip { display: inline-block; font: 600 .72rem var(--mono); padding: .15rem .45rem; border-radius: 6px; background: rgba(0,209,255,.12); color: #9fe9ff; margin: 0 .25rem .2rem 0; }
.rbars { width: 100%; height: 26px; display: block; }
.hprofile { position: relative; padding-bottom: 1.3rem; }
.hprofile .rbars { height: 90px; }
.hprofile__axis span { position: absolute; bottom: 0; transform: translateX(-50%); font: 600 .65rem var(--mono); color: var(--muted); white-space: nowrap; }
.btn--danger:hover { background: rgba(255,77,109,.2); border-color: rgba(255,77,109,.5); }
@media (max-width: 1100px) {
  .rrow { grid-template-columns: 50px minmax(150px, 2fr) 84px 84px 1.2fr 100px; }
  .rrow .c-src, .rrow .c-24 { display: none; }
  .nowset { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rrow { grid-template-columns: 44px minmax(0, 1fr) 70px; padding: .7rem .8rem; }
  .rrow .c-gr, .rrow .c-best, .rrow .c-week { display: none; }
}

/* ---------- Branded confirm dialog (v1.3.1) ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4,3,10,.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s; }
.modal__card { position: relative; width: min(440px, 100%); padding: 1.7rem 1.6rem 1.4rem; text-align: center; border-radius: 22px;
  background: linear-gradient(160deg, rgba(42,30,82,.96), rgba(16,13,34,.97)); border-color: rgba(255,255,255,.14);
  box-shadow: 0 40px 100px -30px rgba(255,61,129,.45), 0 0 0 1px rgba(255,255,255,.06);
  transform: translateY(14px) scale(.96); opacity: 0; transition: transform .28s cubic-bezier(.2,.9,.3,1.25), opacity .22s; }
.modal.is-open { pointer-events: auto; }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__card { transform: none; opacity: 1; }
.modal__icon { width: 56px; height: 56px; margin: -0.2rem auto .9rem; border-radius: 18px; display: grid; place-items: center; font: 800 1.5rem var(--display);
  background: var(--grad); color: #0b0a16; box-shadow: 0 14px 34px -10px rgba(255,61,129,.7); }
.modal__icon.is-danger { background: linear-gradient(135deg, #ff4d6d, #ff8a00); box-shadow: 0 14px 34px -10px rgba(255,77,109,.7); }
.modal__title { font: 700 1.3rem/1.25 var(--display); margin: 0 0 .5rem; letter-spacing: -.02em; }
.modal__msg { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.modal__cost { margin: 1.1rem auto 0; display: inline-flex; align-items: baseline; gap: .6rem; padding: .55rem .95rem; border-radius: 12px;
  background: rgba(46,229,157,.1); border: 1px solid rgba(46,229,157,.3); }
.modal__cost span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.modal__cost b { font: 800 1.15rem var(--mono); color: var(--green); }
.modal__actions { display: flex; gap: .6rem; justify-content: center; margin-top: 1.4rem; }
.modal__actions .btn { min-width: 130px; }
.btn--dangerfill { background: linear-gradient(135deg, #ff4d6d, #ff8a00); color: #fff; box-shadow: 0 12px 30px -10px rgba(255,77,109,.7); }
.btn--dangerfill:hover { transform: translateY(-1px); }
@media (max-width: 480px) { .modal__actions { flex-direction: column-reverse; } .modal__actions .btn { width: 100%; } }

/* ======================= v1.4 Compose · Performance · Telegram ======================= */
.small { font-size: .8rem; }
.copy--danger:hover { background: var(--red); color: #fff; }

/* ---- Compose ---- */
.compose { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 1.2rem; align-items: start; margin-top: 1rem; }
.composer { display: flex; flex-direction: column; gap: 1.2rem; }
.aibox { padding: 1rem 1.1rem; border-radius: 16px; border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(120deg, rgba(255,210,31,.08), rgba(255,61,129,.12) 45%, rgba(124,92,255,.12)); }
.aibox__head { display: flex; gap: .8rem; align-items: center; }
.aibox__head h2 { font: 700 1.05rem var(--display); margin: 0; }
.aibox__head p { font-size: .84rem; margin: 0; }
.aibox__spark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); font-size: 1.1rem; flex: none; box-shadow: 0 10px 26px -10px rgba(255,61,129,.8); }
.aibox__row { display: flex; gap: .6rem; margin-top: .9rem; flex-wrap: wrap; align-items: center; }
.aibox__row input { flex: 1; min-width: 200px; background: rgba(0,0,0,.3); border: 1px solid var(--line-2); border-radius: 12px; padding: .6rem .85rem; outline: none; }
.aibox__row input:focus { border-color: rgba(255,61,129,.7); box-shadow: 0 0 0 4px rgba(255,61,129,.15); }
.aiopts { display: grid; gap: .5rem; margin-top: .8rem; }
.aiopts:empty { display: none; }
.aiopt { display: grid; grid-template-columns: 28px 1fr auto; gap: .7rem; align-items: center; text-align: left; border: 1px solid var(--line-2); background: rgba(0,0,0,.25); border-radius: 12px; padding: .7rem .8rem; cursor: pointer; transition: all .2s; }
.aiopt:hover, .aiopt.is-on { border-color: rgba(255,61,129,.7); background: rgba(255,61,129,.1); transform: translateY(-1px); }
.aiopt__n { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font: 800 .8rem var(--mono); background: rgba(255,255,255,.08); }
.aiopt.is-on .aiopt__n { background: var(--grad); color: #0b0a16; }
.aiopt__t { font-size: .92rem; line-height: 1.45; white-space: pre-wrap; }
.aiopt__use { font-weight: 700; font-size: .8rem; color: var(--pink); white-space: nowrap; }

.editor { border: 1px solid var(--line-2); border-radius: 16px; background: rgba(0,0,0,.28); transition: border-color .2s, box-shadow .2s; }
.editor:focus-within { border-color: rgba(124,92,255,.8); box-shadow: 0 0 0 4px rgba(124,92,255,.16); }
.editor textarea { width: 100%; resize: vertical; min-height: 150px; background: none; border: 0; outline: none; padding: 1rem 1.1rem; font: 500 1.08rem/1.55 var(--font); color: var(--ink); }
.editor__foot { display: flex; align-items: center; gap: .8rem; padding: .55rem .8rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.iconbtn { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .7rem; border-radius: 10px; cursor: pointer; color: var(--cyan); font-weight: 700; font-size: .85rem; transition: background .2s; }
.iconbtn:hover { background: rgba(0,209,255,.12); }
.iconbtn svg { width: 20px; height: 20px; fill: currentColor; }
.editor__warn { flex: 1; display: flex; flex-direction: column; gap: .15rem; font-size: .78rem; color: var(--yellow); min-width: 0; }
.counter { position: relative; width: 36px; height: 36px; display: grid; place-items: center; margin-left: auto; }
.counter svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.counter circle { fill: none; stroke-width: 3; }
.counter__bg { stroke: rgba(255,255,255,.1); }
.counter__fg { stroke: var(--violet); stroke-linecap: round; transition: stroke-dashoffset .2s, stroke .2s; }
.counter b { font: 700 .66rem var(--mono); color: var(--muted); }
.counter.is-near .counter__fg { stroke: var(--yellow); } .counter.is-near b { color: var(--yellow); }
.counter.is-over .counter__fg { stroke: var(--red); } .counter.is-over b { color: var(--red); }
.imgprev { position: relative; margin: 0 .8rem .8rem; width: fit-content; }
.imgprev img { max-height: 180px; max-width: 100%; border-radius: 12px; display: block; border: 1px solid var(--line-2); }
.imgprev__x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); cursor: pointer; }
.imgprev__x:hover { background: var(--red); }

.tagsug { display: grid; gap: .8rem; }
.sug { display: grid; grid-template-columns: 150px 1fr; gap: .7rem; align-items: start; }
.sug__title { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding-top: .35rem; }
.sug__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.sug__empty { font-size: .85rem; padding-top: .3rem; }
.sugtag { display: inline-flex; align-items: baseline; gap: .35rem; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); border-radius: 999px; padding: .35rem .7rem; font: 700 .86rem var(--font); cursor: pointer; transition: all .18s; }
.sugtag small { font: 600 .68rem var(--mono); color: var(--muted); }
.sugtag:hover { border-color: rgba(255,255,255,.4); transform: translateY(-1px); }
.sugtag--best small { color: var(--green); } .sugtag--radar small { color: var(--cyan); } .sugtag--trends small { color: var(--pink); }
.sugtag.is-used { background: linear-gradient(135deg, rgba(124,92,255,.85), rgba(255,61,129,.8)); border-color: transparent; color: #fff; }
.sugtag.is-used small { color: rgba(255,255,255,.85); }

.when { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; }
.when__label { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.when__at { background: rgba(0,0,0,.3); border: 1px solid var(--line-2); border-radius: 12px; padding: .5rem .75rem; color-scheme: dark; outline: none; }
.when__note { flex-basis: 100%; font-size: .86rem; margin: 0; }
.when__note b { color: var(--ink); }
.compose__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1rem; border-top: 1px solid var(--line); }
.compose__cost { font-size: .85rem; color: var(--muted); }
.compose__cost b { font: 800 1rem var(--mono); color: var(--green); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.xprev-wrap { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 90px; }
.xprev { padding: 1rem; border-radius: var(--r); background: rgba(0,0,0,.55); }
.xprev__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin-bottom: .8rem; }
.xprev__post { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: .7rem; }
.xprev__avatar img { width: 42px; height: 42px; border-radius: 50%; background: #111; }
.xprev__who { font-size: .9rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xprev__who b { color: var(--ink); }
.xprev__text { margin-top: .2rem; font-size: .96rem; line-height: 1.45; word-wrap: break-word; }
.xprev__text.is-ph { color: var(--muted); }
.xprev__text i { font-style: normal; color: #1d9bf0; }
.xprev__img { margin-top: .6rem; width: 100%; border-radius: 14px; border: 1px solid var(--line-2); max-height: 320px; object-fit: cover; }
.xprev__bar { display: flex; justify-content: space-between; margin-top: .7rem; color: var(--muted); font-size: .85rem; max-width: 320px; filter: grayscale(1); opacity: .7; }
.tips { padding: 1rem 1.1rem; border-radius: var(--r); }
.tips h3 { margin: 0 0 .5rem; font: 700 .98rem var(--display); }
.tips ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .4rem; font-size: .87rem; color: var(--ink-2); }

.qrow { display: grid; grid-template-columns: 56px minmax(0, 1fr) 180px auto; gap: 1rem; align-items: center; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); }
.qrow:last-child { border-bottom: 0; }
.qrow__img, .qrow__noimg { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.qrow__noimg { display: grid; place-items: center; background: rgba(255,255,255,.05); font-size: 1.3rem; }
.qrow__text { font-size: .92rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: pre-wrap; }
.qrow__err { font: 600 .74rem var(--mono); color: var(--red); margin-top: .25rem; }
.qrow__when { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; font-size: .82rem; color: var(--muted); }
.qrow__act { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.qrow__act a { text-decoration: none; }

/* ---- Performance ---- */
.ptitle-user { font: 600 1.1rem var(--mono); color: var(--muted); }
.perf-actions { display: flex; align-items: center; gap: .8rem; }
.perf-sync { font-size: .85rem; }
.perf-spend { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; font-size: .84rem; color: var(--muted); }
.perf-spend b { font-family: var(--mono); color: var(--ink); }
.meter--inline { display: inline-block; width: 90px; margin: 0; }
.insights { margin-top: 1.2rem; padding: 1rem 1.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem 1.4rem;
  background: linear-gradient(120deg, rgba(46,229,157,.08), rgba(124,92,255,.1) 55%, rgba(255,61,129,.08)); }
.ins { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; line-height: 1.45; color: var(--ink-2); }
.ins b { color: var(--ink); }
.ins small { font: 700 .7rem var(--mono); color: var(--green); }
.ins__i { font-size: 1.2rem; line-height: 1.2; }
.pgrid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; margin-top: 1.2rem; }
.pgrid .card h2 { margin-bottom: .2rem; }
.fchart { margin-top: .9rem; }
.fchart__svg { width: 100%; height: 190px; display: block; }
.fchart__axis { display: flex; justify-content: space-between; font: 600 .74rem var(--mono); color: var(--muted); margin-top: .4rem; }
.fchart__axis b { color: var(--ink); }
.empty--sm { padding: 2rem 1rem; }
#hours { margin-top: .8rem; }
.prow { display: grid; grid-template-columns: minmax(150px, 1.6fr) 70px 90px minmax(140px, 1.4fr) 70px 130px; gap: .8rem; align-items: center; padding: .65rem 1.1rem; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
.prow--head { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; background: rgba(0,0,0,.2); }
.prow__tag { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lift { position: relative; height: 22px; border-radius: 7px; background: rgba(255,255,255,.05); overflow: hidden; display: flex; align-items: center; }
.lift i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(124,92,255,.5), rgba(124,92,255,.8)); border-radius: inherit; }
.lift i.is-up { background: linear-gradient(90deg, rgba(255,210,31,.6), rgba(255,61,129,.85)); }
.lift i.is-down { background: rgba(255,77,109,.35); }
.lift b { position: relative; font: 800 .78rem var(--mono); padding-left: .55rem; }
.post { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: 0; }
.post__text { font-size: .93rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post__text i { font-style: normal; color: #7fd3ff; }
.post__meta { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.post__meta a { color: var(--cyan); text-decoration: none; }
.post__stats { display: flex; gap: .9rem; align-items: center; font: 600 .82rem var(--mono); color: var(--ink-2); white-space: nowrap; }
.post__stats b { color: var(--ink); }
.vs { font: 800 .78rem var(--mono); padding: .2rem .5rem; border-radius: 8px; background: rgba(255,255,255,.07); min-width: 52px; text-align: center; }
.vs--up { background: linear-gradient(90deg, rgba(255,210,31,.25), rgba(255,61,129,.3)); color: #ffd6e6; }
.vs--down { background: rgba(255,77,109,.12); color: var(--red); }

/* ---- Settings: X user + Telegram ---- */
.setup { margin: .9rem 0; padding: .9rem 1rem; border-radius: 14px; background: rgba(255,210,31,.07); border: 1px solid rgba(255,210,31,.25); font-size: .88rem; }
.setup ol, .tgsteps { margin: .5rem 0 0; padding-left: 1.2rem; display: grid; gap: .35rem; color: var(--ink-2); font-size: .88rem; }
.tgconn { margin: 1rem 0; padding: .9rem 1rem; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0,0,0,.2); display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.tgconn .addtag { flex-basis: 100%; }
.tgconn.is-on { border-color: rgba(46,229,157,.35); background: rgba(46,229,157,.07); }
.tgconn__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.tgconn__txt { flex: 1; font-weight: 600; }
.tgsteps { flex-basis: 100%; margin: 0; }
.tgopts { display: grid; gap: .2rem; }
.tgcats { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .6rem 3.2rem; }
.minichk { cursor: pointer; }
.minichk input { position: absolute; opacity: 0; pointer-events: none; }
.minichk span { display: inline-block; padding: .25rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid var(--line-2); color: var(--ink-2); transition: all .15s; }
.minichk input:checked + span { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c); color: #fff; }
.minichk input:focus-visible + span { box-shadow: 0 0 0 3px rgba(124,92,255,.4); }
.inl { width: 70px; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); border-radius: 8px; padding: .1rem .4rem; font: 700 .8rem var(--mono); color: var(--ink); }

@media (max-width: 1100px) {
  .compose { grid-template-columns: minmax(0, 1fr); }
  .xprev-wrap { position: static; }
  .pgrid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sug { grid-template-columns: 1fr; gap: .35rem; }
  .qrow { grid-template-columns: 48px minmax(0, 1fr); }
  .qrow__when, .qrow__act { grid-column: 2; }
  .qrow__act { justify-content: flex-start; }
  .prow { grid-template-columns: minmax(0, 1fr) 46px minmax(90px, 1fr) 100px; padding: .65rem .8rem; }
  .prow .c-rate, .prow > span:nth-child(3) { display: none; }
  .post { grid-template-columns: 1fr; }
  .post__stats { flex-wrap: wrap; gap: .7rem; }
  .perf-spend { margin-left: 0; }
  .tgcats { margin-left: 0; }
}
/* 5 nav items: icons only on medium screens, labels back on wide ones */
@media (max-width: 1240px) { .topbar__nav span { display: none; } .topbar__nav a { padding-left: .65rem; padding-right: .65rem; } }
.vs--new { background: rgba(0,209,255,.14); color: var(--cyan); }
.switch input.inl { position: static; opacity: 1; pointer-events: auto; }
/* Phones: nav on its own full-width row */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; row-gap: .55rem; padding-bottom: .55rem; }
  .topbar .langsw { margin-left: auto; }
  .topbar > span[style] { display: none; }
  .topbar__nav { order: 5; flex-basis: 100%; justify-content: space-between; }
  .topbar__nav a { flex: 1; justify-content: center; padding: .55rem 0; }
}
@media (max-width: 640px) { .aibox__row input { min-width: 0; flex-basis: 100%; } .compose__foot .btn { width: 100%; } }

/* v1.4.1 Radar add: language + pin */
.addtag__sel { background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; padding: .5rem .6rem; color-scheme: dark; }
.addtag__pin { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; cursor: pointer; padding: 0 .3rem; white-space: nowrap; }
@media (max-width: 640px) { .addtag { flex-wrap: wrap; } .addtag input#addInput { flex-basis: 100%; } }

/* v1.4.2 Radar add: language buttons + pin toggle (no native select) */
.seg--mini { padding: 3px; }
.seg--mini button { padding: .4rem .65rem; font-size: .8rem; white-space: nowrap; }
.pinbtn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line-2); background: rgba(0,0,0,.25); color: var(--ink-2);
  border-radius: 10px; padding: .45rem .7rem; font-weight: 700; font-size: .8rem; cursor: pointer; transition: all .18s; white-space: nowrap; }
.pinbtn:hover { color: #fff; border-color: rgba(255,255,255,.35); }
.pinbtn[aria-pressed="true"] { background: linear-gradient(135deg, rgba(124,92,255,.9), rgba(255,61,129,.85)); color: #fff; border-color: transparent; }

/* v1.4.2 radio segments (settings) */
.tglang { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: .8rem; }
.seg--radio label { cursor: pointer; }
.seg--radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg--radio span { display: inline-block; padding: .45rem .85rem; border-radius: 9px; font-weight: 600; font-size: .86rem; color: var(--ink-2); transition: all .2s; white-space: nowrap; }
.seg--radio span:hover { color: #fff; }
.seg--radio input:checked + span { background: linear-gradient(135deg, rgba(124,92,255,.9), rgba(255,61,129,.85)); color: #fff; box-shadow: 0 6px 18px -6px rgba(255,61,129,.6); }
.seg--radio input:focus-visible + span { outline: 2px solid rgba(124,92,255,.7); }

/* v1.4.3 landing: 4-column grow grid + 4 steps */
.features--grow, .steps--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .features--grow, .steps--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .features--grow, .steps--4 { grid-template-columns: 1fr; } }
