@layer tg-tokens, tg-base, tg-components, tg-tools;

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("/assets/fonts/inter-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("/assets/fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: InterFallback;
    src: local("Arial");
    size-adjust: 107%;
    ascent-override: 90%;
    descent-override: 22%;
    line-gap-override: 0%;
}

@layer tg-tokens {
    .tg-page {
        --tg-bg: #0a1220;
        --tg-text: #ffffff;
        --tg-muted: rgba(255, 255, 255, 0.62);
        --tg-blue: #3399ff;
        --tg-mint: #5adcaa;
        --tg-line: rgba(143, 180, 230, 0.18);
        --tg-bar: rgba(143, 180, 230, 0.28);
        --tg-panel: rgba(10, 18, 32, 0.92);
        --tg-surface: rgba(18, 32, 54, 0.78);
        --tg-on-blue: #041018;
        --tg-blue-soft: rgba(51, 153, 255, 0.16);
        --tg-gold: #d6aa5a;
        --tg-gold-soft: rgba(214, 170, 90, 0.14);
        --tg-gold-line: rgba(214, 170, 90, 0.35);
        --tg-gold-text: #f3e2bc;
        --tg-danger: #ffd0d0;
        --tg-danger-line: rgba(255, 150, 150, 0.45);
        --tg-danger-soft: rgba(255, 90, 90, 0.1);
        --tg-faint: rgba(255, 255, 255, 0.28);
        --tg-on-blue-faint: rgba(4, 16, 24, 0.28);
        --tg-radius-panel: 22px;
        --tg-radius-input: 14px;
        --tg-radius-row: 12px;
        --tg-radius-icon: 10px;
        color-scheme: dark;
    }
}

@layer tg-base {
    .tg-page {
        margin: 0;
        font-family: Inter, InterFallback, system-ui, sans-serif;
        font-size: 16px;
        line-height: 1.5;
        color: var(--tg-text);
        background:
            radial-gradient(circle at 86% 0%, rgba(51, 153, 255, 0.1), transparent 26%),
            linear-gradient(180deg, #0a1220 0%, #0c1628 48%, #080e1a 100%);
        -webkit-font-smoothing: antialiased;
    }

    .tg-main,
    .tg-switch {
        box-sizing: border-box;
    }

    .tg-main *,
    .tg-main *::before,
    .tg-main *::after,
    .tg-switch *,
    .tg-switch *::before,
    .tg-switch *::after {
        box-sizing: border-box;
    }

    .tg-sprite {
        position: absolute;
        width: 0;
        height: 0;
        overflow: hidden;
    }

    .tg-main {
        width: min(1120px, calc(100% - 32px));
        margin: 0 auto;
        padding: 28px 0 48px;
        padding-bottom: calc(48px + env(safe-area-inset-bottom));
    }

    .tg-main h1,
    .tg-h1 {
        font-family: "Bricolage Grotesque", Inter, sans-serif;
        font-size: clamp(32px, 5vw, 48px);
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: -0.03em;
        text-wrap: balance;
        margin: 0 0 12px;
    }

    .tg-main h2 {
        font-size: 20px;
        font-weight: 600;
        line-height: 1.3;
        margin: 0 0 12px;
    }

    .tg-lead,
    .tg-prose,
    .tg-faq p {
        max-width: 70ch;
        color: var(--tg-muted);
        font-size: 16px;
    }

    .tg-note {
        width: min(1120px, calc(100% - 32px));
        margin: 0 auto 28px;
        color: var(--tg-muted);
        font-size: 12px;
    }

    .tg-main :focus-visible {
        outline: 2px solid var(--tg-blue);
        outline-offset: 2px;
    }

    .tg-main a {
        color: inherit;
    }
}

@layer tg-components {
    .tg-switch {
        width: min(1120px, calc(100% - 32px));
        margin: 12px auto 0;
        display: flex;
        gap: 16px;
        align-items: baseline;
        border-bottom: 1px solid var(--tg-line);
    }

    .tg-switch__brand {
        display: inline-flex;
        align-items: center;
        min-height: 24px;
        margin: 0;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        color: inherit;
        text-decoration: none;
    }

    a.tg-switch__brand:hover {
        color: var(--tg-blue);
    }

    .tg-switch__rail {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .tg-switch__item {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 10px 12px 12px;
        font-size: 14px;
        color: var(--tg-muted);
        text-decoration: none;
        border-bottom: 2px solid transparent;
    }

    .tg-switch__item.is-current {
        color: var(--tg-text);
        border-bottom-color: var(--tg-blue);
    }

    .tg-switch__item.is-soon {
        color: rgba(255, 255, 255, 0.38);
    }

    .tg-soon {
        font-size: 12px;
    }

    .tg-search {
        position: sticky;
        top: 0;
        z-index: 4;
        margin: 0 0 20px;
        padding: 0 0 12px;
        background: transparent;
    }

    .tg-search .tg-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .tg-label {
        display: block;
        margin-bottom: 6px;
        font-size: 12px;
        color: var(--tg-muted);
    }

    .tg-search__row {
        display: flex;
        gap: 8px;
    }

    .tg-main #tg-q:focus,
    .tg-main #tg-q:focus-visible {
        outline: none;
        outline-offset: 0;
        border-color: #3399ff;
        transition: none;
    }

    .tg-search input,
    .tg-filters input,
    .tg-filters select,
    .tg-remove input {
        width: 100%;
        min-height: 52px;
        padding: 0 14px;
        border: 1px solid var(--tg-line);
        border-radius: var(--tg-radius-input);
        background: rgba(255, 255, 255, 0.03);
        color: var(--tg-text);
        font: inherit;
        font-size: 16px;
    }

    .tg-btn {
        min-height: 52px;
        padding: 0 18px;
        border: 0;
        border-radius: var(--tg-radius-input);
        background: var(--tg-blue);
        color: #041018;
        font: inherit;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .tg-suggest {
        position: absolute;
        left: 0;
        right: 0;
        z-index: 5;
        max-height: min(60vh, 420px);
        margin: 6px 0 0;
        padding: 6px;
        overflow-y: auto;
        list-style: none;
        background: #0a1220;
        border: 1px solid var(--tg-line);
        border-radius: var(--tg-radius-panel);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    }

    .tg-suggest__count {
        position: sticky;
        top: 0;
        z-index: 1;
        margin: 0;
        padding: 8px 10px;
        background: #0a1220;
        color: var(--tg-muted);
        font-size: 13px;
        font-weight: 700;
    }

    .tg-suggest__text {
        min-width: 0;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tg-suggest__meta {
        margin-left: auto;
        color: var(--tg-muted);
        font-size: 13px;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }

    .tg-suggest a,
    .tg-suggest button {
        display: flex;
        gap: 8px;
        align-items: center;
        width: 100%;
        padding: 10px;
        border: 0;
        background: transparent;
        color: inherit;
        text-align: left;
        text-decoration: none;
        font: inherit;
        border-radius: var(--tg-radius-row);
    }

    .tg-suggest [aria-selected="true"] {
        background: rgba(51, 153, 255, 0.16);
    }

    .tg-chips,
    .tg-scale__links,
    .tg-active {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 0 0 16px;
        padding: 0;
        list-style: none;
    }

    .tg-chip,
    .tg-chips a,
    .tg-scale__links a,
    .tg-active a {
        display: inline-flex;
        align-items: center;
        min-height: 32px;
        padding: 0 12px;
        border-radius: 999px;
        border: 1px solid var(--tg-line);
        color: var(--tg-text);
        text-decoration: none;
        font-size: 14px;
    }

    .tg-chips a[aria-current="page"] {
        border-color: var(--tg-blue);
        background: rgba(51, 153, 255, 0.16);
    }

    .tg-scale {
        margin: 28px 0;
        padding: 16px;
        border: 1px solid var(--tg-line);
        border-radius: var(--tg-radius-panel);
    }

    .tg-scale__plot {
        display: flex;
        align-items: flex-end;
        gap: 2px;
        height: 120px;
    }

    .tg-scale__bar {
        flex: 1 1 0;
        height: var(--h, 2%);
        min-height: 2px;
        background: var(--tg-bar);
        transform-origin: bottom;
        animation: tg-rise 400ms ease forwards;
    }

    .tg-scale__bar.is-on {
        background: var(--tg-blue);
    }

    .tg-scale__axis {
        display: flex;
        justify-content: space-between;
        margin: 8px 0 0;
        color: var(--tg-muted);
        font-size: 12px;
        font-variant-numeric: tabular-nums;
    }

    .tg-scale__brush {
        display: grid;
        gap: 8px;
        margin-top: 12px;
    }

    .tg-scale__brush label {
        display: grid;
        grid-template-columns: 2.5rem 1fr;
        gap: 8px;
        align-items: center;
        font-size: 14px;
    }

    .tg-scale__brush input[type="range"] {
        min-height: 44px;
        accent-color: var(--tg-blue);
    }

    .tg-scale__brush .tg-btn {
        justify-self: start;
        width: auto;
        min-width: 8rem;
    }

    .tg-scale__chosen {
        margin: 0;
        font-size: 14px;
        font-variant-numeric: tabular-nums;
    }

    .tg-cats {
        display: grid;
        gap: 2px;
        margin: 0 0 8px;
        padding: 0;
        list-style: none;
    }

    .tg-cat {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
        min-height: 44px;
        padding: 6px 0;
        text-decoration: none;
        border-bottom: 1px solid var(--tg-line);
    }

    .tg-cat__bar {
        display: block;
        height: 6px;
        width: var(--w, 0%);
        background: var(--tg-bar);
        border-radius: 999px;
    }

    .tg-cat__n,
    .tg-row__num,
    .tg-stat strong {
        font-variant-numeric: tabular-nums;
        font-size: 14px;
    }

    .tg-quiet {
        display: block;
        margin: 8px 0 24px;
        color: var(--tg-muted);
        font-size: 14px;
    }

    .tg-rows {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .tg-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        align-items: stretch;
        min-height: 56px;
        border-bottom: 1px solid var(--tg-line);
        border-radius: var(--tg-radius-row);
    }

    .tg-row__main {
        display: grid;
        grid-template-columns: 24px minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
        padding: 10px 8px;
        text-decoration: none;
    }

    .tg-row__title {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        overflow-wrap: anywhere;
    }

    .tg-row__user,
    .tg-muted {
        color: var(--tg-muted);
        font-size: 14px;
    }

    .tg-row__user .tg-quiet {
        display: inline;
        margin: 0;
    }

    .tg-row__meta {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        justify-content: flex-end;
    }

    .tg-row__dau {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        font-variant-numeric: tabular-nums;
        color: var(--tg-muted);
    }

    .tg-mini {
        width: 36px;
        height: 4px;
        border-radius: 999px;
        background: var(--tg-line);
        position: relative;
    }

    .tg-mini::before {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: var(--w, 0%);
        background: var(--tg-mint);
        border-radius: inherit;
    }

    .tg-ext {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        color: var(--tg-muted);
    }

    .tg-ico {
        display: block;
        width: 20px;
        height: 20px;
        border-radius: var(--tg-radius-icon);
    }

    .tg-mark {
        background: transparent;
        color: inherit;
        font-weight: 700;
    }

    .tg-layout {
        display: grid;
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 28px;
        align-items: start;
    }

    .tg-cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 18px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .tg-card {
        position: relative;
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 18px 20px;
        overflow: hidden;
        border: 1px solid var(--tg-line);
        border-radius: 20px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
        color: inherit;
    }

    .tg-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 0%), rgba(51, 153, 255, 0.16), transparent 70%);
        opacity: 0;
        pointer-events: none;
    }

    .tg-card__link::after {
        content: "";
        position: absolute;
        inset: 0;
    }

    .tg-card:has(.tg-card__link:focus-visible) {
        outline: 2px solid #3399ff;
        outline-offset: 3px;
    }

    .tg-card:active {
        transform: scale(0.99);
        transition: transform 80ms;
    }

    .tg-card__top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    .tg-card__photo {
        position: relative;
        width: 56px;
        height: 56px;
        flex: 0 0 56px;
    }

    .tg-card__avatar,
    .tg-card__fallback {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        box-shadow: 0 0 0 1px rgba(51, 153, 255, 0.35);
    }

    .tg-card__avatar {
        position: relative;
        z-index: 1;
        object-fit: cover;
        background: #0c1628;
    }

    .tg-card__fallback {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        font-weight: 600;
    }

    .tg-card__photo:has(.tg-card__avatar) .tg-card__fallback {
        display: none;
    }

    .tg-card__type {
        position: absolute;
        right: -4px;
        bottom: -4px;
        z-index: 1;
        display: flex;
        width: 22px;
        height: 22px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #0a1220;
        color: var(--tg-mint);
    }

    .tg-card__type svg {
        width: 14px;
        height: 14px;
    }

    .tg-card__aud {
        margin: 0;
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    .tg-card__aud strong {
        display: block;
        font-size: 22px;
        font-weight: 600;
        line-height: 1.1;
    }

    .tg-card__aud span {
        color: var(--tg-muted);
        font-size: 13px;
    }

    .tg-card__title {
        margin: 14px 0 0;
        max-width: 60ch;
        font-size: 18px;
        font-weight: 600;
        line-height: 1.3;
        text-wrap: balance;
    }

    .tg-card__title a {
        display: -webkit-box;
        overflow: hidden;
        color: inherit;
        text-decoration: none;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .tg-card__user {
        margin: 4px 0 0;
        color: var(--tg-muted);
        font-size: 13px;
    }

    .tg-card__desc {
        display: -webkit-box;
        max-width: 60ch;
        margin: 10px 0 0;
        overflow: hidden;
        color: var(--tg-muted);
        font-size: 14px;
        line-height: 1.5;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .tg-base,
    .tg-card__dau {
        margin-top: auto;
        padding-top: 16px;
    }

    .tg-base {
        padding: 12px;
        border: 1px solid var(--tg-line);
        border-radius: 14px;
        background: rgba(0, 0, 0, 0.22);
    }

    .tg-base__label {
        margin: 0 0 8px;
        color: var(--tg-text);
        font-size: 13px;
    }

    .tg-base dl {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin: 0;
    }

    .tg-base dt {
        color: var(--tg-muted);
        font-size: 13px;
    }

    .tg-base dt::before {
        content: "";
        display: inline-block;
        width: 0.7em;
        height: 0.7em;
        margin-right: 6px;
        border: 1.5px solid currentColor;
        border-radius: 3px;
        vertical-align: -1px;
    }

    .tg-base [data-kind="name"] dt::before {
        border-radius: 50%;
    }

    .tg-base dd {
        margin: 2px 0 0;
        font-size: 22px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
    }

    .tg-base .is-zero dd {
        color: rgba(255, 255, 255, 0.38);
        font-weight: 500;
    }

    .tg-bar {
        display: block;
        height: 4px;
        margin-top: 8px;
        overflow: hidden;
        border-radius: 4px;
        background: rgba(143, 180, 230, 0.16);
    }

    .tg-bar span {
        display: block;
        width: var(--w);
        height: 100%;
        transform: scaleX(1);
        transform-origin: left center;
        background: var(--tg-blue);
    }

    .tg-base [data-kind="name"] .tg-bar span {
        background: var(--tg-mint);
    }

    .tg-motion .tg-bar span {
        transform: scaleX(0);
    }

    .tg-motion .tg-card.is-live .tg-bar span {
        transform: scaleX(1);
        transition: transform 650ms cubic-bezier(.2, .8, .2, 1);
    }

    .tg-motion .tg-count {
        color: transparent;
    }

    .tg-motion .tg-card.is-live .tg-count {
        color: inherit;
    }

    .tg-base__share,
    .tg-card__dau {
        color: var(--tg-muted);
        font-size: 12px;
    }

    .tg-visually-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .tg-card--compact {
        padding: 14px 16px;
    }

    .tg-card--compact .tg-card__desc {
        -webkit-line-clamp: 2;
    }

    .tg-card--compact .tg-card__aud strong {
        font-size: 18px;
    }

    @media (max-width: 767px) {
        .tg-chips--scroll {
            flex-wrap: nowrap;
            overflow-x: auto;
            scrollbar-width: none;
        }
    }

    .tg-sort {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 16px;
        margin: 0 0 18px;
        padding: 0;
        list-style: none;
    }

    .tg-sort a {
        color: var(--tg-muted);
        font-size: 14px;
        text-decoration: none;
    }

    .tg-sort a[aria-current="page"] {
        color: var(--tg-text);
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    .tg-bands {
        position: static;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        margin: 12px 0 4px;
        padding: 0;
        border: 0;
    }

    .tg-bands p {
        width: 100%;
        margin: 0;
        color: var(--tg-muted);
        font-size: 14px;
    }

    .tg-bands label {
        position: relative;
        min-height: 32px;
        padding: 6px 10px;
        border-radius: 999px;
        color: var(--tg-muted);
        font-size: 14px;
        cursor: pointer;
    }

    .tg-bands input {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .tg-bands label:has(:checked) {
        color: var(--tg-text);
        background: rgba(51, 153, 255, 0.18);
    }

    .tg-pager {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        align-items: center;
        margin-top: 18px;
    }

    .tg-pager ol {
        display: flex;
        gap: 6px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .tg-pager a {
        color: inherit;
        text-decoration: none;
    }

    .tg-pager [aria-current="page"] {
        color: var(--tg-blue);
    }

    .tg-card--skeleton {
        min-height: 280px;
        background: linear-gradient(100deg, rgba(255, 255, 255, 0.03) 20%, rgba(255, 255, 255, 0.08) 40%, rgba(255, 255, 255, 0.03) 60%);
        background-size: 200% 100%;
        animation: tg-shimmer 1.4s linear infinite;
    }

    @keyframes tg-shimmer {
        from { background-position: 100% 0; }
        to { background-position: -100% 0; }
    }

    @media (max-width: 639px) {
        .tg-cards {
            grid-template-columns: 1fr;
        }

        .tg-card__photo,
        .tg-card__avatar,
        .tg-card__fallback {
            width: 48px;
            height: 48px;
            flex-basis: 48px;
        }

        .tg-card__desc {
            -webkit-line-clamp: 2;
        }
    }

    @media (max-width: 299px) {
        .tg-base dl {
            grid-template-columns: 1fr;
        }
    }

    @media (hover: hover) and (pointer: fine) {
        .tg-card:hover {
            border-color: rgba(143, 180, 230, 0.4);
        }

        .tg-card:hover::before {
            opacity: 1;
        }

        .tg-card:hover .tg-card__avatar,
        .tg-card:hover .tg-card__fallback {
            box-shadow: 0 0 0 1px rgba(51, 153, 255, 0.7);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .tg-card--skeleton {
            animation: none;
        }

        .tg-card:active {
            transform: none;
        }
    }

    .tg-download {
        display: grid;
        gap: 12px;
        margin: 20px 0;
        padding: 16px;
        border: 1px solid var(--tg-line);
        border-radius: 20px;
    }

    .tg-download h2 {
        margin: 0;
        font-size: 18px;
    }

    .tg-sample__steps {
        margin: 0;
        padding-left: 18px;
        color: var(--tg-muted);
    }

    .tg-choice,
    .tg-sample__formats {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 14px;
        margin: 0;
        padding: 12px;
        border: 1px solid var(--tg-line);
        border-radius: 14px;
    }

    .tg-choice {
        align-items: center;
    }

    .tg-choice legend,
    .tg-choice > span {
        width: 100%;
        padding: 0;
        color: var(--tg-text);
        font-size: 14px;
    }

    .tg-choice label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 36px;
        padding: 0 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.06);
    }

    [data-sample] [hidden] {
        display: none !important;
    }

    .tg-sample__result {
        min-height: 1.4em;
        margin: 0;
        font-weight: 700;
    }

    .tg-sample__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .tg-sample__formats legend {
        padding: 0 6px;
        color: var(--tg-muted);
        font-size: 12px;
    }

    .tg-download input[name="code"] {
        display: block;
        width: 100%;
        max-width: 220px;
        min-height: 52px;
        margin-top: 6px;
        padding: 0 14px;
        border: 1px solid var(--tg-line);
        border-radius: var(--tg-radius-input);
        background: rgba(255, 255, 255, 0.03);
        color: var(--tg-text);
        font: inherit;
        font-size: 16px;
    }

    .tg-download .tg-btn {
        width: fit-content;
    }

    .tg-layout--sheet {
        display: block;
    }

    .tg-layout--sheet .tg-filters-open {
        display: inline-flex;
        margin: 0 0 16px;
    }

    .tg-layout--sheet .tg-filters {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        max-height: min(80vh, 640px);
        overflow: auto;
        transform: translateY(110%);
        background: #0a1220;
        box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.4);
        border-radius: var(--tg-radius-panel) var(--tg-radius-panel) 0 0;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .tg-layout--sheet .tg-filters.is-open {
        transform: none;
    }

    .tg-layout--sheet .tg-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 20;
        background: rgba(0, 0, 0, 0.45);
    }

    .tg-layout--sheet .tg-backdrop[hidden] {
        display: none;
    }

    .tg-search.tg-search-panel {
        position: relative;
        top: auto;
        z-index: 2;
    }

    .tg-search-panel .tg-filters {
        margin-top: 16px;
    }

    .tg-found {
        margin: 16px 0 12px;
        font-size: 20px;
        font-weight: 700;
    }

    .tg-search-result {
        margin-block: clamp(2rem, 0vw, 80px);
    }

    .tg-search-result__intro h2 {
        margin: 0 0 6px;
        font-family: "Bricolage Grotesque", Inter, sans-serif;
        font-size: clamp(26px, 3vw, 32px);
        letter-spacing: -0.03em;
    }

    .tg-search-result__intro p {
        margin: 0 0 16px;
        color: var(--tg-muted);
    }

    .tg-sample-bar {
        position: relative;
        display: grid;
        gap: 22px;
        margin: 0;
        padding: clamp(20px, 3vw, 32px);
        border: 1px solid var(--tg-line);
        border-radius: 22px;
        background:
            linear-gradient(180deg, var(--tg-gold-soft), transparent 84px),
            var(--tg-surface);
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    }

    .tg-sample-bar__head {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        gap: 12px 16px;
    }

    .tg-search-result .tg-found {
        margin: 0;
    }

    .tg-found__label {
        display: block;
        color: var(--tg-muted);
        font-size: 13px;
        font-weight: 500;
        letter-spacing: 0.01em;
    }

    .tg-found__num {
        display: block;
        margin-top: 2px;
        font-size: clamp(32px, 4vw, 44px);
        font-weight: 700;
        letter-spacing: -0.03em;
        line-height: 1.05;
        font-variant-numeric: tabular-nums;
    }

    .tg-sample-bar__badge {
        margin: 0;
        padding: 7px 12px;
        border: 1px solid var(--tg-gold-line);
        border-radius: 999px;
        background: var(--tg-gold-soft);
        color: var(--tg-gold-text);
        font-size: 13px;
        line-height: 1.35;
    }

    .tg-sample-bar__steps {
        display: grid;
        gap: 1rem;
        grid-auto-flow: column;
        align-items: center;
        align-content: center;
    }

    .tg-sample-step {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        min-width: 0;
    }

    .tg-sample-step__name {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        color: var(--tg-text);
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
    }

    .tg-sample-bar legend {
        float: none;
        width: auto;
        padding: 0;
    }

    .tg-sample-step__num {
        display: inline-grid;
        width: 22px;
        height: 22px;
        place-items: center;
        border-radius: 50%;
        background: var(--tg-blue-soft);
        color: var(--tg-text);
        font-size: 12px;
        font-weight: 600;
    }

    .tg-sample-bar fieldset {
        margin: 0;
        padding: 0;
        border: 0;
        min-width: 0;
    }

    .tg-sample-seg {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        margin: 0;
        padding: 4px;
        border: 1px solid var(--tg-line);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.03);
    }

    .tg-sample-bar fieldset label {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        padding: 0 8px;
        border-radius: 12px;
        color: var(--tg-text);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: background-color 180ms ease, color 180ms ease;
    }

    .tg-sample-bar fieldset input {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .tg-sample-bar fieldset label:hover {
        background: var(--tg-blue-soft);
    }

    .tg-sample-bar fieldset label:has(input:checked) {
        background: var(--tg-blue);
        color: var(--tg-on-blue);
    }

    .tg-sample-bar fieldset label:has(input:focus-visible),
    .tg-sample-bar fieldset label:focus-within {
        outline: 2px solid var(--tg-blue);
        outline-offset: 2px;
    }

    .tg-sample-bar__hint,
    .tg-sample-bar__note,
    .tg-sample-bar__field-error {
        margin: 0;
        font-size: 13px;
        line-height: 1.4;
    }

    .tg-sample-bar__hint,
    .tg-sample-bar__note {
        color: var(--tg-muted);
    }

    .tg-sample-bar__note a {
        color: var(--tg-blue);
        text-underline-offset: 2px;
    }

    .tg-sample-bar__field-error {
        color: var(--tg-danger);
    }

    .tg-sample-otp {
        width: 12.5ch;
        max-width: 100%;
        min-height: 52px;
        padding: 0 0.45em 0 0.7em;
        border: 1px solid var(--tg-line);
        border-radius: var(--tg-radius-input);
        background: rgba(255, 255, 255, 0.03);
        color: var(--tg-text);
        font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
        font-size: 22px;
        letter-spacing: 0.32em;
        text-align: center;
    }

    .tg-sample-otp::placeholder {
        color: var(--tg-faint);
        letter-spacing: 0.32em;
    }

    .tg-sample-otp[aria-invalid="true"] {
        border-color: var(--tg-danger-line);
    }

    .tg-sample-bar__submit {
        width: 100%;
        min-height: 52px;
        gap: 8px;
        transition: filter 180ms ease, opacity 180ms ease;
    }

    .tg-sample-bar__submit:hover:not(:disabled) {
        filter: brightness(1.08);
    }

    .tg-sample-bar__submit:active:not(:disabled) {
        filter: brightness(0.96);
    }

    .tg-sample-bar__submit:disabled {
        background: var(--tg-blue-soft);
        color: var(--tg-muted);
        cursor: not-allowed;
    }

    .tg-sample-bar__submit.is-busy:disabled {
        background: var(--tg-blue);
        color: var(--tg-on-blue);
        cursor: progress;
    }

    .tg-sample-bar__spin {
        width: 16px;
        height: 16px;
        border: 2px solid var(--tg-on-blue-faint);
        border-top-color: var(--tg-on-blue);
        border-radius: 50%;
        animation: tg-sample-spin 0.7s linear infinite;
    }

    .tg-sample-bar__alert {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        margin: 0;
        padding: 10px 12px;
        border: 1px solid var(--tg-danger-line);
        border-radius: 12px;
        background: var(--tg-danger-soft);
        color: var(--tg-danger);
        font-size: 14px;
        line-height: 1.4;
    }

    .tg-sample-bar__alert svg {
        flex: 0 0 auto;
        margin-top: 1px;
    }

    .tg-sample-bar__alert p {
        margin: 0;
    }

    .tg-sample-bar__field-error[hidden],
    .tg-sample-bar__alert[hidden],
    .tg-sample-bar__spin[hidden],
    .tg-sample-bar__icon[hidden] {
        display: none;
    }

    @media (max-width: 639px) {
        .tg-sample-bar__steps {
            grid-auto-flow: row;
        }
    }

    @media (min-width: 640px) {
        .tg-sample-seg {
            grid-template-columns: repeat(4, minmax(0, 1fr));
            border-radius: 999px;
        }

        .tg-sample-bar fieldset label {
            border-radius: 999px;
        }
    }

    html.tg-motion .tg-sample-bar.is-armed {
        transition: opacity 400ms ease, transform 400ms ease;
    }

    html.tg-motion .tg-sample-bar.is-armed:not(.is-in) {
        opacity: 0;
        transform: translateY(8px);
    }

    @media (prefers-reduced-motion: reduce) {
        .tg-sample-bar fieldset label,
        .tg-sample-bar__submit,
        html.tg-motion .tg-sample-bar.is-armed,
        html.tg-motion .tg-sample-bar.is-armed:not(.is-in) {
            transition: none;
            opacity: 1;
            transform: none;
        }

        .tg-sample-bar__spin {
            animation: none;
        }
    }

    @keyframes tg-sample-spin {
        to {
            transform: rotate(360deg);
        }
    }

    .tg-export {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        margin-top: 4px;
        padding-top: 12px;
        border-top: 1px solid var(--tg-line);
    }

    .tg-export p {
        flex: 1 1 220px;
        margin: 0;
        color: var(--tg-muted);
        font-size: 14px;
    }

    .tg-filters {
        display: grid;
        gap: 12px;
        padding: 14px;
        border: 1px solid var(--tg-line);
        border-radius: var(--tg-radius-panel);
    }

    .tg-filters h2 {
        margin: 0;
        font-size: 16px;
    }

    .tg-filters fieldset {
        margin: 0;
        padding: 0;
        border: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .tg-filters legend {
        width: 100%;
        margin-bottom: 2px;
        font-size: 12px;
        color: var(--tg-muted);
    }

    .tg-filters fieldset label {
        position: relative;
        display: inline-flex;
        align-items: center;
        min-height: 34px;
        padding: 0 10px;
        border: 1px solid var(--tg-line);
        border-radius: 999px;
        font-size: 13px;
        cursor: pointer;
    }

    .tg-filters fieldset input {
        position: absolute;
        width: 1px;
        height: 1px;
        min-height: 0;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }

    .tg-filters fieldset label:has(input:checked) {
        background: var(--tg-blue);
        border-color: transparent;
        color: #fff;
    }

    .tg-filters__check {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
    }

    .tg-filters__check input {
        width: 18px;
        height: 18px;
        min-height: 0;
    }

    .tg-filters__sort {
        display: grid;
        gap: 6px;
        font-size: 13px;
        color: var(--tg-muted);
    }

    .tg-filters__actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .tg-filters__actions .tg-btn {
        min-height: 40px;
    }

    .tg-filters-open,
    .tg-backdrop {
        display: none;
    }

    .tg-pager {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 16px;
    }

    .tg-pager a {
        min-height: 44px;
        padding: 10px 14px;
        border-radius: var(--tg-radius-row);
        text-decoration: none;
        border: 1px solid var(--tg-line);
    }

    .tg-pager [aria-current="page"] {
        color: #fff;
        background: var(--tg-blue);
        border-color: transparent;
    }

    .tg-empty,
    .tg-error {
        padding: 20px;
        border: 1px solid var(--tg-line);
        border-radius: var(--tg-radius-panel);
    }

    .tg-error {
        border-color: rgba(51, 153, 255, 0.45);
    }

    .tg-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 16px 28px;
        margin: 16px 0;
        padding: 0;
        list-style: none;
    }

    .tg-stat span {
        display: block;
        color: var(--tg-muted);
        font-size: 12px;
    }

    .tg-stat strong {
        font-size: 20px;
        font-weight: 600;
    }

    .tg-crumbs {
        margin: 0 0 12px;
        color: var(--tg-muted);
        font-size: 14px;
    }

    .tg-crumbs a {
        color: inherit;
    }

    .tg-split {
        display: grid;
        grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
        gap: 1.5rem 2rem;
        margin: 2rem 0;
        align-items: start;
    }

    .tg-guide {
        margin: 0 0 20px;
    }

    .tg-guide h2,
    .tg-home h3 {
        font-size: 16px;
        font-weight: 600;
        margin: 16px 0 8px;
    }

    .tg-guide ol,
    .tg-home ol {
        margin: 0;
        padding-left: 1.2em;
        color: var(--tg-muted);
        max-width: 70ch;
    }

    .tg-guide li + li,
    .tg-home li + li {
        margin-top: 6px;
    }

    .tg-home {
        display: grid;
        gap: 8px;
        margin: 8px 0 28px;
    }

    .tg-home__tool {
        display: grid;
        gap: 8px;
        justify-items: start;
        padding: 20px 0 8px;
        border-top: 1px solid var(--tg-line);
    }

    .tg-home__tool h2 {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

    .tg-home__tool p {
        margin: 0;
        max-width: 70ch;
        color: var(--tg-muted);
    }

    .tg-home__tool .tg-btn {
        margin-top: 8px;
    }

    .tg-faq,
    .tg-tools {
        margin: 1rem 0;
    }

    .tg-split .tg-faq,
    .tg-split .tg-tools {
        margin: 0;
    }

    .tg-faq details {
        border-bottom: 1px solid var(--tg-line);
        padding: 8px 0;
    }

    .tg-faq details + details,
    .tg-tools .tg-tool + .tg-tool {
        margin-top: 1rem;
    }

    .tg-faq summary {
        min-height: 44px;
        cursor: pointer;
        font-size: 16px;
    }

    .tg-tools ul,
    .tg-tools {
        list-style: none;
        padding: 0;
    }

    .tg-tools ul {
        margin: 0;
    }

    .tg-tool {
        display: grid;
        grid-template-columns: 24px minmax(0, 1fr);
        column-gap: 10px;
        padding: 10px 0;
        border-bottom: 1px solid var(--tg-line);
    }

    @media (max-width: 800px) {
        .tg-split {
            grid-template-columns: 1fr;
            margin: 1.5rem 0;
        }
    }

    .tg-tool p {
        grid-column: 2;
        margin: 2px 0 0;
        color: var(--tg-muted);
        font-size: 14px;
    }

    .tg-remove {
        margin-top: 12px;
    }

    .tg-remove form {
        display: grid;
        gap: 14px;
        margin-block: 2rem;
    }

    .tg-remove label {
        display: grid;
        gap: 6px;
        color: var(--tg-muted);
        font-size: 14px;
    }

    .tg-remove input:not(.tg-hp):not([type="hidden"]) {
        width: 100%;
        min-height: 52px;
        padding: 0 14px;
        border: 1px solid var(--tg-line);
        border-radius: var(--tg-radius-input);
        background: rgba(255, 255, 255, 0.03);
        color: var(--tg-text);
        font: inherit;
        font-size: 16px;
    }

    .tg-remove .tg-btn {
        width: fit-content;
    }

    .tg-hp {
        position: absolute;
        left: -9999px;
    }

    .tg-toast {
        margin: 12px 0;
        padding: 12px 14px;
        border-radius: var(--tg-radius-row);
        background: rgba(90, 220, 170, 0.12);
        border: 1px solid rgba(90, 220, 170, 0.4);
    }

    .tg-head {
        display: flex;
        gap: 10px;
        align-items: center;
    }
}

@layer tg-tools {
    .tg-kit .tg-block {
        margin: 28px 0;
        padding-top: 12px;
        border-top: 1px solid var(--tg-line);
    }
}

@keyframes tg-rise {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
    .tg-scale__bar {
        animation: none;
    }
}

@media (max-width: 767px) {
    .tg-switch {
        display: block;
    }

    .tg-search__row {
        display: grid;
    }

    .tg-layout {
        display: block;
    }

    .tg-row__main {
        grid-template-columns: 24px minmax(0, 1fr);
    }

    .tg-row__main .tg-ico {
        grid-row: span 2;
    }

    .tg-row__meta {
        grid-column: 2;
        justify-content: flex-start;
    }

    .tg-page.is-enhanced .tg-filters-open {
        display: inline-flex;
        position: sticky;
        bottom: calc(12px + env(safe-area-inset-bottom));
        z-index: 6;
        margin-top: 12px;
    }

    .tg-page.is-enhanced .tg-filters {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        max-height: min(80vh, 640px);
        overflow: auto;
        transform: translateY(110%);
        background: var(--tg-panel);
        box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.4);
        border-radius: var(--tg-radius-panel) var(--tg-radius-panel) 0 0;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .tg-page.is-enhanced .tg-filters.is-open {
        transform: none;
    }

    .tg-page.is-enhanced .tg-search-panel .tg-filters {
        position: static;
        inset: auto;
        transform: none;
        max-height: none;
        box-shadow: none;
    }

    .tg-page.is-enhanced .tg-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 20;
        background: rgba(0, 0, 0, 0.45);
    }

    .tg-page.is-enhanced .tg-backdrop[hidden] {
        display: none;
    }
}

@media (min-width: 768px) {
    .tg-filters-open {
        display: none;
    }

    .tg-layout--sheet .tg-filters-open {
        display: inline-flex;
    }
}

.tg-list-dialog {
    width: min(420px, calc(100% - 32px));
    margin: auto;
    padding: 20px;
    border: 1px solid var(--tg-line);
    border-radius: 20px;
    background: #0a1220;
    color: var(--tg-text);
}

.tg-list-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.tg-list-dialog h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.tg-list-dialog p,
.tg-list-dialog legend {
    color: var(--tg-muted);
}

.tg-list-dialog fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 16px 0;
    padding: 0;
    border: 0;
}

.tg-list-dialog legend {
    width: 100%;
    margin-bottom: 4px;
}

.tg-list-dialog label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tg-list-dialog form > label {
    flex-direction: column;
    align-items: stretch;
}

.tg-list-dialog input[type="text"],
.tg-list-dialog input:not([type="radio"]) {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--tg-line);
    border-radius: 14px;
    background: #070b12;
    color: var(--tg-text);
    font: inherit;
}

.tg-list-dialog__actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.tg-list-dialog__actions button[type="button"] {
    padding: 12px 16px;
    border: 1px solid var(--tg-line);
    border-radius: 14px;
    background: transparent;
    color: var(--tg-text);
    font: inherit;
    cursor: pointer;
}

.tg-people textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 180px;
    padding: 12px 14px;
    border: 1px solid var(--tg-line);
    border-radius: 14px;
    background: #070b12;
    color: var(--tg-text);
    font: inherit;
    font-size: 16px;
    resize: vertical;
}

.tg-main h1 {
    font-family: Inter, InterFallback, system-ui, sans-serif;
}

.tg-page {
    overflow-x: clip;
}

.tg-catalog-hero {
    display: grid;
    gap: 8px 28px;
    align-items: center;
}

.tg-catalog-hero__copy h1 {
    max-width: 16em;
}

.tg-gift {
    position: relative;
    width: min(200px, 58vw);
    margin: 0 auto;
    aspect-ratio: 1;
}

.tg-gift__video,
.tg-gift__webp,
.tg-gift__still {
    display: block;
    width: 100%;
    height: auto;
}

.tg-gift__webp,
.tg-gift__still {
    display: none;
}

.tg-safari .tg-gift__video {
    display: none;
}

.tg-safari .tg-gift__webp {
    display: block;
}

html:not(.tg-motion) .tg-gift__video,
html:not(.tg-motion) .tg-gift__webp {
    display: none;
}

html:not(.tg-motion) .tg-gift__still {
    display: block;
}

.tg-gift__bit {
    position: absolute;
    z-index: 1;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3399ff;
    opacity: 0;
    pointer-events: none;
}

.tg-gift__bit:nth-child(2) {
    background: #5adcaa;
    top: 18%;
    right: 8%;
}

.tg-gift__bit:nth-child(3) {
    top: 62%;
    left: 4%;
}

.tg-gift__bit:nth-child(4) {
    background: #5adcaa;
    right: 14%;
    bottom: 16%;
}

.tg-gift__bit:nth-child(1) {
    top: 8%;
    left: 18%;
}

.tg-motion .tg-gift__bit {
    animation: tg-gift-bit 3.6s linear infinite;
}

.tg-motion .tg-gift__bit:nth-child(2) {
    animation-delay: -0.9s;
}

.tg-motion .tg-gift__bit:nth-child(3) {
    animation-delay: -1.8s;
}

.tg-motion .tg-gift__bit:nth-child(4) {
    animation-delay: -2.7s;
}

@keyframes tg-gift-bit {
    0% {
        opacity: 0;
        transform: translate3d(0, 8px, 0) scale(0.6);
    }
    20% {
        opacity: 0.9;
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -28px, 0) scale(1);
    }
}

@media (min-width: 800px) {
    .tg-catalog-hero {
        grid-template-columns: minmax(0, 1fr) 220px;
    }

    .tg-gift {
        width: 220px;
        margin: 0;
        justify-self: end;
    }
}

.tg-catalog-hero--stage {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 1rem;
}

.tg-catalog-hero--stage .tg-catalog-hero__copy {
    width: 100%;
}

.tg-catalog-hero--stage .tg-catalog-hero__copy h1,
.tg-catalog-hero--stage .tg-lead,
.tg-catalog-hero--stage .tg-guide,
.tg-catalog-hero--stage .tg-guide ol {
    max-width: none;
}

.tg-catalog-hero--stage .tg-gift {
    width: min(420px, 92vw);
    aspect-ratio: auto;
    margin: 4px auto 0;
    justify-self: center;
    overflow: visible;
    background: none;
    border: 0;
}

.tg-catalog-hero--stage .tg-gift__video,
.tg-catalog-hero--stage .tg-gift__webp,
.tg-catalog-hero--stage .tg-gift__still {
    width: min(260px, 72vw);
    margin: 28px auto;
}

.tg-catalog-hero--stage .tg-guide {
    width: 100%;
    margin: 0;
}

.tg-catalog-hero--stage .tg-gift__bit:nth-child(1) {
    top: 6%;
    left: 8%;
}

.tg-catalog-hero--stage .tg-gift__bit:nth-child(2) {
    top: 2%;
    right: 12%;
    left: auto;
}

.tg-catalog-hero--stage .tg-gift__bit:nth-child(3) {
    top: 42%;
    left: 2%;
}

.tg-catalog-hero--stage .tg-gift__bit:nth-child(4) {
    top: auto;
    right: 4%;
    bottom: 16%;
    left: auto;
}

.tg-catalog-hero--stage .tg-gift__bit:nth-child(5) {
    top: 16%;
    left: 22%;
    background: #5adcaa;
}

.tg-catalog-hero--stage .tg-gift__bit:nth-child(6) {
    top: 24%;
    right: 6%;
    background: #3399ff;
}

.tg-catalog-hero--stage .tg-gift__bit:nth-child(7) {
    right: auto;
    bottom: 8%;
    left: 16%;
    background: #5adcaa;
}

.tg-catalog-hero--stage .tg-gift__bit:nth-child(8) {
    top: 62%;
    right: 14%;
    background: #3399ff;
}

.tg-motion .tg-catalog-hero--stage .tg-gift__bit {
    animation-name: tg-gift-drift;
    animation-duration: 4.8s;
}

.tg-motion .tg-catalog-hero--stage .tg-gift__bit:nth-child(5) {
    animation-delay: -1.1s;
}

.tg-motion .tg-catalog-hero--stage .tg-gift__bit:nth-child(6) {
    animation-delay: -2.2s;
}

.tg-motion .tg-catalog-hero--stage .tg-gift__bit:nth-child(7) {
    animation-delay: -3.3s;
}

.tg-motion .tg-catalog-hero--stage .tg-gift__bit:nth-child(8) {
    animation-delay: -4s;
}

@keyframes tg-gift-drift {
    0% {
        opacity: 0;
        transform: translate3d(0, 16px, 0) scale(0.45);
    }
    18% {
        opacity: 0.85;
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -72px, 0) scale(1);
    }
}

@media (min-width: 800px) {
    .tg-catalog-hero--stage {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 28px;
    }

    .tg-catalog-hero--stage .tg-catalog-hero__copy {
        flex: 1 1 auto;
        min-width: 0;
    }

    .tg-catalog-hero--stage .tg-gift {
        flex: 0 0 420px;
        width: 420px;
        margin: 0;
    }

    .tg-catalog-hero--stage .tg-gift__video,
    .tg-catalog-hero--stage .tg-gift__webp,
    .tg-catalog-hero--stage .tg-gift__still {
        width: 320px;
        margin: 48px auto;
    }
}

.tg-search-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(24px, 4vw, 64px);
    margin-bottom: 1rem;
}

.tg-search-hero__copy {
    width: 100%;
    min-width: 0;
}

.tg-search-hero__copy h1,
.tg-search-hero .tg-lead,
.tg-search-hero .tg-guide,
.tg-search-hero .tg-guide ol {
    max-width: none;
}

.tg-search-hero .tg-guide {
    width: 100%;
    margin: 0;
}

.tg-search-hero__slot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.tg-hero-anim {
    position: relative;
    width: clamp(260px, 32vw, 440px);
    aspect-ratio: 1 / 1;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity .9s cubic-bezier(.22, .61, .36, 1), transform .9s cubic-bezier(.22, .61, .36, 1);
    pointer-events: none;
    user-select: none;
}

.tg-hero-anim.is-ready {
    opacity: 1;
    transform: none;
}

.tg-hero-anim::before {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(214, 170, 90, .16), rgba(214, 170, 90, 0) 70%);
    filter: blur(18px);
    z-index: 0;
}

.tg-hero-anim__video,
.tg-hero-anim__img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

.tg-hero-anim__img[hidden] {
    display: none;
}

@media (max-width: 900px) {
    .tg-search-hero {
        grid-template-columns: 1fr;
        row-gap: 24px;
    }

    .tg-search-hero__slot {
        justify-content: center;
        order: 2;
    }

    .tg-hero-anim {
        width: min(72vw, 300px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tg-hero-anim {
        transition: none;
        transform: none;
    }
}

.tg-people-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(24px, 4vw, 64px);
    margin-bottom: 1rem;
}

.tg-people-hero__copy {
    width: 100%;
    min-width: 0;
}

.tg-people-hero__copy h1,
.tg-people-hero .tg-lead,
.tg-people-hero .tg-guide,
.tg-people-hero .tg-guide ol {
    max-width: none;
}

.tg-people-hero .tg-guide {
    width: 100%;
    margin: 0;
}

.tg-people-hero__slot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

@media (max-width: 900px) {
    .tg-people-hero {
        grid-template-columns: 1fr;
        row-gap: 24px;
    }

    .tg-people-hero__slot {
        justify-content: center;
        order: 2;
    }
}

.tg-hero {
    position: relative;
    display: grid;
    grid-template-areas: "copy" "scene" "board";
    gap: 24px;
    padding: 8px 0 4px;
}

.tg-hero__copy {
    grid-area: copy;
}

.tg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 6px 12px;
    border: 1px solid var(--tg-line);
    border-radius: 999px;
    background: #0f1724;
    color: var(--tg-muted);
    font-size: 13px;
}

.tg-eyebrow__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tg-mint);
    box-shadow: 0 0 0 4px rgba(90, 220, 170, 0.16);
}

.tg-hero h1 {
    max-width: 18em;
    font-size: clamp(34px, 5.4vw, 58px);
    text-wrap: balance;
}

.tg-hero__accent {
    color: var(--tg-blue);
}

.tg-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.tg-hero__actions .tg-btn {
    flex: 1 1 auto;
    padding: 0 14px;
    white-space: nowrap;
}

.tg-btn--ghost {
    border: 1px solid var(--tg-line);
    background: #0f1724;
    color: var(--tg-text);
}

.tg-scene {
    --gw: 176px;
    grid-area: scene;
    position: relative;
    display: grid;
    align-content: center;
    justify-items: center;
    min-width: 0;
}

.tg-phone {
    position: relative;
    width: min(280px, 72vw);
}

.tg-phone__frame {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
}

.tg-phone__screen {
    position: absolute;
    z-index: 2;
    left: 2.76%;
    right: 2.55%;
    top: 0.73%;
    bottom: 0.73%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 26px 8px 8px;
    overflow: hidden;
    background: #0b121c;
    border-radius: 15% / 7.1%;
    color: #fff;
}

.tg-phone__island {
    position: absolute;
    z-index: 1;
    top: 1.2%;
    left: 50%;
    width: 34%;
    height: 2.6%;
    min-height: 11px;
    max-height: 16px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #070b12;
}

.tg-phone__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.tg-phone__free {
    padding: 1px 6px;
    border-radius: 999px;
    background: #0a1220;
    color: var(--tg-mint);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.4;
}

.tg-phone__tabs {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 0;
}

.tg-phone__tabs span {
    padding: 2px 6px;
    border-radius: 999px;
    color: var(--tg-muted);
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
}

.tg-phone__tabs span.is-on {
    background: var(--tg-blue);
    color: #0a1220;
    font-weight: 600;
}

.tg-phone__card {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 6px;
    border-radius: 12px;
    background: #070b12;
}

.tg-phone__label {
    margin: 0;
    color: var(--tg-muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.tg-phone__sample {
    justify-self: start;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--tg-blue);
    color: #0a1220;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.tg-phone__file {
    margin: auto 0 0;
    color: var(--tg-muted);
    font-size: 10px;
    line-height: 1.3;
    text-align: center;
}

.tg-phone__formats {
    margin: 0;
    color: var(--tg-muted);
    font-size: 10px;
    line-height: 1.3;
    text-align: center;
}

.tg-phone__gift {
    display: block;
    width: 112px;
    height: auto;
    margin: 6px auto 0;
    pointer-events: none;
    user-select: none;
}

.tg-scene__rows {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

.tg-scene__row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 36px;
    padding: 4px 6px;
    border-radius: 10px;
    background: #0f1724;
}

.tg-phone .tg-ava {
    flex: none;
}

.tg-phone .tg-ava,
.tg-phone .tg-ava img,
.tg-phone .tg-ava__fallback {
    width: 28px;
    height: 28px;
}

.tg-phone .tg-ava img,
.tg-phone .tg-ava__fallback {
    border-radius: 8px;
}

.tg-scene__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.tg-scene__title {
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tg-scene__meta {
    overflow: hidden;
    color: var(--tg-muted);
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tg-scene__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.tg-scene__chips span {
    padding: 0 5px;
    border: 1px solid var(--tg-line);
    border-radius: 999px;
    color: var(--tg-muted);
    font-size: 10px;
    line-height: 1.5;
    white-space: nowrap;
}

.tg-scene__chips span:last-child {
    border-color: rgba(90, 220, 170, 0.4);
    color: var(--tg-mint);
}

.tg-glass,
.tg-scene__spot {
    position: absolute;
    pointer-events: none;
}

.tg-scene__spot {
    z-index: 4;
    left: calc(50% - var(--gw) * 0.21);
    top: calc(50% - var(--gw) * 0.21);
    width: calc(var(--gw) * 0.42);
    height: calc(var(--gw) * 0.42);
    border-radius: 50%;
    backdrop-filter: brightness(1.7) saturate(1.3);
    -webkit-backdrop-filter: brightness(1.7) saturate(1.3);
}

.tg-glass {
    z-index: 5;
    left: calc(50% - var(--gw) * 0.39);
    top: calc(50% - var(--gw) * 0.293);
    width: var(--gw);
    height: auto;
    mix-blend-mode: screen;
    user-select: none;
}

.tg-hero .tg-lead,
.tg-about p {
    max-width: 70ch;
}

.tg-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 14px 0 0;
}

.tg-examples span {
    color: var(--tg-muted);
    font-size: 14px;
}

.tg-examples a,
.tg-sizes a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--tg-line);
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
}

.tg-board {
    grid-area: board;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-content: start;
}

.tg-board__cell {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--tg-line);
    border-radius: 16px;
    background: #0f1724;
}

.tg-board__cell:first-child .tg-board__n {
    color: var(--tg-blue);
}

.tg-board__n {
    display: grid;
    margin: 0;
    font-size: clamp(26px, 3.4vw, 34px);
    font-weight: 600;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.tg-board__ghost,
.tg-board__live {
    grid-area: 1 / 1;
}

.tg-board__ghost {
    visibility: hidden;
}

.tg-board__label,
.tg-board__date {
    margin: 4px 0 0;
    color: var(--tg-muted);
    font-size: 14px;
}

.tg-board__date {
    grid-column: 1 / -1;
    font-size: 12px;
}

.tg-entries {
    display: grid;
    gap: 16px;
    margin: 28px 0;
}

.tg-entry {
    position: relative;
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: 22px;
    border: 1px solid var(--tg-line);
    border-radius: 20px;
    overflow: hidden;
}

.tg-entry--catalog {
    background: rgba(51, 153, 255, 0.08);
    border-color: rgba(51, 153, 255, 0.38);
}

.tg-entry h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 28px;
}

.tg-entry h2 .tg-ico {
    flex: none;
    color: #3399ff;
}

.tg-entry .tg-btn {
    margin-top: auto;
}

.tg-entry p {
    margin: 0;
    max-width: 70ch;
    color: var(--tg-muted);
}

.tg-entry::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(180px circle at var(--sx, 50%) var(--sy, 0%), rgba(51, 153, 255, 0.18), transparent 70%);
    opacity: 0;
    pointer-events: none;
}

.tg-preview,
.tg-lines ol,
.tg-ranks ol,
.tg-steps ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tg-preview {
    display: grid;
    gap: 12px;
    width: 100%;
}

.tg-preview__item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 2px 12px;
    align-items: center;
}

.tg-preview__title,
.tg-preview__meta {
    margin: 0;
}

.tg-preview__title {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.tg-preview__title a {
    color: inherit;
    text-decoration: none;
}

.tg-preview__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--tg-muted);
    font-size: 14px;
}

.tg-ava {
    position: relative;
    width: 40px;
    height: 40px;
    grid-row: span 2;
}

.tg-ava img,
.tg-ava__fallback {
    position: absolute;
    inset: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.tg-ava img {
    object-fit: cover;
    z-index: 1;
}

.tg-ava__fallback {
    display: grid;
    place-items: center;
    background: var(--tg-blue);
    color: #041018;
    font-weight: 600;
}

.tg-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tg-sizes a span {
    color: var(--tg-muted);
    margin-left: 6px;
}

.tg-steps {
    margin: 8px 0 28px;
}

.tg-steps ol {
    display: grid;
    gap: 18px;
    counter-reset: tg-step;
}

.tg-steps li {
    position: relative;
    min-height: 44px;
    padding-left: 40px;
    counter-increment: tg-step;
}

.tg-steps li::before {
    content: counter(tg-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--tg-line);
    border-radius: 999px;
    font-size: 14px;
}

.tg-steps li::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 32px;
    bottom: -16px;
    width: 1px;
    background: var(--tg-line);
}

.tg-steps li:last-child::after {
    display: none;
}

.tg-steps a {
    color: inherit;
}

.tg-steps__limit {
    margin: 16px 0 0;
    color: var(--tg-muted);
    font-size: 14px;
}

.tg-ranks,
.tg-lines {
    margin: 8px 0 28px;
}

.tg-rank {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--tg-line);
}

.tg-rank__bar {
    grid-column: 1 / -1;
    height: 2px;
    background: rgba(143, 180, 230, 0.16);
}

.tg-rank__bar > span {
    display: block;
    height: 2px;
    background: var(--tg-blue);
    transform: scaleX(var(--share, 1));
    transform-origin: left center;
}

.tg-rank__n {
    font-variant-numeric: tabular-nums;
}

.tg-line {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 2px 12px;
    align-items: center;
    min-height: 64px;
    padding: 10px 0;
    border-bottom: 1px solid var(--tg-line);
}

.tg-line h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.tg-line h3 a {
    color: inherit;
    text-decoration: none;
}

.tg-line h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.tg-line__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0;
    color: var(--tg-muted);
    font-size: 14px;
}

.tg-about p {
    color: var(--tg-muted);
}

.tg-data {
    margin: 8px 0 0;
    color: var(--tg-muted);
    font-size: 12px;
}

.tg-data a {
    color: inherit;
}

.tg-motion .tg-glass,
.tg-motion .tg-scene__spot {
    animation: tg-glass-seek 16s linear infinite;
}

@keyframes tg-glass-seek {
    0%,
    100% {
        transform: translate3d(-20px, 80px, 0);
    }
    4.16667% {
        transform: translate3d(26.8px, 84px, 0);
    }
    8.33333% {
        transform: translate3d(68.9px, 71.5px, 0);
    }
    12.5% {
        transform: translate3d(102.1px, 41.7px, 0);
    }
    16.6667% {
        transform: translate3d(123.8px, -3.9px, 0);
    }
    20.8333% {
        transform: translate3d(132.9px, -61.7px, 0);
    }
    25% {
        transform: translate3d(130px, -126px, 0);
    }
    29.1667% {
        transform: translate3d(116.9px, -190.3px, 0);
    }
    33.3333% {
        transform: translate3d(96px, -248.1px, 0);
    }
    37.5% {
        transform: translate3d(70.1px, -293.7px, 0);
    }
    41.6667% {
        transform: translate3d(41.1px, -323.5px, 0);
    }
    45.8333% {
        transform: translate3d(10.8px, -336px, 0);
    }
    50% {
        transform: translate3d(-20px, -332px, 0);
    }
    54.1667% {
        transform: translate3d(-50.8px, -314px, 0);
    }
    58.3333% {
        transform: translate3d(-81.1px, -285.3px, 0);
    }
    62.5% {
        transform: translate3d(-110.1px, -249.7px, 0);
    }
    66.6667% {
        transform: translate3d(-136px, -209.9px, 0);
    }
    70.8333% {
        transform: translate3d(-156.9px, -168.3px, 0);
    }
    75% {
        transform: translate3d(-170px, -126px, 0);
    }
    79.1667% {
        transform: translate3d(-172.9px, -83.7px, 0);
    }
    83.3333% {
        transform: translate3d(-163.8px, -42.1px, 0);
    }
    87.5% {
        transform: translate3d(-142.1px, -2.3px, 0);
    }
    91.6667% {
        transform: translate3d(-108.9px, 33.3px, 0);
    }
    95.8333% {
        transform: translate3d(-66.8px, 62px, 0);
    }
}

.tg-motion .tg-rank__bar > span {
    transform: scaleX(0);
}

.tg-motion .tg-rank.is-in .tg-rank__bar > span {
    transform: scaleX(var(--share, 1));
    transition: transform 700ms linear;
}

.tg-motion .tg-entry::after {
    transition: opacity 160ms linear;
}

.tg-motion .tg-btn:active {
    transform: scale(0.99);
}

.tg-motion .tg-suggest:not([hidden]) {
    animation: tg-pop 120ms linear;
}

.tg-motion .tg-faq details[open] p {
    animation: tg-pop 120ms linear;
}

@keyframes tg-pop {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (hover: hover) and (pointer: fine) {
    .tg-motion .tg-entry:hover::after {
        opacity: 1;
    }

    .tg-motion .tg-entry:hover {
        border-color: rgba(143, 180, 230, 0.55);
    }
}

@media (min-width: 900px) {
    .tg-hero {
        grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
        grid-template-areas: "copy scene" "board scene";
        column-gap: 48px;
        align-items: start;
        padding: 24px 0 20px;
    }

    .tg-hero__actions .tg-btn {
        flex: 0 0 auto;
        padding: 0 18px;
    }

    .tg-scene {
        --gw: 200px;
        align-self: stretch;
    }

    .tg-phone__gift {
        width: 128px;
    }
}

@media (min-width: 900px) {
    .tg-entries {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
    }

    .tg-entry h2 {
        font-size: 22px;
    }

    .tg-steps ol {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .tg-steps li {
        padding: 40px 16px 0 0;
    }

    .tg-steps li::after {
        left: 36px;
        right: 12px;
        top: 13px;
        bottom: auto;
        width: auto;
        height: 1px;
    }
}

@media (max-width: 359px) {
    .tg-search__row,
    .tg-board {
        grid-template-columns: 1fr;
    }

    .tg-search__row {
        display: grid;
    }
}
