html[data-mobile][data-mtheme] #mRoot .m-header {
    display:grid!important;
    grid-template-columns:32fr 32fr 64fr 136fr!important;
    align-items:center!important;
    gap:8px!important;
    margin:8px 12px 0!important;
    padding:0!important;
    min-height:20px!important;
    position:relative!important;
}
html[data-mobile][data-mtheme] #mRoot .m-header .m-title-wrap,
html[data-mobile][data-mtheme] #mRoot .m-header #mThemeQuick,
html[data-mobile][data-mtheme] #mRoot .m-header .m-diamonds,
html[data-mobile][data-mtheme] #mRoot .m-header #mLivesChip.m-lives[id] {
    justify-self:center!important;
    position:relative!important;
    inset:auto!important;
    margin:0!important;
    transform:none!important;
    zoom:1!important;
    box-sizing:border-box!important;
    height:32px!important;
    min-height:32px!important;
    max-height:32px!important;
}
html[data-mobile][data-mtheme] #mRoot .m-header .m-title-wrap {
    grid-area:1/1!important;
    width:32px!important;
    min-width:32px!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border:0!important;
    border-radius:0!important;
    background:none!important;
    box-shadow:none!important;
}
html[data-mobile][data-mtheme] #mRoot[data-mpage] .m-header .m-title-wrap::before {
    content:""!important;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 26'%3E%3Cpath d='M3 22 9 5q1-3 4-3h1q2 0 3 3l4 12 4-12q1-3 4-3h1q2 0 1 3l-6 17q-1 3-4 3h-1q-2 0-3-3l-4-12-4 12q-1 3-4 3H4q-2 0-1-3Z'/%3E%3C/svg%3E") center / contain no-repeat!important;
    position:static!important;
    width:29px!important;
    height:24px!important;
    flex:none!important;
    background:linear-gradient(145deg,#b6eaff,#398dff)!important;
    filter:none!important;
    text-shadow:none!important;
    transform:none!important;
}
html[data-mobile][data-mtheme="light"] #mRoot[data-mpage] .m-header .m-title-wrap::before {
    background:linear-gradient(145deg,#bdffd9,#79dfa4 50%,#48b77d)!important;
}
html[data-mobile][data-mtheme] #mRoot .m-header .m-title {
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip-path:inset(50%)!important;
    white-space:nowrap!important;
}
html[data-mobile][data-mtheme] #mRoot .m-header #mThemeQuick {
    grid-area:1/2!important;
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    width:32px!important;
    min-width:32px!important;
    max-width:32px!important;
    border-radius:50%!important;
    padding:0!important;
    font-size:19px!important;
}
html[data-mobile][data-mtheme] #mRoot .m-header .m-diamonds {
    grid-area:1/3!important;
    width:64px!important;
    min-width:64px!important;
    max-width:64px!important;
}
html[data-mobile][data-mtheme] #mRoot .m-header #mLivesChip.m-lives[id] {
    grid-area:1/4!important;
    width:136px!important;
    min-width:136px!important;
    max-width:136px!important;
}
html[data-mobile][data-mtheme] #mRoot .m-header #mLivesChip.m-lives-unlimited::after {
    inset:0!important;
    background-size:contain!important;
    transform:none!important;
}
html[data-mobile][data-mtheme] #mRoot .m-header #mBack {
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:20px!important;
    min-width:20px!important;
    height:20px!important;
    padding:0!important;
    margin:0!important;
    background:transparent!important;
    border:0!important;
}

html[data-mobile][data-mtheme] #mRoot[data-mpage] .m-header .m-title-wrap::before {
    transform:translateX(-10%)!important;
}
@media(max-width:459px) {
    html[data-mobile][data-mtheme] #mRoot .m-header .m-title-wrap,
    html[data-mobile][data-mtheme] #mRoot .m-header #mThemeQuick,
    html[data-mobile][data-mtheme] #mRoot .m-header .m-diamonds,
    html[data-mobile][data-mtheme] #mRoot .m-header #mLivesChip.m-lives[id] {zoom:1!important}
}
@media(max-width:379px) {
    html[data-mobile][data-mtheme] #mRoot .m-header .m-title-wrap,
    html[data-mobile][data-mtheme] #mRoot .m-header #mThemeQuick,
    html[data-mobile][data-mtheme] #mRoot .m-header .m-diamonds,
    html[data-mobile][data-mtheme] #mRoot .m-header #mLivesChip.m-lives[id] {zoom:1!important}
}
@supports(zoom:calc(1px / 1px)) {
    html[data-mobile][data-mtheme] #mRoot .m-header .m-title-wrap,
    html[data-mobile][data-mtheme] #mRoot .m-header #mThemeQuick,
    html[data-mobile][data-mtheme] #mRoot .m-header .m-diamonds,
    html[data-mobile][data-mtheme] #mRoot .m-header #mLivesChip.m-lives[id] {
        zoom:clamp(.5,calc((100vw - 48px) / 264px),1)!important;
    }
}
html[data-mobile][data-mtheme] #mRoot .m-header #mLivesChip.m-lives[id] {
    overflow:hidden!important;
}

/* Keep these three controls at the same visible size on every page. */
html[data-mobile][data-mtheme] #mRoot[data-mpage] .m-header #mThemeQuick[id],
html[data-mobile][data-mtheme] #mRoot[data-mpage] .m-header .m-diamonds[class],
html[data-mobile][data-mtheme] #mRoot[data-mpage] .m-header #mLivesChip.m-lives[id] {
    zoom:calc(.6 / var(--phone-scale,1))!important;
}
html[data-mobile][data-mtheme] #mRoot[data-mpage] .m-header #mLivesChip.m-lives[id][class] {
    zoom:calc(.6 / var(--phone-scale,1))!important;
}


/* HSKNOVA_HEADER_FINAL_START */

/* N */
html[data-mobile][data-mtheme] #mRoot[data-mpage] .m-header .m-title-wrap {
    transform: translate(4px, -2px) !important;
}

/* Sun */
html[data-mobile][data-mtheme] #mRoot[data-mpage] .m-header #mThemeQuick {
    transform: translate(144px, -7px) scale(1.12) !important;
    transform-origin: center center !important;
}

/* Diamonds */
html[data-mobile][data-mtheme] #mRoot[data-mpage] .m-header .m-diamonds {
    transform: translate(112px, -7px) scale(1.12) !important;
    transform-origin: center center !important;
}

/* Energy */
html[data-mobile][data-mtheme] #mRoot[data-mpage] .m-header #mLivesChip.m-lives[id][class] {
    transform: translate(42px, -10px) scale(1.2) !important;
    transform-origin: center center !important;
}

/* HSKNOVA_HEADER_FINAL_END */


/* HSKNOVA_CLASSIC_HEADER_ALIGNMENT_START */

html[data-mobile][data-layout="classic"][data-mtheme] #mRoot[data-mpage="home"] .m-header .m-title-wrap {
    position: relative !important;
    left: -11px !important;
    top: -10px !important;
}

html[data-mobile][data-layout="classic"][data-mtheme] #mRoot[data-mpage="home"] .m-header #mThemeQuick {
    position: relative !important;
    left: -12px !important;
    top: -14px !important;
}

html[data-mobile][data-layout="classic"][data-mtheme] #mRoot[data-mpage="home"] .m-header .m-diamonds {
    position: relative !important;
    left: -6px !important;
    top: -14px !important;
}

html[data-mobile][data-layout="classic"][data-mtheme] #mRoot[data-mpage="home"] .m-header #mLivesChip.m-lives[id][class] {
    position: relative !important;
    left: 7px !important;
    top: -14px !important;
}

/* HSKNOVA_CLASSIC_HEADER_ALIGNMENT_END */


/* HSKNOVA_FREE_HEADER_START */

/* Free diamonds */
html[data-mobile][data-mtheme] #mRoot[data-mpage]:has(#mLivesChip.m-lives:not(.m-lives-plus):not(.m-lives-unlimited)) .m-header .m-diamonds {
    transform: translate(112px, -8px) scale(1.07) !important;
    transform-origin: center center !important;
}

/* Free energy */
html[data-mobile][data-mtheme] #mRoot[data-mpage] .m-header #mLivesChip.m-lives:not(.m-lives-plus):not(.m-lives-unlimited)[id][class] {
    transform: translate(42px, -8px) scale(1.15) !important;
    transform-origin: center center !important;
}

/* HSKNOVA_FREE_HEADER_END */


/* HSKNOVA_PATH_SCREEN_START */

/* Поднимаем экран, убирая пустоту */
html[data-mobile] #mRoot[data-mpage="path"] .path-overview {
    transform: none !important;
    margin-top: -54px !important;
    background-size: 100% 100%, 100% auto, auto !important;
    background-repeat: no-repeat, no-repeat, no-repeat !important;
    background-position: center top, center top, center top !important;
}

/* Уменьшаем нижнее пустое пространство */
html[data-mobile] #mRoot[data-mpage="path"] .path-levels {
    margin-bottom: -10px !important;
}

/* Буква N — 9px вправо */
html[data-mobile][data-mtheme] #mRoot[data-mpage="path"] .m-header .m-title-wrap {
    transform: translate(9px, -2px) !important;
}

/* HSKNOVA_PATH_SCREEN_END */


/* HSKNOVA_PATH_BUTTON_FINAL_START */

/* Убираем нижнюю пустоту и предотвращаем обрезание */
html[data-mobile] #mRoot[data-mpage="path"] .path-overview {
    padding-bottom: 0 !important;
    overflow: visible !important;
}

/* Финальное положение кнопки Unlock HSK */
html[data-mobile] #mRoot[data-mpage="path"] .admin-level-primary {
    position: relative !important;
    z-index: 20 !important;
    transform: translateY(10px) scale(0.95) !important;
    transform-origin: center center !important;
}

/* HSKNOVA_PATH_BUTTON_FINAL_END */


/* HSKNOVA_PATH_BACKGROUND_FINAL_START */

/* Убираем дублирование фона на странице Путь HSK */
html[data-mobile] #mRoot[data-mpage="path"] .path-overview {
    background-size: 100% 100%, 100% auto, auto !important;
    background-repeat: no-repeat, no-repeat, no-repeat !important;
    background-position: center top, center top, center top !important;
}

/* HSKNOVA_PATH_BACKGROUND_FINAL_END */

/* HSKNOVA_AIMI_FINAL_START */

html[data-mobile] #mRoot[data-mpage="path"] .path-overview-head {
    position: relative !important;
}

/* Убираем дублирующий фон */
html[data-mobile] #mRoot[data-mpage="path"] .path-overview-head::after {
    content: none !important;
    display: none !important;
}

/* Финальное положение Айми */
html[data-mobile] #mRoot[data-mpage="path"] .path-overview-head::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    right: 0 !important;
    bottom: -10px !important;
    top: auto !important;
    left: auto !important;
    width: 220px !important;
    height: 240px !important;
    background: url('../assets/aimi-path-hero-v2.webp')
        center center / contain no-repeat !important;
    transform: translateX(35px) scale(0.7) !important;
    transform-origin: center bottom !important;
    z-index: 10 !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

/* HSKNOVA_AIMI_FINAL_END */


/* HSKNOVA_PATH_TEXT_FINAL_START */

/* Заголовок и описание */
html[data-mobile] #mRoot[data-mpage="path"]
.path-overview-head > div:first-child {
    transform: translateY(5px) scale(0.95) !important;
    transform-origin: top left !important;
}

/* Индикатор Readiness */
html[data-mobile] #mRoot[data-mpage="path"]
#pathAdaptiveSummary {
    transform: translateY(10px) scale(0.95) !important;
    transform-origin: center center !important;
}

/* HSKNOVA_PATH_TEXT_FINAL_END */


/* HSKNOVA_TASKS_FINAL_START */

/* Разрешаем отображение поверх фоновой области */
html[data-mobile] #mRoot[data-mpage="tasks"] #mBody {
    overflow: visible !important;
}

/* Финальный дизайн раздела Задания */
html[data-mobile] #mRoot[data-mpage="tasks"] .tasks-neon {
    transform: scale(1.05) !important;
    transform-origin: top center !important;
    margin-top: -20px !important;
    position: relative !important;
    z-index: 5 !important;
    overflow: visible !important;
}

/* HSKNOVA_TASKS_FINAL_END */


/* HSKNOVA_PROFILE_BLUE_START */

/* Общий фон мобильного профиля */
html body #mRoot.m-root[data-mpage="profile"] {
    background-color: #0A2444 !important;
}

html body #mRoot.m-root[data-mpage="profile"] #mBody.m-body {
    background-color: #0A2444 !important;
}

html body #mRoot.m-root[data-mpage="profile"] .mp-page {
    background-color: #0A2444 !important;
}

/* Фоновые изображения карточек не изменяем */

/* HSKNOVA_PROFILE_BLUE_END */


/* HSKNOVA_PROFILE_ICONS_START */

/* Центрирование звёздочки Favorites */
#mRoot[data-mpage="profile"] button[onclick="MUI.show('favs')"] > i {
    display: inline-grid !important;
    place-items: center !important;
    text-align: center !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* Центрирование и размер кубка My achievements */
#mRoot[data-mpage="profile"] button[onclick="MUI.show('achv')"] > i {
    display: inline-grid !important;
    place-items: center !important;
    text-align: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    font-size: 0.945em !important;
}

/* HSKNOVA_PROFILE_ICONS_END */


/* HSKNOVA_ACHIEVEMENTS_STAT_START */

/* Верхняя карточка Achievements — не My achievements */

/* Кубок по центру, опущен на 6px */
#mRoot[data-mpage="profile"] .mp-activity button[onclick="MUI.show('achv')"] > i {
    display: grid !important;
    place-items: center !important;
    margin-inline: auto !important;
    transform: translateY(6px) !important;
}

/* Цифра и подпись опущены на 10px */
#mRoot[data-mpage="profile"] .mp-activity button[onclick="MUI.show('achv')"] > b,
#mRoot[data-mpage="profile"] .mp-activity button[onclick="MUI.show('achv')"] > small {
    transform: translateY(10px) !important;
}

/* HSKNOVA_ACHIEVEMENTS_STAT_END */


/* HSKNOVA_GREEN_AIMI_START */

/* Зелёная Айми — финальная версия */
html[data-mobile] body #mRoot.m-root[data-mpage="path"] .path-overview-head::before {
    background: url('../assets/aimi-path-mint-v1.webp')
                center / contain no-repeat !important;
}

/* HSKNOVA_GREEN_AIMI_END */


/* HSKNOVA_PROFILE_LIGHT_MINT_START */

/* Светло-мятный фон только для светлой темы */
html[data-theme="light"] body #mRoot.m-root[data-mpage="profile"] {
    background-color: #D9F7E8 !important;
}

html[data-theme="light"] body #mRoot.m-root[data-mpage="profile"] #mBody.m-body,
html[data-theme="light"] body #mRoot.m-root[data-mpage="profile"] .mp-page {
    background-color: #D9F7E8 !important;
}

/* HSKNOVA_PROFILE_LIGHT_MINT_END */


/* HSKNOVA_PATH_TOP_FINAL_START */

/* Светлая тема: фон раздела Путь к HSK 3.0 */
html[data-theme="light"] #mRoot[data-mpage="path"] .path-overview {
    margin-top: -64px !important;
    padding-top: 10px !important;
    background-size: 105% 105%, 105% auto, auto !important;
    background-position: center top !important;
    overflow: visible !important;
}

/* HSKNOVA_PATH_TOP_FINAL_END */


/* HSKNOVA_AIMI_THEME_START */

/* Тёмная тема — синяя Айми */
html[data-theme="dark"] body #mRoot.m-root[data-mpage="path"] .path-overview-head::before {
    background-image: url('../assets/aimi-path-hero-v2.webp') !important;
}

/* Светлая тема — зелёная Айми */
html[data-theme="light"] body #mRoot.m-root[data-mpage="path"] .path-overview-head::before {
    background-image: url('../assets/aimi-path-mint-v1.webp') !important;
}

/* HSKNOVA_AIMI_THEME_END */


/* HSKNOVA_REFERRAL_MINT_START */

/* Светлая тема — реальный реферальный раздел */
html[data-theme="light"] body #mRoot .mr-page .mr-card,
html[data-theme="light"] body #mRoot .mr-page .mr-stats > div {
    background: #DDF8E8 !important;
    border-color: #8ADBB4 !important;
    color: #174F3B !important;
}

/* Надписи, цифры и значки */
html[data-theme="light"] body #mRoot .mr-page .mr-stats > div i,
html[data-theme="light"] body #mRoot .mr-page .mr-stats > div b,
html[data-theme="light"] body #mRoot .mr-page .mr-stats > div span,
html[data-theme="light"] body #mRoot .mr-page .mr-card label {
    color: #174F3B !important;
}

/* Поля и кнопки реферального кода */
html[data-theme="light"] body #mRoot .mr-page .mr-card input,
html[data-theme="light"] body #mRoot .mr-page .mr-card button {
    background-color: #F2FFF7 !important;
    border-color: #8ADBB4 !important;
    color: #174F3B !important;
}

/* HSKNOVA_REFERRAL_MINT_END */


/* HSKNOVA_INVITE_MINT_START */

/* Светлая тема — поле кода Invite friends */
html[data-theme="light"] body #mRoot #mcReferral {
    background: #DDF8E8 !important;
    color: #174F3B !important;
    border: 1px solid #8ADBB4 !important;
}

/* HSKNOVA_INVITE_MINT_END */
