/* ─── Design tokens: purple theme, light + dark ──────────────── */
:root {
    --bg: 248 246 253;
    --surface: 255 255 255;
    --fg: 34 24 64;
    --muted: 116 106 148;
    --line: 231 225 244;
    --brand: 124 58 237;      /* violet */
    --brand-2: 192 68 235;    /* fuchsia */
    --radius: 14px;
    --shadow: 0 10px 30px rgb(76 29 149 / 0.08);
    --header-max: 1060px;
    --container: 1060px;
    /* Bubble fill tuning (overridden in dark). */
    --bub-a1: 0.22;   /* gradient start alpha */
    --bub-a2: 0.34;   /* gradient end alpha */
    --bub-hl: 0.3;    /* white top highlight */
    --bub-bl: 55%;    /* border lightness */
    --bub-ba: 0.42;   /* border alpha */
    /* Frosted purple header (light theme): deep violet glass, white text. */
    --hdr-bg: linear-gradient(100deg, rgb(70 26 140 / 0.92) 0%, rgb(86 31 170 / 0.89) 50%, rgb(96 32 184 / 0.86) 100%);
    --hdr-solid: linear-gradient(100deg, rgb(70 26 140), rgb(86 31 170) 50%, rgb(96 32 184));
    --hdr-border: rgb(255 255 255 / 0.26);
    --hdr-shadow: 0 10px 32px rgb(88 28 168 / 0.30), inset 0 1px 0 rgb(255 255 255 / 0.38), inset 0 -1px 0 rgb(255 255 255 / 0.08);
    --hdr-backdrop: blur(18px) saturate(165%) brightness(0.86);
    --hdr-pill: rgb(255 255 255 / 0.10);        /* translucent buttons on the glass */
    --hdr-pill-hover: rgb(255 255 255 / 0.20);
}
/* Dark tokens: system preference (unless forced light) or forced dark. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: 18 12 36;        /* deep violet night */
        --surface: 30 21 56;
        --fg: 240 236 252;
        --muted: 168 158 200;
        --line: 60 46 102;
        --brand: 155 110 253;
        --brand-2: 216 112 247;
        --shadow: 0 10px 30px rgb(0 0 0 / 0.45);
        --bub-a1: 0.42; --bub-a2: 0.62; --bub-hl: 0.12; --bub-bl: 64%; --bub-ba: 0.65;
        --hdr-bg: linear-gradient(100deg, rgb(40 14 88 / 0.78) 0%, rgb(72 28 140 / 0.70) 55%, rgb(96 36 170 / 0.66) 100%);
        --hdr-solid: linear-gradient(100deg, rgb(40 14 88), rgb(72 28 140) 55%, rgb(96 36 170));
        --hdr-border: rgb(255 255 255 / 0.14);
        --hdr-shadow: 0 10px 32px rgb(0 0 0 / 0.45), inset 0 1px 0 rgb(255 255 255 / 0.16), inset 0 -1px 0 rgb(255 255 255 / 0.04);
        --hdr-backdrop: blur(20px) saturate(150%);
        --hdr-pill: rgb(255 255 255 / 0.14);
        --hdr-pill-hover: rgb(255 255 255 / 0.24);
    }
}
:root[data-theme="dark"] {
    --bg: 18 12 36;
    --surface: 30 21 56;
    --fg: 240 236 252;
    --muted: 168 158 200;
    --line: 60 46 102;
    --brand: 155 110 253;
    --brand-2: 216 112 247;
    --shadow: 0 10px 30px rgb(0 0 0 / 0.45);
    --bub-a1: 0.42; --bub-a2: 0.62; --bub-hl: 0.12; --bub-bl: 64%; --bub-ba: 0.65;
    --hdr-bg: linear-gradient(100deg, rgb(40 14 88 / 0.78) 0%, rgb(72 28 140 / 0.70) 55%, rgb(96 36 170 / 0.66) 100%);
    --hdr-solid: linear-gradient(100deg, rgb(40 14 88), rgb(72 28 140) 55%, rgb(96 36 170));
    --hdr-border: rgb(255 255 255 / 0.14);
    --hdr-shadow: 0 10px 32px rgb(0 0 0 / 0.45), inset 0 1px 0 rgb(255 255 255 / 0.16), inset 0 -1px 0 rgb(255 255 255 / 0.04);
    --hdr-backdrop: blur(20px) saturate(150%);
    --hdr-pill: rgb(255 255 255 / 0.14);
    --hdr-pill-hover: rgb(255 255 255 / 0.24);
}

/* Theme toggle: moon in light mode, sun in dark mode. */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
    background: rgb(var(--bg));
    color: rgb(var(--fg));
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: rgb(var(--brand)); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
.muted { color: rgb(var(--muted)); }

/* ─── Header: pill at rest, full-width on scroll ─────────────── */
.site-header { position: sticky; top: 0; z-index: 40; }
.header-inner {
    margin-inline: max(16px, calc((100vw - var(--header-max)) / 2));
    margin-top: 12px;
    border-radius: 999px;
    position: relative;
    border: 1px solid var(--hdr-border);
    background: var(--hdr-bg);
    box-shadow: var(--hdr-shadow);
    backdrop-filter: var(--hdr-backdrop);
    -webkit-backdrop-filter: var(--hdr-backdrop);
    overflow: visible;
    transition: margin 360ms cubic-bezier(0.22, 1, 0.36, 1),
                border-radius 360ms cubic-bezier(0.22, 1, 0.36, 1),
                border-color 360ms ease, box-shadow 360ms ease;
}
/* Frost sheen: a soft white gloss along the top edge of the glass. */
.header-inner::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.20), rgb(255 255 255 / 0) 62%);
}
.site-header.is-scrolled .header-inner {
    margin-inline: 0;
    margin-top: 0;
    border-radius: 0;
    border-color: transparent;
    border-bottom-color: var(--hdr-border);
}
/* Browsers without backdrop blur get an opaque purple bar instead of a see-through one. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .header-inner { background: var(--hdr-solid); }
}
.header-row {
    position: relative; z-index: 1; display: flex; align-items: center; gap: 14px;
    padding: 10px 20px;
    transition: padding 360ms cubic-bezier(0.22, 1, 0.36, 1); /* same easing as the bar, so the contents glide with it */
}
/* Expanded bar: logo, menu and buttons travel out to the ends of the screen. */
.site-header.is-scrolled .header-row { padding-inline: clamp(16px, 3vw, 56px); }

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 1.06rem; letter-spacing: -0.02em; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 2px; }
.brand-mark span { width: 7px; border-radius: 3px; background: linear-gradient(180deg, #fff, #e9d5ff); box-shadow: 0 0 10px rgb(255 255 255 / 0.35); }
.brand-mark span:nth-child(1) { height: 10px; }
.brand-mark span:nth-child(2) { height: 17px; }
.brand-mark span:nth-child(3) { height: 13px; }

.main-nav { display: none; gap: 18px; margin-inline-start: 10px; }
.main-nav a { color: rgb(255 255 255 / 0.92); font-weight: 600; font-size: 0.92rem; white-space: nowrap; transition: color 140ms ease; }
.main-nav a:hover { color: #fff; text-decoration: none; }
@media (min-width: 720px) { .main-nav { display: flex; } }

.header-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }

/* ─── Dropdowns (details/summary, no JS needed) ──────────────── */
.dropdown { position: relative; }
.dropdown > summary {
    list-style: none; cursor: pointer; user-select: none;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 13px; border-radius: 999px;
    border: 1px solid rgb(255 255 255 / 0.30);
    background: var(--hdr-pill);
    color: #fff;
    font-weight: 600; font-size: 0.88rem;
    transition: border-color 160ms ease, background 160ms ease;
    max-width: 46vw;
}
.dropdown > summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary:hover { background: var(--hdr-pill-hover); border-color: rgb(255 255 255 / 0.5); }
.dropdown[open] > summary { background: var(--hdr-pill-hover); border-color: #fff; }
.dropdown > summary .icon { fill: #fff; }
.icon { width: 16px; height: 16px; fill: rgb(var(--brand)); flex: none; }

.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 999px; cursor: pointer;
    border: 1px solid rgb(var(--line)); background: rgb(var(--surface));
    color: rgb(var(--brand)); padding: 0;
    transition: border-color 160ms ease, transform 160ms ease;
}
.theme-toggle:hover { border-color: rgb(var(--brand) / 0.6); transform: rotate(12deg); }
.theme-toggle .icon-sun { stroke: rgb(var(--brand)); }
.header-actions > .theme-toggle {
    border-color: rgb(255 255 255 / 0.30); background: var(--hdr-pill); color: #fff;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.header-actions > .theme-toggle:hover { background: var(--hdr-pill-hover); border-color: rgb(255 255 255 / 0.5); }
.header-actions > .theme-toggle .icon { fill: #fff; }
.header-actions > .theme-toggle .icon-sun { stroke: #fff; }

.site-header :is(a, button, summary, input):focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.dropdown-panel :is(a, button):focus-visible { outline-color: rgb(var(--brand)); }

/* ─── Mobile menu (replaces location, language, theme under 680px) ─ */
.mobile-menu { display: none; }
.mobile-panel { width: min(320px, calc(100vw - 32px)); }
.mobile-links { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid rgb(var(--line)); margin-bottom: 4px; }
.mobile-links a { padding: 7px 11px; border-radius: 9px; color: rgb(var(--fg)); font-weight: 600; font-size: 0.9rem; }
.mobile-links a:hover { background: rgb(var(--brand) / 0.09); text-decoration: none; }
.mobile-label { margin: 10px 4px 4px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: rgb(var(--muted)); }
.theme-toggle-row {
    width: 100%; height: auto; justify-content: flex-start; gap: 10px;
    margin-top: 10px; padding: 10px 12px; border-radius: 10px;
    font: inherit; font-weight: 700; font-size: 0.9rem; color: rgb(var(--fg));
}
.theme-toggle-row:hover { transform: none; }
@media (max-width: 680px) {
    .mobile-menu { display: block; }
    .location-picker, .lang-picker, .header-actions > .theme-toggle { display: none; }
    .header-row { padding: 8px 12px; }
}

.dropdown-panel {
    position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
    min-width: 230px; max-height: 65vh; overflow: auto;
    background: rgb(var(--surface));
    border: 1px solid rgb(var(--line));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px;
    animation: pop-in 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }

.lang-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.lang-panel a, .loc-tree a {
    display: block; padding: 7px 11px; border-radius: 9px;
    color: rgb(var(--fg)); font-size: 0.9rem;
    transition: background 140ms ease;
}
.lang-panel a:hover, .loc-tree a:hover { background: rgb(var(--brand) / 0.09); text-decoration: none; }
.lang-panel a.active, .loc-tree a.active { background: rgb(var(--brand) / 0.14); color: rgb(var(--brand)); font-weight: 700; }

.loc-tree { list-style: none; margin: 0; padding: 0; }
.loc-tree .loc-tree { padding-inline-start: 14px; border-inline-start: 1px solid rgb(var(--line)); margin-inline-start: 11px; }

/* ─── Hero ────────────────────────────────────────────────────── */
.hero { padding: 58px 0 10px; position: relative; overflow-x: clip; } /* glow orbs never cause sideways scroll */
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%;
    filter: blur(70px); pointer-events: none; z-index: -1;
    animation: orb-float 16s ease-in-out infinite alternate;
}
.hero::before {
    width: 440px; height: 440px; inset-block-start: -220px; inset-inline-start: -120px;
    background: radial-gradient(circle, rgb(var(--brand) / 0.22), transparent 65%);
}
.hero::after {
    width: 380px; height: 380px; inset-block-start: -160px; inset-inline-end: -80px;
    background: radial-gradient(circle, rgb(var(--brand-2) / 0.18), transparent 65%);
    animation-delay: -8s;
}
@keyframes orb-float {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.12); }
}
.hero-compact { padding: 38px 0 6px; }
.hero-title {
    margin: 0 0 10px;
    font-size: clamp(1.9rem, 5vw, 3.1rem);
    font-weight: 900; letter-spacing: -0.03em; line-height: 1.08;
    background: linear-gradient(92deg, rgb(var(--fg)) 20%, rgb(var(--brand)) 55%, rgb(var(--brand-2)) 80%, rgb(var(--fg)) 110%);
    background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: rise-in 500ms cubic-bezier(0.22, 1, 0.36, 1) both,
               title-sheen 9s ease-in-out 1.2s infinite;
}
@keyframes title-sheen {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 60% 0; }
}
.hero-title-sm { font-size: clamp(1.5rem, 4vw, 2.3rem); word-break: break-word; }
.hero-sub { margin: 0; color: rgb(var(--muted)); font-size: 1.02rem; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; animation: rise-in 500ms 80ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.updated-chip {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.82rem; font-weight: 600;
    padding: 4px 12px; border-radius: 999px;
    border: 1px solid rgb(var(--line)); background: rgb(var(--surface));
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: rgb(16 185 129); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.back-link { display: inline-block; margin-bottom: 8px; color: rgb(var(--muted)); font-weight: 600; font-size: 0.9rem; }

/* ─── Metric tabs (bubble sizing switch) ─────────────────────── */
.metric-tabs {
    display: inline-flex; gap: 4px;
    padding: 4px; border-radius: 999px;
    border: 1px solid rgb(var(--line));
    background: rgb(var(--surface) / 0.7);
}
.metric-tabs a {
    padding: 7px 16px; border-radius: 999px;
    font-size: 0.85rem; font-weight: 700; color: rgb(var(--muted));
    transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.metric-tabs a:hover { color: rgb(var(--fg)); text-decoration: none; }
.metric-tabs a.active {
    color: #fff;
    background: linear-gradient(92deg, rgb(var(--brand)), rgb(var(--brand-2)));
    box-shadow: 0 4px 14px rgb(var(--brand) / 0.35);
}

/* ─── Push bell + settings ────────────────────────────────────── */
.push-bell {
    display: inline-flex; align-items: center; gap: 8px; flex: none;
    padding: 9px 16px; border-radius: 999px; cursor: pointer;
    border: 1px solid rgb(var(--line)); background: rgb(var(--surface));
    color: rgb(var(--fg)); font: inherit; font-size: 0.88rem; font-weight: 700;
    transition: border-color 160ms ease, background 160ms ease;
}
.push-bell:hover { border-color: rgb(var(--brand) / 0.6); }
.push-bell .icon { fill: rgb(var(--brand)); }
.push-bell.on { background: rgb(var(--brand) / 0.12); border-color: rgb(var(--brand)); color: rgb(var(--brand)); }
.push-bell.blocked { opacity: 0.65; cursor: not-allowed; }
.trend-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px 20px; flex-wrap: wrap;
}
.trend-head .hero-title { margin-bottom: 0; }
.trend-head-actions { display: inline-flex; gap: 10px; align-items: center; flex: none; flex-wrap: wrap; }
@media (max-width: 680px) {
    .trend-head-actions { width: 100%; flex-wrap: nowrap; }
    .trend-head-actions > * { flex: 1 1 0; min-width: 0; justify-content: center; }
    .trend-head-actions .push-bell span,
    .trend-head-actions .trend-x-btn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.trend-x-btn { flex: none; animation: rise-in 500ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both; }

.settings-card {
    background: rgb(var(--surface)); border: 1px solid rgb(var(--line));
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
    max-width: 560px;
}
.push-note { margin: 0 0 10px; color: rgb(var(--muted)); font-size: 0.92rem; }
.settings-subtitle { margin: 14px 0 6px; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: rgb(var(--muted)); }
.settings-subtitle:first-child { margin-top: 0; }
.topic-choices[hidden] + .settings-subtitle { margin-top: 0; }
.loc-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
@media (max-width: 560px) { .loc-choices { grid-template-columns: 1fr; } }
.loc-choice {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border-radius: 9px; cursor: pointer; font-size: 0.93rem; font-weight: 600;
    transition: background 140ms ease;
}
.loc-choice:hover { background: rgb(var(--brand) / 0.07); }
.loc-choice input { accent-color: rgb(var(--brand)); width: 16px; height: 16px; }
.settings-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* ─── Bubble cloud ────────────────────────────────────────────── */
.bubble-cloud {
    position: relative; width: 100%;
    padding-top: min(var(--cloud-ratio), 120%);
    margin: 26px 0 8px;
}
.bubble {
    position: absolute; transform: translate(-50%, -50%);
    aspect-ratio: 1 / 1; border-radius: 50%;
    container-type: size;
    cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
    -webkit-user-drag: none; -webkit-touch-callout: none;
    color: rgb(var(--fg)); text-decoration: none;
    background:
        radial-gradient(circle at 30% 28%, rgb(255 255 255 / var(--bub-hl)), transparent 52%),
        linear-gradient(145deg, hsl(var(--h) 68% 62% / var(--bub-a1)), hsl(calc(var(--h) + 45) 68% 55% / var(--bub-a2)));
    border: 1px solid hsl(var(--h) 60% var(--bub-bl) / var(--bub-ba));
    box-shadow: 0 8px 22px hsl(var(--h) 70% 45% / 0.14);
    animation: floaty var(--dur, 8s) ease-in-out var(--delay, 0s) infinite;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease;
    will-change: transform;
}
.bubble:hover {
    text-decoration: none;
    transform: translate(-50%, -50%) scale(1.07);
    box-shadow: 0 14px 34px hsl(var(--h) 70% 45% / 0.3);
    z-index: 5;
    animation-play-state: paused;
}
@keyframes floaty {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -7%; }
}
/* Phones without JS: fewer bubbles reads better than a sparse wide cloud. */
@media (max-width: 680px) {
    html:not(.js) .bubble:nth-child(n+17) { display: none; }
}

/* Physics mode (d3-force active): the simulation owns movement. */
.bubble-cloud.physics .bubble { animation: none; translate: none; transition: box-shadow 220ms ease; }
.bubble-cloud.physics .bubble:active { box-shadow: 0 16px 38px hsl(var(--h) 70% 45% / 0.34); z-index: 6; cursor: grabbing; }
/* Content is absolutely positioned so it can never stretch the circle. */
.bubble-inner {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2cqh; padding: 12cqw; text-align: center; overflow: hidden; border-radius: 50%;
}
.bubble-rank { font-size: 9.5cqw; font-weight: 800; color: hsl(var(--h) 65% 36%); line-height: 1.1; }
.bubble-name {
    font-weight: 750; line-height: 1.16; max-width: 100%;
    font-size: 12.5cqw;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    word-break: break-word;
    unicode-bidi: plaintext; /* hashtags keep their leading # in RTL locales */
}
.bubble-meta { font-size: 8.6cqw; color: rgb(var(--fg) / 0.62); font-weight: 700; line-height: 1.1; }

/* Dark: crisp white names with a soft lift, bright rank and meta. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .bubble-name { color: #fff; text-shadow: 0 1px 4px rgb(0 0 0 / 0.45); }
    :root:not([data-theme="light"]) .bubble-rank { color: hsl(var(--h) 90% 80%); }
    :root:not([data-theme="light"]) .bubble-meta { color: rgb(236 231 250 / 0.82); }
}
:root[data-theme="dark"] .bubble-name { color: #fff; text-shadow: 0 1px 4px rgb(0 0 0 / 0.45); }
:root[data-theme="dark"] .bubble-rank { color: hsl(var(--h) 90% 80%); }
:root[data-theme="dark"] .bubble-meta { color: rgb(236 231 250 / 0.82); }

/* ─── Sections, tables, cards ─────────────────────────────────── */
.section-title { font-size: clamp(1.2rem, 2.4vw, 1.55rem); font-weight: 800; letter-spacing: -0.02em; margin: 34px 0 14px; }
.trend-list-section { padding-bottom: 30px; }

.table-wrap {
    background: rgb(var(--surface));
    border: 1px solid rgb(var(--line));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}
.trend-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 540px; }
.trend-table th {
    text-align: start; padding: 12px 16px;
    font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: rgb(var(--muted)); border-bottom: 1px solid rgb(var(--line));
    white-space: nowrap;
}
.trend-table td { padding: 11px 16px; border-bottom: 1px solid rgb(var(--line) / 0.6); white-space: nowrap; }
.trend-table tbody tr:last-child td { border-bottom: 0; }
.trend-table tbody tr { transition: background 140ms ease; }
.trend-table tbody tr:hover { background: rgb(var(--brand) / 0.05); }
.trend-table tbody tr.row-link { cursor: pointer; }
.trend-table tbody tr.row-link:active { background: rgb(var(--brand) / 0.1); }
.cell-rank { font-weight: 800; color: rgb(var(--brand)); }
.trend-link { font-weight: 600; color: rgb(var(--fg)); unicode-bidi: plaintext; }
.trend-link:hover { color: rgb(var(--brand)); }
.col-grow { width: 100%; }
.trend-table td.col-grow { white-space: normal; word-break: break-word; }
@media (max-width: 720px) {
    .col-wide { display: none; }
    .trend-table { min-width: 0; }
    .trend-table th, .trend-table td { padding-inline: 10px; }
    .trend-table th:first-child, .trend-table td:first-child { padding-inline-start: 14px; }
}

.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-top: 18px; }
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
    background: rgb(var(--surface)); border: 1px solid rgb(var(--line));
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px 18px; display: flex; flex-direction: column; gap: 2px;
    animation: rise-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stat-card:nth-child(2) { animation-delay: 50ms; }
.stat-card:nth-child(3) { animation-delay: 100ms; }
.stat-card:nth-child(4) { animation-delay: 150ms; }
.stat-card-wide { grid-column: span 2; }
.stat-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-value-sm { font-size: 1.02rem; }
.stat-label { font-size: 0.78rem; color: rgb(var(--muted)); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.chart-card {
    background: rgb(var(--surface)); border: 1px solid rgb(var(--line));
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px;
}
.chart-card svg { width: 100%; height: auto; display: block; }
.chart-grid { stroke: rgb(var(--line)); stroke-width: 1; }
.chart-tick { fill: rgb(var(--muted)); font-size: 11px; }
.chart-line { stroke: rgb(var(--brand)); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: rgb(var(--brand-2)); }

/* ─── Prose, buttons, empty state ─────────────────────────────── */
.prose { max-width: 720px; padding-bottom: 40px; }
.prose p { margin: 0 0 1em; color: rgb(var(--fg) / 0.92); }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 18px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 700; font-size: 0.9rem; cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(92deg, rgb(var(--brand)), rgb(var(--brand-2))); color: #fff; box-shadow: 0 6px 18px rgb(var(--brand) / 0.35); }
.btn-ghost { background: transparent; color: rgb(var(--muted)); border-color: rgb(var(--line)); }
.btn-ghost:hover { color: rgb(var(--fg)); }

.empty-state {
    text-align: center; padding: 60px 20px; color: rgb(var(--muted));
    border: 1px dashed rgb(var(--line)); border-radius: var(--radius); margin: 30px 0;
}

/* ─── Footer ──────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid rgb(var(--line)); margin-top: 44px; background: rgb(var(--surface) / 0.55); }
.footer-inner { max-width: var(--container); margin-inline: auto; padding: 36px 16px 28px; }
.footer-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 24px; flex-wrap: wrap; padding-bottom: 24px;
}
.footer-brand { max-width: 340px; }
.footer-tagline { margin: 10px 0 0; color: rgb(var(--muted)); font-size: 0.92rem; line-height: 1.5; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 6px; }
.footer-nav a { color: rgb(var(--muted)); font-weight: 600; font-size: 0.9rem; transition: color 140ms ease; }
.footer-nav a:hover { color: rgb(var(--brand)); text-decoration: none; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 8px 24px; flex-wrap: wrap;
    border-top: 1px solid rgb(var(--line));
    padding-top: 18px;
}
.footer-note, .footer-copy { margin: 0; font-size: 0.8rem; color: rgb(var(--muted)); }

/* ─── Scroll reveal (JS adds .in; hidden only when JS is present) ─ */
html.js .reveal { opacity: 0; transform: translateY(18px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity 600ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1); }
html.js .reveal .trend-table tbody tr { opacity: 0; }
html.js .reveal .trend-table tbody tr.in {
    opacity: 1;
    transition: opacity 420ms ease var(--row-delay, 0ms), background 140ms ease;
}
@media (prefers-reduced-motion: reduce) {
    html.js .reveal, html.js .reveal .trend-table tbody tr { opacity: 1; transform: none; }
}

/* ─── Search + tabs toolbar (one row, wraps on phones) ────────── */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.toolbar .metric-tabs { margin-top: 0; flex: none; }
.toolbar .metric-tabs a { padding: 6px 14px; font-size: 0.82rem; }
.toolbar .top-form { flex: none; }
.toolbar .push-bell { padding: 8px 14px; font-size: 0.84rem; }
@media (min-width: 900px) { .toolbar { flex-wrap: nowrap; } .toolbar .push-bell { margin-inline-start: auto; } }
/* Icon only when tight; the text stays readable for screen readers. */
@media (min-width: 900px) and (max-width: 1100px) {
    .toolbar .push-bell { padding: 8px 11px; }
    .toolbar .push-bell span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

.search-wrap { position: relative; flex: 1; min-width: 260px; max-width: 560px; }
.toolbar .search-wrap { max-width: 440px; }
.search-wrap-sm { flex: 0 1 260px; min-width: 150px; display: none; }
@media (min-width: 900px) { .search-wrap-sm { display: block; } }

/* Phones and small tablets: a search icon in the bar opens the box underneath it. */
.search-toggle {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 36px; height: 36px; padding: 0; border-radius: 999px; cursor: pointer;
    border: 1px solid rgb(255 255 255 / 0.30); background: var(--hdr-pill);
    transition: border-color 160ms ease, background 160ms ease;
}
.search-toggle:hover, .site-header.search-open .search-toggle { background: var(--hdr-pill-hover); border-color: rgb(255 255 255 / 0.5); }
.search-toggle .icon { fill: #fff; }
@media (min-width: 900px) { .search-toggle { display: none; } }
@media (max-width: 899px) {
    .site-header.search-open .search-wrap-sm {
        display: block; position: absolute; z-index: 45;
        top: calc(100% + 8px); inset-inline: 12px; width: auto;
        animation: pop-in 180ms cubic-bezier(0.22, 1, 0.36, 1);
    }
    .site-header.search-open .search-form-sm,
    .site-header.search-open .search-form-sm:focus-within { /* stays solid while typing */
        background: var(--hdr-solid); border-color: rgb(255 255 255 / 0.35);
        box-shadow: var(--shadow); padding: 6px 12px 6px 16px;
    }
    .site-header.search-open .search-form-sm .search-input { padding: 9px 0; font-size: 1rem; } /* 16px: no zoom on iOS */
}
.search-form-sm { padding: 2px 10px 2px 14px; box-shadow: none; }
.search-form-sm .search-input { padding: 7px 0; font-size: 0.9rem; }
.search-wrap-sm .search-ph { inset-inline-start: 40px; max-width: calc(100% - 54px); font-size: 0.9rem; }
.search-form {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 6px 4px 18px; border-radius: 999px;
    border: 1px solid rgb(var(--line));
    background: rgb(var(--surface));
    box-shadow: var(--shadow);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
.search-form:focus-within { border-color: rgb(var(--brand)); box-shadow: 0 8px 26px rgb(var(--brand) / 0.18); }
.search-form .icon { fill: rgb(var(--muted)); flex: none; }
.search-input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    font: inherit; color: rgb(var(--fg)); padding: 9px 0;
}
.search-btn { flex: none; }
/* Rolling placeholder (shown only while the input is empty) */
.search-ph {
    position: absolute; inset-inline-start: 44px; top: 50%; transform: translateY(-50%);
    pointer-events: none; color: rgb(var(--muted)); font-size: 0.96rem;
    max-width: calc(100% - 150px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.search-ph span { display: inline-block; animation: ph-roll 320ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes ph-roll { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.search-suggest {
    position: absolute; inset-inline: 0; top: calc(100% + 8px); z-index: 30;
    background: rgb(var(--surface)); border: 1px solid rgb(var(--line));
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 6px; max-height: 320px; overflow: auto;
    animation: pop-in 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.search-suggest a {
    display: block; padding: 9px 12px; border-radius: 9px;
    color: rgb(var(--fg)); font-weight: 600; font-size: 0.93rem;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    unicode-bidi: plaintext;
}
.search-suggest a:hover, .search-suggest a.sel { background: rgb(var(--brand) / 0.1); text-decoration: none; }

/* ─── Consent banner ──────────────────────────────────────────── */
.consent { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; padding: 14px; }
.consent-card {
    max-width: 680px; margin-inline: auto;
    background: rgb(var(--surface));
    border: 1px solid rgb(var(--line));
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px 18px;
    animation: rise-in 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.consent-title { margin: 0 0 4px; font-weight: 800; }
.consent-text { margin: 0 0 12px; font-size: 0.9rem; color: rgb(var(--muted)); }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ─── Motion safety ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}

/* Bot trap: invisible to people, disallowed in robots.txt. */
.sr-trap {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; /* hidden without off-screen offsets, which scroll in RTL */
}

/* ─── Loading state for action buttons ────────────────────────── */
.push-bell.is-loading, .btn.is-loading { pointer-events: none; cursor: progress; opacity: 0.75; }
.push-bell.is-loading .icon { visibility: hidden; }
.push-bell.is-loading { position: relative; }
.push-bell.is-loading::before {
    content: ""; position: absolute; inset-inline-start: 16px; top: 50%;
    width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
    border: 2px solid rgb(var(--brand) / 0.25); border-top-color: rgb(var(--brand));
    animation: btn-spin 700ms linear infinite;
}
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
    border: 2px solid rgb(255 255 255 / 0.35); border-top-color: #fff;
    animation: btn-spin 700ms linear infinite;
}
.btn-ghost.is-loading::after { border-color: rgb(var(--muted) / 0.3); border-top-color: rgb(var(--muted)); }
.settings-card.is-saving .loc-choices { opacity: 0.6; pointer-events: none; transition: opacity 160ms ease; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .push-bell.is-loading::before, .btn.is-loading::after { animation-duration: 2s !important; animation-iteration-count: infinite !important; }
}

/* Header search sits on the purple glass. */
.site-header .search-form-sm {
    background: var(--hdr-pill); border-color: rgb(255 255 255 / 0.30); box-shadow: none;
}
.site-header .search-form-sm:focus-within { background: var(--hdr-pill-hover); border-color: #fff; box-shadow: none; }
.site-header .search-form-sm .icon { fill: rgb(255 255 255 / 0.85); }
.site-header .search-form-sm .search-input { color: #fff; caret-color: #fff; }
.site-header .search-form-sm .search-input::placeholder { color: rgb(255 255 255 / 0.72); }
.site-header .search-wrap-sm .search-ph { color: rgb(255 255 255 / 0.74); }

/* ─── Time filter (in the toolbar): a few steps inline, the rest under "More" ─ */
.time-tabs {
    display: inline-flex; align-items: center; gap: 2px; flex: none;
    padding: 4px; border-radius: 999px;
    border: 1px solid rgb(var(--line)); background: rgb(var(--surface) / 0.7);
}
.time-tabs a, .time-tabs .disabled, .time-more > summary {
    flex: none; padding: 6px 12px; border-radius: 999px;
    font-size: 0.82rem; font-weight: 700; white-space: nowrap; color: rgb(var(--muted));
    transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.time-tabs a:hover, .time-more > summary:hover { color: rgb(var(--fg)); text-decoration: none; }
.time-tabs a.active, .time-more > summary.active {
    color: #fff;
    background: linear-gradient(92deg, rgb(var(--brand)), rgb(var(--brand-2)));
    box-shadow: 0 4px 14px rgb(var(--brand) / 0.35);
}
.time-tabs .disabled { opacity: 0.4; cursor: not-allowed; }
.time-more { position: relative; }
.time-more > summary {
    list-style: none; cursor: pointer; user-select: none;
    display: inline-flex; align-items: center; gap: 3px;
}
.time-more > summary::-webkit-details-marker { display: none; }
.time-more > summary .icon { width: 16px; height: 16px; fill: currentColor; transition: transform 160ms ease; }
.time-more[open] > summary .icon { transform: rotate(180deg); }
.time-more[open] > summary:not(.active) { color: rgb(var(--fg)); background: rgb(var(--brand) / 0.08); }
.time-more-panel {
    position: absolute; z-index: 30; top: calc(100% + 8px); inset-inline-start: 50%; translate: -50% 0;
    min-width: 132px; padding: 6px;
    display: flex; flex-direction: column; gap: 2px;
    background: rgb(var(--surface)); border: 1px solid rgb(var(--line));
    border-radius: var(--radius); box-shadow: var(--shadow);
    animation: pop-in 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
[dir="rtl"] .time-more-panel { translate: 50% 0; }
.time-more-panel a, .time-more-panel .disabled { border-radius: 9px; padding: 8px 12px; }
.time-more-panel a:hover { background: rgb(var(--brand) / 0.08); }
.viewing-note { margin: 12px 0 0; }

/* ─── Highlight widgets ───────────────────────────────────────── */
.hl-card {
    background: rgb(var(--surface)); border: 1px solid rgb(var(--line));
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px 18px 12px; min-width: 0;
}
/* Tabs are links (work without JS); the server marks the active one. */
.hl-tabs {
    display: flex; gap: 4px; max-width: 100%; margin: 30px 0 14px;
    padding: 4px; border-radius: 999px; width: fit-content;
    border: 1px solid rgb(var(--line)); background: rgb(var(--surface) / 0.7);
    overflow-x: auto; scrollbar-width: none;
}
.hl-tabs::-webkit-scrollbar { display: none; }
.hl-tabs [role="tab"] {
    flex: none; padding: 7px 16px; border-radius: 999px;
    font-size: 0.85rem; font-weight: 700; white-space: nowrap; color: rgb(var(--muted));
    transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.hl-tabs [role="tab"]:hover { color: rgb(var(--fg)); text-decoration: none; }
.hl-tabs [role="tab"][aria-selected="true"] {
    color: #fff; background: linear-gradient(92deg, rgb(var(--brand)), rgb(var(--brand-2)));
    box-shadow: 0 4px 14px rgb(var(--brand) / 0.35);
}
.hl-tabs [role="tab"]:focus-visible { outline: 2px solid rgb(var(--brand)); outline-offset: 2px; }
.hl-panel { display: none; }
.hl-panel.active { display: block; animation: rise-in 280ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.hl-panel .list-head { margin-top: 0; }
.tab-hint { margin: -6px 0 12px; font-size: 0.85rem; color: rgb(var(--muted)); }
.trend-table .col-key { font-weight: 700; color: rgb(var(--brand)); }
@media (min-width: 760px) {
    .hl-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
    .hl-list li:nth-child(2) .hl-item { border-top: 0; }
}
.hl-hint { margin: 2px 0 10px; font-size: 0.78rem; color: rgb(var(--muted)); }
.hl-list { list-style: none; margin: 0; padding: 0; }
.hl-item {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
    padding: 8px 6px; margin-inline: -6px; border-radius: 9px;
    color: rgb(var(--fg)); border-top: 1px solid rgb(var(--line) / 0.6);
    transition: background 140ms ease;
}
.hl-list li:first-child .hl-item { border-top: 0; }
.hl-item:hover { background: rgb(var(--brand) / 0.07); text-decoration: none; }
.hl-rank { font-size: 0.8rem; font-weight: 800; color: rgb(var(--brand)); min-width: 2.2em; }
.hl-name { font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.hl-stat { font-size: 0.78rem; font-weight: 700; color: rgb(var(--muted)); white-space: nowrap; }

/* ─── List header + copy buttons ──────────────────────────────── */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 34px 0 14px; }
.list-head .section-title { margin: 0; }
.copy-btn { display: none; }
html.js .copy-btn {
    display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
    width: 28px; height: 28px; padding: 0; margin-inline-start: 4px; border-radius: 8px;
    border: 1px solid transparent; background: transparent; cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
}
html.js .copy-btn:hover { background: rgb(var(--brand) / 0.1); border-color: rgb(var(--brand) / 0.3); }
.copy-btn .icon-check, .copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: block; fill: rgb(16 185 129); }
html.js .copy-btn.copy-top { display: inline-flex; width: auto; height: auto; padding: 8px 16px; gap: 8px; margin: 0; border-radius: 999px; border-color: rgb(var(--line)); font-size: 0.86rem; color: rgb(var(--fg)); }
html.js .copy-btn.copy-top:hover { border-color: rgb(var(--brand) / 0.6); background: rgb(var(--brand) / 0.08); }
.copy-top .copy-label { font-weight: 700; }
.hero-title-sm .copy-btn { margin-inline-start: 8px; }
.hero-title-sm .copy-btn .icon { width: 20px; height: 20px; }
html.js .hero-title-sm .copy-btn { width: 36px; height: 36px; }
.trend-table td.col-grow .copy-btn { opacity: 0.55; }
.trend-table tr:hover .copy-btn, .copy-btn:focus-visible, .copy-btn.copied { opacity: 1; }

/* ─── SEO text block (end of the homepage) ────────────────────── */
.about-seo { padding-block: 10px 6px; max-width: 880px; }
.about-title { font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1.35; margin: 26px 0 10px; }
.about-seo p { margin: 0; color: rgb(var(--muted)); line-height: 1.7; font-size: 0.95rem; }

/* ─── Rank chart controls (trend page) ────────────────────────── */
.chart-controls { display: flex; align-items: flex-end; gap: 12px 22px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.chart-field-label { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: rgb(var(--muted)); }
.select {
    font: inherit; font-size: 0.9rem; font-weight: 600; color: rgb(var(--fg));
    padding: 8px 12px; min-width: 190px; max-width: 100%;
    border: 1px solid rgb(var(--line)); border-radius: 12px; background: rgb(var(--surface));
    cursor: pointer;
}
.select:focus-visible { outline: 2px solid rgb(var(--brand)); outline-offset: 2px; }
.range-tabs {
    display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px;
    border: 1px solid rgb(var(--line)); background: rgb(var(--surface) / 0.7);
}
.range-tabs button {
    padding: 5px 14px; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
    font: inherit; font-size: 0.84rem; font-weight: 700; color: rgb(var(--muted));
    transition: color 160ms ease, background 160ms ease;
}
.range-tabs button:hover { color: rgb(var(--fg)); }
.range-tabs button[aria-pressed="true"] {
    color: #fff; background: linear-gradient(92deg, rgb(var(--brand)), rgb(var(--brand-2)));
    box-shadow: 0 4px 14px rgb(var(--brand) / 0.35);
}
.chart-stage { position: relative; transition: opacity 160ms ease; }
.chart-stage.is-loading { opacity: 0.5; }
.chart-stage.is-empty canvas { visibility: hidden; }
.chart-empty {
    position: absolute; inset: 0; margin: 0; display: grid; place-items: center; text-align: center;
    padding: 20px; color: rgb(var(--muted)); font-weight: 600;
}
.chart-empty[hidden] { display: none; }
@media (max-width: 560px) {
    .chart-controls { align-items: stretch; flex-direction: column; }
    .select { width: 100%; }
}

/* "Top N" bubble count (next to the time bar) */
.top-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.select-sm { min-width: 0; padding: 7px 12px; border-radius: 999px; font-size: 0.85rem; }


/* ─── Location picker search ──────────────────────────────────── */
.loc-panel { width: 280px; padding-top: 0; }
.loc-search-wrap { display: none; }
html.js .loc-search-wrap {
    display: flex; align-items: center; gap: 8px;
    position: sticky; top: 0; z-index: 1;
    margin: 0 -8px 6px; padding: 8px 10px;
    background: rgb(var(--surface)); border-bottom: 1px solid rgb(var(--line));
}
html.js .mobile-panel .loc-search-wrap { position: static; margin: 0 0 6px; padding: 0; border: 0; }
.loc-search {
    flex: 1; min-width: 0; font: inherit; font-size: 0.9rem; color: rgb(var(--fg));
    padding: 8px 10px; border-radius: 10px;
    border: 1px solid rgb(var(--line)); background: rgb(var(--bg, var(--surface)));
}
.loc-search:focus-visible { outline: 2px solid rgb(var(--brand)); outline-offset: 1px; border-color: transparent; }
.site-header .loc-search:focus-visible { outline-color: rgb(var(--brand)); }
.loc-none { margin: 8px 6px; color: rgb(var(--muted)); font-size: 0.88rem; }
.loc-tree li[hidden] { display: none; }

/* ─── Trending now (trend page) ───────────────────────────────── */
.trending-now { padding-bottom: 10px; }
