/* =========================================================
   NGT Demo Library — 2026 redesign
   Shares the www.ngt.hk design language: ink background,
   cyan → violet → pink accents, Geist + Noto Sans HK.
   ========================================================= */

@property --a {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

:root {
    --bg: #050609;
    --bg-2: #0a0c13;
    --bg-3: #10131c;
    --ink: #f5f6f8;
    --ink-2: rgba(245, 246, 248, 0.70);
    --ink-3: rgba(245, 246, 248, 0.56);
    --line: rgba(255, 255, 255, 0.09);
    --line-2: rgba(255, 255, 255, 0.18);
    --cyan: #62ecff;
    --violet: #8f7bff;
    --pink: #ff6ad5;
    --tint: #c4bdff;
    --wa: #25d366;
    --grad: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--pink));

    --f-sans: "Geist", "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
    --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, "Noto Sans HK", monospace;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --r-s: 14px;
    --r-m: 22px;
    --r-l: 32px;
    --max: 1440px;
    --gutter: max(clamp(16px, 4vw, 56px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));

    --nav-top: 14px;
    --nav-h: 60px;
    --tb-top: calc(var(--nav-top) + var(--nav-h) + 12px);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    font-family: var(--f-sans);
    font-weight: 400;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

input {
    font: inherit;
}

[hidden] {
    display: none !important;
}

::selection {
    background: rgba(143, 123, 255, 0.45);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.i {
    width: 1em;
    height: 1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.i-xs {
    width: 0.8em;
    height: 0.8em;
}

.wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding-inline: var(--gutter);
}

.mono {
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-weight: 500;
    transform: translateY(-150%);
    transition: transform 0.3s var(--ease);
}

.skip:focus {
    transform: none;
}

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-bottom: 0.06em;
}

/* ---------- Ambient background ---------- */

.ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1100px 640px at 88% -12%, rgba(143, 123, 255, 0.17), transparent 62%),
        radial-gradient(900px 620px at -12% 8%, rgba(98, 236, 255, 0.10), transparent 60%),
        radial-gradient(1000px 700px at 50% 125%, rgba(255, 106, 213, 0.07), transparent 60%),
        var(--bg);
}

.ambient-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 88px 88px;
    opacity: 0.45;
    -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 10%, transparent 72%);
    mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 10%, transparent 72%);
}

/* ---------- Buttons ---------- */

.btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.3s, border-color 0.3s, color 0.3s;
}

.btn .i {
    width: 16px;
    height: 16px;
    transition: transform 0.4s var(--ease);
}

.btn:hover .i:last-child:not(:first-child) {
    transform: translateX(3px);
}

.btn[href="#library"]:hover .i {
    transform: translateY(2px);
}

.btn-solid {
    background: var(--ink);
    color: var(--bg);
}

.btn-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px -12px rgba(143, 123, 255, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.btn-ghost {
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.02);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.btn-sm {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.btn-lg {
    height: 58px;
    padding: 0 30px;
    font-size: 16px;
}

.btn-beam::before {
    content: "";
    position: absolute;
    inset: -4px;
    z-index: -1;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(from var(--a), transparent 0 55%, var(--cyan), var(--violet), var(--pink), transparent);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin 4s linear infinite;
    pointer-events: none;
}

@keyframes spin {
    to {
        --a: 360deg;
    }
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--ink-2);
    border: 1px solid var(--line);
    transition: color 0.25s, background 0.25s;
}

.icon-btn:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
}

.icon-btn .i {
    width: 18px;
    height: 18px;
}

/* ---------- Navigation ---------- */

.nav {
    position: fixed;
    top: var(--nav-top);
    left: 50%;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(1180px, calc(100% - 24px));
    height: var(--nav-h);
    padding: 0 10px 0 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(8, 10, 16, 0.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    transform: translateX(-50%);
    transition: transform 0.55s var(--ease), background 0.3s, border-color 0.3s;
}

.nav.scrolled {
    background: rgba(6, 8, 13, 0.84);
    border-color: var(--line-2);
}

body.nav-hidden .nav {
    transform: translate(-50%, calc(-100% - var(--nav-top) - 4px));
}

.nav-logo img {
    width: auto;
    height: 26px;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--line-2);
}

.nav-title {
    color: var(--ink-3);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 2px;
    margin-left: auto;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--ink-2);
    transition: color 0.25s, background 0.25s;
}

.nav-links a:hover,
.nav-links a[aria-current] {
    color: var(--ink);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-r {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 6px;
}

.lang {
    display: flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.lang button {
    min-width: 34px;
    padding: 5px 10px;
    border-radius: 999px;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    transition: color 0.25s, background 0.25s;
}

.lang button:hover {
    color: var(--ink);
}

.lang button[aria-pressed="true"] {
    background: var(--ink);
    color: var(--bg);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    padding-top: calc(var(--nav-top) + var(--nav-h) + clamp(44px, 7vw, 96px));
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding: 7px 14px 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink-2);
}

.eyebrow i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    50% {
        opacity: 0.35;
        transform: scale(0.7);
    }
}

h1 {
    font-size: clamp(38px, 5.6vw, 80px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

html[lang="en"] h1 {
    letter-spacing: -0.04em;
    line-height: 1.04;
}

.h1-line {
    display: block;
}

.hero-sub {
    max-width: 520px;
    margin-top: 24px;
    font-size: clamp(16px, 1.3vw, 18px);
    font-weight: 300;
    line-height: 1.75;
    color: var(--ink-2);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.hero-art {
    position: relative;
    aspect-ratio: 1.2;
}

.frame {
    position: absolute;
    width: 72%;
    overflow: hidden;
    border: 1px solid var(--line-2);
    border-radius: 14px;
    background: var(--bg-3);
    box-shadow: 0 50px 90px -35px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.03);
    translate: calc(var(--px, 0) * var(--depth, 1px)) calc(var(--py, 0) * var(--depth, 1px));
    transition: translate 0.9s var(--ease);
    animation: float 8s ease-in-out infinite;
}

.frame img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
}

.frame-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.frame-bar i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.f1 {
    left: 2%;
    bottom: 4%;
    z-index: 3;
    rotate: -4deg;
    --depth: 1.6px;
}

.f2 {
    right: 0;
    top: 16%;
    z-index: 2;
    rotate: 5deg;
    --depth: 1px;
    animation-delay: -2.5s;
}

.f3 {
    left: 14%;
    top: 0;
    z-index: 1;
    width: 60%;
    rotate: -1deg;
    opacity: 0.55;
    --depth: 0.5px;
    animation-delay: -5s;
}

@keyframes float {
    50% {
        transform: translateY(-10px);
    }
}

.hero-chip {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(8, 10, 16, 0.78);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: 10px;
    color: var(--ink);
    animation: float 7s ease-in-out infinite;
}

.hero-chip b {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3ee08f;
    box-shadow: 0 0 10px #3ee08f;
}

.hero-chip.c1 {
    left: -2%;
    top: 46%;
    animation-delay: -1s;
}

.hero-chip.c2 {
    right: 3%;
    bottom: 10%;
    animation-delay: -3.5s;
}

.hero-chip.c2 b {
    background: var(--violet);
    box-shadow: 0 0 10px var(--violet);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: clamp(48px, 7vw, 88px);
    list-style: none;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stats li + li button {
    border-left: 1px solid var(--line);
}

.stats button {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    width: 100%;
    height: 100%;
    padding: 22px 24px 24px;
    text-align: left;
    transition: background 0.35s;
}

.stats .mono {
    grid-column: 1;
    color: var(--ink-3);
}

.stats b {
    grid-column: 1;
    font-size: clamp(30px, 3.4vw, 46px);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stats .i {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    width: 18px;
    height: 18px;
    color: var(--ink-3);
    transition: transform 0.4s var(--ease), color 0.3s;
}

.stats button:hover {
    background: linear-gradient(180deg, rgba(143, 123, 255, 0.09), transparent);
}

.stats button:hover .i {
    color: var(--cyan);
    transform: translateY(3px);
}

/* ---------- Library toolbar ---------- */

.library {
    position: relative;
    padding-top: clamp(40px, 6vw, 72px);
    scroll-margin-top: 0;
}

.toolbar-sentinel {
    height: 1px;
}

.toolbar-shell {
    position: sticky;
    top: var(--tb-top);
    z-index: 50;
    transition: top 0.55s var(--ease);
}

body.nav-hidden {
    --tb-top: 12px;
}

/* masks cards scrolling through the gap above the stuck toolbar */
.toolbar-shell::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 50%;
    z-index: -1;
    height: calc(var(--tb-top) + 50%);
    background: linear-gradient(rgba(5, 6, 9, 0.92), rgba(5, 6, 9, 0.8) 60%, rgba(5, 6, 9, 0));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, height 0.55s var(--ease);
}

.toolbar-shell.stuck::before {
    opacity: 1;
}

.toolbar {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    background: rgba(10, 12, 19, 0.74);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    backdrop-filter: blur(20px) saturate(1.3);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.4s;
}

.toolbar-shell.stuck .toolbar {
    border-color: var(--line-2);
    background: rgba(9, 11, 17, 0.9);
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
}

.tb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.seg {
    display: flex;
    gap: 2px;
    min-width: 0;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    scrollbar-width: none;
}

.seg::-webkit-scrollbar {
    display: none;
}

.seg button {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--ink-2);
    white-space: nowrap;
    transition: color 0.25s, background 0.25s, opacity 0.25s;
}

.seg button:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
}

.seg button[aria-pressed="true"] {
    background: var(--ink);
    color: var(--bg);
}

.seg button.is-zero:not([aria-pressed="true"]) {
    opacity: 0.45;
}

.seg .n,
.chip .n {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
}

.seg button[aria-pressed="true"] .n {
    color: rgba(5, 6, 9, 0.55);
}

.tb-tools {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
}

.search {
    position: relative;
    display: flex;
    align-items: center;
    width: 320px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.search:focus-within {
    border-color: rgba(98, 236, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(98, 236, 255, 0.12);
}

.search-icon {
    position: absolute;
    left: 15px;
    width: 17px;
    height: 17px;
    color: var(--ink-3);
    pointer-events: none;
}

.search input {
    width: 100%;
    height: 100%;
    padding: 0 44px 0 42px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    color: var(--ink);
}

.search input::placeholder {
    color: var(--ink-3);
}

.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.search kbd {
    position: absolute;
    right: 12px;
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    border: 1px solid var(--line-2);
    border-radius: 6px;
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--ink-3);
    pointer-events: none;
}

.search:focus-within kbd,
.search.has-value kbd {
    display: none;
}

.search-clear {
    position: absolute;
    right: 6px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--ink-2);
    transition: background 0.2s, color 0.2s;
}

.search-clear:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
}

.search-clear .i {
    width: 16px;
    height: 16px;
}

.filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 14px;
}

.filter-btn .i {
    width: 17px;
    height: 17px;
}

.filter-badge {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--grad);
    color: var(--bg);
    font-size: 11px;
    font-weight: 600;
}

.density {
    display: flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.density button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--ink-3);
    transition: color 0.25s, background 0.25s;
}

.density button:hover {
    color: var(--ink);
}

.density button[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ink);
}

.density .i {
    width: 17px;
    height: 17px;
}

/* tag row */

.tag-panel {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.sheet-head,
.sheet-foot {
    display: none;
}

.tags-viewport {
    position: relative;
}

.tags {
    display: flex;
    gap: 6px;
    padding: 2px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.tags::-webkit-scrollbar {
    display: none;
}

.tags-viewport.can-left .tags {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 72px);
    mask-image: linear-gradient(90deg, transparent, #000 72px);
}

.tags-viewport.can-right .tags {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent);
}

.tags-viewport.can-left.can-right .tags {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 72px, #000 calc(100% - 72px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 72px, #000 calc(100% - 72px), transparent);
}

.tags-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: rgba(20, 23, 33, 0.96);
    color: var(--ink);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity 0.2s;
}

.tags-nav .i {
    width: 16px;
    height: 16px;
}

.tags-nav.prev {
    left: 0;
}

.tags-nav.next {
    right: 0;
}

.can-left .tags-nav.prev,
.can-right .tags-nav.next {
    opacity: 1;
    pointer-events: auto;
}

.chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13.5px;
    color: var(--ink-2);
    white-space: nowrap;
    transition: color 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.3s;
}

.chip:hover {
    border-color: var(--line-2);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
}

.chip[aria-pressed="true"] {
    border-color: transparent;
    background: linear-gradient(var(--bg-3), var(--bg-3)) padding-box, var(--grad) border-box;
    color: var(--ink);
    box-shadow: 0 0 22px -8px rgba(143, 123, 255, 0.7);
}

.chip[aria-pressed="true"] .n {
    color: var(--tint);
}

.chip-sep {
    flex: none;
    width: 1px;
    margin: 7px 4px;
    background: var(--line-2);
}

.sheet-backdrop {
    display: none;
}

/* ---------- Result bar ---------- */

.resultbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    min-height: 36px;
    margin: 26px 0 4px;
}

.resultbar-l {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.count {
    color: var(--ink-3);
}

.count b {
    font-weight: 500;
    color: var(--ink);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 8px 0 12px;
    border: 1px solid rgba(143, 123, 255, 0.32);
    border-radius: 999px;
    background: rgba(143, 123, 255, 0.12);
    font-size: 13px;
    transition: background 0.2s;
}

.pill:hover {
    background: rgba(143, 123, 255, 0.22);
}

.pill .i {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.clear-all {
    padding: 4px 6px;
    font-size: 13px;
    color: var(--ink-3);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.clear-all:hover {
    color: var(--ink);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    color: var(--ink-2);
    transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.share-btn:hover {
    border-color: var(--line-2);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
}

.share-btn .i {
    width: 15px;
    height: 15px;
}

/* ---------- Groups ---------- */

.group {
    padding-top: 30px;
}

.group + .group {
    margin-top: clamp(36px, 5vw, 64px);
}

.group-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 32px;
    margin-bottom: 26px;
}

.group-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--ink-3);
}

.group-label .idx {
    color: var(--cyan);
}

.group-label i {
    width: 36px;
    height: 1px;
    background: var(--grad);
}

.group-head h2 {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.group-head h2 .n {
    font-family: var(--f-mono);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--ink-3);
}

.group-desc {
    max-width: 560px;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 300;
    color: var(--ink-2);
}

.group-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad) border-box;
    font-size: 14px;
    transition: box-shadow 0.4s var(--ease);
}

.group-more .i {
    width: 15px;
    height: 15px;
    transition: transform 0.4s var(--ease);
}

.group-more:hover {
    box-shadow: 0 0 30px -8px rgba(143, 123, 255, 0.8);
}

.group-more:hover .i {
    transform: translateX(3px);
}

/* ---------- Grid & cards ---------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(var(--card-min), 100%), 1fr));
    gap: var(--gap-y) var(--gap-x);
    list-style: none;
}

.density-cozy {
    --card-min: 290px;
    --gap-x: 22px;
    --gap-y: 34px;
}

.density-compact {
    --card-min: 200px;
    --gap-x: 16px;
    --gap-y: 22px;
}

.card {
    position: relative;
    min-width: 0;
}

.results.animate .card {
    animation: rise 0.7s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 32ms);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

.card-link {
    display: block;
    border-radius: var(--r-s);
}

.card-link:focus-visible {
    outline-offset: 6px;
}

.shot {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background: var(--bg-2);
    transition: transform 0.6s var(--ease), border-color 0.4s, box-shadow 0.6s var(--ease);
}

.shot::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(196, 189, 255, 0.16), transparent 55%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.chrome {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.dots {
    display: flex;
    gap: 5px;
}

.dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    transition: background 0.3s;
}

.card-link:hover .dots i:nth-child(1) {
    background: #ff5f57;
}

.card-link:hover .dots i:nth-child(2) {
    background: #febc2e;
}

.card-link:hover .dots i:nth-child(3) {
    background: #28c840;
}

.url {
    justify-self: center;
    max-width: 100%;
    height: 16px;
    padding: 0 10px;
    overflow: hidden;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    font-family: var(--f-mono);
    font-size: 10px;
    line-height: 16px;
    letter-spacing: 0.03em;
    color: var(--ink-3);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(110deg, var(--bg-2) 8%, var(--bg-3) 18%, var(--bg-2) 33%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

.img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transition: opacity 0.5s, transform 1.2s var(--ease);
}

.shot.ready .img,
.shot.broken .img {
    animation: none;
    background: var(--bg-2);
}

.shot.ready .img img {
    opacity: 1;
}

.shot.broken .img {
    display: grid;
    place-items: center;
}

.shot.broken .img img {
    display: none;
}

.shot.broken .img::after {
    content: attr(data-initial);
    font-size: 44px;
    font-weight: 700;
    color: var(--line-2);
}

.card-link:hover .shot {
    border-color: var(--line-2);
    box-shadow:
        0 30px 60px -30px rgba(0, 0, 0, 0.95),
        0 0 0 1px rgba(143, 123, 255, 0.22),
        0 20px 50px -22px rgba(143, 123, 255, 0.45);
    transform: translateY(-6px);
}

.card-link:hover .img img {
    transform: scale(1.045);
}

.card-link:hover .shot::after {
    opacity: 1;
}

.badge-new {
    position: absolute;
    top: 36px;
    left: 10px;
    z-index: 3;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--grad);
    box-shadow: 0 6px 20px -6px rgba(143, 123, 255, 0.85);
    font-family: var(--f-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--bg);
}

.meta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.num {
    color: var(--cyan);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.title {
    overflow: hidden;
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.005em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.go {
    grid-row: 1 / 3;
    grid-column: 3;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink-2);
    transition: transform 0.5s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}

.go .i {
    width: 14px;
    height: 14px;
}

.card-link:hover .go {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--bg);
    transform: rotate(-45deg);
}

.sub {
    grid-column: 2;
    overflow: hidden;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--ink-3);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ask {
    position: absolute;
    top: 36px;
    right: 10px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: rgba(8, 10, 16, 0.8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--ink);
    opacity: 0;
    transform: translateY(-2px) scale(0.9);
    transition: opacity 0.35s var(--ease), transform 0.6s var(--ease), background 0.25s, border-color 0.25s;
}

.ask .i {
    width: 16px;
    height: 16px;
}

.ask::after {
    content: attr(data-tip);
    position: absolute;
    right: calc(100% + 8px);
    padding: 6px 10px;
    border: 1px solid var(--line-2);
    border-radius: 8px;
    background: rgba(8, 10, 16, 0.94);
    font-size: 12px;
    color: var(--ink);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(4px);
    transition: opacity 0.25s, transform 0.25s;
}

.card:hover .ask,
.ask:focus-visible {
    opacity: 1;
    transform: translateY(-6px);
}

.ask:hover {
    border-color: var(--wa);
    background: var(--wa);
    color: #fff;
}

.ask:hover::after,
.ask:focus-visible::after {
    opacity: 1;
    transform: none;
}

/* "view all" tile that ends a truncated group */

.more {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    height: 100%;
    min-height: 180px;
    padding: 22px;
    border: 1px dashed var(--line-2);
    border-radius: var(--r-s);
    background: radial-gradient(120% 90% at 100% 0%, rgba(143, 123, 255, 0.14), transparent 60%), rgba(255, 255, 255, 0.015);
    text-align: left;
    transition: border-color 0.3s, box-shadow 0.5s var(--ease), transform 0.6s var(--ease);
}

.more:hover {
    border-style: solid;
    border-color: rgba(143, 123, 255, 0.5);
    box-shadow: 0 20px 50px -24px rgba(143, 123, 255, 0.6);
    transform: translateY(-6px);
}

.more-thumbs {
    display: flex;
}

.more-thumbs img {
    width: 64px;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    border: 1px solid var(--line-2);
    border-radius: 6px;
    background: var(--bg-3);
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.8);
}

.more-thumbs img + img {
    margin-left: -22px;
}

.more b {
    display: block;
    font-size: clamp(34px, 3.6vw, 52px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.04em;
}

.more-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    font-size: 14px;
    color: var(--ink-2);
}

.more-label .i {
    width: 16px;
    height: 16px;
    transition: transform 0.4s var(--ease);
}

.more:hover .more-label .i {
    transform: translateX(4px);
}

/* compact density */

.density-compact .url,
.density-compact .sub,
.density-compact .go {
    display: none;
}

.density-compact .chrome {
    height: 20px;
}

.density-compact .badge-new,
.density-compact .ask {
    top: 28px;
}

.density-compact .title {
    font-size: 14px;
}

.density-compact .meta {
    margin-top: 10px;
}

.density-compact .more-thumbs {
    display: none;
}

/* ---------- Empty state ---------- */

.empty {
    margin-top: 24px;
    padding: clamp(48px, 8vw, 96px) 20px;
    border: 1px dashed var(--line-2);
    border-radius: var(--r-l);
    text-align: center;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(143, 123, 255, 0.12);
    color: var(--tint);
}

.empty-icon .i {
    width: 28px;
    height: 28px;
}

.empty h3 {
    font-size: 22px;
    font-weight: 600;
}

.empty p {
    margin-top: 8px;
    color: var(--ink-2);
}

.empty-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 30px;
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.noscript {
    padding: 48px 0;
    text-align: center;
    color: var(--ink-2);
}

/* ---------- CTA ---------- */

.cta {
    position: relative;
    overflow: hidden;
    margin-top: clamp(64px, 9vw, 128px);
    padding: clamp(96px, 13vw, 190px) 0;
    border-top: 1px solid var(--line);
    text-align: center;
}

.cta::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: -1;
    width: min(90vw, 1000px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(98, 236, 255, 0.22), rgba(143, 123, 255, 0.26), rgba(255, 106, 213, 0.2), rgba(98, 236, 255, 0.22));
    filter: blur(110px);
    opacity: 0.5;
    transform: translate(-50%, -50%);
    animation: rot 30s linear infinite;
}

@keyframes rot {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.sec-tag {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--ink-3);
}

.sec-tag::before,
.sec-tag::after {
    content: "";
    width: 32px;
    height: 1px;
    background: var(--grad);
}

.cta h2 {
    margin: 22px 0 24px;
    font-size: clamp(36px, 6.6vw, 96px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.cta-body {
    max-width: 540px;
    margin: 0 auto 40px;
    font-size: 17px;
    font-weight: 300;
    color: var(--ink-2);
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ---------- Footer ---------- */

.footer {
    padding: 64px 0 calc(32px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: rgba(5, 6, 9, 0.7);
}

.foot {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.foot-brand img {
    width: auto;
    height: 30px;
}

.foot-brand p {
    max-width: 340px;
    margin-top: 16px;
    font-size: 14px;
    color: var(--ink-2);
}

.foot h3 {
    margin-bottom: 16px;
    color: var(--ink-3);
}

.foot ul {
    display: grid;
    gap: 10px;
    list-style: none;
    font-size: 14.5px;
}

.foot ul a {
    color: var(--ink-2);
    transition: color 0.25s;
}

.foot ul a:hover {
    color: var(--cyan);
}

.foot-end {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: var(--ink-3);
}

/* ---------- Floating actions ---------- */

.fab {
    position: fixed;
    right: max(20px, env(safe-area-inset-right, 0px));
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    z-index: 55;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: rgba(8, 10, 16, 0.75);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    transition: transform 0.4s var(--ease), box-shadow 0.4s, background 0.3s, border-color 0.3s;
}

.fab::before {
    content: "";
    position: absolute;
    inset: -7px;
    border: 1px solid rgba(98, 236, 255, 0.3);
    border-radius: 50%;
    animation: ring 3s ease-out infinite;
}

@keyframes ring {
    from {
        opacity: 1;
        transform: scale(0.85);
    }
    to {
        opacity: 0;
        transform: scale(1.3);
    }
}

.fab .i {
    width: 22px;
    height: 22px;
}

.fab:hover {
    border-color: var(--wa);
    background: var(--wa);
    box-shadow: 0 0 40px -6px rgba(37, 211, 102, 0.7);
    transform: scale(1.06);
}

.to-top {
    position: fixed;
    right: calc(max(20px, env(safe-area-inset-right, 0px)) + 8px);
    bottom: calc(max(20px, env(safe-area-inset-bottom, 0px)) + 68px);
    z-index: 55;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: rgba(8, 10, 16, 0.75);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.3s, transform 0.4s var(--ease), visibility 0.3s, border-color 0.3s;
}

.to-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.to-top:hover {
    border-color: var(--cyan);
}

.to-top .i {
    width: 17px;
    height: 17px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--ink);
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.8);
    font-size: 14px;
    font-weight: 500;
    color: var(--bg);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity 0.35s, transform 0.5s var(--ease);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast .i {
    width: 16px;
    height: 16px;
    stroke-width: 2.4;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .nav-links {
        display: none;
    }

    .nav-r {
        margin-left: auto;
    }

    .search {
        width: 240px;
    }
}

@media (max-width: 1000px) {
    /* tools on top, collection tabs get the full width below */
    .tb-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .tb-tools {
        order: -1;
    }

    .search {
        flex: 1;
        width: auto;
    }

    .seg {
        align-self: flex-start;
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-art {
        display: none;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats li:nth-child(3) button {
        border-left: 0;
    }

    .stats li:nth-child(n + 3) button {
        border-top: 1px solid var(--line);
    }

    .foot {
        grid-template-columns: 1fr 1fr;
    }

    .foot-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    :root {
        --nav-top: 10px;
        --nav-h: 56px;
    }

    .nav {
        gap: 10px;
        padding-left: 18px;
    }

    .nav-logo img {
        height: 22px;
    }

    .hero-cta .btn {
        flex: 1 1 auto;
    }

    .stats button {
        padding: 18px 16px 20px;
    }

    /* toolbar: search + filters on top, collections below */
    .toolbar {
        padding: 8px;
        border-radius: 18px;
        /* backdrop-filter would make the fixed bottom sheet position against the toolbar */
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: #0a0c13;
    }

    .toolbar-shell.stuck .toolbar {
        background: #0a0c13;
    }

    .tb-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .tb-tools {
        order: -1;
    }

    .search {
        flex: 1;
        width: auto;
    }

    .search kbd {
        display: none;
    }

    .filter-btn {
        display: inline-flex;
    }

    .filter-btn > span:not(.filter-badge) {
        display: none;
    }

    .filter-btn {
        position: relative;
        justify-content: center;
        width: 44px;
        padding: 0;
    }

    .filter-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .density {
        display: none;
    }

    .seg {
        border-radius: 14px;
    }

    .seg button {
        height: 34px;
        padding: 0 12px;
        font-size: 13.5px;
    }

    /* tag row becomes a bottom sheet */
    .tag-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2;
        display: flex;
        flex-direction: column;
        max-height: min(78vh, 640px);
        margin: 0;
        padding: 0 18px calc(16px + env(safe-area-inset-bottom, 0px));
        border: 1px solid var(--line-2);
        border-bottom: 0;
        border-radius: 24px 24px 0 0;
        background: #0b0d15;
        box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, 0.9);
        visibility: hidden;
        transform: translateY(105%);
        transition: transform 0.45s var(--ease), visibility 0s linear 0.45s;
    }

    body.sheet-open .tag-panel {
        visibility: visible;
        transform: none;
        transition: transform 0.45s var(--ease), visibility 0s;
    }

    body.sheet-open .toolbar-shell {
        z-index: 100;
    }

    .sheet-head {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 22px 0 14px;
        font-size: 16px;
    }

    .sheet-head::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        width: 40px;
        height: 4px;
        border-radius: 4px;
        background: var(--line-2);
        transform: translateX(-50%);
    }

    .tags-viewport {
        flex: 1;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .tags,
    .tags-viewport.can-left .tags,
    .tags-viewport.can-right .tags,
    .tags-viewport.can-left.can-right .tags {
        flex-wrap: wrap;
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .chip {
        height: 38px;
        font-size: 14px;
    }

    .chip-sep {
        flex-basis: 100%;
        width: auto;
        height: 1px;
        margin: 6px 0;
        background: var(--line);
    }

    .tags-nav {
        display: none;
    }

    .sheet-foot {
        display: flex;
        gap: 10px;
        padding-top: 16px;
    }

    .sheet-foot .btn {
        flex: 1;
    }

    .sheet-foot .btn-solid {
        flex: 2;
    }

    .sheet-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1;
        display: block;
        background: rgba(0, 0, 0, 0.6);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s;
    }

    body.sheet-open .sheet-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .resultbar {
        margin-top: 18px;
    }

    .share-btn span {
        display: none;
    }

    .share-btn {
        width: 36px;
        justify-content: center;
        padding: 0;
    }

    .density-cozy {
        --card-min: 260px;
        --gap-y: 28px;
    }

    .density-compact {
        --card-min: 150px;
        --gap-x: 12px;
    }

    .group-head {
        margin-bottom: 20px;
    }

    .group-more {
        height: 40px;
        padding: 0 16px;
        font-size: 13.5px;
    }

    .ask {
        opacity: 1;
        transform: none;
    }

    .ask::after {
        display: none;
    }

    .foot {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .fab {
        width: 52px;
        height: 52px;
    }

    .to-top {
        right: calc(max(20px, env(safe-area-inset-right, 0px)) + 6px);
        bottom: calc(max(20px, env(safe-area-inset-bottom, 0px)) + 64px);
    }
}

@media (max-width: 420px) {
    .nav-divider,
    .nav-title {
        display: none;
    }

    .lang button {
        min-width: 30px;
        padding: 5px 8px;
    }
}

@media (hover: none) {
    .ask {
        opacity: 1;
        transform: none;
    }

    .ask::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
