:root {
    --bg: #e8f0f8;
    --paper: #ffffff;
    --paper2: #f6f9fd;
    --text: #091827;
    --muted: #65758a;
    --line: #c9d6e6;
    --line2: #e3eaf3;
    --primary: #2556d9;
    --primary2: #4f67ea;
    --nav: #263a74;
    --dark: #20334a;
    --green: #1fb84a;
    --blue: #1473c8;
    --orange: #ff741f;
    --danger: #d93042;
    --success: #118441;
    --warning: #9b6400;
}

* {
    box-sizing: border-box
}

html,body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Arial,Helvetica,sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.45
}

a {
    color: var(--blue);
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

img {
    max-width: 100%
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 14px
}

.simple-page {
    padding: 22px 14px;
    min-height: 70vh
}

.site-head {
    background: #fff;
    border-top: 4px solid #253fc8;
    border-bottom: 1px solid var(--line)
}

.brand-line {
    min-height: 86px;
    display: grid;
    grid-template-columns: auto minmax(300px,1fr) 94px;
    gap: 14px;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
    background: #fff
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #0d58a5;
    font-size: 26px;
    font-weight: 900;
    white-space: nowrap
}

.brand:hover {
    text-decoration: none
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: #146cc2;
    color: #fff;
    border: 2px solid #78a7f8;
    font-size: 14px;
    font-weight: 900
}

.header-banners {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
    align-items: center
}

.online-cube {
    display: grid;
    place-items: center;
    height: 62px;
    background: #112340;
    color: #fff;
    border: 1px solid #2e4770;
    text-align: center;
    text-transform: uppercase
}

.online-cube span {
    font-size: 11px;
    color: #9dffb5;
    font-weight: 800;
    letter-spacing: .5px
}

.online-cube b {
    font-size: 24px;
    line-height: 1;
    color: #20ff67
}

.main-menu {
    display: flex;
    align-items: center;
    overflow-x: auto;
    background: #445fe2;
    border-top: 1px solid #6f82ee;
    border-bottom: 3px solid #304bd1
}

.main-menu a {
    display: block;
    white-space: nowrap;
    color: #fff;
    padding: 14px 12px;
    border-right: 1px solid rgba(255,255,255,.18);
    font-weight: 800;
    font-size: 14px
}

.main-menu a:hover,.main-menu a.active {
    background: #2f49d5;
    text-decoration: none;
    box-shadow: inset 0 -4px 0 #ff6f61;
    color: #fff
}

.layout-grid {
    display: grid;
    grid-template-columns: 220px minmax(0,1fr) 225px;
    gap: 16px;
    align-items: start;
    min-height: 72vh;
    padding-top: 18px;
    padding-bottom: 42px;
    background: #fff;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line)
}

.content-area {
    min-width: 0
}

.sidebar {
    display: grid;
    gap: 12px;
    align-content: start
}

.side-card,.card {
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(7,23,42,.04)
}

.side-card {
    padding: 10px
}

.card {
    padding: 18px;
    margin-bottom: 16px
}

.side-title {
    display: block;
    margin: -10px -10px 10px;
    padding: 8px 10px;
    background: #315979;
    color: #fff;
    text-align: center;
    font-weight: 900;
    letter-spacing: .2px
}

.clean-title span {
    font-weight: 700;
    color: #dbefff
}

.side-title::-webkit-details-marker {
    display: none
}

.collapsible-menu summary {
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 28px
}

.collapsible-menu summary:after {
    content: '+';
    position: absolute;
    right: 11px;
    top: 8px;
    font-size: 18px;
    line-height: 1
}

.collapsible-menu[open] summary:after {
    content: '–'
}

.side-links {
    display: grid
}

.side-links a,.menu-box a {
    display: block;
    background: #f8fbff;
    border: 1px solid var(--line);
    margin-top: -1px;
    padding: 8px 9px;
    color: #24384f;
    font-weight: 700
}

.side-links a:hover,.menu-box a:hover {
    background: #eaf2ff;
    text-decoration: none;
    color: #0d55a1
}

.user-mini {
    text-align: center
}

.user-mini-row {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 8px;
    align-items: stretch
}

.avatar {
    object-fit: cover;
    background: #f4f8fd;
    border: 1px solid #d7e2f0
}

.avatar[src*="default-avatar"] {
    object-fit: contain
}

.avatar.big {
    width: 92px;
    height: 92px
}

.avatar.huge {
    width: 126px;
    height: 126px;
    display: block;
    margin: 10px auto;
    border: 8px solid #edf4ff
}

.avatar.mini {
    width: 42px;
    height: 42px;
    vertical-align: middle
}

.avatar-link {
    display: block
}

.compact-energy {
    display: grid;
    place-items: center;
    text-decoration: none!important;
    background: linear-gradient(180deg,#edf5ff,#dcecff);
    border: 1px solid #d5e2f4;
    color: #0d5ed7;
    font-weight: 900
}

.compact-energy small {
    display: block;
    color: #284460;
    text-transform: uppercase;
    font-size: 12px
}

.compact-energy b {
    font-size: 31px;
    line-height: 1
}

.balance-actions {
    display: grid;
    gap: 6px;
    margin: 8px 0
}

.balance,.bonus-btn,.side-btn,.btn {
    display: inline-block;
    text-align: center;
    border: 0;
    cursor: pointer;
    font-weight: 900;
    text-decoration: none!important
}

.balance {
    padding: 10px 8px;
    color: #fff!important
}

.balance.green {
    background: #20b94b
}

.balance.blue2 {
    background: #217ad8
}

.bonus-btn {
    background: #20bf4e;
    color: #fff!important;
    padding: 9px 10px;
    width: 100%
}

.bonus-btn.blue {
    background: #2d82ed;
    max-width: 170px;
    margin: 10px auto 0;
    display: block
}

.bonus-btn.disabled,.btn[disabled],button[disabled] {
    opacity: .55;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(.15)
}

.side-btn {
    display: block;
    background: #26384d;
    color: #fff!important;
    padding: 12px;
    margin-bottom: 8px
}

.side-btn:hover,.balance:hover,.bonus-btn:hover,.btn:hover {
    filter: brightness(.96);
    text-decoration: none!important
}

.stats-box {
    padding-bottom: 10px
}

.stat-row {
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    background: #465063;
    color: #fff;
    border-bottom: 2px solid #fff;
    padding: 8px
}

.stat-row span {
    text-align: center;
    border-right: 2px solid #fff;
    font-size: 20px
}

.stat-row b {
    text-align: right;
    font-size: 20px
}

.stat-row small {
    grid-column: 2;
    text-align: right;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 10px
}

.context a {
    display: block;
    font-weight: 900
}

.context p {
    font-size: 13px;
    margin: 4px 0 10px;
    color: #43566d
}

.side-ad .banner-box {
    width: 100%
}

.banner-box {
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px solid #c4d3e5;
    background: #f8fbff;
    color: #00641c;
    font-weight: 800;
    overflow: hidden
}

.banner-box:hover {
    text-decoration: none
}

.banner-468 {
    height: 60px;
    min-height: 60px
}

.banner-200 {
    height: 300px
}

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

.banner-200.is-empty {
    background: #131923;
    color: #ffb000;
    border: 4px solid #dfe6f2;
    font-size: 24px;
    line-height: 1.25
}

.banner-468.is-empty {
    font-size: 13px
}

.banner-box b {
    color: #243c62
}

.btn {
    background: #1c70c9!important;
    color: #fff!important;
    padding: 10px 15px;
    border: 1px solid #155da9
}

.btn.ghost {
    background: #fff!important;
    color: #1c5d9e!important;
    border: 1px solid #a9bfd8
}

.btn.small {
    padding: 7px 10px;
    font-size: 13px
}

.btn.mini {
    padding: 5px 8px;
    font-size: 12px
}

.orange-btn {
    background: #ff741f!important;
    border-color: #e05f0f!important
}

.danger-btn {
    background: #d83343!important;
    border-color: #bd2130!important
}

.green-btn {
    background: #1fb84a!important;
    border-color: #118937!important
}

.title-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin: 0 0 16px
}

.title-row h1 {
    margin: 0 0 4px;
    font-size: 28px
}

.muted {
    color: var(--muted)
}

.grid {
    display: grid;
    gap: 16px
}

.grid.no-gap {
    gap: 10px
}

.grid.two {
    grid-template-columns: repeat(2,minmax(0,1fr))
}

.grid.three {
    grid-template-columns: repeat(3,minmax(0,1fr))
}

.grid.four {
    grid-template-columns: repeat(4,minmax(0,1fr))
}

.stat span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px
}

.stat b {
    font-size: 28px;
    color: #0b2545
}

.balance-stat:hover {
    background: #f6fbff;
    text-decoration: none
}

.pill,.badge {
    display: inline-block;
    background: #e9f2ff;
    color: #134f89;
    border: 1px solid #bfdef3;
    padding: 5px 8px;
    font-weight: 900
}

.pill.big {
    font-size: 18px
}

.pill.rutube {
    background: #fff0f0;
    color: #b42318;
    border-color: #ffb4b4
}

.badge.status-approved,.badge.status-active,.badge.status-done {
    background: #eaf8ef;
    color: #0b6b34;
    border-color: #9cd8b5
}

.badge.status-pending,.badge.status-started {
    background: #fff7e6;
    color: #8a5200;
    border-color: #edc678
}

.badge.status-rejected,.badge.status-deleted,.badge.status-blocked {
    background: #fff0f0;
    color: #9a1727;
    border-color: #edacb5
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0,1.2fr) 320px;
    gap: 22px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 28px;
    margin-bottom: 16px
}

.flat-hero h1 {
    font-size: 38px;
    line-height: 1.08;
    margin: 4px 0 12px;
    color: #0c3476
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    font-weight: 900;
    color: #244ee8;
    letter-spacing: .4px
}

.lead {
    font-size: 17px;
    color: #42536a;
    max-width: 680px
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px
}

.hero-list {
    display: grid;
    gap: 8px
}

.hero-list div {
    border: 1px solid var(--line);
    background: #f7fbff;
    padding: 13px
}

.hero-list b {
    display: block;
    color: #12233a;
    font-size: 17px
}

.hero-list span {
    color: #5b6c80
}

.home-metrics a {
    text-decoration: none;
    color: inherit
}

.clean-steps {
    margin: 0;
    padding-left: 22px
}

.clean-steps li {
    margin: 8px 0
}

.steps-card h2 {
    margin-top: 0
}

.task-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start
}

.task-head h1,.task-head h3 {
    margin-top: 0
}

.meta {
    color: var(--muted);
    font-size: 13px;
    margin: 10px 0
}

.task-card {
    border-left: 4px solid #4b63df
}

.timer-box {
    border: 2px dashed #ff8a00;
    background: #fff8ed;
    padding: 16px;
    margin: 16px 0;
    text-align: center
}

.timer-number {
    font-size: 36px;
    font-weight: 900;
    color: #d85a00
}

.open-rutube {
    background: #ff6b00!important
}

.steps-list {
    border: 1px solid var(--line);
    background: #f8fbff;
    padding: 14px 14px 14px 34px
}

.rutube-guard {
    border: 1px solid #f0cf8d;
    background: #fff9ea;
    padding: 12px;
    margin: 0 0 14px
}

.rutube-guard.ok {
    border-color: #a8d9b8;
    background: #effbf3
}

.rutube-guard.bad {
    border-color: #f0a8a8;
    background: #fff0f0
}

.ad-bait {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px
}

.ad-banner,.adsbygoogle,.advertisement {
    display: block!important;
    width: 1px!important;
    height: 1px!important
}

.ad-type-tabs {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 8px
}

.ad-type-tab {
    position: relative;
    display: block;
    border: 1px solid var(--line);
    background: #f8fbff;
    padding: 13px 42px 13px 13px;
    text-decoration: none!important;
    color: #26384d
}

.ad-type-tab b {
    display: block;
    font-size: 16px;
    color: #112d55
}

.ad-type-tab span {
    font-size: 12px;
    color: #63748b
}

.ad-type-tab em {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-style: normal;
    background: #e7effb;
    padding: 3px 8px;
    color: #1b58a4;
    font-weight: 900
}

.ad-type-tab.active {
    background: #eaf2ff;
    border-color: #618ce8;
    box-shadow: inset 0 -4px 0 #4b63df
}

.task-list-admin {
    display: grid;
    gap: 10px
}

.ad-task-row {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) 110px 110px;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    background: #fff;
    padding: 10px
}

.play-cell span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: #68b848;
    color: #fff;
    font-weight: 900
}

.ad-task-main h3 {
    margin: 0 0 4px;
    font-size: 17px
}

.ad-task-main p {
    margin: 3px 0
}

.ad-task-status {
    text-align: center
}

.ad-task-actions {
    text-align: right
}

.honor-wrap {
    display: grid;
    grid-template-columns: minmax(0,1fr) 360px;
    gap: 16px;
    margin-bottom: 16px
}

.honor-rules {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
    padding: 12px
}

.honor-rules div {
    border: 1px solid var(--line);
    background: #f7fbff;
    padding: 12px
}

.honor-rules b {
    display: block;
    color: #142a45
}

.honor-rules span {
    display: block;
    color: #1f5fab;
    font-weight: 900;
    margin-top: 4px
}

.honor-current {
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    padding: 22px
}

.honor-current.pro {
    min-height: 330px
}

.honor-avatar {
    width: 150px!important;
    height: 150px!important;
    border: 8px solid #edf4ff
}

.fixed-price-box {
    padding: 14px;
    border: 1px solid #ffd28e;
    background: #fff7e9;
    color: #7b3b00;
    font-size: 18px
}

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

.honor-leader {
    display: grid;
    grid-template-columns: 42px 42px 1fr;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--line);
    background: #f8fbff;
    padding: 10px
}

.honor-leader .place {
    font-size: 20px;
    font-weight: 900;
    color: #244ee8
}

.honor-leader b {
    display: block
}

.honor-leader span,.honor-leader small {
    grid-column: 3;
    color: #5c6e83
}

.honor-leader.place-1 {
    border-color: #ffc107;
    background: #fff8d9
}

.honor-leader.place-2 {
    border-color: #aebbd0
}

.honor-leader.place-3 {
    border-color: #e3a66c
}

.honor-widget {
    text-align: center
}

.honor-live-box.is-empty .avatar {
    object-fit: contain
}

.honor-amount {
    font-weight: 900;
    color: #1e5fa8
}

.honor-comment {
    background: #f6f9fd;
    border: 1px solid var(--line);
    padding: 10px
}

.honor-form button {
    width: 100%
}

.top-list {
    display: grid;
    gap: 10px
}

.top-card {
    display: grid;
    grid-template-columns: 52px 56px minmax(0,1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    background: #fff;
    padding: 10px
}

.top-card.place-1 {
    border-color: #ffc107;
    background: #fff9df
}

.top-card.place-2 {
    border-color: #aebbd0
}

.top-card.place-3 {
    border-color: #e3a66c
}

.top-place {
    font-size: 20px;
    font-weight: 900;
    color: #244ee8
}

.top-avatar {
    width: 56px;
    height: 56px
}

.top-user b {
    display: block
}

.top-user span {
    display: block;
    color: #65758a
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line)
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff
}

th,td {
    border-bottom: 1px solid var(--line2);
    padding: 10px;
    text-align: left;
    vertical-align: top
}

th {
    background: #eef4fb;
    color: #334155
}

.table-input {
    min-width: 100px
}

.inline-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap
}

.inline-actions form {
    display: inline
}

.actions-list {
    display: grid;
    gap: 8px
}

.actions-list a {
    display: block;
    border: 1px solid var(--line);
    padding: 10px;
    background: #f8fafc;
    color: #304257;
    font-weight: 800
}

.actions-list a:hover {
    background: #eef6fd;
    text-decoration: none
}

.alert {
    border: 1px solid var(--line);
    padding: 12px;
    margin-bottom: 16px;
    background: #fff
}

.alert.success {
    border-color: #9ad7ba;
    background: #eefbf4;
    color: #064d2d
}

.alert.danger {
    border-color: #f0a8a8;
    background: #fff0f0;
    color: #7a1d1d
}

.alert.warning {
    border-color: #f1c56b;
    background: #fff8e6;
    color: #704a00
}

.alert.info {
    background: #edf7ff;
    border-color: #b8d8f4;
    color: #174f82
}

.form {
    display: grid;
    gap: 14px
}

.form-card {
    max-width: 760px
}

label {
    display: grid;
    gap: 6px;
    font-weight: 800
}

input,textarea,select {
    width: 100%;
    border: 1px solid #c8d1dc;
    background: #fff;
    color: var(--text);
    padding: 10px;
    font: inherit
}

textarea {
    resize: vertical
}

input:focus,textarea:focus,select:focus {
    outline: 2px solid #b9ddf5;
    border-color: #1769aa
}

.check {
    display: flex;
    align-items: center;
    gap: 8px
}

.check input {
    width: auto
}

.auth-wrap {
    max-width: 430px;
    margin: 0 auto 18px;
    padding-top: 4px
}

.wall-user {
    display: flex;
    align-items: center;
    gap: 14px
}

.wall-avatar {
    width: 80px;
    height: 80px
}

.wall-post {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    margin-top: 12px
}

.wall-post .avatar {
    width: 54px;
    height: 54px
}

.news-item,.history-item {
    border-top: 1px solid var(--line);
    padding-top: 12px;
    margin-top: 12px
}

.news-item:first-of-type,.wall-post:first-of-type {
    border-top: 0
}

.profile-energy {
    display: inline-block;
    border: 1px solid var(--line);
    background: #f4f8ff;
    padding: 7px 10px
}

.ref-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.ref-list span {
    background: #f0f6ff;
    border: 1px solid #d5e4f7;
    padding: 6px 8px
}

.footer {
    border-top: 4px solid #4b63df;
    background: #24364b;
    color: #d9e6f3;
    padding: 18px 0
}

.footer a {
    color: #fff
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap
}

.footer b {
    display: block;
    color: #fff
}

.footer span {
    display: block;
    color: #b9c9dc
}

#ajax-progress {
    position: fixed;
    left: 0;
    top: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg,#1a78ff,#23e0ff);
    z-index: 9999;
    transition: width .18s ease
}

.ajax-loading .content-area {
    opacity: .96;
    transition: opacity .1s
}

@media(max-width: 1120px) {
    .layout-grid {
        grid-template-columns:210px minmax(0,1fr)
    }

    .right-sidebar {
        display: none
    }

    .brand-line {
        grid-template-columns: auto minmax(0,1fr) 84px
    }

    .header-banners {
        display: none
    }

    .ad-task-row {
        grid-template-columns: 36px minmax(0,1fr);
        align-items: start
    }

    .ad-task-status,.ad-task-actions {
        text-align: left;
        grid-column: 2
    }

    .honor-rules {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }
}

@media(max-width: 820px) {
    body {
        font-size:14px
    }

    .container {
        padding-left: 10px;
        padding-right: 10px
    }

    .brand-line {
        grid-template-columns: 1fr 72px;
        min-height: 72px
    }

    .brand {
        font-size: 20px
    }

    .brand-mark {
        width: 34px;
        height: 34px
    }

    .online-cube {
        height: 54px
    }

    .online-cube b {
        font-size: 20px
    }

    .main-menu {
        padding: 0;
        scroll-snap-type: x proximity
    }

    .main-menu a {
        padding: 12px 10px;
        scroll-snap-align: start
    }

    .layout-grid {
        display: flex;
        flex-direction: column;
        background: transparent;
        border: 0;
        padding-top: 12px
    }

    .content-area {
        order: 1;
        width: 100%
    }

    .left-sidebar {
        order: 2;
        width: 100%
    }

    .right-sidebar {
        order: 3;
        display: grid;
        width: 100%
    }

    .side-ad {
        display: none
    }

    .grid.two,.grid.three,.grid.four,.home-hero,.ad-type-tabs,.honor-leaders,.honor-wrap {
        grid-template-columns: 1fr
    }

    .home-hero {
        padding: 18px
    }

    .flat-hero h1 {
        font-size: 28px
    }

    .title-row {
        display: block
    }

    .title-row .inline-actions {
        margin-top: 10px
    }

    .honor-rules {
        grid-template-columns: 1fr
    }

    .top-card {
        grid-template-columns: 42px 50px minmax(0,1fr)
    }

    .top-card .btn {
        grid-column: 3;
        justify-self: start
    }

    .user-mini-row {
        grid-template-columns: 92px 1fr
    }

    .card {
        padding: 15px
    }

    .ad-task-row {
        grid-template-columns: 1fr
    }

    .play-cell,.ad-task-status,.ad-task-actions {
        grid-column: auto
    }

    .table-wrap {
        margin-left: -5px;
        margin-right: -5px
    }

    .footer-grid {
        display: block
    }
}

/* Wall gifts: fixed compact sizes after design refresh */
.gifts-box {
    overflow: hidden
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(118px,1fr));
    gap: 10px;
    align-items: stretch
}

.gift-item {
    display: grid;
    grid-template-rows: auto 72px auto auto;
    gap: 6px;
    justify-items: center;
    align-content: start;
    border: 1px solid var(--line);
    background: #f8fbff;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: 800;
    min-height: 154px
}

.gift-item input {
    width: auto;
    margin: 0
}

.gift-item img {
    display: block!important;
    width: 68px!important;
    height: 68px!important;
    max-width: 68px!important;
    max-height: 68px!important;
    object-fit: contain!important
}

.gift-item b {
    font-size: 13px;
    line-height: 1.2
}

.gift-item span {
    font-size: 13px;
    color: #1f5fab;
    font-weight: 900
}

.gift-item:has(input:checked) {
    background: #eef6ff;
    border-color: #5d8df1;
    box-shadow: inset 0 -3px 0 #4b63df
}

.wall-gifts {
    display: grid;
    gap: 10px
}

.wall-gift {
    display: grid;
    grid-template-columns: 64px minmax(0,1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    background: #fff;
    padding: 10px
}

.wall-gift img {
    display: block!important;
    width: 58px!important;
    height: 58px!important;
    max-width: 58px!important;
    max-height: 58px!important;
    object-fit: contain!important;
    background: #fff8e8;
    border: 1px solid #f0d7a4;
    padding: 6px
}

.wall-gift b {
    display: block
}

.wall-gift p {
    margin: 4px 0
}

.wall-gift small {
    color: var(--muted)
}

@media(max-width: 520px) {
    .gift-grid {
        grid-template-columns:repeat(2,minmax(0,1fr))
    }

    .gift-item {
        min-height: 145px
    }

    .gift-item img {
        width: 58px!important;
        height: 58px!important;
        max-width: 58px!important;
        max-height: 58px!important
    }

    .wall-gift {
        grid-template-columns: 54px 1fr
    }

    .wall-gift img {
        width: 50px!important;
        height: 50px!important;
        max-width: 50px!important;
        max-height: 50px!important
    }
}

/* v1.1.2 polish: compact ad cards, surfing timer, contests */
h1,h2,h3,p,a,span,b,td,th {
    overflow-wrap: anywhere
}

.nowrap-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%
}

.compact-section {
    padding: 16px
}

.seven-tabs {
    grid-template-columns: repeat(auto-fit,minmax(148px,1fr))
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
    gap: 12px
}

.compact-task {
    display: grid;
    gap: 8px;
    margin: 0;
    min-height: 210px
}

.compact-task h3 {
    font-size: 18px;
    line-height: 1.22;
    margin: 0;
    max-height: 45px;
    overflow: hidden
}

.compact-task p {
    margin: 0;
    color: #506277;
    font-size: 13px;
    line-height: 1.35;
    max-height: 38px;
    overflow: hidden
}

.task-topline {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center
}

.task-type {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 900;
    color: #21405d;
    background: #eef5ff;
    border: 1px solid #cbdcf0;
    padding: 4px 7px
}

.task-type.rutube {
    background: #fff0eb;
    color: #b73800;
    border-color: #ffc7b3
}

.task-type.context {
    background: #f0ebff;
    color: #4a148c;
    border-color: #d6c7ff
}

.task-reward {
    font-size: 18px;
    color: #064f9d;
    white-space: nowrap
}

.task-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    margin: 0;
    font-size: 12px
}

.surf-widget {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    border: 1px solid #d4e2f0;
    background: #f8fbff;
    padding: 8px;
    margin-top: auto
}

.surf-widget.ok {
    border-color: #9dd7b4;
    background: #f0fbf4
}

.surf-widget.bad {
    border-color: #f0a8a8;
    background: #fff0f0
}

.surf-status {
    font-size: 13px;
    color: #53677e
}

.surf-timer {
    font-size: 20px;
    color: #0c5fad;
    min-width: 36px;
    text-align: center
}

.surf-panel {
    border-left: 4px solid #1fb84a
}

.surf-big-timer {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    background: #f6fbff;
    border: 1px solid var(--line);
    padding: 18px;
    margin: 12px 0
}

.surf-big-timer span {
    font-size: 54px;
    font-weight: 900;
    color: #0d5ed7
}

.surf-big-timer small {
    font-weight: 900;
    color: #567
}

.surf-widget-actions {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center
}

.report-form {
    margin-top: 14px
}

.compact-ad-row {
    grid-template-columns: 34px minmax(0,1fr) 98px 92px;
    gap: 9px;
    padding: 9px
}

.compact-ad-row h3 {
    font-size: 15px;
    line-height: 1.2;
    margin: 0 0 3px
}

.compact-ad-row p {
    font-size: 12px;
    margin: 2px 0
}

.play-cell span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    background: #58bd3d;
    color: #fff;
    font-weight: 900
}

.mini-progress {
    height: 7px;
    background: #eef4fb;
    border: 1px solid #d5e1ee;
    overflow: hidden;
    margin: 5px 0
}

.mini-progress span {
    display: block;
    height: 100%;
    background: #3f62e8
}

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

.price-preview div {
    border: 1px solid var(--line);
    background: #f8fbff;
    padding: 10px
}

.price-preview span {
    display: block;
    color: #65758a;
    font-size: 12px
}

.price-preview b {
    font-size: 18px;
    color: #0b4f93
}

.total-line {
    border: 1px solid #ffd19b;
    background: #fff8ed;
    padding: 12px;
    font-weight: 900
}

.history-stats .stat small {
    display: block;
    margin-top: 6px
}

.contest-card h2 {
    margin-top: 0
}

.contest-card .avatar.mini {
    vertical-align: middle;
    margin-right: 6px
}

.context a {
    display: block;
    line-height: 1.2;
    margin: 8px 0 2px
}

.context p {
    font-size: 12px;
    line-height: 1.25;
    margin: 0 0 8px;
    max-height: 34px;
    overflow: hidden
}

.honor-wrap {
    grid-template-columns: minmax(0,1fr) 320px
}

.honor-current.pro {
    min-height: 280px
}

.honor-avatar {
    width: 128px!important;
    height: 128px!important
}

.honor-leader {
    grid-template-columns: 34px 38px minmax(0,1fr);
    padding: 8px
}

.honor-leader .place {
    font-size: 17px
}

.honor-leader b {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.honor-leader span,.honor-leader small {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.ad-task-main {
    min-width: 0
}

.task-detail-card h1 {
    font-size: 26px;
    line-height: 1.18
}

@media(max-width: 1120px) {
    .compact-ad-row {
        grid-template-columns:34px minmax(0,1fr)
    }

    .compact-ad-row .ad-task-status,.compact-ad-row .ad-task-actions {
        grid-column: 2
    }

    .price-preview {
        grid-template-columns: 1fr
    }

    .task-grid {
        grid-template-columns: repeat(auto-fill,minmax(230px,1fr))
    }
}

@media(max-width: 620px) {
    .task-grid {
        grid-template-columns:1fr
    }

    .surf-widget {
        grid-template-columns: 1fr
    }

    .surf-widget .btn {
        width: 100%
    }

    .surf-widget-actions {
        grid-template-columns: 1fr
    }

    .surf-big-timer span {
        font-size: 42px
    }

    .compact-ad-row {
        grid-template-columns: 1fr
    }

    .compact-ad-row .ad-task-status,.compact-ad-row .ad-task-actions {
        grid-column: auto
    }

    .task-detail-card h1 {
        font-size: 22px
    }
}

/* v1.1.3: fixes for popup, soft RUTUBE guard, context by days, prettier referrals/contests */
.rutube-guard.warn {
    border-color: #f0cf8d;
    background: #fff9ea
}

.context-detail {
    border-left: 4px solid #6b2bd9
}

.create-hero {
    display: grid;
    grid-template-columns: minmax(0,1fr) 150px;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px
}

.create-hero h1 {
    margin: 0 0 8px;
    font-size: 30px
}

.create-price-note {
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px solid #ffd3a6;
    background: #fff7ed;
    padding: 16px
}

.create-price-note b {
    font-size: 26px;
    color: #b54708
}

.create-price-note span {
    font-size: 12px;
    color: #724015;
    font-weight: 900;
    text-transform: uppercase
}

.context-order-box {
    border-left: 4px solid #7c3aed;
    background: #fbf8ff;
    padding: 12px
}

.context-progress span {
    background: #7c3aed
}

.context-ad-link {
    color: #0f57b4!important
}

.admin-settings .grid.three.no-gap {
    grid-template-columns: repeat(auto-fit,minmax(170px,1fr))
}

.ref-hero,.contest-hero {
    display: grid;
    grid-template-columns: minmax(0,1fr) 190px;
    gap: 18px;
    align-items: center;
    background: #fff;
    border-left: 5px solid #3459e6
}

.ref-hero h1,.contest-hero h1 {
    font-size: 32px;
    margin: 0 0 8px
}

.ref-income-box,.contest-hero-badge {
    display: grid;
    place-items: center;
    text-align: center;
    min-height: 116px;
    background: #f5f8ff;
    border: 1px solid #d6e3f5
}

.ref-income-box span,.contest-hero-badge span {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
    color: #607086
}

.ref-income-box b,.contest-hero-badge b {
    font-size: 30px;
    color: #0b58b0
}

.copy-line {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px
}

.buy-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 12px
}

.buy-line>b {
    font-size: 24px;
    color: #b54708
}

.auto-ref-active {
    display: grid;
    gap: 6px;
    background: #eefbf4;
    border: 1px solid #9ad7ba;
    padding: 16px;
    color: #064d2d
}

.auto-ref-active b {
    font-size: 22px
}

.ref-levels {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 12px;
    margin-bottom: 16px
}

.ref-level-card {
    margin: 0;
    text-align: center;
    position: relative;
    overflow: hidden
}

.ref-level-card:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: #3459e6
}

.ref-level-card small {
    display: block;
    color: #687b90;
    font-weight: 900;
    text-transform: uppercase
}

.ref-level-card b {
    display: block;
    font-size: 36px;
    color: #0c2d55;
    line-height: 1.1;
    margin: 8px 0
}

.ref-level-card span {
    color: #155a9f;
    font-weight: 900
}

.ref-columns {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px
}

.ref-column {
    border: 1px solid var(--line);
    background: #f8fbff;
    padding: 10px;
    min-width: 0
}

.ref-column h3 {
    margin: 0 0 8px;
    font-size: 16px
}

.ref-user {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 4px 8px;
    align-items: center;
    background: #fff;
    border: 1px solid #dfe8f3;
    padding: 7px;
    margin-bottom: 6px
}

.ref-user span {
    grid-row: span 2;
    color: #0f57b4;
    font-weight: 900
}

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

.ref-user small {
    color: #728197
}

.empty-ref {
    background: #fff;
    padding: 12px;
    border: 1px dashed #d2deec
}

.contest-hero-badge b {
    font-size: 42px
}

.pro-contest-card {
    border-left: 5px solid #ff741f
}

.contest-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start
}

.contest-top h2 {
    font-size: 25px;
    margin: 0 0 4px
}

.contest-prizes {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(110px,1fr));
    gap: 8px;
    margin: 14px 0
}

.contest-prizes div {
    background: #fff8ed;
    border: 1px solid #ffd4a8;
    padding: 10px;
    text-align: center
}

.contest-prizes small {
    display: block;
    color: #8a5200;
    font-weight: 900
}

.contest-prizes b {
    display: block;
    font-size: 23px;
    color: #c2410c
}

.contest-prizes span {
    font-size: 12px;
    color: #72523a
}

.contest-leader-list {
    display: grid;
    gap: 8px
}

.contest-leader-row {
    display: grid;
    grid-template-columns: 50px 46px minmax(0,1fr) 120px 110px;
    gap: 10px;
    align-items: center;
    border: 1px solid #dbe7f5;
    background: #f8fbff;
    padding: 10px
}

.contest-leader-row.place-1 {
    background: #fff8d8;
    border-color: #efd47c
}

.contest-leader-row.place-2 {
    background: #f4f7fb
}

.contest-leader-row.place-3 {
    background: #fff0e7
}

.contest-place {
    font-weight: 900;
    font-size: 20px;
    color: #244ee8
}

.contest-user b {
    display: block;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.contest-user span,.contest-earned small,.contest-prize small,.contest-prize span {
    font-size: 12px;
    color: #65758a
}

.contest-earned b,.contest-prize b {
    font-size: 16px;
    color: #0b4f93
}

.empty-state {
    text-align: center;
    padding: 24px
}

.empty-state.inline {
    padding: 18px;
    background: #f8fbff;
    border: 1px dashed var(--line);
    margin-top: 12px
}

.ad-task-row .play-cell span {
    border: 0
}

.task-card .pill.big:empty {
    display: none
}

@media(max-width: 980px) {
    .ref-hero,.contest-hero,.create-hero {
        grid-template-columns:1fr
    }

    .ref-levels,.ref-columns {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .contest-leader-row {
        grid-template-columns: 40px 42px minmax(0,1fr);
        align-items: start
    }

    .contest-earned,.contest-prize {
        grid-column: 3
    }
}

@media(max-width: 620px) {
    .ref-levels,.ref-columns {
        grid-template-columns:1fr
    }

    .copy-line {
        grid-template-columns: 1fr
    }

    .contest-leader-row {
        grid-template-columns: 34px 38px minmax(0,1fr)
    }

    .contest-place {
        font-size: 16px
    }

    .ref-hero h1,.contest-hero h1,.create-hero h1 {
        font-size: 26px
    }
}

.admin-contest-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-left: 5px solid #ff741f
}

.admin-contest-hero h1 {
    margin: 0 0 6px;
    font-size: 30px
}

.admin-contest-list {
    display: grid;
    gap: 12px
}

.admin-contest-item {
    margin: 0
}

.admin-contest-meta {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 8px;
    margin: 12px 0
}

.admin-contest-meta div {
    background: #f8fbff;
    border: 1px solid var(--line);
    padding: 10px
}

.admin-contest-meta small {
    display: block;
    color: #65758a;
    font-weight: 900;
    text-transform: uppercase
}

.admin-contest-meta b {
    font-size: 18px;
    color: #0b4f93
}

.admin-mini-leaders {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0
}

.admin-mini-leaders span {
    background: #eef5ff;
    border: 1px solid #d5e3f7;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 800
}

@media(max-width: 620px) {
    .admin-contest-hero {
        display:block
    }

    .admin-contest-meta {
        grid-template-columns: 1fr
    }
}

/* v114 fixes: safer timers, editor buttons */
.ad-task-actions {
    display: grid;
    gap: 6px;
    justify-items: end
}

.btn.mini.edit-btn,.edit-btn {
    background: #155db8;
    color: #fff!important
}

.surf-fallback-link,.surf-manual-start {
    margin-top: 6px
}

.surf-widget .surf-fallback-link,.surf-widget .surf-manual-start {
    display: inline-flex;
    margin-left: 6px
}

.edit-ad-hero {
    display: grid;
    grid-template-columns: minmax(0,1fr) 210px;
    gap: 18px;
    align-items: center;
    border-left: 5px solid #155db8;
    background: #fff
}

.edit-ad-hero h1 {
    margin: 0 0 8px;
    font-size: 30px
}

.edit-ad-badge {
    display: grid;
    place-items: center;
    text-align: center;
    background: #f4f8ff;
    border: 1px solid #d5e3f5;
    min-height: 110px;
    padding: 12px
}

.edit-ad-badge span {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
    color: #5d6f86
}

.edit-ad-badge b {
    font-size: 24px;
    color: #0b58b0
}

.edit-ad-summary {
    margin: 12px 0
}

.edit-ad-summary div {
    border: 1px solid var(--line);
    background: #f8fbff;
    padding: 10px
}

.edit-ad-summary span {
    display: block;
    color: #65758a;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase
}

.edit-ad-summary b {
    display: block;
    color: #0b4f93;
    font-size: 20px;
    margin-top: 4px
}

.task-card .rutube-guard .muted {
    margin-bottom: 0
}

.rutube-guard.ok {
    border-color: #9ad7ba;
    background: #effbf4
}

.rutube-guard.bad {
    border-color: #f0a8a8;
    background: #fff0f0
}

@media(max-width: 720px) {
    .edit-ad-hero {
        grid-template-columns:1fr
    }

    .ad-task-actions {
        justify-items: stretch
    }

    .surf-widget .surf-fallback-link,.surf-widget .surf-manual-start {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
    }
}

/* v115: dashboard/energy polish and visible-tab timer pause states */
.dash-hero {
    display: grid;
    grid-template-columns: minmax(0,1fr) 190px;
    gap: 20px;
    align-items: center;
    border-left: 5px solid #2563eb;
    background: linear-gradient(135deg,#ffffff 0%,#f6f9ff 100%)
}

.dash-hero h1,.energy-page h1 {
    font-size: 34px;
    line-height: 1.1;
    margin: 5px 0 10px;
    color: #071b34
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 900;
    font-size: 12px;
    color: #234fe8
}

.dash-cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px
}

.energy-orb {
    position: relative;
    display: grid;
    place-items: center;
    text-align: center;
    min-height: 170px;
    padding: 18px;
    border: 1px solid #cfe0f8;
    background: radial-gradient(circle at 50% 22%,#eef6ff,#dcecff);
    overflow: hidden
}

.energy-orb small,.energy-orb span {
    position: relative;
    z-index: 1;
    color: #5f7187;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px
}

.energy-orb b {
    position: relative;
    z-index: 1;
    color: #0757c7;
    font-size: 42px;
    line-height: 1
}

.energy-orb i {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 8px;
    background: linear-gradient(90deg,#24d4eb,#22c55e)
}

.dash-stats .stat span,.energy-stats .stat span {
    font-weight: 900
}

.quick-card h2,.ref-card h2,.operations-card h2 {
    margin-top: 0
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px
}

.quick-actions a {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d7e3f2;
    background: #f8fbff;
    color: #0b315d!important;
    text-decoration: none;
    font-weight: 900;
    padding: 11px;
    min-height: 42px
}

.quick-actions a:hover {
    background: #eef5ff
}

.ref-card .copy-line {
    margin: 14px 0
}

.operations-card table td:last-child {
    max-width: 360px
}

.energy-page {
    display: grid;
    grid-template-columns: minmax(0,1fr) 260px;
    gap: 20px;
    align-items: center;
    border-left: 5px solid #ff741f;
    background: linear-gradient(135deg,#fff 0%,#fff8f0 100%)
}

.energy-main-copy p {
    font-size: 15px;
    line-height: 1.55
}

.energy-big-meter {
    display: grid;
    gap: 8px;
    text-align: center;
    background: #fff;
    border: 1px solid #ffd2a8;
    padding: 20px;
    min-height: 180px;
    align-content: center
}

.energy-big-meter b {
    font-size: 48px;
    line-height: 1;
    color: #c2410c
}

.energy-big-meter span,.energy-big-meter small {
    color: #74513a;
    font-weight: 900
}

.energy-big-meter div {
    height: 12px;
    background: #fff0df;
    border: 1px solid #ffd2a8;
    overflow: hidden
}

.energy-big-meter i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg,#ff741f,#22c55e)
}

.energy-buy-card {
    border-left: 4px solid #ff741f
}

.energy-rule-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px
}

.energy-rule-grid div {
    background: #f8fbff;
    border: 1px solid #d8e5f4;
    padding: 14px;
    text-align: center
}

.energy-rule-grid b {
    display: block;
    font-size: 28px;
    color: #0b58b0
}

.energy-rule-grid span {
    font-size: 13px;
    color: #607086
}

.surf-panel.bad .surf-status {
    color: #b91c1c;
    font-weight: 900
}

.surf-panel.ok .surf-status {
    color: #065f46;
    font-weight: 900
}

.surf-panel .surf-fallback-link,.surf-panel .surf-manual-start {
    margin-top: 10px;
    margin-right: 8px
}

.main-menu {
    overflow-x: auto;
    scrollbar-width: thin
}

.main-menu a {
    white-space: nowrap
}

@media(max-width: 900px) {
    .dash-hero,.energy-page {
        grid-template-columns:1fr
    }

    .energy-orb,.energy-big-meter {
        min-height: 140px
    }

    .energy-rule-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .quick-actions {
        grid-template-columns: 1fr
    }
}

@media(max-width: 620px) {
    .dash-hero h1,.energy-page h1 {
        font-size:28px
    }

    .energy-rule-grid {
        grid-template-columns: 1fr
    }

    .dash-cta .btn {
        width: 100%
    }
}

/* v116: own ads in task list */
.own-task-card {
    background: #fbfdff;
    border-left-color: #93a8c6;
    position: relative
}

.own-task-note {
    background: #eef6ff;
    border: 1px solid #c8def6;
    color: #284760;
    font-weight: 800;
    font-size: 12px;
    padding: 7px 8px;
    margin: 6px 0 8px
}

.task-disabled-reason {
    display: inline-block;
    margin-left: 8px;
    color: #65758a;
    font-size: 12px;
    font-weight: 800
}

.compact-task .ghost {
    background: #fff!important;
    color: #315979!important;
    border-color: #b8cadf!important
}

/* v116: classic top page */
.top-hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border-left: 5px solid #274fe6;
    background: linear-gradient(90deg,#fff,#f5f9ff)
}

.top-hero h1 {
    margin: 0 0 8px;
    font-size: 34px
}

.top-hero-badge {
    min-width: 150px;
    text-align: center;
    background: #f1f6ff;
    border: 1px solid var(--line);
    padding: 18px
}

.top-hero-badge b {
    display: block;
    font-size: 42px;
    color: #0d5ed7;
    line-height: 1
}

.top-hero-badge span {
    font-weight: 900;
    color: #5d6e82
}

.classic-top-list {
    display: grid;
    gap: 8px
}

.classic-top-row {
    display: grid;
    grid-template-columns: 48px 58px minmax(180px,1fr) 120px minmax(230px,1.1fr) auto;
    gap: 12px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    padding: 10px 12px;
    box-shadow: 0 1px 0 rgba(7,23,42,.04)
}

.classic-top-row.place-1 {
    background: #fff9d9;
    border-color: #ffd36c
}

.classic-top-row.place-2 {
    background: #f7fbff
}

.classic-top-row.place-3 {
    background: #fff7ef
}

.classic-place {
    font-size: 20px;
    font-weight: 900;
    color: #d0182f;
    text-align: center
}

.top-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid #d8e4f3
}

.classic-name {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap
}

.classic-name b {
    font-size: 17px;
    color: #11324f
}

.classic-name span {
    font-weight: 800;
    color: #344e67
}

.classic-login {
    font-size: 13px;
    color: #65758a
}

.classic-login b {
    color: #118441
}

.classic-energy {
    background: #eef6ff;
    border: 1px solid #cbdff6;
    text-align: center;
    padding: 8px
}

.classic-energy small {
    display: block;
    font-weight: 900;
    text-transform: uppercase;
    color: #3d5772;
    font-size: 11px
}

.classic-energy b {
    font-size: 22px;
    color: #0b5bd4
}

.classic-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.classic-stats span {
    background: #f5f9fe;
    border: 1px solid #d7e4f3;
    padding: 5px 7px;
    font-size: 12px;
    color: #314a63
}

.classic-stats b {
    color: #0d5ed7
}

.top-stats-btn {
    white-space: nowrap
}

.top-modal[hidden] {
    display: none
}

.top-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center
}

.top-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8,18,35,.65)
}

.top-modal-box {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    width: min(720px,calc(100vw - 26px));
    max-height: 86vh;
    overflow: auto;
    box-shadow: 0 24px 90px rgba(0,0,0,.35)
}

.top-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    background: #637fe8;
    color: #fff;
    padding: 10px 12px
}

.top-modal-head button {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-weight: 800
}

.top-modal-user {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: #f6f9ff;
    border-bottom: 1px solid var(--line)
}

.top-modal-user span,.top-modal-user b {
    background: #fff;
    border: 1px solid #dae5f3;
    padding: 6px 8px
}

.top-modal-table-wrap {
    padding: 0 12px 12px
}

.top-modal-table {
    width: 100%;
    border-collapse: collapse
}

.top-modal-table th {
    background: #637fe8;
    color: #fff;
    font-size: 13px
}

.top-modal-table th,.top-modal-table td {
    border: 1px solid #cdd8e6;
    padding: 7px;
    text-align: center
}

.top-modal-table td:first-child {
    text-align: left;
    font-weight: 800
}

.top-modal-box .small {
    padding: 0 12px 12px;
    margin: 0
}

/* v116: contests polished */
.contest-top.upgraded {
    border-bottom: 1px solid var(--line2);
    padding-bottom: 12px;
    margin-bottom: 14px
}

.compact-prizes {
    grid-template-columns: repeat(auto-fit,minmax(115px,1fr));
    gap: 8px
}

.compact-prizes div {
    padding: 10px;
    background: #fff8ec;
    border: 1px solid #ffca91;
    text-align: center
}

.contest-leader-list.polished {
    display: grid;
    gap: 10px;
    margin-top: 14px
}

.contest-leader-list.polished .contest-leader-row {
    display: grid;
    grid-template-columns: 52px 48px minmax(150px,1fr) 95px 95px 110px 110px;
    gap: 10px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    padding: 10px
}

.contest-leader-row.place-1 {
    background: #fff9dc;
    border-color: #ffd36c
}

.contest-place {
    font-size: 22px;
    font-weight: 900;
    color: #204ee8;
    text-align: center
}

.contest-user b {
    display: block;
    color: #10243a
}

.contest-user small {
    font-size: 12px;
    color: #65758a
}

.contest-user span {
    font-size: 12px;
    color: #65758a
}

.contest-chip {
    background: #f4f8fd;
    border: 1px solid #dce8f5;
    padding: 8px;
    text-align: center
}

.contest-chip small {
    display: block;
    color: #65758a;
    font-size: 11px
}

.contest-chip b {
    font-size: 20px;
    color: #0d5ed7
}

.contest-earned,.contest-prize {
    background: #f8fbff;
    border: 1px solid #dce8f5;
    padding: 8px;
    text-align: center
}

.contest-earned small,.contest-prize small {
    display: block;
    color: #65758a;
    font-size: 11px
}

.contest-earned b,.contest-prize b {
    color: #0b5bd4
}

.contest-prize span {
    display: block;
    font-size: 12px;
    color: #65758a;
    margin-top: 2px
}

@media(max-width: 980px) {
    .classic-top-row {
        grid-template-columns:44px 52px minmax(160px,1fr);
    }

    .classic-energy,.classic-stats,.top-stats-btn {
        grid-column: 3
    }

    .contest-leader-list.polished .contest-leader-row {
        grid-template-columns: 42px 42px 1fr
    }

    .contest-chip,.contest-earned,.contest-prize {
        grid-column: 3
    }
}

@media(max-width: 700px) {
    .top-hero {
        display:block
    }

    .top-hero-badge {
        margin-top: 12px
    }

    .classic-top-row {
        grid-template-columns: 36px 46px 1fr;
        padding: 8px
    }

    .classic-stats {
        display: grid
    }

    .classic-energy,.classic-stats,.top-stats-btn {
        grid-column: 1 / -1
    }

    .top-stats-btn {
        width: 100%
    }
}

/* v117: compact typography, balance tiles, top/contest fixes */
html,body {
    font-weight: 400;
    font-size: 15px;
    line-height: 1.45
}

h1,h2,h3 {
    font-weight: 700;
    letter-spacing: -.02em
}

.brand {
    font-weight: 800
}

.main-menu a,.side-title,.btn,.bonus-btn,.side-btn,.badge,.pill {
    font-weight: 700!important
}

.content-area b,.content-area strong {
    font-weight: 700
}

.muted {
    font-weight: 400
}

.card {
    padding: 16px
}

.side-card {
    padding: 10px
}

.side-title {
    letter-spacing: 0;
    font-size: 15px
}

.user-mini-row {
    grid-template-columns: 90px minmax(0,1fr)
}

.avatar.big {
    width: 90px;
    height: 90px
}

.compact-energy b {
    font-size: 27px;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis
}

.balance-actions {
    gap: 7px
}

.balance-tile {
    display: grid!important;
    grid-template-columns: auto minmax(0,1fr);
    align-items: center;
    gap: 6px;
    text-align: left;
    padding: 9px 10px;
    min-height: 44px;
    overflow: hidden
}

.balance-tile span {
    font-size: 12px;
    line-height: 1.1;
    font-weight: 700;
    white-space: nowrap
}

.balance-tile b {
    font-size: 15px;
    line-height: 1.15;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    min-width: 0
}

.stat span {
    font-size: 13px;
    margin-bottom: 6px
}

.stat b {
    font-size: clamp(20px,2.2vw,25px);
    line-height: 1.15;
    font-weight: 700;
    overflow-wrap: anywhere
}

.dash-stats .stat b,.energy-stats .stat b,.grid.four .stat b {
    white-space: normal
}

.title-row h1,.top-hero h1,.contest-hero h1,.dash-hero h1,.energy-page h1 {
    font-weight: 700
}

.eyebrow {
    font-weight: 700!important
}

.quick-actions a {
    font-weight: 700
}

.ad-type-tab b,.ad-task-title,.compact-task-title {
    font-weight: 700
}

.table-wrap table th {
    font-weight: 700
}

/* v117: cleaner top */
.top-hero {
    padding: 18px 20px
}

.top-hero h1 {
    font-size: 30px
}

.top-hero-badge {
    min-width: 118px;
    padding: 12px
}

.top-hero-badge b {
    font-size: 34px
}

.classic-top-list {
    gap: 6px
}

.classic-top-row {
    grid-template-columns: 38px 46px minmax(150px,1fr) 92px minmax(160px,.85fr) 92px;
    gap: 8px;
    padding: 8px 9px;
    overflow: hidden
}

.classic-place {
    font-size: 17px;
    font-weight: 700
}

.top-avatar {
    width: 44px;
    height: 44px
}

.classic-name {
    gap: 6px
}

.classic-name b {
    font-size: 15px;
    font-weight: 700
}

.classic-name span {
    font-size: 13px;
    font-weight: 600
}

.classic-login {
    font-size: 12px
}

.classic-energy {
    padding: 6px
}

.classic-energy small {
    font-size: 10px;
    font-weight: 700
}

.classic-energy b {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.classic-stats {
    gap: 5px
}

.classic-stats span {
    font-size: 11px;
    padding: 4px 6px;
    line-height: 1.2
}

.top-stats-btn {
    font-size: 11px!important;
    padding: 5px 7px!important;
    min-width: 88px
}

.top-modal-table th,.top-modal-table td {
    padding: 5px;
    font-size: 13px
}

/* v117: compact contests inside center column */
.contest-hero {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    border-left: 4px solid #274fe6;
    background: #fff
}

.contest-hero h1 {
    font-size: 30px;
    margin: 0 0 6px
}

.contest-hero-badge {
    min-width: 110px;
    background: #f4f8ff;
    border: 1px solid var(--line);
    text-align: center;
    padding: 12px
}

.contest-hero-badge b {
    display: block;
    font-size: 32px;
    color: #0d5ed7;
    line-height: 1;
    font-weight: 700
}

.contest-hero-badge span {
    font-size: 12px;
    color: #65758a;
    font-weight: 700
}

.contest-card {
    overflow: hidden
}

.contest-top.upgraded {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start
}

.compact-prizes {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(88px,1fr));
    gap: 7px
}

.compact-prizes div {
    padding: 8px 6px
}

.compact-prizes small {
    display: block;
    font-size: 11px
}

.compact-prizes b {
    display: block;
    font-size: 20px;
    font-weight: 700
}

.compact-prizes span {
    font-size: 11px
}

.contest-leader-list.polished {
    gap: 7px
}

.contest-leader-list.polished .contest-leader-row {
    grid-template-columns: 34px 38px minmax(110px,1fr) 65px 65px 78px 78px;
    gap: 6px;
    padding: 8px;
    max-width: 100%;
    overflow: hidden
}

.contest-place {
    font-size: 18px;
    font-weight: 700
}

.contest-user b {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.contest-user small,.contest-user span {
    font-size: 11px
}

.contest-chip,.contest-earned,.contest-prize {
    padding: 6px 4px;
    min-width: 0
}

.contest-chip small,.contest-earned small,.contest-prize small {
    font-size: 10px;
    line-height: 1.1
}

.contest-chip b {
    font-size: 17px;
    font-weight: 700
}

.contest-earned b,.contest-prize b {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap
}

.contest-prize span {
    font-size: 10px;
    white-space: nowrap
}

.contest-card .avatar.mini {
    width: 36px;
    height: 36px
}

.empty-state.inline {
    padding: 18px;
    text-align: center;
    border: 1px dashed #cbd8e8;
    background: #f8fbff;
    margin-top: 12px
}

/* v117: simple responsive safety */
.content-area,.card,.side-card {
    min-width: 0
}

.table-wrap {
    overflow-x: auto
}

.main-menu {
    overflow-x: auto
}

.main-menu a {
    font-size: 14px;
    padding: 13px 11px
}

.footer {
    font-weight: 400
}

@media(max-width: 1120px) {
    .layout-grid {
        grid-template-columns:210px minmax(0,1fr) 210px;
        gap: 12px
    }

    .classic-top-row {
        grid-template-columns: 34px 42px minmax(130px,1fr) 82px minmax(120px,.8fr) 84px
    }

    .classic-stats span {
        font-size: 10px
    }

    .contest-leader-list.polished .contest-leader-row {
        grid-template-columns: 30px 34px minmax(90px,1fr) 58px 58px 66px 66px;
        gap: 5px
    }

    .contest-chip b {
        font-size: 15px
    }

    .contest-earned b,.contest-prize b {
        font-size: 12px
    }
}

@media(max-width: 980px) {
    .classic-top-row {
        grid-template-columns:34px 42px minmax(0,1fr);
    }

    .classic-energy,.classic-stats,.top-stats-btn {
        grid-column: 3
    }

    .classic-stats {
        display: flex
    }

    .contest-leader-list.polished .contest-leader-row {
        grid-template-columns: 32px 36px 1fr
    }

    .contest-chip,.contest-earned,.contest-prize {
        grid-column: 3
    }

    .contest-hero {
        display: block
    }

    .contest-hero-badge {
        margin-top: 12px
    }
}

@media(max-width: 760px) {
    .grid.four,.grid.three,.grid.two {
        grid-template-columns:1fr
    }

    .balance-tile b {
        font-size: 14px
    }

    .main-menu a {
        font-size: 13px;
        padding: 11px 9px
    }

    .contest-top.upgraded {
        display: block
    }

    .compact-prizes {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }
}

/* v118: красивее боковая доска почёта и иконки в левом меню */
.side-links.icon-links {
    gap: 0
}

.side-links.icon-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    font-weight: 600!important;
    line-height: 1.15;
    overflow: hidden
}

.side-links.icon-links a .mi {
    width: 18px;
    min-width: 13px;
    height: 13px;
    display: inline-grid;
    place-items: center;
    font-size: 16px;
    line-height: 1;
    border-radius: 6px;
    background: #eef5ff;
    border: 1px solid #d7e6fb;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75)
}

.side-links.icon-links a span:last-child {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.side-links.icon-links a:hover .mi {
    background: #dfeeff;
    transform: translateY(-1px)
}

.honor-widget {
    overflow: hidden
}

.honor-side-pro {
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 2px 0 0
}

.honor-avatar-wrap {
    display: block;
    position: relative;
    margin: 0 auto 2px;
    text-decoration: none!important
}

.honor-avatar-wrap:after {
    content: '★';
    position: absolute;
    right: 9px;
    bottom: 6px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #1567d8;
    color: #fff;
    border: 2px solid #fff;
    font-size: 12px;
    box-shadow: 0 3px 8px rgba(21,103,216,.28)
}

.honor-side-pro .avatar.huge {
    width: 118px;
    height: 118px;
    margin: 8px auto 4px;
    border: 7px solid #edf4ff;
    border-radius: 0;
    box-shadow: 0 8px 18px rgba(24,67,112,.10)
}

.honor-name-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    max-width: 100%;
    font-size: 15px;
    color: #07172a;
    line-height: 1.1
}

.honor-name-line b {
    font-weight: 700;
    max-width: 142px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.honor-side-stats {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 2px 0 1px
}

.honor-side-stats span,.honor-side-stats small {
    display: flex!important;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    background: #f5f9ff;
    border: 1px solid #d6e4f5;
    color: #213b5a;
    padding: 7px 9px;
    font-size: 12px;
    line-height: 1.15;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.honor-side-stats span:before {
    content: '🎯';
    font-size: 14px;
    line-height: 1;
    margin-right: 2px;
    flex: 0 0 auto
}

.honor-side-stats small:before {
    content: '💰';
    font-size: 14px;
    line-height: 1;
    margin-right: 2px;
    flex: 0 0 auto
}

.honor-side-stats span {
    font-weight: 600
}

.honor-side-stats small {
    font-weight: 600
}

.honor-side-pro .bonus-btn.blue {
    margin-top: 3px;
    max-width: 100%;
    border-radius: 0;
    background: linear-gradient(180deg,#65a1ed,#4f8fdf);
    box-shadow: 0 3px 0 rgba(29,82,148,.16);
    font-weight: 700!important
}

.honor-side-pro .bonus-btn.blue:not(.disabled) {
    background: linear-gradient(180deg,#2f91f2,#1e78d8)
}

@media(max-width: 760px) {
    .side-links.icon-links a span:last-child {
        white-space:normal
    }

    .honor-side-stats {
        max-width: 230px
    }

    .honor-side-pro .avatar.huge {
        width: 104px;
        height: 104px
    }
}

/* v119: аккуратная страница переписки */
.mail-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border-left: 4px solid #315be8;
    background: linear-gradient(180deg,#fff,#f8fbff);
    margin-bottom: 14px
}

.mail-hero h1 {
    margin: 2px 0 6px;
    font-size: 28px;
    font-weight: 700
}

.mail-hero .muted {
    margin: 0;
    max-width: 610px
}

.mail-hero-badge {
    min-width: 110px;
    text-align: center;
    background: #f1f6ff;
    border: 1px solid var(--line);
    padding: 12px
}

.mail-hero-badge b {
    display: block;
    color: #0d5ed7;
    font-size: 30px;
    line-height: 1;
    font-weight: 700
}

.mail-hero-badge span {
    display: block;
    margin-top: 4px;
    color: #61748c;
    font-size: 12px;
    font-weight: 600
}

.mail-layout-pro {
    display: grid;
    grid-template-columns: 270px minmax(0,1fr);
    gap: 14px;
    align-items: start
}

.mail-dialogs-pro,.mail-thread-pro {
    margin-bottom: 0;
    min-width: 0
}

.mail-dialogs-pro {
    padding: 12px
}

.mail-thread-pro {
    padding: 14px
}

.mail-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line2)
}

.mail-panel-head div {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #122843
}

.mail-panel-head b {
    font-size: 18px;
    font-weight: 700
}

.mail-panel-head em {
    font-style: normal;
    min-width: 28px;
    text-align: center;
    background: #e9f2ff;
    border: 1px solid #cfe0f6;
    color: #0b5bd4;
    padding: 3px 7px;
    font-weight: 700;
    font-size: 12px
}

.dialog-list-pro {
    display: grid;
    gap: 7px
}

.dialog-link-pro {
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid #d8e4f2;
    background: #f8fbff;
    color: #173047;
    text-decoration: none!important;
    transition: .15s ease
}

.dialog-link-pro:hover {
    background: #eef6ff;
    border-color: #b9d2f0;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(28,78,130,.08)
}

.dialog-link-pro.active {
    background: #eaf2ff;
    border-color: #6d97e8;
    box-shadow: inset 4px 0 0 #315be8
}

.dialog-link-pro .avatar.mini {
    width: 44px;
    height: 44px
}

.dialog-info {
    min-width: 0
}

.dialog-info strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0b2545;
    font-weight: 700
}

.dialog-info small {
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #667992;
    font-size: 12px
}

.dialog-meta {
    display: grid;
    justify-items: end;
    gap: 3px;
    align-self: stretch;
    align-content: center
}

.dialog-meta b {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    background: #ef354a;
    color: #fff;
    font-size: 12px;
    font-weight: 700
}

.dialog-meta small {
    font-size: 11px;
    color: #7b8ca1;
    white-space: nowrap
}

.thread-head-pro {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fbff;
    border: 1px solid var(--line);
    padding: 10px;
    margin-bottom: 12px
}

.thread-head-pro .avatar.mini {
    width: 46px;
    height: 46px
}

.thread-head-pro span {
    display: block;
    color: #65758a;
    font-size: 12px
}

.thread-head-pro h2 {
    margin: 1px 0 0;
    font-size: 21px;
    font-weight: 700;
    color: #0b2545
}

.chat-box-pro {
    display: grid;
    gap: 10px;
    max-height: 430px;
    overflow: auto;
    background: #fbfdff;
    border: 1px solid #dbe6f3;
    padding: 12px;
    margin-bottom: 12px
}

.chat-msg-pro {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    gap: 8px;
    align-items: start;
    max-width: 86%
}

.chat-msg-pro .avatar.mini {
    width: 38px;
    height: 38px
}

.chat-msg-pro.mine {
    grid-template-columns: minmax(0,1fr) 38px;
    justify-self: end
}

.chat-msg-pro.mine .avatar {
    grid-column: 2;
    grid-row: 1
}

.chat-msg-pro.mine .chat-bubble-pro {
    grid-column: 1;
    grid-row: 1;
    background: #eaf4ff;
    border-color: #bcd5f2
}

.chat-bubble-pro {
    background: #fff;
    border: 1px solid #dbe6f3;
    padding: 9px 10px;
    min-width: 0
}

.chat-bubble-pro header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 5px
}

.chat-bubble-pro b {
    font-weight: 700;
    color: #0b2545
}

.chat-bubble-pro small {
    font-size: 11px;
    color: #7c8ea4;
    white-space: nowrap
}

.chat-bubble-pro p {
    margin: 0;
    color: #1c3046;
    word-break: break-word;
    line-height: 1.42
}

.mail-send-form {
    background: #f8fbff;
    border: 1px solid var(--line);
    padding: 12px
}

.mail-send-form label {
    font-weight: 700;
    color: #142c48
}

.mail-send-form textarea {
    margin-top: 6px;
    resize: vertical;
    min-height: 94px
}

.mail-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px
}

.mail-empty {
    display: grid;
    gap: 6px;
    place-items: center;
    text-align: center;
    border: 1px dashed #c9d8ea;
    background: #f8fbff;
    padding: 22px;
    color: #65758a
}

.mail-empty strong {
    color: #10243a;
    font-size: 18px
}

.mail-empty.compact {
    padding: 18px 10px
}

.mail-empty.compact strong {
    font-size: 16px
}

.mail-empty.in-thread {
    min-height: 150px
}

.mail-pick-dialog {
    min-height: 285px
}

.mail-pick-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    background: #eaf2ff;
    border: 1px solid #cfe0f6;
    font-size: 30px;
    margin-bottom: 3px
}

@media(max-width: 980px) {
    .mail-layout-pro {
        grid-template-columns:1fr
    }

    .mail-hero {
        display: block
    }

    .mail-hero-badge {
        margin-top: 12px
    }

    .chat-msg-pro {
        max-width: 100%
    }
}

@media(max-width: 560px) {
    .dialog-link-pro {
        grid-template-columns:40px minmax(0,1fr)
    }

    .dialog-meta {
        grid-column: 2;
        justify-items: start;
        display: flex;
        align-items: center
    }

    .mail-form-actions {
        display: grid
    }

    .chat-msg-pro,.chat-msg-pro.mine {
        grid-template-columns: 1fr
    }

    .chat-msg-pro .avatar {
        display: none
    }

    .chat-msg-pro.mine .chat-bubble-pro {
        grid-column: auto
    }
}

/* v120: счетчики заданий и уведомления о личных сообщениях */
.side-links.icon-links a {
    position: relative;
    padding-right: 48px!important
}

.side-links.icon-links a .menu-badge {
    margin-left: auto;
    flex: 0 0 auto
}

.menu-badge {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    background: #ef354a;
    color: #fff;
    border: 1px solid rgba(255,255,255,.55);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    font-style: normal;
    box-shadow: 0 2px 0 rgba(100,18,30,.12)
}

.main-menu .menu-badge {
    height: 18px;
    min-width: 18px;
    padding: 0 5px;
    margin-left: 4px;
    font-size: 11px;
    vertical-align: middle
}

.mail-toast {
    position: fixed;
    left: 18px;
    bottom: 18px;
    width: min(330px,calc(100vw - 36px));
    z-index: 9998;
    opacity: 0;
    transform: translateY(14px);
    transition: .18s ease;
    background: #24364b;
    color: #fff;
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 14px 34px rgba(12,25,43,.28)
}

.mail-toast.show {
    opacity: 1;
    transform: translateY(0)
}

.mail-toast button {
    position: absolute;
    right: 7px;
    top: 5px;
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    color: #ff5070;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 2
}

.mail-toast-link {
    display: grid;
    grid-template-columns: 54px minmax(0,1fr);
    gap: 10px;
    align-items: center;
    padding: 12px 34px 12px 12px;
    color: #fff!important;
    text-decoration: none!important
}

.mail-toast-link img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    background: #fff;
    border: 2px solid rgba(255,255,255,.8)
}

.mail-toast-link b {
    display: block;
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.mail-toast-link small {
    display: block;
    margin-top: 2px;
    color: #bde0ff;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.mail-toast-link em {
    display: block;
    margin-top: 4px;
    color: #e7f2ff;
    font-size: 12px;
    font-style: normal;
    line-height: 1.25;
    max-height: 32px;
    overflow: hidden
}

@media(max-width: 760px) {
    .side-links.icon-links a {
        padding-right:10px!important
    }

    .mail-toast {
        left: 10px;
        bottom: 10px;
        width: calc(100vw - 20px)
    }
}

/* v121: фикс положения счетчиков в левом меню — строго справа */
.side-links.icon-links a, .menu-box .side-links.icon-links a {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
}

.side-links.icon-links a > span:not(.mi), .menu-box .side-links.icon-links a > span:not(.mi) {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.side-links.icon-links a > .menu-badge, .menu-box .side-links.icon-links a > .menu-badge {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-left: 0 !important;
    flex: 0 0 auto !important;
    z-index: 2 !important;
}

@media(max-width: 760px) {
    .side-links.icon-links a, .menu-box .side-links.icon-links a {
        padding-right:48px !important;
    }
}

/* v124: подвал прижат к низу окна и отделён от основного макета */
html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-head {
    flex: 0 0 auto;
}

#page-shell {
    flex: 1 0 auto;
    margin-bottom: 24px;
}

.footer {
    flex: 0 0 auto;
    margin-top: auto;
}

@media(max-width: 820px) {
    #page-shell {
        margin-bottom:18px;
    }
}

/* v125: фикс ширины основного макета после sticky-footer на flex-body */
#page-shell.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

.site-head, .footer {
    width: 100%;
}

/* v126: шапка выровнена строго по ширине основного макета */
.site-head {
    background: var(--bg) !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

.site-head .brand-line.container, .site-head .main-menu.container, #page-shell.container {
    width: 100% !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

.site-head .brand-line.container {
    border-top: 4px solid #253fc8 !important;
    border-left: 1px solid var(--line) !important;
    border-right: 1px solid var(--line) !important;
}

.site-head .main-menu.container {
    border-left: 1px solid #304bd1 !important;
    border-right: 1px solid #304bd1 !important;
}

@media(max-width: 820px) {
    .site-head .brand-line.container, .site-head .main-menu.container, #page-shell.container {
        width:100% !important;
    }
}

/* v130: страницы AZVOX Success/Fail внутри общего шаблона сайта */
.pay-status-card {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 42px rgba(20,60,130,.08);
    min-height: 575px;
    margin: 0 0 16px;
}

.pay-status-title {
    background: #5b6ce8;
    color: #fff;
    text-align: center;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 900;
    padding: 14px 18px;
}

.pay-status-body {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 20px;
}

.pay-status-smile {
    width: 126px;
    height: 126px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 82px;
    line-height: 1;
    background: linear-gradient(180deg,#ffe991,#ffac1c);
    border: 4px solid #ffa51c;
    box-shadow: 0 12px 22px rgba(230,140,0,.25);
    margin-bottom: 24px;
}

.pay-status-card.is-fail .pay-status-smile {
    background: linear-gradient(180deg,#eef3ff,#cfdaf3);
    border-color: #b9c7e5;
    box-shadow: 0 12px 22px rgba(80,110,170,.18);
}

.pay-status-main {
    font-size: 20px;
    font-weight: 900;
    line-height: 1.25;
    margin: 0 0 8px;
}

.pay-status-sub {
    font-size: 20px;
    margin: 0 0 18px;
}

.pay-status-main.ok,.pay-status-sub.ok {
    color: #12a230
}

.pay-status-main.bad,.pay-status-sub.bad {
    color: #dc2636
}

.pay-status-note {
    max-width: 620px;
    color: #5b6b88;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 auto 24px;
}

.pay-status-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.pay-status-actions .btn.light {
    background: #eef4ff!important;
    color: #164a94!important;
    border-color: #c9d9f4!important;
}

@media(max-width: 640px) {
    .pay-status-card {
        min-height:420px
    }

    .pay-status-title {
        font-size: 22px
    }

    .pay-status-body {
        min-height: 360px;
        padding: 24px 14px
    }

    .pay-status-smile {
        width: 108px;
        height: 108px;
        font-size: 70px
    }

    .pay-status-actions {
        display: grid;
        width: 100%
    }
}

/* v131: подвал в одном контейнере с макетом, как шапка */
.footer {
    width: 100% !important;
    background: var(--bg) !important;
    border-top: 0 !important;
    padding: 0 !important;
    margin-top: auto !important;
}

.footer .footer-grid.container, .footer .container.footer-grid {
    width: 100% !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    background: #24364b !important;
    color: #d9e6f3 !important;
    border-top: 4px solid #4b63df !important;
    border-left: 1px solid var(--line) !important;
    border-right: 1px solid var(--line) !important;
    padding: 18px 14px !important;
    display: flex !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.footer a {
    color: #fff !important;
}

.footer b {
    display: block;
    color: #fff !important;
}

.footer span {
    display: block;
    color: #b9c9dc !important;
}

#page-shell.container {
    margin-bottom: 0 !important;
}

@media(max-width: 820px) {
    .footer .footer-grid.container, .footer .container.footer-grid {
        display:block !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* v132: основной макет и подвал объединены в один общий контейнер */
.site-frame.container {
    width: 100% !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    background: #fff !important;
    border-left: 1px solid var(--line) !important;
    border-right: 1px solid var(--line) !important;
    box-sizing: border-box !important;
    flex: 1 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
}

.site-frame #page-shell {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex: 1 0 auto !important;
}

.site-frame #page-shell.layout-grid {
    border-left: 0 !important;
    border-right: 0 !important;
    background: #fff !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 22px !important;
}

.site-frame #page-shell.simple-page {
    border-left: 0 !important;
    border-right: 0 !important;
    background: #fff !important;
}

.site-frame .footer {
    width: 100% !important;
    background: #fff !important;
    border-top: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}

.site-frame .footer .footer-grid {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: #24364b !important;
    color: #d9e6f3 !important;
    border-top: 4px solid #4b63df !important;
    border-left: 0 !important;
    border-right: 0 !important;
    padding: 18px 14px !important;
    display: flex !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

@media(max-width: 820px) {
    .site-frame.container {
        padding-left:10px !important;
        padding-right: 10px !important;
    }

    .site-frame .footer .footer-grid {
        display: block !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}
