/* iPhone safe-area: С„РѕРЅ РѕР±Р»Р°СЃС‚Рё СЃ С‡Р°СЃР°РјРё, СЃРµС‚СЊСЋ Рё Р±Р°С‚Р°СЂРµРµР№ */
html {
    background: #0b0b0d;
}

body {
    margin: 0;
    background: #000;
}

.site-header-wrap {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #000;
    flex: 0 0 auto;
}

.site-header {
    position: relative;
    top: 0;
    z-index: 1;

    display: flex;
    justify-content: space-between;
    align-items: center;

    min-height: 60px;
    padding: 16px 5vw;

    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: #000;
    box-sizing: border-box;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--text, #f5f5f7);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.05em;
    line-height: 1;
    text-decoration: none;
}

.site-favicon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;

    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
}

.site-nav {
    display: flex;
    gap: 12px;
    align-items: center;

    font-size: 14px;
    line-height: 1;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;

    border: 1px solid var(--border, #38383a);
    border-radius: 12px;

    color: var(--muted, #98989d);
    background: var(--surface, #1c1c1e);

    font-size: 19px;
    line-height: 1;
    text-decoration: none;
}

/* РџСЂРёР»РѕР¶РµРЅРёСЏ */
.app-menu-link {
    color: var(--muted, #98989d) !important;
    font-size: 19px !important;
}

/* Dashboard */
.dashboard-link {
    color: var(--muted, #98989d) !important;
    font-size: 19px !important;
}

.app-menu-link:hover,
.dashboard-link:hover {
    color: var(--text, #f5f5f7) !important;
    background: var(--surface-secondary, #2c2c2e);
}

/* РџСЂРѕС„РёР»СЊ Рё РІС‹С…РѕРґ вЂ” Р±РµР· РєРѕРЅС‚РµР№РЅРµСЂР° */
.site-nav .profile-link,
.site-nav .logout-link {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;

    border: none;
    border-radius: 0;
    background: transparent;
}

.site-nav .profile-link {
    color: var(--muted, #98989d) !important;
    font-size: 18px !important;
}

.site-nav .profile-link.has-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    overflow: hidden;
    border-radius: 50%;
}

.site-nav .profile-link .profile-avatar {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.site-nav .logout-link {
    color: var(--blue, #0a84ff) !important;
    font-size: 19px !important;
}

.site-nav .profile-link:hover,
.site-nav .logout-link:hover {
    color: var(--text, #f5f5f7) !important;
    background: transparent !important;
}

/* Р“РѕСЃС‚РµРІС‹Рµ СЃСЃС‹Р»РєРё: РІС…РѕРґ Рё СЂРµРіРёСЃС‚СЂР°С†РёСЏ */
.site-nav .login-link,
.site-nav .register-link {
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: 0 15px;

    font-size: 14px;
}

.site-nav .login-link {
    border-color: transparent;
    color: var(--blue, #0a84ff) !important;
    background: transparent;
}

.site-nav .login-link:hover {
    color: var(--text, #f5f5f7) !important;
    background: transparent;
}

.site-nav .register-link {
    border-color: var(--blue, #0a84ff);
    color: #ffffff !important;
    background: var(--blue, #0a84ff);
}

.site-nav .register-link:hover {
    color: #ffffff !important;
    background: #409cff;
}

@media (max-width: 700px) {
    .site-header {
        padding: 14px 20px;
    }

    .admin-toolbar {
        padding: 8px 20px 10px;
    }

    .site-nav {
        gap: 8px;
        font-size: 13px;
    }
}

@media (max-width: 560px) {
    .site-header {
        padding: 12px 16px;
    }

    .admin-toolbar {
        padding: 8px 16px 10px;
        gap: 12px;
    }

    .admin-toolbar-title {
        display: none;
    }

    .site-nav {
        gap: 6px;
    }

    .site-nav a {
        display: inline-flex;

        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;

        padding: 0;
        font-size: 18px;
    }

    .site-nav .login-link,
    .site-nav .register-link {
        width: auto;
        min-height: 36px;
        padding: 0 10px;
        font-size: 12px;
    }

    .site-favicon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
}

@font-face {
    font-family: 'Rubik Vinyl';
    /* Абсолютный URL, а не относительный: header.css подключают все
       поддомены, и шрифт должен тянуться из единственного места. */
    src: url('https://clownades.com/includes/fonts/RubikVinyl-Regular.ttf?v=2') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.site-logo {
    font-family: 'Rubik Vinyl', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif !important;
    font-weight: 400 !important;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 8px 5vw 12px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    background: #0c0c0e;
    color: #f5f5f7;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

.admin-toolbar.is-saving {
    opacity: .65;
    pointer-events: none;
}

.admin-toolbar-title {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #98989d;
    margin-right: 4px;
}

.ios-switch,
.ios-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
}

.ios-switch input,
.ios-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ios-switch-ui {
    position: relative;
    width: 51px;
    height: 31px;
    flex-shrink: 0;
    border-radius: 16px;
    background: #39393d;
    transition: background .2s ease;
}

.ios-switch-ui::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .25);
    transition: transform .22s cubic-bezier(.2, .9, .3, 1.2);
}

.ios-switch input:checked + .ios-switch-ui {
    background: #30d158;
}

.ios-switch input:checked + .ios-switch-ui::after {
    transform: translateX(20px);
}

.ios-switch-text,
.ios-check-text {
    font-size: 13px;
    font-weight: 500;
    color: #f5f5f7;
}

.ios-check-ui {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1.5px solid #636366;
    background: #2c2c2e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease;
}

.ios-check-ui::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
    opacity: 0;
}

.ios-check input:checked + .ios-check-ui {
    background: #0a84ff;
    border-color: #0a84ff;
}

.ios-check input:checked + .ios-check-ui::after {
    opacity: 1;
}