/* /var/www/bambu.su/public/assets/css/bambu.css */
/* Последнее изменение: 2026-11-16 17:35 */
/* Причина: меню слайсеров и блок профилей печати */
/* Автор изменений: AndyBrok */

@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/assets/fonts/unbounded-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/assets/fonts/unbounded-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: 'Onest';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/onest-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Onest';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/onest-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;
}

/* ---------- Токены ---------- */

:root,
[data-theme="light"] {
    color-scheme: light;
    --bg-ground: #f2f5f1;
    --bg-surface: #ffffff;
    --bg-elevated: #edf1eb;
    --bg-input: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.86);
    --bg-media: #e6ebe4;
    --border-subtle: #e1e7df;
    --border-strong: #c8d1c5;
    --text-primary: #16201a;
    --text-secondary: #46544b;
    --text-muted: #66736a;
    --accent: #088540;
    --accent-hover: #066f36;
    --accent-text: #07793a;
    --accent-ink: #ffffff;
    --accent-soft: rgba(8, 133, 64, 0.10);
    --hot: #ff6b2c;
    --gold-pro: #9a5b00;
    --gold-ink: #2b1a00;
    --gold-soft: rgba(245, 168, 28, 0.16);
    --gold-metal-1: #7a4a00;
    --gold-metal-2: #c4890d;
    --gold-metal-3: #fff4c8;
    --gold-metal-4: #e8b23a;
    --blue-market: #1f5fe0;
    --blue-soft: rgba(31, 95, 224, 0.10);
    --danger: #c62828;
    --hero-from: #e4f6ea;
    --hero-to: #fff1e2;
    --pro-from: #fff6dc;
    --pro-to: #ffe9c2;
    --shadow-1: 0 1px 2px rgba(22, 40, 28, 0.06), 0 2px 8px rgba(22, 40, 28, 0.05);
    --shadow-2: 0 2px 4px rgba(22, 40, 28, 0.06), 0 14px 30px -8px rgba(22, 40, 28, 0.20);
    --shadow-3: 0 4px 8px rgba(22, 40, 28, 0.08), 0 28px 50px -14px rgba(22, 40, 28, 0.30);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --header-h: 64px;
    --rail-w: 284px;
    --font-sans: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Unbounded', 'Onest', -apple-system, 'Segoe UI', sans-serif;
    --font-mono: var(--font-sans);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-ground: #0f1412;
    --bg-surface: #171d1a;
    --bg-elevated: #212924;
    --bg-input: #121815;
    --bg-header: rgba(15, 20, 18, 0.84);
    --bg-media: #0b0f0d;
    --border-subtle: #27312c;
    --border-strong: #3a4740;
    --text-primary: #eef3ef;
    --text-secondary: #b3c0b8;
    --text-muted: #8d9b92;
    --accent: #2fd673;
    --accent-hover: #4be389;
    --accent-text: #45dc82;
    --accent-ink: #04220f;
    --accent-soft: rgba(47, 214, 115, 0.13);
    --hot: #ff8a50;
    --gold-pro: #ffc94a;
    --gold-ink: #2b1a00;
    --gold-soft: rgba(255, 201, 74, 0.14);
    --gold-metal-1: #e0a020;
    --gold-metal-2: #ffe7a3;
    --gold-metal-3: #fffdf4;
    --gold-metal-4: #ffd56a;
    --blue-market: #6aa8ff;
    --blue-soft: rgba(106, 168, 255, 0.14);
    --danger: #ff7b72;
    --hero-from: #14251b;
    --hero-to: #241b12;
    --pro-from: #2a2110;
    --pro-to: #1d1a14;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.35), 0 14px 30px -8px rgba(0, 0, 0, 0.60);
    --shadow-3: 0 4px 8px rgba(0, 0, 0, 0.40), 0 28px 50px -14px rgba(0, 0, 0, 0.75);
}

/* ---------- База ---------- */

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

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-ground);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: clip;
}

h1, h2, h3 {
    text-wrap: balance;
}

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

a[href],
button,
summary,
select,
label[for],
input[type="checkbox"],
input[type="radio"],
[role="button"],
[role="tab"] {
    cursor: pointer;
}

button {
    font-family: inherit;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

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

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

.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;
}

.mono {
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
}

.container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Шапка ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--bg-header);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--header-h);
    max-width: none;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15.5px;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.brand-logo__zone {
    color: var(--accent-text);
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: linear-gradient(150deg, #1fc468 0%, #088540 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px -2px rgba(8, 133, 64, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-mark__svg {
    display: block;
    height: 23px;
    width: auto;
}

[data-theme="dark"] .brand-mark {
    background: linear-gradient(150deg, #4be389 0%, #1fb25e 100%);
    color: #04220f;
    box-shadow: 0 4px 12px -2px rgba(47, 214, 115, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.40);
}

.brand-zone {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

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

.nav-link {
    padding: 8px 13px;
    border-radius: 99px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.nav-link.is-active {
    color: var(--accent-text);
    background: var(--accent-soft);
}

.nav-link.nav-link--pro {
    position: relative;
    z-index: 0;
    font-weight: 700;
    color: transparent;
    background-image: linear-gradient(
        105deg,
        var(--gold-metal-1) 0%,
        var(--gold-metal-2) 30%,
        var(--gold-metal-3) 46%,
        var(--gold-metal-4) 52%,
        var(--gold-metal-2) 66%,
        var(--gold-metal-1) 100%
    );
    background-size: 220% 100%;
    background-position: 0% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: bambu-gold-flow 2.8s linear infinite;
}

.nav-link.nav-link--pro::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: transparent;
    z-index: -1;
    transition: background 0.15s;
}

.nav-link.nav-link--pro:hover,
.nav-link.nav-link--pro.is-active {
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.nav-link.nav-link--pro:hover::before,
.nav-link.nav-link--pro.is-active::before {
    background: var(--gold-soft);
}

@keyframes bambu-gold-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 220% 50%; }
}

.header-search {
    flex: 1;
    max-width: 480px;
    margin-left: auto;
    position: relative;
}

.header-search input {
    width: 100%;
    height: 42px;
    padding: 0 46px 0 18px;
    background: var(--bg-elevated);
    border: 1px solid transparent;
    border-radius: 99px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search input:focus {
    outline: none;
    background: var(--bg-input);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.header-search button {
    position: absolute;
    right: 5px;
    top: 5px;
    height: 32px;
    width: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-search button:hover {
    color: var(--accent-text);
    background: var(--accent-soft);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.icon-btn__dot {
    position: absolute;
    top: 3px;
    right: 1px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 99px;
    background: var(--hot);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg-surface);
}

.theme-icon--moon,
[data-theme="dark"] .theme-icon--sun {
    display: none;
}

[data-theme="dark"] .theme-icon--moon {
    display: block;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 4px 14px 4px 5px;
    border-radius: 99px;
    background: var(--bg-elevated);
    font-weight: 600;
    font-size: 13.5px;
    max-width: 190px;
}

.user-chip:hover {
    box-shadow: inset 0 0 0 1px var(--border-strong);
}

.user-chip__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-menu-toggle {
    display: none;
}

/* ---------- Каркас с сайдбаром ---------- */

.app-shell {
    display: block;
}

.app-main {
    min-width: 0;
}

.side-rail {
    display: none;
}

.drawer-backdrop {
    display: none;
}

.rail-scroll {
    padding: 16px 12px 24px;
}

.rail-group + .rail-group {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.rail-title {
    margin: 0 0 6px;
    padding: 0 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.rail-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 5px 10px 5px 6px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    transition: background 0.15s, color 0.15s;
}

.rail-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.rail-item.is-active {
    background: var(--accent-soft);
    color: var(--text-primary);
    font-weight: 650;
}

.rail-item.is-empty:not(.is-active) {
    color: var(--text-muted);
}

.rail-item__icon {
    --fil: var(--accent-text);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fil);
    background: color-mix(in srgb, var(--fil) 13%, transparent);
    transition: transform 0.18s;
}

.rail-item:hover .rail-item__icon {
    transform: scale(1.08) rotate(-4deg);
}

.rail-item.is-active .rail-item__icon {
    background: var(--fil);
    color: #ffffff;
    box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--fil) 70%, transparent);
}

.rail-item__label {
    flex: 1;
    min-width: 0;
}

.rail-item__cnt {
    flex-shrink: 0;
    min-width: 24px;
    padding: 1px 7px;
    border-radius: 99px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.rail-item:hover .rail-item__cnt,
.rail-item.is-active .rail-item__cnt {
    background: var(--bg-surface);
}

.rail-promo {
    margin-top: 18px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
    border: 1px solid var(--border-subtle);
}

.rail-promo__title {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 14.5px;
}

.rail-promo__text {
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.rail-only-mobile {
    display: none;
}

@media (min-width: 1101px) {
    .app-shell--rail {
        display: grid;
        grid-template-columns: var(--rail-w) minmax(0, 1fr);
    }

    .app-shell--rail .side-rail {
        display: block;
        position: sticky;
        top: var(--header-h);
        height: calc(100vh - var(--header-h));
        height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        background: var(--bg-surface);
        border-right: 1px solid var(--border-subtle);
    }

    .app-shell--rail .container {
        max-width: 1560px;
        padding: 0 32px;
    }
}

@media (max-width: 1100px) {
    .side-rail {
        display: block;
        position: fixed;
        z-index: 120;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(320px, 86vw);
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--bg-surface);
        box-shadow: var(--shadow-3);
        transform: translateX(-104%);
        visibility: hidden;
        transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.24s;
    }

    .side-rail.is-open {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
    }

    .side-rail.is-open + .drawer-backdrop {
        display: block;
        position: fixed;
        z-index: 110;
        inset: 0;
        border: 0;
        padding: 0;
        background: rgba(10, 18, 13, 0.5);
    }

    .rail-only-mobile {
        display: block;
    }

    .rail-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 12px 0 18px;
    }
}

@media (min-width: 1101px) {
    .rail-head {
        display: none;
    }
}

/* ---------- Кнопки ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 99px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--accent) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 10px 20px -8px color-mix(in srgb, var(--accent) 90%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-secondary {
    background: var(--bg-surface);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background: var(--bg-elevated);
}

.btn-gold {
    background: linear-gradient(160deg, #ffd45e 0%, #f5a81c 100%);
    color: var(--gold-ink);
    font-weight: 700;
    box-shadow: 0 8px 18px -8px rgba(245, 168, 28, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-gold:hover {
    filter: brightness(1.05);
}

.btn-danger {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    border-color: color-mix(in srgb, var(--danger) 45%, transparent);
    color: var(--danger);
}

.btn-sm {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
}

.btn-lg {
    min-height: 50px;
    padding: 0 26px;
    font-size: 15.5px;
}

.btn-block {
    width: 100%;
}

/* ---------- Главная: герой ---------- */

.hero {
    position: relative;
    overflow: hidden;
    margin-top: 24px;
    padding: 44px 44px 40px;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, var(--hero-from) 0%, var(--hero-to) 100%);
    box-shadow: var(--shadow-1);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

/* Слои печати: фирменный мотив, горизонтальные линии как на FDM-детали */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent 0 6px, color-mix(in srgb, var(--accent) 9%, transparent) 6px 7px);
    -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
    mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
    pointer-events: none;
}

.hero > * {
    position: relative;
}

.hero__title {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(25px, 2.7vw, 40px);
    line-height: 1.14;
    letter-spacing: -0.02em;
}

.hero__sub {
    margin: 0 0 24px;
    max-width: 520px;
    color: var(--text-secondary);
    font-size: 16.5px;
    line-height: 1.5;
}

.hero-search {
    display: flex;
    align-items: center;
    max-width: 540px;
    padding: 6px 6px 6px 22px;
    border-radius: 99px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-2);
    border: 1px solid transparent;
    transition: border-color 0.15s;
}

.hero-search:focus-within {
    border-color: var(--accent);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    height: 46px;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 16px;
}

.hero-search input:focus {
    outline: none;
}

.hero-search input::placeholder {
    color: var(--text-muted);
}

.quick-bed-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 18px;
}

.hero-fan {
    position: relative;
    width: 100%;
    max-width: 470px;
    height: 310px;
    margin: 0 auto;
}

.hero-fan__card {
    position: absolute;
    top: var(--y, 0);
    left: var(--x, 0);
    width: 44%;
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    overflow: hidden;
    background: var(--bg-media);
    border: 4px solid var(--bg-surface);
    box-shadow: var(--shadow-3);
    transform: rotate(var(--r, 0deg));
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: fan-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    animation-delay: var(--d, 0s);
}

.hero-fan__card:hover,
.hero-fan__card:focus-visible {
    z-index: 5;
    transform: rotate(0deg) translateY(-8px) scale(1.04);
}

.hero-fan__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-fan__cap {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px 12px 10px;
    background: linear-gradient(180deg, transparent, rgba(8, 14, 10, 0.82));
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.25;
}

.hero-fan__cap span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes fan-in {
    from {
        transform: translateY(26px) rotate(0deg) scale(0.92);
        opacity: 0;
    }
}

/* Совместимость со старыми блоками главной */
.workbench-strip {
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 28px 0 24px;
}

.workbench-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 28px;
    align-items: center;
}

.workbench-title {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 27px;
    line-height: 1.2;
    font-weight: 700;
}

.workbench-sub {
    margin: 0 0 18px;
    color: var(--text-secondary);
    max-width: 640px;
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    padding: 16px 18px;
}

.kpi-cell__val {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
}

.kpi-cell__lbl {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---------- Чипы, теги, категории ---------- */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 5px 14px;
    border-radius: 99px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 550;
    transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}

.chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: var(--shadow-1);
}

.chip.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
}

.chip--tag {
    min-height: 32px;
    padding: 3px 12px;
    font-size: 13px;
    background: transparent;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 20px 0 0;
}

.tag-row__label {
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 2px;
}

.cat-scroller {
    display: none;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 0 6px;
    scrollbar-width: none;
}

.cat-scroller::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 7px 15px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 99px;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}

.cat-pill:hover, .cat-pill.is-active {
    border-color: var(--accent);
    color: var(--accent-text);
}

.cat-pill__cnt {
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* ---------- Секции ---------- */

.section-block {
    padding: 34px 0 6px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.section-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

.section-title__count {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 6px;
}

.section-link {
    font-size: 14px;
    color: var(--accent-text);
    font-weight: 650;
}

.section-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Сетка и карточка модели ---------- */

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    gap: 20px;
}

.models-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.model-card {
    position: relative;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-1);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s;
}

.model-card:hover,
.model-card:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2);
}

.model-card__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--bg-media);
    overflow: hidden;
}

.model-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.model-card:hover .model-card__media img {
    transform: scale(1.05);
}

.model-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    background: repeating-linear-gradient(0deg, transparent 0 6px, color-mix(in srgb, var(--text-muted) 10%, transparent) 6px 7px);
}

.model-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
    pointer-events: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.3;
}

.badge--free {
    background: rgba(255, 255, 255, 0.92);
    color: #16201a;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.badge--premium {
    background: linear-gradient(160deg, #ffd45e, #f5a81c);
    color: #2b1a00;
    box-shadow: 0 2px 6px rgba(120, 70, 0, 0.35);
}

.badge--paid {
    background: #1f5fe0;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 50, 140, 0.4);
    font-variant-numeric: tabular-nums;
}

.badge--spec {
    background: rgba(10, 18, 13, 0.62);
    color: #ffffff;
    font-weight: 600;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.model-card__lock-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 22px 12px 9px;
    background: linear-gradient(180deg, transparent, rgba(20, 12, 0, 0.86));
    font-size: 12px;
    font-weight: 600;
    color: #ffd45e;
    display: flex;
    align-items: center;
    gap: 6px;
}

.model-card__body {
    padding: 13px 15px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}

.model-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.model-card__title a:hover {
    color: var(--accent-text);
}

.model-card__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.card-tag {
    padding: 1px 8px;
    border-radius: 99px;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 11.5px;
    font-weight: 650;
}

.model-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 9px;
    font-size: 13px;
    color: var(--text-secondary);
}

.author-inline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.author-inline:hover .author-inline__name {
    color: var(--accent-text);
}

.author-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.avatar {
    --rank: #94a3b8;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--rank) 24%, var(--bg-surface));
    box-shadow: inset 0 0 0 1.5px var(--rank);
    color: var(--text-primary);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
}

.avatar--lg {
    width: 46px;
    height: 46px;
    font-size: 18px;
    box-shadow: inset 0 0 0 2px var(--rank);
}

.author-inline__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-counters {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.card-counters span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---------- Маркетплейс на главной, блок PRO, мейкеры ---------- */

.market-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.market-spec-row {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    padding: 12px;
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s;
}

.market-spec-row:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
}

.market-spec-row__thumb {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-media);
}

.market-spec-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-spec-row__price {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--blue-market);
}

.market-spec-row__title {
    margin: 4px 0 8px;
    font-size: 14.5px;
    font-weight: 650;
    line-height: 1.32;
}

.market-spec-row__title a:hover {
    color: var(--accent-text);
}

.spec-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.spec-pill {
    padding: 2px 9px;
    border-radius: 99px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 550;
    font-variant-numeric: tabular-nums;
}

.pro-club-split {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, var(--pro-from), var(--pro-to));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    padding: 32px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 28px;
    align-items: center;
}

.pro-club-split::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent 0 6px, rgba(245, 168, 28, 0.10) 6px 7px);
    -webkit-mask-image: linear-gradient(260deg, transparent 40%, #000 100%);
    mask-image: linear-gradient(260deg, transparent 40%, #000 100%);
    pointer-events: none;
}

.pro-club-split > * {
    position: relative;
}

.pro-club-split__title {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.pro-club-split__text {
    margin: 0 0 18px;
    color: var(--text-secondary);
    font-size: 15px;
}

.makers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.maker-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    box-shadow: var(--shadow-1);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s;
}

.maker-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
}

.maker-card__name {
    font-weight: 700;
    line-height: 1.25;
}

.maker-card__rank {
    font-size: 13px;
    font-weight: 600;
}

.maker-card__stats {
    font-size: 12.5px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.locked-hero-box {
    max-width: 960px;
    margin: 0 auto 28px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

/* ---------- Каталог: вкладки и фильтры ---------- */

.catalog-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding-top: 26px;
    margin-bottom: 16px;
}

.catalog-head__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.catalog-head__count {
    color: var(--text-muted);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.sort-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sort-tabs::-webkit-scrollbar {
    display: none;
}

.sort-tab {
    position: relative;
    padding: 9px 14px;
    border-radius: 99px;
    color: var(--text-secondary);
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.sort-tab:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.sort-tab.is-active {
    background: var(--text-primary);
    color: var(--bg-surface);
}

.segmented {
    display: inline-flex;
    padding: 4px;
    border-radius: 99px;
    background: var(--bg-elevated);
}

.segmented a {
    padding: 6px 14px;
    border-radius: 99px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}

.segmented a:hover {
    color: var(--text-primary);
}

.segmented a.is-active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-1);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    padding: 12px 16px;
    margin-bottom: 22px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    box-shadow: var(--shadow-1);
}

.filter-bar__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.filter-bar__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 2px;
}

.filter-bar .chip {
    min-height: 32px;
    padding: 3px 12px;
    font-size: 13px;
    background: var(--bg-ground);
    border-color: transparent;
}

.filter-bar .chip:hover {
    border-color: var(--accent);
    box-shadow: none;
}

.filter-bar .chip.is-active {
    background: var(--accent);
    color: var(--accent-ink);
}

.filter-bar__reset {
    margin-left: auto;
    font-size: 13.5px;
    font-weight: 650;
    color: var(--accent-text);
}

.filter-bar__reset:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.empty-state {
    padding: 56px 24px;
    text-align: center;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    box-shadow: var(--shadow-1);
}

.empty-state__title {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 650;
}

.empty-state__text {
    margin: 0 auto 18px;
    max-width: 420px;
    color: var(--text-secondary);
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 32px 0 8px;
}

.pager a {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    box-shadow: var(--shadow-1);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pager a:hover {
    color: var(--accent-text);
}

.pager a.is-active {
    background: var(--accent);
    color: var(--accent-ink);
}

/* Старые формы фильтров (Маркетплейс) */
.filter-panel {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    padding: 18px;
    margin-bottom: 22px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.filter-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13.5px;
    color: var(--text-secondary);
}

.filter-checks input[type="checkbox"],
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--accent);
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input, select.input, textarea.input {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus, select.input:focus, textarea.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

textarea.input {
    min-height: 110px;
    padding: 10px 14px;
    resize: vertical;
}

/* ---------- Карточка модели (детальная) ---------- */

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    gap: 24px;
    padding: 24px 0 40px;
}

.stage-box {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.stage-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.stage-tab-group {
    display: flex;
    gap: 6px;
}

.stage-viewport {
    position: relative;
    width: 100%;
    height: 480px;
    background: var(--bg-media);
}

.stage-viewport img.main-render {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.viewer3d-canvas-wrap {
    position: absolute;
    inset: 0;
    display: none;
    background: #0b0f0d;
}

.viewer3d-canvas-wrap.is-active {
    display: block;
}

.viewer3d-toolbar {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(12, 18, 14, 0.86);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #eef3ef;
    border-radius: 14px;
    font-size: 12.5px;
}

.passport-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    padding: 20px;
    margin-bottom: 16px;
}

.spec-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 14px 0;
}

.spec-cell {
    padding: 10px 13px;
    background: var(--bg-ground);
    border-radius: var(--radius-sm);
}

.spec-cell__k {
    font-size: 12px;
    color: var(--text-muted);
}

.spec-cell__v {
    font-size: 14.5px;
    font-weight: 650;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.spool-calc {
    background: var(--bg-ground);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 14px;
}

.spool-calc__result {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

/* ---------- Кабинет, админка, таблицы ---------- */

.workspace-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    padding: 24px 0 48px;
}

.side-menu {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    padding: 10px;
    height: fit-content;
}

.side-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 550;
}

.side-menu a:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.side-menu a.is-active {
    background: var(--accent-soft);
    color: var(--accent-text);
    font-weight: 650;
}

.panel-box {
    background: var(--bg-surface);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    padding: 22px;
    margin-bottom: 18px;
    overflow-x: auto;
}

.panel-box h1,
.plan-card strong:first-child {
    font-family: var(--font-display);
    letter-spacing: -0.015em;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.data-table tbody tr:hover td {
    background: var(--bg-ground);
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.num-col {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.progress-track {
    width: 100%;
    height: 10px;
    background: var(--bg-elevated);
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #1fc468, var(--accent));
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.plan-card {
    background: var(--bg-surface);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.plan-card.is-highlighted {
    border-color: #f5a81c;
    background: linear-gradient(170deg, var(--pro-from), var(--bg-surface) 55%);
    box-shadow: var(--shadow-2);
}

.flash-banner {
    margin: 16px 0 0;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
}

.flash-banner--success {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    color: var(--text-primary);
}

.flash-banner--error {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    border: 1px solid var(--danger);
    color: var(--text-primary);
}

/* ---------- Подвал ---------- */

.site-footer {
    margin-top: 56px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 34px 0 30px;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.footer-about {
    max-width: 420px;
    margin: 12px 0 0;
}

.footer-col__title {
    margin: 0 0 10px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-col a {
    display: block;
    padding: 4px 0;
}

.footer-col a:hover {
    color: var(--accent-text);
}

/* ---------- Движение и адаптив ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 1280px) {
    .main-nav .nav-link {
        padding: 8px 10px;
    }

    .brand-zone {
        display: none;
    }
}

@media (max-width: 1100px) {
    .main-nav,
    .header-actions .hide-on-mobile {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        order: -1;
    }

    .header-inner {
        gap: 10px;
    }

    .cat-scroller {
        display: flex;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 32px 28px;
    }

    .hero-fan {
        display: none;
    }

    .pro-club-split { grid-template-columns: 1fr; }
    .workbench-grid, .detail-layout, .workspace-shell { grid-template-columns: 1fr; }
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
}

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

    .btn, .input, select.input {
        min-height: 44px;
    }

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

    .footer-grid > :first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 14px;
    }

    .brand-logo__text {
        display: none;
    }

    .header-search input {
        font-size: 16px;
    }

    .hero {
        margin-top: 14px;
        padding: 24px 18px;
        border-radius: 20px;
    }

    .hero__sub {
        font-size: 15px;
    }

    /* На телефоне поиск уже есть в шапке, второй не нужен */
    .hero-search {
        display: none;
    }

    .quick-bed-bar {
        margin-top: 0;
    }

    .tag-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        padding-top: 12px;
    }

    .tag-row::-webkit-scrollbar {
        display: none;
    }

    .tag-row > * {
        flex-shrink: 0;
    }

    .models-grid,
    .models-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .model-card__body {
        padding: 10px 11px 11px;
        gap: 5px;
    }

    .model-card__title {
        font-size: 13.5px;
    }

    .model-card__tags,
    .badge--spec,
    .avatar:not(.avatar--lg) {
        display: none;
    }

    .model-card__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding-top: 4px;
        font-size: 12.5px;
    }

    .market-specs-grid {
        grid-template-columns: 1fr;
    }

    .market-spec-row {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .pro-club-split {
        padding: 22px 16px;
    }

    .kpi-row { grid-template-columns: repeat(2, 1fr); }
    .stage-viewport { height: 320px; }
    .filter-grid, .spec-matrix { grid-template-columns: 1fr; }
    .catalog-head__title { font-size: 20px; }
    .segmented { width: 100%; overflow-x: auto; }
    .segmented a { flex: 1; text-align: center; padding: 8px 10px; }
}

/* ---------- Детальная страница модели и защита от раздувания на телефоне (2026-11-16) ---------- */

html {
    overflow-x: clip;
}

.passport-card__title {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
    overflow-wrap: anywhere;
}

.make-form-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr 0.7fr;
    gap: 8px;
    margin-bottom: 8px;
}

.make-form-row {
    display: flex;
    gap: 8px;
}

.files-table td:first-child {
    overflow-wrap: anywhere;
}

/* Колонки сеток обязаны уметь сжиматься, иначе таблицы распирают страницу шире экрана */
.detail-layout > div,
.workspace-shell > *,
.plans-grid > *,
.pro-club-split > *,
.hero > * {
    min-width: 0;
}

@media (max-width: 1100px) {
    .hero,
    .pro-club-split,
    .workbench-grid,
    .detail-layout,
    .workspace-shell,
    .plans-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    /* На узком экране: фото, затем заголовок с кнопкой "Скачать", затем описание и остальное */
    .detail-layout {
        gap: 16px;
        padding: 16px 0 32px;
    }

    .detail-layout > div {
        display: contents;
    }

    .detail-layout .stage-box {
        order: 1;
        min-width: 0;
    }

    .detail-layout .passport-card {
        order: 2;
        min-width: 0;
        margin-bottom: 0;
    }

    .detail-layout .panel-box {
        order: 3;
        min-width: 0;
        margin: 0 !important;
    }
}

@media (max-width: 640px) {
    .stage-tabs {
        padding: 8px 10px;
    }

    .stage-tabs .btn {
        min-height: 36px;
    }

    .stage-viewport {
        height: min(340px, 82vw);
    }

    .viewer3d-toolbar {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 6px 8px;
        gap: 6px;
    }

    .viewer3d-toolbar .btn {
        min-height: 30px;
        padding: 0 10px;
        font-size: 12px;
    }

    .passport-card,
    .panel-box {
        padding: 16px;
    }

    .passport-card .btn-lg {
        white-space: normal;
        text-align: center;
        line-height: 1.25;
        padding: 10px 16px;
    }

    .spec-cell__v {
        overflow-wrap: anywhere;
    }

    /* В таблице файлов оставляем имя, размер и кнопку */
    .files-table th:nth-child(2),
    .files-table td:nth-child(2),
    .files-table th:nth-child(3),
    .files-table td:nth-child(3),
    .files-table th:nth-child(4),
    .files-table td:nth-child(4) {
        display: none;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    .make-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .make-form-row {
        flex-direction: column;
    }
}

/* ---------- Каталог на телефоне: фильтры под кнопкой, подвал прижат к низу (2026-11-16) ---------- */

.app-main {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100dvh - var(--header-h));
}

.app-main > main {
    flex: 1 0 auto;
}

.filter-toggle,
.filter-bar__group--mobile,
.catalog-head__reset {
    display: none;
}

@media (max-width: 860px) {
    .catalog-head {
        align-items: center;
        padding-top: 16px;
        margin-bottom: 10px;
    }

    .catalog-head__title {
        overflow-wrap: anywhere;
    }

    .catalog-head__reset {
        display: inline-block;
        margin-left: auto;
        padding: 6px 0;
        font-size: 13.5px;
        font-weight: 650;
        color: var(--accent-text);
    }

    .cat-scroller .cat-pill {
        min-height: 38px;
        padding: 6px 13px;
        font-size: 13px;
    }

    .catalog-toolbar {
        flex-wrap: nowrap;
        gap: 8px;
        margin-bottom: 12px;
    }

    .catalog-toolbar .segmented {
        display: none;
    }

    /* Затухание справа подсказывает, что вкладки листаются */
    .sort-tabs {
        flex: 1;
        min-width: 0;
        padding-right: 22px;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
    }

    .sort-tab {
        padding: 9px 12px;
        font-size: 13.5px;
    }

    .filter-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
        min-height: 40px;
        padding: 0 14px;
        border-radius: 99px;
        border: 1px solid var(--border-strong);
        background: var(--bg-surface);
        color: var(--text-primary);
        font-size: 13.5px;
        font-weight: 600;
    }

    .filter-toggle[aria-expanded="true"] {
        border-color: var(--accent);
        color: var(--accent-text);
    }

    .filter-toggle__cnt {
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 99px;
        background: var(--accent);
        color: var(--accent-ink);
        font-size: 11px;
        font-weight: 700;
        line-height: 18px;
        text-align: center;
    }

    .filter-bar {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 14px;
        margin-bottom: 14px;
    }

    .filter-bar.is-open {
        display: flex;
    }

    .filter-bar__group--mobile {
        display: flex;
    }

    .filter-bar__label {
        width: 100%;
        margin: 0 0 2px;
    }

    .filter-bar .chip {
        min-height: 38px;
        padding: 5px 14px;
        font-size: 13.5px;
    }

    .filter-bar__reset {
        display: none;
    }
}

/* ---------- Маркетплейс и PRO: поиск по разделу и фильтры чипами, просмотры в карточке (2026-11-16) ---------- */

.page-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

.page-intro__body {
    flex: 1 1 420px;
    min-width: 0;
}

.page-intro__title {
    margin: 0 0 6px;
    font-size: 24px;
}

.page-intro__text {
    margin: 0;
    max-width: 68ch;
    color: var(--text-secondary);
    font-size: 14.5px;
}

.scope-search {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin: 0 0 14px;
}

.scope-search .input {
    flex: 1;
    min-width: 0;
}

.scope-search .btn {
    flex-shrink: 0;
}

.catalog-head--sub {
    padding-top: 6px;
}

/* Три счётчика в карточке: имя автора сжимается, цифры остаются целыми */
.model-card__meta .author-inline {
    min-width: 0;
}

.card-counters {
    gap: 9px;
}

@media (max-width: 860px) {
    .page-intro {
        margin-top: 14px;
        padding: 16px;
        gap: 12px;
    }

    .page-intro__body {
        flex-basis: 100%;
    }

    .page-intro__title {
        font-size: 19px;
    }

    .page-intro__text {
        font-size: 13.5px;
    }

    .page-intro .btn {
        width: 100%;
    }

    .scope-search {
        max-width: none;
    }

    /* 16px, иначе iOS приближает страницу при фокусе в поле */
    .scope-search .input {
        font-size: 16px;
    }

    .filter-bar.filter-bar--always {
        display: flex;
        padding: 12px 14px;
    }
}

@media (max-width: 520px) {
    /* В две колонки карточка узкая: автор сверху, счётчики отдельной строкой (колонка задана выше) */
    .model-card__meta {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .model-card__meta .author-inline {
        max-width: 100%;
    }

    .card-counters {
        gap: 11px;
    }
}

/* ---------- Открытие в слайсере и профили печати ---------- */

.slicer-split {
    display: inline-block;
    max-width: 100%;
}

.slicer-split--block {
    display: block;
    margin-bottom: 10px;
}

.slicer-split__row {
    display: flex;
    gap: 2px;
}

.slicer-split__main {
    flex: 1 1 auto;
    min-width: 0;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.slicer-split__main[disabled] {
    opacity: 0.65;
    cursor: progress;
}

.slicer-menu {
    position: relative;
    flex: 0 0 auto;
}

.slicer-menu > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    height: 100%;
    padding: 0 13px;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.slicer-menu > summary::-webkit-details-marker {
    display: none;
}

.slicer-menu > summary::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.15s;
}

.slicer-menu[open] > summary::after {
    transform: translateY(2px) rotate(-135deg);
}

.slicer-menu__list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    width: max-content;
    min-width: 220px;
    max-width: min(300px, 86vw);
    padding: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-2);
    text-align: left;
}

.slicer-menu__item {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: calc(var(--radius-sm) - 2px);
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.slicer-menu__item:hover,
.slicer-menu__item:focus-visible {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.slicer-menu__item[disabled] {
    opacity: 0.55;
    cursor: progress;
}

.slicer-menu__hint {
    margin: 6px 12px 4px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
    white-space: normal;
}

.slicer-menu__status {
    margin: 6px 2px 0;
    max-width: 320px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-secondary);
    text-align: left;
    white-space: normal;
}

.slicer-split--block .slicer-menu__status {
    max-width: none;
}

.slicer-menu__status.is-error {
    color: var(--danger);
}

.file-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.badge--ams {
    margin-left: 6px;
    background: var(--blue-soft);
    color: var(--blue-market);
    vertical-align: 1px;
}

.profile-list__title {
    margin: 0 0 12px;
    font-size: 18px;
}

.profile-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.profile-filter .chip {
    font-family: inherit;
    cursor: pointer;
}

.profile-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-list__empty {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.profile-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--border-subtle);
}

.profile-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.profile-row[hidden] {
    display: none;
}

/* Свёрнутый хвост списка: скрипт вешает is-collapsed, без него видны все строки */
.profile-list.is-collapsed .profile-row.is-extra {
    display: none;
}

.profile-row__thumb {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--bg-media);
}

.profile-row__body {
    min-width: 0;
}

.profile-row__name {
    display: block;
    font-size: 14.5px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.profile-row__meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    margin: 6px 0 0;
    padding: 0;
    font-size: 13px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.profile-row__spools {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.spool {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.spool__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--spool);
    box-shadow: inset 0 0 0 1px var(--border-strong);
}

.profile-row__note-text,
.profile-row__by {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.profile-row__by a {
    color: var(--accent-text);
}

.profile-row__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 8px;
    max-width: 330px;
}

.profile-row__note {
    font-size: 12.5px;
    color: var(--text-muted);
    white-space: nowrap;
}

.profile-row__delete {
    margin: 0;
}

.profile-list__more {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent-text);
    cursor: pointer;
}

.profile-list__more:hover {
    text-decoration: underline;
}

.profile-add {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.profile-add > summary {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent-text);
    cursor: pointer;
}

.profile-add__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
    padding: 14px;
    background: var(--bg-ground);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.profile-add__field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.profile-add__field input[type="file"] {
    padding-top: 6px;
}

.profile-add__field--wide,
.profile-add__hint {
    grid-column: 1 / -1;
}

.profile-add__hint {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
}

.profile-add__form .btn {
    justify-self: start;
}

.profile-add__login {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13.5px;
    color: var(--text-secondary);
}

.profile-add__login a {
    color: var(--accent-text);
    font-weight: 600;
}

@media (max-width: 640px) {
    .profile-row {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 10px 12px;
    }

    .profile-row__thumb {
        width: 56px;
        height: 56px;
    }

    .profile-row__actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        max-width: none;
    }

    .profile-row__actions .slicer-menu__list {
        left: 0;
        right: auto;
    }

    .profile-add__form {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* На телефонах и планшетах настольных слайсеров нет: оставляем только скачивание,
   а кнопка «Скачать» под скрытой кнопкой слайсера снова становится главной. */
@media (hover: none) and (pointer: coarse) {
    .slicer-split {
        display: none;
    }

    .btn.dl-after-slicer {
        background: var(--accent);
        border-color: transparent;
        color: var(--accent-ink);
        font-weight: 700;
    }
}
