/*
 * KLIQ UI — Build-b5i0a2i4
 * Визуальный принцип: нейтральный интерфейс + выразительный fashion-контент.
 * Фиолетовый используется как фирменный акцент, а не как фон каждого элемента.
 */
@font-face {
    font-family: Inter;
    src: url("../fonts/inter-cyrillic-ext.woff2") format("woff2");
    font-weight: 400 900;
    font-display: swap;
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: Inter;
    src: url("../fonts/inter-cyrillic.woff2") format("woff2");
    font-weight: 400 900;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Inter;
    src: url("../fonts/inter-latin.woff2") format("woff2");
    font-weight: 400 900;
    font-display: swap;
    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 {
    color-scheme: light;
    --canvas: #faf9f6;
    --surface: #ffffff;
    --surface-2: #f0eef2;
    --surface-3: #e8e5ea;
    --ink: #17131c;
    --ink-soft: #38323f;
    --muted: #746d7c;
    --border: #dfdbe3;
    --border-strong: #cfc8d4;
    --primary: #5932a8;
    --primary-hover: #48248f;
    --primary-soft: #eee8f9;
    --primary-ink: #4b278c;
    --on-primary: #ffffff;
    --editorial: #230c40;
    --editorial-soft: #39205d;
    --success: #147a48;
    --success-bg: #edf8f1;
    --danger: #a33150;
    --danger-bg: #fff0f3;
    --focus: #7d56cc;
    --content-max: 1200px;
    --text-max: 720px;
    --gutter: clamp(16px, 4vw, 48px);
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --radius-control: 12px;
    --radius-card: 12px;
    --radius-large: 18px;
    --radius-pill: 999px;
    --touch-target: 44px;
    --dock-shadow: 0 12px 36px rgba(28, 18, 37, .15), 0 2px 8px rgba(28, 18, 37, .08);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --canvas: #111014;
    --on-primary: #191122;
    --surface: #19171d;
    --surface-2: #242129;
    --surface-3: #302c34;
    --ink: #f7f5f8;
    --ink-soft: #ddd8e1;
    --muted: #aaa3b0;
    --border: #37323c;
    --border-strong: #4a4350;
    --primary: #a17cf2;
    --primary-hover: #b293f5;
    --primary-soft: #2c233d;
    --primary-ink: #c3a8ff;
    --editorial: #1c1029;
    --editorial-soft: #2c1a42;
    --success: #76d19e;
    --success-bg: #173025;
    --danger: #ff9ab5;
    --danger-bg: #3a1e29;
    --focus: #b69afa;
    --dock-shadow: 0 14px 40px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--canvas);
    color: var(--ink);
    font: 400 15px/1.55 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body[data-presence-url] { padding-bottom: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
svg { display: block; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.06; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.4vw, 62px); font-weight: 720; letter-spacing: -.055em; }
h2 { font-size: clamp(23px, 3vw, 34px); font-weight: 680; letter-spacing: -.04em; }
h3 { font-size: 18px; font-weight: 650; letter-spacing: -.025em; }
p, small, strong, span { overflow-wrap: anywhere; }
small { font-size: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--primary); color: var(--on-primary); }
.icon { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.skip-link {
    position: fixed;
    z-index: 100;
    top: 8px;
    left: 8px;
    transform: translateY(-140%);
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface);
}
.skip-link:focus { transform: none; }

/* Шапка: спокойная, липкая и без декоративного шума. */
.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
    background: color-mix(in srgb, var(--canvas) 88%, transparent);
    backdrop-filter: saturate(150%) blur(18px);
}
.header-inner {
    width: min(calc(100% - 2 * var(--gutter)), var(--content-max));
    min-height: 68px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(240px, 480px) minmax(150px, 1fr);
    align-items: center;
    gap: var(--space-4);
}
.logo {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 29px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: -.085em;
}
.logo .icon { width: 23px; height: 23px; color: var(--primary); }
.header-search {
    width: 100%;
    min-width: 0;
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 5px 4px 14px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    transition: border-color .16s ease, background-color .16s ease;
}
.header-search:focus-within { border-color: var(--primary); background: var(--surface); }
.header-search > .icon { width: 18px; color: var(--muted); }
.header-search input {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
}
.header-search button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: none;
    border: 0;
    border-radius: 11px;
    background: var(--primary);
    color: var(--on-primary);
}
.header-search button .icon { width: 17px; height: 17px; }
.header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-link {
    min-height: var(--touch-target);
    display: inline-flex;
    align-items: center;
    padding-inline: 14px;
    border-radius: var(--radius-pill);
    color: var(--primary-ink);
    font-weight: 650;
}
.header-link:hover { background: var(--primary-soft); }
.header-avatar { display: block; border-radius: 50%; }
.avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    object-fit: cover;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-ink);
    font-weight: 720;
}
.avatar-large { width: 78px; height: 78px; font-size: 23px; }
.icon-button {
    width: var(--touch-target);
    height: var(--touch-target);
    display: inline-grid;
    place-items: center;
    flex: none;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    transition: background-color .14s ease, transform .14s ease, border-color .14s ease;
}
.icon-button:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-button:active, .button:active, .dock-link:active { transform: scale(.97); }
.sun-icon, [data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }

/* Основной контейнер и общая типографическая иерархия. */
.main {
    width: min(calc(100% - 2 * var(--gutter)), var(--content-max));
    margin-inline: auto;
    padding-block: clamp(28px, 4vw, 48px) 40px;
    flex: 1 0 auto;
}
.main.narrow { max-width: var(--text-max); }
.main.auth-main { max-width: 1040px; }
.profile-main { max-width: 1000px; }
.section-heading {
    min-width: 0;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-4);
}
.section-heading > * { min-width: 0; }
.page-heading { margin-bottom: var(--space-6); }
.page-heading .muted { margin-top: 8px; max-width: 680px; }
.recent-heading { margin: var(--space-7) 0 var(--space-4); }
.eyebrow {
    margin-bottom: 8px;
    color: var(--primary-ink);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.count-pill, .self-badge, .publication-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}
.notice {
    margin-bottom: var(--space-4);
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink-soft);
}
.notice.success { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); background: var(--success-bg); color: var(--success); }
.notice.alert { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: var(--danger-bg); color: var(--danger); }

/* Кнопки: один акцент, одна геометрия действий. */
.button {
    min-height: var(--touch-target);
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: transparent;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
    transition: background-color .14s ease, border-color .14s ease, transform .14s ease;
}
.button .icon { width: 17px; height: 17px; }
.button-primary { background: var(--primary); color: var(--on-primary); }
.button-primary:hover { background: var(--primary-hover); }
.button-soft { border-color: var(--border); background: var(--surface); color: var(--ink); }
.button-soft:hover { background: var(--surface-2); border-color: var(--border-strong); }
.button-danger { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, var(--border)); }
.button-danger:hover { border-color: var(--danger); }
.full { width: 100%; }
.text-button {
    min-height: var(--touch-target);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary-ink);
    font-weight: 650;
}
.text-button:hover { text-decoration: underline; }
.text-link, .back-link { color: var(--primary-ink); font-weight: 650; }
.text-link:hover, .back-link:hover { text-decoration: underline; }
.back-link {
    min-height: var(--touch-target);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--space-4);
}
.back-link .icon, .text-link .icon { width: 16px; height: 16px; }

/*
 * На широких экранах dock участвует в потоке документа и не перекрывает контент.
 * Плавающим он становится только на компактных устройствах, где нижняя навигация
 * является ожидаемым паттерном и до неё удобно дотягиваться большим пальцем.
 */
.site-footer.signed-in {
    position: relative;
    z-index: 10;
    margin-top: auto;
    padding: 8px var(--gutter) 22px;
}
.dock {
    width: min(100%, 430px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    padding: 5px;
    border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: var(--dock-shadow);
}
.dock-link {
    min-width: 0;
    min-height: 58px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 3px 2px;
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-size: 9px;
    line-height: 1.1;
    font-weight: 620;
    white-space: nowrap;
    transition: color .14s ease, background-color .14s ease, transform .14s ease;
}
.dock-link:hover, .dock-link[aria-current="page"] { color: var(--primary-ink); }
.dock-link[aria-current="page"] { background: var(--primary-soft); }
.dock-icon { width: 31px; height: 28px; display: grid; place-items: center; }
.dock-icon .icon { width: 19px; height: 19px; }
.dock-add { color: var(--ink); }
.dock-add .dock-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--on-primary);
}
.dock-add .dock-icon .icon { width: 22px; height: 22px; }
.dock-add[aria-current="page"] { background: transparent; }
.legal-footer {
    width: min(calc(100% - 2 * var(--gutter)), var(--content-max));
    margin-inline: auto;
    padding: 18px 0 28px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    color: var(--muted);
    font-size: 12px;
}
.legal-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Главная: большой editorial-блок и компактная погода. */
.welcome-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: var(--space-4);
}
/* Разделяем подпись и фотографию, чтобы контраст текста не зависел от кадра. */
.welcome-art {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border-radius: var(--radius-large);
    background: #ddd1eb;
    color: #291c35;
}
.welcome-art::after {
    content: "";
    background: #aa93b4 url("../img/lookbook-pair.webp") left center / auto 100% no-repeat;
}
.welcome-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: start;
    padding: clamp(20px, 3vw, 42px);
}
.welcome-copy h1 {
    margin: auto 0;
    padding-block: 24px;
    color: inherit;
    font: 500 clamp(36px, 4.3vw, 64px)/1.02 Georgia, serif;
    letter-spacing: -.055em;
    overflow-wrap: anywhere;
}
.hero-label { font-size: 12px; font-weight: 650; }
.hero-button { background: #2f203a; color: white; }
.hero-button:hover { background: #483051; }
.weather-card {
    min-width: 0;
    padding: clamp(22px, 3vw, 32px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background: var(--surface);
}
.weather-head { display: flex; align-items: center; gap: 8px; }
.weather-head h2 { font-size: 14px; letter-spacing: -.01em; }
.weather-place-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary-ink); }
.weather-place-icon .icon { width: 17px; height: 17px; }
.weather-reading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.weather-reading strong { font-size: clamp(50px, 6vw, 76px); line-height: 1; letter-spacing: -.075em; font-weight: 620; }
.weather-reading > span { color: var(--primary-ink); }
.weather-reading .icon { width: 36px; height: 36px; }
.weather-controls { display: flex; flex-wrap: wrap; gap: 4px 14px; }
#weather-form { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--border); }
#weather-form > label { color: var(--muted); font-size: 12px; font-weight: 600; }
.weather-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.weather-city-error, .field-error { color: var(--danger); font-size: 12px; }

/* Карточки вещей: изображение — главный элемент. */
.item-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 20px);
}
.item-card {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
}
a.item-card { transition: transform .16s ease, border-color .16s ease; }
a.item-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.item-media { position: relative; background: var(--surface-2); }
.item-card > img, .item-media > img {
    width: 100%;
    aspect-ratio: 1 / 1.08;
    object-fit: contain;
    background: var(--surface-2);
}
.item-info {
    min-width: 0;
    display: grid;
    gap: 10px;
    padding: 13px 14px 15px;
}
.item-title { display: grid; gap: 2px; }
.item-info strong { font-size: 14px; line-height: 1.3; }
.item-info small { color: var(--muted); }
.delete-form { position: absolute; top: 9px; right: 9px; }
.delete-button {
    width: 38px;
    height: 38px;
    border: 0;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(8px);
}
.delete-button:hover { color: var(--danger); background: var(--surface); }
.garment-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.garment-tags span {
    max-width: 100%;
    padding: 4px 7px;
    border-radius: 7px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
}
.edit-garment { border-top: 1px solid var(--border); padding-top: 9px; }
.edit-garment summary { display: flex; align-items: center; gap: 6px; color: var(--primary-ink); font-size: 12px; font-weight: 650; cursor: pointer; list-style: none; }
.edit-garment summary::-webkit-details-marker { display: none; }
.edit-garment summary .icon { width: 15px; height: 15px; }
.edit-garment-form { display: grid; gap: 10px; padding-top: 12px; }
.home-empty { margin-top: var(--space-5); }

/* Гардероб: две крупные задачи — вещи и образы — внутри одного раздела. */
.wardrobe-heading { margin-bottom: var(--space-5); }
.wardrobe-switch {
    display: flex;
    align-items: center;
    gap: 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-5);
}
.wardrobe-switch a {
    position: relative;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 650;
}
.wardrobe-switch a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: transparent;
}
.wardrobe-switch a[aria-current="page"] { color: var(--ink); }
.wardrobe-switch a[aria-current="page"]::after { background: var(--primary); }
.wardrobe-switch b {
    min-width: 24px;
    padding: 3px 7px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}
.tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin-bottom: var(--space-4);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    flex: none;
    padding: 7px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 620;
    white-space: nowrap;
}
.tabs a:hover { border-color: var(--border-strong); color: var(--ink); }
.tabs a[aria-current="true"] { border-color: var(--ink); background: var(--ink); color: var(--canvas); }
.filter-panel {
    margin-bottom: var(--space-5);
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.filter-panel > summary { padding-block: 11px; font-weight: 650; cursor: pointer; }
.filter-panel[open] > summary { margin-bottom: 8px; }
.filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr));
    gap: 10px;
}
.filter-grid label { min-width: 0; display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 600; }
.filter-footer { min-height: 38px; display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-top: 8px; }
.filter-reset { min-height: 36px; }
.wardrobe-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Формы: меньше вложенных карточек, больше ритма и ясности. */
.form-card {
    display: grid;
    gap: 18px;
    margin-bottom: var(--space-4);
    padding: clamp(18px, 3vw, 26px);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
}
.form-card > h1 { margin-bottom: 2px; }
.form-card > h2, .form-card > div > h2 { font-size: 22px; }
.form-card label, .stylist-form label, .edit-garment-form label, .register-form label {
    min-width: 0;
    display: grid;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 620;
}
input, select, textarea {
    width: 100%;
    min-width: 0;
    min-height: var(--touch-target);
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    outline: none;
    background: var(--surface);
    color: var(--ink);
    box-shadow: none;
    transition: border-color .14s ease, background-color .14s ease;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 78%, transparent); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.span-2 { grid-column: 1 / -1; }
.form-label { margin: 0 0 8px; color: var(--ink-soft); font-size: 12px; font-weight: 620; }
.password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); overflow: hidden; }
.password-field:focus-within { border-color: var(--primary); }
.password-field input { border: 0; border-radius: 0; }
.password-field button { min-height: var(--touch-target); padding-inline: 12px; border: 0; background: transparent; color: var(--primary-ink); font-size: 12px; font-weight: 650; }

/* Загрузка фотографии. */
.upload-zone {
    min-height: 250px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    overflow: hidden;
    padding: 22px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-card);
    background: var(--surface-2);
    text-align: center;
    cursor: pointer;
}
.upload-zone:hover { border-color: var(--primary); }
.upload-zone img { width: min(100%, 360px); max-height: 360px; object-fit: contain; border-radius: 14px; }
.upload-zone strong { color: var(--ink); }
.upload-zone small { color: var(--muted); }
.empty-symbol { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--primary-ink); }
.upload-zone .empty-symbol { background: var(--surface); }

/* Пустые и ошибочные состояния. */
.empty-state {
    min-height: 210px;
    display: grid;
    justify-items: start;
    align-content: center;
    gap: 10px;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
}
.empty-state p { max-width: 560px; color: var(--muted); }
.error-state { justify-items: center; text-align: center; }
.error-state .empty-symbol { margin-bottom: 6px; }

/* Студия образов внутри гардероба. */
.looks-workspace { display: grid; gap: var(--space-7); }
.stylist-panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background: var(--surface);
    scroll-margin-top: 90px;
}
.stylist-intro {
    position: relative;
    min-height: 220px;
    display: grid;
    align-items: center;
    overflow: hidden;
    padding: clamp(26px, 5vw, 54px);
    background: var(--editorial) url("../img/chrome-star.webp") 75% 50% / cover no-repeat;
    color: #fff;
}
.stylist-intro::after { content: ""; position: absolute; inset: 0; background: rgba(19, 7, 35, .42); pointer-events: none; }
.stylist-intro > div { position: relative; z-index: 1; width: min(70%, 600px); }
.stylist-intro h2 { color: #fff; font-size: clamp(28px, 4.2vw, 46px); }
.stylist-intro p:not(.eyebrow) { margin-top: 12px; color: #e9e0ef; max-width: 560px; }
.stylist-intro .eyebrow { color: #d9c8fb; }
.stylist-decor { position: absolute; z-index: 1; right: 8%; bottom: 12%; color: #d8c4ff; font-size: 52px; }
.stylist-form { display: grid; gap: 18px; padding: clamp(18px, 3vw, 28px); }
.stylist-weather-note { padding: 10px 12px; border-radius: var(--radius-control); background: var(--surface-2); color: var(--muted); font-size: 12px; }
.stylist-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stylist-fields .span-2 { grid-column: span 2; }
.stylist-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.outfits-section { scroll-margin-top: 90px; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.look-card {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
    scroll-margin-top: 90px;
}
.look-card-heading { min-width: 0; display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.look-card-heading > div { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.look-card-heading h3 { min-width: 0; }
.publication-status { color: var(--primary-ink); background: var(--primary-soft); }
.quiet-delete { width: 38px; height: 38px; background: transparent; }
.quiet-delete:hover { color: var(--danger); }
.look-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.look-images figure { min-width: 0; overflow: hidden; border-radius: 14px; background: var(--surface-2); }
.look-images img { width: 100%; aspect-ratio: 1 / .9; object-fit: contain; background: var(--surface-2); }
.look-images figcaption { padding: 8px; color: var(--muted); font-size: 11px; }
.look-preview { width: 100%; max-height: 420px; object-fit: contain; border-radius: 14px; background: var(--surface-2); }
.look-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.look-card-actions .button { min-height: 40px; font-size: 12px; }
.favorite-button[aria-pressed="true"] { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); background: var(--primary-soft); }
.favorite-button[aria-pressed="true"] .icon, .post-like[aria-pressed="true"] .icon { fill: currentColor; }
.collection-note { margin: 8px 0 16px; }

/* Результаты подбора. */
.recommendation-list { display: grid; gap: 20px; }
.recommendation-card {
    min-width: 0;
    display: grid;
    gap: 18px;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
}
.recommendation-items { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.recommendation-item { min-width: 0; display: grid; gap: 6px; }
.recommendation-item img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 14px; background: var(--surface-2); }
.recommendation-item strong { font-size: 12px; }
.recommendation-item small { color: var(--muted); }
.publish-form { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Профиль и публикации. */
.profile-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background: var(--surface);
}
.profile-cover {
    min-height: 175px;
    display: flex;
    align-items: flex-end;
    padding: 18px 24px;
    background: var(--editorial) url("../img/chrome-star.webp") 72% 50% / cover no-repeat;
}
.profile-cover > span { color: #eee5f7; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.profile-content {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px 18px;
    padding: 0 24px 22px;
}
.profile-avatar { width: 92px; height: 92px; margin-top: -46px; border: 5px solid var(--surface); font-size: 28px; }
.profile-name { min-width: 0; padding-top: 18px; }
.profile-name h1 { font-size: clamp(28px, 4vw, 42px); }
.profile-name p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.profile-edit, .profile-follow { align-self: end; }
.social-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--border);
}
.social-stats span { display: grid; gap: 3px; padding: 16px 14px 0 0; color: var(--muted); font-size: 11px; }
.social-stats strong { color: var(--ink); font-size: 22px; font-weight: 650; }
.create-look { min-height: 40px; padding-inline: 14px; font-size: 12px; }
.post-like-count { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.post-like-count .icon { width: 17px; height: 17px; }

/* Поиск пользователей. */
.search-count { margin: -12px 0 14px; }
.user-results { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.user-result {
    min-width: 0;
    min-height: 70px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}
.user-result:last-child { border-bottom: 0; }
.user-result:hover { background: var(--surface-2); }
.user-result > span:not(.avatar) { min-width: 0; display: grid; }
.user-result small { color: var(--muted); }
.user-result > .icon { width: 17px; color: var(--muted); }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* Настройки и безопасность. */
.list-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.list-row {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--surface-2); }
.list-row > span { min-width: 0; display: inline-flex; align-items: center; gap: 10px; }
.list-row > .icon { width: 17px; color: var(--muted); }
.theme-row { align-items: center; }
.theme-options { display: flex; gap: 4px; padding: 3px; border-radius: var(--radius-pill); background: var(--surface-2); }
.theme-options button { min-height: 34px; padding: 6px 10px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--muted); font-size: 11px; font-weight: 620; }
.theme-options button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }
.settings-end { padding: 20px 2px 4px; text-align: center; font-size: 12px; }
.security-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 22px;
    border-radius: var(--radius-card);
    background: var(--editorial);
    color: #fff;
}
.security-hero h1 { color: #fff; font-size: 34px; }
.security-hero p:not(.eyebrow) { margin-top: 5px; color: #d9d0df; }
.security-hero .eyebrow { color: #cdb9ee; }
.security-symbol { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; }
.security-symbol .icon { width: 26px; height: 26px; }
.danger-settings { margin-top: 20px; }
.danger-settings > summary { min-height: var(--touch-target); display: flex; align-items: center; color: var(--danger); font-weight: 650; cursor: pointer; }
.danger-settings .form-card { margin-top: 10px; }

/* Админ-панель. */
.admin-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: var(--space-7); }
.admin-stats > div { min-width: 0; display: grid; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.admin-stats span { color: var(--muted); font-size: 12px; }
.admin-stats strong { font-size: 30px; font-weight: 650; letter-spacing: -.04em; }
.admin-stats small { color: var(--muted); }
.online-dot { width: 8px; height: 8px; display: inline-block; margin-right: 5px; border-radius: 50%; background: #35b66a; box-shadow: 0 0 0 4px rgba(53,182,106,.12); }
.admin-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-link-grid .form-card { margin: 0; }
.add-social-card { margin-top: 12px; }
.add-social-card h3 { display: flex; align-items: center; gap: 7px; }
.admin-users { display: grid; gap: 8px; }
.admin-user { border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); }
.admin-user summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; }
.admin-user summary::-webkit-details-marker { display: none; }
.admin-user summary span { min-width: 0; display: grid; }
.admin-user small { color: var(--muted); }
.admin-user form { display: grid; gap: 10px; padding: 0 14px 14px; }

/* Авторизация и регистрация. */
.auth-layout {
    min-height: min(680px, calc(100vh - 180px));
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background: var(--surface);
}
.auth-art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 5vw, 52px);
    background: var(--editorial) url("../img/chrome-star.webp") center / cover no-repeat;
    color: #fff;
}
.auth-art::after { content: ""; position: absolute; inset: 0; background: rgba(19,7,35,.26); pointer-events: none; }
.auth-art > * { position: relative; z-index: 1; }
.auth-art > p { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.04em; }
.auth-art h2 { color: #fff; font-size: clamp(42px, 6vw, 68px); line-height: .93; }
.auth-art h2 span { color: #d5c4ff; }
.auth-art div > span { display: block; margin-top: 18px; color: #e0d8e7; }
.auth-card { align-self: center; display: grid; gap: 24px; padding: clamp(28px, 5vw, 58px); }
.auth-card h1 { font-size: clamp(32px, 4vw, 46px); }
.auth-card form { display: grid; gap: 16px; }
.auth-card label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 620; }
.auth-foot { color: var(--muted); font-size: 13px; text-align: center; }
.auth-foot a { color: var(--primary-ink); font-weight: 650; }
.registration-card { padding: clamp(20px, 4vw, 34px); }
.registration-progress { display: grid; gap: 7px; color: var(--muted); font-size: 11px; }
.registration-progress progress { width: 100%; height: 5px; appearance: none; overflow: hidden; border: 0; border-radius: var(--radius-pill); background: var(--surface-2); }
.registration-progress progress::-webkit-progress-bar { background: var(--surface-2); }
.registration-progress progress::-webkit-progress-value { background: var(--primary); }
.registration-progress progress::-moz-progress-bar { background: var(--primary); }
.registration-step { display: grid; gap: 20px; }
.registration-step h2 { font-size: 25px; }
.step-actions { display: flex; justify-content: space-between; gap: 10px; }
.size-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.size-tile { min-width: 0; position: relative; }
.size-tile > span {
    min-height: 72px;
    display: grid;
    place-content: center;
    gap: 4px;
    padding: 8px 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface);
    text-align: center;
    cursor: pointer;
}
.size-tile strong { font-size: 16px; }
.size-tile small { color: var(--muted); font-size: 9px; }
.size-tile input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.size-tile input:focus-visible + span, .visual-option input:focus-visible + span, .choice-chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.visual-fieldset { min-width: 0; padding: 0; border: 0; }
.visual-fieldset > p { margin-bottom: 12px; }
.visual-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.visual-option { position: relative; min-width: 0; }
.visual-option > span {
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
    cursor: pointer;
}
.visual-option img { width: 100%; aspect-ratio: 1 / 1.08; object-fit: cover; background: var(--surface-2); }
.visual-option strong { display: block; padding: 10px; text-align: center; font-size: 11px; }
.visual-option input:checked + span { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.consent { grid-template-columns: auto minmax(0, 1fr) !important; align-items: start; }
.consent input { width: 18px; min-height: 18px; margin-top: 2px; }
.consent a { color: var(--primary-ink); }

/* Настройки профиля. */
.avatar-setting { display: flex; align-items: center; gap: 16px; }
.avatar-setting > div { min-width: 0; }
.chip-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.chip-fieldset legend { margin-bottom: 10px; font-size: 12px; font-weight: 650; }
.chip-options { display: flex; flex-wrap: wrap; gap: 7px; }
.choice-chip { position: relative; }
.choice-chip > span { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 11px; border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--muted); background: var(--surface); font-size: 11px; cursor: pointer; }
.choice-chip input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }

/* Адаптивность: компоненты перестраиваются, а не просто уменьшаются. */
@media (max-width: 1024px) {
    .item-grid, .wardrobe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .recommendation-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .filter-grid { grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(140px, 1fr)); }
    .filter-grid label:last-child { grid-column: auto; }
    .size-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    body[data-presence-url] { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
    .site-footer.signed-in {
        position: fixed;
        z-index: 30;
        left: 0;
        right: 0;
        bottom: max(10px, env(safe-area-inset-bottom));
        margin-top: 0;
        padding: 0 var(--gutter);
        pointer-events: none;
    }
    .site-footer.signed-in .dock { pointer-events: auto; }
    .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding-block: 8px; }
    .header-search { grid-column: 1 / -1; grid-row: 2; }
    .header-actions { grid-column: 2; grid-row: 1; }
    .welcome-card { grid-template-columns: minmax(0, 1fr); }
    .welcome-art { min-height: 330px; }
    .weather-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .weather-head, .weather-reading, .weather-controls, #weather-form { grid-column: 1 / -1; }
    .item-grid, .wardrobe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-search { grid-column: 1 / -1; }
    .stylist-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stylist-fields .span-2 { grid-column: 1 / -1; }
    .post-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-link-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-stats > div:first-child { grid-column: 1 / -1; }
    .auth-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .auth-art { min-height: 270px; }
    .auth-art h2 { font-size: 46px; }
    .profile-content { grid-template-columns: auto minmax(0, 1fr); }
    .profile-edit, .profile-follow { grid-column: 1 / -1; width: fit-content; }
}

@media (max-width: 640px) {
    :root { --gutter: 14px; --radius-card: 12px; --radius-large: 16px; }
    body[data-presence-url] { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
    .main { padding-top: 24px; padding-bottom: 26px; }
    .site-header { backdrop-filter: saturate(140%) blur(14px); }
    .header-inner { min-height: 58px; }
    .logo { font-size: 25px; }
    .logo .icon { width: 20px; height: 20px; }
    .header-search { border-radius: 13px; }
    .header-actions .icon-button, .header-actions .avatar { width: 40px; height: 40px; }
    h1 { font-size: clamp(31px, 11vw, 43px); }
    h2 { font-size: 24px; }
    .page-heading { margin-bottom: 22px; }
    .page-heading, .recent-heading { align-items: start; }
    .section-heading { flex-wrap: wrap; }
    .wardrobe-heading .button { width: auto; }
    .welcome-art { min-height: 266px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
    .welcome-copy { padding: 20px 16px; }
    .welcome-copy h1 { font-size: clamp(26px, 7vw, 42px); }
    .weather-card { padding: 18px; }
    .weather-reading strong { font-size: 58px; }
    .item-grid, .wardrobe-grid { gap: 10px; }
    .item-card { border-radius: 15px; }
    .item-info { padding: 10px 11px 12px; }
    .item-info strong { font-size: 12px; }
    .item-info small { font-size: 10px; }
    .garment-tags { gap: 4px; }
    .garment-tags span { font-size: 9px; }
    .delete-form { top: 6px; right: 6px; }
    .delete-button { width: 44px; height: 44px; }
    .filter-panel { padding-block: 12px; }
    .filter-grid { gap: 8px; }
    .filter-grid label { font-size: 10px; }
    .filter-grid select, .filter-grid input { padding-inline: 9px; font-size: 16px; }
    .wardrobe-switch { gap: 22px; margin-bottom: 18px; }
    .stylist-intro { min-height: 210px; padding: 24px 18px; background-position: 65% 50%; }
    .stylist-intro > div { width: 86%; }
    .stylist-decor { display: none; }
    .stylist-form { padding: 14px; }
    .stylist-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
    .stylist-actions .button { width: 100%; }
    .look-card { padding: 11px; border-radius: 15px; }
    .look-images { gap: 6px; }
    .look-images figure { border-radius: 11px; }
    .look-card-actions { align-items: stretch; }
    .look-card-actions form:first-child { flex: 1 1 170px; }
    .look-card-actions form:first-child .button { width: 100%; }
    .recommendation-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-cover { min-height: 135px; padding: 14px 16px; }
    .profile-content { gap: 12px; padding: 0 15px 16px; }
    .profile-avatar { width: 78px; height: 78px; margin-top: -39px; border-width: 4px; }
    .profile-name { padding-top: 10px; }
    .profile-name h1 { font-size: 29px; }
    .social-stats { gap: 0; }
    .social-stats span { padding: 13px 6px 0 0; font-size: 10px; }
    .social-stats strong { font-size: 18px; }
    .user-result { grid-template-columns: auto minmax(0, 1fr) auto; }
    .user-result .self-badge { grid-column: 2; width: fit-content; }
    .user-result > .icon { grid-column: 3; grid-row: 1 / span 2; }
    .form-card { padding: 16px; gap: 15px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .span-2 { grid-column: 1; }
    .stylist-fields { grid-template-columns: minmax(0, 1fr); }
    .stylist-fields .span-2 { grid-column: 1; }
    .admin-stats { grid-template-columns: minmax(0, 1fr); }
    .admin-stats > div:first-child { grid-column: 1; }
    .auth-art { min-height: 210px; padding: 24px; }
    .auth-art h2 { font-size: 38px; }
    .auth-card { padding: 24px 18px; }
    .size-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .visual-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .step-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
    .step-actions .button { width: 100%; }
    .theme-row { align-items: flex-start; flex-direction: column; }
    .theme-options { width: 100%; }
    .theme-options button { flex: 1; }
    .security-hero { padding: 18px 14px; }
    .security-hero h1 { font-size: 29px; }
    .security-symbol { width: 42px; height: 42px; }
    .dock { width: min(100%, 390px); }
    .dock-link { min-height: 52px; font-size: 10px; }
    .dock-icon { height: 25px; }
    .dock-add .dock-icon { width: 35px; height: 35px; }
}

@media (max-width: 390px) {
    .item-grid, .wardrobe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid { grid-template-columns: minmax(0, 1fr); }
    .filter-search { grid-column: 1; }
    .visual-options { grid-template-columns: minmax(0, 1fr); }
    .size-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .profile-content { grid-template-columns: auto minmax(0, 1fr); }
    .social-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .social-stats span { padding-right: 3px; }
    .social-stats strong { font-size: 17px; }
    .wardrobe-heading .button { width: 100%; }
}

@media (max-width: 330px) {
    :root { --gutter: 10px; }
    .item-grid, .wardrobe-grid { gap: 7px; }
    .item-info { padding-inline: 8px; }
    .social-stats strong { font-size: 15px; }
    .social-stats span { font-size: 9px; }
    .dock { padding: 4px; }
    .dock-link { font-size: 9px; }
}

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


/* Полосы разделяют разделы каталога в обеих темах. */
.recent-heading { border-top: 1px solid var(--border-strong); padding-top: 20px; }
.text-link { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.wardrobe-switch { gap: 6px; }
.wardrobe-switch a { padding-inline: 16px; }
.wardrobe-switch a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-ink); }
.header-actions { grid-column: -2; }
@media (min-width: 821px) {
    .welcome-art { min-height: 375px; }
}
@media (max-width: 640px) {
    .filter-panel { padding-block: 0; }
    .tabs a, .filter-reset { min-height: var(--touch-target); }
    .filter-grid label { font-size: 12px; }
    .filter-footer { padding-bottom: 8px; }
    .header-actions .icon-button, .header-actions .avatar { width: 44px; height: 44px; }
    .header-search input { font-size: 16px; }
    .welcome-copy .hero-button { padding-inline: 12px; font-size: 13px; }
}

/* Переход по якорю оставляет заголовок доступным под закреплённой шапкой. */
#outfits, #stylist { scroll-margin-top: 82px; }
.library-jump { justify-self: end; }
@media (max-width: 820px) {
    #outfits, #stylist { scroll-margin-top: 130px; }
}
