:root {
    --lavender: #e8d4ff;
    --purple: #7b4fd4;
    --purple-dark: #3d2066;
    --pink: #ffd6f0;
    --blue: #d4ecff;
    --mint: #d4fff3;
    --glass: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.85);
    --shadow: 0 12px 40px rgba(100, 60, 160, 0.18);
    --radius-xl: 28px;
    --radius-pill: 999px;
    --font: 'Nunito', system-ui, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
}

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

html {
    scroll-behavior: smooth;
}

body.umka-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--purple-dark);
    background: linear-gradient(135deg, #dff4ff 0%, #f0e4ff 45%, #ffe8f5 100%);
    background-attachment: fixed;
}

.bg-fantasy {
    display: none;
}

.bg-stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 80% 10%, rgba(200, 180, 255, 0.6), transparent);
    background-size: 200px 200px;
    opacity: 0.6;
    z-index: 0;
}

.brand__tagline {
    display: none;
}

/* Home landing — layout per design mockup */
.umka-body--home {
    background: transparent;
}

.umka-body--home .bg-fantasy {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url('../images/phone/mobile-bg.PNG?v=3') center 42% / cover no-repeat;
    background-color: #7ec8e8;
}

.umka-body--home .bg-stars {
    opacity: 0.1;
}

.umka-landing {
    position: relative;
    z-index: 8;
    padding: 8px 8px 4px;
}

.umka-landing__stage {
    display: flex;
    flex-direction: column;
    width: min(100%, 520px);
    margin: 0 auto;
    min-height: calc(100svh - 92px);
}

.umka-landing__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}

.umka-landing__brand {
    flex: 1;
    min-width: 0;
    max-width: 58%;
}

.umka-landing__logo {
    width: 100%;
    max-width: 136px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 14px rgba(30, 60, 120, 0.18));
}

.umka-landing__tagline {
    margin: 4px 0 0;
    font-size: clamp(10px, 2.8vw, 13px);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: #1a3d7a;
}

.umka-landing__nav {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-shrink: 0;
}

.umka-landing__nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: clamp(58px, 16vw, 72px);
    text-decoration: none;
    color: #1a3d7a;
}

.umka-landing__nav-btn img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(30, 60, 120, 0.2));
}

.umka-landing__nav-btn span {
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    margin-top: 2px;
}

/* Подпись снаружи; если текст уже на PNG — дубль скрыт */
.umka-landing__nav-btn:has(img[alt=""]) span,
.umka-landing__nav-btn img[alt=""] + span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.umka-landing__nav-btn--user {
    padding: 6px 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(30, 60, 120, 0.12);
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

.umka-landing__user-name {
    display: block;
    color: #1a3d7a;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 72px;
}

.umka-landing__user-exit {
    display: block;
    margin-top: 2px;
    color: rgba(26, 61, 122, 0.65);
    text-decoration: none;
}

.umka-landing__hero {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-end;
    margin-top: 0;
    padding: 0 6px 10px;
    min-height: 0;
}

.umka-landing__owl {
    position: relative;
    z-index: 2;
    display: block;
    width: min(43vw, 185px);
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    max-width: none;
    margin: auto auto -24% auto;
    transform: translateX(22%);
    pointer-events: none;
    filter: drop-shadow(0 8px 20px rgba(30, 60, 120, 0.2));
}

.umka-landing__actions {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 2.5vw, 12px);
}

.umka-landing__action {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: transform 0.15s;
}

.umka-landing__action:active {
    transform: scale(0.98);
}

.umka-landing__action img,
.umka-landing__action-img {
    width: 100%;
    height: auto;
    aspect-ratio: 706 / 439;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 8px 22px rgba(20, 50, 100, 0.28));
}

.umka-landing__search-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0 16% 0 40%;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: transparent;
    caret-color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    outline: none;
}

.umka-landing__search-input:focus,
.umka-landing__search-input:not(:placeholder-shown) {
    color: #2a2a2a;
    background: #fff;
    caret-color: #2a2a2a;
}

.umka-landing__search-input::placeholder {
    color: transparent;
}

.umka-landing__search-input:focus::placeholder {
    color: rgba(45, 45, 45, 0.55);
}

@media (min-width: 901px) {
    .umka-landing {
        padding: 16px 20px 10px;
    }

    .umka-landing__stage {
        width: min(92vw, 900px);
        min-height: 520px;
    }

    .umka-landing__logo {
        max-width: 200px;
    }

    .umka-landing__tagline {
        font-size: 14px;
    }

    .umka-landing__nav-btn {
        width: 88px;
    }

    .umka-landing__nav-btn span {
        font-size: 12px;
    }

    .umka-landing__hero {
        margin-top: 16px;
        padding: 0 12px 14px;
    }

    .umka-landing__owl {
        width: min(30vw, 260px);
        margin-bottom: -24%;
        transform: translateX(20%);
    }

    .umka-landing__actions {
        gap: 14px;
    }
}

.umka-body--home .site-main {
    padding-top: 4px;
}

/* Final home hero: a compact banner like the provided phone screenshot. */
.umka-body--home .bg-fantasy {
    display: none;
}

.umka-landing {
    padding: 14px 12px 10px;
}

.umka-landing__banner {
    position: relative;
    width: min(100%, 448px);
    margin: 0 auto;
    aspect-ratio: 448 / 255;
    overflow: hidden;
    background: #7ec8e8;
    box-shadow: 0 10px 26px rgba(60, 70, 150, 0.12);
}

.umka-landing__banner-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.umka-landing__hotspot {
    position: absolute;
    z-index: 2;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: transparent;
    font: inherit;
    cursor: pointer;
}

.umka-landing__hotspot--settings {
    top: 6%;
    right: 13.5%;
    width: 9%;
    height: 15%;
}

.umka-landing__hotspot--login {
    top: 6%;
    right: 3%;
    width: 9%;
    height: 15%;
}

.umka-landing__hotspot--ai {
    left: 21%;
    bottom: 5%;
    width: 29%;
    height: 34%;
}

.umka-landing__hotspot--search {
    right: 12%;
    bottom: 5%;
    width: 31%;
    height: 34%;
}

.umka-landing__hotspot--search .umka-landing__search-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: transparent;
    caret-color: #fff;
    outline: none;
}

.umka-landing__hotspot--search .umka-landing__search-input:focus {
    background: rgba(0, 90, 110, 0.18);
}

@media (min-width: 901px) {
    .umka-landing {
        padding: 18px 20px 12px;
    }

    .umka-landing__banner {
        width: min(92vw, 900px);
    }
}

/* Layered header: same composition as the provided compact screenshot. */
.umka-landing__banner--layers {
    aspect-ratio: 1672 / 941;
    background: #7ec8e8;
    isolation: isolate;
}

.umka-layer {
    position: absolute;
    display: block;
    margin: 0;
    padding: 0;
}

.umka-layer img {
    display: block;
    width: 100%;
    height: auto;
}

.umka-layer--bg {
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.umka-layer--brand {
    z-index: 4;
    top: 4%;
    left: 4%;
    width: 32%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.umka-layer__logo {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: -6%;
    filter: drop-shadow(0 3px 8px rgba(30, 60, 120, 0.18));
}

.umka-layer__tagline {
    margin: 0 14px 0;
    padding-left: 4px;
    color: #1a3d7a;
    font-size: clamp(8px, 2.1vw, 11px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
}

.umka-layer--settings,
.umka-layer--login {
    z-index: 4;
    top: 6.3%;
    width: 8.2%;
    height: auto;
    text-decoration: none;
    filter: drop-shadow(0 3px 8px rgba(30, 60, 120, 0.18));
}

.umka-layer--settings {
    right: 13.8%;
}

.umka-layer--login {
    right: 4.2%;
}

.umka-layer--user {
    min-height: 15%;
    padding: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #1a3d7a;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
}

.umka-layer--actions {
    z-index: 3;
    top: 58.5%;
    left: 18%;
    right: 18%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
}

.umka-layer--ai,
.umka-layer--search {
    position: relative;
    top: auto;
    left: auto;
    flex: 0 1 calc((100% - 16px) / 2);
    width: calc((100% - 16px) / 2);
    min-width: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    filter: drop-shadow(0 4px 10px rgba(20, 50, 100, 0.22));
}

.umka-layer--owl {
    z-index: 6;
    top: 14%;
    left: 43%;
    width: 30%;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(30, 60, 120, 0.18));
    pointer-events: none;
}

.umka-layer--search .umka-landing__search-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 9px 26px 9px 20%;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: transparent;
    caret-color: #2a2a2a;
    font-family: inherit;
    font-size: clamp(11px, 2.5vw, 14px);
    font-weight: 700;
    outline: none;
    transition: background 0.15s, color 0.15s;
}

.umka-layer--search .umka-landing__search-input:focus,
.umka-layer--search .umka-landing__search-input:not(:placeholder-shown) {
    background: #fff;
    color: #2a2a2a;
    caret-color: #2a2a2a;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.umka-layer--search .umka-landing__search-input::placeholder {
    color: transparent;
}

.umka-layer--search .umka-landing__search-input:focus::placeholder {
    color: rgba(45, 45, 45, 0.55);
}

@media (max-width: 380px) {
    .umka-layer--brand {
        width: 34%;
    }

    .umka-layer__tagline {
        font-size: 7px;
    }

    .umka-layer--owl {
        top: 13.5%;
        width: 31%;
    }

    .umka-layer--actions {
        gap: 14px;
        left: 16%;
        right: 16%;
    }

    .umka-layer--ai,
    .umka-layer--search {
        flex-basis: calc((100% - 14px) / 2);
        width: calc((100% - 14px) / 2);
    }

    .umka-layer--search .umka-landing__search-input {
        padding: 8px 22px 8px 17%;
        font-size: 11px;
    }
}

.site-header {
    position: relative;
    z-index: 10;
    padding: 16px 20px 8px;
}

.site-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 16px;
}

.brand__logo {
    height: 72px;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(120, 80, 200, 0.25));
}

.settings-glass {
    display: none;
}

.header-mascot {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
}

.header-mascot__owl {
    height: 64px;
    width: auto;
}

.header-mascot__ai {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 10px;
    border-radius: 50%;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 2px solid var(--glass-border);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.header-mascot__ai:hover {
    transform: scale(1.06);
    box-shadow: 0 16px 48px rgba(100, 60, 160, 0.28);
}

.header-mascot__ai img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.header-mascot__ai span {
    font-size: 11px;
    font-weight: 900;
    color: var(--purple);
}

.search-glass {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 520px;
    width: 100%;
    justify-self: center;
    padding: 14px 24px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(232, 212, 255, 0.5));
    backdrop-filter: blur(14px);
    border: 3px solid rgba(180, 140, 255, 0.45);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-glass__icon {
    flex-shrink: 0;
    opacity: 0.85;
}

.search-glass__input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--purple-dark);
    letter-spacing: 0.04em;
    outline: none;
    min-width: 0;
}

.search-glass__input::placeholder {
    color: rgba(61, 32, 102, 0.55);
}

.login-glass {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(180, 140, 255, 0.4);
    color: var(--purple);
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
}

.login-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(100, 60, 160, 0.25);
}

.login-glass__mobile-img {
    display: none;
}

.header-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding: 10px 14px;
    border-radius: 18px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(180, 140, 255, 0.4);
    box-shadow: var(--shadow);
    max-width: 140px;
}

.header-user__name {
    font-size: 13px;
    font-weight: 900;
    color: var(--purple);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.header-user__name:hover {
    text-decoration: underline;
}

.header-user__logout {
    font-size: 11px;
    font-weight: 800;
    color: rgba(61, 32, 102, 0.65);
    text-decoration: none;
}

.header-user__logout:hover {
    color: var(--purple);
}

.user-auth {
    display: flex;
    justify-content: center;
    padding: 24px 16px 48px;
}

.user-auth__card {
    width: 100%;
    max-width: 420px;
    padding: 32px 28px;
    text-align: center;
}

.user-auth__owl {
    width: 88px;
    height: auto;
    margin-bottom: 12px;
}

.user-auth__card h1 {
    margin: 0 0 8px;
    font-size: 1.75rem;
}

.user-auth__card > p {
    margin: 0 0 20px;
    opacity: 0.85;
}

.user-auth__switch {
    margin: 20px 0 8px;
    font-size: 14px;
    font-weight: 700;
}

.user-auth__back {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--purple);
}

.site-main {
    position: relative;
    z-index: 5;
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 20px 48px;
}

.site-footer {
    text-align: center;
    padding: 24px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(61, 32, 102, 0.6);
    position: relative;
    z-index: 5;
}

/* Feed */
.feed {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: start;
}

.home-categories {
    display: none;
}

.mobile-categories-nav {
    display: none;
}

.categories-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(123, 79, 212, 0.5);
    background: rgba(255, 255, 255, 0.92);
    color: var(--purple);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.15s;
}

.categories-btn:hover {
    transform: scale(1.04);
}

.categories-panel {
    margin-top: 12px;
    padding: 12px;
    border-radius: var(--radius-xl);
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 2px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.categories-panel__link {
    padding: 8px 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    color: var(--purple-dark);
    font-size: 14px;
}

.categories-panel__link:hover,
.categories-panel__link.is-active {
    background: rgba(123, 79, 212, 0.15);
    color: var(--purple);
}

.feed__hint {
    font-weight: 800;
    margin: 0 0 16px;
}

.feed__empty {
    text-align: center;
    padding: 48px 24px;
    background: var(--glass);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
}

.feed__empty-img {
    max-width: 180px;
    margin-bottom: 16px;
}

.feed__empty a {
    color: var(--purple);
    font-weight: 900;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.video-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 2px solid rgba(255, 255, 255, 0.9);
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(100, 60, 160, 0.22);
}

.video-card__thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--lavender);
}

.video-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card__body {
    padding: 16px 18px 20px;
}

.video-card__title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.3;
    color: var(--purple-dark);
}

.video-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 800;
}

.pill--age {
    background: rgba(200, 170, 255, 0.45);
    color: var(--purple-dark);
}

.pill--cat {
    background: rgba(180, 230, 255, 0.6);
    color: var(--purple-dark);
}

.video-card__views,
.video-page__views {
    font-size: 13px;
    font-weight: 700;
    color: rgba(61, 32, 102, 0.55);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.pagination__btn {
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    background: var(--glass);
    border: 2px solid rgba(123, 79, 212, 0.35);
    color: var(--purple);
    font-weight: 800;
    text-decoration: none;
}

.pagination__info {
    font-weight: 800;
}

.glass-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    border-radius: var(--radius-xl);
    border: 2px solid var(--glass-border);
    box-shadow: var(--shadow);
    padding: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-family: var(--font);
    font-weight: 900;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, filter 0.15s;
}

.btn--primary {
    background: linear-gradient(135deg, #b88cff, #7b4fd4);
    color: #fff;
    box-shadow: 0 6px 20px rgba(123, 79, 212, 0.4);
}

.btn--primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.7);
    color: var(--purple);
    border: 2px solid rgba(123, 79, 212, 0.35);
}

.btn--danger {
    background: #ff8fab;
    color: #fff;
}

.btn--sm {
    padding: 8px 14px;
    font-size: 13px;
}

@media (max-width: 900px) {
    body.umka-body:not(.umka-body--home) {
        background: transparent;
    }

    body.umka-body:not(.umka-body--home) .bg-fantasy {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 0;
        background: url('../images/phone/mobile-bg.PNG?v=3') center top / cover no-repeat;
        background-color: #7ec8e8;
    }

    .site-header {
        padding: 10px 12px 0;
    }

    .umka-body:not(.umka-body--home) .site-header__inner {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: auto auto;
        max-width: none;
    }

    .umka-body:not(.umka-body--home) .brand {
        grid-column: 1 / 3;
        grid-row: 1;
        text-align: left;
    }

    .umka-body:not(.umka-body--home) .brand__tagline {
        display: none;
    }

    .umka-body:not(.umka-body--home) .brand__logo {
        content: url('../images/phone/Umka_home.PNG');
        max-height: 88px;
        object-position: left center;
    }

    .umka-body:not(.umka-body--home) .settings-glass {
        grid-column: 3;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 76px;
        justify-self: center;
        text-decoration: none;
    }

    .umka-body:not(.umka-body--home) .settings-glass__img {
        width: 100%;
        height: auto;
        display: block;
    }

    .umka-body:not(.umka-body--home) .login-glass {
        display: flex;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .umka-body:not(.umka-body--home) .login-glass svg,
    .umka-body:not(.umka-body--home) .login-glass span {
        display: none;
    }

    .umka-body:not(.umka-body--home) .login-glass__mobile-img {
        display: block;
        width: 100%;
        height: auto;
    }

    .umka-body:not(.umka-body--home) .login-glass,
    .umka-body:not(.umka-body--home) .header-user {
        grid-column: 4;
    }

    .umka-body:not(.umka-body--home) .header-mascot {
        grid-column: 1 / 3;
        grid-row: 2;
        display: flex;
        justify-self: stretch;
    }

    .umka-body:not(.umka-body--home) .header-mascot__owl {
        display: none;
    }

    .umka-body:not(.umka-body--home) .header-mascot__ai {
        width: 100%;
        height: 108px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: url('../images/phone/AI_Button.PNG') center / contain no-repeat;
        box-shadow: none;
        backdrop-filter: none;
    }

    .umka-body:not(.umka-body--home) .header-mascot__ai img,
    .umka-body:not(.umka-body--home) .header-mascot__ai span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .umka-body:not(.umka-body--home) .search-glass {
        grid-column: 3 / 5;
        grid-row: 2;
        display: flex;
        max-width: none;
        min-height: 108px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: url('../images/phone/search.PNG') center / contain no-repeat;
        box-shadow: none;
        backdrop-filter: none;
    }

    .umka-body:not(.umka-body--home) .search-glass__icon {
        display: none;
    }

    .umka-body:not(.umka-body--home) .search-glass__input {
        width: 100%;
        height: 100%;
        padding: 0 10px;
        color: transparent;
        caret-color: var(--purple);
        font-size: 16px;
    }

    .umka-body:not(.umka-body--home) .search-glass__input:focus {
        color: var(--purple-dark);
        background: rgba(255, 255, 255, 0.88);
        border-radius: var(--radius-pill);
    }

    .umka-body:not(.umka-body--home) .search-glass__input::placeholder {
        color: transparent;
    }

    .site-main {
        padding: 8px 14px 112px;
    }

    .feed {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .feed__sidebar {
        display: none;
    }

    .categories-btn {
        display: none;
    }

    .feed__hint {
        padding: 8px 12px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: blur(8px);
    }

    .feed__empty {
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(10px);
    }

    .video-card {
        background: rgba(255, 255, 255, 0.94);
        border: 2px solid rgba(255, 255, 255, 0.95);
        box-shadow: 0 10px 28px rgba(30, 60, 120, 0.18);
    }

    .home-categories {
        display: block;
        width: 100%;
        padding: 16px;
        border-radius: var(--radius-xl);
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(12px);
        border: 2px solid rgba(255, 255, 255, 0.95);
        box-shadow: 0 10px 28px rgba(30, 60, 120, 0.15);
    }

    .home-categories__title {
        margin: 0 0 12px;
        text-align: center;
        font-size: 15px;
        font-weight: 900;
        letter-spacing: 0.06em;
        color: rgba(26, 61, 122, 0.75);
        text-transform: uppercase;
    }

    .home-categories__active {
        margin: -4px 0 12px;
        text-align: center;
        font-size: 13px;
        font-weight: 900;
        color: #2a5fc4;
    }

    .home-categories__clear {
        margin-left: 6px;
        color: var(--purple-dark);
        text-decoration: none;
    }

    .category-list.category-list--home {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .category-list--home .category-list__item {
        height: 100%;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding: 12px 8px;
        text-align: center;
    }

    .category-list--home .category-list__item:hover {
        transform: none;
    }

    .category-list--home .category-list__icon {
        width: 46px;
        height: 46px;
    }

    .category-list--home .category-list__name {
        font-size: 14px;
        line-height: 1.2;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 18px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination__btn {
        background: rgba(255, 255, 255, 0.9);
    }

    .mobile-categories-nav {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        z-index: 850;
        display: flex;
        align-items: center;
        gap: 4px;
        width: 100%;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(14px);
        border-top: 2px solid rgba(255, 255, 255, 0.9);
        box-shadow: 0 -10px 28px rgba(30, 60, 120, 0.16);
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        will-change: top;
    }

    .mobile-categories-nav.is-viewport-locked {
        top: var(--mobile-categories-top);
        bottom: auto;
    }

    .mobile-categories-nav__item {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 66px;
        border-radius: 18px;
        text-decoration: none;
        transition: transform 0.15s, background 0.15s;
    }

    .mobile-categories-nav__item:active {
        transform: scale(0.94);
    }

    .mobile-categories-nav__item.is-active {
        background: rgba(42, 95, 196, 0.12);
    }

    .mobile-categories-nav__icon {
        width: clamp(54px, 18vw, 72px);
        height: auto;
        max-height: 72px;
        object-fit: contain;
        filter: drop-shadow(0 3px 10px rgba(30, 60, 120, 0.18));
    }


    .umka-body--home .mobile-categories-nav {
        padding-top: 4px;
        padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
    }

    .umka-body--home .mobile-categories-nav__item {
        min-height: 54px;
        border-radius: 14px;
    }

    .umka-body--home .mobile-categories-nav__icon {
        width: clamp(42px, 14vw, 56px);
        max-height: 56px;
    }

    .mobile-categories-nav__fallback {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 54px;
        min-height: 54px;
        padding: 6px;
        border-radius: 14px;
        background: linear-gradient(135deg, #d4ecff, #b8e8f0);
        color: #1a3d7a;
        font-size: 10px;
        font-weight: 900;
        text-align: center;
        line-height: 1.1;
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 8px 10px 0;
    }

    .site-header__inner {
        grid-template-columns: 68px 1fr 68px;
        gap: 6px;
    }

    .settings-glass,
    .login-glass {
        max-width: 68px;
    }

    .brand__logo {
        max-height: 68px;
    }

    .brand__tagline {
        font-size: 9px;
        max-width: 190px;
    }

    .umka-landing__logo {
        max-width: 132px;
    }

    .umka-landing__owl {
        width: 54%;
        max-width: 195px;
        margin-bottom: -28%;
        transform: translateX(24%);
    }

    .umka-body:not(.umka-body--home) .header-mascot__ai {
        height: 100px;
    }

    .umka-body:not(.umka-body--home) .search-glass {
        min-height: 100px;
    }

    .site-main {
        padding: 6px 10px 104px;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .video-card {
        border-radius: 22px;
    }

    .video-card__thumb {
        aspect-ratio: 16 / 9;
    }

    .video-card__body {
        padding: 14px 14px 16px;
    }

    .video-card__title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .video-card__meta {
        gap: 8px;
    }

    .home-categories {
        padding: 14px;
        border-radius: 22px;
    }

    .category-list.category-list--home {
        gap: 8px;
    }

    .pagination {
        gap: 10px;
        margin-top: 24px;
    }

    .pagination__btn {
        padding: 9px 16px;
    }

    .site-footer {
        display: none;
        padding: 18px 12px;
        font-size: 12px;
    }

    .ai-modal {
        align-items: flex-end;
        padding: 8px;
    }

    .ai-modal__dialog {
        width: 100%;
        max-height: calc(100dvh - 16px);
        padding: 22px 14px 14px;
        border-radius: 24px 24px 18px 18px;
    }

    .ai-modal__messages {
        max-height: 32vh;
    }

    .ai-modal__form {
        flex-direction: column;
    }

    .ai-modal__send {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .mobile-categories-nav {
        gap: 2px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .mobile-categories-nav__item {
        min-height: 58px;
        border-radius: 14px;
    }

    .mobile-categories-nav__icon {
        width: clamp(48px, 17vw, 60px);
    }
}

body.ai-modal-open {
    overflow: hidden;
}

.ai-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ai-modal[hidden] {
    display: none !important;
}

.ai-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(45, 26, 80, 0.45);
    backdrop-filter: blur(4px);
}

.ai-modal__dialog {
    position: relative;
    width: min(440px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(160deg, #fff 0%, #f5ecff 100%);
    border-radius: var(--radius-xl);
    border: 3px solid rgba(180, 140, 255, 0.5);
    box-shadow: 0 24px 60px rgba(80, 40, 140, 0.35);
    padding: 24px 20px 20px;
}

.ai-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(123, 79, 212, 0.15);
    color: var(--purple-dark);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.ai-modal__logo {
    display: block;
    height: 56px;
    margin: 0 auto 8px;
}

.ai-modal__logo--owl {
    height: 72px;
}

.ai-modal__title {
    margin: 0 0 6px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 900;
}

.ai-modal__subtitle {
    margin: 0 0 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: rgba(61, 32, 102, 0.7);
    line-height: 1.4;
}

.ai-modal__messages {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    padding: 4px;
}

.ai-msg {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    max-width: 92%;
}

.ai-msg--bot {
    align-self: flex-start;
    background: rgba(232, 212, 255, 0.7);
    color: var(--purple-dark);
}

.ai-msg--user {
    align-self: flex-end;
    background: linear-gradient(135deg, #b88cff, #7b4fd4);
    color: #fff;
}

.ai-msg--typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    border-radius: 50%;
    background: var(--purple);
    animation: ai-dot 1s infinite ease-in-out;
}

.ai-msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-msg--typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ai-dot {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

.ai-modal__status {
    margin: 0 0 10px;
    min-height: 1.2em;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: rgba(61, 32, 102, 0.75);
}

.ai-modal__status--rec { color: #c62828; }
.ai-modal__status--busy { color: var(--purple); }
.ai-modal__status--err { color: #c62828; }

.ai-modal__voice-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 8px 0 12px;
}

.ai-modal__mic {
    width: 88px;
    height: 88px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: linear-gradient(145deg, #c9a6ff, #7b4fd4);
    box-shadow: 0 8px 24px rgba(123, 79, 212, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
    touch-action: none;
}

.ai-modal__mic:hover { transform: scale(1.04); }
.ai-modal__mic:disabled { opacity: 0.55; cursor: wait; }

.ai-modal__mic-icon--play {
    width: 0;
    height: 0;
    margin-left: 8px;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 28px solid #fff;
}

.ai-modal__mic-icon--stop {
    display: none;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #fff;
}

.ai-modal__mic--recording,
.ai-modal__mic--live {
    animation: ai-mic-pulse 0.9s ease-in-out infinite;
    box-shadow: 0 0 0 6px rgba(76, 175, 80, 0.35);
}

.ai-modal__mic--live {
    background: linear-gradient(145deg, #81c784, #388e3c);
}

.ai-modal__mic--live .ai-modal__mic-icon--play {
    display: none;
}

.ai-modal__mic--live .ai-modal__mic-icon--stop {
    display: block;
}

@keyframes ai-mic-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.ai-modal__sound {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(123, 79, 212, 0.35);
    border-radius: 50%;
    background: #fff;
    color: var(--purple);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-modal__sound--off {
    color: rgba(123, 79, 212, 0.35);
    border-color: rgba(123, 79, 212, 0.2);
}

.ai-modal__text-fallback {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
}

.ai-modal__text-fallback summary {
    cursor: pointer;
    color: var(--purple);
    text-align: center;
    list-style: none;
}

.ai-modal__text-fallback summary::-webkit-details-marker { display: none; }

.ai-modal__text-fallback[open] summary { margin-bottom: 10px; }

.ai-msg {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.ai-msg__text {
    flex: 1;
}

.ai-msg__replay {
    flex-shrink: 0;
    border: none;
    background: rgba(123, 79, 212, 0.12);
    color: var(--purple);
    border-radius: 8px;
    padding: 4px 6px;
    cursor: pointer;
}

.ai-msg__replay:hover {
    background: rgba(123, 79, 212, 0.22);
}

.ai-modal__form {
    display: flex;
    gap: 8px;
}

.ai-modal__input {
    flex: 1;
    padding: 12px 14px;
    border-radius: var(--radius-pill);
    border: 2px solid rgba(123, 79, 212, 0.35);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
}

.ai-modal__send {
    flex-shrink: 0;
    padding: 12px 18px;
}

.ai-prompt-label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.ai-prompt-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border-radius: 14px;
    border: 2px solid rgba(123, 79, 212, 0.35);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    resize: vertical;
}

.ai-prompt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.ai-prompt-status {
    margin: 12px 0 0;
    font-size: 14px;
    font-weight: 700;
}

.ai-prompt-status--ok { color: #2e7d32; }
.ai-prompt-status--err { color: #c62828; }

body.category-modal-open {
    overflow: hidden;
}

.feed__active-cat {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 800;
    color: var(--purple);
    text-align: center;
}

.feed__active-cat-clear {
    margin-left: 6px;
    color: var(--purple-dark);
    text-decoration: none;
    font-weight: 900;
}

.category-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.category-modal[hidden] {
    display: none !important;
}

.category-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(45, 26, 80, 0.4);
    backdrop-filter: blur(3px);
}

.category-modal__sheet {
    position: relative;
    width: min(360px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8f4ff 0%, #efe8ff 100%);
    border-radius: 24px;
    border: 3px solid rgba(180, 150, 230, 0.5);
    box-shadow: 0 20px 50px rgba(80, 50, 140, 0.3);
    padding: 20px 16px 16px;
}

.category-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(123, 79, 212, 0.15);
    font-size: 22px;
    cursor: pointer;
    color: var(--purple-dark);
}

.category-modal__title {
    margin: 0 0 16px;
    text-align: center;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: rgba(61, 32, 102, 0.65);
    text-transform: uppercase;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-list__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--purple-dark);
    background: rgba(255, 255, 255, 0.65);
    border: 2px solid transparent;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.category-list__item:hover {
    background: #fff;
    border-color: rgba(123, 79, 212, 0.35);
    transform: translateX(4px);
}

.category-list__item.is-active {
    background: #fff;
    border-color: var(--purple);
    box-shadow: 0 4px 16px rgba(123, 79, 212, 0.2);
}

.category-list__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.category-list__icon--all,
.category-list__icon--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8d4ff, #d4ecff);
    font-size: 22px;
}

.category-list__name {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.02em;
}
