* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

:root {
    --forest-950: #132319;
    --forest-900: #1a3021;
    --forest-800: #27452e;
    --forest-700: #37623e;
    --forest-600: #4f7c52;
    --moss: #75945d;
    --sage: #a8b58d;
    --parchment: #eee3c5;
    --parchment-light: #f8f1dc;
    --ink: #233526;
    --muted: #687466;
    --gold: #d7ad4a;
    --danger: #a44138;
    --line: rgba(36, 65, 40, 0.2);
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(rgba(12, 28, 17, 0.5), rgba(9, 19, 12, 0.7)),
        radial-gradient(circle at top, rgba(202, 218, 154, 0.22), transparent 34%),
        linear-gradient(135deg, #567359 0%, #263f2b 45%, #15251a 100%);
    background-attachment: fixed;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
}

.page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
}

/* Авторизация */

.auth-card {
    width: min(100%, 450px);
    max-height: calc(100vh - 30px);
    overflow: auto;
    padding: 34px 38px;
    color: #fff;
    background: rgba(20, 35, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(12px);
}

.auth-logo {
    margin-bottom: 26px;
    text-align: center;
}

.auth-logo h1 {
    margin: 0;
    font-size: clamp(34px, 8vw, 48px);
}

.auth-logo p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.67);
    font-size: 14px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.tab-button {
    position: relative;
    padding: 13px 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.58);
    background: transparent;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.tab-button.active,
.tab-button:hover {
    color: #fff;
}

.tab-button.active::after {
    content: "";
    position: absolute;
    right: 16px;
    bottom: -1px;
    left: 16px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--gold);
}

.auth-panel {
    animation: panel-appearance 180ms ease;
}

@keyframes panel-appearance {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-panel form {
    display: grid;
    gap: 18px;
}

.auth-panel label {
    display: grid;
    gap: 8px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
    font-weight: 600;
}

.auth-panel input,
.auth-panel select {
    width: 100%;
    padding: 10px 2px;
    color: #fff;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    outline: none;
}

.auth-panel select option {
    color: var(--ink);
}

.auth-panel input:focus,
.auth-panel select:focus {
    border-color: var(--gold);
    box-shadow: 0 1px 0 var(--gold);
}

.agreement {
    display: flex !important;
    align-items: flex-start;
    gap: 10px !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.4;
}

.agreement input {
    width: 17px !important;
    height: 17px;
    accent-color: var(--gold);
}

.main-button {
    width: 100%;
    padding: 13px 20px;
    cursor: pointer;
    color: #332a18;
    background: linear-gradient(180deg, #f3cb67, #dca83e);
    border-radius: 30px;
    font-weight: 800;
}

.text-button {
    display: block;
    margin: 17px auto 0;
    padding: 5px;
    color: rgba(255, 255, 255, 0.65);
    background: transparent;
    cursor: pointer;
}

.message {
    min-height: 22px;
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
}

.message.success,
.mini-message.success {
    color: #77a966;
}

.message.error,
.mini-message.error {
    color: #d2675d;
}

/* Личный кабинет */

.dashboard {
    width: min(1240px, 100%);
    min-height: 750px;
    display: grid;
    grid-template-columns: 275px 1fr;
    overflow: hidden;
    background: rgba(241, 232, 203, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.profile-sidebar {
    padding: 28px 22px;
    color: #eef4e8;
    background:
        linear-gradient(rgba(25, 52, 31, 0.94), rgba(17, 39, 24, 0.97)),
        linear-gradient(135deg, #42664a, #16291b);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--forest-900);
    background: var(--parchment);
}

.avatar-block {
    margin-top: 26px;
    text-align: center;
}

.avatar-frame {
    width: 126px;
    height: 126px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 4px solid rgba(244, 235, 204, 0.8);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#avatar-placeholder {
    font-size: 52px;
    font-weight: 800;
    color: var(--parchment);
}

.upload-avatar-button {
    display: inline-block;
    padding: 8px 12px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    font-size: 12px;
}

.sidebar-user {
    margin-top: 15px;
    display: grid;
    gap: 5px;
    text-align: center;
}

.sidebar-user strong {
    font-size: 19px;
}

.sidebar-user span,
.profile-sidebar small {
    color: rgba(255, 255, 255, 0.7);
}

.level-progress {
    height: 7px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
}

.level-progress span {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #f0d982);
    transition: width 220ms ease;
}

#level-progress-text {
    display: block;
    margin-top: 7px;
    text-align: center;
}

.profile-nav {
    display: grid;
    gap: 5px;
    margin-top: 25px;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    border-radius: 9px;
    text-align: left;
}

.nav-button:hover,
.nav-button.active {
    color: var(--forest-950);
    background: var(--parchment);
}

.nav-button span {
    width: 20px;
    text-align: center;
}

.logout-button {
    width: 100%;
    margin-top: 22px;
    padding: 11px;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
}

.dashboard-content {
    padding: 36px;
    overflow: auto;
    background:
        linear-gradient(rgba(248, 241, 220, 0.93), rgba(238, 227, 197, 0.96)),
        repeating-linear-gradient(
            45deg,
            rgba(61, 83, 54, 0.02) 0,
            rgba(61, 83, 54, 0.02) 2px,
            transparent 2px,
            transparent 8px
        );
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.dashboard-header h1,
.section-title h2,
.profile-hero h2 {
    margin: 0;
    color: var(--forest-800);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--moss);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.online-badge,
.section-counter {
    padding: 8px 12px;
    color: var(--forest-700);
    background: rgba(117, 148, 93, 0.16);
    border: 1px solid rgba(79, 124, 82, 0.22);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.content-panel,
.message-tab {
    display: none;
}

.content-panel.active,
.message-tab.active {
    display: block;
    animation: panel-appearance 180ms ease;
}

.parchment-card,
.settings-card,
.stat-card,
.achievement-card,
.player-card,
.chat-card {
    background: rgba(255, 252, 239, 0.78);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(52, 68, 48, 0.07);
}

.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
}

.profile-id {
    display: grid;
    gap: 4px;
    text-align: right;
}

.profile-id span,
.muted {
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 18px 0;
}

.stat-card {
    display: grid;
    gap: 7px;
    padding: 18px;
}

.stat-card > span {
    color: var(--moss);
    font-size: 13px;
    font-weight: 700;
}

.stat-card strong {
    color: var(--forest-800);
    font-size: 27px;
}

.stat-card small {
    color: var(--muted);
}

.profile-columns,
.friends-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.parchment-card {
    padding: 24px;
}

.parchment-card h3,
.settings-card h3 {
    margin-top: 0;
    color: var(--forest-800);
}

.profile-details {
    display: grid;
    gap: 12px;
    margin: 0;
}

.profile-details > div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
}

.profile-details dt {
    color: var(--muted);
}

.profile-details dd {
    margin: 0;
    font-weight: 700;
}

.privacy-note {
    margin-bottom: 0;
    font-size: 12px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.achievement-grid,
.players-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.achievement-card {
    display: flex;
    gap: 15px;
    padding: 18px;
}

.achievement-card h3,
.achievement-card p {
    margin: 0;
}

.achievement-card p {
    margin-top: 6px;
    color: var(--muted);
}

.achievement-card.locked {
    opacity: 0.72;
    filter: grayscale(0.45);
}

.achievement-icon {
    font-size: 30px;
}

.search-field,
.settings-card label {
    display: grid;
    gap: 8px;
    color: var(--forest-700);
    font-size: 13px;
    font-weight: 700;
}

.search-field input,
.settings-card input,
.settings-card select,
.settings-card textarea,
.chat-compose textarea {
    width: 100%;
    padding: 12px;
    color: var(--ink);
    background: #fffdf4;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
}

.player-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 13px;
    padding: 16px;
}

.player-avatar,
.mini-avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
    color: #fff;
    background: var(--forest-600);
    border-radius: 50%;
    font-weight: 800;
}

.player-avatar {
    width: 54px;
    height: 54px;
    font-size: 22px;
}

.mini-avatar {
    width: 34px;
    height: 34px;
}

.player-avatar img,
.mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-info {
    min-width: 0;
}

.player-info strong,
.player-info span {
    display: block;
}

.player-info span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.player-action {
    padding: 8px 10px;
    cursor: pointer;
    color: #fff;
    background: var(--forest-700);
    border-radius: 7px;
    font-size: 12px;
}

.player-action.secondary {
    color: var(--forest-700);
    background: rgba(79, 124, 82, 0.13);
}

.compact-player-list,
.stack-list {
    display: grid;
    gap: 10px;
}

.compact-player,
.stack-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.compact-player:last-child,
.stack-item:last-child {
    border-bottom: 0;
}

.stack-item {
    justify-content: space-between;
}

.stack-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stack-actions {
    display: flex;
    gap: 6px;
}

.link-button {
    padding: 0;
    cursor: pointer;
    color: var(--forest-700);
    background: transparent;
    text-decoration: underline;
}

.panel-link {
    margin-top: 12px;
}

.subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.subtab-button {
    padding: 9px 13px;
    cursor: pointer;
    color: var(--forest-700);
    background: rgba(255, 252, 239, 0.58);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.subtab-button.active {
    color: #fff;
    background: var(--forest-700);
}

.chat-card {
    overflow: hidden;
}

.chat-list {
    height: 390px;
    padding: 18px;
    overflow-y: auto;
}

.chat-message {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.chat-message-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.chat-message-header strong {
    color: var(--forest-700);
}

.chat-message-header time {
    color: var(--muted);
    font-size: 11px;
}

.chat-message p {
    margin: 4px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-compose {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--line);
}

.chat-compose textarea {
    min-height: 70px;
    resize: vertical;
}

.message-list {
    min-height: 300px;
}

.private-message {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.private-message:last-child {
    border-bottom: 0;
}

.private-message header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.private-message p {
    margin-bottom: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.settings-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 22px;
}

.forest-button {
    display: inline-block;
    padding: 11px 15px;
    cursor: pointer;
    color: #fff;
    background: var(--forest-700);
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
}

.danger-zone {
    grid-column: 1 / -1;
    border-color: rgba(164, 65, 56, 0.28);
}

.danger-button {
    width: fit-content;
    padding: 11px 15px;
    cursor: pointer;
    color: #fff;
    background: var(--danger);
    border-radius: 8px;
    font-weight: 700;
}

.danger-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.mini-message {
    min-height: 18px;
    margin: 0;
    font-size: 12px;
}

/* Подтверждение почты */

.confirmation-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.confirmation-card {
    width: min(100%, 500px);
    padding: 42px;
    text-align: center;
    color: var(--ink);
    background: rgba(248, 241, 220, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.confirmation-icon {
    width: 78px;
    height: 78px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--forest-700);
    border-radius: 50%;
    font-size: 34px;
}

.confirmation-link {
    margin-top: 16px;
}

@media (max-width: 960px) {
    .page {
        padding: 0;
        place-items: stretch;
    }

    .dashboard {
        min-height: 100vh;
        grid-template-columns: 220px 1fr;
        border-radius: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-columns,
    .friends-columns,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .danger-zone {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .dashboard {
        display: block;
    }

    .profile-sidebar {
        padding: 15px;
    }

    .brand,
    .avatar-block,
    .sidebar-user,
    .level-progress,
    #level-progress-text {
        display: none;
    }

    .profile-nav {
        grid-template-columns: repeat(6, 1fr);
        gap: 3px;
        margin-top: 0;
    }

    .nav-button {
        justify-content: center;
        padding: 9px 3px;
        font-size: 0;
    }

    .nav-button span {
        font-size: 19px;
    }

    .logout-button {
        margin-top: 9px;
    }

    .dashboard-content {
        padding: 22px 13px;
    }

    .dashboard-header,
    .profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-id {
        text-align: left;
    }

    .stats-grid,
    .achievement-grid,
    .players-grid {
        grid-template-columns: 1fr;
    }

    .chat-compose {
        grid-template-columns: 1fr;
    }
}


/* ClanGenRU v3 additions */
.welcome-layout{width:min(1120px,100%);display:grid;grid-template-columns:430px 1fr;overflow:hidden;border-radius:22px;box-shadow:0 30px 90px rgba(0,0,0,.44)}
.welcome-layout>.auth-card{width:auto;max-height:calc(100vh - 40px);overflow:auto;border-radius:0}
.welcome-info-card{min-height:650px;padding:70px 64px;display:flex;flex-direction:column;justify-content:center;background:linear-gradient(rgba(248,241,220,.92),rgba(238,227,197,.96));color:var(--ink)}
.welcome-kicker{color:var(--moss);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:1px}.welcome-info-card h1{margin:16px 0 20px;color:var(--forest-800);font:54px/1.08 Georgia,serif}.welcome-info-card p{font-size:17px;line-height:1.7}.welcome-note{padding-left:14px;border-left:3px solid var(--gold);color:var(--muted);font-size:14px!important}.welcome-actions,.welcome-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}.welcome-links{gap:18px;margin-top:34px}.welcome-links a{color:var(--forest-700);font-weight:700}.logo-link{color:#fff;font-size:48px;font-weight:800;text-decoration:none}.outline-button{display:inline-block;padding:11px 15px;border:1px solid var(--forest-700);border-radius:8px;color:var(--forest-700);font-weight:700;text-decoration:none}.cabinet-links{display:flex;justify-content:center;gap:10px;margin-top:15px;color:rgba(255,255,255,.67);font-size:12px}.cabinet-links a{color:#f0d57d}.nav-link{display:flex;align-items:center;gap:12px;padding:11px 14px;color:rgba(255,255,255,.72);text-decoration:none;border-radius:9px}.nav-link:hover{color:var(--forest-950);background:var(--parchment)}.nav-link span{width:20px;text-align:center}.profile-editor{display:grid;gap:14px}.profile-editor label{display:grid;gap:8px;color:var(--forest-700);font-size:13px;font-weight:700}.profile-editor input,.profile-editor textarea{width:100%;padding:12px;background:#fffdf4;border:1px solid var(--line);border-radius:8px}.profile-editor textarea{min-height:180px;resize:vertical}.players-table{display:grid;gap:10px}.player-row{display:grid;grid-template-columns:70px minmax(150px,1.4fr) 100px 100px minmax(180px,auto);align-items:center;gap:14px;padding:14px 16px;background:rgba(255,252,239,.78);border:1px solid var(--line);border-radius:14px}.player-identity{display:flex;align-items:center;gap:12px}.player-name-link{color:var(--forest-700);font-weight:800;text-decoration:underline}.player-actions{display:flex;justify-content:flex-end;gap:7px}.player-id-cell{color:var(--muted);font-weight:700}.self-label{color:var(--muted);font-size:12px;font-weight:700}.site-page,.public-profile-page{width:min(1100px,calc(100% - 28px));min-height:calc(100vh - 28px);margin:14px auto;overflow:hidden;background:rgba(243,233,203,.97);border-radius:20px;box-shadow:0 24px 70px rgba(0,0,0,.35)}.site-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 28px;color:#fff;background:var(--forest-900)}.site-header nav{display:flex;flex-wrap:wrap;gap:16px}.site-header a{text-decoration:none}.site-brand{font-size:21px;font-weight:800}.site-content{padding:48px}.site-content>h1{margin-top:0;color:var(--forest-800);font:58px Georgia,serif}.about-hero,.news-card,.legal-card,.placeholder-card,.public-profile-card{background:rgba(255,252,239,.78);border:1px solid var(--line);border-radius:14px}.about-hero,.legal-card,.public-profile-card{padding:28px}.news-card{margin-bottom:14px;padding:22px}.placeholder-card{padding:60px 30px;text-align:center}.placeholder-icon{font-size:70px}.legal-note{margin-top:30px;padding:16px;color:var(--muted);background:rgba(117,148,93,.12);border-radius:9px}.public-profile-card{margin:40px}.public-profile-top{display:flex;align-items:center;gap:24px;padding-bottom:24px;border-bottom:1px solid var(--line)}.public-profile-avatar{width:150px;height:150px;object-fit:cover;border-radius:14px}.public-profile-avatar.placeholder{display:grid;place-items:center;color:#fff;background:var(--forest-600);font-size:60px;font-weight:800}.public-profile-section{padding:22px 0;border-bottom:1px solid var(--line)}.public-profile-actions{display:flex;flex-wrap:wrap;gap:10px;padding-top:24px}.profile-description{white-space:pre-wrap;line-height:1.7}.back-link{margin:0 40px 40px}.mini-achievements{display:flex;flex-wrap:wrap;gap:10px}.mini-achievements span{padding:9px 12px;background:rgba(117,148,93,.13);border-radius:999px;color:var(--forest-700)}
@media(max-width:980px){.welcome-layout{grid-template-columns:1fr;border-radius:0}.welcome-info-card{min-height:auto;padding:45px 35px}.welcome-info-card h1{font-size:42px}.player-row{grid-template-columns:55px 1fr 70px}.player-level-cell{display:none}.player-actions{grid-column:2/-1;justify-content:flex-start}}
@media(max-width:720px){.player-row{grid-template-columns:44px 1fr}.player-actions{grid-column:1/-1}.site-header{align-items:flex-start;flex-direction:column}.site-content{padding:28px 18px}.public-profile-card{margin:18px}.public-profile-top{align-items:flex-start;flex-direction:column}.public-profile-avatar{width:110px;height:110px}}


/* ============================================================
   Сообщения, уведомления, присутствие и жалобы
   ============================================================ */

.nav-button-with-badge,
.subtab-with-badge {
    position: relative;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    background: #b53232;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(120, 20, 20, 0.35);
}

.nav-badge[hidden] {
    display: none;
}

.subtab-with-badge .nav-badge {
    margin-left: 6px;
    vertical-align: middle;
}

.app-toast {
    position: fixed;
    z-index: 1000;
    top: 22px;
    right: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 15px 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    background: #34513a;
    color: #fff;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

.app-toast.error {
    background: #8d3030;
}

.app-toast[hidden] {
    display: none;
}

.app-toast button {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
}

.chat-presence {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(54, 82, 57, 0.18);
    border-radius: 14px;
    background: rgba(238, 232, 205, 0.72);
}

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

.viewer-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border: 1px solid rgba(54, 82, 57, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
}

.viewer-chip a {
    color: var(--forest, #35553b);
    font-weight: 700;
    text-decoration: none;
}

.viewer-chip button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.chat-list {
    min-height: 300px;
    max-height: 520px;
}

.chat-message {
    align-items: flex-start;
}

.chat-message-content {
    min-width: 0;
    flex: 1;
}

.chat-message-header a {
    color: var(--forest, #35553b);
    font-weight: 800;
    text-decoration: none;
}

.chat-message-actions,
.message-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
}

.chat-link,
.small-action {
    border: 0;
    padding: 3px 0;
    background: transparent;
    color: #46644d;
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.danger-text {
    color: #a23c3c !important;
}

.message-list {
    display: grid;
    gap: 0;
    max-height: 590px;
    overflow: auto;
    padding: 0;
}

.private-message-row {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(54, 82, 57, 0.18);
    background: rgba(255, 255, 255, 0.22);
}

.private-message-row:last-child {
    border-bottom: 0;
}

.private-message-row.unread {
    background: rgba(251, 235, 184, 0.72);
}

.private-message-summary {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.private-message-main {
    min-width: 0;
    flex: 1;
}

.private-message-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.private-message-heading a {
    color: #35553b;
    font-weight: 800;
    text-decoration: none;
}

.private-message-heading time,
.read-status {
    color: #7b806e;
    font-size: 12px;
}

.private-message-preview {
    margin: 5px 0 0;
    color: #51584d;
}

.private-message-full {
    margin-top: 12px;
    padding: 13px 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.58);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.unread-dot {
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    margin-top: 7px;
    border-radius: 50%;
    background: #c83434;
    box-shadow: 0 0 0 4px rgba(200, 52, 52, 0.12);
}

.report-dialog {
    width: min(520px, calc(100vw - 28px));
    border: 0;
    border-radius: 18px;
    padding: 0;
    background: #f2ecd3;
    color: #28372d;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.report-dialog::backdrop {
    background: rgba(12, 20, 14, 0.68);
}

.report-dialog form {
    display: grid;
    gap: 15px;
    padding: 24px;
}

.report-dialog textarea {
    min-height: 150px;
    resize: vertical;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.secondary-button {
    border: 1px solid rgba(54, 82, 57, 0.32);
    border-radius: 10px;
    padding: 10px 16px;
    background: transparent;
    color: #35553b;
    cursor: pointer;
}

@media (max-width: 720px) {
    .app-toast {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .private-message-heading {
        display: grid;
        gap: 4px;
    }

    .chat-list,
    .message-list {
        max-height: 460px;
    }
}

/* =========================================================
   ClanGenRU: онлайн-статусы и административная панель
   ========================================================= */

.status-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    border: 2px solid rgba(255, 253, 244, 0.95);
    border-radius: 50%;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
}

.status-dot.online {
    background: #42a85a;
}

.status-dot.offline {
    background: #92978e;
}

.avatar-with-status {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.avatar-with-status .avatar-status-dot {
    position: absolute;
    right: -1px;
    bottom: 1px;
}

.avatar-with-status.compact .avatar-status-dot {
    width: 9px;
    height: 9px;
    right: -2px;
    bottom: -1px;
}

#own-online-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.player-row {
    grid-template-columns: 72px minmax(280px, 1fr) minmax(210px, auto) !important;
    align-items: center;
}

.player-identity {
    min-width: 0;
}

.player-info .player-name-link {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.player-info span {
    line-height: 1.45;
}

.player-actions {
    align-items: center;
    flex-wrap: wrap;
}

.player-state-label {
    display: inline-flex;
    align-items: center;
    min-height: 33px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.player-state-label.self {
    color: #536054;
    background: rgba(83, 96, 84, 0.12);
}

.player-state-label.friend {
    color: #315d39;
    background: rgba(66, 168, 90, 0.14);
}

.player-state-label.pending {
    color: #755d17;
    background: rgba(218, 177, 54, 0.18);
}

.admin-mini-badge,
.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    color: #6b4a09;
    background: rgba(226, 184, 60, 0.22);
    font: 800 10px/1.2 Arial, sans-serif;
    text-decoration: none;
}

.admin-badge {
    padding: 7px 11px;
    font-size: 12px;
}

.stack-user-link {
    min-width: 0;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.stack-user-link:hover strong {
    text-decoration: underline;
}

.stack-item {
    gap: 14px;
}

.admin-nav-button {
    color: #f4d36d;
}

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

.admin-grid textarea {
    min-height: 120px;
    resize: vertical;
}

.admin-checkbox {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: flex-start;
}

.admin-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-ban-list-card {
    grid-column: 1 / -1;
}

.admin-ban-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.admin-ban-row:last-child {
    border-bottom: 0;
}

.admin-ban-row > div {
    display: grid;
    gap: 4px;
}

.admin-ban-row span,
.admin-ban-row small {
    color: var(--muted);
}

.blocked-panel {
    display: grid;
    place-items: center;
    min-height: 70vh;
    padding: 30px;
}

.blocked-card {
    width: min(680px, 100%);
    padding: 38px;
    border: 1px solid rgba(149, 55, 55, 0.28);
    border-radius: 22px;
    background: rgba(255, 246, 224, 0.94);
    box-shadow: 0 22px 60px rgba(44, 25, 20, 0.14);
    text-align: center;
}

.blocked-card h2 {
    margin: 8px 0 16px;
    color: #7f2f2f;
    font: 42px/1.1 Georgia, serif;
}

.blocked-icon {
    display: block;
    margin-bottom: 8px;
    font-size: 58px;
}

.blocked-until {
    font-weight: 800;
}

.blocked-reason {
    padding: 13px 16px;
    border-radius: 12px;
    background: rgba(154, 66, 56, 0.1);
    white-space: pre-wrap;
}

.account-blocked .dashboard-header,
.account-blocked .content-panel,
.account-blocked .profile-nav,
.account-blocked .avatar-block,
.account-blocked .sidebar-user,
.account-blocked .level-progress,
.account-blocked #level-progress-text,
.account-blocked .cabinet-links {
    display: none !important;
}

.account-blocked #blocked-panel {
    display: grid !important;
}

.public-profile-avatar {
    border-radius: 50% !important;
}

.public-avatar-wrap {
    position: relative;
    display: inline-flex;
}

.public-avatar-wrap .status-dot {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 17px;
    height: 17px;
    border-width: 3px;
}

.public-profile-meta {
    line-height: 1.65;
}

@media (max-width: 980px) {
    .player-row {
        grid-template-columns: 58px minmax(0, 1fr) !important;
    }

    .player-actions {
        grid-column: 2;
        justify-content: flex-start;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-ban-list-card {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .player-row {
        grid-template-columns: 1fr !important;
    }

    .player-id-cell,
    .player-actions {
        grid-column: 1;
    }

    .player-actions {
        justify-content: flex-start;
    }

    .stack-item,
    .admin-ban-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .blocked-panel {
        padding: 15px;
    }

    .blocked-card {
        padding: 26px 20px;
    }

    .blocked-card h2 {
        font-size: 32px;
    }
}

/* --------------------------------------------------------------------------
   ClanGenRU: профиль, игровой раздел, жалобы и расширенное администрирование
   -------------------------------------------------------------------------- */

.cabinet-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.cabinet-links a {
    color: inherit;
    text-decoration: none;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
}

.cabinet-links a:hover,
.cabinet-links a.active {
    background: rgba(244, 237, 211, 0.16);
    color: #fff7dc;
}

.profile-game-grid,
.public-profile-game-grid,
.admin-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.game-profile-card,
.admin-wide-card {
    min-width: 0;
}

.game-profile-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.game-profile-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.8rem;
    border: 1px solid rgba(63, 79, 54, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.42);
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease;
}

.game-profile-row:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.7);
}

.game-profile-row.static:hover {
    transform: none;
}

.game-profile-row span:last-child {
    display: grid;
    gap: 0.15rem;
}

.game-profile-row small {
    color: var(--muted, #687263);
}

.game-profile-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(87, 105, 65, 0.12);
    font-size: 1.25rem;
}

.blocked-mini-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    background: #a92f37;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    vertical-align: middle;
}

.blocked-mini-badge.large {
    font-size: 0.78rem;
    transform: translateY(-0.1rem);
}

.admin-report-list {
    display: grid;
    gap: 0.8rem;
    max-height: 720px;
    overflow: auto;
    padding-right: 0.2rem;
}

.admin-report-row {
    display: grid;
    gap: 0.55rem;
    padding: 0.95rem;
    border: 1px solid rgba(73, 83, 58, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
}

.admin-report-row.resolved {
    opacity: 0.72;
}

.admin-report-row p,
.admin-report-row blockquote {
    margin: 0;
}

.admin-report-row blockquote {
    padding: 0.7rem 0.8rem;
    border-left: 4px solid rgba(91, 105, 68, 0.45);
    background: rgba(87, 105, 65, 0.08);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.admin-report-heading {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: flex-start;
}

.admin-report-heading span {
    flex: 0 0 auto;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(87, 105, 65, 0.11);
    font-size: 0.75rem;
}

.compact-danger {
    padding: 0.45rem 0.7rem;
}

.public-profile-footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}

.public-profile-avatar,
.public-profile-avatar.placeholder,
.public-avatar-wrap {
    border-radius: 50% !important;
}

.public-profile-avatar {
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* Игровой центр */

.game-hub-content {
    max-width: 1180px;
}

.game-hub-intro {
    max-width: 760px;
    color: var(--muted, #677161);
    font-size: 1.08rem;
}

.game-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.game-mode-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 390px;
    padding: clamp(1.4rem, 4vw, 2.4rem);
    overflow: hidden;
    border: 1px solid rgba(64, 78, 53, 0.2);
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(251, 246, 222, 0.96), rgba(231, 224, 192, 0.9));
    box-shadow: 0 22px 60px rgba(22, 31, 21, 0.16);
}

.game-mode-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -38% 30%;
    height: 65%;
    border-radius: 50%;
    background: rgba(86, 106, 65, 0.12);
    filter: blur(2px);
}

.game-mode-card.online-mode::after {
    background: rgba(191, 142, 42, 0.16);
}

.game-mode-card > * {
    position: relative;
    z-index: 1;
}

.game-mode-card h2 {
    margin: 0.3rem 0 0.7rem;
    font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.game-mode-card p:not(.eyebrow) {
    max-width: 34rem;
    line-height: 1.7;
}

.game-mode-card .forest-button {
    margin-top: auto;
}

.game-mode-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 1rem;
    border-radius: 24px;
    background: rgba(70, 86, 57, 0.12);
    font-size: 2.2rem;
}

/* Онлайн-регистрация и локация */

.online-content,
.online-location-content {
    max-width: 1180px;
}

.online-cats-panel,
.online-register-panel {
    margin-top: 1.4rem;
}

.online-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.online-cat-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: center;
    padding: 1.1rem;
    border: 1px solid rgba(64, 78, 53, 0.18);
    border-radius: 20px;
    background: rgba(248, 242, 216, 0.9);
    box-shadow: 0 16px 34px rgba(28, 37, 26, 0.12);
}

.online-cat-card .forest-button {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
}

.online-cat-symbol,
.online-character-avatar {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(82, 99, 64, 0.14);
    font-size: 2rem;
}

.online-cat-form {
    max-width: 760px;
    margin: 0 auto;
}

.generated-name-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
}

.online-location-page {
    min-height: 100vh;
    padding: 1rem;
    background:
        radial-gradient(circle at top, rgba(201, 192, 147, 0.28), transparent 40%),
        linear-gradient(180deg, #1e2f23, #101a14);
}

.online-location-content {
    margin: 1rem auto 0;
}

.online-location-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.7fr);
    gap: 1rem;
}

.location-scenery,
.online-character-card {
    border: 1px solid rgba(231, 224, 194, 0.18);
    border-radius: 28px;
    color: #f8f1d7;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.location-scenery {
    display: flex;
    align-items: flex-end;
    min-height: 500px;
    padding: clamp(1.4rem, 5vw, 3rem);
    background:
        linear-gradient(180deg, rgba(17, 30, 20, 0.12), rgba(17, 30, 20, 0.82)),
        radial-gradient(circle at 68% 20%, rgba(244, 210, 112, 0.5), transparent 24%),
        linear-gradient(135deg, #617452, #283f31 58%, #14251c);
}

.location-scenery h1 {
    margin: 0.3rem 0;
    font-size: clamp(2rem, 5vw, 4rem);
}

.location-icon {
    align-self: flex-start;
    margin-right: 1rem;
    font-size: 4rem;
}

.online-character-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    background: rgba(32, 46, 35, 0.92);
}

.online-character-card .outline-button {
    margin-top: 0.8rem;
    color: #f8f1d7;
    border-color: rgba(248, 241, 215, 0.5);
}

.location-actions {
    margin-top: 1rem;
}

.location-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

.location-action-grid button {
    display: grid;
    gap: 0.2rem;
    min-height: 92px;
    padding: 0.8rem;
    border: 1px solid rgba(70, 86, 57, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    color: inherit;
    font: inherit;
}

.location-action-grid small {
    color: var(--muted, #687263);
}

@media (max-width: 900px) {
    .profile-game-grid,
    .public-profile-game-grid,
    .admin-review-grid,
    .game-mode-grid,
    .online-location-hero {
        grid-template-columns: 1fr;
    }

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

    .location-scenery {
        min-height: 390px;
    }
}

@media (max-width: 560px) {
    .generated-name-row,
    .location-action-grid {
        grid-template-columns: 1fr;
    }

    .admin-report-heading,
    .public-profile-footer-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

/* ========================================================================== 
   ClanGenRU v7: соцсети, модераторы, сообщество и игровые привилегии
   ========================================================================== */

.social-editor-row,
.online-select-row,
.role-label-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.moderator-badge,
.moderator-mini-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(54, 92, 122, 0.28);
    border-radius: 999px;
    background: rgba(210, 228, 240, 0.78);
    color: #294e68;
    font-weight: 800;
    line-height: 1;
}

.moderator-badge {
    min-height: 34px;
    padding: 9px 14px;
}

.moderator-mini-badge {
    margin-left: 7px;
    padding: 5px 8px;
    font-size: 0.72rem;
}

.community-tabs {
    margin-bottom: 20px;
}

.compact-title {
    margin: 0 0 12px;
}

.compact-title h3 {
    margin: 0;
}

.community-clan-list {
    display: grid;
    gap: 14px;
}

.community-clan-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 20px;
    border: 1px solid rgba(80, 91, 65, 0.18);
    border-radius: 18px;
    background: rgba(255, 252, 237, 0.82);
    box-shadow: 0 10px 28px rgba(47, 56, 41, 0.07);
}

.community-clan-card h3,
.community-clan-card p {
    margin-top: 0;
}

.clan-rating-place {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 50%;
    background: var(--forest, #435c3d);
    color: #fff;
    font-size: 1.12rem;
    font-weight: 900;
}

.static-badge {
    position: static;
    display: inline-flex;
    min-width: 28px;
    height: 28px;
}

.online-cat-card.detailed {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}

.online-cat-avatar,
.character-summary-avatar,
.online-character-avatar.image {
    overflow: hidden;
    border-radius: 50%;
}

.online-cat-avatar {
    display: grid;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    place-items: center;
    border: 3px solid rgba(75, 96, 66, 0.18);
    background: rgba(225, 232, 210, 0.72);
    object-fit: cover;
    font-size: 2rem;
}

.online-cat-main h3,
.online-cat-main p {
    margin-top: 0;
}

.online-cat-card-actions,
.character-summary-actions,
.inline-actions,
.clan-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.online-cat-card-actions {
    justify-content: flex-end;
}

.character-page-content,
.admin-clans-content {
    display: grid;
    gap: 20px;
}

.character-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
}

.character-summary-avatar {
    display: grid;
    width: 118px;
    height: 118px;
    place-items: center;
    border: 4px solid rgba(70, 91, 61, 0.2);
    background: rgba(226, 233, 210, 0.75);
    font-size: 3.3rem;
}

.character-summary-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-summary-main h1,
.character-summary-main p {
    margin-top: 0;
}

.character-role-line {
    font-size: 1.06rem;
}

.character-section {
    display: grid;
    gap: 18px;
}

.subtle-form {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px dashed rgba(70, 91, 61, 0.28);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.34);
}

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

.manager-form #manager-extra-fields,
.manager-form > button,
.manager-form > .mini-message {
    grid-column: 1 / -1;
}

.clan-roster,
.online-appeals-list,
.clan-application-list {
    display: grid;
    gap: 10px;
}

.clan-application-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(87, 95, 69, 0.18);
    border-radius: 16px;
    background: rgba(250, 247, 230, 0.68);
}

.clan-application-card h3,
.clan-application-card p {
    margin-top: 0;
}

.online-character-ban,
.online-blocked-card {
    max-width: none;
}

.online-clan-admin-card details,
.character-section details {
    border-top: 1px solid rgba(80, 91, 65, 0.16);
    padding-top: 12px;
}

.online-clan-admin-card summary,
.character-section summary {
    cursor: pointer;
    font-weight: 800;
}

.role-label-grid {
    margin-top: 14px;
}

.clan-review-row {
    align-items: flex-start;
}

@media (max-width: 900px) {
    .online-cat-card.detailed,
    .character-summary {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .online-cat-card-actions,
    .character-summary-actions {
        justify-content: flex-start;
    }

    .manager-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .social-editor-row,
    .online-select-row,
    .role-label-grid {
        grid-template-columns: 1fr;
    }

    .community-clan-card {
        grid-template-columns: 1fr;
    }

    .online-cat-avatar,
    .character-summary-avatar {
        width: 88px;
        height: 88px;
    }
}

/* ========================================================================== */
/* ClanGenRU v8: достижения, медали, особые статусы и боты                    */
/* ========================================================================== */

.achievement-progress-card {
    display: grid;
    gap: 12px;
    margin-bottom: 26px;
}

.achievement-progress-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.achievement-progress-track {
    height: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(45, 74, 47, 0.09);
}

.achievement-progress-track > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--moss), var(--gold));
    transition: width 0.45s ease;
}

.achievement-category-section {
    margin-top: 28px;
}

.compact-title {
    margin-bottom: 12px;
}

.achievement-card.unlocked {
    border-color: rgba(118, 139, 74, 0.7);
    background: linear-gradient(145deg, rgba(255, 252, 239, 0.95), rgba(226, 232, 191, 0.85));
    box-shadow: 0 9px 24px rgba(53, 71, 40, 0.12);
}

.achievement-card.unlocked .achievement-icon {
    filter: drop-shadow(0 4px 8px rgba(45, 74, 47, 0.22));
}

.achievement-card small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.achievement-popup {
    position: fixed;
    z-index: 1000;
    right: 24px;
    bottom: 24px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: min(430px, calc(100vw - 30px));
    padding: 16px 18px;
    border: 2px solid var(--gold);
    border-radius: 16px;
    color: var(--forest-950);
    background: linear-gradient(145deg, #fff8d8, #eadca8);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
    animation: achievement-pop-in 0.35s ease;
}

.achievement-popup[hidden] {
    display: none;
}

.achievement-popup-icon {
    font-size: 42px;
}

.achievement-popup small,
.achievement-popup strong,
.achievement-popup p {
    display: block;
    margin: 0;
}

.achievement-popup small {
    color: var(--moss);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.achievement-popup strong {
    margin-top: 3px;
    font-size: 18px;
}

.achievement-popup p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.achievement-popup button {
    align-self: start;
    border: 0;
    background: transparent;
    color: var(--forest-800);
    font-size: 22px;
    cursor: pointer;
}

@keyframes achievement-pop-in {
    from { transform: translateY(18px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.profile-honors-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.profile-medals-list,
.public-achievements-list,
.special-merits-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.profile-medal {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(149, 119, 48, 0.45);
    border-radius: 999px;
    background: rgba(255, 244, 197, 0.78);
    color: var(--forest-800);
    cursor: help;
}

.profile-medal > span {
    font-size: 20px;
}

.profile-medal::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 20;
    left: 50%;
    bottom: calc(100% + 9px);
    width: max-content;
    max-width: 280px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #fff;
    background: var(--forest-950);
    font-size: 12px;
    line-height: 1.4;
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    pointer-events: none;
    transition: 0.18s ease;
}

.profile-medal:hover::after,
.profile-medal:focus::after {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.special-merit-chip,
.public-achievement-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(117, 148, 93, 0.13);
    color: var(--forest-700);
    font-size: 13px;
}

.public-achievement-chip {
    border: 1px solid rgba(117, 148, 93, 0.3);
}

.golden-profile-name {
    color: #a97800 !important;
    background: linear-gradient(90deg, #795400, #d9a514, #fff1a5, #b77d00);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5));
}

.golden-profile-name .profile-title-status,
.golden-profile-name .admin-badge,
.golden-profile-name .blocked-mini-badge {
    -webkit-text-fill-color: initial;
}

.profile-title-status {
    display: inline-flex;
    align-items: center;
    margin-left: 7px;
    padding: 3px 8px;
    border: 1px solid rgba(117, 148, 93, 0.35);
    border-radius: 999px;
    color: var(--forest-700);
    background: rgba(239, 236, 207, 0.9);
    font: 700 11px/1.3 Arial, sans-serif;
    vertical-align: middle;
    -webkit-text-fill-color: currentColor;
}

.bot-badge {
    display: inline-flex;
    margin-left: 5px;
    padding: 2px 6px;
    border-radius: 999px;
    color: #fff;
    background: #6b5d88;
    font: 800 10px/1.3 Arial, sans-serif;
    vertical-align: middle;
}

.clan-privileges-card[hidden] {
    display: none;
}

.compact-button {
    padding: 7px 9px;
    font-size: 12px;
}

@media (max-width: 760px) {
    .profile-honors-grid {
        grid-template-columns: 1fr;
    }

    .achievement-popup {
        right: 15px;
        bottom: 15px;
    }

    .achievement-progress-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

/* ========================================================================== */
/* ClanGenRU v9: пиксельные модели онлайн-персонажей                          */
/* ========================================================================== */

.sprite-avatar,
.online-cat-avatar.sprite-avatar,
.online-character-avatar.sprite-avatar,
.character-summary-avatar.sprite-avatar {
    overflow: visible;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.78), transparent 52%),
        rgba(225, 232, 210, 0.72);
}

.clangen-cat-sprite {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    object-fit: contain;
}

.online-cat-avatar.sprite-avatar {
    padding: 4px;
}

.online-character-avatar.sprite-avatar {
    width: 104px;
    height: 104px;
    padding: 5px;
    border: 3px solid rgba(75, 96, 66, 0.18);
}

.online-character-avatar.sprite-avatar.large {
    width: 126px;
    height: 126px;
}

.character-summary-avatar.sprite-avatar {
    padding: 7px;
}

.cat-appearance-line {
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .online-character-avatar.sprite-avatar.large {
        width: 106px;
        height: 106px;
    }
}

.sprite-credit {
    width: min(920px, calc(100% - 32px));
    margin: 18px auto 28px;
    color: rgba(238, 242, 228, 0.75);
    font-size: 0.75rem;
    line-height: 1.5;
    text-align: center;
}

.sprite-credit a {
    color: inherit;
    text-decoration: underline;
}

body:not(.online-location-page) > .sprite-credit,
.site-shell + .sprite-credit {
    color: var(--muted);
}

/* ========================================================================== 
   ClanGenRU v10: игровое время и сезонные лагеря
   ========================================================================== */

.game-clock-slot {
    display: flex;
    justify-content: flex-end;
    margin: 0 auto 14px;
}

.game-time-widget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(100%, 520px);
    padding: 12px 16px;
    border: 1px solid rgba(75, 95, 64, 0.22);
    border-radius: 18px;
    background: rgba(247, 241, 216, 0.92);
    color: #34452f;
    box-shadow: 0 12px 28px rgba(24, 38, 25, 0.12);
    backdrop-filter: blur(8px);
}

.online-location-page .game-time-widget {
    border-color: rgba(240, 233, 203, 0.22);
    background: rgba(28, 43, 32, 0.9);
    color: #f6efd8;
}

.game-time-moon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-time-moon span:last-child {
    display: grid;
    gap: 2px;
}

.game-time-moon small,
.game-time-details span:last-child {
    opacity: 0.72;
}

.game-time-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: rgba(91, 111, 76, 0.14);
    font-size: 1.35rem;
}

.game-time-details {
    display: grid;
    gap: 4px;
    text-align: right;
    font-size: 0.9rem;
}

.camp-scenery {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-image:
        linear-gradient(180deg, rgba(16, 25, 18, 0.08), rgba(13, 22, 15, 0.84)),
        var(--camp-background, linear-gradient(135deg, #617452, #283f31 58%, #14251c));
    background-position: center;
    background-size: cover;
    image-rendering: pixelated;
}

.camp-scenery::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, transparent 48%, rgba(8, 15, 10, 0.64)),
        radial-gradient(circle at 50% 35%, transparent 0 48%, rgba(10, 18, 12, 0.2));
    content: "";
    pointer-events: none;
}

.camp-scenery-overlay {
    max-width: 720px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 249, 221, 0.18);
    border-radius: 18px;
    background: rgba(17, 29, 20, 0.66);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.camp-scenery-overlay h1,
.camp-scenery-overlay p {
    position: relative;
    z-index: 1;
}

.camp-meta-line {
    margin-bottom: 0;
    color: rgba(250, 244, 218, 0.76);
    font-size: 0.9rem;
}

.camp-background-error::after {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(130, 48, 38, 0.86);
    color: white;
    content: "Фон временно недоступен";
    font-size: 0.78rem;
}

.moon-age-control {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.moon-age-button {
    display: inline;
    padding: 0;
    border: 0;
    border-bottom: 1px dotted currentColor;
    background: transparent;
    color: inherit;
    cursor: help;
    font: inherit;
    font-weight: 700;
}

.moon-details-popover {
    position: absolute;
    z-index: 50;
    top: calc(100% + 8px);
    left: 50%;
    width: min(290px, 78vw);
    padding: 10px 12px;
    transform: translateX(-50%);
    border: 1px solid rgba(64, 79, 53, 0.2);
    border-radius: 12px;
    background: #f8f2da;
    color: #33422e;
    box-shadow: 0 14px 30px rgba(24, 36, 22, 0.22);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.45;
    white-space: normal;
}

.clan-camp-preview-wrap {
    display: grid;
    gap: 8px;
    overflow: hidden;
    padding: 10px;
    border: 1px solid rgba(72, 91, 61, 0.17);
    border-radius: 16px;
    background: rgba(236, 232, 208, 0.56);
}

.clan-camp-preview-wrap.compact {
    margin-top: 10px;
}

.camp-admin-preview {
    display: block;
    width: 100%;
    aspect-ratio: 345 / 304;
    border-radius: 12px;
    background: rgba(39, 57, 41, 0.12);
    object-fit: cover;
    image-rendering: pixelated;
}

.camp-select-row {
    align-items: end;
}

@media (max-width: 700px) {
    .game-clock-slot {
        justify-content: stretch;
    }

    .game-time-widget {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .game-time-details {
        text-align: left;
    }

    .camp-scenery {
        min-height: 360px;
        padding: 16px;
    }

    .camp-scenery-overlay {
        width: 100%;
    }
}

/* ========================================================================== */
/* ClanMod v11: локации, живой лагерь, профили котов и обновлённые списки    */
/* ========================================================================== */

/* Светлые подчёркнутые ссылки во всех разделах онлайн-игры. */
.online-game-header {
    border-radius: 18px;
    background: rgba(18, 40, 28, 0.94);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.online-game-header a,
.online-page .site-header a,
.online-character-page .site-header a,
.online-cat-profile-page .site-header a,
.online-duty-page .site-header a {
    color: #f4edd4 !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    -webkit-text-fill-color: currentColor;
}

.online-game-header .site-brand,
.online-page .site-header .site-brand,
.online-character-page .site-header .site-brand,
.online-cat-profile-page .site-header .site-brand,
.online-duty-page .site-header .site-brand {
    color: #f7f0d8 !important;
}

.game-time-details small {
    opacity: 0.68;
}

.game-time-details strong {
    font-size: 0.96rem;
}

/* Верхняя строка: локация слева, игровое время справа. */
.online-location-topbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 520px);
    gap: 14px;
    align-items: stretch;
}

.online-location-topbar .game-clock-slot {
    width: 100%;
    margin: 0;
}

.online-location-topbar .game-time-widget {
    width: 100%;
    height: 100%;
}

.location-summary-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 12px 16px;
    border: 1px solid rgba(240, 233, 203, 0.22);
    border-radius: 18px;
    background: rgba(28, 43, 32, 0.9);
    color: #f6efd8;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.location-summary-widget > span:last-child {
    display: grid;
    gap: 3px;
}

.location-summary-widget small {
    opacity: 0.72;
}

.location-summary-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 50%;
    background: rgba(239, 231, 196, 0.14);
    font-size: 1.35rem;
}

.v11-location-hero {
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.72fr);
}

.interactive-camp {
    position: relative;
    min-height: clamp(430px, 63vw, 720px);
    cursor: crosshair;
    touch-action: manipulation;
}

.interactive-camp::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 55%, rgba(8, 18, 11, 0.24));
}

.camp-cat-layer {
    position: absolute;
    z-index: 3;
    inset: 0;
}

.camp-cat-token {
    position: absolute;
    z-index: 4;
    width: clamp(64px, 7vw, 96px);
    transform: translate(-50%, -50%);
    transition: left 0.42s ease, top 0.42s ease, filter 0.18s ease;
    text-align: center;
}

.camp-cat-token:hover,
.camp-cat-token:focus-within {
    z-index: 8;
    filter: drop-shadow(0 7px 8px rgba(0, 0, 0, 0.5));
}

.camp-cat-token.is-current::before {
    content: "Вы";
    position: absolute;
    z-index: 2;
    top: -8px;
    right: -4px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #e8d878;
    color: #213523;
    font: 800 10px/1.3 Arial, sans-serif;
}

.camp-cat-token a {
    display: grid;
    justify-items: center;
    color: #fff7d8;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.camp-cat-token canvas {
    width: 100%;
    height: auto;
    image-rendering: pixelated;
    filter: drop-shadow(0 5px 3px rgba(0, 0, 0, 0.38));
}

.camp-cat-token span {
    max-width: 130px;
    padding: 2px 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(18, 31, 22, 0.78);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 800;
}

.camp-cat-token small {
    color: rgba(255, 247, 216, 0.8);
    font-size: 0.62rem;
    text-decoration: none;
}

.camp-move-hint {
    position: absolute;
    z-index: 5;
    right: 14px;
    bottom: 12px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(11, 24, 15, 0.72);
    color: rgba(255, 248, 221, 0.86);
    font-size: 0.72rem;
    pointer-events: none;
}

/* Карточка собственного персонажа справа. */
.v11-character-card {
    align-content: start;
    gap: 12px;
    padding: 20px;
}

.v11-character-card h2 {
    margin: 0;
    line-height: 1.2;
}

.v11-character-card h2 small {
    display: block;
    margin-top: 5px;
    color: rgba(247, 240, 216, 0.74);
    font-size: 0.72rem;
    font-weight: 600;
}

.character-ground-preview,
.public-cat-ground {
    position: relative;
    display: grid;
    min-height: 180px;
    place-items: end center;
    overflow: hidden;
    border: 1px solid rgba(247, 239, 207, 0.2);
    border-radius: 22px;
    background-position: center;
    background-size: cover;
    isolation: isolate;
}

.character-ground-preview::before,
.public-cat-ground::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(180deg, rgba(19, 35, 24, 0.05), rgba(18, 36, 23, 0.56));
}

.character-ground-preview canvas {
    width: 145px;
    height: 145px;
    margin-bottom: 6px;
    image-rendering: pixelated;
    filter: drop-shadow(0 9px 5px rgba(0, 0, 0, 0.35));
}

.cat-thought-line {
    margin: 0;
    padding: 8px 10px;
    border-left: 3px solid rgba(228, 216, 153, 0.62);
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.88rem;
    font-style: italic;
}

.character-facts-list,
.cat-profile-facts,
.clan-leadership-list {
    display: grid;
    gap: 7px;
    margin: 0;
}

.character-facts-list > div,
.cat-profile-facts > div,
.clan-leadership-list > div {
    display: grid;
    grid-template-columns: minmax(96px, 0.7fr) minmax(0, 1.3fr);
    gap: 10px;
    align-items: baseline;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(239, 231, 199, 0.15);
}

.character-facts-list dt,
.cat-profile-facts dt,
.clan-leadership-list dt {
    opacity: 0.72;
    font-size: 0.78rem;
}

.character-facts-list dd,
.cat-profile-facts dd,
.clan-leadership-list dd {
    margin: 0;
    font-weight: 750;
}

.character-description-block {
    padding-top: 4px;
    border-top: 1px solid rgba(239, 231, 199, 0.18);
}

.character-description-block h3 {
    margin: 8px 0;
}

.character-description-block p {
    margin: 5px 0;
    font-size: 0.86rem;
}

.character-side-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.character-side-actions a {
    text-align: center;
}

/* Карточки живых котов. */
.online-cat-grid {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.online-cat-card.v11-card {
    display: flex;
    min-height: 365px;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
}

.online-cat-card-top {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.online-cat-card.v11-card .online-cat-avatar {
    width: 94px;
    height: 94px;
}

.online-cat-detail-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(66, 83, 57, 0.12);
}

.online-cat-detail-row > span {
    color: var(--muted);
    font-size: 0.78rem;
}

.online-cat-detail-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.online-cat-detail-row small {
    font-weight: 500;
}

.v11-actions {
    display: grid;
    grid-template-columns: minmax(110px, 0.7fr) minmax(190px, 1.3fr);
    width: 100%;
    margin-top: auto;
    padding-top: 18px;
}

.v11-actions a {
    display: grid;
    min-height: 46px;
    place-items: center;
    text-align: center;
}

/* Информация о племени. */
.centered-clan-name {
    margin-top: 0;
    text-align: center;
}

.clan-place-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.clan-place-grid p {
    margin: 0;
    padding: 12px;
    border-radius: 12px;
    background: rgba(83, 102, 70, 0.08);
}

.clan-leadership-list {
    padding: 14px;
    border-radius: 14px;
    background: rgba(79, 99, 67, 0.08);
}

.clan-leadership-list > div {
    border-color: rgba(73, 91, 62, 0.12);
}

.clan-leader-link {
    color: var(--forest-700);
    text-decoration: underline;
}

/* Отдельный профиль кота. */
.online-cat-profile-content {
    max-width: 1050px;
}

.cat-profile-sheet {
    padding: clamp(18px, 4vw, 34px);
    background: linear-gradient(180deg, rgba(221, 211, 176, 0.97), rgba(202, 190, 151, 0.97));
}

.cat-profile-heading {
    text-align: center;
}

.cat-profile-heading h1 {
    margin: 5px 0 22px;
}

.cat-profile-heading h1 small {
    color: #59634f;
    font-size: 0.76rem;
}

.cat-profile-thought {
    margin: 0;
    color: #374532;
    font-style: italic;
}

.cat-profile-body {
    display: grid;
    grid-template-columns: minmax(240px, 0.95fr) minmax(220px, 1fr) minmax(220px, 1fr);
    gap: 26px;
    align-items: center;
}

.public-cat-ground {
    min-height: 300px;
}

.public-cat-ground canvas {
    width: 230px;
    height: 230px;
    margin-bottom: 34px;
    image-rendering: pixelated;
    filter: drop-shadow(0 10px 5px rgba(0, 0, 0, 0.32));
}

.cat-role-plaque {
    position: absolute;
    bottom: 12px;
    padding: 7px 16px;
    border: 2px solid rgba(46, 55, 35, 0.56);
    border-radius: 7px;
    background: rgba(89, 79, 48, 0.88);
    color: #f4ebcf;
    font-weight: 850;
}

.cat-profile-facts {
    color: #303a2c;
}

.cat-profile-facts > div {
    grid-template-columns: 100px minmax(0, 1fr);
    border-color: rgba(64, 76, 52, 0.18);
}

.cat-profile-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 26px;
    overflow: hidden;
    border: 2px solid rgba(57, 65, 42, 0.66);
    border-radius: 999px;
    background: #6f683e;
}

.cat-profile-tabs button {
    min-height: 44px;
    border: 0;
    border-right: 2px solid rgba(46, 52, 34, 0.58);
    color: #eee5c6;
    background: transparent;
    font-weight: 850;
    cursor: default;
}

.cat-profile-tabs button:last-child {
    border-right: 0;
}

/* Друзья: четыре самостоятельных списка. */
.v11-friends-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

/* Список игроков, близкий к табличному виду, без прыгающих карточек. */
.players-table-shell {
    overflow: hidden;
    border: 1px solid rgba(69, 85, 59, 0.17);
    border-radius: 20px;
    background: rgba(248, 243, 218, 0.78);
}

.players-table-header,
.player-table-row {
    display: grid;
    grid-template-columns: 88px minmax(240px, 1.2fr) minmax(250px, 1fr) minmax(180px, 0.75fr);
    gap: 14px;
    align-items: center;
}

.players-table-header {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(68, 80, 57, 0.2);
    background: rgba(174, 151, 87, 0.25);
    color: #48523f;
    font-size: 0.77rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.player-table-row {
    min-height: 98px;
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid rgba(72, 86, 61, 0.13);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.player-table-row:last-child {
    border-bottom: 0;
}

.player-table-row:hover {
    background: rgba(255, 255, 255, 0.34);
}

.player-presence-cell {
    display: grid;
    gap: 4px;
}

.player-presence-cell span {
    color: var(--muted);
    font-size: 0.78rem;
}

.player-role-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 3px;
}

.admin-mini-badge,
.moderator-mini-badge {
    display: inline-flex;
    padding: 3px 8px;
    border: 1px solid rgba(104, 71, 4, 0.35);
    border-radius: 999px;
    color: #4a3505 !important;
    background: #f2d56e;
    font: 800 10px/1.25 Arial, sans-serif;
    -webkit-text-fill-color: currentColor !important;
}

.moderator-mini-badge {
    border-color: rgba(51, 74, 103, 0.32);
    color: #243b54 !important;
    background: #c9def1;
}

.golden-profile-name {
    display: inline-block;
    font-weight: 900;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.72)) drop-shadow(0 0 4px rgba(201, 145, 0, 0.25));
}

.players-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    border-top: 1px solid rgba(72, 86, 61, 0.14);
}

.players-pagination span {
    min-width: 130px;
    color: var(--muted);
    text-align: center;
    font-size: 0.82rem;
}

@media (max-width: 980px) {
    .online-location-topbar,
    .v11-location-hero,
    .cat-profile-body {
        grid-template-columns: 1fr;
    }

    .interactive-camp {
        min-height: 520px;
    }

    .cat-profile-body {
        align-items: stretch;
    }

    .public-cat-ground {
        min-height: 330px;
    }

    .players-table-header {
        display: none;
    }

    .player-table-row {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .player-presence-cell,
    .player-table-row .player-actions {
        grid-column: 2;
    }

    .clan-place-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .online-location-page {
        padding: 7px;
    }

    .online-location-topbar,
    .online-location-hero {
        gap: 8px;
    }

    .online-location-topbar .game-time-widget,
    .location-summary-widget {
        border-radius: 13px;
    }

    .interactive-camp {
        min-height: 390px;
        border-radius: 18px;
    }

    .camp-cat-token {
        width: 66px;
    }

    .camp-move-hint {
        display: none;
    }

    .online-cat-grid,
    .v11-friends-grid {
        grid-template-columns: 1fr;
    }

    .online-cat-card-top {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .online-cat-card.v11-card .online-cat-avatar {
        width: 78px;
        height: 78px;
    }

    .online-cat-detail-row {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .v11-actions,
    .character-side-actions,
    .cat-profile-tabs {
        grid-template-columns: 1fr;
    }

    .cat-profile-tabs {
        border-radius: 16px;
    }

    .cat-profile-tabs button {
        border-right: 0;
        border-bottom: 1px solid rgba(46, 52, 34, 0.58);
    }

    .cat-profile-tabs button:last-child {
        border-bottom: 0;
    }

    .player-table-row {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .player-table-row > *,
    .player-presence-cell,
    .player-table-row .player-actions {
        grid-column: 1;
    }

    .player-id-cell {
        font-size: 0.76rem;
    }
}

.character-ground-preview,
.public-cat-ground {
    background-image:
        linear-gradient(180deg, rgba(16, 25, 18, 0.02), rgba(13, 22, 15, 0.42)),
        var(--camp-background, linear-gradient(135deg, #73805d, #3f5845));
}


/* ========================================================================== */
/* ClanMod v12: лагерь, быстрый список, поиск и исправления интерфейса         */
/* ========================================================================== */

/* Обычные страницы проекта больше не показывают фиолетовые посещённые ссылки. */
.site-header a,
.site-header a:visited {
    color: #f4edd4;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    -webkit-text-fill-color: currentColor;
}

.site-header .site-brand,
.site-header .site-brand:visited {
    color: #fff6d8;
}

.settings-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

/* Точный поиск игрока: поле не перерисовывает список во время набора. */
.players-direct-search {
    margin-bottom: 14px;
}

.players-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 8px;
}

.players-search-row input,
.players-search-row button {
    min-height: 46px;
}

/* Статус, награды и действия остаются в своих колонках. */
.player-info {
    min-width: 0;
}

.player-name-line {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.player-name-line .player-name-link {
    min-width: 0;
    overflow-wrap: anywhere;
}

.player-name-line .profile-title-status {
    flex: 0 0 auto;
    margin: 0;
}

.player-table-row .player-actions {
    display: flex;
    grid-column: 4;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    justify-self: stretch;
    gap: 7px;
}

.player-table-row .player-state-label {
    max-width: 100%;
    margin: 0;
    white-space: normal;
    text-align: center;
}

.player-table-row .player-state-label.pending {
    color: #67490b;
    background: rgba(235, 209, 127, 0.55);
    border-color: rgba(125, 88, 12, 0.22);
}

.player-role-badges {
    align-items: center;
}

.admin-mini-badge,
.moderator-mini-badge,
.blocked-mini-badge,
.profile-title-status {
    position: static;
    transform: none;
}

/* Мгновенное перемещение: никакой анимации и курсора-прицела. */
.interactive-camp {
    cursor: default;
}

.camp-cat-token {
    transition: filter 0.16s ease;
}

.camp-cat-token.is-current::before,
.camp-move-hint {
    display: none !important;
}

.camp-cat-token > a {
    position: relative;
    isolation: isolate;
}

.camp-cat-ground {
    position: absolute;
    z-index: 0;
    left: 50%;
    bottom: 24px;
    width: 62%;
    height: 16%;
    min-height: 10px;
    border: 1px solid rgba(225, 226, 190, 0.26);
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(237, 231, 184, 0.42), rgba(24, 43, 26, 0.28) 67%, transparent 72%);
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.24);
    transform: translateX(-50%);
    pointer-events: none;
}

.camp-cat-token canvas {
    position: relative;
    z-index: 1;
}

.camp-cat-name {
    position: relative;
    z-index: 2;
}

.camp-cat-token.is-sleeping canvas {
    opacity: 0.88;
}

.camp-cat-token.is-sleeping::after {
    content: "Zzz";
    position: absolute;
    z-index: 3;
    top: 4px;
    right: 0;
    color: #f5edc8;
    font: 800 0.67rem/1 Arial, sans-serif;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    pointer-events: none;
}

/* Чат и действия локации. */
.location-social-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    gap: 18px;
    margin-bottom: 16px;
    padding: 18px;
}

.location-social-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.location-social-heading h2,
.location-say-card h2 {
    margin: 3px 0 0;
}

.location-chat-list {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 150px;
    max-height: 290px;
    padding: 10px;
    overflow-y: auto;
    border: 1px solid rgba(67, 83, 57, 0.16);
    border-radius: 14px;
    background: rgba(255, 252, 235, 0.58);
}

.location-chat-message {
    padding: 9px 10px;
    border-bottom: 1px dotted rgba(61, 72, 52, 0.28);
}

.location-chat-message:last-child {
    border-bottom: 0;
}

.location-chat-message p {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.location-chat-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.location-chat-meta a {
    color: var(--forest-700);
    font-weight: 850;
    text-decoration: underline;
}

.location-chat-meta small,
.location-chat-meta time {
    color: var(--muted);
    font-size: 0.72rem;
}

.location-chat-meta time {
    margin-left: auto;
}

.location-say-card {
    display: grid;
    align-content: start;
    gap: 11px;
    padding: 15px;
    border: 1px solid rgba(67, 83, 57, 0.17);
    border-radius: 15px;
    background: rgba(234, 224, 187, 0.38);
}

.location-say-card label {
    display: grid;
    gap: 6px;
    color: var(--forest-700);
    font-size: 0.8rem;
    font-weight: 750;
}

.location-say-card input,
.location-say-card select {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fffdf4;
}

/* Карточки персонажей: обе кнопки закреплены внизу и имеют равную ширину. */
.online-cat-card.v11-card {
    min-width: 0;
}

.online-cat-card-actions.v11-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
}

.online-cat-card-actions.v11-actions a {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
    overflow-wrap: anywhere;
}

/* Профиль кота использует фон его лагеря; кнопка сообщения не ломает заголовок. */
.cat-profile-message-button {
    margin: -6px 0 22px;
}

.public-cat-ground {
    background-position: center;
    background-size: cover;
}

.public-cat-ground::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    bottom: 28px;
    width: 62%;
    height: 19%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(239, 231, 183, 0.34), rgba(20, 33, 22, 0.1) 65%, transparent 72%);
    transform: translateX(-50%);
    pointer-events: none;
}

.public-cat-ground canvas,
.public-cat-ground .cat-role-plaque {
    position: relative;
    z-index: 1;
}

.cat-message-dialog textarea {
    min-height: 170px;
}

/* Верхняя панель остаётся читаемой даже после посещения ссылок. */
.online-game-header a:visited,
.online-game-header a:hover,
.online-game-header a:focus-visible {
    color: #fff6d8 !important;
}

@media (max-width: 980px) {
    .player-table-row .player-actions {
        grid-column: 2;
    }

    .location-social-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .players-search-row {
        grid-template-columns: 1fr;
    }

    .player-table-row .player-actions {
        grid-column: 1;
    }

    .online-cat-card-actions.v11-actions {
        grid-template-columns: 1fr;
    }

    .location-social-panel {
        padding: 11px;
    }

    .location-chat-meta time {
        width: 100%;
        margin-left: 0;
    }
}

/* ========================================================================== */
/* ClanMod v13: большое обновление профилей, чатов и управления                */
/* ========================================================================== */

/* Приветствие показывается только на главной вкладке профиля. */
body:not(.profile-panel-open) .dashboard-header {
    display: none;
}

/* Юридические ссылки и удаление аккаунта — широкие и по центру. */
.settings-legal-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 12px;
}

.settings-legal-links a {
    display: grid;
    min-height: 48px;
    place-items: center;
    padding: 10px 16px;
    border: 1px solid rgba(66, 83, 57, 0.22);
    border-radius: 12px;
    background: rgba(252, 248, 224, 0.62);
    color: var(--forest-700);
    text-align: center;
    font-weight: 800;
}

#delete-account-button {
    display: block;
    min-width: min(100%, 320px);
    margin-inline: auto;
    text-align: center;
}

/* Небольшая площадка ClanGen под котом вместо затемнения всей карточки. */
.profile-platform,
.character-ground-preview {
    --platform-light: rgba(239, 232, 191, 0.88);
    --platform-mid: rgba(113, 116, 75, 0.5);
    --platform-dark: rgba(42, 48, 34, 0.2);
    min-height: 286px;
    border: 0;
    background: transparent !important;
    isolation: isolate;
}

.profile-platform::before,
.character-ground-preview::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    bottom: 29px;
    width: min(88%, 330px);
    height: 43%;
    inset: auto auto 29px 50%;
    border: 1px solid rgba(69, 72, 48, 0.22);
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 50% 36%, var(--platform-light), var(--platform-mid) 58%, var(--platform-dark) 72%, transparent 74%);
    box-shadow: 0 12px 18px rgba(38, 42, 29, 0.12);
    transform: translateX(-50%);
    pointer-events: none;
}

.profile-platform::after,
.character-ground-preview::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    bottom: 68px;
    width: min(70%, 260px);
    height: 23%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255,255,238,.44), transparent 70%);
    transform: translateX(-50%);
    pointer-events: none;
}

.profile-platform.platform-forest,
.character-ground-preview.platform-forest {
    --platform-light: rgba(183, 194, 127, 0.96);
    --platform-mid: rgba(91, 119, 68, 0.67);
    --platform-dark: rgba(40, 64, 42, 0.24);
}

.profile-platform.platform-moor,
.character-ground-preview.platform-moor {
    --platform-light: rgba(211, 193, 135, 0.95);
    --platform-mid: rgba(142, 110, 73, 0.62);
    --platform-dark: rgba(68, 55, 40, 0.22);
}

.profile-platform.platform-beach,
.profile-platform.platform-coast,
.character-ground-preview.platform-beach,
.character-ground-preview.platform-coast {
    --platform-light: rgba(235, 219, 164, 0.97);
    --platform-mid: rgba(169, 144, 96, 0.6);
    --platform-dark: rgba(76, 94, 91, 0.18);
}

.profile-platform.platform-swamp,
.character-ground-preview.platform-swamp {
    --platform-light: rgba(159, 184, 132, 0.95);
    --platform-mid: rgba(74, 109, 78, 0.65);
    --platform-dark: rgba(36, 63, 47, 0.24);
}

.profile-platform.platform-mountain,
.character-ground-preview.platform-mountain {
    --platform-light: rgba(211, 214, 206, 0.96);
    --platform-mid: rgba(126, 138, 135, 0.62);
    --platform-dark: rgba(55, 68, 72, 0.2);
}

.profile-platform canvas,
.character-ground-preview canvas,
.profile-platform .cat-role-plaque,
.character-ground-preview .cat-role-plaque {
    position: relative;
    z-index: 2;
}

.public-cat-ground.profile-platform canvas {
    margin-bottom: 42px;
}

.cat-owner-caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin: -12px 0 18px;
    color: #59634f;
    font-size: .82rem;
}

.cat-owner-link {
    color: var(--forest-700);
    font-weight: 850;
    text-decoration: underline;
}

/* Вкладки профиля кота стали интерактивными и раскрывают панели. */
.cat-profile-tabs button {
    cursor: pointer;
}

.cat-profile-tabs button.active,
.cat-profile-tabs button:hover,
.cat-profile-tabs button:focus-visible {
    background: rgba(245, 237, 199, 0.18);
    color: #fff7d7;
}

.cat-tab-panel {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(62, 73, 49, 0.24);
    border-radius: 16px;
    background: rgba(255, 251, 225, 0.45);
    color: #303a2c;
}

.relationship-action-grid,
.relationship-requests,
.family-tree-cats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.relationship-request,
.family-tree-branch,
.family-tree-current {
    padding: 12px;
    border: 1px solid rgba(65, 78, 54, 0.2);
    border-radius: 12px;
    background: rgba(255, 253, 238, 0.68);
}

.family-tree-board {
    display: grid;
    gap: 14px;
}

.family-tree-current {
    justify-self: center;
    min-width: 190px;
    text-align: center;
    font-weight: 850;
}

.family-tree-branch h4 {
    margin: 0 0 8px;
}

/* Чаты компактнее; новые сообщения находятся сверху. */
.location-social-panel {
    grid-template-columns: minmax(0, 1.8fr) minmax(240px, .62fr);
    gap: 12px;
    padding: 14px;
}

.location-chat-list,
.chat-list {
    max-height: 220px;
    min-height: 120px;
    overscroll-behavior: contain;
}

.location-chat-message,
.chat-message {
    scroll-margin-top: 8px;
}

.location-chat-message.is-weather {
    border: 1px dashed rgba(74, 101, 77, .28);
    border-radius: 12px;
    background: rgba(177, 204, 178, .23);
}

.weather-meta {
    color: #4d6a50;
    font-weight: 850;
}

.weather-message-text {
    color: #405943;
    font-weight: 700;
}

.location-say-card {
    padding: 12px;
}

.location-say-card .forest-button {
    min-height: 42px;
}

/* Выровненные племенные/АМС-функции и редактор внешности. */
.character-side-actions,
.character-summary-actions,
.inline-actions {
    align-items: stretch;
    justify-content: center;
}

.character-side-actions a,
.character-summary-actions a,
.character-summary-actions button,
.inline-actions button,
.inline-actions a {
    min-width: 0;
    text-align: center;
}

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

.appearance-editor-grid label {
    min-width: 0;
}

.manager-form,
.subtle-form {
    max-width: 100%;
    overflow: hidden;
}

/* Новости сайта: хранится не более 10 строк в базе. */
.site-announcements-card {
    margin: 18px 0;
}

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

.site-announcement {
    padding: 12px 14px;
    border-left: 4px solid rgba(81, 112, 67, .58);
    border-radius: 10px;
    background: rgba(250, 246, 220, .58);
}

.site-announcement h4 {
    margin: 0 0 5px;
}

.site-announcement p {
    margin: 0;
    white-space: pre-wrap;
}

.site-announcement time {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: .72rem;
}

/* Убираем визуальный рывок и потемнение при телепортации по лагерю. */
.camp-cat-token,
.camp-cat-token canvas,
.camp-cat-token > a {
    transition: none !important;
    animation: none !important;
}

.camp-cat-token:active,
.camp-cat-token:focus,
.camp-cat-token:hover {
    filter: none;
}

.camp-cat-token.is-current .camp-cat-ground {
    border-color: rgba(255, 246, 188, .62);
    box-shadow: 0 0 0 2px rgba(255, 249, 203, .17), 0 5px 8px rgba(0,0,0,.16);
}

@media (max-width: 760px) {
    .settings-legal-links,
    .appearance-editor-grid {
        grid-template-columns: 1fr;
    }

    .location-chat-list,
    .chat-list {
        max-height: 190px;
    }

    .profile-platform,
    .character-ground-preview {
        min-height: 240px;
    }
}

.admin-grid,
.admin-wide-card,
.admin-wide-card > *,
.admin-wide-card label,
.admin-wide-card input,
.admin-wide-card select,
.admin-wide-card textarea {
    min-width: 0;
    max-width: 100%;
}

.admin-wide-card {
    overflow: visible;
}

/* ======================================================================
   ClanGenRU Online — обновление 14
   Пошаговое рождение, настоящий лист платформ, профиль персонажа и игры.
   ====================================================================== */
:root {
    --v14-forest: #254f34;
    --v14-forest-dark: #112f21;
    --v14-parchment: #f4efd9;
    --v14-parchment-2: #e8dfbd;
    --v14-line: rgba(91, 72, 38, .24);
    --v14-danger: #9b3838;
}

/* Официальный лист platforms.png ClanGen. Отображается как sprite sheet 8×6. */
.platform-sheet-platform {
    --platform-x: 0%;
    --platform-y: 80%;
    position: relative;
    background-image: url("assets/clangen-sprites/platforms.png") !important;
    background-repeat: no-repeat !important;
    background-size: 800% 600% !important;
    background-position: var(--platform-x) var(--platform-y) !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}
.platform-sheet-platform.platform-forest { --platform-x: 0%; --platform-y: 80%; }
.platform-sheet-platform.platform-moor { --platform-x: 14.285%; --platform-y: 60%; }
.platform-sheet-platform.platform-mountain { --platform-x: 28.57%; --platform-y: 40%; }
.platform-sheet-platform.platform-coast { --platform-x: 28.57%; --platform-y: 100%; }
.platform-sheet-platform.platform-swamp { --platform-x: 57.14%; --platform-y: 100%; }
.profile-platform.platform-sheet-platform,
.character-ground-preview.platform-sheet-platform,
.clangen-platform.platform-sheet-platform {
    width: min(210px, 100%);
    min-height: 184px;
    margin-inline: auto;
    display: grid;
    place-items: center;
    overflow: visible;
}
.profile-platform.platform-sheet-platform canvas,
.character-ground-preview.platform-sheet-platform canvas,
.clangen-platform.platform-sheet-platform canvas {
    width: 112px;
    height: 112px;
    image-rendering: pixelated;
    transform: translateY(-4px);
    position: relative;
    z-index: 2;
}
.camp-cat-ground.platform-sheet-platform {
    position: absolute !important;
    left: 50%;
    top: 49%;
    width: 92px !important;
    height: 81px !important;
    transform: translate(-50%, -50%);
    opacity: .96;
    pointer-events: none;
    z-index: 0;
}
.camp-cat-token canvas { position: relative; z-index: 2; }

/* Режимы игры в профиле */
.profile-mode-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin: 0 0 24px;
}
.game-mode-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px 18px;
    align-items: start;
    overflow: hidden;
}
.mode-round-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--v14-forest);
    color: #fff7d0;
    font-size: 28px;
    box-shadow: inset 0 0 0 5px rgba(255,255,255,.08);
}
.mode-play-button { grid-column: 1 / -1; text-align: center; border-radius: 999px; }
.game-mode-card .game-profile-list,
.mode-live-cats { grid-column: 1 / -1; }
.mode-live-cats h3 { margin: 8px 0 10px; }

/* Регистрация персонажа */
.character-wizard { max-width: 980px; margin: 0 auto; }
.wizard-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 20px; }
.wizard-progress span { padding: 10px 6px; border-radius: 14px; text-align: center; background: rgba(255,255,255,.45); color: #6f735f; font-weight: 700; }
.wizard-progress span.active { background: var(--v14-forest); color: white; }
.wizard-step { animation: v14Fade .25s ease; }
@keyframes v14Fade { from { opacity: 0; transform: translateY(8px); } }
.personality-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; max-height: 460px; overflow: auto; padding: 4px; }
.personality-choice, .appearance-choice { cursor: pointer; }
.personality-choice input, .appearance-choice input { accent-color: var(--v14-forest); }
.appearance-choice-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.appearance-choice { display: grid; gap: 8px; justify-items: center; padding: 14px 8px; border: 1px solid var(--v14-line); border-radius: 18px; background: rgba(255,255,255,.42); }
.appearance-choice:has(input:checked) { outline: 3px solid #5d884f; background: rgba(211,229,190,.72); }
.appearance-choice canvas { width: 96px; height: 96px; image-rendering: pixelated; }
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

/* Профиль выбранного персонажа */
.character-home-card { display: grid; grid-template-columns: minmax(250px, 34%) 1fr; gap: 30px; align-items: center; }
.character-home-info h1 { margin-block: 6px; font-size: clamp(34px,5vw,58px); }
.character-home-portrait { text-align: center; }
.two-column-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
.kitten-invites-section, .active-games-card { margin-top: 20px; }
.play-invite-list { display: grid; gap: 12px; }
.play-invite-card { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--v14-line); border-radius: 14px; background: rgba(255,255,255,.38); }
.request-sent-square { border-radius: 8px !important; padding: 12px 14px; }
.kitten-play-offer { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--v14-line); }
.kitten-play-choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.kitten-play-choice { display: grid; gap: 5px; min-height: 90px; border-radius: 12px !important; }
.kitten-play-choice small { white-space: normal; font-weight: 400; }

/* Сцена рождения */
.birth-scene-page { min-height: 100svh; background: #050707; color: #f4ecd4; overflow: hidden; }
.birth-scene { min-height: 100svh; display: grid; place-items: center; position: relative; transition: background 2.4s ease; }
.birth-scene.is-light { background: radial-gradient(circle at center, rgba(244,224,174,.42), rgba(28,38,28,.93) 70%), linear-gradient(#61755e,#182819); }
.birth-heartbeat { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(28px,6vw,64px); letter-spacing: .18em; }
.birth-dialogue-box { width: min(760px, calc(100% - 32px)); min-height: 230px; padding: 28px; border: 5px double #59452d; background: rgba(225,226,211,.94); color: #30342c; box-shadow: 0 16px 50px #0008; }
.birth-speaker { display: flex; gap: 16px; align-items: center; }
.birth-speaker canvas { width: 100px; height: 100px; image-rendering: pixelated; }
.birth-dialogue-text { font-size: clamp(20px,3vw,30px); line-height: 1.5; }

/* Мини-игры */
.kitten-game-page { min-height: 100svh; background: radial-gradient(circle at top,#355f3e,#10241a 68%); }
.kitten-game-shell { max-width: 1280px; }
.kitten-game-header { position: sticky; top: 0; z-index: 30; }
.game-timer { min-width: 92px; text-align: center; padding: 9px 15px; border-radius: 999px; background: #f0e4b4; color: #2e3e2d; font-weight: 900; font-variant-numeric: tabular-nums; }
.kitten-game-title { color: #f7f0d6; text-align: center; margin-bottom: 15px; }
.kitten-game-board { border: 3px solid rgba(238,225,183,.8); border-radius: 26px; overflow: hidden; box-shadow: 0 18px 60px #0008; }
.kitten-game-instructions { display: flex; justify-content: space-between; gap: 20px; padding: 14px 20px; background: rgba(244,239,217,.94); color: #263527; }
.tag-arena, .bug-arena { position: relative; min-height: min(68vh,650px); background-color:#527d43; background-image:linear-gradient(#9dbe7955,#345b3155),var(--camp-background); background-position:center; background-size:cover; overflow: hidden; touch-action: none; }
.tag-player { position: absolute; transform: translate(-50%,-50%); display: grid; justify-items: center; border: 0; background: transparent; color: #fff; text-shadow: 0 2px 4px #000; cursor: grab; z-index: 4; }
.tag-player canvas { width: 120px; height: 120px; image-rendering: pixelated; filter: drop-shadow(0 5px 5px #0007); }
.tag-player.is-tagger::before { content:""; position:absolute; width:118px; height:72px; top:45px; border-radius:50%; background:#e2353566; box-shadow:0 0 24px #f22; z-index:-1; }
.hunt-scorebar { display: grid; grid-template-columns: repeat(2,1fr); background:#f1e9ca; }
.kitten-player-summary { display:flex; gap:12px; align-items:center; padding:12px 18px; }
.kitten-player-summary:last-child { justify-content:flex-end; text-align:right; }
.kitten-player-summary canvas { width:72px;height:72px;image-rendering:pixelated; }
.kitten-player-summary div { display:grid; }
.hunt-bug { position:absolute; transform:translate(-50%,-50%); width:64px;height:64px;border-radius:50%;border:2px solid #fff9;background:#f2e4a8dd;font-size:34px;cursor:pointer;animation:bugBob .8s ease-in-out infinite alternate; }
@keyframes bugBob { to { transform:translate(-50%,-58%) rotate(6deg); } }
.battle-game-board { background:#eee5c9; color:#263527; }
.battle-stage { min-height:420px; padding:30px; display:grid; grid-template-columns:1fr auto 1fr; gap:20px; align-items:center; background:linear-gradient(#7fc1dc 0 45%,#77a950 45% 100%); }
.battle-cat { display:grid; gap:8px; }
.battle-cat-right { text-align:right; justify-items:end; }
.battle-cat canvas { width:180px;height:180px;image-rendering:pixelated;filter:drop-shadow(0 8px 5px #0006); }
.battle-cat-left canvas { transform:scaleX(-1); }
.battle-name { display:flex; justify-content:space-between; gap:15px; width:min(100%,380px); padding:9px 13px; background:#f5f5e8; border:3px solid #425046; }
.fatigue-track { width:min(100%,380px);height:20px;background:#333;border:3px solid #e9eadf; }
.fatigue-track i { display:block;height:100%;background:linear-gradient(90deg,#b03030,#edbd35,#50a947);transition:width .2s; }
.battle-versus { font-size:42px;font-weight:900;color:white;text-shadow:0 3px 8px #000; }
.battle-console { display:grid; grid-template-columns:1.25fr 1fr; gap:16px; padding:18px; }
.battle-log { min-height:220px; padding:16px; border:3px solid #4c534b; background:#f7f7ed; overflow:auto; }
.battle-log p { margin:6px 0; border-top:1px dotted #aaa; padding-top:6px; }
.battle-actions { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.battle-actions button { display:grid; gap:4px; min-height:88px; }
.kitten-game-result { max-width:700px;margin:10vh auto;text-align:center; }
.kitten-game-toast { position:fixed; right:20px; bottom:20px; z-index:100; max-width:440px; padding:14px 18px; background:#f4efd9; box-shadow:0 8px 30px #0007; }

/* Новости проекта */
.project-news-section { margin-top: 24px; }

/* Более аккуратные ссылки Правила/Конфиденциальность/Удалить аккаунт */
.settings-links, .delete-account-card { text-align:center; }
.settings-links a, .delete-account-card button { margin-inline:auto; }

@media (max-width: 820px) {
    .profile-mode-choice, .character-home-card, .battle-console { grid-template-columns:1fr; }
    .appearance-choice-grid { grid-template-columns:repeat(2,1fr); }
    .personality-grid { grid-template-columns:repeat(2,1fr); }
    .kitten-play-choice-grid { grid-template-columns:1fr; }
    .play-invite-card { align-items:stretch; flex-direction:column; }
    .battle-stage { min-height:360px; padding:12px; gap:7px; }
    .battle-cat canvas { width:112px;height:112px; }
    .battle-name { display:grid; font-size:12px; }
    .battle-versus { font-size:24px; }
    .battle-actions { grid-template-columns:1fr 1fr; }
    .kitten-game-header { gap:8px; }
    .kitten-game-header .site-brand { display:none; }
}
@media (max-width: 520px) {
    .personality-grid { grid-template-columns:1fr; }
    .wizard-progress span { font-size:0; }
    .wizard-progress span::first-letter { font-size:14px; }
    .appearance-choice-grid { grid-template-columns:1fr 1fr; }
    .two-column-facts { grid-template-columns:1fr; }
    .tag-player canvas { width:88px;height:88px; }
    .battle-actions { grid-template-columns:1fr; }
}
.location-chat-list { max-height: 310px !important; overflow: auto; }
.compact-location-character { align-self: start; padding: 18px !important; text-align: center; }
.compact-location-character .profile-platform { min-height: 150px; width: 172px; }
.compact-location-character .profile-platform canvas { width: 82px; height: 82px; }
.compact-location-character h2 { margin: 5px 0; }
.compact-location-character p:not(.eyebrow) { margin: 0 0 12px; }
.location-play-notice { margin-bottom: 14px; display:flex; justify-content:space-between; gap:18px; align-items:center; border:2px solid #8ca46b; }
.location-play-notice h3,.location-play-notice p { margin:4px 0; }
@media(max-width:680px){.location-play-notice{align-items:stretch;flex-direction:column;}}

/* Дополнительные классы разметки v14 */
.v14-wizard-shell { margin-top: 26px; }
.wizard-progress { list-style:none; padding:0; }
.choice-chip-grid,
.faction-choice-grid,
.parent-choice-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.choice-chip,
.faction-choice,
.parent-choice { display:block; }
.choice-chip input,
.faction-choice input,
.parent-choice input { position:absolute; opacity:0; pointer-events:none; }
.choice-chip span,
.faction-choice span,
.parent-choice span { display:grid; gap:5px; min-height:70px; padding:13px 14px; border:1px solid var(--v14-line); border-radius:13px; background:rgba(255,255,255,.5); cursor:pointer; }
.choice-chip input:checked + span,
.faction-choice input:checked + span,
.parent-choice input:checked + span { outline:3px solid #567d4b; background:#dfe8c8; }
.generated-name-row { display:grid; grid-template-columns:1fr auto; gap:10px; }
.wizard-question { font-size:clamp(22px,3.5vw,34px); font-weight:800; color:#3b4e36; }
.appearance-preview-platform { width:130px; min-height:105px; display:grid; place-items:center; border-radius:50%; background:radial-gradient(ellipse,#d7e8aa 0 38%,transparent 70%); }

.character-home-page { min-height:100svh; background:radial-gradient(circle at top,#345c3d,#10241a 70%); }
.character-home-shell { max-width:1200px; }
.character-home-header { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:14px; padding:16px 22px; border-radius:0 0 22px 22px; background:#143824; box-shadow:0 8px 30px #0004; }
.character-home-header > :last-child { justify-self:end; }
.round-play-button { width:104px; height:104px; border-radius:50% !important; display:grid !important; place-items:center; font-size:22px; box-shadow:0 0 0 8px rgba(255,255,255,.08); }
.character-home-page .site-content { padding-top:28px; }

.birth-scene.dark { background:#020303; }
.birth-scene.light { background:radial-gradient(circle at 50% 36%,rgba(244,224,174,.55),rgba(30,46,31,.95) 70%),linear-gradient(#6f8767,#172b1c); }
.heartbeat-text { color:#f5ead0; font-size:clamp(28px,6vw,64px); letter-spacing:.15em; text-align:center; padding:25px; }
.birth-dialogue-stage { width:100%; min-height:100svh; display:grid; place-items:end center; padding:6vh 16px; position:relative; }
.birth-dialogue-stage .birth-speaker { position:absolute; left:max(4vw,20px); bottom:210px; display:grid; justify-items:center; }
.birth-dialogue-stage .birth-speaker canvas { width:160px; height:160px; image-rendering:pixelated; filter:drop-shadow(0 9px 8px #0007); }
.birth-dialogue-stage .birth-dialogue-box { width:min(850px,96%); }
.birth-dialogue-box #birth-next { float:right; margin-top:16px; }

@media(max-width:760px){
  .choice-chip-grid,.faction-choice-grid,.parent-choice-grid{grid-template-columns:1fr 1fr;}
  .character-home-header{grid-template-columns:auto 1fr auto;}
  .round-play-button{width:auto;height:auto;border-radius:999px !important;}
  .birth-dialogue-stage .birth-speaker{left:15px;bottom:300px;}
  .birth-dialogue-stage .birth-speaker canvas{width:100px;height:100px;}
}
@media(max-width:500px){
  .choice-chip-grid,.faction-choice-grid,.parent-choice-grid{grid-template-columns:1fr;}
  .character-home-header{padding:10px;}
  .character-home-header .outline-button{padding:9px 10px;font-size:12px;}
}
.wizard-progress li { padding:10px 6px; border-radius:14px; text-align:center; background:rgba(255,255,255,.45); color:#6f735f; font-weight:700; }
.wizard-progress li.active { background:var(--v14-forest); color:white; }


/* ======================================================================
   ClanGenRU Online v14.2 — исправления списка, профиля, лагеря и возраста
   ====================================================================== */

/* Карточки списка персонажей: модель сверху/слева, информация справа,
   кнопки всегда отдельной строкой внизу. */
.online-cat-card.v14-cat-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    min-height: 390px;
    padding: 18px;
}
.online-cat-card.v14-cat-card .online-cat-card-top {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    width: 100%;
}
.online-cat-card.v14-cat-card .online-cat-avatar {
    width: 96px;
    height: 96px;
    align-self: start;
}
.online-cat-card.v14-cat-card .online-cat-avatar canvas {
    width: 88px;
    height: 88px;
    image-rendering: pixelated;
}
.online-cat-card.v14-cat-card .online-cat-main {
    min-width: 0;
}
.online-cat-card.v14-cat-card .online-cat-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin-top: auto;
    padding-top: 18px;
}
.online-cat-card.v14-cat-card .online-cat-card-actions a {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px;
    overflow-wrap: anywhere;
}

/* В живом лагере под перемещающимися котами нет platforms.png и травы. */
.online-location-page .camp-cat-ground,
.online-location-page .camp-cat-token .platform-sheet-platform {
    display: none !important;
}
.location-character-sprite {
    display: grid;
    place-items: center;
    min-height: 128px;
    margin: 6px auto;
    background: transparent;
}
.location-character-sprite canvas {
    width: 112px;
    height: 112px;
    image-rendering: pixelated;
    filter: drop-shadow(0 7px 5px rgba(0,0,0,.28));
}
.compact-location-character .location-character-sprite {
    width: 160px;
}

/* Основной профиль персонажа повторяет структуру открываемого профиля. */
.character-home-profile {
    max-width: 1100px;
    margin-inline: auto;
}
.character-home-profile .cat-profile-heading {
    text-align: center;
}
.character-home-profile .cat-profile-heading h1 {
    margin: 0 0 10px;
    font-size: clamp(36px, 5vw, 58px);
}
.character-home-profile-body {
    align-items: center;
}
.character-home-profile .profile-platform {
    min-height: 184px;
}
.character-home-profile .cat-owner-caption {
    margin-top: 0;
}
.cat-role-plaque {
    display: none !important;
}

/* Верх профиля: маленькие боковые кнопки и квадратная кнопка «Играть». */
.character-home-header {
    grid-template-columns: 1fr auto 1fr;
    padding: 12px 18px;
}
.character-home-header .outline-button {
    width: fit-content;
    min-height: 38px;
    padding: 8px 12px;
    font-size: .86rem;
}
.character-home-header #leave-character {
    justify-self: start;
}
.character-home-header > :last-child {
    justify-self: end;
}
.round-play-button {
    width: 142px !important;
    height: 54px !important;
    border-radius: 10px !important;
    place-items: center;
    font-size: 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.2) !important;
}

/* В профиле аккаунта остаются только две круглые зелёные кнопки режимов. */
.profile-mode-choice.compact-mode-choice {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(20px, 5vw, 52px);
    margin: 8px 0 30px;
}
.round-mode-button {
    display: grid;
    justify-items: center;
    gap: 10px;
    width: 150px;
    color: var(--forest-800);
    text-align: center;
    text-decoration: none;
}
.round-mode-button:visited {
    color: var(--forest-800);
}
.round-mode-icon {
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    color: #fff7d0;
    background: var(--forest-700);
    box-shadow: 0 12px 28px rgba(22, 52, 34, .24), inset 0 0 0 6px rgba(255,255,255,.08);
    font-size: 36px;
    transition: transform .16s ease, box-shadow .16s ease;
}
.round-mode-button:hover .round-mode-icon,
.round-mode-button:focus-visible .round-mode-icon {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(22, 52, 34, .3), inset 0 0 0 6px rgba(255,255,255,.12);
}
.round-mode-button strong {
    font-size: .98rem;
}

/* Правила и конфиденциальность выше форм и на всю ширину, как удаление. */
.settings-grid .legal-settings-card {
    grid-column: 1 / -1;
    text-align: center;
}
.settings-grid .legal-settings-card .settings-legal-links {
    width: min(100%, 720px);
    margin-inline: auto;
}

@media (max-width: 720px) {
    .online-cat-grid {
        grid-template-columns: 1fr;
    }
    .online-cat-card.v14-cat-card {
        min-height: 0;
    }
    .online-cat-card.v14-cat-card .online-cat-card-top {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 12px;
    }
    .online-cat-card.v14-cat-card .online-cat-avatar {
        width: 82px;
        height: 82px;
    }
    .online-cat-card.v14-cat-card .online-cat-avatar canvas {
        width: 76px;
        height: 76px;
    }
    .online-cat-card.v14-cat-card .online-cat-card-actions {
        grid-template-columns: 1fr;
    }
    .character-home-header {
        grid-template-columns: auto 1fr auto;
        gap: 8px;
        padding: 10px;
    }
    .round-play-button {
        width: 112px !important;
        height: 46px !important;
        border-radius: 9px !important;
    }
    .character-home-header .outline-button {
        padding: 8px 9px;
        font-size: .74rem;
    }
    .settings-grid .legal-settings-card,
    .settings-grid .danger-zone {
        grid-column: auto;
    }
}

/* ======================================================================
   ClanGenRU Online v14.3 — навигация, профили, племя и привилегии
   ====================================================================== */

/* Кнопки выбора режима отображаются только внутри вкладки «Профиль». */
.profile-mode-choice.compact-mode-choice {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 0 24px;
}
.profile-mode-choice .profile-mode-button {
    display: inline-grid;
    place-items: center;
    width: min(220px, 100%);
    min-height: 56px;
    padding: 12px 22px;
    border-radius: 10px;
    color: #fff !important;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
}

/* Список котов: модель сверху, затем информация и одна кнопка «Выбрать». */
.online-cat-card.v14-cat-card {
    min-height: 0;
}
.online-cat-card.v14-cat-card .online-cat-card-top {
    display: flex;
    justify-content: center;
    width: 100%;
}
.online-cat-card.v14-cat-card .online-cat-avatar {
    width: 112px;
    height: 112px;
}
.online-cat-card.v14-cat-card .online-cat-avatar canvas {
    width: 104px;
    height: 104px;
}
.online-cat-card.v14-cat-card .online-cat-main {
    width: 100%;
    margin-top: 14px;
}
.online-cat-card.v14-cat-card .online-cat-card-actions {
    grid-template-columns: 1fr;
    padding-top: 14px;
}

/* В живой локации больше нет отдельного блока «Ваш персонаж». */
.online-location-hero.location-without-character-card {
    grid-template-columns: minmax(0, 1fr);
}
.online-location-hero.location-without-character-card .location-scenery {
    width: 100%;
}

/* Ссылки на страницу племени в профилях котов. */
.clan-profile-link {
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Вкладки собственного персонажа и встроенные племенные полномочия. */
.own-cat-profile-tabs {
    margin-top: 24px;
}
.own-cat-tab-panel {
    min-height: 150px;
}
.character-duty-privileges,
.rogue-clan-applications {
    display: grid;
    gap: 14px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(77, 94, 66, .22);
}
.character-duty-privileges .manager-form,
.rogue-clan-applications .subtle-form {
    margin-top: 0;
}

/* Отдельная страница «О племени»: только персонаж и сведения о племени. */
.clan-page-character-card {
    display: grid;
    grid-template-columns: minmax(190px, 30%) minmax(0, 1fr);
    gap: 26px;
    align-items: center;
}
.clan-page-character-sprite {
    min-height: 190px;
}
.clan-page-character-card h1 {
    margin: 4px 0 10px;
    font-size: clamp(34px, 5vw, 56px);
}
.clan-info-page .character-page-content {
    max-width: 1100px;
}

@media (max-width: 720px) {
    .profile-mode-choice.compact-mode-choice {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .profile-mode-choice .profile-mode-button {
        width: 100%;
        min-width: 0;
        padding-inline: 10px;
    }
    .online-cat-card.v14-cat-card .online-cat-avatar {
        width: 100px;
        height: 100px;
    }
    .online-cat-card.v14-cat-card .online-cat-avatar canvas {
        width: 92px;
        height: 92px;
    }
    .clan-page-character-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .profile-mode-choice.compact-mode-choice {
        grid-template-columns: 1fr;
    }
    .online-game-header nav {
        gap: 10px;
    }
    .online-game-header nav a {
        font-size: .78rem;
    }
}

/* ========================================================================== */
/* ClanGenRU v14.4: уведомления, адаптивная версия и тёмная тема              */
/* ========================================================================== */

.cat-tab-panel[hidden],
[data-tab-content][hidden] {
    display: none !important;
}

.appearance-reroll-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}
.appearance-reroll-counter {
    min-width: 72px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--forest-800);
    background: rgba(255,255,255,.58);
    font-weight: 800;
    text-align: center;
}

.family-tree-names-only {
    display: grid;
    gap: 12px;
}
.family-tree-name-row {
    display: grid;
    grid-template-columns: minmax(120px, .38fr) 1fr;
    gap: 16px;
    align-items: start;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.45);
}
.family-tree-name-row > strong {
    color: var(--forest-800);
}
.family-tree-name-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}
.family-tree-name-list a {
    color: var(--forest-700);
    font-weight: 750;
}

.character-notification-stack {
    position: fixed;
    z-index: 1100;
    top: 18px;
    right: 18px;
    display: grid;
    width: min(390px, calc(100vw - 28px));
    gap: 10px;
    pointer-events: none;
}
.character-notification-toast {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 18px 48px 18px 18px;
    border: 1px solid rgba(215,173,74,.45);
    border-radius: 16px;
    background: rgba(248,241,220,.97);
    box-shadow: 0 18px 55px rgba(0,0,0,.28);
    backdrop-filter: blur(12px);
    pointer-events: auto;
    animation: notification-enter .2s ease-out;
}
.character-notification-toast.is-closing {
    opacity: 0;
    transform: translateX(18px);
    transition: .16s ease;
}
.character-notification-toast p,
.character-notification-toast strong { margin: 0; }
.character-notification-close {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--ink);
    background: rgba(35,53,38,.08);
    cursor: pointer;
    font-size: 22px;
}
.character-notification-open { justify-self: start; }
@keyframes notification-enter {
    from { opacity: 0; transform: translateY(-10px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.location-report-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 25px;
    height: 25px;
    margin-left: auto;
    border: 1px solid rgba(164,65,56,.4);
    border-radius: 50%;
    color: var(--danger);
    background: rgba(164,65,56,.08);
    cursor: pointer;
    font-weight: 900;
}
.location-report-button:hover { color: #fff; background: var(--danger); }
.location-chat-meta { gap: 8px; }

.clan-privileges-warning {
    margin: 0 0 12px;
}

/* Тёмная тема. Сохраняет зелёно-пергаментную стилистику, но убирает яркий фон. */
html[data-site-theme="dark"] {
    --forest-950: #07100a;
    --forest-900: #0d1b12;
    --forest-800: #183321;
    --forest-700: #28563a;
    --forest-600: #3f7550;
    --moss: #79946f;
    --sage: #9cac91;
    --parchment: #252820;
    --parchment-light: #303329;
    --ink: #edf1e6;
    --muted: #b2bbaa;
    --gold: #d5b65d;
    --line: rgba(223,232,211,.17);
    color-scheme: dark;
}
html[data-site-theme="dark"] body {
    color: var(--ink);
    background:
        linear-gradient(rgba(2,7,4,.72), rgba(2,7,4,.88)),
        radial-gradient(circle at top, rgba(84,125,78,.25), transparent 35%),
        linear-gradient(135deg, #183021, #0a140e 55%, #030704);
}
html[data-site-theme="dark"] :is(
    .parchment-card,.settings-card,.character-section,.cat-profile-sheet,
    .online-cat-card,.game-profile-card,.location-social-panel,.location-say-card,
    .modal-dialog,.dialog-form,.site-announcement,.admin-report-row,
    .character-notification-toast,.auth-card,.profile-panel,.message-panel
) {
    color: var(--ink);
    border-color: var(--line);
    background-color: rgba(38,42,33,.96);
    background-image: none;
}
html[data-site-theme="dark"] :is(input,select,textarea) {
    color: var(--ink);
    border-color: rgba(230,237,220,.2);
    background: #181c16;
}
html[data-site-theme="dark"] :is(input,select,textarea)::placeholder { color: #8f998b; }
html[data-site-theme="dark"] :is(.muted,small,dt,.cat-owner-caption,.cat-profile-thought) { color: var(--muted); }
html[data-site-theme="dark"] :is(.online-cat-detail-row,.cat-profile-facts > div,.game-profile-row,.location-chat-message) {
    border-color: var(--line);
}
html[data-site-theme="dark"] :is(.family-tree-name-row,.appearance-reroll-counter,.pending-relation-card) {
    color: var(--ink);
    background: rgba(255,255,255,.04);
}
html[data-site-theme="dark"] a { color: #b9d2ab; }
html[data-site-theme="dark"] .site-header,
html[data-site-theme="dark"] .online-game-header { background: rgba(6,18,11,.95); }
html[data-site-theme="dark"] .cat-profile-tabs button,
html[data-site-theme="dark"] .own-cat-profile-tabs button { color: #f5f1dc; }
html[data-site-theme="dark"] .outline-button,
html[data-site-theme="dark"] .secondary-button { color: var(--ink); border-color: rgba(232,237,224,.26); background: rgba(255,255,255,.04); }
html[data-site-theme="dark"] dialog::backdrop { background: rgba(0,0,0,.7); }

/* Принудительная версия для телефона. Работает и на широком экране для проверки. */
html[data-display-version="phone"] body {
    overflow-x: hidden;
}
html[data-display-version="phone"] :is(
    .dashboard,.dashboard-shell,.dashboard-main,.site-main,.online-page,.online-location-page,
    .online-content,.online-location-content,.character-home-page,.cat-profile-page,
    main,.page-shell
) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}
html[data-display-version="phone"] :is(.site-header,.online-game-header) {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
}
html[data-display-version="phone"] :is(.site-header nav,.online-game-header nav) {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    width: 100%;
    gap: 8px;
}
html[data-display-version="phone"] :is(.site-header nav a,.online-game-header nav a) {
    overflow-wrap: anywhere;
    text-align: center;
}
html[data-display-version="phone"] :is(
    .admin-review-grid,.admin-grid,.profile-grid,.online-grid,.online-cats-list,
    .cat-profile-body,.location-social-panel,.game-mode-grid,.settings-grid,
    .online-register-layout,.battle-stage,.battle-console
) {
    grid-template-columns: minmax(0,1fr) !important;
}
html[data-display-version="phone"] :is(.parchment-card,.settings-card,.cat-profile-sheet,.character-section) {
    min-width: 0;
    padding: 18px;
    border-radius: 16px;
}
html[data-display-version="phone"] .cat-profile-heading h1 { font-size: clamp(30px,10vw,48px); overflow-wrap: anywhere; }
html[data-display-version="phone"] .cat-profile-body { gap: 18px; }
html[data-display-version="phone"] :is(.cat-profile-tabs,.own-cat-profile-tabs) {
    display: grid;
    grid-template-columns: 1fr !important;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
}
html[data-display-version="phone"] :is(.cat-profile-tabs button,.own-cat-profile-tabs button) {
    width: 100%;
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(18,40,25,.35);
}
html[data-display-version="phone"] .family-tree-name-row { grid-template-columns: 1fr; gap: 7px; }
html[data-display-version="phone"] .appearance-choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
html[data-display-version="phone"] .appearance-choice { min-width: 0; padding: 10px; }
html[data-display-version="phone"] .online-cat-card.v14-cat-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100%;
    min-width: 0;
}
html[data-display-version="phone"] .online-cat-card.v14-cat-card .online-cat-card-top {
    display: grid;
    place-items: center;
    width: 100%;
}
html[data-display-version="phone"] .online-cat-card.v14-cat-card .online-cat-main { width: 100%; min-width: 0; }
html[data-display-version="phone"] .online-cat-card.v14-cat-card .online-cat-card-actions {
    display: grid;
    width: 100%;
}
html[data-display-version="phone"] .online-cat-detail-row {
    grid-template-columns: minmax(85px,.42fr) minmax(0,1fr);
}
html[data-display-version="phone"] .online-cat-detail-row strong { overflow-wrap: anywhere; }
html[data-display-version="phone"] :is(.inline-actions,.stack-actions,.clan-review-actions) {
    align-items: stretch;
    flex-direction: column;
}
html[data-display-version="phone"] :is(.inline-actions > *,.stack-actions > *,.clan-review-actions > *) { width: 100%; }
html[data-display-version="phone"] .online-location-topbar { grid-template-columns: 1fr !important; }
html[data-display-version="phone"] .location-social-panel { padding: 12px; }
html[data-display-version="phone"] .location-chat-meta { align-items: flex-start; flex-wrap: wrap; }
html[data-display-version="phone"] .location-chat-meta time { width: 100%; }
html[data-display-version="phone"] .interactive-camp { min-height: 430px; }
html[data-display-version="phone"] .camp-cat-token { transform: translate(-50%,-50%) scale(.86); }
html[data-display-version="phone"] .hunt-scorebar { grid-template-columns: 1fr 1fr; gap: 6px; }
html[data-display-version="phone"] .kitten-player-summary { min-width: 0; padding: 8px; }
html[data-display-version="phone"] .kitten-player-summary canvas { width: 42px; height: 42px; }
html[data-display-version="phone"] .bug-arena,
html[data-display-version="phone"] .tag-arena { min-height: 430px; }
html[data-display-version="phone"] .character-notification-stack { top: 8px; right: 8px; width: calc(100vw - 16px); }
html[data-display-version="phone"] .modal-dialog { width: calc(100vw - 24px); max-width: none; }
html[data-display-version="phone"] table { display: block; max-width: 100%; overflow-x: auto; }

@media (max-width: 780px) {
    html:not([data-display-version="desktop"]) body { overflow-x: hidden; }
    html:not([data-display-version="desktop"]) .appearance-choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    html:not([data-display-version="desktop"]) .family-tree-name-row { grid-template-columns: 1fr; }
    html:not([data-display-version="desktop"]) .character-notification-stack { top: 8px; right: 8px; width: calc(100vw - 16px); }
}

/* ========================================================================== 
   ClanGenRU v14.5.1 — цельная тёмная тема и стабильная загрузка привилегий
   ========================================================================== */
html[data-site-theme="dark"] {
    --dark-page: #090e0b;
    --dark-page-soft: #0e1510;
    --dark-surface: #151c17;
    --dark-surface-2: #1c241e;
    --dark-surface-3: #242e26;
    --dark-text: #eef4ea;
    --dark-muted: #aeb9ae;
    --dark-heading: #f3f6ed;
    --dark-accent: #a9c99d;
    --dark-border: rgba(225, 235, 223, 0.16);
    --dark-border-strong: rgba(225, 235, 223, 0.26);
    --dark-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
    --parchment: var(--dark-surface-2);
    --parchment-light: var(--dark-surface-3);
    --ink: var(--dark-text);
    --muted: var(--dark-muted);
    --line: var(--dark-border);
}

html[data-site-theme="dark"],
html[data-site-theme="dark"] body {
    background-color: var(--dark-page);
}

html[data-site-theme="dark"] body,
html[data-site-theme="dark"] :is(.page,.site-page,.online-page,.online-location-page,.cat-profile-page,.admin-clans-page) {
    color: var(--dark-text);
    background:
        radial-gradient(circle at 50% -12%, rgba(77, 119, 79, 0.22), transparent 38%),
        linear-gradient(180deg, var(--dark-page-soft), var(--dark-page));
}

html[data-site-theme="dark"] .dashboard {
    color: var(--dark-text);
    background: var(--dark-surface);
    border-color: var(--dark-border);
    box-shadow: var(--dark-shadow);
}

html[data-site-theme="dark"] .dashboard-content {
    color: var(--dark-text);
    background:
        radial-gradient(circle at top right, rgba(76, 111, 75, 0.11), transparent 34%),
        linear-gradient(180deg, #111812, #0d130f);
}

html[data-site-theme="dark"] .profile-sidebar {
    color: var(--dark-text);
    background:
        linear-gradient(rgba(12, 35, 21, 0.97), rgba(7, 21, 13, 0.99)),
        linear-gradient(135deg, #244a31, #09130d);
    border-right: 1px solid var(--dark-border);
}

html[data-site-theme="dark"] .nav-button:hover,
html[data-site-theme="dark"] .nav-button.active {
    color: #f4faef;
    background: rgba(139, 177, 126, 0.18);
}

html[data-site-theme="dark"] :is(
    .site-content,.online-content,.online-location-content,.game-hub-content,
    .character-page-content,.admin-clans-content,.online-cat-profile-content,
    .character-home-page .site-content
) {
    color: var(--dark-text);
}

html[data-site-theme="dark"] :is(
    .parchment-card,.settings-card,.stat-card,.achievement-card,.player-card,.chat-card,
    .profile-hero,.message-list,.message-panel,.profile-panel,.friends-panel,
    .community-clan-card,.players-table-shell,.game-mode-card,.online-cat-card,
    .online-cats-panel,.online-register-panel,.character-section,.cat-profile-sheet,
    .character-home-card,.character-home-profile,.location-social-panel,.location-say-card,
    .admin-report-row,.admin-wide-card,.site-announcement,.subtle-form,.dialog-form,
    .modal-dialog,.pending-relation-card,.family-tree-name-row,.legal-settings-card,
    .delete-account-card,.profile-mode-choice,.location-play-notice,.blocked-card
) {
    color: var(--dark-text);
    background-color: var(--dark-surface-2);
    background-image: none;
    border-color: var(--dark-border);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

html[data-site-theme="dark"] :is(
    .game-profile-row,.location-action-grid button,.clan-place-grid p,.clan-leadership-list,
    .players-table-header,.player-table-row:hover,.appearance-reroll-counter,
    .online-cat-detail-row,.profile-details > div,.cat-profile-facts > div,
    .character-facts-list > div,.clan-leadership-list > div,.game-profile-row,
    .private-message,.stack-item,.compact-player,.admin-ban-row,.location-chat-message
) {
    color: var(--dark-text);
    border-color: var(--dark-border);
}

html[data-site-theme="dark"] :is(
    .game-profile-row,.location-action-grid button,.clan-place-grid p,.clan-leadership-list,
    .appearance-reroll-counter,.pending-relation-card,.family-tree-name-row
) {
    background: rgba(255, 255, 255, 0.045);
}

html[data-site-theme="dark"] .game-profile-row:hover,
html[data-site-theme="dark"] .player-table-row:hover,
html[data-site-theme="dark"] .location-action-grid button:hover {
    background: rgba(153, 192, 139, 0.1);
}

html[data-site-theme="dark"] .players-table-header {
    color: #dfe9da;
    background: rgba(141, 166, 117, 0.14);
}

html[data-site-theme="dark"] .player-table-row {
    color: var(--dark-text);
    background: transparent;
    border-color: var(--dark-border);
}

html[data-site-theme="dark"] :is(
    h1,h2,h3,h4,h5,h6,
    .dashboard-header h1,.section-title h2,.profile-hero h2,
    .parchment-card h3,.settings-card h3,.stat-card strong,
    .cat-profile-heading h1,.character-home-info h1
) {
    color: var(--dark-heading);
}

html[data-site-theme="dark"] :is(
    p,dd,.profile-details dd,.cat-profile-facts,.cat-profile-facts dd,
    .character-facts-list dd,.clan-leadership-list dd,.online-cat-detail-row strong,
    .game-profile-row strong,.online-cat-main,.character-summary-main
) {
    color: var(--dark-text);
}

html[data-site-theme="dark"] :is(
    .muted,small,dt,.profile-details dt,.cat-profile-facts dt,
    .character-facts-list dt,.clan-leadership-list dt,.online-cat-detail-row > span,
    .player-info span,.game-profile-row small,.cat-profile-heading h1 small,
    .cat-owner-caption,.cat-profile-thought,.game-hub-intro
) {
    color: var(--dark-muted);
}

html[data-site-theme="dark"] .eyebrow,
html[data-site-theme="dark"] :is(.search-field,.settings-card label,.location-say-card label) {
    color: var(--dark-accent);
}

html[data-site-theme="dark"] :is(input,select,textarea,.search-field input,.chat-compose textarea) {
    color: var(--dark-text);
    background: #0f1511;
    border-color: var(--dark-border-strong);
    box-shadow: none;
}

html[data-site-theme="dark"] :is(input,select,textarea):focus {
    border-color: rgba(154, 196, 139, 0.62);
    box-shadow: 0 0 0 3px rgba(116, 164, 103, 0.13);
    outline: none;
}

html[data-site-theme="dark"] select option {
    color: var(--dark-text);
    background: #111813;
}

html[data-site-theme="dark"] :is(input,textarea)::placeholder {
    color: #7f8b80;
}

html[data-site-theme="dark"] :is(.site-header,.online-game-header,.character-home-header) {
    color: #f4f7ef;
    background: rgba(5, 15, 9, 0.97);
    border-color: var(--dark-border);
    box-shadow: 0 9px 28px rgba(0, 0, 0, 0.28);
}

html[data-site-theme="dark"] :is(.site-header a,.online-game-header a,.character-home-header a) {
    color: #e6eee1;
}

html[data-site-theme="dark"] :is(.site-header a:hover,.online-game-header a:hover,.character-home-header a:hover) {
    color: #fff;
}

html[data-site-theme="dark"] .location-chat-list {
    color: var(--dark-text);
    background: #101612;
    border-color: var(--dark-border);
}

html[data-site-theme="dark"] .location-chat-message {
    background: rgba(255, 255, 255, 0.025);
}

html[data-site-theme="dark"] .location-chat-message.is-weather {
    background: rgba(116, 151, 104, 0.09);
}

html[data-site-theme="dark"] .cat-profile-sheet {
    background: linear-gradient(180deg, #202820, #171e18);
}

html[data-site-theme="dark"] .cat-profile-facts,
html[data-site-theme="dark"] .cat-profile-thought {
    color: var(--dark-text);
}

html[data-site-theme="dark"] .cat-profile-tabs,
html[data-site-theme="dark"] .own-cat-profile-tabs {
    border-color: rgba(222, 204, 132, 0.38);
    background: #4b482b;
}

html[data-site-theme="dark"] :is(.cat-profile-tabs button,.own-cat-profile-tabs button) {
    color: #f4edd4;
    border-color: rgba(239, 224, 166, 0.24);
}

html[data-site-theme="dark"] :is(.cat-profile-tabs button.active,.own-cat-profile-tabs button.active) {
    background: rgba(218, 186, 90, 0.16);
}

html[data-site-theme="dark"] :is(.outline-button,.secondary-button,.text-button) {
    color: var(--dark-text);
    background: rgba(255, 255, 255, 0.045);
    border-color: var(--dark-border-strong);
}

html[data-site-theme="dark"] :is(.outline-button,.secondary-button):hover {
    background: rgba(145, 185, 132, 0.12);
}

html[data-site-theme="dark"] :is(.online-badge,.section-counter,.nav-badge) {
    color: #cfe3c6;
    background: rgba(117, 159, 104, 0.14);
    border-color: rgba(153, 190, 141, 0.25);
}

html[data-site-theme="dark"] :is(.subtab-button,.message-tab) {
    color: #dce7d7;
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--dark-border);
}

html[data-site-theme="dark"] :is(.subtab-button.active,.message-tab.active) {
    color: #fff;
    background: #315d3f;
}

html[data-site-theme="dark"] :is(dialog,.modal-dialog) {
    color: var(--dark-text);
    background: var(--dark-surface-2);
    border-color: var(--dark-border);
}

html[data-site-theme="dark"] :is(table,thead,tbody,tr,th,td) {
    border-color: var(--dark-border);
}

html[data-site-theme="dark"] th {
    color: #dfe9da;
    background: rgba(143, 171, 128, 0.1);
}

html[data-site-theme="dark"] hr {
    border-color: var(--dark-border);
}

html[data-site-theme="dark"] footer,
html[data-site-theme="dark"] .site-footer {
    color: var(--dark-muted);
    border-color: var(--dark-border);
    background: rgba(6, 12, 8, 0.72);
}

html[data-site-theme="dark"] ::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

html[data-site-theme="dark"] ::-webkit-scrollbar-track {
    background: #0b100d;
}

html[data-site-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #354438;
    border: 2px solid #0b100d;
    border-radius: 999px;
}

html[data-site-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #49604e;
}

.clan-privileges-loading,
.clan-privileges-error-card {
    max-width: 920px;
    width: 100%;
    margin-inline: auto;
}

.loading-line {
    position: relative;
    height: 5px;
    margin-top: 15px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(79, 124, 82, 0.14);
}

.loading-line::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 34%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--forest-600), transparent);
    animation: clan-privileges-loading 1.15s linear infinite;
}

@keyframes clan-privileges-loading {
    from { left: -38%; }
    to { left: 104%; }
}

/* ========================================================================== 
   ClanGenRU v14.5.3: точечное исправление тёмной темы
   ========================================================================== */

/* Виджет игрового времени на страницах персонажей раньше сохранял светлый
   пергаментный фон, хотя остальная страница уже была тёмной. */
html[data-site-theme="dark"] .game-time-widget {
    color: var(--dark-text, #eef4ea);
    background:
        radial-gradient(circle at 15% 20%, rgba(116, 164, 103, 0.12), transparent 42%),
        linear-gradient(180deg, #222b24, #171e19);
    border-color: var(--dark-border-strong, rgba(225, 235, 223, 0.26));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

html[data-site-theme="dark"] .game-time-widget :is(small, .game-time-details span:last-child) {
    color: var(--dark-muted, #aeb9ae);
}

html[data-site-theme="dark"] .game-time-widget :is(strong, span) {
    color: inherit;
}

html[data-site-theme="dark"] .game-time-icon {
    color: #dce9d6;
    background: rgba(154, 196, 139, 0.12);
    border: 1px solid rgba(222, 235, 216, 0.1);
}

/* ========================================================================== 
   ClanGenRU v14.5.3: тёмная тема публичного профиля игрока
   ========================================================================== */

/* Страница player.html раньше оставляла светлый пергаментный контейнер и
   светлую карточку поверх тёмной темы. Из-за этого текст становился почти
   невидимым. Затемняем и оболочку страницы, и все внутренние элементы. */
html[data-site-theme="dark"] .public-profile-page {
    color: var(--dark-text, #e8efe5);
    background:
        radial-gradient(circle at 14% 8%, rgba(102, 147, 91, 0.13), transparent 34%),
        linear-gradient(180deg, #151d17, #0d130f);
    border: 1px solid var(--dark-border, rgba(222, 235, 216, 0.13));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

html[data-site-theme="dark"] .public-profile-card {
    color: var(--dark-text, #e8efe5);
    background:
        radial-gradient(circle at top left, rgba(111, 154, 98, 0.08), transparent 38%),
        linear-gradient(180deg, #222a23, #171e19);
    border-color: var(--dark-border-strong, rgba(225, 235, 223, 0.24));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
}

html[data-site-theme="dark"] :is(
    .public-profile-top,
    .public-profile-section
) {
    border-color: var(--dark-border, rgba(222, 235, 216, 0.13));
}

html[data-site-theme="dark"] .public-profile-card :is(
    h1, h2, h3,
    .profile-description,
    .public-profile-actions strong,
    .game-profile-row strong
) {
    color: var(--dark-heading, #f1f6ee);
}

html[data-site-theme="dark"] .public-profile-card :is(
    .muted,
    .public-profile-meta,
    small
) {
    color: var(--dark-muted, #aeb9ae);
}

html[data-site-theme="dark"] .public-profile-card :is(
    .public-achievement-chip,
    .special-merit-chip,
    .profile-medal,
    .player-state-label
) {
    color: #dfead9;
    background: rgba(143, 181, 130, 0.1);
    border-color: rgba(166, 199, 154, 0.22);
}

html[data-site-theme="dark"] .public-profile-card .profile-title-status {
    color: #dce8d6;
    background: rgba(139, 177, 126, 0.11);
    border-color: rgba(166, 199, 154, 0.24);
}

html[data-site-theme="dark"] .public-profile-card .game-profile-row {
    color: var(--dark-text, #e8efe5);
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--dark-border, rgba(222, 235, 216, 0.13));
}

html[data-site-theme="dark"] .public-profile-card .game-profile-row:hover {
    background: rgba(142, 184, 128, 0.09);
}

html[data-site-theme="dark"] .public-profile-card .player-name-link,
html[data-site-theme="dark"] .public-profile-card a:not(.forest-button):not(.danger-button) {
    color: #b9d6ad;
}

html[data-site-theme="dark"] .public-profile-card .public-profile-avatar.placeholder {
    color: #eef5ea;
    background: linear-gradient(145deg, #31553a, #1b3222);
    border: 1px solid rgba(185, 214, 173, 0.18);
}

html[data-site-theme="dark"] .public-profile-card .status-dot {
    box-shadow: 0 0 0 3px #202820;
}

html[data-site-theme="dark"] .public-profile-footer-actions {
    color: var(--dark-text, #e8efe5);
}
