:root {
    --bg: #060606;
    --bg-soft: #101010;
    --panel: rgba(19, 19, 19, 0.94);
    --panel-strong: #161616;
    --panel-border: rgba(255, 164, 72, 0.14);
    --text: #fff3e2;
    --muted: #c7ae91;
    --accent: #ff8a1c;
    --accent-strong: #ffb347;
    --accent-soft: rgba(255, 138, 28, 0.16);
    --blue-soft: rgba(255, 138, 28, 0.12);
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
    --radius: 18px;
}

/* Compact account settings */
.settings-page-clean {
    display: grid;
    gap: 18px;
}

.settings-clean-head {
    margin-bottom: 0;
}

.settings-clean-nav {
    margin: 0;
    gap: 8px;
}

.settings-clean-nav .settings-nav-link {
    min-height: 38px;
    padding: 8px 14px;
}

.settings-clean-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.settings-clean-card {
    padding: 16px;
}

.settings-primary-card {
    display: grid;
    gap: 14px;
}

.settings-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.settings-spoiler-stack {
    display: grid;
    gap: 10px;
}

.settings-section-spoiler {
    overflow: hidden;
}

.settings-section-spoiler.profile-panel {
    padding: 0;
}

.settings-section-spoiler > .bb-spoiler-summary {
    margin: 0;
    min-height: 48px;
    padding: 13px 16px;
    border-radius: inherit;
}

.settings-spoiler-body {
    display: grid;
    gap: 14px;
    padding: 14px 16px 16px;
}

.settings-section-spoiler:not([open]) {
    min-height: 0;
}

.settings-clean-actions {
    margin-top: 4px;
}

.settings-sidebar-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.settings-wallet-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 138, 28, 0.16);
    border-radius: 16px;
    background: rgba(255, 138, 28, 0.07);
}

.settings-wallet-strip strong {
    font-size: 1.2rem;
}

.settings-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.settings-mini-card {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    padding: 14px;
    border: 1px solid rgba(255, 138, 28, 0.13);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.settings-mini-card h3 {
    margin: 0;
    font-size: 1rem;
}

.settings-mini-card .profile-edit-form {
    display: grid;
    gap: 10px;
}

.settings-gift-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.settings-gift-grid .gift-shop-card {
    min-height: 0;
}

body.theme-blueanime .settings-wallet-strip,
body.theme-blueanime .settings-mini-card {
    border-color: rgba(125, 211, 252, 0.18);
    background: rgba(15, 23, 42, 0.56);
}

@media (min-width: 1100px) {
    .settings-clean-layout {
        grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
        align-items: start;
    }
}

@media (max-width: 720px) {
    .settings-clean-card {
        padding: 12px;
    }

    .settings-section-spoiler > .bb-spoiler-summary {
        min-height: 44px;
        padding: 11px 13px;
    }

    .settings-spoiler-body {
        padding: 12px;
    }
}

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 151, 54, 0.72) rgba(20, 20, 20, 0.62);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 151, 54, 0.72) rgba(20, 20, 20, 0.62);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.74), rgba(6, 6, 6, 0.88));
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    min-height: 42px;
    border: 2px solid rgba(6, 6, 6, 0.88);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 203, 127, 0.96), rgba(255, 137, 39, 0.94) 48%, rgba(178, 73, 20, 0.95));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 0 12px rgba(255, 137, 39, 0.22);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 221, 161, 1), rgba(255, 157, 67, 1) 50%, rgba(218, 90, 22, 1));
}

*::-webkit-scrollbar-corner {
    background: rgba(6, 6, 6, 0.92);
}

body.theme-blueanime {
    --bg: #e9f1fb;
    --bg-soft: #dbe6f4;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: #f7fbff;
    --panel-border: rgba(103, 146, 201, 0.22);
    --text: #17324d;
    --muted: #607997;
    --accent: #4f86c6;
    --accent-strong: #7cb3f0;
    --accent-soft: rgba(79, 134, 198, 0.14);
    --blue-soft: rgba(112, 167, 230, 0.16);
    --shadow: 0 18px 40px rgba(52, 86, 124, 0.14);
}

body.theme-blueanime {
    background:
        radial-gradient(circle at top left, rgba(124, 179, 240, 0.28), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 32%),
        linear-gradient(180deg, #eef5fc 0%, #e3edf8 100%);
    color: var(--text);
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 163, 255, 0.76) rgba(13, 23, 39, 0.72);
}

body.theme-blueanime,
body.theme-blueanime * {
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 163, 255, 0.76) rgba(13, 23, 39, 0.72);
}

body.theme-blueanime *::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(20, 34, 55, 0.76), rgba(8, 16, 30, 0.92));
}

body.theme-blueanime *::-webkit-scrollbar-thumb {
    border-color: rgba(8, 16, 30, 0.9);
    background: linear-gradient(180deg, rgba(151, 214, 255, 0.96), rgba(74, 163, 255, 0.94) 48%, rgba(39, 83, 166, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 14px rgba(74, 163, 255, 0.24);
}

body.theme-blueanime *::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(187, 229, 255, 1), rgba(105, 185, 255, 1) 48%, rgba(50, 111, 209, 1));
}

body.theme-blueanime *::-webkit-scrollbar-corner {
    background: rgba(8, 16, 30, 0.96);
}

body.theme-blueanime .profile-panel,
body.theme-blueanime .profile-card-block,
body.theme-blueanime .left-sidebar,
body.theme-blueanime .right-sidebar,
body.theme-blueanime .bottom-mobile-nav,
body.theme-blueanime .message-card,
body.theme-blueanime .chat-message,
body.theme-blueanime .news-card,
body.theme-blueanime .thread-post,
body.theme-blueanime .roleplay-card,
body.theme-blueanime .settings-nav-link,
body.theme-blueanime .empty-state {
    background: var(--panel);
    border-color: var(--panel-border);
    box-shadow: var(--shadow);
}

body.theme-blueanime .profile-legacy-head-rich,
body.theme-blueanime .character-game-hero,
body.theme-blueanime .roleplay-legacy-village,
body.theme-blueanime .roleplay-village-subsection-card,
body.theme-blueanime .roleplay-feature-card,
body.theme-blueanime .roleplay-map-shell,
body.theme-blueanime .messages-telegram-shell {
    background:
        radial-gradient(circle at top right, rgba(124, 179, 240, 0.22), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(221, 234, 248, 0.9)),
        var(--panel);
}

body.theme-blueanime a {
    color: #2f69ad;
}

body.theme-blueanime .button,
body.theme-blueanime button[type="submit"],
body.theme-blueanime input[type="submit"] {
    background: linear-gradient(135deg, #4f86c6, #74a9e7);
    color: #f8fcff;
    border-color: rgba(79, 134, 198, 0.4);
}

body.theme-blueanime .button-secondary,
body.theme-blueanime .news-links a,
body.theme-blueanime .settings-nav-link,
body.theme-blueanime .chat-page-link {
    background: rgba(255, 255, 255, 0.72);
    color: #244b74;
    border-color: rgba(103, 146, 201, 0.28);
}

body.theme-blueanime input,
body.theme-blueanime textarea,
body.theme-blueanime select {
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    border-color: rgba(103, 146, 201, 0.3);
}

body.theme-blueanime .user-online-dot {
    background: #54b483;
    box-shadow: 0 0 0 4px rgba(84, 180, 131, 0.14);
}

body.theme-blueanime .technique-stat-chip {
    border-color: rgba(74, 163, 255, 0.24);
    background:
        linear-gradient(135deg, rgba(74, 163, 255, 0.18), rgba(255, 255, 255, 0.04)),
        rgba(8, 16, 30, 0.42);
}

body.theme-blueanime .technique-stat-chip-code {
    color: #9fd6ff;
}

body.theme-blueanime .technique-stat-chip-level {
    background: rgba(74, 163, 255, 0.2);
    color: #d8f0ff;
}

body.theme-blueanime .character-card-stat {
    border-color: rgba(74, 163, 255, 0.24);
    background:
        linear-gradient(135deg, rgba(74, 163, 255, 0.18), rgba(255, 255, 255, 0.04)),
        rgba(8, 16, 30, 0.42);
}

body.theme-blueanime .character-card-stat-code {
    color: #9fd6ff;
}

body.theme-blueanime .character-card-stat-value {
    background: rgba(74, 163, 255, 0.2);
    color: #d8f0ff;
}

.left-sidebar,
.right-sidebar {
    overflow-y: auto;
    scrollbar-width: thin;
}

.profile-page-legacy {
    display: grid;
    gap: 22px;
}

.profile-legacy-head {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    align-items: center;
}

.profile-legacy-head-rich {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.22), transparent 28%),
        linear-gradient(135deg, rgba(255, 179, 71, 0.05), rgba(255, 255, 255, 0.02)),
        var(--panel);
}

.profile-legacy-head-rich::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 179, 71, 0.14), transparent 70%);
    pointer-events: none;
}

.profile-legacy-avatar {
    width: 140px;
    height: 140px;
    border-radius: 24px;
    object-fit: cover;
    border: 1px solid rgba(15, 92, 140, 0.14);
    box-shadow: 0 16px 36px rgba(15, 50, 80, 0.14);
}

.profile-legacy-copy {
    display: grid;
    gap: 12px;
}

.profile-nick-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-nick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 36%),
        rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 159, 67, 0.22);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.profile-nick-icon img {
    display: block;
    width: 27px;
    height: 27px;
    object-fit: contain;
}

.profile-nick-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-head-gifts {
    display: flex;
}

.profile-head-gifts-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.profile-head-gift-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.profile-head-gift-icon .gift-image {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    object-fit: cover;
}

.profile-head-gift-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 138, 28, 0.16);
    border: 1px solid rgba(255, 138, 28, 0.26);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
}

.profile-legacy-subtitle {
    margin: 0;
    color: var(--muted);
}

.profile-grid-legacy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.profile-info-item-wide {
    grid-column: 1 / -1;
}

.roleplay-page-legacy {
    display: grid;
    gap: 22px;
}

.roleplay-legacy-intro,
.roleplay-legacy-summary {
    display: grid;
    gap: 14px;
}

.roleplay-legacy-copy {
    margin: 0;
    line-height: 1.6;
    color: var(--muted);
}

.roleplay-legacy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.roleplay-legacy-item {
    border-radius: 18px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
}

.roleplay-legacy-item h3,
.roleplay-legacy-item p {
    margin: 0;
}

.roleplay-legacy-item h3 {
    margin-bottom: 8px;
}

.roleplay-legacy-villages {
    display: grid;
    gap: 18px;
}

.roleplay-legacy-village {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
}

.roleplay-legacy-village-active {
    box-shadow: 0 0 0 1px rgba(255, 138, 28, 0.24), var(--shadow);
}

.roleplay-legacy-village-image {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    border-radius: 18px;
}

.roleplay-legacy-village-copy {
    display: grid;
    gap: 14px;
}

.roleplay-village-subsection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.roleplay-village-subsection-card {
    position: relative;
    display: grid;
    gap: 10px;
    min-height: 126px;
    padding: 18px;
    border: 1px solid rgba(255, 138, 28, 0.10);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 138, 28, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        var(--panel);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.roleplay-village-subsection-card > span,
.roleplay-village-subsection-title {
    color: var(--text);
    font-size: clamp(1.08rem, 2vw, 1.35rem);
    font-weight: 900;
    line-height: 1.2;
}

.roleplay-village-subsection-card > span a,
.roleplay-village-subsection-title {
    color: inherit;
    text-decoration: none;
}

.roleplay-village-subsection-card > span a:hover,
.roleplay-village-subsection-title:hover {
    color: var(--accent);
}

.roleplay-village-subsection-image {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 16px;
}

.roleplay-village-subsection-body {
    display: grid;
    gap: 8px;
}

.roleplay-village-subsection-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.5;
}

.roleplay-village-subsection-actions {
    margin-top: auto;
}

.village-staff-head .news-links {
    justify-content: flex-end;
}

.village-staff-summary {
    display: grid;
    gap: 16px;
}

.village-staff-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.village-staff-inline-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.village-staff-resident-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.village-staff-resident-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(230, 126, 34, .26);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 248, 232, .92), rgba(255, 255, 255, .86));
    box-shadow: 0 16px 36px rgba(91, 54, 13, .12);
}

.village-staff-resident-avatar {
    width: 96px;
    height: 120px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(230, 126, 34, .28);
    background: rgba(255, 255, 255, .7);
}

.village-staff-resident-body {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.village-staff-resident-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.village-staff-resident-title h3 {
    margin: 0;
    min-width: 0;
    font-size: 20px;
}

.village-staff-resident-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin: 0;
}

.village-staff-resident-actions > button,
.village-staff-resident-actions > .button-secondary {
    min-height: 42px;
    white-space: nowrap;
}

.village-staff-log-list .profile-info-item {
    min-height: auto;
}

body.theme-blueanime .village-staff-resident-card {
    border-color: rgba(56, 189, 248, .28);
    background: linear-gradient(145deg, rgba(10, 21, 35, .96), rgba(14, 33, 52, .88));
    box-shadow: 0 18px 42px rgba(0, 0, 0, .32);
}

body.theme-blueanime .village-staff-resident-avatar {
    border-color: rgba(125, 211, 252, .25);
    background: rgba(2, 6, 23, .58);
}

body.theme-blueanime .village-staff-resident-title h3 {
    color: #e0f2fe;
}

@media (max-width: 720px) {
    .village-staff-inline-form,
    .village-staff-resident-actions {
        grid-template-columns: 1fr;
    }

    .village-staff-resident-card {
        grid-template-columns: 76px minmax(0, 1fr);
        padding: 12px;
    }

    .village-staff-resident-avatar {
        width: 76px;
        height: 96px;
    }
}

.settings-page .profile-grid {
    align-items: start;
}

.settings-admin-stack {
    display: grid;
    gap: 24px;
}

.admin-hub-page .profile-action-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.admin-hub-hero {
    background:
        radial-gradient(circle at 20% 0%, rgba(108, 211, 255, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(10, 24, 42, 0.96), rgba(12, 36, 58, 0.86));
}

.admin-hub-stack {
    margin-top: 18px;
}

.admin-hub-page .settings-admin-spoiler {
    padding: 0;
    overflow: hidden;
}

.admin-hub-page .settings-admin-spoiler > .bb-spoiler-summary {
    border-radius: inherit;
    margin: 0;
    padding: 16px 18px;
}

.admin-hub-page .settings-admin-spoiler > .profile-edit-form,
.admin-hub-page .settings-admin-spoiler > .settings-coin-help,
.admin-hub-page .settings-admin-spoiler > .comment-form-actions {
    padding: 18px;
}

.profile-preview-card {
    display: flex;
    gap: 18px;
    align-items: center;
}

.profile-preview-copy {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.profile-preview-copy h3,
.profile-preview-copy p {
    width: 100%;
    margin: 0;
}

.admin-mode-toggle-form {
    margin: 0;
}

.chat-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px;
}

.chat-pagination-bottom > .button-secondary,
.chat-pagination-bottom > .is-disabled {
    flex: 1 1 180px;
    text-align: center;
    justify-content: center;
}

.chat-pagination-top {
    justify-content: center;
}

.chat-pagination-bottom {
    margin: 18px 0 0;
}

.chat-page-nav-button {
    max-width: 220px;
}

.chat-pagination-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    flex: 2 1 420px;
}

.chat-pagination .is-disabled {
    pointer-events: none;
    opacity: 0.55;
}

.chat-pagination-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 6px;
}

.chat-page-link,
.chat-page-gap {
    min-width: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    background: rgba(255, 138, 28, 0.09);
    border: 1px solid rgba(255, 138, 28, 0.18);
    color: var(--text);
}

.chat-page-link.is-current {
    background: linear-gradient(135deg, #f49d37, #ffd17b);
    border-color: rgba(200, 120, 25, 0.45);
    color: #35230e;
    font-weight: 700;
}

.settings-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
}

.settings-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(15, 92, 140, 0.1);
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(15, 92, 140, 0.18);
}

.settings-coin-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 20px;
    margin-bottom: 22px;
}

.settings-coin-balance,
.settings-coin-feature {
    border-radius: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(15, 92, 140, 0.12);
    box-shadow: 0 14px 30px rgba(15, 50, 80, 0.08);
}

.settings-coin-balance strong {
    display: block;
    font-size: 32px;
    line-height: 1.1;
    margin: 10px 0 8px;
}

.settings-coin-upcoming {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.settings-coin-feature p,
.settings-coin-balance p,
.settings-coin-help p {
    margin: 0;
}

.settings-coin-feature.is-soon {
    background: linear-gradient(180deg, rgba(240, 248, 255, 0.9), rgba(225, 239, 247, 0.88));
}

.settings-coin-note {
    display: block;
    color: rgba(32, 52, 68, 0.72);
}

.gift-shop-card.is-unavailable {
    opacity: 0.78;
}

.settings-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.settings-gradient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.settings-color-option {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(15, 92, 140, 0.15);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.settings-color-option input {
    display: none;
}

.settings-color-option.is-active {
    box-shadow: 0 0 0 2px rgba(244, 157, 55, 0.3);
    border-color: rgba(244, 157, 55, 0.48);
}

.settings-color-swatch {
    width: 100%;
    height: 28px;
    border-radius: 999px;
}

.settings-color-name {
    font-weight: 700;
}

.user-chip-name-gradient {
    display: inline-block;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.profile-gifts-compact {
    margin-top: 18px;
}

.profile-gifts-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-gift-card-list {
    display: grid;
    gap: 14px;
}

.profile-gift-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-gift-card-cover {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.profile-gift-card-cover .gift-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-gift-card-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.profile-gift-card-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: baseline;
    justify-content: space-between;
}

.profile-gift-card-head strong {
    font-size: 1rem;
}

.profile-gift-card-head span,
.profile-gift-card-meta span {
    color: var(--muted);
    font-size: 0.88rem;
}

.profile-gift-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
}

.profile-gift-card-comment {
    margin: 0;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.profile-gifts-more {
    margin-top: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-gifts-more summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}

.profile-gifts-more summary::-webkit-details-marker {
    display: none;
}

.profile-gifts-more summary span {
    color: var(--muted);
    font-weight: 600;
}

.profile-gifts-more[open] {
    padding-bottom: 14px;
}

.profile-gifts-more[open] summary {
    margin-bottom: 8px;
}

.profile-gifts-more .profile-gift-card-list {
    padding: 0 14px;
}

.profile-gift-mini {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 92, 140, 0.12);
    box-shadow: 0 10px 20px rgba(15, 50, 80, 0.08);
}

.profile-gift-mini .gift-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.theme-blueanime .profile-gift-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(123, 182, 255, 0.16);
}

body.theme-blueanime .profile-gifts-more {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(123, 182, 255, 0.16);
}

.settings-coin-help {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(15, 92, 140, 0.08);
}

@media (max-width: 900px) {
    .settings-coin-hero {
        grid-template-columns: 1fr;
    }

    .settings-coin-upcoming {
        grid-template-columns: 1fr;
    }

    .chat-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .chat-pagination-status {
        order: -1;
    }

    .chat-pagination-top {
        margin-bottom: 14px;
    }

    .chat-pagination-bottom {
        flex-direction: row;
        gap: 10px;
        margin-top: 14px;
    }

    .chat-pagination-bottom > .button-secondary,
    .chat-pagination-bottom > .is-disabled {
        flex: 1 1 0;
        min-height: 38px;
        padding: 8px 12px;
        font-size: 0.9rem;
        border-radius: 14px;
    }

    .chat-page-nav-button {
        max-width: none;
    }
}

* {
    box-sizing: border-box;
}

html {
    background:
        radial-gradient(circle at top, rgba(255, 159, 67, 0.16), transparent 30%),
        radial-gradient(circle at right, rgba(94, 188, 255, 0.12), transparent 24%),
        var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 138, 28, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 179, 71, 0.12), transparent 24%),
        linear-gradient(180deg, #111111 0%, #090909 44%, #050505 100%);
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-strong);
}

.app-shell {
    min-height: 100vh;
    background: linear-gradient(180deg, rgba(255, 138, 28, 0.03), transparent 180px);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    backdrop-filter: blur(18px);
    background: rgba(8, 8, 8, 0.88);
    border-bottom: 1px solid rgba(255, 138, 28, 0.12);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 179, 71, 0.16), rgba(255, 138, 28, 0.08));
    border: 1px solid rgba(255, 138, 28, 0.24);
    box-shadow: 0 10px 28px rgba(255, 122, 24, 0.18);
    overflow: hidden;
}

.brand-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: #fff4e8;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.82rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--accent);
    font-size: 1.2rem;
    cursor: pointer;
}

.layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 260px;
    gap: 18px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    align-items: start;
}

.left-sidebar,
.right-sidebar,
.content {
    min-width: 0;
}

@media (min-width: 1101px) {
    .left-sidebar {
        grid-column: 1;
    }

    .content {
        grid-column: 2;
    }

    .right-sidebar {
        grid-column: 3;
    }
}

.left-sidebar,
.right-sidebar {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 151, 54, 0.72) rgba(20, 20, 20, 0.62);
}

.left-sidebar::-webkit-scrollbar,
.right-sidebar::-webkit-scrollbar {
    width: 8px;
}

.left-sidebar::-webkit-scrollbar-track,
.right-sidebar::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.74), rgba(6, 6, 6, 0.88));
}

.left-sidebar::-webkit-scrollbar-thumb,
.right-sidebar::-webkit-scrollbar-thumb {
    border: 2px solid rgba(6, 6, 6, 0.88);
    background: linear-gradient(180deg, rgba(255, 203, 127, 0.96), rgba(255, 137, 39, 0.94) 48%, rgba(178, 73, 20, 0.95));
    border-radius: 999px;
}

.content {
    padding: 8px 4px 120px;
}

.content > *:first-child {
    margin-top: 0;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    width: min(100% - 40px, 1120px);
    margin: 0 auto;
    padding: 6px 20px 28px;
    color: var(--muted);
    font-size: 0.86rem;
    text-align: center;
}

.site-footer a {
    color: var(--muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent);
}

.profile-card,
.character-card,
.news-item,
.news-full,
.post,
.chat-message,
.notification-item,
form,
table,
.village-card,
.subsection-card,
.thread-card {
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.profile-card,
.character-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 14px;
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 178, 103, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(10, 10, 10, 0.9);
}

.profile-card-featured,
.character-card-featured {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.22), transparent 34%),
        linear-gradient(145deg, rgba(255, 179, 71, 0.08), rgba(255, 255, 255, 0.02));
}

.profile-card-featured::after,
.character-card-featured::after {
    content: "";
    position: absolute;
    inset: auto -20% -35% auto;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 179, 71, 0.16), transparent 65%);
    pointer-events: none;
}

.profile-meta p,
.character-card p,
.sidebar-footer p {
    margin: 8px 0 0;
    color: var(--muted);
}

.sidebar-group {
    display: grid;
    gap: 10px;
}

.sidebar-section {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 138, 28, 0.12);
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 179, 71, 0.045), rgba(255, 255, 255, 0.02)),
        var(--panel);
    box-shadow: var(--shadow);
}

.sidebar-section:first-of-type {
    margin-top: 0;
}

.left-sidebar .profile-card,
.right-sidebar .character-card {
    margin-bottom: 0;
}

.sidebar-section-head {
    display: grid;
    gap: 4px;
}

.sidebar-section-head::after {
    content: none;
}

.sidebar-section-head h3 {
    margin: 0;
    font-size: 1rem;
}

.sidebar-section-kicker {
    color: var(--accent-strong);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-nav-grid {
    display: grid;
    gap: 10px;
}

.sidebar-link-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    text-decoration: none;
    background: linear-gradient(145deg, rgba(255, 188, 120, 0.05), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(255, 138, 28, 0.1);
    color: var(--text);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sidebar-link-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 159, 67, 0.28);
    background: linear-gradient(145deg, rgba(255, 159, 67, 0.14), rgba(255, 255, 255, 0.03));
    color: var(--text);
}

.sidebar-link-card.is-active {
    border-color: rgba(255, 159, 67, 0.4);
    background:
        radial-gradient(circle at right, rgba(255, 159, 67, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(255, 159, 67, 0.12), rgba(255, 255, 255, 0.03));
    box-shadow: 0 10px 28px rgba(255, 159, 67, 0.14);
}

.sidebar-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 138, 28, 0.1);
    color: var(--accent-strong);
    font-size: 1.1rem;
    border: 1px solid rgba(255, 138, 28, 0.14);
}

.sidebar-link-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.sidebar-link-copy strong {
    color: var(--text);
    font-size: 0.96rem;
}

.sidebar-link-copy small {
    color: var(--muted);
    font-size: 0.78rem;
}

.sidebar-stack {
    display: grid;
    gap: 8px;
}

.sidebar-stack-compact {
    gap: 6px;
}

.sidebar-stack-compact .sidebar-inline-link {
    min-height: 40px;
    padding: 10px 12px;
    font-size: 0.92rem;
}

.section-return-bar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 16px;
}

.section-return-link {
    min-width: 0;
}

.sidebar-inline-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 13px;
    border-radius: 14px;
    text-decoration: none;
    background: rgba(255, 138, 28, 0.045);
    border: 1px solid rgba(255, 138, 28, 0.1);
    color: var(--text);
}

.sidebar-inline-link:hover {
    background: rgba(255, 138, 28, 0.1);
    color: var(--accent-strong);
}

.sidebar-inline-link.is-active {
    border-color: rgba(255, 138, 28, 0.3);
    background: rgba(255, 138, 28, 0.14);
}

.sidebar-inline-danger {
    color: #ffb0a9;
}

.sidebar-inline-danger:hover {
    color: #ffd2ce;
    background: rgba(255, 107, 107, 0.12);
}

.admin-mode-toggle {
    width: 100%;
    cursor: pointer;
    text-align: left;
}

.admin-mode-toggle.is-active {
    border-color: rgba(255, 159, 67, 0.28);
    background: rgba(255, 159, 67, 0.12);
    color: #ffd296;
}

.admin-mode-active .topbar {
    box-shadow: 0 0 0 1px rgba(255, 159, 67, 0.24), var(--shadow);
}

.character-summary {
    display: flex;
    gap: 12px;
    align-items: center;
}

.character-card-sidebar {
    display: grid;
    gap: 14px;
}

.character-summary-sidebar {
    align-items: flex-start;
}

.character-summary-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 50%;
}

.character-summary-vitals {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffe8cc;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.35;
    background: rgba(12, 12, 12, 0.56);
    border: 1px solid rgba(255, 138, 28, 0.14);
}

.character-summary-copy {
    display: grid;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.character-summary-name {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
}

.character-summary-name:hover {
    color: var(--accent-strong);
}

.character-summary-meta {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.character-summary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.character-summary-actions .sidebar-inline-link {
    justify-content: center;
    text-align: center;
}

.character-summary-sidebar-clean {
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.20);
    border: 1px solid rgba(255, 138, 28, 0.12);
}

.character-summary-avatar-link {
    flex: 0 0 auto;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 16px !important;
}

.character-summary-actions-single {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-admin-mode-form {
    display: inline-flex;
    margin: 0;
}

.inline-admin-mode-form button {
    margin: 0;
}

.sidebar-group h3 {
    margin: 0 0 10px;
}

.left-sidebar a,
.right-sidebar a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    transition: 0.2s ease;
}

.left-sidebar a:hover,
.right-sidebar a:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
    transform: translateX(2px);
}

.right-sidebar .character-card-sidebar,
.right-sidebar .sidebar-section {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        var(--panel);
    border: 1px solid rgba(255, 138, 28, 0.14);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.right-sidebar .character-card-sidebar::before,
.right-sidebar .sidebar-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 166, 77, 0.08), transparent 34%, rgba(255, 255, 255, 0.02));
}

.right-sidebar .character-card-sidebar > *,
.right-sidebar .sidebar-section > * {
    position: relative;
    z-index: 1;
}

.right-sidebar .sidebar-section-head {
    gap: 6px;
}

.right-sidebar .sidebar-section-head h3 {
    font-size: 1.08rem;
}

.right-sidebar .sidebar-stack-compact {
    gap: 8px;
}

.right-sidebar .sidebar-inline-link {
    min-height: 44px;
    padding: 11px 13px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.035);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.right-sidebar .sidebar-inline-link:hover {
    transform: none;
    border-color: rgba(255, 138, 28, 0.24);
    background: rgba(255, 138, 28, 0.1);
}

.right-sidebar .sidebar-inline-link.is-active {
    border-color: rgba(255, 138, 28, 0.28);
    background: linear-gradient(180deg, rgba(255, 138, 28, 0.16), rgba(255, 255, 255, 0.04));
    color: #ffe2bf;
}

.donate-sidebar-section {
    border-color: rgba(255, 184, 77, 0.22);
}

.donate-widget-frame {
    --donate-widget-scale: 1;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 16px;
    background:
        radial-gradient(circle at top left, rgba(255, 184, 77, 0.16), transparent 38%),
        rgba(0, 0, 0, 0.18);
    height: calc(220px * var(--donate-widget-scale));
}

.donate-widget-frame iframe {
    display: block;
    width: 510px;
    height: 220px;
    border: 0;
    transform: scale(var(--donate-widget-scale));
    transform-origin: top left;
}

.donate-widget-frame-sidebar {
    --donate-widget-scale: 0.58;
}

.donate-widget-frame-home {
    width: 510px;
    max-width: 100%;
    margin: 0 auto;
}

.site-bottom-ad {
    width: 100%;
    max-width: 760px;
    min-height: 90px;
    margin: 28px auto 0;
    overflow: hidden;
    border-radius: 14px;
    background:
        radial-gradient(circle at top left, rgba(255, 184, 77, 0.12), transparent 40%),
        rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.site-bottom-ad:empty {
    display: none;
}

.site-bottom-ad > div {
    width: 510px;
    min-height: 220px;
    max-width: 100%;
    margin: 0 auto;
}

.site-bottom-ad-fullscreen {
    width: 0;
    max-width: 0;
    min-height: 0;
    height: 0;
    margin: 0;
    overflow: visible;
    border: 0;
    background: transparent;
}

.site-bottom-ad-fullscreen > div {
    width: 0;
    min-height: 0;
    height: 0;
}

.feed-inline-ad {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.feed-inline-ad-slot {
    width: 100%;
    min-height: 160px;
    overflow: hidden;
    border-radius: 12px;
}

.buzzplayer-1324342,
.buzzplayer-1324524 {
    display: block;
    width: 100%;
}

.buzzplayer-1324343 {
    display: block;
}

@media (max-width: 560px) {
    .donate-widget-frame-home {
        --donate-widget-scale: 0.72;
        width: 367px;
    }
}

@media (max-width: 420px) {
    .donate-widget-frame-home {
        --donate-widget-scale: 0.62;
        width: 316px;
    }
}

.character-summary-sidebar-clean {
    align-items: stretch;
    gap: 14px;
    padding: 14px;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 138, 28, 0.08), rgba(255, 255, 255, 0.03)),
        rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 138, 28, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.character-summary-sidebar-clean .character-summary-copy {
    gap: 12px;
}

.character-summary-sidebar-clean .character-summary-name {
    font-size: 1.04rem;
    font-weight: 800;
}

.right-sidebar .character-summary-name,
.right-sidebar .character-summary-avatar-link,
.right-sidebar .character-summary-meta a {
    display: inline-flex;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.right-sidebar .character-summary-name:hover,
.right-sidebar .character-summary-avatar-link:hover,
.right-sidebar .character-summary-meta a:hover {
    transform: none;
    background: transparent;
}

.character-summary-sidebar-clean .character-summary-meta {
    gap: 8px;
    font-size: 0.88rem;
}

.character-summary-sidebar-clean .character-summary-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.character-summary-sidebar-clean .character-summary-vitals {
    background: rgba(0, 0, 0, 0.34);
    border-color: rgba(255, 138, 28, 0.18);
    color: #fff0dd;
}

.character-summary-sidebar-clean .character-summary-actions {
    gap: 10px;
}

.character-summary-sidebar-clean .character-summary-actions .sidebar-inline-link {
    min-height: 42px;
}

.character-card-sidebar > .character-summary-sidebar-clean {
    display: none;
}

.character-card-sidebar > .character-sidebar-panel,
.character-card-sidebar > .character-summary-actions-single {
    display: none;
}

.character-sidebar-spoiler {
    display: grid;
    gap: 12px;
    width: 100%;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 138, 28, 0.14);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 138, 28, 0.08), rgba(255, 255, 255, 0.03)),
        rgba(0, 0, 0, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.character-sidebar-spoiler summary {
    list-style: none;
}

.character-sidebar-spoiler summary::-webkit-details-marker {
    display: none;
}

.character-sidebar-spoiler-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    border-radius: inherit;
    padding: 14px 16px;
    cursor: pointer;
}

.character-sidebar-spoiler-title {
    min-width: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.character-sidebar-spoiler-arrow {
    width: 12px;
    height: 12px;
    border-right: 2px solid rgba(255, 232, 203, 0.9);
    border-bottom: 2px solid rgba(255, 232, 203, 0.9);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

.character-sidebar-spoiler[open] .character-sidebar-spoiler-arrow {
    transform: rotate(225deg);
}

.character-sidebar-spoiler-body {
    display: grid;
    gap: 14px;
    padding: 0 16px 16px;
}

.character-sidebar-panel {
    display: grid;
    gap: 14px;
    justify-items: center;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.character-sidebar-avatar-link {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    align-self: center;
    width: fit-content;
    max-width: 108px;
    flex: 0 0 auto;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.character-sidebar-avatar-link:hover {
    transform: none !important;
    background: transparent !important;
}

.character-sidebar-avatar-shell {
    position: relative;
    display: grid;
    place-items: center;
    width: 108px;
    height: 108px;
    min-width: 108px;
    min-height: 108px;
    max-width: 108px;
    max-height: 108px;
    flex: 0 0 108px;
    aspect-ratio: 1 / 1;
    padding: 6px;
    border-radius: 50%;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.1), transparent 55%),
        linear-gradient(145deg, rgba(255, 138, 28, 0.22), rgba(255, 255, 255, 0.04));
    box-shadow: inset 0 0 0 1px rgba(255, 138, 28, 0.18);
}

.character-sidebar-avatar {
    position: absolute;
    inset: 6px;
    width: calc(100% - 12px) !important;
    height: calc(100% - 12px) !important;
    min-width: 0;
    max-width: none;
    max-height: none;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block;
    flex: 0 0 auto;
}

.character-sidebar-copy {
    display: grid;
    gap: 12px;
    width: 100%;
    justify-items: center;
    text-align: center;
}

.character-sidebar-copy .character-summary-name {
    justify-content: center;
    font-size: 1.04rem;
    font-weight: 800;
}

.character-sidebar-rank-card {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.character-sidebar-rank-icon {
    height: 52px;
    max-width: 116px;
}

.character-sidebar-rank-card span {
    color: #fff2e0;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
}

.character-sidebar-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.character-sidebar-meta-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.character-sidebar-stats {
    display: grid;
    gap: 10px;
    width: 100%;
}

.character-sidebar-stat {
    display: grid;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.character-sidebar-stat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.character-sidebar-stat-head span {
    color: #ffcf9b;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.character-sidebar-stat-head strong {
    color: #fff2e0;
    font-size: 0.84rem;
    line-height: 1.3;
}

.character-sidebar-stat-bar {
    position: relative;
    display: block;
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.character-sidebar-stat-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.character-sidebar-stat-bar-life > span {
    background: linear-gradient(90deg, #ff8f7a 0%, #ff5f5f 100%);
    box-shadow: 0 0 16px rgba(255, 95, 95, 0.24);
}

.character-sidebar-stat-bar-chakra > span {
    background: linear-gradient(90deg, #68d8ff 0%, #2aa1ff 100%);
    box-shadow: 0 0 16px rgba(42, 161, 255, 0.22);
}

.character-game-sheet .profile-panel {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        var(--panel);
    border: 1px solid rgba(255, 138, 28, 0.14);
}

.character-game-sheet .profile-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 166, 77, 0.08), transparent 34%, rgba(255, 255, 255, 0.02));
}

.character-game-sheet .profile-panel > * {
    position: relative;
    z-index: 1;
}

.character-game-hero {
    padding: 24px;
    align-items: stretch;
}

.character-game-main {
    gap: 14px;
}

.character-game-main .profile-badges {
    gap: 10px;
}

.character-game-main .profile-badge {
    min-height: 30px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #ffe1ba;
}

.character-level-progress {
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 138, 28, 0.12);
}

.character-level-progress div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.character-level-progress strong {
    color: #ffe3bf;
}

.character-game-grid,
.character-inventory-grid,
.character-battle-grid {
    gap: 14px;
}

.character-game-field,
.character-stat-bar,
.character-battle-card,
.character-mission-rank {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.14);
}

.character-game-field {
    min-height: 82px;
    padding: 15px;
}

.character-game-field span:first-child {
    color: #ffcf9b;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.character-game-field strong {
    font-size: 1rem;
    line-height: 1.45;
}

.character-game-field strong a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.character-rank-block {
    gap: 8px;
}

.character-rank-block span {
    color: #fff2e0;
    font-weight: 700;
}

.character-game-traits {
    gap: 16px;
}

.character-equipment-inline {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 138, 28, 0.12);
}

.character-game-sheet .profile-toolbar {
    gap: 10px;
}

.character-game-sheet .profile-toolbar .button-secondary,
.character-game-sheet .profile-toolbar .button {
    min-height: 42px;
    border-radius: 16px;
}

.small-avatar {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-link {
    display: inline-block;
    margin-bottom: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 700;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(94, 188, 255, 0.14);
    color: #8fd7ff;
    font-size: 0.84rem;
}

.page-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 11, 16, 0.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 70;
}

.page-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu {
    display: none;
}

body.menu-open .mobile-menu {
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
}

.mobile-menu-item {
    text-decoration: none;
}

.mobile-menu-item.is-active {
    background: linear-gradient(145deg, rgba(255, 159, 67, 0.18), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 159, 67, 0.28);
    box-shadow: 0 10px 24px rgba(255, 159, 67, 0.12);
}

.mobile-menu-icon {
    font-size: 1rem;
    line-height: 1;
    color: var(--accent-strong);
}

.mobile-menu-label {
    font-size: 0.72rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 10px 0;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--accent);
}

input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    place-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    margin: 0 8px 0 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.14), transparent 32%),
        rgba(255, 255, 255, 0.055);
    box-shadow: inset 0 0 0 3px rgba(10, 12, 18, 0.86);
    cursor: pointer;
    flex: 0 0 auto;
    vertical-align: middle;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input[type="checkbox"]::before {
    content: "\2713";
    display: grid;
    place-items: center;
    width: 15px;
    height: 15px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffd17a, var(--accent));
    color: #120902;
    font-size: 0.75rem;
    font-weight: 900;
    line-height: 1;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.16s ease, opacity 0.16s ease;
}

input[type="checkbox"]:checked {
    border-color: rgba(255, 188, 105, 0.88);
    background: linear-gradient(135deg, rgba(255, 138, 28, 0.36), rgba(255, 199, 112, 0.13));
    box-shadow: 0 0 0 3px rgba(255, 138, 28, 0.18), inset 0 0 0 3px rgba(10, 12, 18, 0.62);
}

input[type="checkbox"]:checked::before {
    transform: scale(1);
    opacity: 1;
}

input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(255, 188, 105, 0.7);
    outline-offset: 3px;
}

input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.checkbox-field,
.settings-checkbox,
.checkbox-group label {
    position: relative;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.checkbox-field input[type="checkbox"],
.settings-checkbox input[type="checkbox"],
.checkbox-group input[type="checkbox"],
.profile-badge input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-field > span,
.settings-checkbox > span,
.checkbox-group label {
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 999px;
}

.checkbox-field > span,
.settings-checkbox > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
}

.checkbox-field > span::before,
.settings-checkbox > span::before,
.checkbox-group label::before {
    content: "";
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: inset 0 0 0 3px rgba(10, 12, 18, 0.85);
    color: #120902;
    display: grid;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
    place-items: center;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.checkbox-field:has(input[type="checkbox"]:checked) > span,
.settings-checkbox:has(input[type="checkbox"]:checked) > span,
.checkbox-group label:has(input[type="checkbox"]:checked) {
    border-color: rgba(255, 188, 105, 0.78);
    background: linear-gradient(135deg, rgba(255, 138, 28, 0.32), rgba(255, 199, 112, 0.11));
    color: #fff2dc;
    box-shadow: 0 0 0 1px rgba(255, 138, 28, 0.28) inset, 0 10px 24px rgba(255, 138, 28, 0.13);
}

.checkbox-field:has(input[type="checkbox"]:checked) > span::before,
.settings-checkbox:has(input[type="checkbox"]:checked) > span::before,
.checkbox-group label:has(input[type="checkbox"]:checked)::before {
    content: "\2713";
    border-color: rgba(255, 188, 105, 0.9);
    background: linear-gradient(135deg, #ffd17a, var(--accent));
    box-shadow: 0 0 0 3px rgba(255, 138, 28, 0.22), 0 0 16px rgba(255, 138, 28, 0.36);
}

input,
textarea,
select,
button {
    font: inherit;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

button,
.button,
.button-secondary,
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid rgba(255, 191, 105, 0.22);
    border-radius: 999px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 55%),
        linear-gradient(135deg, #ffb35c, #ff8a53 62%, #ff6f61);
    color: #181818;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    box-shadow:
        0 12px 28px rgba(255, 138, 83, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        filter 0.18s ease,
        background 0.18s ease;
}

.button,
button {
    border: 1px solid rgba(255, 191, 105, 0.22);
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 55%),
        linear-gradient(135deg, #ffb35c, #ff8a53 62%, #ff6f61);
    color: #181818;
    box-shadow:
        0 12px 28px rgba(255, 138, 83, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.button-secondary {
    border: 1px solid rgba(255, 179, 71, 0.26);
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 55%),
        linear-gradient(135deg, rgba(60, 38, 18, 0.96), rgba(94, 52, 12, 0.97) 60%, rgba(132, 67, 0, 0.98));
    color: #ffe8cb;
    box-shadow:
        0 12px 28px rgba(255, 138, 28, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.profile-legacy-head .profile-legacy-avatar {
    padding: 4px;
    background:
        linear-gradient(var(--panel), var(--panel)) padding-box,
        conic-gradient(var(--accent) var(--rating-progress, 0%), rgba(255, 255, 255, 0.13) 0) border-box;
    border: 4px solid transparent;
    box-shadow: 0 0 0 1px rgba(255, 138, 28, 0.18), 0 20px 36px rgba(0, 0, 0, 0.34);
}

button:hover,
.button:hover,
.button-secondary:hover,
.news-like-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

button:active,
.button:active,
.button-secondary:active,
.news-like-button:active {
    transform: translateY(0);
}

button:focus-visible,
.button:focus-visible,
.button-secondary:focus-visible,
.news-like-button:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(255, 179, 71, 0.22),
        0 12px 28px rgba(255, 138, 28, 0.2);
}

.news-item,
.news-full,
.post,
.chat-message,
form,
table {
    background: var(--panel);
    border-radius: var(--radius);
}

.home-hero,
.news-article-card,
.comments-card,
.empty-state {
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    background: var(--panel);
    border-radius: 24px;
}

.profile-page,
.character-page {
    display: grid;
    gap: 18px;
}

.profile-hero-card,
.profile-card-block,
.character-search-card,
.character-profile-card,
.character-category-card,
.character-modern-card {
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    background: var(--panel);
    border-radius: 24px;
}

.profile-page-modern {
    gap: 22px;
}

.profile-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    gap: 18px;
}

.profile-showcase-main,
.profile-showcase-side {
    min-width: 0;
}

.profile-showcase-main {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255, 159, 67, 0.16), transparent 30%),
        radial-gradient(circle at left, rgba(94, 188, 255, 0.14), transparent 24%),
        var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.profile-showcase-side {
    display: grid;
    gap: 14px;
}

.profile-portrait-wrap {
    position: relative;
    flex: 0 0 auto;
}

.profile-ring {
    position: absolute;
    inset: -10px;
    border-radius: 34px;
    border: 1px solid rgba(255, 159, 67, 0.22);
    pointer-events: none;
}

.profile-hero-avatar-large {
    width: 136px;
    height: 136px;
    border-radius: 30px;
}

.profile-subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.profile-separator {
    display: inline-block;
    margin: 0 8px;
}

.profile-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.profile-hero-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(255, 159, 67, 0.16), transparent 28%),
        radial-gradient(circle at left, rgba(94, 188, 255, 0.14), transparent 25%),
        var(--panel);
}

.profile-hero-main {
    display: flex;
    gap: 18px;
    align-items: center;
}

.profile-hero-avatar,
.profile-character-image,
.character-profile-image,
.character-modern-image,
.gift-image {
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.character-compact-image,
.character-sheet-cover,
.character-game-avatar,
.character-modern-card .character-modern-image,
.character-summary-avatar,
.thread-post-character img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center center;
    display: block;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 12%, rgba(255, 138, 28, 0.12), transparent 42%),
        rgba(255, 255, 255, 0.04);
}

.technique-image,
.rank-image,
.category-image,
.village-image,
.subsection-image {
    width: 100px;
    height: 100px;
    min-width: 100px;
    object-fit: cover;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.image-preview-inline {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-hero-avatar {
    width: 120px;
    height: 120px;
    border-radius: 28px;
}

.profile-hero-meta h1 {
    margin: 8px 0;
}

.profile-hero-text {
    margin: 10px 0 0;
    color: var(--muted);
}

.profile-hero-side {
    min-width: 260px;
}

.profile-progress-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 138, 28, 0.045);
    border: 1px solid rgba(255, 138, 28, 0.1);
}

.profile-progress-card-featured {
    min-height: 100%;
    background:
        linear-gradient(145deg, rgba(255, 179, 71, 0.06), rgba(255, 255, 255, 0.03)),
        rgba(255, 255, 255, 0.03);
}

.profile-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.profile-progress-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 138, 28, 0.08);
    overflow: hidden;
}

.profile-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff9f43, #ff7b54);
}

.profile-progress-card p {
    margin: 10px 0 0;
    color: var(--muted);
}

.profile-badges,
.profile-trait-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 138, 28, 0.08);
    color: var(--text);
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    text-align: center;
    border: 1px solid rgba(255, 138, 28, 0.1);
}

.profile-badge-role {
    background: rgba(255, 159, 67, 0.16);
    color: var(--accent-strong);
}

.profile-badge-level {
    background: rgba(255, 138, 28, 0.16);
    color: #ffd39b;
}

.badge-free {
    background: rgba(80, 200, 120, 0.14);
    color: #86efac;
}

.badge-busy {
    background: rgba(255, 107, 107, 0.16);
    color: #ffb0a9;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.profile-grid-modern {
    align-items: start;
}

.profile-card-block,
.character-search-card,
.character-profile-card {
    padding: 20px;
}

.profile-panel {
    border-radius: 26px;
}

.profile-info-list {
    display: grid;
    gap: 12px;
}

.profile-info-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 138, 28, 0.04);
    border: 1px solid rgba(255, 138, 28, 0.08);
}

.profile-info-item span {
    color: var(--muted);
    font-size: 0.82rem;
}

.profile-info-item .roleplay-thread-title {
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 800;
    color: var(--text);
}

.profile-info-item .roleplay-thread-title a {
    color: inherit;
    text-decoration: none;
}

.profile-info-item .roleplay-thread-title a:hover {
    color: var(--accent);
}

.profile-info-item small {
    color: var(--muted);
    line-height: 1.5;
}

.profile-action-grid,
.gift-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.gift-grid-modern {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gift-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.gift-image {
    width: 100%;
    height: 160px;
    border-radius: 18px;
}

.gift-card-modern {
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
        rgba(255, 255, 255, 0.03);
}

.gift-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.profile-character-preview,
.character-profile-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.profile-character-image,
.character-profile-image {
    width: 180px;
    height: 220px;
    border-radius: 24px;
}

.profile-character-preview-modern {
    align-items: stretch;
}

.profile-character-copy,
.character-profile-copy,
.comment-body {
    min-width: 0;
}

.profile-character-copy h3,
.profile-preview-copy h3 {
    margin-top: 0;
}

.profile-mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profile-mini-stat,
.profile-preview-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-mini-stat strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.profile-mini-stat span,
.profile-preview-copy p {
    color: var(--muted);
}

.profile-preview-card {
    display: flex;
    gap: 14px;
    align-items: center;
}

.profile-preview-copy {
    display: grid;
    gap: 8px;
}

.profile-edit-form {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-field {
    display: grid;
    gap: 8px;
}

.profile-field:has(> input[type="hidden"][name^="base_stat_"]) {
    display: none;
}

.profile-field span {
    color: var(--muted);
    font-size: 0.86rem;
}

.profile-field-wide {
    grid-column: 1 / -1;
}

.character-selection-editor-form .checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.character-selection-editor-form .checkbox-tile {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 56px;
    gap: 10px;
    padding: 12px 14px 12px 48px;
    border: 1px solid rgba(255, 168, 74, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
        rgba(7, 7, 7, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.character-selection-editor-form .checkbox-tile:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 179, 71, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 24px rgba(0, 0, 0, 0.18);
}

.character-selection-editor-form .checkbox-tile::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 179, 71, 0.46);
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.24);
    transform: translateY(-50%);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.character-selection-editor-form .checkbox-tile::after {
    content: "";
    position: absolute;
    left: 23px;
    top: 50%;
    width: 6px;
    height: 11px;
    border: solid #1b1007;
    border-width: 0 2px 2px 0;
    opacity: 0;
    transform: translateY(-58%) rotate(45deg) scale(0.72);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.character-selection-editor-form .checkbox-tile input[type="checkbox"] {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 24px;
    height: 24px;
    margin: 0;
    opacity: 0;
    transform: translateY(-50%);
    cursor: pointer;
}

.character-selection-editor-form .checkbox-tile img {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    object-fit: cover;
    border-radius: 12px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.character-selection-editor-form .checkbox-tile span {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.25;
}

.character-selection-editor-form .checkbox-tile:has(input[type="checkbox"]:checked) {
    border-color: rgba(255, 179, 71, 0.72);
    background:
        radial-gradient(circle at top right, rgba(255, 179, 71, 0.28), transparent 38%),
        linear-gradient(135deg, rgba(255, 138, 28, 0.22), rgba(255, 255, 255, 0.035));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 12px 28px rgba(255, 138, 28, 0.12);
}

.character-selection-editor-form .checkbox-tile:has(input[type="checkbox"]:checked)::before {
    border-color: var(--accent-strong);
    background: linear-gradient(135deg, #ffe0a8, var(--accent));
    box-shadow: 0 0 18px rgba(255, 138, 28, 0.38);
}

.character-selection-editor-form .checkbox-tile:has(input[type="checkbox"]:checked)::after {
    opacity: 1;
    transform: translateY(-58%) rotate(45deg) scale(1);
}

.character-selection-editor-form .checkbox-tile:has(input[type="checkbox"]:focus-visible) {
    outline: 2px solid var(--accent-strong);
    outline-offset: 3px;
}

body.theme-blueanime .character-selection-editor-form .checkbox-tile {
    border-color: rgba(124, 179, 240, 0.22);
    background:
        linear-gradient(135deg, rgba(124, 179, 240, 0.09), rgba(255, 255, 255, 0.025)),
        rgba(6, 17, 31, 0.38);
}

body.theme-blueanime .character-selection-editor-form .checkbox-tile::before {
    border-color: rgba(124, 179, 240, 0.58);
    background: rgba(5, 17, 32, 0.44);
}

body.theme-blueanime .character-selection-editor-form .checkbox-tile::after {
    border-color: #071421;
}

body.theme-blueanime .character-selection-editor-form .checkbox-tile:hover,
body.theme-blueanime .character-selection-editor-form .checkbox-tile:has(input[type="checkbox"]:checked) {
    border-color: rgba(124, 179, 240, 0.76);
    background:
        radial-gradient(circle at top right, rgba(124, 179, 240, 0.28), transparent 38%),
        linear-gradient(135deg, rgba(42, 101, 174, 0.24), rgba(255, 255, 255, 0.035));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 28px rgba(38, 103, 184, 0.16);
}

body.theme-blueanime .character-selection-editor-form .checkbox-tile:has(input[type="checkbox"]:checked)::before {
    background: linear-gradient(135deg, #bfe5ff, var(--accent));
    box-shadow: 0 0 18px rgba(74, 163, 255, 0.34);
}

.village-editor-form .village-checkbox-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 76px;
    padding: 16px 18px 16px 72px;
    border: 1px solid rgba(255, 168, 74, 0.2);
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(255, 179, 71, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
    cursor: pointer;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.village-editor-form .village-checkbox-tile:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 179, 71, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 14px 28px rgba(0, 0, 0, 0.2);
}

.village-editor-form .village-checkbox-tile input[type="checkbox"] {
    position: absolute;
    left: 19px;
    top: 50%;
    width: 36px;
    height: 36px;
    margin: 0;
    opacity: 0;
    transform: translateY(-50%);
    cursor: pointer;
}

.village-editor-form .village-checkbox-mark {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 38px;
    height: 38px;
    border: 2px solid rgba(255, 179, 71, 0.48);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.26);
    transform: translateY(-50%);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.village-editor-form .village-checkbox-mark::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 7px;
    width: 9px;
    height: 17px;
    border: solid #1b1007;
    border-width: 0 3px 3px 0;
    opacity: 0;
    transform: rotate(45deg) scale(0.74);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.village-editor-form .village-checkbox-copy {
    display: grid;
    gap: 4px;
}

.village-editor-form .village-checkbox-copy strong {
    color: var(--text);
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.village-editor-form .village-checkbox-copy small {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.village-editor-form .village-checkbox-tile:has(input[type="checkbox"]:checked) {
    border-color: rgba(255, 179, 71, 0.72);
    background:
        radial-gradient(circle at top right, rgba(255, 179, 71, 0.26), transparent 35%),
        linear-gradient(135deg, rgba(255, 138, 28, 0.2), rgba(255, 255, 255, 0.04));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 30px rgba(255, 138, 28, 0.12);
}

.village-editor-form .village-checkbox-tile:has(input[type="checkbox"]:checked) .village-checkbox-mark {
    border-color: var(--accent-strong);
    background: linear-gradient(135deg, #ffe0a8, var(--accent));
    box-shadow: 0 0 18px rgba(255, 138, 28, 0.36);
}

.village-editor-form .village-checkbox-tile:has(input[type="checkbox"]:checked) .village-checkbox-mark::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

.village-editor-form .village-checkbox-tile:has(input[type="checkbox"]:focus-visible) {
    outline: 2px solid var(--accent-strong);
    outline-offset: 3px;
}

body.theme-blueanime .village-editor-form .village-checkbox-tile {
    border-color: rgba(124, 179, 240, 0.24);
    background:
        radial-gradient(circle at top left, rgba(124, 179, 240, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(124, 179, 240, 0.1), rgba(255, 255, 255, 0.025));
}

body.theme-blueanime .village-editor-form .village-checkbox-mark {
    border-color: rgba(124, 179, 240, 0.58);
    background: rgba(5, 17, 32, 0.44);
}

body.theme-blueanime .village-editor-form .village-checkbox-mark::after {
    border-color: #071421;
}

body.theme-blueanime .village-editor-form .village-checkbox-tile:hover,
body.theme-blueanime .village-editor-form .village-checkbox-tile:has(input[type="checkbox"]:checked) {
    border-color: rgba(124, 179, 240, 0.78);
    background:
        radial-gradient(circle at top right, rgba(124, 179, 240, 0.28), transparent 35%),
        linear-gradient(135deg, rgba(42, 101, 174, 0.22), rgba(255, 255, 255, 0.035));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 30px rgba(38, 103, 184, 0.16);
}

body.theme-blueanime .village-editor-form .village-checkbox-tile:has(input[type="checkbox"]:checked) .village-checkbox-mark {
    background: linear-gradient(135deg, #bfe5ff, var(--accent));
    box-shadow: 0 0 18px rgba(74, 163, 255, 0.34);
}

.profile-subsection-head {
    margin-top: 14px;
 }

.character-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.character-category-grid,
.character-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.character-grid-wide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.character-category-card,
.character-modern-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    text-decoration: none;
    color: var(--text);
}

.character-category-card:hover,
.character-modern-card:hover {
    transform: translateY(-1px);
}

.character-category-card-link {
    display: grid;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.character-category-head,
.character-modern-top {
    display: grid;
    gap: 8px;
}

.character-category-head h3,
.character-modern-top h3 {
    margin: 0;
}

.character-category-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

.character-modern-image {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 50%;
}

.character-modern-body {
    display: grid;
    gap: 12px;
    align-content: start;
}

.character-modern-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.technique-card-modern h2 {
    margin: 6px 0 0;
}

.technique-description {
    padding: 14px 16px;
    border: 1px solid rgba(255, 138, 28, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    line-height: 1.65;
    white-space: normal;
}

.technique-school-page {
    display: grid;
    gap: 20px;
}

.technique-school-hero {
    background:
        radial-gradient(circle at top right, rgba(94, 188, 255, 0.16), transparent 28%),
        radial-gradient(circle at left, rgba(255, 159, 67, 0.14), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
        var(--panel);
}

.technique-school-head {
    margin-bottom: 0;
}

.technique-school-head h1 {
    margin-bottom: 8px;
}

.technique-school-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.technique-school-grid {
    align-items: stretch;
}

.technique-rank-card {
    min-height: 100%;
}

.technique-rank-image {
    min-height: 220px;
    object-position: center;
}

.technique-rank-body {
    gap: 16px;
}

.technique-card-link {
    color: var(--text);
    text-decoration: none;
}

.technique-card-link:hover {
    color: var(--accent-soft);
}

.technique-card-actions {
    margin-top: auto;
}

.character-modern-card-rich {
    height: 100%;
    grid-template-rows: auto 1fr;
    border-radius: 24px;
    border: 1px solid var(--panel-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        var(--panel);
    box-shadow: var(--shadow);
    justify-items: center;
    text-align: center;
}

.character-modern-card-rich .character-modern-image {
    width: 176px;
    height: 176px;
    object-fit: cover;
}

.character-occupied-label,
.character-description {
    color: var(--muted);
}

.character-modern-body .profile-badges,
.character-modern-top .profile-badges {
    justify-content: center;
}

.character-occupied-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 138, 28, 0.12);
    line-height: 1.4;
}

.character-description {
    min-height: 64px;
}

.character-params-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.character-spoiler {
    display: grid;
    gap: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 14px;
}

.character-spoiler summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: var(--accent-strong);
}

.character-spoiler summary::-webkit-details-marker {
    display: none;
}

.character-spoiler[open] summary {
    margin-bottom: 4px;
}

.character-params {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.character-param {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.character-param span {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.character-param strong {
    font-size: 0.94rem;
    line-height: 1.45;
}

.thread-page {
    display: grid;
    gap: 20px;
}

.thread-hero,
.thread-moderation-card,
.thread-compose-card,
.thread-post-card {
    border-radius: 24px;
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        var(--panel);
}

.thread-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    background:
        radial-gradient(circle at right top, rgba(255, 138, 28, 0.18), transparent 24%),
        radial-gradient(circle at left bottom, rgba(255, 159, 67, 0.14), transparent 28%),
        var(--panel);
}

.thread-hero-copy {
    display: grid;
    gap: 12px;
    max-width: 860px;
}

.thread-hero-copy p,
.thread-progress-card p,
.thread-moderation-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.thread-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.thread-progress-card {
    min-width: 280px;
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 179, 71, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 138, 28, 0.12);
}

.thread-progress-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.thread-moderation-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    align-items: center;
}

.thread-page .profile-panel,
.npc-admin-page .profile-panel {
    position: relative;
    overflow: hidden;
}

.thread-page .profile-panel::before,
.npc-admin-page .profile-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(255, 159, 67, 0.08), transparent 30%);
}

.thread-progress-card,
.thread-moderation-card,
.thread-compose-card {
    border: 1px solid rgba(255, 159, 67, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 159, 67, 0.06), rgba(255, 255, 255, 0.025)),
        rgba(15, 16, 21, 0.86);
}

.thread-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.thread-npc-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 159, 67, 0.09), rgba(255, 255, 255, 0.03)),
        rgba(15, 16, 21, 0.84);
    border: 1px solid rgba(255, 159, 67, 0.14);
}

.thread-npc-card > span:first-child {
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
}

.thread-npc-card > strong {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.thread-npc-card .thread-compose-form {
    gap: 12px;
}

.thread-npc-card textarea {
    min-height: 110px;
}

.thread-moderation-actions,
.thread-compose-actions,
.thread-post-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.thread-post-list {
    display: grid;
    gap: 16px;
}

.thread-post-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
}

.thread-post-aside {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255, 138, 28, 0.08), rgba(255, 255, 255, 0.02));
    border-right: 1px solid rgba(255, 138, 28, 0.1);
}

.thread-post-aside .thread-post-character-card {
    grid-template-columns: 1fr;
    margin: 0;
    padding: 10px;
    border-radius: 18px;
}

.thread-post-body > .thread-post-character-card {
    display: none;
}

.thread-post-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.thread-post-author {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.thread-post-meta-line {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.thread-post-character-card {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 138, 28, 0.13), rgba(255, 255, 255, 0.035)),
        rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 138, 28, 0.16);
}

.thread-post-character {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    min-width: 0;
    text-align: center;
}

.thread-post-character-avatar {
    display: grid;
    place-items: center;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    padding: 6px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.1), transparent 55%),
        linear-gradient(180deg, rgba(255, 138, 28, 0.16), rgba(0, 0, 0, 0.24));
    border: 1px solid rgba(255, 138, 28, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.16);
}

.thread-post-character img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center center;
}

.thread-post-character > span:last-child {
    min-width: 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
    white-space: normal;
    line-height: 1.25;
}

.thread-post-character-meta {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.thread-post-rank-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 138, 28, 0.10);
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.3;
    min-width: 0;
}

.thread-post-rank-card span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.thread-post-rank-card-large {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 8px;
    padding: 10px 12px;
}

.thread-post-rank-card-large .character-rank-icon-small {
    height: 56px;
    width: auto;
}

.thread-post-rank-card-large span {
    line-height: 1.25;
}

.thread-post-meta-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-align: center;
}

.thread-post-stats {
    display: grid;
    gap: 8px;
}

.thread-post-stat {
    display: grid;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.thread-post-stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.76rem;
    line-height: 1.2;
}

.thread-post-stat-head span {
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.thread-post-stat-head strong {
    color: var(--text);
    font-size: 0.76rem;
}

.thread-post-stat-bar {
    position: relative;
    display: block;
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.thread-post-stat-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.thread-post-stat-bar-life > span {
    background: linear-gradient(90deg, #ff8f7a 0%, #ff5f5f 100%);
    box-shadow: 0 0 16px rgba(255, 95, 95, 0.24);
}

.thread-post-stat-bar-chakra > span {
    background: linear-gradient(90deg, #68d8ff 0%, #2aa1ff 100%);
    box-shadow: 0 0 16px rgba(42, 161, 255, 0.22);
}

.thread-post-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.thread-post-meta-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--muted);
    font-size: 0.76rem;
}

.thread-post-user-card {
    display: grid;
    gap: 9px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.thread-post-user {
    display: inline-grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.thread-post-user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.thread-post-user .thread-post-author {
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thread-post-user-meta {
    gap: 5px;
}

.message-bubble-regalia {
    color: var(--muted);
}

.technique-requirement-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.technique-requirement-badges .profile-badge {
    padding: 5px 9px;
    gap: 6px;
}

.technique-card-meta {
    justify-content: center !important;
    margin-top: 8px;
}

.technique-card-meta .profile-badge {
    width: auto;
    min-width: 116px;
}

.technique-card-meta .profile-badge small {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
}

.technique-stat-requirements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 7px;
    width: 100%;
}

.technique-stat-requirement-panel {
    grid-column: 1 / -1;
}

.technique-stat-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    min-width: 0;
    gap: 8px;
    padding: 6px 8px 6px 10px;
    border: 1px solid rgba(255, 159, 67, 0.16);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(255, 159, 67, 0.12), rgba(255, 255, 255, 0.035)),
        rgba(255, 255, 255, 0.035);
    color: var(--text);
    line-height: 1;
}

.technique-stat-chip-code {
    overflow: hidden;
    color: var(--accent-strong);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-overflow: ellipsis;
}

.technique-stat-chip-level {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 159, 67, 0.18);
    color: #ffe0b8;
    font-size: 0.78rem;
    font-weight: 800;
}

.auth-page {
    display: grid;
    place-items: center;
    min-height: min(78vh, 920px);
}

.auth-card {
    width: min(100%, 560px);
    display: grid;
    gap: 18px;
    padding: 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(94, 188, 255, 0.16), transparent 26%),
        radial-gradient(circle at left, rgba(255, 159, 67, 0.14), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
        var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.auth-card-copy {
    display: grid;
    gap: 8px;
}

.auth-card-copy h1,
.auth-card-copy p {
    margin: 0;
}

.auth-card-copy p {
    color: var(--muted);
    line-height: 1.65;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field span {
    color: var(--muted);
    font-size: 0.92rem;
}

.auth-check {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.auth-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-check-box {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.14), transparent 32%),
        rgba(255, 255, 255, 0.055);
    box-shadow: inset 0 0 0 3px rgba(10, 12, 18, 0.86);
    position: relative;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-check input:checked + .auth-check-box::after {
    content: "\2713";
    position: absolute;
    inset: 3px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffd17a, var(--accent));
    color: #120902;
    font-size: 0.75rem;
    font-weight: 900;
    line-height: 1;
}

.auth-check input:checked + .auth-check-box {
    border-color: rgba(255, 188, 105, 0.88);
    background: linear-gradient(135deg, rgba(255, 138, 28, 0.36), rgba(255, 199, 112, 0.13));
    box-shadow: 0 0 0 3px rgba(255, 138, 28, 0.18), inset 0 0 0 3px rgba(10, 12, 18, 0.62);
}

.auth-check-copy {
    display: grid;
    gap: 2px;
}

.auth-check-copy strong,
.auth-check-copy small {
    margin: 0;
}

.auth-check-copy small {
    color: var(--muted);
    line-height: 1.45;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
}

.auth-footer-links a {
    color: var(--accent-strong);
    text-decoration: none;
}

.thread-post-time,
.thread-post-symbols {
    color: var(--muted);
    font-size: 0.9rem;
}

.thread-post-body {
    display: grid;
    gap: 14px;
    padding: 22px;
    min-width: 0;
}

.thread-post-body-inner {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 138, 28, 0.1);
    min-width: 0;
}

.thread-post-content {
    line-height: 1.72;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.thread-post-content > :first-child {
    margin-top: 0;
}

.thread-post-content > :last-child {
    margin-bottom: 0;
}

.thread-post-content p,
.thread-post-content div,
.thread-post-content blockquote,
.thread-post-content ul,
.thread-post-content ol,
.thread-post-content pre {
    max-width: 100%;
}

.thread-post-actions a {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 600;
}

.thread-post-actions {
    gap: 8px;
    margin-top: 2px;
}

.thread-post-actions > * {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 0.82rem;
}

.npc-admin-page {
    display: grid;
    gap: 18px;
}

.npc-admin-hero,
.npc-admin-list-panel {
    background:
        linear-gradient(180deg, rgba(255, 159, 67, 0.05), rgba(255, 255, 255, 0.02)),
        var(--panel);
}

.npc-admin-form {
    gap: 16px;
}

.npc-admin-form .profile-field {
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 159, 67, 0.08);
}

.npc-admin-form .profile-field span {
    color: #ffd4ae;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.npc-admin-form .profile-field input,
.npc-admin-form .profile-field select,
.npc-admin-form .profile-field textarea {
    background: rgba(8, 8, 8, 0.34);
}

.npc-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.npc-admin-list {
    gap: 14px;
}

.npc-admin-list-item {
    min-height: 78px;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    padding: 15px 16px;
    border-radius: 20px;
}

.npc-admin-list-item .roleplay-menu-art {
    width: 56px;
    height: 56px;
    border-radius: 18px;
}

.npc-admin-list-item .roleplay-menu-copy {
    gap: 7px;
}

.npc-admin-list-item .roleplay-menu-copy strong {
    font-size: 1rem;
}

.npc-admin-list-item .roleplay-menu-copy small {
    color: var(--muted);
    line-height: 1.45;
}

.thread-post-actions a.is-danger,
.button-danger {
    color: #fff;
    border-color: rgba(255, 146, 146, 0.24);
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 55%),
        linear-gradient(135deg, rgba(255, 128, 128, 0.96), rgba(224, 87, 87, 0.96));
    box-shadow:
        0 12px 26px rgba(224, 87, 87, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.thread-compose-card {
    padding: 22px;
}

.thread-compose-form {
    display: grid;
    gap: 16px;
}

.thread-compose-form textarea {
    min-height: 220px;
}

.live-char-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.3;
}

.live-char-counter strong {
    color: var(--text);
    font-size: 0.92rem;
}

.character-sheet-page,
.character-editor-page {
    display: grid;
    gap: 20px;
}

.character-sheet-hero {
    display: flex;
    gap: 22px;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    background:
        radial-gradient(circle at right top, rgba(94, 188, 255, 0.14), transparent 24%),
        radial-gradient(circle at left bottom, rgba(255, 159, 67, 0.14), transparent 28%),
        var(--panel);
}

.character-sheet-cover {
    width: 220px;
    min-width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    align-self: start;
    margin: 0 auto;
}

.character-sheet-copy {
    display: grid;
    gap: 14px;
    align-content: start;
    min-width: 0;
}

.character-sheet-subtitle,
.character-sheet-lead {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.character-sheet-grid,
.character-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.character-sheet-stats,
.character-sheet-text-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.character-sheet-sections {
    display: grid;
    gap: 18px;
}

.character-sheet-text {
    color: var(--muted);
    line-height: 1.72;
    white-space: pre-wrap;
}

.character-editor-form {
    display: grid;
    gap: 18px;
}

.news-cover-image {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.character-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.home-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 26px;
    margin-bottom: 22px;
    background:
        radial-gradient(circle at right, rgba(255, 179, 71, 0.16), transparent 25%),
        radial-gradient(circle at top left, rgba(255, 138, 28, 0.2), transparent 28%),
        var(--panel);
}

.home-hero-anime {
    position: relative;
    overflow: hidden;
}

.home-hero-anime::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 8, 8, 0.9) 0%, rgba(8, 8, 8, 0.72) 45%, rgba(8, 8, 8, 0.4) 100%),
        url('/assets/logo.png') right center / 320px auto no-repeat;
    opacity: 0.24;
    pointer-events: none;
}

.home-hero-anime > * {
    position: relative;
    z-index: 1;
}

.home-hero h1,
.news-article-page h1,
.section-head h2 {
    margin: 8px 0 10px;
}

.home-hero p {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.6;
}

.home-kicker,
.section-kicker {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 159, 67, 0.12);
    color: var(--accent-strong);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-hero-side {
    display: grid;
    gap: 12px;
    min-width: 180px;
}

.home-highlight {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 138, 28, 0.045);
    border: 1px solid rgba(255, 138, 28, 0.1);
}

.home-highlight strong {
    display: block;
    font-size: 1.35rem;
    margin-bottom: 6px;
}

.home-highlight span {
    color: var(--muted);
    font-size: 0.88rem;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.news-grid,
.comment-list {
    display: grid;
    gap: 16px;
}

.news-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: 24px;
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.05), rgba(255, 255, 255, 0.03)),
        var(--panel);
}

.news-card-glow {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 138, 28, 0.22), transparent 65%);
    pointer-events: none;
}

.news-card-head,
.news-article-page,
.news-section {
    display: grid;
    gap: 12px;
}

.news-card h3 {
    margin: 0;
    font-size: 1.35rem;
}

.news-card h3 a,
.news-article-page h1 {
    color: var(--text);
    text-decoration: none;
}

.news-badge {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 138, 28, 0.12);
    color: #ffd39b;
    font-size: 0.78rem;
    border: 1px solid rgba(255, 138, 28, 0.14);
}

.news-excerpt,
.news-article-body,
.empty-state p {
    color: var(--muted);
    line-height: 1.65;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 0.88rem;
}

.news-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.news-counters,
.news-links,
.comment-form-actions,
.news-admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.notifications-list {
    gap: 18px;
}

.notification-card-fresh {
    border-color: rgba(255, 159, 67, 0.34);
    box-shadow:
        0 24px 60px rgba(8, 10, 18, 0.36),
        0 0 0 1px rgba(255, 159, 67, 0.14);
}

.notifications-head-filter {
    cursor: pointer;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.notifications-head-filter.is-active {
    border-color: rgba(255, 159, 67, 0.32);
    background: rgba(255, 159, 67, 0.14);
}

.notification-mark-read-form {
    display: inline-flex;
    margin: 0;
}

.notification-mark-read-form .button-secondary {
    white-space: nowrap;
}

.messages-mode-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.messages-shell-telegram {
    align-items: stretch;
}

.messages-page-telegram {
    gap: 0;
    overflow-x: clip;
}

.messages-page-telegram .messages-shell-telegram {
    margin-top: 0;
    align-items: stretch;
    min-height: calc(100vh - 148px);
}

.messages-page-telegram .messages-sidebar,
.messages-page-telegram .messages-thread {
    background:
        linear-gradient(180deg, rgba(17, 21, 32, 0.94), rgba(10, 12, 20, 0.98));
    min-height: calc(100vh - 148px);
}

.messages-page-telegram .messages-sidebar {
    gap: 12px;
}

.messages-page-telegram .messages-sidebar-head {
    padding-bottom: 2px;
}

.messages-thread-telegram {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
}

.messages-thread-head-telegram {
    position: sticky;
    top: 0;
    z-index: 3;
    background: linear-gradient(180deg, rgba(22, 26, 38, 0.98), rgba(22, 26, 38, 0.92));
    backdrop-filter: blur(12px);
}

.messages-thread-head-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.messages-telegram-thread-shell {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 0;
    height: 100%;
}

.messages-history-status {
    padding: 10px 14px 0;
    color: var(--muted);
    font-size: 13px;
}

.messages-thread-feed-telegram {
    min-height: 0;
    max-height: calc(100vh - 360px);
    overflow-y: auto;
    padding: 18px 16px 132px;
    display: grid;
    gap: 14px;
    align-content: start;
}

.message-bubble-telegram {
    align-items: flex-end;
}

.message-bubble-telegram .message-bubble-card {
    max-width: min(720px, 82%);
    border-radius: 20px;
}

.message-bubble-telegram.is-own {
    justify-self: end;
}

.message-bubble-telegram.is-own .message-bubble-card {
    background: linear-gradient(135deg, rgba(239, 127, 26, 0.24), rgba(239, 127, 26, 0.12));
    border-color: rgba(239, 127, 26, 0.28);
}

.messages-form-telegram {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 0;
    padding: 14px 16px 16px;
    background: linear-gradient(180deg, rgba(18, 21, 32, 0.85), rgba(18, 21, 32, 0.98));
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.messages-form-telegram textarea {
    min-height: 60px;
    max-height: 180px;
    resize: none;
    overflow-y: auto;
}

.messages-conversation-card-telegram {
    align-items: center;
}

@media (max-width: 900px) {
    .messages-thread-feed-telegram {
        max-height: calc(100vh - 330px);
    }

    .messages-thread-head-actions {
        width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --mobile-bottom-nav-offset: calc(86px + env(safe-area-inset-bottom));
    }

    .messages-page-telegram {
        gap: 0;
    }

    .messages-page-telegram .section-head {
        padding: 0 0 12px;
    }

    .messages-page-telegram.has-active-dialog .section-head {
        display: none;
    }

    .messages-page-telegram .messages-shell-telegram {
        gap: 0;
        min-height: calc(100dvh - 72px);
        align-items: stretch;
    }

    .messages-page-telegram .messages-shell-telegram.has-active-dialog .messages-sidebar {
        display: none;
    }

    .messages-page-telegram.has-dialog-list .messages-thread {
        display: none;
    }

    .messages-page-telegram .messages-sidebar,
    .messages-page-telegram .messages-thread {
        min-height: calc(100vh - 112px);
        height: calc(100dvh - 112px);
        padding: 0;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .messages-page-telegram.has-dialog-list .messages-sidebar {
        min-height: auto;
    }

    .messages-page-telegram .messages-sidebar-head {
        display: grid;
        padding: 0 0 14px;
    }

    .messages-page-telegram.has-active-dialog .messages-sidebar-head {
        display: none;
    }

    .messages-page-telegram .messages-conversations {
        gap: 0;
    }

    .messages-page-telegram .messages-conversation-card-telegram {
        padding: 12px 10px;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        border-top: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(255, 255, 255, 0.02);
        transform: none !important;
        box-shadow: none;
    }

    .messages-page-telegram .messages-conversation-card-telegram.is-active {
        background: rgba(255, 159, 67, 0.08);
        border-color: rgba(255, 159, 67, 0.16);
    }

    .messages-page-telegram .messages-thread {
        min-height: calc(100vh - 72px);
        height: calc(100dvh - 72px - var(--mobile-bottom-nav-offset));
        overflow: hidden;
    }

    .messages-page-telegram .messages-thread-head-telegram {
        margin: 0;
        padding: 10px 12px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: linear-gradient(180deg, rgba(14, 18, 28, 0.98), rgba(10, 13, 22, 0.96));
    }

    .messages-page-telegram .messages-thread-user {
        grid-template-columns: auto 40px minmax(0, 1fr);
        gap: 8px;
    }

    .messages-page-telegram .messages-mobile-back {
        min-height: 32px;
        padding: 6px 9px;
        border-radius: 999px;
        font-size: 0.74rem;
    }

    .messages-page-telegram .messages-telegram-thread-shell {
        min-height: 0;
        height: 100%;
        overflow: hidden;
    }

    .messages-page-telegram .messages-thread-feed-telegram {
        max-height: none;
        height: 100%;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 14px 12px calc(156px + var(--mobile-bottom-nav-offset));
        background:
            linear-gradient(180deg, rgba(6, 8, 14, 0.28), rgba(6, 8, 14, 0));
    }

    .message-bubble-telegram .message-bubble-card {
        max-width: calc(100vw - 84px);
    }

    .messages-thread-head-actions {
        display: none;
    }

    .messages-form-telegram {
        padding: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0;
        background: linear-gradient(180deg, rgba(12, 15, 24, 0.94), rgba(12, 15, 24, 0.99));
        position: sticky;
        bottom: var(--mobile-bottom-nav-offset);
    }

    .messages-page-telegram .messages-form-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        align-items: center;
    }

    .messages-page-telegram .messages-form-telegram textarea {
        min-height: 52px;
        border-radius: 18px;
    }

    .messages-page-telegram .message-bubble-avatar,
    .messages-page-telegram .messages-thread-avatar,
    .messages-page-telegram .messages-conversation-avatar {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .messages-page-telegram .message-bubble-telegram {
        gap: 8px;
    }

    .messages-page-telegram .message-bubble-telegram .message-bubble-card {
        padding: 12px 13px;
        border-radius: 18px;
    }

    .messages-page-telegram .message-bubble-meta {
        font-size: 0.72rem;
    }

    .messages-page-telegram .message-bubble-text {
        font-size: 0.95rem;
        line-height: 1.48;
    }

    .messages-page-telegram.has-active-dialog .messages-thread {
        animation: telegramDialogEnter 0.24s ease both;
    }

    .messages-page-telegram.has-dialog-list .messages-sidebar {
        animation: telegramListEnter 0.18s ease both;
    }
}

@keyframes telegramDialogEnter {
    from {
        opacity: 0;
        transform: translateX(18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes telegramListEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-filters {
    display: grid;
    gap: 16px;
}

.notifications-filter-group {
    display: grid;
    gap: 10px;
}

.notifications-filter-head {
    display: grid;
    gap: 4px;
}

.notifications-filter-head h3 {
    margin: 0;
}

.notifications-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.notifications-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.notifications-filter-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(94, 188, 255, 0.28);
    background: rgba(94, 188, 255, 0.1);
}

.notifications-filter-chip.is-active {
    border-color: rgba(255, 159, 67, 0.32);
    background: rgba(255, 159, 67, 0.14);
}

.home-online-mobile {
    display: none;
}

.home-online-list {
    grid-template-columns: 1fr;
}

.notifications-filter-chip.is-empty {
    opacity: 0.58;
}

.notifications-filter-chip.is-empty:hover {
    opacity: 0.86;
}

.notifications-filter-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 0.78rem;
}

.notification-application-copy {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.notification-action-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.hidden-state {
    display: none !important;
}

.mention-suggest {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 138, 28, 0.22);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.96), rgba(8, 8, 8, 0.98));
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.mention-suggest-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    width: 100%;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.mention-suggest-item:hover {
    border-color: rgba(255, 138, 28, 0.34);
    background: rgba(255, 138, 28, 0.1);
}

.mention-suggest-item span {
    display: grid;
    min-width: 0;
}

.mention-suggest-item strong,
.mention-suggest-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mention-suggest-item small {
    color: var(--muted);
    font-size: 0.78rem;
}

.messages-page {
    display: grid;
    gap: 18px;
}

.messages-shell {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.messages-sidebar,
.messages-thread {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    background: var(--panel);
    border-radius: 24px;
}

.messages-sidebar-head h2,
.messages-thread-head h2 {
    margin: 0 0 6px;
}

.messages-sidebar-head p,
.messages-thread-head p,
.messages-conversation-copy p {
    margin: 0;
    color: var(--muted);
}

.messages-conversations {
    display: grid;
    gap: 10px;
}

.messages-conversation-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.messages-conversation-card:hover,
.messages-conversation-card.is-active {
    transform: translateY(-1px);
    border-color: rgba(94, 188, 255, 0.22);
    background: rgba(94, 188, 255, 0.08);
}

.messages-conversation-card.has-unread {
    border-color: rgba(255, 159, 67, 0.22);
    box-shadow: 0 10px 24px rgba(255, 159, 67, 0.12);
}

.messages-conversation-avatar,
.messages-thread-avatar,
.message-bubble-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    object-fit: cover;
}

.messages-conversation-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.messages-conversation-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.messages-conversation-top span {
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.messages-page-badge,
.messages-unread-badge {
    min-width: fit-content;
}

.messages-thread {
    min-height: min(76vh, 920px);
    grid-template-rows: auto auto auto 1fr;
}

.messages-thread-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.messages-thread-user {
    display: flex;
    gap: 14px;
    align-items: center;
}

.messages-thread-feed {
    display: grid;
    gap: 12px;
    align-content: start;
    justify-items: stretch;
    min-height: 0;
    max-height: min(58vh, 720px);
    overflow-y: auto;
    padding-right: 6px;
}

.message-bubble {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.message-bubble.is-own {
    flex-direction: row-reverse;
}

.message-bubble-card {
    display: grid;
    gap: 8px;
    max-width: min(78%, 760px);
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.message-bubble.is-own .message-bubble-card {
    background: linear-gradient(135deg, rgba(94, 188, 255, 0.16), rgba(58, 96, 171, 0.14));
}

.message-bubble-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 0.82rem;
}

.message-bubble-meta a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.message-bubble-text {
    line-height: 1.6;
    word-break: break-word;
}

.messages-form {
    display: grid;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.messages-form-top {
    padding-top: 0;
    padding-bottom: 12px;
    border-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.messages-pagination {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.messages-pagination-copy {
    display: grid;
    gap: 2px;
}

.messages-pagination-copy small {
    color: var(--muted);
}

.messages-pagination-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.messages-mobile-back {
    display: none;
}

.messages-form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.users-grid,
.messages-conversations,
.messages-thread-feed {
    min-width: 0;
}

.roleplay-directory-panel {
    gap: 1.25rem;
}

.roleplay-shinobi-list-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 138, 28, 0.10), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 138, 28, 0.14);
}

.roleplay-shinobi-list-name a {
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
}

.roleplay-shinobi-list-name a:hover {
    color: var(--accent-strong);
}

.roleplay-shinobi-list-rank {
    align-self: flex-start;
}

.roleplay-shinobi-list-meta {
    color: var(--muted);
    line-height: 1.5;
}

.roleplay-shinobi-list-card .character-rank-icon-small {
    height: 36px;
}

.roleplay-shinobi-grid {
    margin-top: 1rem;
}

.roleplay-shinobi-card .character-modern-image {
    min-height: 0;
    height: 260px;
    object-fit: cover;
}

.roleplay-shinobi-card .roleplay-card-actions {
    margin-top: auto;
}

.news-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.92rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.news-pill-like {
    color: #ffd166;
    background: rgba(255, 209, 102, 0.12);
}

.news-pill-view {
    color: #8bd3ff;
    background: rgba(139, 211, 255, 0.12);
}

.news-pill-comment {
    color: #d8c3ff;
    background: rgba(216, 195, 255, 0.12);
}

.news-like-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    color: var(--accent-strong);
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 58%),
        linear-gradient(135deg, rgba(255, 159, 67, 0.16), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 159, 67, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.news-like-button.is-liked {
    color: #ff9b90;
    background: rgba(231, 76, 60, 0.18);
    border-color: rgba(255, 155, 144, 0.35);
    pointer-events: none;
    cursor: default;
}

.news-like-status {
    user-select: none;
}

.news-article-card,
.comments-card {
    padding: 22px;
}

.comment-form {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0 0 18px;
}

.comment-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.comment-body {
    min-width: 0;
}

.empty-state {
    padding: 24px;
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state.compact {
    padding: 18px;
}

.danger-link {
    color: #ffb0a9;
}

.danger-link:hover {
    color: #ffd2ce;
}

.village-list,
.subsection-list,
.thread-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.village-card,
.subsection-card,
.thread-card {
    padding: 16px;
    border-radius: var(--radius);
    background: var(--panel);
    text-align: center;
}

.village-image,
.subsection-image,
.thread-image {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 20px;
}

.chat-shell {
    display: grid;
    gap: 16px;
}

.chat-page {
    display: grid;
    gap: 18px;
}

.chat-hero {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 18px;
    padding: 24px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(94, 188, 255, 0.22), transparent 26%),
        radial-gradient(circle at left, rgba(255, 159, 67, 0.18), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.chat-hero h1 {
    margin: 8px 0 10px;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1;
}

.chat-hero p,
.chat-panel-head p,
.chat-composer-head p {
    margin: 0;
    color: var(--muted);
}

.chat-kicker {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 159, 67, 0.12);
    color: var(--accent-strong);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chat-hero-stats {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.chat-stat {
    min-width: 110px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(10, 14, 20, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-stat strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.chat-stat span {
    color: var(--muted);
    font-size: 0.88rem;
}

.chat-shell-modern {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.78fr);
    align-items: start;
}

.chat-panel,
.chat-composer {
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.chat-page-flow {
    gap: 20px;
}

.chat-page-compact {
    gap: 12px;
}

.profile-character-card-rich {
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.16), transparent 26%),
        linear-gradient(180deg, rgba(255, 179, 71, 0.04), rgba(255, 255, 255, 0.02)),
        var(--panel);
}

.character-sheet-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--panel-border);
}

.character-sheet-hero::after {
    content: "";
    position: absolute;
    inset: auto -60px -60px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 138, 28, 0.18), transparent 70%);
    pointer-events: none;
}

.character-sheet-copy > * {
    position: relative;
    z-index: 1;
}

.chat-composer-wide,
.chat-panel-flow {
    width: 100%;
}

.chat-stream {
    display: grid;
    gap: 16px;
}

.chat-dock {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025)),
        var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.chat-monolith {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, auto) auto;
    gap: 18px;
    min-height: min(82vh, 980px);
    padding: 18px;
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(94, 188, 255, 0.12), transparent 26%),
        radial-gradient(circle at left, rgba(255, 159, 67, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.chat-room-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 0;
}

.chat-room-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

.chat-panel-head,
.chat-composer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.chat-panel-head h2,
.chat-composer-head h3 {
    margin: 0;
}

.chat-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(80, 200, 120, 0.14);
    color: #86efac;
    white-space: nowrap;
}

.chat-live-pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #86efac;
    box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.18);
}

.chat-live-pill.is-syncing {
    background: rgba(255, 191, 105, 0.16);
    color: #ffd18d;
}

.chat-live-pill.is-syncing::before {
    background: #ffd18d;
    box-shadow: 0 0 0 4px rgba(255, 209, 141, 0.16);
}

.chat-live-pill.is-offline {
    background: rgba(255, 128, 128, 0.14);
    color: #ffb3b3;
}

.chat-live-pill.is-offline::before {
    background: #ff9d9d;
    box-shadow: 0 0 0 4px rgba(255, 157, 157, 0.16);
}

.chat-stream-tools {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.chat-feed {
    display: grid;
    gap: 12px;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 6px;
}

.chat-feed-modern {
    padding: 8px 4px 4px;
}

.chat-feed-flow {
    max-height: none;
    overflow: visible;
    padding: 0;
}

.chat-feed-page {
    gap: 16px;
}

.chat-feed-fixed {
    height: min(62vh, 820px);
    max-height: min(62vh, 820px);
    overflow-y: auto;
    padding-right: 6px;
}

.chat-feed-monolith {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    padding-right: 8px;
}

.chat-form-top {
    align-self: start;
}

.chat-stream-head {
    margin-bottom: 0;
    padding: 0 4px;
}

.chat-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
}

.chat-message > div {
    min-width: 0;
}

.chat-bubble {
    position: relative;
    align-items: flex-end;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.chat-bubble.own {
    flex-direction: row-reverse;
}

.chat-bubble-body {
    max-width: min(78%, 720px);
    padding: 14px 16px;
    border-radius: 20px 20px 20px 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.chat-bubble.own .chat-bubble-body {
    border-radius: 20px 20px 8px 20px;
    background: linear-gradient(135deg, rgba(255, 159, 67, 0.22), rgba(255, 123, 84, 0.12));
}

.chat-message > img,
.post img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 14px;
}

.chat-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.chat-meta strong {
    color: var(--text);
    font-size: 0.92rem;
}

.chat-text {
    line-height: 1.55;
    word-break: break-word;
}

.chat-text img {
    display: block;
    width: min(100%, 300px);
    max-width: 300px;
    max-height: 300px;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    margin: 10px 0;
}

.chat-message-flat {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.chat-bubble-body-flat {
    max-width: 100%;
    width: 100%;
    border-radius: 20px;
    padding: 18px 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.03)),
        rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.chat-form {
    display: grid;
    gap: 12px;
}

.chat-form-monolith {
    align-self: stretch;
    width: 100%;
    padding: 18px 20px;
    border-radius: 24px;
    background: rgba(8, 15, 24, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chat-composer-docked {
    position: sticky;
    bottom: 0;
    padding: 18px;
    border-radius: 24px;
    background: rgba(15, 19, 26, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.chat-composer-head-monolith {
    margin-bottom: 0;
}

.chat-room-head h1,
.chat-room-head p {
    margin: 0;
}

.chat-reply-alerts {
    display: grid;
    gap: 10px;
}

.chat-reply-alert {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(94, 188, 255, 0.16), rgba(94, 188, 255, 0.06));
    border: 1px solid rgba(94, 188, 255, 0.22);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.chat-reply-alert:hover {
    transform: translateY(-2px);
    border-color: rgba(94, 188, 255, 0.36);
    background: linear-gradient(135deg, rgba(94, 188, 255, 0.22), rgba(94, 188, 255, 0.1));
}

.chat-reply-alert-title {
    font-weight: 700;
}

.chat-reply-alert-text {
    color: var(--muted);
    line-height: 1.45;
}

.chat-reply-alert small {
    color: rgba(255, 255, 255, 0.72);
}

.chat-reply-composer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 159, 67, 0.14), rgba(255, 159, 67, 0.06));
    border: 1px solid rgba(255, 159, 67, 0.22);
}

.chat-reply-composer-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.chat-reply-composer-label {
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chat-reply-composer-copy strong {
    color: var(--text);
}

.chat-reply-composer-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    word-break: break-word;
}

.chat-reply-dismiss {
    flex-shrink: 0;
}

.chat-reply-quote {
    display: grid;
    gap: 5px;
    margin-bottom: 12px;
    padding: 11px 13px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(94, 188, 255, 0.08), rgba(255, 255, 255, 0.03)),
        rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(94, 188, 255, 0.14);
    border-left: 3px solid rgba(94, 188, 255, 0.55);
}

.chat-reply-quote-label {
    display: inline-flex;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(94, 188, 255, 0.12);
    color: #9adfff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.chat-reply-quote strong {
    color: #cfeeff;
    font-size: 0.82rem;
    line-height: 1.25;
}

.chat-reply-quote p,
.chat-reply-quote-text {
    margin: 0;
    color: rgba(237, 242, 255, 0.72);
    font-size: 0.84rem;
    line-height: 1.42;
    word-break: break-word;
}

.chat-reply-quote-text,
.thread-reply-quote-text {
    max-height: 180px;
    overflow: auto;
}

.thread-reply-composer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 159, 67, 0.14), rgba(255, 159, 67, 0.06));
    border: 1px solid rgba(255, 159, 67, 0.22);
}

.thread-reply-composer-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.thread-reply-composer-label {
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.thread-reply-composer-copy strong {
    color: var(--text);
}

.thread-reply-composer-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    word-break: break-word;
}

.thread-reply-dismiss {
    flex-shrink: 0;
}

.thread-reply-quote {
    display: grid;
    gap: 5px;
    margin-bottom: 12px;
    padding: 11px 13px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(94, 188, 255, 0.08), rgba(255, 255, 255, 0.03)),
        rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(94, 188, 255, 0.16);
}

.thread-reply-quote-label {
    display: inline-flex;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(94, 188, 255, 0.12);
    color: #9adfff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.thread-reply-quote strong {
    color: #cfeeff;
    font-size: 0.82rem;
    line-height: 1.25;
}

.thread-reply-quote p,
.thread-reply-quote-text {
    margin: 0;
    color: rgba(237, 242, 255, 0.72);
    font-size: 0.84rem;
    line-height: 1.42;
    word-break: break-word;
}

.thread-reply-composer {
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
}

.thread-reply-composer-label {
    font-size: 0.72rem;
}

.thread-reply-composer-copy strong {
    font-size: 0.9rem;
}

.thread-reply-composer-copy p {
    font-size: 0.82rem;
    line-height: 1.35;
}

.thread-reply-dismiss {
    min-height: 34px;
    padding: 7px 12px;
}

.thread-reply-quote {
    gap: 4px;
    margin-bottom: 10px;
    padding: 9px 11px;
    border-radius: 12px;
}

.thread-reply-quote-label {
    padding: 2px 7px;
    font-size: 0.64rem;
}

.thread-reply-quote strong {
    font-size: 0.78rem;
}

.thread-reply-quote p {
    font-size: 0.8rem;
    line-height: 1.34;
}

.chat-message-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.chat-reply-button {
    min-height: 38px;
    padding: 9px 16px;
}

.chat-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.emoji-picker button {
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.chat-mode-pill,
.chat-submit-state {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 0.82rem;
}

.chat-mode-pill {
    margin-right: 8px;
    color: var(--accent-strong);
    background: rgba(255, 159, 67, 0.12);
    border-color: rgba(255, 159, 67, 0.2);
}

.chat-submit-state.is-busy {
    color: #ffd18d;
    background: rgba(255, 191, 105, 0.14);
    border-color: rgba(255, 191, 105, 0.2);
}

.sidebar-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.online-widget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 88;
    display: grid;
    justify-items: end;
    gap: 10px;
}

.online-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 19, 26, 0.94);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.online-toggle-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #61d095;
    box-shadow: 0 0 0 6px rgba(97, 208, 149, 0.14);
}

.online-toggle-guests {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1;
}

.online-panel {
    width: min(340px, calc(100vw - 24px));
    max-height: min(60vh, 520px);
    overflow: auto;
    display: none;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 19, 26, 0.96);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.online-panel.active {
    display: grid;
}

.online-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.online-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

.online-panel-link {
    min-height: 38px;
    padding: 9px 14px;
    font-size: 0.88rem;
}

.online-panel-head h3,
.online-panel-empty {
    margin: 0;
}

.online-panel-empty {
    color: var(--muted);
}

.online-user-list {
    display: grid;
    gap: 10px;
}

.online-user-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 16px;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.online-user-card:hover {
    transform: translateY(-1px);
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

td,
th {
    padding: 12px 14px;
}

@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .content {
        order: 0;
    }

    .left-sidebar {
        order: 1;
    }

    .right-sidebar {
        order: 2;
    }

    .right-sidebar {
        grid-column: auto;
    }

    .village-list,
    .subsection-list,
    .thread-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 12px 14px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .layout {
        display: block;
        padding: 14px 14px calc(104px + env(safe-area-inset-bottom));
    }

    .left-sidebar,
    .right-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        width: min(86vw, 320px);
        max-height: 100vh;
        border-radius: 0;
        z-index: 110;
        transition: transform 0.24s ease;
        padding: 18px;
        background: rgba(15, 19, 26, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: var(--shadow);
        backdrop-filter: blur(18px);
        overflow-y: auto;
    }

    .right-sidebar {
        width: min(68vw, 248px);
        padding: 12px 10px;
    }

    .page-overlay {
        z-index: 105;
    }

    .left-sidebar {
        left: 0;
        transform: translateX(-100%);
    }

    .right-sidebar {
        right: 0;
        transform: translateX(100%);
    }

    .right-sidebar .character-card,
    .right-sidebar .sidebar-section {
        margin-bottom: 10px;
    }

    .right-sidebar .character-card,
    .right-sidebar .sidebar-section,
    .right-sidebar .character-sidebar-spoiler {
        border-radius: 18px;
    }

    .right-sidebar .sidebar-section {
        gap: 10px;
        padding: 12px;
    }

    .right-sidebar .sidebar-inline-link {
        min-height: 36px;
        padding: 7px 9px;
        font-size: 0.82rem;
    }

    .right-sidebar .sidebar-section-head h3 {
        font-size: 1rem;
    }

    .right-sidebar .sidebar-section-kicker {
        font-size: 0.68rem;
    }

    .right-sidebar .character-sidebar-spoiler-summary {
        padding: 12px 14px;
    }

    .right-sidebar .character-sidebar-spoiler-body {
        gap: 10px;
        padding: 0 12px 12px;
    }

    .right-sidebar .character-sidebar-avatar-shell {
        width: 92px;
        height: 92px;
        min-width: 92px;
        min-height: 92px;
        max-width: 92px;
        max-height: 92px;
        flex-basis: 92px;
    }

    .right-sidebar .character-sidebar-rank-icon {
        height: 44px;
        max-width: 96px;
    }

    .sidebar-section {
        padding: 16px;
    }

    .left-sidebar.active {
        transform: translateX(0);
    }

    .right-sidebar.active {
        transform: translateX(0);
    }

    .app-shell {
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .content {
        padding: 6px 0 calc(28px + env(safe-area-inset-bottom));
    }

    .site-footer {
        width: min(100% - 24px, 620px);
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        font-size: 0.82rem;
    }

    .mobile-menu {
        position: fixed !important;
        left: 8px !important;
        right: 8px !important;
        top: auto !important;
        bottom: calc(8px + env(safe-area-inset-bottom)) !important;
        inset: auto 8px calc(8px + env(safe-area-inset-bottom)) 8px !important;
        z-index: 60;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        width: auto;
        margin: 0;
        gap: 6px;
        padding: 6px;
        border-radius: 18px;
        background: rgba(15, 19, 26, 0.92);
        backdrop-filter: blur(18px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
        transition: opacity 0.2s ease, transform 0.2s ease;
        transform: none !important;
        align-self: stretch;
    }

    .online-widget {
        position: fixed;
        right: 10px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: auto;
        margin: 0;
        justify-items: end;
        z-index: 74;
    }

    .home-online-mobile {
        display: grid;
    }

    .online-widget {
        display: none !important;
    }

    .online-toggle {
        width: auto;
        min-height: 42px;
        justify-content: center;
        padding: 9px 14px;
    }

    .online-panel {
        width: min(360px, calc(100vw - 20px));
        max-height: 52vh;
        border-radius: 18px;
    }

    .mobile-menu-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 52px;
        padding: 7px 3px;
        border-radius: 14px;
        color: var(--text);
        background: rgba(255, 255, 255, 0.03);
        text-align: center;
    }

    .mobile-menu-icon {
        font-size: 0.92rem;
    }

    .mobile-menu-label {
        font-size: 0.66rem;
        letter-spacing: 0.01em;
    }

    .sidebar-link-card {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .sidebar-link-icon {
        width: 40px;
        height: 40px;
    }

    .home-hero,
    .section-head,
    .news-actions,
    .profile-hero-card,
    .profile-hero-main,
    .profile-character-preview,
    .character-profile-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-hero-side {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-grid,
    .profile-action-grid,
    .gift-grid,
    .character-overview,
    .character-category-grid,
    .character-grid,
    .character-details-grid {
        grid-template-columns: 1fr;
    }

    .profile-showcase,
    .profile-form-grid,
    .profile-mini-stats,
    .gift-grid-modern {
        grid-template-columns: 1fr;
    }

    .character-grid-wide,
    .character-params {
        grid-template-columns: 1fr;
    }

    .village-list,
    .subsection-list,
    .thread-list {
        grid-template-columns: 1fr;
    }

    .chat-hero,
    .chat-panel-head,
    .chat-composer-head {
        flex-direction: column;
    }

    .chat-hero-stats {
        width: 100%;
    }

    .chat-stat {
        flex: 1;
    }

    .chat-bubble-body {
        max-width: 100%;
    }

    .chat-stream-tools,
    .chat-composer-head > div,
    .chat-composer-head > .chat-submit-state {
        width: 100%;
    }

    .thread-hero,
    .thread-moderation-card,
    .thread-post-card {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .thread-post-aside {
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .thread-post-character-card {
        grid-template-columns: 1fr;
        margin: 12px 12px 0;
        padding: 10px;
        border-radius: 18px;
    }

    .thread-post-character {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .thread-post-character img {
        width: 72px;
        height: 92px;
        border-radius: 14px;
    }

    .thread-post-character span {
        white-space: normal;
        font-size: 0.98rem;
    }

    .thread-post-rank-card,
    .thread-post-meta-strip {
        grid-column: 1 / -1;
    }

    .thread-post-rank-card {
        grid-template-columns: auto minmax(0, 1fr);
        display: grid;
        padding: 8px;
        font-size: 0.78rem;
    }

    .thread-post-user-card {
        padding: 8px;
        border-radius: 16px;
    }

    .thread-progress-card {
        min-width: 0;
        width: 100%;
    }

    .character-sheet-hero,
    .character-profile-card {
        flex-direction: column;
    }

    .character-sheet-cover {
        width: 100%;
        min-width: 0;
        max-width: 220px;
        height: 220px;
    }

    .character-sheet-grid,
    .character-editor-grid,
    .character-sheet-stats,
    .character-sheet-text-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1320px) {
    .character-grid-wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .character-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .messages-shell {
        grid-template-columns: 1fr;
    }

    .messages-thread {
        min-height: auto;
    }

    .messages-thread-feed {
        max-height: none;
    }

    .message-bubble-card {
        max-width: 100%;
    }

    .chat-reply-composer {
        flex-direction: column;
        align-items: stretch;
    }

    .thread-reply-composer {
        flex-direction: column;
        align-items: stretch;
    }

    .chat-message-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 680px) {
    .messages-page .section-head {
        gap: 10px;
    }

    .messages-shell {
        gap: 12px;
    }

    .messages-shell.has-active-dialog .messages-sidebar {
        display: none;
    }

    .messages-sidebar,
    .messages-thread {
        padding: 12px;
        border-radius: 18px;
    }

    .messages-sidebar-head {
        display: none;
    }

    .messages-conversations {
        gap: 8px;
    }

    .messages-conversation-card {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
        border-radius: 16px;
    }

    .messages-conversation-avatar,
    .messages-thread-avatar,
    .message-bubble-avatar {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .messages-thread {
        min-height: auto;
        gap: 10px;
    }

    .messages-thread-head {
        position: sticky;
        top: 0;
        z-index: 3;
        margin: -12px -12px 0;
        padding: 10px 12px;
        border-radius: 18px 18px 0 0;
        background: linear-gradient(180deg, rgba(10, 10, 10, 0.98), rgba(10, 10, 10, 0.92));
        border-bottom: 1px solid rgba(255, 138, 28, 0.12);
    }

    .messages-thread-head > .button-secondary:not(.messages-mobile-back) {
        display: none;
    }

    .messages-thread-user {
        width: 100%;
        display: grid;
        grid-template-columns: auto 46px minmax(0, 1fr);
        gap: 9px;
    }

    .messages-thread-user h2 {
        font-size: 1rem;
        margin: 0;
    }

    .messages-thread-user p {
        font-size: 0.78rem;
    }

    .messages-mobile-back {
        display: inline-flex;
        min-height: 36px;
        padding: 8px 10px;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .messages-form-top {
        gap: 8px;
        padding-bottom: 10px;
    }

    .messages-form textarea {
        min-height: 74px;
    }

    .messages-form-actions {
        align-items: stretch;
    }

    .messages-form-actions .button {
        min-height: 38px;
        padding: 9px 14px;
    }

    .messages-pagination {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    .messages-pagination-pages {
        justify-content: flex-start;
    }

    .messages-thread-feed {
        display: grid;
        gap: 8px;
        max-height: none;
        overflow: visible;
        padding: 0;
        background: transparent;
        border: 0;
    }

    .messages-page-telegram .messages-thread-feed-telegram {
        display: grid;
        gap: 8px;
        max-height: none;
        height: 100%;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 14px 12px calc(156px + var(--mobile-bottom-nav-offset));
        background: linear-gradient(180deg, rgba(11, 11, 11, 0.18), rgba(5, 5, 5, 0));
        border: 0;
    }

    .message-bubble {
        gap: 8px;
    }

    .message-bubble-card {
        max-width: calc(100vw - 94px);
        padding: 11px 12px;
        border-radius: 16px;
    }

    .message-bubble-meta {
        gap: 6px;
        font-size: 0.72rem;
    }

    .message-bubble-text {
        line-height: 1.45;
        font-size: 0.94rem;
    }

    .message-bubble-status {
        min-height: 19px;
        padding: 2px 7px;
        font-size: 0.66rem;
    }
}

.flash-banner {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 138, 28, 0.14);
    box-shadow: var(--shadow);
}

.chat-page-compact .chat-monolith {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    padding: 14px;
}

.chat-page-compact .chat-room-head {
    margin-bottom: 0;
    padding-bottom: 4px;
}

.chat-page-compact .chat-pagination {
    margin: 0;
}

.chat-page-compact .chat-pagination-top {
    margin-bottom: 0;
    padding: 0;
}

.chat-page-compact .chat-pagination-status {
    gap: 0;
    flex: 0 1 auto;
}

.chat-page-compact .chat-pagination-status strong,
.chat-page-compact .chat-pagination-status small {
    display: none;
}

.chat-page-compact .chat-pagination-pages {
    margin-top: 0;
    gap: 4px;
}

.chat-page-compact .chat-pagination-bottom {
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-page-compact .chat-pagination-bottom .chat-pagination-status {
    width: 100%;
    gap: 4px;
    align-items: flex-start;
}

.chat-page-compact .chat-pagination-bottom .chat-pagination-status strong,
.chat-page-compact .chat-pagination-bottom .chat-pagination-status small {
    display: block;
}

.chat-page-compact .chat-pagination-bottom .chat-pagination-pages {
    margin-top: 2px;
}

.chat-page-compact .chat-page-link,
.chat-page-compact .chat-page-gap {
    min-width: 30px;
    padding: 5px 9px;
    font-size: 0.86rem;
}

.chat-page-compact .chat-room-head h1 {
    font-size: 1.18rem;
    line-height: 1.15;
}

.chat-page-compact .chat-room-meta {
    gap: 8px;
}

.chat-page-compact .chat-form-monolith {
    align-self: stretch;
    width: 100%;
    padding: 12px 14px;
    gap: 6px;
    margin: 0;
}

.chat-page-compact .chat-pagination-top + .chat-form-top {
    margin-top: -2px;
}

.chat-page-compact .chat-composer-head {
    margin-bottom: 0;
}

.chat-page-compact .chat-composer-head h3 {
    font-size: 1rem;
}

.chat-page-compact .chat-feed-monolith {
    margin-top: 0;
    padding-right: 0;
    gap: 8px;
}

.chat-page-compact .bb-toolbar {
    margin: 2px 0;
}

.chat-bb-spoiler {
    width: 100%;
    margin: 2px 0 0;
}

.chat-bb-spoiler > summary {
    width: 100%;
}

.chat-page-compact textarea {
    min-height: 82px;
    padding: 10px 12px;
}

.chat-page-compact .chat-bubble-body-flat {
    padding: 14px 16px;
}

.chat-page-compact .chat-message-actions {
    margin-top: 8px;
}

@media (max-width: 640px) {
    .chat-page-compact .chat-room-head {
        gap: 6px;
        align-items: flex-start;
    }

    .chat-page-compact .chat-room-head h1 {
        font-size: 1rem;
    }

    .chat-page-compact .chat-room-meta .profile-badge {
        font-size: 0.72rem;
        padding: 4px 8px;
    }
}

.flash-success {
    background: linear-gradient(180deg, rgba(255, 138, 28, 0.12), rgba(255, 255, 255, 0.03));
    color: #ffe3be;
}

.flash-error {
    background: rgba(194, 82, 82, 0.18);
    color: #ffdede;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: var(--text);
}

.user-chip-inline {
    display: inline-flex;
    vertical-align: middle;
}

.user-chip-compact {
    gap: 8px;
}

.user-chip-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-meta .chat-author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--accent-strong) 38%, rgba(255, 255, 255, 0.14));
    background: rgba(0, 0, 0, 0.24);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.22),
        0 0 16px color-mix(in srgb, var(--accent-strong) 12%, transparent);
}

.user-chip-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-chip-copy small {
    color: var(--muted);
    line-height: 1.2;
}

.user-chip-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    line-height: 1.2;
}

.user-chip-name-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.user-online-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #31e981;
    box-shadow: 0 0 0 3px rgba(49, 233, 129, 0.16), 0 0 14px rgba(49, 233, 129, 0.7);
    flex: 0 0 auto;
}

.mention-suggest-box {
    position: absolute;
    z-index: 9999;
    display: grid;
    gap: 6px;
    max-height: 260px;
    overflow: auto;
    padding: 8px;
    border-radius: 16px;
    background: rgba(17, 18, 24, 0.98);
    border: 1px solid rgba(255, 138, 28, 0.28);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.mention-suggest-item {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.mention-suggest-item:hover {
    background: rgba(255, 138, 28, 0.14);
}

.mention-suggest-item img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
}

.mention-suggest-item i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #31e981;
}

.user-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #111827;
    background: linear-gradient(135deg, #ffe08a, #ffc857);
    box-shadow: 0 10px 22px rgba(255, 200, 87, 0.28);
}

.user-medal-starter {
    background: linear-gradient(135deg, #cdd6e0, #e6edf6);
}

.user-medal-heroic {
    background: linear-gradient(135deg, #ffd278, #ffb24d);
}

.user-medal-epic {
    background: linear-gradient(135deg, #8fd3ff, #65a5ff);
}

.user-medal-mythic {
    background: linear-gradient(135deg, #a4ffda, #4ad0a1);
}

.user-medal-legend {
    background: linear-gradient(135deg, #ffe08a, #ff8c5a);
}

.profile-title-with-medal {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-badge-coin {
    background: rgba(255, 196, 76, 0.16);
    color: #ffdb87;
}

.profile-progress-bar-rich {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.profile-progress-bar-rich .profile-progress-fill {
    background: linear-gradient(90deg, #68d391, #63b3ed, #f6ad55);
}

.gift-send-form,
.profile-admin-tools {
    display: grid;
    gap: 18px;
}

.gift-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.gift-catalog-grid-admin {
    margin-top: 20px;
}

.gift-shop-card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

.gift-shop-card:hover {
    transform: translateY(-2px);
    border-color: rgba(130, 180, 255, 0.44);
    box-shadow: 0 18px 36px rgba(8, 15, 35, 0.24);
}

.gift-shop-card input {
    position: absolute;
    inset: 12px 12px auto auto;
}

.gift-shop-card.is-static {
    cursor: default;
}

.gift-shop-card.is-static:hover {
    transform: none;
}

.gift-price {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 196, 76, 0.12);
    color: #ffd880;
    font-weight: 700;
}

.gift-card-rich {
    align-content: start;
}

.gift-card-meta {
    margin-top: 4px;
}

.gift-comment {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.profile-sql-box {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-sql-box code {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    overflow-x: auto;
    background: rgba(10, 14, 20, 0.7);
    color: #f7fafc;
}

.chat-meta .user-chip-inline {
    max-width: 60%;
}

.chat-meta .user-chip-name {
    color: var(--text);
}

.online-user-card {
    gap: 12px;
}

.online-user-card .user-chip-copy {
    min-width: 0;
}

.roleplay-page,
.roleplay-form-page {
    display: grid;
    gap: 20px;
}

.roleplay-hero {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    background:
        radial-gradient(circle at top right, rgba(94, 188, 255, 0.18), transparent 28%),
        radial-gradient(circle at left bottom, rgba(255, 159, 67, 0.12), transparent 30%),
        var(--panel);
}

.roleplay-hero-copy {
    display: grid;
    gap: 12px;
    max-width: 860px;
}

.roleplay-hero-copy h1,
.roleplay-card-head h2 {
    margin: 0;
}

.roleplay-hero-copy p,
.roleplay-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.roleplay-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    justify-content: flex-end;
}

.roleplay-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.roleplay-card-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.roleplay-card {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    background:
          linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
          var(--panel);
}

.roleplay-card-active {
    border-color: rgba(255, 138, 28, 0.42);
    box-shadow: 0 22px 48px rgba(10, 17, 27, 0.32), 0 0 0 1px rgba(255, 138, 28, 0.16);
}

.roleplay-legacy-shell {
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.16), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        var(--panel);
}

.roleplay-card-legacy {
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.06), rgba(255, 255, 255, 0.02)),
        var(--panel);
}

.thread-hero-legacy {
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.18), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        var(--panel);
}

/* Restyle overrides: auth, settings, notifications, messages */
.settings-page .profile-panel,
.auth-card,
.messages-sidebar,
.messages-thread,
.notification-card {
    position: relative;
    overflow: hidden;
}

.settings-page .profile-panel::before,
.auth-card::before,
.messages-sidebar::before,
.messages-thread::before,
.notification-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.06), rgba(255, 255, 255, 0.02)),
        url('/assets/ember-pattern.svg');
    background-size: auto, 240px 240px;
    background-repeat: repeat;
    opacity: 0.55;
    pointer-events: none;
}

.settings-page .profile-panel > *,
.auth-card > *,
.messages-sidebar > *,
.messages-thread > *,
.notification-card > * {
    position: relative;
    z-index: 1;
}

.settings-nav-link {
    background: rgba(255, 138, 28, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 138, 28, 0.14);
}

.settings-nav-link:hover {
    background: rgba(255, 138, 28, 0.12);
    border-color: rgba(255, 179, 71, 0.24);
}

.settings-coin-balance,
.settings-coin-feature {
    background: linear-gradient(180deg, rgba(255, 179, 71, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 138, 28, 0.12);
    box-shadow: var(--shadow);
    color: var(--text);
}

.settings-coin-feature.is-soon {
    background: linear-gradient(180deg, rgba(255, 179, 71, 0.09), rgba(255, 255, 255, 0.03));
}

.settings-coin-note {
    color: var(--muted);
}

.settings-color-option {
    border: 1px solid rgba(255, 138, 28, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.settings-coin-help {
    background: rgba(255, 138, 28, 0.08);
    border: 1px solid rgba(255, 138, 28, 0.14);
}

.empty-state {
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.08), transparent 28%),
        var(--panel);
}

.auth-card {
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.18), transparent 26%),
        radial-gradient(circle at left, rgba(255, 159, 67, 0.14), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        var(--panel);
    border: 1px solid rgba(255, 138, 28, 0.16);
    box-shadow: var(--shadow);
}

.auth-check {
    background: rgba(255, 138, 28, 0.05);
    border: 1px solid rgba(255, 138, 28, 0.14);
}

.auth-check-box {
    border-color: rgba(255, 179, 71, 0.42);
}

.auth-check input:checked + .auth-check-box::after {
    background: linear-gradient(135deg, #ff8a1c, #ffd17b);
}

.notifications-head-filter {
    border: 1px solid rgba(255, 138, 28, 0.14);
    background: rgba(255, 138, 28, 0.06);
}

.notifications-filter-chip {
    border: 1px solid rgba(255, 138, 28, 0.14);
    background: rgba(255, 138, 28, 0.06);
}

.notifications-filter-chip:hover {
    border-color: rgba(255, 179, 71, 0.28);
    background: rgba(255, 138, 28, 0.1);
}

.messages-sidebar,
.messages-thread {
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.12), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        var(--panel);
}

.messages-conversation-card:hover,
.messages-conversation-card.is-active {
    border-color: rgba(255, 179, 71, 0.24);
    background: rgba(255, 138, 28, 0.08);
}

.messages-form {
    border-top: 1px solid rgba(255, 138, 28, 0.12);
}

/* UI cohesion and non-stretched actions */
.button,
.button-secondary,
.button-danger,
button {
    width: auto;
    max-width: 100%;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.profile-toolbar,
.roleplay-card-actions,
.roleplay-hero-actions,
.thread-compose-actions,
.thread-post-actions,
.thread-moderation-actions {
    align-items: center;
    justify-content: flex-start;
}

.profile-toolbar > .button,
.profile-toolbar > .button-secondary,
.profile-toolbar > .button-danger,
.roleplay-card-actions > .button,
.roleplay-card-actions > .button-secondary,
.roleplay-card-actions > .button-danger,
.roleplay-hero-actions > .button,
.roleplay-hero-actions > .button-secondary,
.roleplay-hero-actions > .button-danger,
.thread-compose-actions > .button,
.thread-compose-actions > .button-secondary,
.thread-compose-actions > .button-danger,
.thread-post-actions > .button,
.thread-post-actions > .button-secondary,
.thread-post-actions > .button-danger,
.thread-moderation-actions > .button,
.thread-moderation-actions > .button-secondary,
.thread-moderation-actions > .button-danger,
.profile-toolbar > button,
.roleplay-card-actions > button,
.roleplay-hero-actions > button,
.thread-compose-actions > button,
.thread-post-actions > button,
.thread-moderation-actions > button {
    flex: 0 0 auto;
}

.profile-panel,
.roleplay-legacy-item,
.profile-info-item,
.thread-post-card,
.messages-conversation-card,
.notification-card,
.sidebar-link-card {
    backdrop-filter: blur(10px);
}

.roleplay-legacy-item,
.profile-info-item,
.messages-conversation-card,
.notification-card,
.sidebar-link-card {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.roleplay-legacy-item a,
.profile-info-item a,
.thread-post-author,
.roleplay-card-head a {
    text-decoration: none;
}

.roleplay-legacy-item a:hover,
.profile-info-item a:hover,
.thread-post-author:hover,
.roleplay-card-head a:hover {
    text-decoration: underline;
    text-decoration-color: rgba(255, 179, 71, 0.5);
    text-underline-offset: 3px;
}

.profile-info-list {
    gap: 12px;
}

.roleplay-legacy-item,
.profile-info-item {
    min-width: 0;
}

@media (max-width: 900px) {
    .profile-toolbar,
    .roleplay-card-actions,
    .roleplay-hero-actions,
    .thread-compose-actions,
    .thread-post-actions,
    .thread-moderation-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, max-content));
        justify-content: start;
        gap: 10px;
    }

    .profile-toolbar > *,
    .roleplay-card-actions > *,
    .roleplay-hero-actions > *,
    .thread-compose-actions > *,
    .thread-post-actions > *,
    .thread-moderation-actions > * {
        width: auto;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .profile-toolbar,
    .roleplay-card-actions,
    .roleplay-hero-actions,
    .thread-compose-actions,
    .thread-post-actions,
    .thread-moderation-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
    }

    .roleplay-hero-actions > *,
    .roleplay-card-actions > *,
    .thread-compose-actions > *,
    .thread-post-actions > *,
    .thread-moderation-actions > * {
        flex: initial;
        text-align: center;
        justify-content: center;
    }

    .button,
    .button-secondary,
    .button-danger,
    button {
        min-height: 40px;
        padding: 10px 14px;
        font-size: 0.92rem;
    }

    .profile-legacy-head,
    .roleplay-legacy-village,
    .thread-post-card {
        gap: 14px;
    }
}

@media (max-width: 560px) {
    .profile-toolbar,
    .roleplay-card-actions,
    .roleplay-hero-actions,
    .thread-compose-actions,
    .thread-post-actions,
    .thread-moderation-actions {
        grid-template-columns: 1fr;
    }
}

.roleplay-card-thread {
    min-height: 100%;
}

.roleplay-card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.roleplay-card-body {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.roleplay-card-head {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: flex-start;
}

.roleplay-card-head a {
    color: var(--text);
    text-decoration: none;
}

.roleplay-card-head a:hover {
    color: var(--accent-strong);
}

.roleplay-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.roleplay-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.roleplay-dashboard {
    display: grid;
    gap: 14px;
}

.roleplay-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.roleplay-stat-card,
.roleplay-status-card,
.roleplay-feature-card,
.roleplay-game-card,
.roleplay-mission-card,
.roleplay-rank-card,
.roleplay-mini-stat {
    border-radius: 20px;
    border: 1px solid var(--panel-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        var(--panel);
    box-shadow: var(--shadow);
}

.roleplay-stat-card {
    display: grid;
    gap: 6px;
    padding: 16px;
}

.roleplay-stat-card span,
.roleplay-game-card span,
.roleplay-mission-card span,
.roleplay-mini-stat span {
    color: var(--muted);
    font-size: 0.88rem;
}

.roleplay-stat-card strong,
.roleplay-game-card strong,
.roleplay-mission-card strong,
.roleplay-mini-stat strong,
.roleplay-rank-code {
    font-size: 1.25rem;
}

.roleplay-status-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
}

.roleplay-status-copy {
    display: grid;
    gap: 8px;
}

.roleplay-status-copy h3,
.roleplay-feature-card h3,
.roleplay-rank-card h3 {
    margin: 0;
}

.roleplay-status-copy p,
.roleplay-status-note,
.roleplay-feature-card p,
.roleplay-game-card p,
.roleplay-rank-card p,
.roleplay-card-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.roleplay-feature-card p:last-child,
.roleplay-rank-card p:last-child,
.roleplay-game-card p:last-child {
    margin-bottom: 0;
}

.roleplay-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.roleplay-feature-grid,
.roleplay-game-grid,
.roleplay-mission-grid,
.roleplay-rank-grid,
.roleplay-mini-stats {
    display: grid;
    gap: 14px;
}

.roleplay-feature-grid,
.roleplay-game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roleplay-mission-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.roleplay-rank-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.roleplay-feature-card,
.roleplay-game-card,
.roleplay-rank-card,
.roleplay-mini-stat {
    padding: 18px;
}

.roleplay-mission-card {
    padding: 18px;
    text-align: center;
    display: grid;
    gap: 8px;
}

.roleplay-rank-code {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(94, 188, 255, 0.14);
    margin-bottom: 12px;
}

.roleplay-mini-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.roleplay-current-image {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.roleplay-current-image span {
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 768px) {
    .gift-catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chat-dock,
    .chat-composer-docked,
    .chat-hero {
        padding: 14px;
        border-radius: 20px;
    }

    .chat-feed-fixed {
        height: min(56vh, 640px);
        max-height: min(56vh, 640px);
    }

    .chat-message > img,
    .post img {
        width: 48px;
        height: 48px;
    }

    .chat-meta .chat-author-avatar {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .chat-text img {
        width: min(100%, 220px);
        max-width: 220px;
        max-height: 220px;
    }

    .chat-bubble-body-flat {
        padding: 14px 15px;
        border-radius: 16px;
    }

    .chat-actions > * {
        flex: 1 1 100%;
    }

    .chat-stream-tools {
        justify-content: stretch;
    }

    .chat-stream-tools > * {
        flex: 1 1 100%;
        justify-content: center;
    }

    .character-params-compact,
    .character-spoiler .character-params {
        grid-template-columns: 1fr;
    }

    .user-chip-inline {
        max-width: 100%;
    }

    .profile-title-with-medal {
        align-items: flex-start;
    }

    .roleplay-hero,
    .thread-hero,
    .thread-moderation-card,
    .thread-post-card {
        grid-template-columns: 1fr;
        display: grid;
    }

    .roleplay-card-grid,
    .village-list,
    .subsection-list,
    .thread-list {
        grid-template-columns: 1fr;
    }

    .roleplay-hero-actions,
    .roleplay-card-actions,
    .thread-compose-actions,
    .thread-post-actions,
    .thread-moderation-actions {
        justify-content: stretch;
    }

    .roleplay-hero-actions > *,
    .roleplay-card-actions > *,
    .thread-compose-actions > *,
    .thread-post-actions > *,
    .thread-moderation-actions > * {
        flex: 1 1 100%;
        text-align: center;
        justify-content: center;
    }

    .roleplay-dashboard-grid,
    .roleplay-feature-grid,
    .roleplay-game-grid,
    .roleplay-mission-grid,
    .roleplay-rank-grid,
    .roleplay-mini-stats {
        grid-template-columns: 1fr;
    }

    .roleplay-status-card {
        grid-template-columns: 1fr;
        display: grid;
    }

    .roleplay-directory-panel .section-head {
        gap: 0.75rem;
    }

    .roleplay-directory-panel .profile-badges {
        width: 100%;
        justify-content: flex-start;
    }

    .roleplay-shinobi-card .character-modern-image {
        min-height: 180px;
    }
}
/* Messages dark pass */
.messages-sidebar,
.messages-thread {
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.10), transparent 24%),
        linear-gradient(180deg, rgba(15, 15, 15, 0.97), rgba(6, 6, 6, 0.98)),
        #090909;
    border-color: rgba(255, 138, 28, 0.14);
}

.messages-conversation-card {
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.96), rgba(8, 8, 8, 0.98));
    border: 1px solid rgba(255, 138, 28, 0.10);
}

.messages-conversation-card:hover,
.messages-conversation-card.is-active {
    border-color: rgba(255, 179, 71, 0.28);
    background: linear-gradient(180deg, rgba(48, 27, 10, 0.94), rgba(20, 12, 8, 0.98));
}

.messages-thread-feed {
    padding: 4px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(11, 11, 11, 0.76), rgba(5, 5, 5, 0.8));
    border: 1px solid rgba(255, 138, 28, 0.08);
}

.message-bubble-card {
    background: linear-gradient(180deg, rgba(22, 22, 22, 0.98), rgba(9, 9, 9, 0.98));
    border-color: rgba(255, 138, 28, 0.10);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.message-bubble.is-own .message-bubble-card {
    background: linear-gradient(135deg, rgba(72, 36, 10, 0.96), rgba(36, 20, 8, 0.98));
    border-color: rgba(255, 179, 71, 0.18);
}

.messages-form {
    padding-top: 14px;
    border-top: 1px solid rgba(255, 138, 28, 0.16);
}

.messages-form.messages-form-top {
    padding-top: 0;
    padding-bottom: 12px;
    border-top: 0;
    border-bottom: 1px solid rgba(255, 138, 28, 0.16);
}

.messages-pagination {
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.88), rgba(8, 8, 8, 0.92));
    border-color: rgba(255, 138, 28, 0.12);
}

.messages-form textarea {
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.96), rgba(10, 10, 10, 0.98));
    border: 1px solid rgba(255, 138, 28, 0.14);
    color: var(--text);
}

.messages-form textarea::placeholder {
    color: rgba(226, 217, 206, 0.56);
}

.message-bubble-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.message-bubble-status.is-read {
    background: rgba(103, 187, 117, 0.14);
    border: 1px solid rgba(103, 187, 117, 0.18);
    color: #d8f5dd;
}

.message-bubble-status.is-unread {
    background: rgba(255, 138, 28, 0.14);
    border: 1px solid rgba(255, 138, 28, 0.18);
    color: #ffd6aa;
}

.character-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
    gap: 18px;
    align-items: start;
}

.character-compact-card {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 138, 28, 0.14);
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(8, 8, 8, 0.98));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.character-compact-card-link {
    display: grid;
    color: inherit;
    text-decoration: none;
    gap: 12px;
    padding-bottom: 16px;
}

.character-card-action-form {
    padding: 0 18px 18px;
}

.character-card-action-form .button {
    width: 100%;
}

.roleplay-location-mission-grid {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.thread-location-missions .mission-board-card {
    border-color: rgba(255, 138, 28, 0.2);
}

body.theme-blueanime .thread-location-missions .mission-board-card {
    border-color: rgba(112, 190, 255, 0.24);
}

.character-compact-image {
    width: 172px;
    aspect-ratio: 1 / 1;
    height: 172px;
    margin: 18px auto 0;
    object-fit: cover;
    display: block;
    background: rgba(255, 255, 255, 0.04);
}

.character-compact-body {
    display: grid;
    gap: 10px;
    padding: 0 16px;
    text-align: center;
}

.character-compact-body h3 {
    margin: 0;
    font-size: 1.05rem;
}

.character-selection-status {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: min(100%, 180px);
    min-height: 40px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 2px solid transparent;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.character-selection-status.is-free {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.98));
    color: #f3fff6;
    border-color: rgba(187, 247, 208, 0.45);
}

.character-selection-status.is-busy {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(185, 28, 28, 0.98));
    color: #fff5f5;
    border-color: rgba(254, 202, 202, 0.42);
}

.character-compact-body .profile-badge {
    justify-self: center;
}

.character-card-start-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
}

.character-card-start-stats-large {
    max-width: 420px;
}

.character-card-start-stats-block {
    display: grid;
    gap: 8px;
    max-width: 460px;
}

.character-card-start-stats-block .section-kicker {
    margin: 0;
}

.character-card-stat {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 6px;
    padding: 6px 7px;
    border: 1px solid rgba(255, 138, 28, 0.15);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(255, 138, 28, 0.12), rgba(255, 255, 255, 0.035)),
        rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.character-card-stat-code {
    overflow: hidden;
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
}

.character-card-stat-value {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 138, 28, 0.18);
    color: #ffe0b8;
    font-size: 0.76rem;
    font-weight: 800;
}

.character-compact-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.character-sheet-hero-simple {
    align-items: start;
    justify-content: flex-start;
}

.character-sheet-copy {
    min-width: 0;
}

.character-sheet-lead {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 138, 28, 0.10);
    color: var(--muted);
    line-height: 1.65;
}

.character-sheet-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.character-trait-sections {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.character-trait-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.character-trait-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 138, 28, 0.14);
}

.character-trait-delete {
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1;
}

.artifact-admin-category-list {
    margin-top: 18px;
}

.character-trait-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
}

.character-trait-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #120905;
    font-size: 0.78rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), #ffd49b);
    box-shadow: 0 8px 18px rgba(255, 138, 28, 0.18);
}

.character-game-traits {
    gap: 14px;
}

.character-game-trait-group {
    display: grid;
    gap: 8px;
}

.character-game-trait-group > span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.character-sheet-status {
    margin-top: 18px;
}

.character-status-line {
    margin: 0 0 10px;
    color: var(--text);
}

.character-manager-roleplay-name {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
}

.character-manager-section .character-sheet-text-grid,
.character-manager-section .character-game-field {
    margin-top: 0;
}

.character-kill-form {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.character-kill-form input {
    width: 120px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 138, 28, 0.24);
    color: var(--text);
    background: rgba(12, 13, 17, 0.76);
}

.character-element-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.character-element-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 138, 28, 0.14);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.character-element-option input {
    accent-color: #ff8a1c;
}

.character-element-option:has(input[type="checkbox"]:checked) {
    border-color: rgba(255, 188, 105, 0.82);
    background: linear-gradient(135deg, rgba(255, 138, 28, 0.3), rgba(255, 199, 112, 0.1));
    color: #fff2dc;
    box-shadow: 0 0 0 1px rgba(255, 138, 28, 0.24) inset, 0 12px 28px rgba(255, 138, 28, 0.13);
}

.character-element-option:has(input[type="checkbox"]:checked)::after {
    content: "\2713";
    display: grid;
    width: 20px;
    height: 20px;
    margin-left: auto;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd17a, var(--accent));
    color: #120902;
    font-size: 0.78rem;
    font-weight: 900;
    box-shadow: 0 0 16px rgba(255, 138, 28, 0.34);
}

.character-trait-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.character-trait-admin-form {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.roleplay-village-widget {
    display: grid;
    gap: 12px;
}

.roleplay-village-widget-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255, 138, 28, 0.16);
    background: rgba(255, 255, 255, 0.04);
}

.roleplay-village-widget-title {
    display: block;
    font-size: 1.05rem;
}

.roleplay-village-widget-info {
    display: grid;
    gap: 8px;
    padding-top: 4px;
}

.roleplay-village-widget-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.roleplay-village-widget-info span {
    color: var(--text);
}

.roleplay-counter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.roleplay-counter-row-wide {
    margin-top: 0;
}

.roleplay-counter {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.roleplay-counter-total {
    color: #ffe0bf;
    background: rgba(255, 138, 28, 0.13);
    border-color: rgba(255, 138, 28, 0.20);
}

.roleplay-counter-free {
    color: #d7f8dd;
    background: rgba(89, 189, 104, 0.13);
    border-color: rgba(89, 189, 104, 0.22);
}

.roleplay-counter-busy {
    color: #ffd0d0;
    background: rgba(230, 72, 72, 0.13);
    border-color: rgba(230, 72, 72, 0.22);
}

.roleplay-village-menu-card {
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    gap: 18px;
    align-items: start;
}

.roleplay-village-menu-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(255, 138, 28, 0.16);
}

.roleplay-village-menu-card h2 {
    margin-top: 0;
}

.roleplay-village-menu-card p {
    margin: 0 0 8px;
    color: var(--muted);
}

.roleplay-menu-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.roleplay-menu-list-item {
    position: relative;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 12px 14px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(255, 138, 28, 0.10), rgba(255, 255, 255, 0.035)),
        rgba(12, 13, 17, 0.72);
    border: 1px solid rgba(255, 138, 28, 0.16);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.roleplay-menu-list-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 16% 20%, rgba(255, 179, 71, 0.18), transparent 32%);
    opacity: 0.85;
    z-index: -1;
}

.roleplay-menu-list-item:hover {
    background:
        linear-gradient(135deg, rgba(255, 138, 28, 0.15), rgba(255, 255, 255, 0.045)),
        rgba(15, 16, 21, 0.86);
    border-color: rgba(255, 179, 71, 0.34);
    transform: translateY(-2px);
}

.roleplay-menu-art {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    overflow: hidden;
    background:
        radial-gradient(circle at 25% 20%, rgba(255, 179, 71, 0.22), transparent 34%),
        linear-gradient(145deg, #1b120c, #33190a);
    border: 1px solid rgba(255, 138, 28, 0.38);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 10px 22px rgba(0, 0, 0, 0.22);
}

.roleplay-menu-art::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 10px;
    border: 1px solid rgba(255, 179, 71, 0.24);
    pointer-events: none;
}

.roleplay-menu-art span {
    position: relative;
    z-index: 1;
    color: #ffb347;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 16px rgba(255, 138, 28, 0.28);
}

.roleplay-menu-copy {
    display: grid;
    min-width: 0;
}

.roleplay-menu-copy strong {
    line-height: 1.25;
    font-size: 0.98rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.roleplay-menu-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.roleplay-menu-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    color: rgba(255, 235, 210, 0.92);
    background: rgba(255, 138, 28, 0.12);
    border: 1px solid rgba(255, 179, 71, 0.18);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.roleplay-menu-arrow {
    color: rgba(255, 179, 71, 0.82);
    font-size: 1.45rem;
    line-height: 1;
    justify-self: end;
    transform: translateY(-1px);
}

.roleplay-story-card {
    position: relative;
    overflow: hidden;
}

.ticket-list,
.ticket-thread {
    display: grid;
    gap: 12px;
}

.ticket-card {
    display: grid;
    gap: 7px;
    padding: 14px 16px;
    color: var(--text);
    text-decoration: none;
    border: 1px solid rgba(255, 138, 28, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ticket-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 179, 71, 0.32);
    background: rgba(255, 138, 28, 0.08);
}

.ticket-card small {
    color: var(--muted);
}

.ticket-status {
    width: max-content;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 800;
    background: rgba(255, 138, 28, 0.14);
    border: 1px solid rgba(255, 138, 28, 0.18);
}

.ticket-status-closed {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
    color: var(--muted);
}

.ticket-status-answered {
    background: rgba(58, 180, 114, 0.14);
    border-color: rgba(58, 180, 114, 0.22);
}

.ticket-head-badges {
    margin-top: 10px;
}

.ticket-thread-card {
    padding: 16px;
}

.ticket-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.ticket-message.is-own {
    flex-direction: row-reverse;
}

.ticket-message-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    object-fit: cover;
    flex: 0 0 auto;
}

.ticket-message-card {
    display: grid;
    gap: 8px;
    max-width: min(78%, 760px);
    padding: 14px 16px;
    border: 1px solid rgba(255, 138, 28, 0.10);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(22, 22, 22, 0.98), rgba(9, 9, 9, 0.98));
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

.ticket-message.is-own .ticket-message-card {
    background: linear-gradient(135deg, rgba(72, 36, 10, 0.96), rgba(36, 20, 8, 0.98));
    border-color: rgba(255, 179, 71, 0.18);
}

.ticket-message.is-staff .ticket-message-card {
    border-color: rgba(255, 138, 28, 0.26);
}

.ticket-message-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.ticket-message-meta a {
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
}

.ticket-message time {
    color: var(--muted);
    font-size: 0.82rem;
}

.ticket-message-body {
    color: var(--text);
    line-height: 1.65;
    word-break: break-word;
}

.ticket-message-image-link {
    display: block;
    margin-top: 8px;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 18px !important;
}

.ticket-message-image-link:hover {
    transform: none !important;
    background: transparent !important;
}

.ticket-message-image {
    display: block;
    width: 100%;
    max-width: min(420px, 100%);
    max-height: 420px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
}

@media (max-width: 680px) {
    .ticket-thread-card {
        padding: 12px;
    }

    .ticket-message {
        gap: 8px;
    }

    .ticket-message-avatar {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .ticket-message-card {
        max-width: calc(100vw - 86px);
        padding: 11px 12px;
        border-radius: 16px;
    }

    .ticket-message-meta {
        gap: 6px;
        font-size: 0.72rem;
    }

    .ticket-message-body {
        line-height: 1.45;
        font-size: 0.94rem;
    }
}

.roleplay-story-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 18% 0%, rgba(255, 138, 28, 0.12), transparent 34%);
}

.roleplay-story-current {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
    padding: 16px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.20);
    border: 1px solid rgba(255, 138, 28, 0.16);
}

.roleplay-story-current h3 {
    margin: 10px 0 8px;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.roleplay-story-current p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.roleplay-story-meta {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: right;
}

.roleplay-story-list {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.roleplay-story-list a {
    display: inline-flex;
    align-items: flex-start;
    flex-direction: column;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 138, 28, 0.12);
}

.roleplay-story-list a:hover {
    background: rgba(255, 138, 28, 0.11);
}

.roleplay-story-list a small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.25;
}

.roleplay-active-threads-card {
    position: relative;
    overflow: hidden;
}

.roleplay-active-threads-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(255, 159, 67, 0.08), transparent 30%);
}

.roleplay-active-threads-list {
    position: relative;
    display: grid;
    gap: 10px;
}

.roleplay-active-thread-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.roleplay-active-thread-item:hover {
    border-color: rgba(255, 138, 28, 0.24);
    background: rgba(255, 138, 28, 0.08);
    transform: translateY(-1px);
}

.roleplay-active-thread-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.roleplay-active-thread-copy strong,
.roleplay-active-thread-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roleplay-active-thread-copy small {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.3;
}

.roleplay-active-thread-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #ffe1ba;
    font-size: 0.78rem;
    white-space: nowrap;
}

.roleplay-rank-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.roleplay-rank-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 138, 28, 0.14);
}

.roleplay-rank-tab span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    color: #111;
    background: var(--accent);
    font-size: 0.78rem;
}

.roleplay-rank-tab:hover,
.roleplay-rank-tab.is-active {
    color: var(--accent-strong);
    background: rgba(255, 138, 28, 0.13);
    border-color: rgba(255, 138, 28, 0.36);
}

.roleplay-missions-page,
.technique-page,
.technique-school-page {
    display: grid;
    gap: 18px;
}

.roleplay-missions-page .profile-panel,
.technique-page .profile-panel,
.technique-school-page .profile-panel {
    position: relative;
    overflow: hidden;
}

.roleplay-missions-page .profile-panel::before,
.technique-page .profile-panel::before,
.technique-school-page .profile-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(255, 159, 67, 0.08), transparent 30%);
}

.roleplay-missions-page .profile-panel,
.technique-page-hero,
.technique-school-hero {
    background:
        linear-gradient(180deg, rgba(255, 159, 67, 0.05), rgba(255, 255, 255, 0.02)),
        var(--panel);
}

.mission-board-card,
.technique-card-modern,
.technique-rank-card {
    border-radius: 22px;
    border: 1px solid rgba(255, 159, 67, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 159, 67, 0.06), rgba(255, 255, 255, 0.025)),
        rgba(15, 16, 21, 0.86);
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mission-board-card .roleplay-card-body,
.technique-card-modern .character-modern-body,
.technique-rank-card .character-modern-body {
    display: grid;
    gap: 14px;
}

.mission-board-card .profile-badges,
.technique-card-modern .news-links,
.technique-rank-card .news-actions {
    gap: 8px;
}

.mission-board-card p,
.technique-card-modern p,
.technique-rank-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.62;
}

.mission-board-card .profile-badge,
.technique-card-modern .profile-badge,
.technique-rank-card .profile-badge {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 159, 67, 0.16);
}

.technique-page-hero {
    padding: 20px;
    border-radius: 24px;
}

.technique-grid {
    align-items: stretch;
}

.technique-subcategory-grid {
    margin-bottom: 18px;
}

.technique-school-page .character-grid-wide.technique-school-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    align-items: stretch;
    justify-content: start;
}

.technique-school-page .character-grid-wide.technique-school-grid > .technique-rank-card:only-child {
    max-width: 520px;
}

.technique-page .character-grid-wide.technique-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    align-items: stretch;
    justify-content: start;
}

.technique-page .character-grid-wide.technique-grid > .technique-card-modern:only-child {
    max-width: 520px;
}

.technique-card-modern {
    min-height: 100%;
    height: 100%;
}

.technique-card-modern .character-modern-image,
.technique-rank-image {
    border-bottom: 1px solid rgba(255, 159, 67, 0.12);
}

.technique-description {
    padding: 14px 16px;
    border: 1px solid rgba(255, 159, 67, 0.16);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 159, 67, 0.05), rgba(255, 255, 255, 0.03)),
        rgba(255, 255, 255, 0.025);
}

.technique-card-modern .profile-info-item {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 159, 67, 0.1);
}

.technique-card-modern .profile-info-item span:first-child {
    color: #ffd4ae;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mission-review-form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 138, 28, 0.12);
}

.character-mission-ranks {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.character-mission-rank {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.028);
    border: 1px solid rgba(255, 138, 28, 0.12);
}

.character-mission-rank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.character-mission-rank-head h3 {
    margin: 0;
    font-size: 1rem;
}

.character-mission-rank-head span {
    color: var(--muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.character-game-sheet {
    display: grid;
    gap: 18px;
}

.character-game-hero {
    display: grid;
    grid-template-columns: minmax(170px, 240px) 1fr;
    gap: 22px;
    align-items: center;
}

.character-game-avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: none;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(255, 138, 28, 0.22);
    background: rgba(255, 255, 255, 0.04);
}

.character-vitals-shell {
    position: relative;
    display: block;
    width: 100%;
    isolation: isolate;
    --life-progress: 100;
    --chakra-progress: 100;
}

.character-vitals-shell-hero {
    max-width: 248px;
}

.character-vitals-shell-sidebar {
    width: 76px;
    flex: 0 0 76px;
}

.character-vitals-shell-post {
    width: 82px;
    flex: 0 0 82px;
}

.character-vitals-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}

.character-vitals-ring::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 4px;
    background: conic-gradient(var(--ring-color) calc(var(--ring-progress) * 1%), rgba(255, 255, 255, 0.08) 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.character-vitals-ring-life {
    --ring-color: #ff6b58;
    --ring-progress: var(--life-progress);
}

.character-vitals-ring-chakra {
    inset: 10px;
    border-radius: 50%;
    --ring-color: #39c6ff;
    --ring-progress: var(--chakra-progress);
}

.character-vitals-shell-hero .character-game-avatar {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    border-radius: 50%;
    padding: 14px;
    box-sizing: border-box;
    max-height: none;
}

.character-vitals-shell-sidebar .character-summary-avatar {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    padding: 12px;
    box-sizing: border-box;
    border-radius: 50%;
    flex: 0 0 auto;
}

.character-vitals-shell-post .thread-post-character img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    padding: 12px;
    box-sizing: border-box;
    border-radius: 50%;
}

.character-vitals-legend {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: grid;
    gap: 6px;
}

.character-vitals-chip {
    display: inline-flex;
    align-items: center;
    align-self: start;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff7ed;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    backdrop-filter: blur(8px);
    background: rgba(7, 7, 7, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.character-vitals-chip-life {
    box-shadow: inset 0 0 0 1px rgba(255, 107, 88, 0.18);
}

.character-vitals-chip-chakra {
    box-shadow: inset 0 0 0 1px rgba(57, 198, 255, 0.18);
}

.character-avatar-panel {
    display: grid;
    gap: 10px;
    align-self: start;
    width: min(260px, 100%);
}

.character-avatar-panel .character-game-avatar {
    width: 100%;
    padding: 0;
    border-radius: 18px;
}

.character-avatar-vitals {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.character-avatar-vitals .character-vitals-chip {
    justify-content: center;
    width: 100%;
    border-radius: 10px;
    background: rgba(20, 20, 24, 0.86);
}

.character-formula-table-wrap {
    grid-column: 1 / -1;
    overflow-x: auto;
}

.character-formula-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 138, 28, 0.12);
}

.character-formula-table th,
.character-formula-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
}

.character-formula-table th {
    color: var(--muted);
    font-weight: 700;
}

.character-formula-table tr:last-child th,
.character-formula-table tr:last-child td {
    border-bottom: 0;
}

.character-bonus-table-wrap .character-formula-table th,
.character-bonus-table-wrap .character-formula-table td {
    padding: 8px 12px;
}

.character-grant-token-form {
    display: inline-flex;
    margin: 0;
}

.character-grant-token-form button {
    white-space: nowrap;
}

.character-scroll-field {
    align-content: start;
}

.character-scroll-field-strong {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
}

.character-scroll-field-image {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(40, 92, 164, 0.22));
}

.character-game-main {
    display: grid;
    gap: 12px;
}

.character-game-main h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
}

.character-game-grid,
.character-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

/* Scroll icon alignment lock. */
.character-scroll-field-strong,
.scroll-label-inline,
.scroll-icon-button {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

.scroll-label-inline {
    flex-wrap: wrap;
}

.profile-badge.character-scroll-field-strong {
    display: inline-flex !important;
}

.scroll-icon-button .character-scroll-field-image,
.scroll-label-inline .character-scroll-field-image {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
}

.button.scroll-icon-button .character-scroll-field-image,
.button-secondary.scroll-icon-button .character-scroll-field-image {
    width: 24px;
    height: 24px;
}

/* Quote-like compact blocks. */
.profile-info-item,
.character-game-field,
.character-roleplay-page .character-roleplay-side-item,
.character-roleplay-page .character-roleplay-tag,
.character-roleplay-page .character-roleplay-counter-card,
.character-roleplay-page .character-roleplay-progress-card,
.character-roleplay-page .character-roleplay-parameter-card,
.character-roleplay-page .character-roleplay-biology-item,
.character-roleplay-page .character-roleplay-parameter-card-derived {
    position: relative;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background:
        linear-gradient(90deg, rgba(255, 186, 84, 0.11), rgba(255, 255, 255, 0.025) 46%, rgba(0, 0, 0, 0.1)) !important;
}

.profile-info-item::before,
.character-game-field::before,
.character-roleplay-page .character-roleplay-side-item::before,
.character-roleplay-page .character-roleplay-tag::before,
.character-roleplay-page .character-roleplay-counter-card::before,
.character-roleplay-page .character-roleplay-progress-card::before,
.character-roleplay-page .character-roleplay-parameter-card::before,
.character-roleplay-page .character-roleplay-biology-item::before,
.character-roleplay-page .character-roleplay-parameter-card-derived::before {
    content: "";
    position: absolute;
    inset: 5px auto 5px 0;
    width: 3px;
    border-radius: 99px;
    background: linear-gradient(180deg, var(--accent), rgba(255, 106, 0, 0.42));
    box-shadow: 0 0 12px rgba(255, 138, 0, 0.18);
    pointer-events: none;
}

.profile-info-item:nth-child(even)::before,
.character-game-field:nth-child(even)::before,
.character-roleplay-page .character-roleplay-side-item:nth-child(even)::before,
.character-roleplay-page .character-roleplay-tag:nth-child(even)::before,
.character-roleplay-page .character-roleplay-counter-card:nth-child(even)::before,
.character-roleplay-page .character-roleplay-parameter-card:nth-child(even)::before,
.character-roleplay-page .character-roleplay-biology-item:nth-child(even)::before,
.character-roleplay-page .character-roleplay-parameter-card-derived:nth-child(even)::before,
.character-roleplay-page .character-roleplay-resource-card::before {
    right: 0;
    left: auto;
}

.character-roleplay-page .character-roleplay-resource-card::before {
    inset: 5px 0 5px auto;
}

.character-game-field {
    display: grid;
    gap: 6px;
    min-height: 74px;
    padding: 13px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 138, 28, 0.12);
}

.character-game-field span {
    color: var(--muted);
    font-size: 0.84rem;
}

.character-game-field strong {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--text);
}

.character-game-field-media a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.character-game-mini-image {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 138, 28, 0.2);
}

.character-rank-icon {
    width: auto;
    height: 74px;
    max-width: 150px;
    object-fit: contain;
    flex: 0 0 auto;
    border-radius: 0;
    padding: 0;
    background: transparent;
    border: 0;
    vertical-align: middle;
}

.character-rank-icon-small {
    width: auto;
    height: 42px;
    max-width: 96px;
    border-radius: 0;
}

.character-rank-line,
.character-summary-rank {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 0.92em;
    line-height: 1.2;
}

.character-rank-block {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.15;
}

.character-rank-block span {
    font-size: 0.92em;
}

.character-stub-link {
    justify-self: start;
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.82rem;
}

.character-stat-bars {
    display: grid;
    gap: 12px;
}

.character-advanced-stats-section {
    display: grid;
    gap: 16px;
}

.character-biology-spoiler > .character-biology-layout,
.character-biology-spoiler > div.character-biology-layout {
    margin-top: 1rem;
}

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

.character-biology-group {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
}

.character-biology-group-head {
    display: grid;
    gap: 4px;
}

.character-biology-group-head h3 {
    margin: 0;
    font-size: 1rem;
}

.character-biology-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.character-advanced-stats-grid,
.character-derived-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.character-advanced-stat-card,
.character-derived-stat-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.character-advanced-stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.character-advanced-stat-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 159, 67, 0.14);
    border: 1px solid rgba(255, 159, 67, 0.18);
    color: #ffd9a8;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.character-advanced-stat-head strong {
    font-size: 1rem;
    line-height: 1.35;
}

.character-advanced-stat-level {
    color: var(--text);
    font-weight: 700;
}

.character-advanced-stat-metric {
    color: #ffd7a7;
    font-size: 0.92rem;
    font-weight: 700;
}

.character-advanced-stat-description,
.character-advanced-stat-affects {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.character-advanced-stat-notes {
    display: grid;
    gap: 10px;
}

.character-advanced-stat-note {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 159, 67, 0.08);
    border: 1px solid rgba(255, 159, 67, 0.16);
    color: var(--text);
    line-height: 1.5;
}

.character-stat-bar {
    display: grid;
    gap: 8px;
    padding: 13px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 138, 28, 0.12);
    overflow: hidden;
}

.character-stat-bar div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.character-stat-bar span {
    color: var(--muted);
}

.character-stat-bar i {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff5b4f, #ffb347);
}

.character-stat-bar-chakra i {
    background: linear-gradient(90deg, #28b7ff, #73e2ff);
}

.character-distribute-form label {
    display: grid;
    gap: 8px;
}

.character-distribute-form label > span {
    color: var(--text);
    font-weight: 800;
}

.character-distribute-form small {
    color: var(--muted);
    line-height: 1.45;
}

.character-distribute-page .character-advanced-stats-grid {
    align-items: stretch;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.character-distribute-page .character-advanced-stat-card {
    align-content: start;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(44px, auto) minmax(64px, auto) auto auto;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.character-distribute-page .character-advanced-stat-head {
    align-items: flex-start;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.character-distribute-page .character-advanced-stat-head > div {
    display: grid;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.character-distribute-page .character-advanced-stat-head h3 {
    margin: 0;
    line-height: 1.25;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.character-distribute-page .character-advanced-stat-level {
    flex: 0 0 auto;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}

.character-distribute-page .character-advanced-stat-metric,
.character-distribute-page .character-advanced-stat-affects {
    line-height: 1.45;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.character-distribute-page .character-advanced-stat-metric {
    align-self: start;
    min-height: 44px;
}

.character-distribute-page .character-advanced-stat-affects {
    align-self: start;
    min-height: 64px;
}

.character-distribute-page .character-advanced-stat-card .character-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.character-distribute-page .character-advanced-stat-card .character-game-field {
    min-height: 0;
    padding: 10px 11px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.character-distribute-page .character-advanced-stat-card .character-game-field strong {
    line-height: 1.25;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.character-distribute-upgrade-form {
    display: block;
    align-self: end;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 2px;
    box-sizing: border-box;
    overflow: hidden;
}

.character-distribute-upgrade-form button {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: center;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 560px) {
    .character-distribute-page .character-advanced-stat-card .character-game-grid {
        grid-template-columns: 1fr;
    }

    .character-distribute-page .character-advanced-stat-head {
        display: grid;
        justify-items: start;
    }
}

.character-distribute-summary {
    align-content: center;
}

.character-distribute-summary .is-over-limit {
    color: #ff7a7a;
}

.character-battle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.character-battle-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 138, 28, 0.12);
}

.character-battle-card span {
    color: var(--muted);
}

.character-battle-card strong {
    font-size: 1.7rem;
}

.character-technique-ranks {
    display: grid;
    gap: 16px;
}

.character-editor-page .trait-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.character-editor-page .trait-inline-form {
    display: block;
}

.character-editor-page .trait-inline-form > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.character-editor-page .trait-inline-card {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.character-editor-page .trait-inline-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.character-editor-page .trait-inline-card strong {
    font-size: .95rem;
    line-height: 1.2;
}

.character-editor-page .trait-inline-form > input:checked + .trait-inline-card {
    border-color: rgba(99, 179, 255, 0.5);
    background: rgba(99, 179, 255, 0.08);
}

.character-editor-page .trait-inline-form:hover .trait-inline-card {
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .character-compact-grid,
    .character-trait-admin-grid {
        grid-template-columns: 1fr;
    }

    .character-compact-card {
        max-width: 100%;
    }

    .character-element-option,
    .character-trait-chip {
        width: 100%;
        justify-content: flex-start;
    }

    .character-rank-icon {
        height: 46px;
        max-width: 102px;
    }

    .character-rank-icon-small {
        height: 30px;
        max-width: 68px;
    }

    .roleplay-village-menu-card {
        grid-template-columns: 1fr;
    }

    .roleplay-menu-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .roleplay-menu-list-item {
        grid-template-columns: 40px minmax(0, 1fr) 18px;
        min-height: 58px;
        padding: 10px 12px;
        border-radius: 16px;
    }

    .roleplay-menu-art {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .roleplay-menu-copy strong {
        font-size: 0.92rem;
    }

    .roleplay-menu-badges {
        gap: 4px;
        margin-top: 6px;
    }

    .roleplay-menu-badges span {
        min-height: 20px;
        padding: 3px 7px;
        font-size: 0.68rem;
    }

    .roleplay-menu-arrow {
        font-size: 1.22rem;
    }

    .roleplay-counter {
        flex: 1 1 100%;
        justify-content: center;
    }

    .roleplay-story-current {
        grid-template-columns: 1fr;
    }

    .roleplay-story-meta {
        text-align: left;
    }

    .character-mission-rank {
        padding: 12px;
    }

    .character-mission-rank-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .character-game-hero {
        grid-template-columns: 1fr;
    }

    .character-vitals-shell-hero {
        max-width: 260px;
    }

    .character-vitals-legend {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .character-vitals-chip {
        font-size: 0.72rem;
        min-height: 26px;
        padding: 5px 9px;
    }

    .character-battle-grid {
        grid-template-columns: 1fr;
    }
}

.battle-page {
    display: grid;
    gap: 18px;
}

.battle-list {
    display: grid;
    gap: 10px;
}

.battle-list-item,
.battle-participant,
.battle-character-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 138, 28, 0.16);
    border-radius: 18px;
    background: rgba(15, 18, 24, 0.74);
    color: var(--text);
    text-decoration: none;
}

.battle-list-item:hover,
.battle-participant:hover,
.battle-character-option:hover {
    border-color: rgba(255, 138, 28, 0.42);
    background: rgba(28, 23, 18, 0.9);
}

.battle-participant.is-current-turn {
    border-color: var(--accent-strong);
    background: linear-gradient(135deg, var(--accent-soft), rgba(15, 18, 24, 0.86));
    box-shadow: 0 0 0 1px var(--accent-soft) inset, 0 14px 32px rgba(0, 0, 0, 0.22);
}

.battle-current-turn-badge {
    width: fit-content;
    margin-top: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 900;
}

.battle-list-item span,
.battle-participant span,
.battle-participant-body,
.battle-character-option span {
    display: grid;
    gap: 3px;
}

.battle-list-item small,
.battle-participant small,
.battle-character-option small {
    color: var(--muted);
}

.battle-character-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0;
}

.battle-character-vitals,
.battle-character-equipment > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.battle-character-equipment {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.battle-character-equipment > span {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.battle-character-stats em {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.08);
    color: var(--text);
    font-size: 0.78rem;
    font-style: normal;
    line-height: 1.2;
}

.battle-character-vitals em,
.battle-character-equipment em,
.battle-character-equipment strong {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    color: var(--text);
    font-size: 0.78rem;
    font-style: normal;
    line-height: 1.2;
}

.battle-village-chip img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.battle-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 138, 28, 0.24);
    background: rgba(255, 138, 28, 0.12);
    color: var(--accent-strong);
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.battle-status-closed,
.battle-result-win {
    border-color: rgba(78, 213, 130, 0.34);
    background: rgba(78, 213, 130, 0.12);
    color: #7df0a9;
}

.battle-result-loss {
    border-color: rgba(255, 92, 92, 0.34);
    background: rgba(255, 92, 92, 0.12);
    color: #ff9b9b;
}

.battle-result-draw {
    border-color: rgba(255, 209, 102, 0.34);
    background: rgba(255, 209, 102, 0.12);
    color: #ffe08a;
}

.battle-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.battle-meta-grid > div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.battle-location-create-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: start;
}

.battle-location-card,
.battle-location-admin-card {
    display: grid;
    grid-template-columns: minmax(160px, 260px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-top: 14px;
    border: 1px solid rgba(89, 164, 255, 0.22);
    border-radius: 14px;
    padding: 14px;
    background: rgba(10, 24, 44, 0.5);
}

.battle-location-card img,
.battle-location-admin-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.battle-location-card h3,
.battle-location-admin-card h3 {
    margin: 4px 0 6px;
}

.battle-location-description {
    margin-top: 8px;
}

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

.battle-location-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mission-editor-form {
    display: grid;
    gap: 18px;
}

.mission-form-section {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(89, 164, 255, 0.18);
    border-radius: 14px;
    background: rgba(10, 24, 44, 0.34);
}

.mission-form-section h2 {
    margin: 0;
    font-size: 1.18rem;
    color: var(--text);
}

.mission-checkbox-grid {
    margin-top: 12px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.mission-form-actions {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    padding: 12px;
    border: 1px solid rgba(89, 164, 255, 0.18);
    border-radius: 14px;
    background: rgba(8, 18, 34, 0.92);
    backdrop-filter: blur(12px);
}

.battle-description {
    margin-top: 14px;
    color: var(--muted);
    line-height: 1.65;
}

.battle-participants,
.battle-character-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.battle-team-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.battle-team-size-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 10px;
}

.battle-team-size-field {
    margin: 0;
}

.battle-team-picker[hidden],
.battle-team-size-field[hidden] {
    display: none !important;
}

.battle-picker-spoiler {
    margin-top: 12px;
    border-radius: 18px;
    border: 1px solid var(--panel-border);
    background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--panel) 78%, transparent));
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

.battle-picker-spoiler summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 13px 16px;
    cursor: pointer;
    color: var(--text);
    font-weight: 900;
    letter-spacing: 0.01em;
    list-style: none;
    background: color-mix(in srgb, var(--panel-strong) 78%, transparent);
    transition: background 0.18s ease, color 0.18s ease;
}

.battle-picker-spoiler summary::-webkit-details-marker {
    display: none;
}

.battle-picker-spoiler summary::after {
    content: "";
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-right: 2px solid var(--accent-strong);
    border-bottom: 2px solid var(--accent-strong);
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.battle-picker-spoiler[open] summary {
    background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--panel-strong) 72%, transparent));
    color: var(--text);
}

.battle-picker-spoiler[open] summary::after {
    transform: rotate(225deg);
}

.battle-picker-spoiler > .battle-team-picker-grid {
    padding: 14px;
}

.battle-team-picker {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 138, 28, 0.14);
    background: rgba(255, 255, 255, 0.035);
}

.battle-team-picker .battle-character-picker {
    grid-template-columns: 1fr;
}

.battle-team-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.battle-team-picker-head strong {
    color: var(--text);
}

.battle-team-picker-head small {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 138, 28, 0.12);
    color: var(--muted);
}

.battle-participant,
.battle-character-option {
    justify-content: flex-start;
}

.battle-character-option {
    position: relative;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.battle-participant img,
.battle-character-option img,
.battle-post img {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(255, 138, 28, 0.22);
}

.battle-character-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.battle-character-option::after {
    content: "";
    width: 22px;
    height: 22px;
    margin-left: auto;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: inset 0 0 0 4px rgba(10, 12, 18, 0.82);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.battle-character-option:has(input:checked) {
    border-color: rgba(255, 138, 28, 0.56);
    background: linear-gradient(135deg, rgba(255, 138, 28, 0.18), rgba(15, 18, 24, 0.86));
    box-shadow: 0 0 0 1px rgba(255, 138, 28, 0.16) inset, 0 14px 30px rgba(0, 0, 0, 0.22);
}

.battle-character-option:has(input:checked)::after {
    border-color: rgba(255, 188, 105, 0.9);
    background: var(--accent);
    box-shadow: inset 0 0 0 5px rgba(10, 12, 18, 0.86), 0 0 16px rgba(255, 138, 28, 0.32);
}

.battle-character-option.is-battle-unit-locked,
.battle-character-option:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.48;
    filter: grayscale(0.35);
}

.profile-badge:has(input[type="checkbox"]) {
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 34px;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.profile-badge:has(input[type="checkbox"]:checked) {
    border-color: rgba(255, 188, 105, 0.86);
    background: linear-gradient(135deg, rgba(255, 138, 28, 0.36), rgba(255, 199, 112, 0.12));
    color: #fff4e3;
    box-shadow: 0 0 0 1px rgba(255, 138, 28, 0.3) inset, 0 12px 28px rgba(255, 138, 28, 0.14);
}

.profile-badge:has(input[type="checkbox"]:checked)::after {
    content: "\2713";
    display: grid;
    width: 20px;
    height: 20px;
    position: absolute;
    right: 8px;
    top: 50%;
    place-items: center;
    transform: translateY(-50%);
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd17a, var(--accent));
    color: #120902;
    font-size: 0.78rem;
    font-weight: 900;
    box-shadow: 0 0 16px rgba(255, 138, 28, 0.38);
}

.battle-post-list {
    display: grid;
    gap: 14px;
}

.battle-post {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(12, 14, 18, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.battle-post header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.battle-post time {
    color: var(--muted);
    font-size: 0.85rem;
}

.battle-post p {
    margin: 0;
    color: var(--text);
    line-height: 1.65;
}

.battle-reply-form {
    margin-top: 18px;
}

.battle-equipment-picker {
    display: grid;
    gap: 12px;
    margin: 12px 0 8px;
    padding: 12px;
    border: 1px solid rgba(249, 115, 22, 0.22);
    border-radius: 18px;
    background: rgba(14, 14, 18, 0.72);
}

.battle-equipment-picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.battle-equipment-picker-head span {
    color: var(--text);
    font-weight: 800;
}

.battle-equipment-picker-head small {
    color: var(--muted);
    font-size: 0.86rem;
}

.battle-equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.battle-equipment-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
}

.battle-equipment-option span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.battle-equipment-option strong {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.battle-equipment-option em {
    color: var(--muted);
    font-size: 0.84rem;
    font-style: normal;
}

.battle-equipment-option input {
    min-width: 0;
}

.battle-result-adjustments {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.battle-result-adjustments .section-kicker {
    display: inline-flex;
    margin-bottom: 10px;
}

.battle-result-participant-list {
    display: grid;
    gap: 14px;
}

.battle-result-participant-card {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.battle-result-participant-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.battle-result-participant-head img {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--panel-border);
}

.battle-result-participant-head div,
.battle-result-participant-section {
    display: grid;
    gap: 6px;
}

.battle-result-participant-head strong {
    color: var(--text);
}

.battle-result-participant-head small {
    color: var(--muted);
}

.battle-result-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.battle-turn-order {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.battle-turn-order-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 170px;
    padding: 9px 11px;
    border-radius: 16px;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.035);
}

.battle-turn-order-item.is-current {
    border-color: var(--accent-strong);
    background: var(--accent-soft);
}

.battle-turn-order-item img,
.battle-turn-order-examiner-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--panel-border);
}

.battle-turn-order-examiner-icon {
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 900;
}

.battle-turn-order-item span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.battle-turn-order-item strong {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.battle-turn-order-item small {
    color: var(--muted);
}

.battle-equipment-used {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    margin: 8px 0 10px;
    padding: 7px 10px;
    border: 1px solid rgba(249, 115, 22, 0.28);
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.11);
    color: var(--muted);
    font-size: 0.86rem;
}

.battle-equipment-used strong {
    color: var(--text);
}

.battle-equipment-used span {
    color: var(--muted);
}

.battle-technique-picker {
    margin: 14px 0 8px;
    padding: 14px;
    border: 1px solid rgba(249, 115, 22, 0.22);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(14, 14, 18, 0.82), rgba(33, 24, 17, 0.72));
}

.battle-technique-picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.battle-technique-picker-head span,
.battle-resource-head span {
    color: var(--text);
    font-weight: 800;
}

.battle-technique-picker-head small,
.battle-technique-total {
    color: var(--muted);
    font-size: 0.86rem;
}

.battle-technique-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.battle-hidden-message-field {
    border-color: rgba(96, 165, 250, 0.28);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(15, 23, 42, 0.24));
}

.battle-hidden-action {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid rgba(96, 165, 250, 0.34);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.18), rgba(15, 23, 42, 0.28));
}

.battle-hidden-action > span {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.16);
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.battle-hidden-action p {
    margin: 0;
}

.battle-hidden-action.is-locked {
    border-style: dashed;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
}

.battle-hidden-action.is-locked > span {
    background: rgba(255, 255, 255, 0.07);
    color: var(--muted);
}

.battle-artifact-activation-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.battle-artifact-activate-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.battle-artifact-activate-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.battle-artifact-activate-card-head img {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.22);
}

.battle-artifact-activate-card-head span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.battle-artifact-activate-card-head strong {
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.battle-artifact-activate-card-head em,
.battle-artifact-activate-card small {
    color: var(--muted);
    font-size: 0.84rem;
    font-style: normal;
}

.battle-technique-option {
    cursor: pointer;
}

.battle-technique-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.battle-technique-option span,
.battle-technique-used {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.battle-technique-option input:checked + span {
    border-color: rgba(249, 115, 22, 0.58);
    background: rgba(249, 115, 22, 0.14);
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.18) inset;
}

.battle-technique-option span:hover,
.battle-technique-used:hover {
    transform: translateY(-1px);
    border-color: rgba(249, 115, 22, 0.38);
}

.battle-technique-option img,
.battle-technique-used img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
}

.battle-technique-option strong,
.battle-technique-used strong {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.battle-technique-option em,
.battle-technique-used em {
    color: #f59e0b;
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.battle-technique-total {
    display: inline-flex;
    margin-top: 10px;
}

.battle-techniques-used {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 42%),
        rgba(12, 12, 16, 0.74);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.battle-technique-used-list {
    display: grid;
    gap: 8px;
}

.battle-resource-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.battle-resource-head strong {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.18);
    color: #f59e0b;
    font-size: 0.88rem;
}

.battle-technique-selected-preview {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(249, 115, 22, 0.08);
    border: 1px dashed rgba(249, 115, 22, 0.28);
}

.battle-technique-selected-preview[hidden] {
    display: none;
}

.battle-technique-selected-preview span {
    color: var(--text);
    font-weight: 800;
}

.battle-technique-selected-preview div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.battle-technique-selected-preview em {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-style: normal;
    font-size: 0.85rem;
}

.battle-technique-status {
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.84rem;
}

.battle-technique-status-pending {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
}

.battle-technique-status-confirmed {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

.battle-technique-status-rejected {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

.battle-technique-review-panel {
    border-color: rgba(245, 158, 11, 0.32);
}

.battle-technique-review-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.battle-technique-review-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(249, 115, 22, 0.22);
    border-radius: 16px;
    background: rgba(14, 14, 18, 0.72);
}

.battle-technique-review-card > div:first-child {
    display: grid;
    gap: 4px;
}

.battle-technique-review-card small {
    color: var(--muted);
}

.battle-technique-review-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.battle-technique-review-techs em {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.1);
    color: var(--text);
    font-size: 0.84rem;
    font-style: normal;
}

.battle-technique-review-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
    margin: 0;
}

.battle-review-action-group {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
}

.battle-review-action-group > span {
    width: 100%;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.battle-hp-review-actions {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.battle-review-hp-field {
    display: grid;
    gap: 4px;
    min-width: 130px;
}

.battle-review-hp-field span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.battle-review-hp-field input {
    width: 120px;
}

.battle-review-target-field {
    min-width: 220px;
}

.battle-review-target-field select {
    width: 100%;
}

.battle-focus-chakra-field {
    margin-top: 12px;
}

.inline-action-form {
    display: inline-flex;
    align-items: stretch;
    margin: 0;
    width: 100%;
}

.inline-action-form > .button,
.inline-action-form > .button-secondary,
.inline-action-form > .button-danger,
.inline-action-form > button {
    width: 100%;
}

.battle-history-tabs {
    margin-bottom: 0;
}

.roleplay-task-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.roleplay-task-card {
    min-height: 100%;
}

.roleplay-task-progress {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 138, 28, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.roleplay-task-progress div {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.roleplay-task-progress span {
    color: var(--muted);
}

.roleplay-task-progress i {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    box-shadow: 0 0 18px rgba(255, 138, 28, 0.28);
}

.button-secondary.is-disabled {
    pointer-events: none;
    opacity: 0.62;
}

.artifact-page {
    display: grid;
    gap: 18px;
}

.artifact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.artifact-card {
    overflow: hidden;
    min-height: 100%;
    border-radius: 22px;
    border: 1px solid rgba(255, 138, 28, 0.18);
    background: linear-gradient(145deg, rgba(20, 18, 17, 0.94), rgba(10, 11, 14, 0.94));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.artifact-card-media {
    display: block;
    padding: 12px 12px 0;
}

.artifact-card-media img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(255, 138, 28, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.artifact-card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.artifact-card-body h3 {
    margin: 0;
    font-size: 1.08rem;
}

.artifact-card-body p,
.artifact-detail-text p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.artifact-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.artifact-meta-list span,
.artifact-slot small {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.84rem;
}

.artifact-detail {
    display: grid;
    grid-template-columns: minmax(170px, 260px) 1fr;
    gap: 20px;
    align-items: start;
}

.artifact-detail > img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(255, 138, 28, 0.24);
    background: rgba(255, 255, 255, 0.04);
}

.artifact-detail-copy,
.artifact-detail-text {
    display: grid;
    gap: 14px;
}

.artifact-slot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.artifact-slot {
    display: grid;
    gap: 8px;
    padding: 13px;
    border-radius: 18px;
    border: 1px solid rgba(255, 138, 28, 0.16);
    background: rgba(255, 255, 255, 0.045);
}

.artifact-slot strong {
    color: var(--text);
}

.artifact-transfer-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 138, 28, 0.16);
}

.artifact-transfer-preview img {
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    border-radius: 16px;
    object-fit: contain;
    object-position: center;
    padding: 6px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 138, 28, 0.2);
}

.artifact-market-form {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding-top: 4px;
}

.artifact-market-form input {
    width: 100%;
    min-width: 0;
}

.roleplay-rules-page {
    display: grid;
    gap: 18px;
}

.rules-notice {
    border-color: rgba(255, 138, 28, 0.22);
    background: linear-gradient(135deg, rgba(255, 138, 28, 0.1), rgba(255, 255, 255, 0.035));
}

.landing-preview-body {
    margin: 0;
    min-height: 100vh;
    background: #f5f0e8;
    color: #17211b;
    font-family: "Manrope", "Montserrat", "Trebuchet MS", sans-serif;
}

.padel-landing {
    --padel-green: #173d2d;
    --padel-green-soft: #dfeade;
    --padel-lime: #d8ff56;
    --padel-sand: #f5f0e8;
    --padel-ink: #17211b;
    --padel-muted: #6c756f;
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 22px;
}

.padel-nav {
    position: sticky;
    top: 14px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border-radius: 999px;
    background: rgba(255, 252, 246, 0.86);
    border: 1px solid rgba(23, 61, 45, 0.1);
    box-shadow: 0 18px 60px rgba(23, 61, 45, 0.12);
    backdrop-filter: blur(18px);
}

.padel-brand,
.padel-nav-links,
.padel-actions,
.padel-stats,
.padel-contact-list {
    display: flex;
    align-items: center;
}

.padel-brand {
    gap: 10px;
    color: var(--padel-ink);
    text-decoration: none;
    font-weight: 900;
}

.padel-brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--padel-green);
    color: var(--padel-lime);
    font-size: 1.25rem;
}

.padel-nav-links {
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(23, 61, 45, 0.06);
}

.padel-nav-links a,
.padel-nav-cta {
    color: var(--padel-ink);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.92rem;
}

.padel-nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
}

.padel-nav-links a:hover {
    background: #ffffff;
}

.padel-nav-cta,
.padel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--padel-green);
    color: #ffffff;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(23, 61, 45, 0.2);
}

.padel-button-light {
    background: #ffffff;
    color: var(--padel-green);
    border: 1px solid rgba(23, 61, 45, 0.12);
    box-shadow: none;
}

.padel-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
    gap: 24px;
    align-items: stretch;
    min-height: 680px;
    padding: 26px 0 0;
}

.padel-hero-copy,
.padel-hero-visual,
.padel-section {
    border-radius: 42px;
    background: #fffaf1;
    border: 1px solid rgba(23, 61, 45, 0.09);
}

.padel-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 5vw, 70px);
}

.padel-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--padel-green-soft);
    color: var(--padel-green);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.padel-hero h1,
.padel-section h2 {
    margin: 18px 0 16px;
    color: var(--padel-ink);
    letter-spacing: -0.06em;
    line-height: 0.95;
}

.padel-hero h1 {
    font-size: clamp(3.3rem, 8vw, 7.6rem);
}

.padel-section h2 {
    font-size: clamp(2.1rem, 5vw, 4.6rem);
}

.padel-hero p,
.padel-section p,
.padel-check-list {
    color: var(--padel-muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.padel-actions {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.padel-stats {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 46px;
}

.padel-stats div {
    min-width: 136px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(23, 61, 45, 0.06);
}

.padel-stats strong {
    display: block;
    color: var(--padel-green);
    font-size: 1.7rem;
}

.padel-stats span {
    color: var(--padel-muted);
    font-size: 0.88rem;
}

.padel-hero-visual {
    position: relative;
    overflow: hidden;
    padding: 18px;
    background: var(--padel-green);
}

.padel-photo-placeholder {
    display: grid;
    place-items: center;
    min-height: 420px;
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(216, 255, 86, 0.26), rgba(255, 255, 255, 0.06)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 18px),
        rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.86);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.padel-photo-main {
    min-height: 100%;
}

.padel-floating-card {
    position: absolute;
    right: 40px;
    bottom: 40px;
    display: grid;
    gap: 4px;
    width: min(280px, calc(100% - 80px));
    padding: 20px;
    border-radius: 26px;
    background: var(--padel-lime);
    color: var(--padel-green);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.padel-section {
    margin-top: 24px;
    padding: clamp(24px, 4vw, 56px);
}

.padel-section-head {
    max-width: 860px;
}

.padel-section-head-row,
.padel-split,
.padel-booking,
.padel-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
    gap: 24px;
    align-items: center;
}

.padel-feature-grid,
.padel-price-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.padel-feature-grid article,
.padel-price-grid article {
    padding: 24px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(23, 61, 45, 0.08);
}

.padel-feature-grid span {
    color: var(--padel-green);
    font-weight: 900;
}

.padel-feature-grid h3,
.padel-price-grid h3 {
    margin: 14px 0 10px;
    color: var(--padel-ink);
    font-size: 1.35rem;
}

.padel-price-grid strong {
    display: block;
    color: var(--padel-green);
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.padel-price-grid .is-featured {
    background: var(--padel-green);
    color: #ffffff;
}

.padel-price-grid .is-featured h3,
.padel-price-grid .is-featured strong {
    color: #ffffff;
}

.padel-price-grid .is-featured p {
    color: rgba(255, 255, 255, 0.74);
}

.padel-check-list {
    display: grid;
    gap: 10px;
    padding-left: 20px;
}

.padel-booking {
    background: var(--padel-green);
    color: #ffffff;
}

.padel-booking h2,
.padel-booking .padel-kicker {
    color: #ffffff;
}

.padel-booking .padel-kicker {
    background: rgba(255, 255, 255, 0.13);
}

.padel-booking p {
    color: rgba(255, 255, 255, 0.78);
}

.padel-form {
    display: grid;
    gap: 12px;
    padding: 22px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.padel-form input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.94);
    color: var(--padel-ink);
}

.padel-form .padel-button {
    background: var(--padel-lime);
    color: var(--padel-green);
}

.padel-map {
    min-height: 340px;
    background:
        linear-gradient(135deg, rgba(23, 61, 45, 0.28), rgba(23, 61, 45, 0.06)),
        repeating-linear-gradient(90deg, rgba(23, 61, 45, 0.08) 0 1px, transparent 1px 28px),
        #e6ecdf;
    color: var(--padel-green);
}

.padel-contact-list {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.padel-contact-list span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(23, 61, 45, 0.08);
    color: var(--padel-green);
    font-weight: 800;
}

@media (max-width: 980px) {
    .padel-nav {
        align-items: stretch;
        border-radius: 28px;
        flex-direction: column;
    }

    .padel-nav-links {
        justify-content: center;
        flex-wrap: wrap;
        border-radius: 22px;
    }

    .padel-nav-cta {
        width: 100%;
    }

    .padel-hero,
    .padel-section-head-row,
    .padel-split,
    .padel-booking,
    .padel-contact {
        grid-template-columns: 1fr;
    }

    .padel-hero {
        min-height: 0;
    }

    .padel-feature-grid,
    .padel-price-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .padel-landing {
        padding: 12px;
    }

    .padel-hero-copy,
    .padel-section {
        border-radius: 28px;
        padding: 22px;
    }

    .padel-hero h1 {
        font-size: clamp(2.7rem, 17vw, 4rem);
    }

    .padel-section h2 {
        font-size: clamp(2rem, 12vw, 3rem);
    }

    .padel-actions > *,
    .padel-form .padel-button {
        width: 100%;
    }

    .padel-photo-placeholder {
        min-height: 280px;
    }

    .padel-floating-card {
        right: 24px;
        bottom: 24px;
        width: calc(100% - 48px);
    }
}

.rules-notice p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.rules-type-stack {
    display: grid;
    gap: 16px;
}

.rules-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.rules-category-card,
.rules-list-item,
.rules-admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 138, 28, 0.16);
    background: rgba(255, 255, 255, 0.045);
}

.rules-category-card {
    min-height: 76px;
}

.rules-category-card strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #111;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.rules-list,
.rules-admin-list {
    display: grid;
    gap: 10px;
}

.rules-list-item span,
.rules-admin-row span:first-child {
    display: grid;
    gap: 4px;
}

.rules-list-item small,
.rules-admin-row small,
.rules-list-item em {
    color: var(--muted);
    font-style: normal;
}

.rules-detail {
    display: grid;
    gap: 18px;
}

.rules-detail-text {
    color: var(--text);
    line-height: 1.75;
    white-space: normal;
}

.rules-punishment {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 80, 80, 0.22);
    background: rgba(255, 80, 80, 0.08);
}

.rules-punishment span {
    color: var(--muted);
}

.rules-admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.character-level-progress {
    display: grid;
    gap: 8px;
    max-width: 420px;
    margin: 10px 0 0;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 138, 28, 0.16);
    background: rgba(255, 255, 255, 0.045);
}

.character-level-progress div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.character-level-progress span {
    color: var(--muted);
}

.character-level-progress i {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    box-shadow: 0 0 18px rgba(255, 138, 28, 0.28);
}

.character-game-sheet .character-level-progress {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 12px;
    width: min(100%, 460px);
    max-width: 460px;
    margin: 12px 0 0;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(255, 138, 28, 0.22);
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 177, 95, 0.2), transparent 34%),
        linear-gradient(145deg, rgba(28, 21, 17, 0.92), rgba(14, 13, 12, 0.88));
    box-shadow: inset 0 1px 0 rgba(255, 213, 150, 0.08), 0 16px 34px rgba(0, 0, 0, 0.22);
}

.character-game-sheet .character-level-progress::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0 38%, rgba(255, 255, 255, 0.06) 48%, transparent 58% 100%);
    pointer-events: none;
}

.character-level-progress-head,
.character-level-progress-meta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.character-level-progress-head {
    margin: 0;
}

.character-level-progress-head span,
.character-level-progress-meta span {
    color: var(--muted);
}

.character-level-progress-head strong {
    color: #ffe2bc;
    font-size: 1.02rem;
}

.character-level-progress-meta {
    font-size: 0.84rem;
    font-weight: 700;
}

.character-level-progress-meta em {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 138, 28, 0.14);
    color: #ffd79e;
    font-style: normal;
    box-shadow: inset 0 0 0 1px rgba(255, 188, 105, 0.12);
}

.character-level-progress-track {
    position: relative;
    z-index: 1;
    overflow: hidden;
    height: 16px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(0, 0, 0, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 4px 10px rgba(0, 0, 0, 0.38);
}

.character-level-progress-track i {
    position: relative;
    display: block;
    width: var(--character-level-progress, 0%);
    min-width: 0;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 48%),
        linear-gradient(90deg, #ff7a1a, #ffc05f 54%, #ffe29a);
    box-shadow: 0 0 18px rgba(255, 138, 28, 0.42), 0 0 36px rgba(255, 192, 95, 0.22);
}

.character-level-progress-track i::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0 18%, transparent 18% 50%, rgba(255, 255, 255, 0.22) 50% 68%, transparent 68% 100%);
    background-size: 28px 28px;
    opacity: 0.45;
}

body.theme-blueanime .character-game-sheet .character-level-progress {
    border-color: rgba(95, 187, 255, 0.26);
    background:
        radial-gradient(circle at 12% 0%, rgba(95, 187, 255, 0.2), transparent 34%),
        linear-gradient(145deg, rgba(9, 20, 34, 0.95), rgba(8, 14, 26, 0.9));
    box-shadow: inset 0 1px 0 rgba(160, 226, 255, 0.08), 0 16px 34px rgba(0, 8, 20, 0.28);
}

body.theme-blueanime .character-level-progress-head strong {
    color: #d9f2ff;
}

body.theme-blueanime .character-level-progress-meta em {
    background: rgba(95, 187, 255, 0.14);
    color: #aee4ff;
    box-shadow: inset 0 0 0 1px rgba(95, 187, 255, 0.18);
}

body.theme-blueanime .character-level-progress-track i {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 48%),
        linear-gradient(90deg, #3d8bff, #5bbdff 55%, #9ce9ff);
    box-shadow: 0 0 18px rgba(91, 189, 255, 0.42), 0 0 36px rgba(95, 187, 255, 0.22);
}

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

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

.character-roleplay-headline h1 {
    margin: 6px 0 4px;
}

.character-roleplay-headline h1 a {
    color: inherit;
    text-decoration: none;
}

.character-roleplay-headline p {
    margin: 0;
    color: var(--muted);
}

.character-roleplay-top {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.character-roleplay-side,
.character-roleplay-main {
    display: grid;
    gap: 14px;
}

.character-roleplay-side-strip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.character-roleplay-avatar {
    width: min(100%, 280px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
}

.character-roleplay-tag-grid,
.character-roleplay-progress-cluster,
.character-roleplay-counter-strip,
.character-roleplay-journal-grid,
.character-roleplay-parameters,
.character-roleplay-inventory-grid,
.character-roleplay-mission-ranks,
.character-roleplay-traits {
    display: grid;
    gap: 12px;
}

.character-roleplay-primary-parameters {
    margin-bottom: 14px;
}

.character-primary-stat-actions {
    margin-top: 2px;
}

.character-stat-missing-scrolls {
    margin: 10px 0 8px;
    padding: 9px 11px;
    border: 1px solid rgba(248, 113, 113, 0.34);
    border-radius: 12px;
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
    font-size: 0.9rem;
    font-weight: 800;
}

.character-primary-stat-visual {
    position: relative;
    display: block;
    width: min(100%, 188px);
    aspect-ratio: 1 / 1;
    margin: 0 auto 12px;
}

.character-primary-stat-visual img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--stat-color, var(--accent-strong)) 62%, rgba(255, 255, 255, 0.18));
    background: rgba(0, 0, 0, 0.25);
    box-shadow:
        0 12px 26px rgba(0, 0, 0, 0.28),
        0 0 22px color-mix(in srgb, var(--stat-color, var(--accent-strong)) 24%, transparent);
}

.character-primary-stat-visual figcaption {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}

.character-primary-stat-visual figcaption span {
    position: absolute;
    left: 10.8%;
    bottom: 9.3%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48%;
    height: 11.5%;
    min-width: 0;
    margin: 0;
    padding: 0 8px;
    overflow: hidden;
    color: #f8e4b0;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-overflow: ellipsis;
    text-align: center;
    white-space: nowrap;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12),
        0 2px 4px rgba(0, 0, 0, 0.95),
        0 0 10px color-mix(in srgb, var(--stat-color, var(--accent-strong)) 30%, transparent);
}

.character-primary-stat-visual .character-primary-stat-number {
    position: absolute;
    right: 10.1%;
    bottom: 8.4%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17.5%;
    min-width: 0;
    height: auto;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    color: #fff0bf;
    font-size: 1.12rem;
    font-weight: 950;
    line-height: 1;
    text-align: center;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.95),
        0 0 10px rgba(255, 221, 128, 0.72),
        0 0 16px color-mix(in srgb, var(--stat-color, var(--accent-strong)) 55%, transparent);
}

.character-primary-stat-visual-large {
    width: min(100%, 236px);
    margin-bottom: 16px;
}

.character-primary-stat-visual-large img {
    border-radius: 22px;
}

.character-primary-stat-visual-large figcaption {
    min-height: 0;
    padding: 0;
    border-radius: 0;
}

.character-primary-stat-visual-large figcaption span {
    font-size: 0.92rem;
}

.character-primary-stat-visual-large .character-primary-stat-number {
    font-size: 1.3rem;
}

@media (max-width: 560px) {
    .character-primary-stat-visual {
        width: min(100%, 156px);
    }

    .character-primary-stat-visual figcaption {
        min-height: 0;
        padding: 0;
        border-radius: 0;
    }

    .character-primary-stat-visual figcaption span {
        font-size: 0.72rem;
    }

    .character-primary-stat-visual .character-primary-stat-number {
        font-size: 1rem;
    }

    .character-primary-stat-visual-large {
        width: min(100%, 190px);
    }

    .character-primary-stat-visual-large figcaption span {
        font-size: 0.82rem;
    }
}

.character-roleplay-side-item,
.character-roleplay-tag,
.character-roleplay-parameter-card,
.character-roleplay-biology-item,
.character-roleplay-inventory-item,
.character-roleplay-counter-card,
.character-roleplay-mission-rank,
.character-roleplay-trait-group {
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.character-roleplay-side-item span,
.character-roleplay-tag span,
.character-roleplay-parameter-card span,
.character-roleplay-biology-item span,
.character-roleplay-inventory-item span,
.character-roleplay-counter-card span,
.character-roleplay-trait-group span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.88rem;
}

.character-roleplay-side-item strong,
.character-roleplay-tag strong,
.character-roleplay-parameter-card strong,
.character-roleplay-biology-item strong,
.character-roleplay-inventory-item strong,
.character-roleplay-counter-card strong {
    display: block;
    color: var(--text);
}

.character-roleplay-tag-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.character-roleplay-tag {
    min-height: 88px;
}

.character-roleplay-salary-form,
.character-roleplay-salary-form > * {
    width: 100%;
}

.character-roleplay-rank-badge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 74px;
    height: 100%;
    overflow: hidden;
}

.character-roleplay-rank-badge::before {
    content: none;
}

.character-roleplay-rank-badge .character-rank-icon-small {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    flex: 0 1 auto;
}

.character-roleplay-rank-badge span {
    display: inline;
    margin: 0;
}

.character-roleplay-rank-item > span:first-child {
    display: none;
}

.character-roleplay-rank-item .character-roleplay-rank-badge {
    justify-content: center;
}

.character-roleplay-progress-cluster {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.character-roleplay-progress-card {
    --progress-value: 0%;
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(145deg, rgba(28, 21, 17, 0.82), rgba(14, 13, 12, 0.74));
}

.character-roleplay-progress-head,
.character-roleplay-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.character-roleplay-progress-head span,
.character-roleplay-progress-meta span {
    color: var(--muted);
}

.character-roleplay-progress-head strong,
.character-roleplay-progress-meta strong {
    color: var(--text);
}

.character-roleplay-progress-bar,
.character-roleplay-counter-bar {
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.character-roleplay-progress-bar i,
.character-roleplay-counter-bar i {
    display: block;
    width: var(--progress-value, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff7a1a, #ffc05f 54%, #ffe29a);
    box-shadow: 0 0 18px rgba(255, 138, 28, 0.34);
}

.character-roleplay-progress-card-life .character-roleplay-progress-bar i {
    background: linear-gradient(90deg, #d13b4f, #ff7b7b 56%, #ffd0d0);
    box-shadow: 0 0 18px rgba(209, 59, 79, 0.34);
}

.character-roleplay-progress-card-chakra .character-roleplay-progress-bar i {
    background: linear-gradient(90deg, #3088ff, #52c2ff 56%, #b9efff);
    box-shadow: 0 0 18px rgba(48, 136, 255, 0.34);
}

.character-roleplay-parameter-grid,
.character-roleplay-derived-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

.character-roleplay-biology-grid,
.character-roleplay-counter-strip,
.character-roleplay-journal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.character-roleplay-parameter-card {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: start;
    gap: 8px;
    min-height: 0;
    padding: 12px;
    text-align: center;
}

.character-roleplay-parameter-card em {
    display: block;
    margin-top: 6px;
    padding: 7px 10px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--stat-color, var(--accent-strong)) 38%, rgba(255, 255, 255, 0.12));
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--stat-color, var(--accent-strong)) 20%, transparent), transparent 72%),
        rgba(255, 255, 255, 0.045);
    color: color-mix(in srgb, var(--stat-color, var(--accent-strong)) 72%, var(--text));
    font-style: normal;
    font-size: 0.96rem;
    font-weight: 900;
    line-height: 1.2;
}

.character-roleplay-parameter-card .character-primary-stat-visual {
    width: min(100%, 138px);
    margin: 0;
}

.character-roleplay-parameter-card .character-primary-stat-visual img {
    border-radius: 14px;
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.24),
        0 0 16px color-mix(in srgb, var(--stat-color, var(--accent-strong)) 18%, transparent);
}

.character-roleplay-parameter-card .character-primary-stat-visual figcaption span {
    font-size: 0.78rem;
    padding: 0 6px;
}

.character-roleplay-parameter-card .character-primary-stat-visual .character-primary-stat-number {
    font-size: 1rem;
}

.character-roleplay-parameter-card.stat-color-intellect .character-primary-stat-visual figcaption span {
    bottom: 11.2%;
}

.character-roleplay-parameter-card.stat-color-intellect .character-primary-stat-visual .character-primary-stat-number {
    bottom: 9.4%;
}

.character-roleplay-parameter-card.stat-color-density .character-primary-stat-visual .character-primary-stat-number {
    right: 9.4%;
}

.character-roleplay-parameter-card.stat-color-control .character-primary-stat-visual .character-primary-stat-number {
    right: 9.4%;
    bottom: 9.4%;
}

.character-roleplay-parameter-card.stat-color-speed .character-primary-stat-visual .character-primary-stat-number {
    right: 10.7%;
    bottom: 9.4%;
}

.character-primary-stat-summary {
    display: grid;
    justify-items: stretch;
    min-width: 0;
    width: 100%;
}

.character-primary-stat-summary > strong {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.15;
}

.character-primary-stat-summary > strong span {
    display: inline-flex;
    flex: 0 0 auto;
    margin: 0;
    padding: 3px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--stat-color, var(--accent-strong)) 18%, transparent);
    color: color-mix(in srgb, var(--stat-color, var(--accent-strong)) 72%, var(--text));
    font-size: 0.76rem;
    font-weight: 900;
}

.character-roleplay-derived-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.character-roleplay-parameter-card-derived {
    min-height: 0;
    padding: 11px 12px;
    border-left: 4px solid color-mix(in srgb, var(--stat-color, var(--accent-strong)) 76%, transparent);
    text-align: left;
}

.character-roleplay-parameter-card-derived > span {
    margin-bottom: 5px;
    color: color-mix(in srgb, var(--stat-color, var(--accent-strong)) 66%, var(--text));
    font-weight: 900;
}

.character-roleplay-parameter-card-derived > strong {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 7px;
    padding: 4px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--stat-color, var(--accent-strong)) 18%, transparent);
    color: color-mix(in srgb, var(--stat-color, var(--accent-strong)) 78%, var(--text));
    font-size: 0.82rem;
    font-weight: 900;
}

.character-roleplay-parameter-card-derived > em {
    margin: 0;
    padding: 7px 9px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font-size: 0.9rem;
}

.character-roleplay-penalty-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.character-roleplay-penalty-card {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 92, 92, 0.28);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(70, 18, 16, 0.72), rgba(26, 16, 14, 0.78));
    box-shadow: inset 0 1px 0 rgba(255, 215, 180, 0.06);
}

.character-roleplay-penalty-card span {
    color: #ffb0a5;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.character-roleplay-penalty-card strong {
    color: #ffe1bd;
    font-size: 1rem;
}

.character-roleplay-penalty-card em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.45;
}

body.theme-blueanime .character-roleplay-penalty-card {
    border-color: rgba(255, 112, 112, 0.3);
    background: linear-gradient(145deg, rgba(48, 15, 22, 0.82), rgba(9, 20, 34, 0.86));
}

.character-roleplay-trait-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.character-roleplay-inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.character-artifact-board {
    position: relative;
    width: min(100%, 980px);
    aspect-ratio: 345 / 188;
    margin: 0 auto 18px;
    border-radius: 8px;
    overflow: hidden;
    background: #060914 var(--artifact-board-image, url("/assets/img/artifact-equipment-board.png")) center / 100% 100% no-repeat;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    -webkit-touch-callout: none;
    user-select: none;
}

.character-artifact-board-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.character-artifact-board-slot {
    position: absolute;
    left: var(--slot-x);
    top: var(--slot-y);
    width: var(--slot-w);
    height: var(--slot-h);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(5px, 0.9vw, 11px);
    box-sizing: border-box;
    text-decoration: none;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #ffe8a8 0%, #c57730 34%, #150d0c 72%, #030407 100%),
        linear-gradient(145deg, #000000, #170c09);
    box-shadow:
        inset 0 0 0 2px rgba(0, 0, 0, 0.72),
        inset 0 0 18px rgba(255, 196, 95, 0.18),
        inset 0 0 24px rgba(0, 0, 0, 0.82),
        0 0 14px rgba(255, 169, 75, 0.18),
        0 0 10px rgba(0, 0, 0, 0.42);
    transform: translate(-50%, -50%);
    transform-origin: center;
    transition: transform 0.18s ease, filter 0.18s ease;
    z-index: 3;
    isolation: isolate;
}

.character-artifact-board-slot:hover {
    transform: translate(-50%, -50%) scale(1.04);
    filter: brightness(1.16);
}

.character-artifact-board-slot-super_artifact {
    border-radius: 0;
    clip-path: polygon(50% 2%, 94% 25%, 94% 75%, 50% 98%, 6% 75%, 6% 25%);
}

.character-artifact-board-slot img {
    position: relative;
    z-index: 2;
    display: block;
    width: 76%;
    height: 76%;
    object-fit: contain;
    object-position: center;
    transform: none;
    opacity: 1;
    mix-blend-mode: normal;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.6));
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.character-artifact-board-slot span {
    display: none !important;
}

.character-artifact-board-stats {
    position: absolute;
    left: 24.95%;
    top: 29.2%;
    width: 5.4%;
    height: 48.5%;
    display: grid;
    grid-template-rows: repeat(5, 1fr);
    gap: 3.1%;
    z-index: 2;
}

.character-artifact-board-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    border: 2px solid rgba(86, 32, 28, 0.92);
    border-radius: 5px;
    background: linear-gradient(145deg, rgba(255, 245, 210, 0.93), rgba(245, 207, 144, 0.9));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 235, 0.5), 0 4px 10px rgba(34, 12, 8, 0.26);
    color: #160c08;
    font-weight: 900;
    font-size: clamp(0.48rem, 1.12vw, 0.92rem);
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 238, 190, 0.26);
}

.character-artifact-board-stat strong {
    color: #160c08 !important;
}

.character-artifact-board-stat span {
    margin-left: 2px;
    color: #102517;
    font-size: 0.58em;
}

.character-artifact-board-sets {
    position: absolute;
    left: 6.6%;
    right: 68.3%;
    bottom: 3.2%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 2;
}

.character-artifact-board-sets span {
    display: inline-flex;
    max-width: 100%;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(72, 23, 24, 0.84);
    color: #ffe3b2;
    font-size: clamp(0.48rem, 1vw, 0.68rem);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.character-artifact-board + .character-roleplay-inventory-grid {
    display: none !important;
}

.artifact-category-slot-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.artifact-category-slot-form select {
    min-width: 180px;
    max-width: 100%;
}

.artifact-case-drop-row {
    margin: -4px 0 10px 28px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.character-roleplay-counter-card {
    display: grid;
    gap: 8px;
}

.character-roleplay-mission-rank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.character-roleplay-mission-rank-head h3 {
    margin: 0;
}

.character-roleplay-footer-actions {
    justify-content: flex-start;
}

body.theme-blueanime .character-roleplay-progress-card {
    background: linear-gradient(145deg, rgba(9, 20, 34, 0.95), rgba(8, 14, 26, 0.9));
    border-color: rgba(95, 187, 255, 0.18);
}

body.theme-blueanime .character-roleplay-progress-bar i,
body.theme-blueanime .character-roleplay-counter-bar i {
    background: linear-gradient(90deg, #3d8bff, #5bbdff 55%, #9ce9ff);
    box-shadow: 0 0 18px rgba(91, 189, 255, 0.34);
}

body.theme-blueanime .character-roleplay-progress-card-life .character-roleplay-progress-bar i {
    background: linear-gradient(90deg, #4b8cff, #7ac6ff 56%, #d3f3ff);
}

body.theme-blueanime .character-roleplay-progress-card-chakra .character-roleplay-progress-bar i {
    background: linear-gradient(90deg, #1f6fff, #49b4ff 56%, #b9efff);
}

@media (max-width: 980px) {
    .character-roleplay-side-strip,
    .character-roleplay-top,
    .character-roleplay-tag-grid,
    .character-roleplay-progress-cluster,
    .character-roleplay-parameter-grid,
    .character-roleplay-biology-grid,
    .character-roleplay-derived-grid,
    .character-roleplay-counter-strip,
    .character-roleplay-journal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .character-roleplay-side-strip,
    .character-roleplay-top,
    .character-roleplay-tag-grid,
    .character-roleplay-progress-cluster,
    .character-roleplay-parameter-grid,
    .character-roleplay-biology-grid,
    .character-roleplay-derived-grid,
    .character-roleplay-inventory-grid,
    .character-roleplay-counter-strip,
    .character-roleplay-journal-grid {
        grid-template-columns: 1fr;
    }

    .character-roleplay-avatar {
        width: min(100%, 360px);
    }

    .character-artifact-board {
        width: min(100%, 420px);
        border-radius: 18px;
    }

    .character-artifact-board-slot {
        padding: 5px;
    }

    .character-artifact-board-slot span {
        display: none;
    }
}

@media (max-width: 720px) {
    .character-roleplay-parameter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

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

    .character-roleplay-parameter-card {
        padding: 9px;
    }

    .character-roleplay-parameter-card .character-primary-stat-visual {
        width: min(100%, 116px);
    }

    .character-roleplay-parameter-card .character-primary-stat-visual figcaption span {
        font-size: 0.62rem;
    }

    .character-roleplay-parameter-card .character-primary-stat-visual .character-primary-stat-number {
        font-size: 0.82rem;
    }

    .character-primary-stat-summary > strong {
        font-size: 0.88rem;
    }

    .character-primary-stat-summary > strong span {
        font-size: 0.68rem;
    }

    .character-roleplay-parameter-card em {
        padding: 6px 7px;
        font-size: 0.84rem;
    }

    .character-roleplay-parameter-card-derived {
        padding: 9px;
    }

    .character-roleplay-parameter-card-derived > span {
        font-size: 0.78rem;
    }

    .character-roleplay-parameter-card-derived > strong {
        font-size: 0.7rem;
    }

    .character-roleplay-parameter-card-derived > em {
        font-size: 0.78rem;
    }
}

.site-error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(24px, 5vw, 64px);
    background:
        radial-gradient(circle at 12% 14%, rgba(255, 138, 28, 0.22), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(255, 205, 112, 0.12), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(0, 0, 0, 0.38), transparent 42%);
}

.site-error-card {
    position: relative;
    overflow: hidden;
    width: min(100%, 860px);
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(20px, 4vw, 42px);
    align-items: center;
    padding: clamp(24px, 5vw, 48px);
    border-radius: 34px;
    border: 1px solid rgba(255, 138, 28, 0.24);
    background:
        linear-gradient(145deg, rgba(32, 24, 19, 0.94), rgba(13, 12, 11, 0.92)),
        var(--panel);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 212, 148, 0.1);
}

.site-error-glow {
    position: absolute;
    inset: -40% auto auto -14%;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 138, 28, 0.26), transparent 68%);
    pointer-events: none;
}

.site-error-code {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 32px;
    border: 1px solid rgba(255, 188, 105, 0.22);
    background:
        radial-gradient(circle at 30% 18%, rgba(255, 214, 155, 0.22), transparent 36%),
        linear-gradient(145deg, rgba(255, 138, 28, 0.18), rgba(255, 138, 28, 0.04));
    color: #ffd9a4;
    font-size: clamp(3.8rem, 10vw, 7rem);
    font-weight: 950;
    letter-spacing: -0.08em;
    text-shadow: 0 0 28px rgba(255, 138, 28, 0.34);
}

.site-error-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
}

.site-error-copy h1,
.site-error-copy p {
    margin: 0;
}

.site-error-copy h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

.site-error-copy p {
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.65;
}

.site-error-copy small {
    color: var(--muted);
    line-height: 1.5;
}

.site-error-actions {
    position: relative;
    z-index: 1;
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.theme-blueanime .site-error-page {
    background:
        radial-gradient(circle at 12% 14%, rgba(95, 187, 255, 0.18), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(61, 139, 255, 0.14), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(0, 10, 24, 0.45), transparent 42%);
}

body.theme-blueanime .site-error-card {
    border-color: rgba(95, 187, 255, 0.24);
    background:
        linear-gradient(145deg, rgba(10, 22, 38, 0.96), rgba(7, 12, 24, 0.94)),
        var(--panel);
    box-shadow: 0 26px 80px rgba(0, 8, 20, 0.5), inset 0 1px 0 rgba(166, 228, 255, 0.08);
}

body.theme-blueanime .site-error-glow {
    background: radial-gradient(circle, rgba(95, 187, 255, 0.22), transparent 68%);
}

body.theme-blueanime .site-error-code {
    border-color: rgba(95, 187, 255, 0.24);
    background:
        radial-gradient(circle at 30% 18%, rgba(166, 228, 255, 0.2), transparent 36%),
        linear-gradient(145deg, rgba(95, 187, 255, 0.16), rgba(61, 139, 255, 0.04));
    color: #b9e9ff;
    text-shadow: 0 0 28px rgba(95, 187, 255, 0.32);
}

@media (max-width: 720px) {
    .site-error-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-error-code {
        width: min(220px, 74vw);
        margin: 0 auto;
    }

    .site-error-actions {
        grid-column: auto;
        justify-content: center;
    }
}

.character-equipment-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.character-equipment-inline strong,
.character-equipment-inline span {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 138, 28, 0.14);
    color: var(--muted);
}

.character-equipment-inline strong {
    color: var(--text);
}

.equipment-bag-actions {
    margin-top: 14px;
}

@media (max-width: 720px) {
    .battle-meta-grid,
    .battle-participants,
    .battle-team-picker-grid,
    .battle-team-size-grid,
    .battle-location-card,
    .battle-location-admin-card,
    .battle-character-picker,
    .roleplay-task-grid,
    .artifact-grid,
    .artifact-detail,
    .artifact-slot-grid,
    .rules-category-grid {
        grid-template-columns: 1fr;
    }

    .battle-list-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .battle-post {
        grid-template-columns: 1fr;
    }

    .battle-post img {
        width: 46px;
        height: 46px;
    }

    .battle-equipment-picker {
        padding: 10px;
    }

    .battle-equipment-picker-head {
        display: grid;
        gap: 6px;
    }

    .battle-equipment-grid {
        grid-template-columns: 1fr;
    }

    .battle-technique-picker {
        padding: 10px;
    }

    .battle-technique-picker-head {
        display: grid;
        gap: 6px;
    }

    .battle-technique-grid {
        grid-template-columns: 1fr;
    }

    .battle-resource-head {
        display: grid;
        gap: 8px;
    }

    .artifact-card-media img,
    .artifact-detail > img {
        max-height: 260px;
    }

    .artifact-market-form {
        grid-template-columns: 1fr;
    }

    .rules-list-item,
    .rules-admin-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .rules-admin-actions {
        justify-content: flex-start;
        width: 100%;
    }
}
.bb-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.bb-tool,
.bb-help-link {
    border: 1px solid rgba(255, 138, 0, 0.28);
    background: rgba(255, 138, 0, 0.08);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.bb-tool:hover,
.bb-help-link:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 138, 0, 0.58);
    background: rgba(255, 138, 0, 0.18);
}

.bb-toolbar .bb-color-picker {
    width: 42px;
    height: 28px;
    padding: 2px;
    border: 1px solid rgba(255, 138, 0, 0.28);
    border-radius: 8px;
    background: rgba(255, 138, 0, 0.08);
    cursor: pointer;
}

.bb-toolbar .bb-color-tool {
    min-width: 58px;
}

.bb-image {
    display: block;
    max-width: min(100%, 300px);
    height: auto;
    border-radius: 14px;
    margin: 8px auto;
    object-fit: cover;
}

.bb-link {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 138, 0, 0.45);
}

.bb-link:hover {
    border-bottom-style: solid;
}

.bb-underline {
    text-decoration: underline;
}

.bb-strike {
    text-decoration: line-through;
}

.bb-overline {
    text-decoration: overline;
}

.bb-big {
    font-size: 1.22em;
    font-weight: 800;
}

.bb-small {
    font-size: 0.86em;
    color: var(--text-secondary);
}

.bb-heading {
    display: block;
    margin: 10px 0 6px;
    color: var(--text-primary);
    font-weight: 900;
    line-height: 1.2;
}

.bb-heading-main {
    font-size: 1.35em;
}

.bb-heading-sub {
    font-size: 1.16em;
}

.bb-sub,
.bb-sup {
    font-size: 0.76em;
}

.bb-size {
    line-height: 1.35;
}

.bb-hr {
    width: 100%;
    height: 1px;
    margin: 16px 0;
    border: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 170, 92, 0.65), transparent);
}

.bb-list {
    margin: 10px 0;
    padding-left: 1.45rem;
}

.bb-list li {
    margin: 4px 0;
}

.bb-left,
.bb-center,
.bb-right,
.bb-justify {
    display: block;
}

.bb-left {
    text-align: left;
}

.bb-center {
    text-align: center;
}

.bb-right {
    text-align: right;
}

.bb-justify {
    text-align: justify;
}

.bb-box {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 8px;
}

.bb-box-solid {
    border: 1px solid currentColor;
}

.bb-box-dashed {
    border: 1px dashed currentColor;
}

.bb-box-dotted {
    border: 1px dotted currentColor;
}

.bb-box-double {
    border: 3px double rgba(255, 255, 255, 0.28);
}

.bb-quote,
.bb-frame,
.bb-code {
    margin: 10px 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.bb-quote {
    border-left: 3px solid var(--accent);
    padding: 10px 12px;
    color: var(--text-secondary);
}

.bb-quote cite {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-style: normal;
    font-weight: 900;
}

.bb-frame {
    border: 1px solid rgba(255, 138, 0, 0.35);
    padding: 10px 12px;
}

.bb-frame-thin {
    padding: 8px 10px;
}

.bb-frame-compact {
    padding: 5px 8px;
}

.bb-frame-pink {
    border-color: rgba(255, 111, 177, 0.6);
}

.bb-frame-rainbow {
    border-left: 3px solid #f70000;
    border-top: 3px solid #119931;
    border-right: 3px solid #924e96;
    border-bottom: 3px solid #e3af40;
}

.bb-frame-small {
    padding: 6px 8px;
    border-width: 1px 3px 3px 1px;
}

.bb-code {
    overflow-x: auto;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f7d6a4;
    white-space: pre-wrap;
}

.bb-spoiler {
    margin: 8px 0;
    padding: 8px 10px;
    border: 1px solid rgba(255, 138, 0, 0.24);
    border-radius: 12px;
    background: rgba(255, 138, 0, 0.07);
}

.bb-spoiler summary {
    cursor: pointer;
    font-weight: 800;
}

.bb-input {
    max-width: 100%;
    border: 1px solid rgba(255, 138, 0, 0.32);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    padding: 7px 10px;
}

.bb-razdiv,
.bb-pmdiv {
    display: block;
    margin: 8px 0;
    border-radius: 12px;
    padding: 8px 10px;
    font-weight: 800;
}

.bb-razdiv {
    background: linear-gradient(135deg, rgba(255, 138, 0, 0.22), rgba(255, 138, 0, 0.06));
}

.bb-pmdiv {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bb-marquee {
    display: block;
    overflow: hidden;
    white-space: nowrap;
}

.bb-marquee > span {
    display: inline-block;
    min-width: 100%;
    animation: bbMarquee 12s linear infinite;
}

.bb-marquee-alt > span {
    animation: bbMarqueeAlt 5s ease-in-out infinite alternate;
}

.roleplay-marriage-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 138, 0, 0.22);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 138, 0, 0.12), rgba(255, 255, 255, 0.04));
}

.roleplay-marriage-hero h2 {
    margin: 0 0 8px;
}

.roleplay-marriage-hero p {
    margin: 0 0 6px;
    color: var(--text-primary);
}

.roleplay-marriage-action {
    flex: 0 0 auto;
}

.roleplay-marriage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.roleplay-marriage-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 138, 0, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.roleplay-marriage-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 138, 0, 0.55);
    background: rgba(255, 138, 0, 0.09);
}

.roleplay-marriage-card input {
    accent-color: var(--accent);
}

.roleplay-marriage-card img {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(255, 138, 0, 0.28);
}

.roleplay-marriage-card span {
    display: grid;
    gap: 3px;
}

.roleplay-marriage-card small {
    color: var(--text-muted);
}

@keyframes bbMarquee {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}

@keyframes bbMarqueeAlt {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(35%);
    }
}

@media (max-width: 640px) {
    .bb-toolbar {
        gap: 5px;
    }

    .bb-tool,
    .bb-help-link {
        padding: 6px 8px;
        font-size: 11px;
    }

    .roleplay-marriage-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .roleplay-marriage-action,
    .roleplay-marriage-action button {
        width: 100%;
    }
}

.character-traits-page {
    max-width: 100%;
    overflow-x: hidden;
}

.character-trait-admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.character-trait-panel {
    min-width: 0;
}

.character-trait-panel-body {
    display: grid;
    gap: 16px;
}

.character-trait-create-shell,
.character-trait-list-shell {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(125, 211, 252, 0.14);
    border-radius: 18px;
    background: rgba(6, 14, 24, 0.42);
}

.character-trait-shell-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.86);
}

.character-trait-panel-note {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    background: rgba(11, 23, 38, 0.45);
    color: var(--muted);
    line-height: 1.45;
}

.character-trait-create-form,
.character-trait-edit-form {
    display: grid;
    gap: 10px;
}

.character-trait-create-form {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 220px) auto;
    align-items: end;
}

.character-trait-list {
    display: grid;
    gap: 12px;
}

.character-trait-admin-item {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(10, 18, 29, 0.88), rgba(7, 14, 22, 0.78)),
        rgba(255, 255, 255, 0.03);
    min-width: 0;
    align-items: start;
}

.character-trait-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.character-trait-summary-text {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.character-trait-summary strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
}

.character-trait-summary-type {
    color: var(--muted);
    font-size: 0.82rem;
}

.character-trait-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
}

.character-trait-icon-empty {
    display: inline-block;
    border: 1px solid rgba(255, 138, 0, 0.2);
    background: rgba(255, 138, 0, 0.08);
}

.character-trait-edit-form {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) auto;
    align-items: end;
}

.character-trait-edit-form input[type="text"],
.character-trait-edit-form input[type="file"] {
    min-width: 0;
    width: 100%;
}

.character-trait-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.character-trait-edit-page {
    display: grid;
    gap: 16px;
}

.character-trait-edit-page-form {
    display: grid;
    gap: 14px;
    max-width: 720px;
}

.character-trait-edit-grid {
    align-items: start;
}

.character-trait-edit-preview {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 138, 0, 0.16);
    background: rgba(255, 255, 255, 0.03);
}

.character-trait-edit-preview > span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.character-trait-edit-preview-main {
    display: grid;
    gap: 8px;
}

.character-trait-edit-preview-main small {
    color: var(--muted);
    line-height: 1.45;
}

.character-trait-edit-actions {
    align-items: center;
}

@media (max-width: 1100px) {
    .character-roleplay-side-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 640px) {
    .character-roleplay-side-strip {
        grid-template-columns: 1fr;
    }

    .character-trait-create-form,
    .character-trait-edit-form {
        grid-template-columns: 1fr;
    }

    .character-trait-edit-form .button-danger,
    .character-trait-edit-form .button-secondary,
    .character-trait-create-form button {
        width: 100%;
    }

    .character-trait-edit-actions {
        display: grid;
    }
}

/* Visual normalization overrides */
.button,
.button-secondary,
.button-danger,
button,
.news-like-button,
.chat-page-link,
.online-panel-link,
.section-return-link {
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 0.94rem;
    line-height: 1.2;
    text-decoration: none;
}

.button,
.button-secondary,
.button-danger,
.news-like-button,
.chat-page-link,
.online-panel-link,
.section-return-link {
    width: auto;
    max-width: 100%;
}

.button-secondary,
.section-return-link,
.online-panel-link,
.chat-page-link,
.news-like-button {
    border-color: rgba(255, 167, 61, 0.18);
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.09), transparent 56%),
        linear-gradient(135deg, rgba(26, 20, 15, 0.98), rgba(52, 34, 20, 0.98) 62%, rgba(88, 52, 19, 0.96));
    color: #ffe8cb;
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.button:hover,
.button-secondary:hover,
.button-danger:hover,
.news-like-button:hover,
.chat-page-link:hover,
.online-panel-link:hover,
.section-return-link:hover {
    transform: translateY(-1px);
}

.profile-toolbar,
.roleplay-card-actions,
.roleplay-hero-actions,
.thread-compose-actions,
.thread-post-actions,
.thread-moderation-actions,
.news-links,
.messages-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.profile-toolbar > *,
.roleplay-card-actions > *,
.roleplay-hero-actions > *,
.thread-compose-actions > *,
.thread-post-actions > *,
.thread-moderation-actions > *,
.news-links > *,
.messages-form-actions > * {
    flex: 0 0 auto;
    min-width: 0;
}

.thread-introduce-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.thread-introduce-input {
    min-width: 180px;
    max-width: 220px;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 12px;
}

.roleplay-village-menu-card,
.roleplay-legacy-village {
    align-items: start;
}

.roleplay-village-menu-card {
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    gap: 20px;
}

.roleplay-village-menu-card img,
.roleplay-legacy-village-image {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.roleplay-menu-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.roleplay-menu-list-item {
    min-height: 0;
    height: 100%;
    grid-template-columns: 52px minmax(0, 1fr) 18px;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
}

.roleplay-menu-art {
    width: 52px;
    height: 52px;
    border-radius: 16px;
}

.roleplay-menu-art span {
    font-size: 0;
    text-shadow: none;
}

.roleplay-menu-art::before {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffca86;
}

.roleplay-menu-list-item:nth-child(1) .roleplay-menu-art::before { content: "RP"; }
.roleplay-menu-list-item:nth-child(2) .roleplay-menu-art::before { content: "VI"; }
.roleplay-menu-list-item:nth-child(3) .roleplay-menu-art::before { content: "TS"; }
.roleplay-menu-list-item:nth-child(4) .roleplay-menu-art::before { content: "PR"; }
.roleplay-menu-list-item:nth-child(5) .roleplay-menu-art::before { content: "AR"; }
.roleplay-menu-list-item:nth-child(6) .roleplay-menu-art::before { content: "BM"; }
.roleplay-menu-list-item:nth-child(7) .roleplay-menu-art::before { content: "MS"; }
.roleplay-menu-list-item:nth-child(8) .roleplay-menu-art::before { content: "RN"; }
.roleplay-menu-list-item:nth-child(9) .roleplay-menu-art::before { content: "TM"; }
.roleplay-menu-list-item:nth-child(10) .roleplay-menu-art::before { content: "JT"; }
.roleplay-menu-list-item:nth-child(11) .roleplay-menu-art::before { content: "BT"; }
.roleplay-menu-list-item:nth-child(12) .roleplay-menu-art::before { content: "HL"; }
.roleplay-menu-list-item:nth-child(13) .roleplay-menu-art::before { content: "ZG"; }
.roleplay-menu-list-item:nth-child(14) .roleplay-menu-art::before { content: "BK"; }
.roleplay-menu-list-item:nth-child(15) .roleplay-menu-art::before { content: "RL"; }
.roleplay-menu-list-item:nth-child(16) .roleplay-menu-art::before { content: "NW"; }
.roleplay-menu-list-item:nth-child(17) .roleplay-menu-art::before { content: "EX"; }

.roleplay-menu-copy {
    gap: 6px;
}

.roleplay-menu-copy strong {
    font-size: 0.96rem;
    line-height: 1.3;
}

.roleplay-menu-badges {
    gap: 6px;
}

.roleplay-menu-badges span,
.roleplay-counter,
.news-pill,
.profile-badge {
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
}

.chat-pagination {
    gap: 12px;
}

.chat-page-nav-button {
    min-width: 120px;
    max-width: 180px;
}

.messages-thread-head > .button-secondary,
.news-links > .button-secondary,
.roleplay-card-actions > .button-secondary,
.roleplay-card-actions > .button,
.roleplay-card-actions > .button-danger {
    min-width: 0;
}

.news-actions,
.messages-pagination,
.messages-thread-head {
    gap: 12px;
}

.messages-thread-head {
    align-items: center;
}

.messages-thread-feed {
    gap: 12px;
}

.messages-conversation-card,
.news-card,
.roleplay-feature-card,
.profile-panel,
.thread-post-card,
.chat-message,
.message-bubble-card {
    border-radius: 20px;
}

@media (max-width: 1200px) {
    .roleplay-menu-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .roleplay-village-menu-card,
    .roleplay-legacy-village {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .button,
    .button-secondary,
    .button-danger,
    button,
    .news-like-button,
    .chat-page-link,
    .online-panel-link,
    .section-return-link {
        min-height: 38px;
        padding: 9px 13px;
        border-radius: 14px;
        font-size: 0.88rem;
    }

    .profile-toolbar,
    .roleplay-card-actions,
    .roleplay-hero-actions,
    .thread-compose-actions,
    .thread-post-actions,
    .thread-moderation-actions,
    .news-links,
    .messages-form-actions,
    .messages-thread-head {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .profile-toolbar > *,
    .roleplay-card-actions > *,
    .roleplay-hero-actions > *,
    .thread-compose-actions > *,
    .thread-post-actions > *,
    .thread-moderation-actions > *,
    .news-links > *,
    .messages-form-actions > *,
    .messages-thread-head > * {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .roleplay-menu-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .roleplay-menu-list-item {
        grid-template-columns: 44px minmax(0, 1fr) 16px;
        gap: 12px;
        padding: 11px 12px;
        border-radius: 18px;
    }

    .roleplay-menu-art {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .roleplay-menu-art::before {
        font-size: 0.76rem;
    }

    .roleplay-active-thread-item {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .roleplay-active-thread-copy strong,
    .roleplay-active-thread-copy small {
        white-space: normal;
    }

    .roleplay-active-thread-meta {
        justify-self: flex-start;
    }

    .roleplay-menu-copy strong {
        font-size: 0.9rem;
    }

    .chat-page-nav-button {
        min-width: 0;
        max-width: none;
    }

    .chat-pagination-bottom > .button-secondary,
    .chat-pagination-bottom > .is-disabled {
        flex: 1 1 0;
        min-height: 36px;
        padding: 8px 10px;
        font-size: 0.84rem;
        border-radius: 12px;
    }
}

@media (max-width: 520px) {
    .profile-toolbar,
    .roleplay-card-actions,
    .roleplay-hero-actions,
    .thread-compose-actions,
    .thread-post-actions,
    .thread-moderation-actions,
    .news-links,
    .messages-form-actions,
    .messages-thread-head {
        grid-template-columns: 1fr;
    }

    .thread-introduce-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .thread-introduce-input {
        max-width: none;
        width: 100%;
    }
}

.battle-section-page,
.artifact-section-page,
.rules-section-page,
.tasks-section-page {
    gap: 22px;
}

.battle-page-hero,
.artifact-page-hero,
.rules-page-hero,
.tasks-page-hero {
    position: relative;
    overflow: hidden;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 24px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(255, 138, 28, 0.16), transparent 32%),
        radial-gradient(circle at left bottom, rgba(255, 184, 77, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        var(--panel);
}

.battle-page-hero::before,
.artifact-page-hero::before,
.rules-page-hero::before,
.tasks-page-hero::before,
.battle-section-panel::before,
.artifact-section-panel::before,
.rules-section-panel::before,
.tasks-section-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 166, 77, 0.08), transparent 34%, rgba(255, 255, 255, 0.02));
}

.battle-page-hero > *,
.artifact-page-hero > *,
.rules-page-hero > *,
.tasks-page-hero > *,
.battle-section-panel > *,
.artifact-section-panel > *,
.rules-section-panel > *,
.tasks-section-panel > * {
    position: relative;
    z-index: 1;
}

.battle-section-panel,
.artifact-section-panel,
.rules-section-panel,
.tasks-section-panel {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.battle-page .battle-list,
.battle-page .battle-post-list,
.rules-section-page .rules-list,
.rules-section-page .rules-admin-list {
    display: grid;
    gap: 14px;
}

.battle-page .battle-list-item,
.rules-section-page .rules-list-item,
.rules-section-page .rules-admin-row {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.16);
}

.battle-page .battle-list-item:hover,
.rules-section-page .rules-list-item:hover {
    border-color: rgba(255, 166, 77, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.battle-page .battle-participants {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.battle-page .battle-participant {
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.battle-page .battle-participant img {
    width: 86px;
    height: 86px;
    border-radius: 20px;
    object-fit: cover;
    border: 1px solid rgba(255, 166, 77, 0.18);
}

.battle-mob-picker .battle-character-option,
.battle-mob-card {
    border-style: dashed;
}

.battle-mob-meta,
.battle-mob-card-head,
.battle-mob-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.battle-mob-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.battle-mob-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px dashed rgba(255, 138, 28, 0.26);
    border-radius: 20px;
    background: rgba(18, 15, 12, 0.72);
}

.battle-mob-card.is-archived {
    opacity: 0.62;
}

.battle-mob-card > img {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    object-fit: cover;
}

.battle-mob-card-body {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.theme-blueanime .battle-mob-card {
    border-color: rgba(64, 189, 255, 0.32);
    background: rgba(7, 18, 31, 0.84);
}

.battle-page .battle-character-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.battle-page .battle-character-vitals,
.battle-page .battle-character-equipment > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.battle-page .battle-character-equipment {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

.battle-page .battle-character-equipment > span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.battle-page .battle-character-stats em,
.battle-page .battle-character-vitals em,
.battle-page .battle-character-equipment em,
.battle-page .battle-character-equipment strong,
.battle-page .battle-village-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-style: normal;
    font-size: 12px;
    color: #f3d8b6;
    background: rgba(255, 255, 255, 0.06);
}

.battle-page .battle-village-chip img {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 0;
}

.battle-page .battle-post {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.battle-page .battle-post > img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: cover;
}

.battle-page .battle-post header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.battle-page .battle-post p {
    margin: 0;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.battle-page .battle-reply-form,
.battle-page .battle-form-panel,
.tasks-section-page form.tasks-section-panel,
.artifact-section-page .artifact-market-form {
    display: grid;
    gap: 16px;
}

.battle-page .battle-equipment-picker,
.battle-page .battle-technique-picker,
.battle-page .battle-technique-review-card,
.battle-page .battle-post-resource-card,
.artifact-section-page .artifact-slot,
.artifact-section-page .artifact-card,
.artifact-section-page .artifact-detail,
.rules-section-page .rules-notice,
.tasks-section-page .roleplay-task-card {
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.16);
}

.battle-page .battle-equipment-picker,
.battle-page .battle-technique-picker,
.battle-page .battle-post-resource-card {
    padding: 14px;
}

.battle-page .battle-equipment-grid,
.battle-page .battle-technique-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.battle-page .battle-equipment-option,
.battle-page .battle-technique-option {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.battle-page .battle-technique-option span,
.battle-page .battle-equipment-option span {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.battle-page .battle-technique-option img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
}

.battle-page,
.battle-page .battle-section-panel,
.battle-page .battle-post,
.battle-page .battle-post-resource-card,
.battle-page .battle-techniques-used,
.battle-page .battle-technique-used-list,
.battle-page .battle-technique-selected-preview,
.battle-page .battle-technique-review-card,
.battle-page .battle-technique-review-techs {
    min-width: 0;
    max-width: 100%;
}

.battle-page .battle-technique-used,
.battle-page .battle-technique-option span,
.battle-page .battle-technique-selected-preview em,
.battle-page .battle-technique-review-techs em,
.battle-page .battle-technique-status,
.battle-page .battle-resource-head strong {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.battle-page .battle-technique-used strong,
.battle-page .battle-technique-option strong {
    min-width: 0;
}

@media (max-width: 640px) {
    .battle-page .battle-technique-used {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: center;
        width: 100%;
    }

    .battle-page .battle-technique-used img {
        grid-row: span 2;
    }

    .battle-page .battle-technique-used strong,
    .battle-page .battle-technique-option strong {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
    }

    .battle-page .battle-technique-used em,
    .battle-page .battle-technique-option em,
    .battle-page .battle-technique-selected-preview em,
    .battle-page .battle-technique-review-techs em,
    .battle-page .battle-technique-status,
    .battle-page .battle-resource-head strong {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .battle-page .battle-technique-selected-preview div {
        min-width: 0;
    }
}

.artifact-section-page .artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.artifact-section-page .artifact-card {
    overflow: hidden;
}

.artifact-section-page .artifact-card-media {
    display: block;
    aspect-ratio: 1 / 1;
    background: rgba(0, 0, 0, 0.18);
}

.artifact-section-page .artifact-card-media img,
.artifact-section-page .artifact-detail > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artifact-section-page .artifact-card-body {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.artifact-section-page .artifact-detail {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
}

.artifact-section-page .artifact-detail > img {
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    background: rgba(0, 0, 0, 0.16);
}

.artifact-section-page .artifact-detail-copy {
    display: grid;
    gap: 14px;
}

.artifact-section-page .artifact-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.artifact-section-page .artifact-slot {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.artifact-section-page .artifact-admin-category-list {
    gap: 10px;
}

.artifact-section-page .artifact-admin-group-list {
    display: grid;
    gap: 10px;
}

.artifact-section-page .artifact-admin-item-group {
    padding: 0;
    overflow: hidden;
}

.artifact-section-page .artifact-admin-item-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}

.artifact-section-page .artifact-admin-item-group > summary::-webkit-details-marker {
    display: none;
}

.artifact-section-page .artifact-admin-item-group > summary::after {
    content: "+";
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-weight: 800;
}

.artifact-section-page .artifact-admin-item-group[open] > summary::after {
    content: "−";
}

.artifact-section-page .artifact-admin-item-group > summary span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.artifact-section-page .artifact-admin-item-group > summary small {
    color: var(--muted);
}

.artifact-section-page .artifact-admin-item-group > .battle-list {
    padding: 0 12px 12px;
}

.artifact-section-page .artifact-admin-item-row {
    display: grid;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.artifact-section-page .artifact-market-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.artifact-section-page .artifact-market-form input {
    min-width: 0;
}

.artifact-page .artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.artifact-page .artifact-card,
.artifact-page .artifact-detail,
.artifact-page .artifact-slot {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.16);
}

.artifact-page .artifact-card-media {
    display: block;
    aspect-ratio: 1 / 1;
    padding: 0;
    background: rgba(0, 0, 0, 0.18);
}

.artifact-page .artifact-card-media img,
.artifact-page .artifact-detail > img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.artifact-page .artifact-card-body {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.artifact-page .artifact-meta-list span,
.artifact-page .artifact-slot small {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.055);
    color: var(--muted);
}

body.theme-blueanime .artifact-page .artifact-card,
body.theme-blueanime .artifact-page .artifact-detail,
body.theme-blueanime .artifact-page .artifact-slot {
    border-color: rgba(95, 187, 255, 0.16);
    background: linear-gradient(145deg, rgba(9, 20, 34, 0.94), rgba(8, 14, 26, 0.9));
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

body.theme-blueanime .artifact-page .artifact-card-media {
    background: rgba(2, 7, 16, 0.72);
}

.rules-section-page .rules-type-stack {
    display: grid;
    gap: 20px;
}

.rules-section-page .rules-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.rules-section-page .rules-category-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    text-decoration: none;
}

.rules-section-page .rules-category-card:hover {
    border-color: rgba(255, 166, 77, 0.3);
    transform: translateY(-1px);
}

.rules-section-page .rules-admin-actions,
.artifact-section-page .roleplay-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tasks-section-page .roleplay-task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.tasks-section-page .roleplay-task-card .roleplay-card-body {
    display: grid;
    gap: 14px;
}

.tasks-section-page .roleplay-task-progress {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.18);
}

.tasks-section-page .roleplay-task-progress > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.tasks-section-page .roleplay-task-progress i {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff9d38, #ffce6e);
    box-shadow: 0 8px 18px rgba(255, 157, 56, 0.32);
}

@media (max-width: 980px) {
    .artifact-section-page .artifact-detail {
        grid-template-columns: 1fr;
    }

    .battle-page .battle-participants,
    .battle-page .battle-equipment-grid,
    .battle-page .battle-technique-grid,
    .artifact-section-page .artifact-grid,
    .rules-section-page .rules-category-grid,
    .tasks-section-page .roleplay-task-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .battle-page-hero,
    .artifact-page-hero,
    .rules-page-hero,
    .tasks-page-hero {
        padding: 18px;
    }

    .battle-page .battle-post {
        grid-template-columns: 1fr;
    }

    .battle-page .battle-post > img {
        width: 62px;
        height: 62px;
    }

    .artifact-section-page .artifact-market-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .profile-nick-title {
        gap: 8px;
    }

    .profile-nick-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .profile-nick-icon img {
        width: 23px;
        height: 23px;
    }

    .profile-legacy-avatar,
    .profile-hero-avatar,
    .profile-hero-avatar-large,
    .character-summary-avatar,
    .character-game-avatar,
    .thread-post-avatar,
    .thread-post-character-avatar,
    .thread-post-character-avatar img,
    .battle-page .battle-participant img,
    .battle-page .battle-character-option img,
    .battle-page .battle-post > img {
        border-radius: 50% !important;
    }

    .profile-legacy-avatar,
    .profile-hero-avatar,
    .profile-hero-avatar-large,
    .character-summary-avatar,
    .character-game-avatar,
    .thread-post-character-avatar,
    .thread-post-character-avatar img {
        aspect-ratio: 1 / 1;
    }

    .character-vitals-shell-hero {
        width: min(240px, 72vw);
        max-width: none;
        aspect-ratio: 1 / 1;
        margin-inline: auto;
    }

    .character-vitals-shell-hero .character-game-avatar {
        width: 100%;
        height: auto;
        padding: 12px;
    }

    .thread-post-character-avatar {
        width: 86px;
        height: 86px;
        margin-inline: auto;
        padding: 5px;
        flex: 0 0 86px;
    }

    .thread-post-character-avatar img {
        width: 100%;
        height: 100%;
    }

    .battle-page .battle-participant img,
    .battle-page .battle-character-option img,
    .battle-page .battle-post > img {
        width: 52px;
        height: 52px;
    }
}

.roleplay-map-page {
    display: grid;
    gap: 22px;
}

.roleplay-map-hero,
.roleplay-map-shell,
.roleplay-map-fallback-panel {
    position: relative;
    overflow: hidden;
}

.roleplay-map-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.roleplay-map-toolbar {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.roleplay-map-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.roleplay-map-crumb {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--accent-strong);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.roleplay-map-crumb-sep {
    color: var(--muted);
}

.roleplay-map-caption {
    margin: 0;
    color: var(--muted);
}

.roleplay-map-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(6, 8, 14, 0.9), rgba(11, 14, 24, 0.98)),
        rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 138, 28, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 24px 56px rgba(0, 0, 0, 0.34);
    padding-top: var(--map-ratio);
}

.roleplay-map-area-quick-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 14px;
}

.roleplay-map-area-quick.is-active {
    border-color: rgba(255, 215, 160, 0.48);
    background: linear-gradient(145deg, rgba(255, 159, 67, 0.22), rgba(255, 255, 255, 0.05));
}

.roleplay-map-stage,
.roleplay-map-zoom-layer {
    position: absolute;
    inset: 0;
}

.roleplay-map-zoom-layer {
    transform-origin: 50% 50%;
    transition: transform 0.45s ease;
    will-change: transform;
}

.roleplay-map-tooltip {
    position: absolute;
    z-index: 5;
    display: grid;
    gap: 4px;
    min-width: 170px;
    max-width: 260px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(10, 12, 18, 0.96);
    border: 1px solid rgba(255, 159, 67, 0.18);
    color: #fff3e3;
    pointer-events: none;
    transform: translate(12px, 12px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(10px);
}

.roleplay-map-tooltip[hidden] {
    display: none;
}

.roleplay-map-tooltip strong,
.roleplay-map-tooltip span {
    margin: 0;
}

.roleplay-map-tooltip strong {
    font-size: 0.92rem;
    line-height: 1.2;
}

.roleplay-map-tooltip span {
    font-size: 0.78rem;
    line-height: 1.4;
    color: rgba(255, 232, 207, 0.82);
}

.roleplay-map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
    filter: saturate(0.88) brightness(0.84) contrast(1.04);
    transition: filter 0.35s ease;
}

.roleplay-map-page.is-map-previewing .roleplay-map-image {
    filter: saturate(0.72) brightness(0.42) contrast(1.02);
}

.roleplay-map-focus-preview {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    overflow: hidden;
}

.roleplay-map-focus-preview[hidden] {
    display: none;
}

.roleplay-map-focus-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.96;
    transform: translate(var(--zone-image-offset-x, 0%), var(--zone-image-offset-y, 0%)) scale(var(--zone-image-zoom, 1.35));
    transform-origin: center;
    animation: roleplayMapPreviewZoom 0.72s ease both;
    filter: saturate(1.04) brightness(1.03) contrast(1.05);
}

@keyframes roleplayMapPreviewZoom {
    from {
        opacity: 0;
        transform: translate(var(--zone-image-offset-x, 0%), var(--zone-image-offset-y, 0%)) scale(calc(var(--zone-image-zoom, 1.35) * 0.92));
    }

    to {
        opacity: 0.96;
        transform: translate(var(--zone-image-offset-x, 0%), var(--zone-image-offset-y, 0%)) scale(var(--zone-image-zoom, 1.35));
    }
}

.roleplay-map-overlay,
.roleplay-map-points,
.roleplay-map-area-hotspots {
    position: absolute;
    inset: 0;
}

.roleplay-map-overlay {
    z-index: 2;
    pointer-events: auto;
    display: block;
    width: 100%;
    height: 100%;
}

.roleplay-map-area-hotspots {
    z-index: 3;
    pointer-events: none;
}

.roleplay-map-points {
    z-index: 4;
}

.roleplay-map-area {
    fill: var(--area-color, #ff9223);
    fill-opacity: calc(var(--area-opacity, 0.22) * 0.45);
    stroke: var(--area-color, #ff9223);
    stroke-opacity: 0.72;
    stroke-width: 0.42;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 10px rgba(255, 143, 31, 0.08));
    transition:
        fill 0.18s ease,
        stroke 0.18s ease,
        stroke-width 0.18s ease,
        filter 0.18s ease;
    cursor: pointer;
    pointer-events: auto;
}

.roleplay-map-area:hover,
.roleplay-map-area.is-active {
    fill: var(--area-color, #ff9223);
    fill-opacity: var(--area-opacity, 0.22);
    stroke: var(--area-color, #ff9223);
    stroke-opacity: 0.96;
    stroke-width: 0.58;
    filter: drop-shadow(0 0 16px rgba(255, 144, 34, 0.22));
}

.roleplay-map-area-hotspot {
    position: absolute;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    touch-action: manipulation;
    z-index: 1;
}

.roleplay-map-area-hotspot:focus-visible {
    outline: 2px solid rgba(255, 215, 160, 0.95);
    outline-offset: 2px;
}

.roleplay-map-area-hotspot:hover,
.roleplay-map-area-hotspot.is-active {
    filter: brightness(1.04);
}

.roleplay-map-point {
    position: absolute;
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-decoration: none;
    z-index: 2;
    transition: left 0.28s ease, top 0.28s ease;
}

.roleplay-map-page[data-enhanced="true"] .roleplay-map-point.is-visible {
    display: flex;
}

.roleplay-map-point-dot {
    display: block;
    width: var(--point-size, 14px);
    height: var(--point-size, 14px);
    border-radius: 50%;
    background: radial-gradient(circle, #fff5d8 0%, var(--point-color, #ff9223) 58%, #2a1305 100%);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--point-color, #ff9223) 22%, transparent), 0 0 14px color-mix(in srgb, var(--point-color, #ff9223) 36%, transparent);
    opacity: 0.82;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, width 0.18s ease, height 0.18s ease;
}

.roleplay-map-point.is-active .roleplay-map-point-dot,
.roleplay-map-point:hover .roleplay-map-point-dot {
    transform: scale(1.12);
}

.roleplay-map-point.is-active .roleplay-map-point-dot {
    opacity: 1;
    background: radial-gradient(circle, #fff2d8 0%, var(--point-color, #ff9223) 52%, #2a1305 100%);
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--point-color, #ff9223) 26%, transparent), 0 0 0 14px color-mix(in srgb, var(--point-color, #ff9223) 12%, transparent), 0 0 28px color-mix(in srgb, var(--point-color, #ff9223) 52%, transparent);
}

.roleplay-map-point-label {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    display: none;
    min-width: max-content;
    max-width: 180px;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(8, 10, 16, 0.95);
    border: 1px solid rgba(255, 138, 28, 0.14);
    color: #fff1de;
    font-size: 0.82rem;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
}

.roleplay-map-point:hover .roleplay-map-point-label,
.roleplay-map-point.is-active .roleplay-map-point-label,
.roleplay-map-point-label.is-visible {
    display: block;
}

.roleplay-map-mobile-sheet {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(16, 20, 32, 0.9), rgba(11, 13, 22, 0.96));
    border: 1px solid rgba(255, 138, 28, 0.1);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.roleplay-map-mobile-sheet[hidden] {
    display: none;
}

.roleplay-map-mobile-sheet-copy h3,
.roleplay-map-mobile-sheet-copy p,
.roleplay-map-mobile-description {
    margin: 0;
}

.roleplay-map-mobile-sheet-copy {
    display: grid;
    gap: 6px;
}

@media (hover: none), (pointer: coarse) {
    .roleplay-map-tooltip {
        display: none !important;
    }
}

.roleplay-map-fallback-list {
    display: grid;
    gap: 16px;
}

.roleplay-map-fallback-area {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.roleplay-map-fallback-area h3,
.roleplay-map-fallback-area p {
    margin: 0 0 10px;
}

.roleplay-map-fallback-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.roleplay-map-js-note p {
    margin: 0;
    color: var(--muted);
}

.roleplay-map-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
}

.roleplay-map-modal[hidden] {
    display: none;
}

.roleplay-map-modal-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 24% 12%, rgba(255, 138, 28, 0.2), transparent 34%),
        rgba(0, 0, 0, 0.74);
    backdrop-filter: blur(12px);
}

.roleplay-map-modal-dialog {
    position: relative;
    width: min(720px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    max-height: calc(100vh - 40px);
    overflow-x: hidden;
    overflow-y: auto;
    margin: 20px auto;
    padding: clamp(18px, 3vw, 28px);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 178, 89, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(42, 30, 22, 0.96), rgba(15, 13, 12, 0.96)),
        var(--panel);
    border: 1px solid rgba(255, 178, 89, 0.22);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 226, 184, 0.1);
    animation: site-modal-rise 0.18s ease-out;
}

.roleplay-map-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(255, 138, 28, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    cursor: pointer;
}

.roleplay-map-modal-dialog h2 {
    padding-right: 46px;
    margin-top: 0;
    font-size: clamp(1.35rem, 4vw, 2rem);
}

.roleplay-map-modal-description {
    margin: 8px 0 18px;
    color: var(--muted);
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.roleplay-map-modal-state {
    margin: 0 0 12px;
    color: var(--muted);
}

.roleplay-map-topic-list,
.roleplay-map-link-list {
    display: grid;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

.roleplay-map-link-list {
    margin-top: 16px;
}

.roleplay-map-topic-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    padding: 14px 16px;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text) !important;
    text-decoration: none;
}

.roleplay-map-topic-card strong,
.roleplay-map-topic-card small,
.roleplay-map-link-list a {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.roleplay-map-topic-card small {
    color: var(--muted);
}

.roleplay-map-point-page,
.roleplay-map-topic-list.is-static {
    display: grid;
    gap: 14px;
}

body.map-modal-open {
    overflow: hidden;
}

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

@keyframes site-modal-rise {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.site-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 240;
    display: grid;
    place-items: center;
    padding: clamp(14px, 3vw, 28px);
}

.site-confirm-modal[hidden] {
    display: none;
}

.site-confirm-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 138, 28, 0.22), transparent 34%),
        radial-gradient(circle at 84% 88%, rgba(255, 207, 117, 0.12), transparent 30%),
        rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(14px);
}

.site-confirm-dialog {
    position: relative;
    width: min(100%, 520px);
    display: grid;
    gap: 12px;
    padding: clamp(20px, 4vw, 30px);
    border-radius: 24px;
    border: 1px solid rgba(255, 178, 89, 0.24);
    background:
        radial-gradient(circle at top right, rgba(255, 178, 89, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(42, 30, 22, 0.97), rgba(14, 12, 11, 0.97)),
        var(--panel);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.56),
        inset 0 1px 0 rgba(255, 226, 184, 0.1);
    animation: site-modal-rise 0.18s ease-out;
}

.site-confirm-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(255, 178, 89, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    box-shadow: none;
}

.site-confirm-kicker {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.site-confirm-dialog h2,
.site-confirm-dialog p {
    margin: 0;
}

.site-confirm-dialog h2 {
    padding-right: 42px;
    font-size: clamp(1.35rem, 4vw, 1.9rem);
    line-height: 1.12;
}

.site-confirm-dialog p {
    color: var(--text);
    line-height: 1.65;
}

.site-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 6px;
}

.site-confirm-actions .button-secondary,
.site-confirm-actions .button-danger {
    min-width: 140px;
}

body.theme-blueanime .site-confirm-backdrop {
    background:
        radial-gradient(circle at 18% 12%, rgba(95, 187, 255, 0.22), transparent 34%),
        radial-gradient(circle at 84% 88%, rgba(61, 139, 255, 0.13), transparent 30%),
        rgba(1, 9, 20, 0.76);
}

body.theme-blueanime .site-confirm-dialog {
    border-color: rgba(95, 187, 255, 0.26);
    background:
        radial-gradient(circle at top right, rgba(95, 187, 255, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(22, 34, 50, 0.98), rgba(8, 14, 24, 0.97)),
        var(--panel);
    box-shadow:
        0 30px 80px rgba(0, 8, 20, 0.6),
        inset 0 1px 0 rgba(189, 232, 255, 0.08);
}

body.theme-blueanime .site-confirm-close {
    border-color: rgba(102, 168, 255, 0.22);
    background: rgba(20, 35, 54, 0.88);
}

body.theme-blueanime .site-confirm-kicker {
    color: #82c3ff;
}

@media (max-width: 560px) {
    .site-confirm-modal {
        align-items: end;
        padding: 10px;
    }

    .site-confirm-dialog {
        width: 100%;
        border-radius: 22px;
        padding: 20px;
    }

    .site-confirm-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .site-confirm-actions .button-secondary,
    .site-confirm-actions .button-danger {
        width: 100%;
        min-width: 0;
    }
}

body.theme-blueanime .roleplay-map-modal-backdrop {
    background:
        radial-gradient(circle at 24% 12%, rgba(95, 187, 255, 0.2), transparent 34%),
        rgba(1, 9, 20, 0.78);
}

body.theme-blueanime .roleplay-map-modal-dialog {
    background:
        radial-gradient(circle at top right, rgba(95, 187, 255, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(22, 34, 50, 0.98), rgba(8, 14, 24, 0.97)),
        var(--panel);
    border-color: rgba(95, 187, 255, 0.24);
    box-shadow:
        0 28px 70px rgba(0, 8, 20, 0.58),
        inset 0 1px 0 rgba(189, 232, 255, 0.08);
}

body.theme-blueanime .roleplay-map-modal-close {
    border-color: rgba(102, 168, 255, 0.2);
    background: rgba(20, 35, 54, 0.88);
}

@media (max-width: 900px) {
    .roleplay-map-hero .roleplay-card-actions,
    .roleplay-map-mobile-sheet .roleplay-card-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .roleplay-map-viewport {
        width: 100%;
        min-width: 0;
        border-radius: 18px;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.04),
            0 16px 34px rgba(0, 0, 0, 0.3);
    }

    .roleplay-map-area-quick {
        touch-action: manipulation;
    }

    .roleplay-map-point {
        width: min(22px, calc(var(--point-size, 14px) + 6px));
        height: min(22px, calc(var(--point-size, 14px) + 6px));
    }

    .roleplay-map-point-dot {
        width: min(var(--point-size, 14px), 8px);
        height: min(var(--point-size, 14px), 8px);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--point-color, #ff9223) 18%, transparent), 0 0 9px color-mix(in srgb, var(--point-color, #ff9223) 28%, transparent);
    }

    .roleplay-map-point.is-active .roleplay-map-point-dot {
        width: min(var(--point-size, 14px), 8px);
        height: min(var(--point-size, 14px), 8px);
        transform: scale(1.1);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--point-color, #ff9223) 20%, transparent), 0 0 11px color-mix(in srgb, var(--point-color, #ff9223) 34%, transparent);
    }

    .roleplay-map-area {
        fill-opacity: calc(var(--area-opacity, 0.22) * 0.22);
        stroke-opacity: 0.52;
    }

    .roleplay-map-area:hover,
    .roleplay-map-area.is-active {
        fill-opacity: calc(var(--area-opacity, 0.22) * 0.58);
        stroke-opacity: 0.78;
    }

    .roleplay-map-point-label {
        display: none !important;
    }

    .roleplay-map-modal-dialog {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        box-sizing: border-box;
        margin: 8px auto;
        max-height: calc(100vh - 16px);
        padding: 18px;
        border-radius: 20px;
    }

    .roleplay-map-mobile-sheet {
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .roleplay-map-mobile-sheet-copy,
    .roleplay-map-mobile-sheet-copy h3,
    .roleplay-map-mobile-sheet-copy p,
    .roleplay-map-mobile-description {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/* Technique school refinements */
.technique-editor-page {
    display: grid;
    gap: 18px;
}

.technique-editor-form {
    display: grid;
    gap: 18px;
}

.technique-editor-form > label,
.technique-editor-form .character-editor-grid > label {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.technique-editor-form input[type="text"],
.technique-editor-form input[type="number"],
.technique-editor-form input[type="file"],
.technique-editor-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.technique-form-section {
    display: grid;
    gap: 14px;
}

.technique-form-actions {
    align-items: center;
}

.technique-form-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
}

.technique-compact-form {
    max-width: 860px;
}

.technique-page .character-grid-wide,
.technique-school-page .character-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.technique-school-page .character-grid-wide.technique-school-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    justify-content: start;
}

.technique-page .character-grid-wide.technique-grid,
.technique-school-page .character-grid-wide.technique-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    justify-content: start;
}

.technique-school-page .character-grid-wide.technique-school-grid > .technique-rank-card:only-child,
.technique-page .character-grid-wide.technique-grid > .technique-card-modern:only-child,
.technique-school-page .character-grid-wide.technique-grid > .technique-card-modern:only-child {
    max-width: 520px;
}

.technique-card-modern,
.technique-rank-card {
    overflow: hidden;
}

.technique-card-modern .character-modern-body,
.technique-rank-card .character-modern-body {
    min-width: 0;
}

.technique-scroll-price-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 4px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 159, 67, 0.18);
    background:
        radial-gradient(circle at top left, rgba(255, 210, 132, 0.16), transparent 42%),
        linear-gradient(135deg, rgba(255, 159, 67, 0.14), rgba(255, 255, 255, 0.04)),
        rgba(255, 255, 255, 0.035);
}

.technique-scroll-price-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.technique-scroll-price-value {
    color: var(--accent-strong);
    font-size: 1rem;
    font-weight: 900;
    white-space: nowrap;
}

.technique-card-modern .character-modern-top,
.technique-rank-card .character-modern-top {
    gap: 12px;
    align-items: start;
}

.technique-card-modern .character-modern-top > div,
.technique-rank-card .character-modern-top > div {
    min-width: 0;
}

.technique-card-modern h2,
.technique-rank-card h2 {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.technique-card-modern .character-modern-image,
.technique-rank-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    min-height: 0;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
}

.technique-description,
.technique-card-modern .profile-info-item,
.technique-rank-card p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.technique-card-modern .news-links,
.technique-rank-card .news-links,
.technique-rank-card .news-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.technique-requirement-badges {
    min-width: 0;
}

.technique-requirement-badges .profile-badge {
    max-width: 100%;
    min-width: 0;
}

.technique-requirement-badges .profile-badge img,
.technique-editor-form .profile-badge img {
    flex: 0 0 auto;
    border-radius: 8px;
}

@media (max-width: 720px) {
    .technique-school-hero,
    .technique-page-hero,
    .technique-editor-form,
    .technique-form-section {
        border-radius: 20px;
    }

    .technique-page .character-grid-wide,
    .technique-school-page .character-grid-wide {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .technique-card-modern .character-modern-top,
    .technique-rank-card .character-modern-top,
    .technique-school-head,
    .technique-school-head .news-links,
    .technique-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .technique-card-modern .profile-badge,
    .technique-rank-card .profile-badge,
    .technique-school-stats .profile-badge {
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    .technique-card-modern .technique-card-meta {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .technique-card-modern .technique-card-meta .profile-badge {
        width: 100%;
        box-sizing: border-box;
    }

    .technique-card-modern .news-links,
    .technique-rank-card .news-links,
    .technique-rank-card .news-actions,
    .technique-form-actions,
    .technique-school-head .news-links {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .technique-card-modern .news-links > *,
    .technique-rank-card .news-links > *,
    .technique-rank-card .news-actions > *,
    .technique-form-actions > *,
    .technique-school-head .news-links > * {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    .technique-requirement-badges,
    .technique-editor-form .profile-badges {
        gap: 8px;
    }

    .technique-scroll-price-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .technique-editor-form .profile-badge {
        width: 100%;
        justify-content: flex-start;
        box-sizing: border-box;
        padding: 8px 10px;
    }

    .technique-card-modern .character-modern-image,
    .technique-rank-image {
        aspect-ratio: 16 / 9;
    }

    .technique-description {
        padding: 12px 14px;
    }
}

/* Map admin */
.roleplay-map-admin-page {
    display: grid;
    gap: 18px;
}

.map-admin-card .character-modern-body,
.map-admin-form {
    display: grid;
    gap: 16px;
}

.technique-json-preview {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 159, 67, 0.1);
}

.technique-json-preview span {
    color: #ffd4ae;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.technique-json-preview pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.88rem;
    color: var(--text);
}

.map-admin-form select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.map-area-draw-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.map-area-draw-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.map-area-draw-stage {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 138, 28, 0.18);
    background: rgba(0, 0, 0, 0.24);
    cursor: crosshair;
}

.map-area-draw-image {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    pointer-events: none;
}

.map-area-draw-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-area-draw-overlay polygon {
    fill: var(--area-color, #ff9223);
    fill-opacity: var(--area-opacity, 0.22);
    stroke: var(--area-color, #ff9223);
    stroke-opacity: 0.96;
    stroke-width: 0.32;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.map-area-draw-overlay circle {
    fill: #ffe2aa;
    stroke: rgba(35, 18, 4, 0.88);
    stroke-width: 0.18;
    vector-effect: non-scaling-stroke;
}

.map-area-draw-overlay text {
    fill: #fff2d8;
    font-size: 3px;
    font-weight: 800;
    paint-order: stroke;
    stroke: rgba(0, 0, 0, 0.78);
    stroke-width: 0.35;
    pointer-events: none;
}

.map-area-admin-point {
    cursor: pointer;
    pointer-events: all;
}

.map-area-admin-point circle {
    fill: var(--point-color, #45e6ff);
    stroke: rgba(0, 0, 0, 0.86);
    stroke-width: 0.38;
    filter: drop-shadow(0 0 5px rgba(69, 230, 255, 0.8));
}

.map-area-admin-point text {
    fill: #ffffff;
    font-size: 2.7px;
    paint-order: stroke;
    stroke: rgba(0, 0, 0, 0.75);
    stroke-width: 0.34;
}

.map-area-admin-point.is-active circle {
    fill: #ffdd6b;
    stroke: #2b1206;
}

.map-area-points-panel {
    display: grid;
    gap: 14px;
}

.map-area-point-list {
    display: grid;
    gap: 10px;
}

.map-area-point-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(92px, 120px) minmax(92px, 120px);
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 159, 67, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.map-area-point-row.is-active {
    border-color: rgba(255, 221, 107, 0.68);
    background: rgba(255, 221, 107, 0.1);
}

.map-area-point-row span {
    display: grid;
    gap: 3px;
}

.map-area-point-row small {
    color: rgba(255, 232, 207, 0.72);
    line-height: 1.35;
}

.settings-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 0.4rem;
    color: rgba(245, 241, 232, 0.9);
}

.settings-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 0.1rem;
    accent-color: var(--accent-color, #e67e22);
    flex: 0 0 auto;
}

.settings-checkbox-compact {
    gap: 0.55rem;
    margin-top: 0;
}

.settings-checkbox-compact span {
    line-height: 1.3;
}

.settings-multi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem 1rem;
    margin-top: 0.6rem;
}

.character-game-sheet .bb-spoiler > .character-game-grid,
.character-game-sheet .bb-spoiler > div.character-game-grid {
    margin-top: 1rem;
}

.settings-browser-status {
    display: block;
    margin-top: 0.35rem;
    color: rgba(255, 214, 153, 0.86);
}

.left-sidebar .profile-card-featured {
    padding: 14px;
    border-radius: 20px;
}

.left-sidebar .small-avatar {
    width: 52px;
    height: 52px;
}

.left-sidebar .profile-meta p {
    margin-top: 6px;
    font-size: 0.82rem;
}

.left-sidebar .sidebar-section {
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
}

.left-sidebar .sidebar-section-head {
    gap: 2px;
}

.left-sidebar .sidebar-section-head h3 {
    font-size: 0.92rem;
}

.left-sidebar .sidebar-section-kicker {
    font-size: 0.7rem;
}

.left-sidebar .sidebar-nav-grid {
    gap: 6px;
}

.left-sidebar .sidebar-link-card {
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 10px;
    align-items: center !important;
    padding: 9px 11px;
    border-radius: 12px;
    min-height: 0;
}

.left-sidebar .sidebar-admin-mode-form {
    margin: 0;
    width: 100%;
}

.left-sidebar .sidebar-admin-mode-form .sidebar-link-card {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.left-sidebar .sidebar-link-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 0.86rem;
}

.left-sidebar .sidebar-link-copy {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0;
    min-width: 0;
}

.left-sidebar .sidebar-link-copy strong {
    display: inline-block !important;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.left-sidebar .sidebar-inline-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(255, 138, 28, 0.18);
    border: 1px solid rgba(255, 138, 28, 0.32);
    color: #ffd9b0;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}

.left-sidebar .sidebar-link-copy small {
    display: none !important;
}

.left-sidebar .sidebar-inline-link {
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.84rem;
}

.right-sidebar {
    display: block;
    visibility: visible;
    opacity: 1;
}

@media (min-width: 769px) {
    .layout {
        grid-template-columns: 250px minmax(0, 1fr) 290px;
    }

    .right-sidebar {
        width: 100%;
        justify-self: stretch;
    }
}

body.theme-blueanime .app-shell {
    background:
        radial-gradient(circle at top left, rgba(136, 186, 244, 0.22), transparent 24%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.7), transparent 32%),
        linear-gradient(180deg, rgba(116, 169, 231, 0.08), transparent 240px);
}

body.theme-blueanime .profile-head-gift-icon {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(102, 168, 255, 0.18);
    box-shadow: 0 10px 20px rgba(4, 10, 18, 0.28);
}

body.theme-blueanime .profile-nick-icon {
    background:
        radial-gradient(circle at 30% 20%, rgba(160, 212, 255, 0.22), transparent 38%),
        rgba(74, 163, 255, 0.1);
    border-color: rgba(113, 184, 255, 0.32);
    box-shadow: 0 14px 28px rgba(3, 9, 20, 0.34);
}

body.theme-blueanime .profile-head-gift-more {
    background: rgba(102, 168, 255, 0.16);
    border-color: rgba(102, 168, 255, 0.28);
}

body.theme-blueanime .topbar {
    background: rgba(237, 245, 253, 0.82);
    border-bottom: 1px solid rgba(103, 146, 201, 0.18);
    box-shadow: 0 12px 32px rgba(67, 101, 140, 0.08);
}

body.theme-blueanime .brand-mark {
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(208, 226, 246, 0.92));
    border: 1px solid rgba(103, 146, 201, 0.24);
    box-shadow: 0 12px 30px rgba(79, 134, 198, 0.16);
}

body.theme-blueanime .brand-text strong {
    color: #17324d;
    letter-spacing: 0.06em;
}

body.theme-blueanime .brand-text small {
    color: #6b84a2;
}

body.theme-blueanime .menu-toggle {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(103, 146, 201, 0.22);
    color: #4f86c6;
}

body.theme-blueanime .content {
    padding-top: 14px;
}

body.theme-blueanime .left-sidebar,
body.theme-blueanime .right-sidebar {
    scrollbar-color: rgba(74, 163, 255, 0.76) rgba(13, 23, 39, 0.72);
}

body.theme-blueanime .left-sidebar::-webkit-scrollbar-track,
body.theme-blueanime .right-sidebar::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(20, 34, 55, 0.76), rgba(8, 16, 30, 0.92));
}

body.theme-blueanime .left-sidebar::-webkit-scrollbar-thumb,
body.theme-blueanime .right-sidebar::-webkit-scrollbar-thumb {
    border-color: rgba(8, 16, 30, 0.9);
    background: linear-gradient(180deg, rgba(151, 214, 255, 0.96), rgba(74, 163, 255, 0.94) 48%, rgba(39, 83, 166, 0.96));
}

body.theme-blueanime .sidebar-section,
body.theme-blueanime .right-sidebar .character-card-sidebar,
body.theme-blueanime .right-sidebar .sidebar-section {
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(124, 179, 240, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(235, 243, 251, 0.9));
    border: 1px solid rgba(103, 146, 201, 0.18);
    box-shadow:
        0 18px 36px rgba(58, 86, 120, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body.theme-blueanime .right-sidebar .character-card-sidebar::before,
body.theme-blueanime .right-sidebar .sidebar-section::before {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 34%, rgba(124, 179, 240, 0.08));
}

body.theme-blueanime .sidebar-section-kicker {
    color: #5f8fc6;
}

body.theme-blueanime .sidebar-link-card {
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(229, 239, 249, 0.88));
    border: 1px solid rgba(121, 160, 210, 0.18);
    box-shadow: 0 10px 24px rgba(67, 101, 140, 0.06);
}

body.theme-blueanime .sidebar-link-card:hover {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(220, 235, 249, 0.95));
    border-color: rgba(103, 146, 201, 0.34);
    box-shadow: 0 14px 28px rgba(67, 101, 140, 0.10);
}

body.theme-blueanime .sidebar-link-card.is-active {
    background:
        linear-gradient(135deg, rgba(87, 142, 204, 0.14), rgba(255, 255, 255, 0.92));
    border-color: rgba(79, 134, 198, 0.42);
    box-shadow:
        0 0 0 1px rgba(79, 134, 198, 0.18),
        0 16px 30px rgba(67, 101, 140, 0.12);
}

body.theme-blueanime .sidebar-link-icon {
    background:
        linear-gradient(135deg, rgba(79, 134, 198, 0.16), rgba(124, 179, 240, 0.08));
    border-color: rgba(103, 146, 201, 0.22);
    color: #4f86c6;
}

body.theme-blueanime .sidebar-link-copy strong,
body.theme-blueanime .sidebar-inline-link,
body.theme-blueanime .right-sidebar .character-summary-name,
body.theme-blueanime .right-sidebar .character-summary-meta,
body.theme-blueanime .right-sidebar .character-summary-meta a {
    color: #1f4266;
}

body.theme-blueanime .sidebar-link-copy small,
body.theme-blueanime .profile-meta p,
body.theme-blueanime .sidebar-footer p,
body.theme-blueanime .right-sidebar .character-summary-meta,
body.theme-blueanime .roleplay-legacy-copy,
body.theme-blueanime .news-excerpt,
body.theme-blueanime .news-meta,
body.theme-blueanime .thread-post-meta-line,
body.theme-blueanime .thread-post-time,
body.theme-blueanime .thread-post-symbols,
body.theme-blueanime .messages-thread-user p {
    color: #68809c;
}

body.theme-blueanime .sidebar-inline-link {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(103, 146, 201, 0.18);
}

body.theme-blueanime .sidebar-inline-link.is-active {
    background: rgba(79, 134, 198, 0.12);
    border-color: rgba(79, 134, 198, 0.32);
}

body.theme-blueanime .profile-hero-card,
body.theme-blueanime .profile-showcase-main,
body.theme-blueanime .home-hero,
body.theme-blueanime .roleplay-legacy-intro,
body.theme-blueanime .roleplay-legacy-summary {
    background:
        radial-gradient(circle at top right, rgba(124, 179, 240, 0.18), transparent 28%),
        radial-gradient(circle at left, rgba(255, 255, 255, 0.86), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(230, 239, 250, 0.92));
    border-color: rgba(103, 146, 201, 0.18);
}

body.theme-blueanime .home-highlight,
body.theme-blueanime .roleplay-legacy-item,
body.theme-blueanime .profile-info-item,
body.theme-blueanime .comment-card {
    background: rgba(255, 255, 255, 0.74);
    border-color: rgba(103, 146, 201, 0.14);
    box-shadow: 0 10px 24px rgba(67, 101, 140, 0.06);
}

body.theme-blueanime .news-card {
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 241, 252, 0.94));
    border: 1px solid rgba(103, 146, 201, 0.16);
    box-shadow: 0 22px 46px rgba(67, 101, 140, 0.10);
}

body.theme-blueanime .news-card-glow {
    background: radial-gradient(circle, rgba(124, 179, 240, 0.26), transparent 65%);
}

body.theme-blueanime .news-badge,
body.theme-blueanime .chat-kicker,
body.theme-blueanime .thread-reply-quote-label {
    background: rgba(79, 134, 198, 0.12);
    border-color: rgba(79, 134, 198, 0.16);
    color: #4a79b0;
}

body.theme-blueanime .thread-post-card,
body.theme-blueanime .thread-post,
body.theme-blueanime .thread-post-character-card,
body.theme-blueanime .thread-post-user-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(234, 243, 252, 0.9));
    border-color: rgba(103, 146, 201, 0.16);
    box-shadow: 0 18px 36px rgba(67, 101, 140, 0.08);
}

body.theme-blueanime .thread-post-rank-card,
body.theme-blueanime .thread-post-meta-pill,
body.theme-blueanime .thread-post-meta-strip span,
body.theme-blueanime .thread-post-stat {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(103, 146, 201, 0.14);
    color: #284b71;
}

body.theme-blueanime .thread-post-stat-bar {
    background: rgba(96, 126, 156, 0.12);
}

body.theme-blueanime .thread-post-stat-bar-life > span {
    background: linear-gradient(90deg, #87a7d6, #5f8fc6);
}

body.theme-blueanime .thread-post-stat-bar-chakra > span {
    background: linear-gradient(90deg, #65c3d7, #4f86c6);
}

body.theme-blueanime .messages-sidebar,
body.theme-blueanime .messages-thread,
body.theme-blueanime .messages-page-telegram .messages-sidebar,
body.theme-blueanime .messages-page-telegram .messages-thread,
body.theme-blueanime .messages-telegram-thread-shell {
    background:
        linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(232, 241, 252, 0.94));
    border-color: rgba(103, 146, 201, 0.18);
    box-shadow: 0 18px 38px rgba(67, 101, 140, 0.08);
}

body.theme-blueanime .messages-thread-head-telegram,
body.theme-blueanime .messages-thread-head,
body.theme-blueanime .messages-sidebar-head {
    background: rgba(241, 247, 254, 0.92);
    border-bottom: 1px solid rgba(103, 146, 201, 0.14);
    backdrop-filter: blur(14px);
}

body.theme-blueanime .messages-conversation-card-telegram,
body.theme-blueanime .messages-conversation-card,
body.theme-blueanime .message-bubble-card {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(103, 146, 201, 0.14);
    box-shadow: 0 10px 20px rgba(67, 101, 140, 0.05);
}

body.theme-blueanime .messages-conversation-card-telegram.is-active,
body.theme-blueanime .messages-conversation-card.is-active {
    background: linear-gradient(135deg, rgba(79, 134, 198, 0.12), rgba(255, 255, 255, 0.92));
    border-color: rgba(79, 134, 198, 0.28);
}

body.theme-blueanime .message-bubble-telegram.is-own .message-bubble-card,
body.theme-blueanime .message-bubble.is-own .message-bubble-card {
    background: linear-gradient(135deg, rgba(98, 184, 212, 0.18), rgba(255, 255, 255, 0.92));
    border-color: rgba(98, 184, 212, 0.22);
}

body.theme-blueanime .message-bubble-meta,
body.theme-blueanime .messages-history-status,
body.theme-blueanime .messages-pagination-copy small {
    color: #6d87a4;
}

body.theme-blueanime .bottom-mobile-nav {
    background: rgba(238, 245, 253, 0.88);
    border-top: 1px solid rgba(103, 146, 201, 0.16);
    box-shadow: 0 -14px 30px rgba(67, 101, 140, 0.08);
    backdrop-filter: blur(18px);
}

body.theme-blueanime .mobile-menu-item.is-active {
    background: linear-gradient(145deg, rgba(79, 134, 198, 0.16), rgba(255, 255, 255, 0.74));
    border-color: rgba(79, 134, 198, 0.24);
    box-shadow: 0 10px 22px rgba(79, 134, 198, 0.10);
}

body.theme-blueanime .mobile-menu-icon {
    color: #4f86c6;
}

body.theme-blueanime .online-toggle,
body.theme-blueanime .online-panel {
    background: rgba(244, 249, 255, 0.94);
    border-color: rgba(103, 146, 201, 0.16);
    box-shadow: 0 18px 36px rgba(67, 101, 140, 0.10);
}

body.theme-blueanime .online-user-card {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(103, 146, 201, 0.14);
}

body.theme-blueanime .empty-state {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 241, 252, 0.94));
}

body.theme-blueanime table {
    background: rgba(255, 255, 255, 0.86);
}

@media (max-width: 768px) {
    body.theme-blueanime .left-sidebar,
    body.theme-blueanime .right-sidebar {
        background: rgba(241, 247, 254, 0.95);
        border-color: rgba(103, 146, 201, 0.18);
        box-shadow: 0 24px 44px rgba(67, 101, 140, 0.14);
    }

    body.theme-blueanime .topbar {
        background: rgba(241, 247, 254, 0.9);
    }
}

.album-page {
    display: grid;
    gap: 20px;
}

.album-profile-section {
    display: grid;
    gap: 16px;
}

.album-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.album-card-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.album-card,
.album-card-shell {
    overflow: hidden;
}

.album-card-cover-link {
    display: block;
    text-decoration: none;
}

.album-card-cover,
.album-card-cover-fallback {
    width: 100%;
    aspect-ratio: 16 / 11;
    display: block;
    border-radius: 22px;
    overflow: hidden;
}

.album-card-cover {
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
}

.album-card-cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    text-align: center;
    color: var(--muted);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.06)),
        radial-gradient(circle at top right, rgba(244, 157, 55, 0.16), transparent 55%);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.album-card-body {
    display: grid;
    gap: 12px;
}

.album-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.album-card-meta h3,
.album-card-meta h3 a {
    margin: 0;
    color: var(--text);
    text-decoration: none;
}

.album-card-body p {
    margin: 0;
    color: var(--muted);
}

.album-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: var(--muted);
    font-size: 0.92rem;
}

.album-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.album-form-card,
.album-hero-card {
    display: grid;
    gap: 18px;
}

.album-manage-photos {
    display: grid;
    gap: 18px;
}

.album-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.album-photo-grid-manage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.album-photo-tile,
.album-manage-photo-card {
    position: relative;
    display: block;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 20px;
    overflow: hidden;
}

.album-photo-tile {
    cursor: pointer;
}

.album-photo-thumb,
.album-manage-photo-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.24s ease, filter 0.24s ease;
}

.album-photo-tile:hover .album-photo-thumb {
    transform: scale(1.03);
    filter: brightness(1.03);
}

.album-photo-tile-shell {
    position: relative;
    display: grid;
    gap: 10px;
    align-content: start;
}

.album-photo-meta {
    display: grid;
    gap: 8px;
}

.album-photo-date {
    color: var(--muted-text);
    font-size: 0.82rem;
}

.album-photo-description {
    margin: 0;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.45;
    word-break: break-word;
}

.album-photo-feedback {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.album-photo-like-form {
    display: inline-flex;
    margin: 0;
}

.album-photo-like-button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.album-photo-like-button:hover {
    transform: translateY(-1px);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.album-photo-like-button.is-liked {
    color: #ff6b8e;
    background: rgba(255, 107, 142, 0.14);
    border-color: rgba(255, 107, 142, 0.34);
}

.album-photo-like-button.is-static {
    cursor: default;
}

.album-photo-like-count {
    min-width: 16px;
    color: var(--text);
    font-weight: 600;
}

.album-photo-delete-inline {
    position: static;
    inset: auto;
    margin: 0;
}

.album-manage-photo-delete {
    position: absolute;
    inset: auto 10px 10px 10px;
}

.album-photo-tile-shell .album-manage-photo-delete.album-photo-delete-inline {
    position: static;
    inset: auto;
    margin: 0;
}

.album-photo-tile-shell > .album-photo-tile {
    order: 1;
}

.album-photo-tile-shell > .album-manage-photo-delete.album-photo-delete-inline {
    order: 2;
    position: static !important;
    inset: auto !important;
    margin: 0 !important;
    z-index: auto !important;
    display: block;
}

.album-photo-tile-shell > .album-photo-meta {
    order: 3;
}

.album-photo-delete-inline .button-danger,
.album-manage-photo-delete .button-danger {
    width: 100%;
}

.album-owner-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.album-description-text {
    color: var(--text);
}

.album-locked-panel {
    display: grid;
    gap: 14px;
    padding: 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.album-locked-panel h3,
.album-locked-panel p {
    margin: 0;
}

.album-unlock-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.album-unlock-form input {
    min-width: 240px;
    flex: 1;
}

.album-actions-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.album-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 360px 72px;
    align-items: center;
    gap: 18px;
    padding: 28px;
    background: rgba(4, 8, 16, 0.92);
    backdrop-filter: blur(18px);
    overscroll-behavior: contain;
}

.album-lightbox[hidden] {
    display: none !important;
}

.album-lightbox-stage {
    display: grid;
    gap: 14px;
    justify-items: center;
    position: relative;
    z-index: 1;
}

.album-lightbox-image {
    max-width: min(86vw, 1200px);
    max-height: 76vh;
    width: auto;
    height: auto;
    border-radius: 24px;
    object-fit: contain;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.album-lightbox-caption {
    max-width: min(86vw, 900px);
    text-align: center;
    color: #f4f6fb;
    font-size: 0.98rem;
}

.album-lightbox-close,
.album-lightbox-nav {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(180deg, rgba(14, 20, 32, 0.96), rgba(8, 12, 20, 0.98));
    color: #f8fbff;
    border-radius: 18px;
    min-height: 56px;
    min-width: 56px;
    cursor: pointer;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
}

.album-lightbox-close {
    position: fixed !important;
    top: calc(16px + env(safe-area-inset-top));
    right: calc(16px + env(safe-area-inset-right));
    z-index: 2147483647;
    font-size: 1.6rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
}

.album-lightbox-nav {
    font-size: 1.5rem;
    z-index: 4;
}

.album-lightbox-close:hover,
.album-lightbox-nav:hover {
    background: linear-gradient(180deg, rgba(24, 34, 52, 0.98), rgba(12, 18, 30, 0.98));
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: 0 22px 38px rgba(0, 0, 0, 0.5);
}

body.album-lightbox-open {
    overflow: hidden;
}

.site-image-preview {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(4, 8, 16, 0.92);
    backdrop-filter: blur(18px);
    overscroll-behavior: contain;
}

.site-image-preview[hidden] {
    display: none !important;
}

.site-image-preview-stage {
    display: grid;
    gap: 14px;
    justify-items: center;
    max-width: min(94vw, 1280px);
    max-height: 90vh;
}

.site-image-preview-img {
    display: block;
    max-width: min(94vw, 1280px);
    max-height: 82vh;
    width: auto;
    height: auto;
    border-radius: 24px;
    object-fit: contain;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.site-image-preview-caption {
    max-width: min(86vw, 900px);
    color: #f4f6fb;
    font-size: 0.98rem;
    text-align: center;
}

.site-image-preview-close {
    position: fixed;
    top: calc(16px + env(safe-area-inset-top));
    right: calc(16px + env(safe-area-inset-right));
    z-index: 10001;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 56px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(14, 20, 32, 0.96), rgba(8, 12, 20, 0.98));
    color: #f8fbff;
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
}

.site-image-preview-close:hover {
    background: linear-gradient(180deg, rgba(24, 34, 52, 0.98), rgba(12, 18, 30, 0.98));
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: 0 22px 38px rgba(0, 0, 0, 0.5);
}

body.site-image-preview-open {
    overflow: hidden;
}

body.site-image-preview-open .bottom-mobile-nav,
body.site-image-preview-open .mobile-menu,
body.site-image-preview-open .mobile-menu-toggle,
body.site-image-preview-open .mobile-panel-overlay,
body.site-image-preview-open .online-users-fab,
body.site-image-preview-open .online-users-panel {
    display: none !important;
}

body.album-lightbox-open .bottom-mobile-nav,
body.album-lightbox-open .mobile-menu,
body.album-lightbox-open .mobile-menu-toggle,
body.album-lightbox-open .mobile-panel-overlay,
body.album-lightbox-open .online-users-fab,
body.album-lightbox-open .online-users-panel {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.album-lightbox-like-form {
    display: flex;
}

.album-lightbox-like-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    min-width: 48px;
    padding: 0 18px;
    border-radius: 999px;
}

.album-lightbox-like-icon {
    line-height: 1;
    font-size: 1.12rem;
}

.album-lightbox-like-count {
    min-width: 1.5ch;
    text-align: center;
    color: #f4f6fb;
    font-weight: 700;
    font-size: 0.96rem;
}

.album-lightbox-comments {
    display: grid;
    gap: 14px;
    align-self: stretch;
    min-height: 0;
    max-height: calc(100vh - 56px);
    padding: 18px;
    border-radius: 22px;
    background: rgba(17, 22, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.album-lightbox-comments-head {
    color: #f4f6fb;
}

.album-lightbox-comments-head-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.album-lightbox-comments-head-spacer {
    min-width: 0;
}

.album-lightbox-comments-head #album-lightbox-comments-title {
    justify-self: center;
    text-align: center;
}

.album-lightbox-comments-head .album-lightbox-like-form,
.album-lightbox-comments-head .album-lightbox-like-button {
    justify-self: end;
}

.album-lightbox-comment-form {
    display: grid;
    gap: 10px;
}

.album-lightbox-comment-form textarea {
    min-height: 110px;
}

.album-lightbox-comment-edit-state {
    font-size: 0.82rem;
    color: #ffcf7b;
}

.album-lightbox-comments-list {
    display: grid;
    gap: 12px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    max-height: min(52vh, 560px);
    overscroll-behavior: contain;
}

.album-lightbox-comment-card {
    margin: 0;
}

.album-lightbox-comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.album-comment-edit-form {
    display: grid;
    gap: 8px;
    width: 100%;
}

.album-comment-edit-form textarea {
    min-height: 92px;
}

.album-comment-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 980px) {
    .album-card-grid,
    .album-card-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .album-photo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .album-card-grid,
    .album-card-grid-wide,
    .album-photo-grid,
    .album-photo-grid-manage {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .album-card-cover,
    .album-card-cover-fallback {
        border-radius: 18px;
    }

    .album-photo-thumb,
    .album-manage-photo-image {
        border-radius: 16px;
    }

    .album-card-meta,
    .album-owner-line,
    .album-actions-row,
    .album-card-actions,
    .album-unlock-form {
        grid-template-columns: 1fr;
        display: grid;
    }

    .album-lightbox {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        align-content: stretch;
        align-items: stretch;
        justify-items: stretch;
        height: 100dvh;
        max-height: 100dvh;
        padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .album-lightbox-stage {
        gap: 10px;
        min-height: 0;
        max-height: min(46vh, 420px);
        align-content: start;
        width: 100%;
        justify-self: stretch;
    }

    .album-lightbox-image {
        max-width: 100%;
        max-height: min(40vh, 360px);
        border-radius: 18px;
    }

    .album-lightbox-caption {
        width: 100%;
        max-width: 100%;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        text-align: left;
        font-size: 0.94rem;
    }

    .album-lightbox-like-button {
        min-height: 46px;
        min-width: 46px;
        padding: 0 16px;
        gap: 8px;
    }

    .album-lightbox-comments {
        min-height: 0;
        max-height: none;
        height: 100%;
        width: 100%;
        max-width: 100%;
        padding: 12px 12px calc(10px + env(safe-area-inset-bottom));
        border-radius: 18px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        align-self: stretch;
        justify-self: stretch;
    }

    .album-lightbox-comments-head,
    .album-lightbox-comments-list,
    .album-lightbox-comment-form-docked,
    .album-lightbox-comment-compose {
        width: 100%;
        max-width: 100%;
    }

    .album-lightbox-comments-head {
        position: relative;
        z-index: 2;
    }

    .album-lightbox-comments-head-main {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 8px;
    }

    .album-lightbox-comments-list {
        flex: 1 1 auto;
        max-height: none;
        min-height: 0;
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        padding-bottom: 8px;
    }

    .album-lightbox-comment-form-docked {
        position: static;
        flex: 0 0 auto;
        z-index: 2;
        padding-top: 8px;
        background: inherit;
        margin-top: auto;
    }

    .album-lightbox-comment-form textarea {
        min-height: 84px;
        max-height: 22vh;
    }

    .album-lightbox-nav {
        position: fixed;
        top: clamp(126px, 26vh, 280px);
        z-index: 10001;
        transform: translateY(-50%);
    }

    .album-lightbox-nav.is-prev {
        left: max(10px, env(safe-area-inset-left));
    }

    .album-lightbox-nav.is-next {
        right: max(10px, env(safe-area-inset-right));
    }

}

@media (max-width: 720px) and (orientation: portrait) {
    .album-lightbox-stage {
        max-height: min(42vh, 360px);
    }

    .album-lightbox-image {
        max-height: min(36vh, 300px);
    }

    .album-lightbox-nav {
        top: clamp(110px, 23vh, 220px);
    }
}

body.theme-blueanime .album-card-cover-fallback,
body.theme-blueanime .album-locked-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 241, 252, 0.94));
    border-color: rgba(103, 146, 201, 0.16);
}

body.theme-blueanime .album-card-body p,
body.theme-blueanime .album-card-stats,
body.theme-blueanime .album-lightbox-caption {
    color: #49637f;
}

body.theme-blueanime {
    --bg: #1a212b;
    --bg-soft: #242d39;
    --panel: linear-gradient(180deg, rgba(35, 44, 56, 0.96), rgba(25, 32, 42, 0.96));
    --panel-strong: #2a3442;
    --panel-border: rgba(102, 168, 255, 0.18);
    --text: #e7edf7;
    --muted: #8fa2ba;
    --accent: #6cb6ff;
    --accent-strong: #3f8fe6;
    --shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

body.theme-blueanime {
    background:
        radial-gradient(circle at top left, rgba(67, 143, 230, 0.22), transparent 26%),
        radial-gradient(circle at top right, rgba(129, 194, 255, 0.10), transparent 22%),
        linear-gradient(180deg, #1a212b 0%, #111720 100%);
    color: var(--text);
}

body.theme-blueanime .app-shell {
    background:
        radial-gradient(circle at top left, rgba(79, 150, 233, 0.12), transparent 20%),
        linear-gradient(180deg, rgba(108, 182, 255, 0.04), transparent 220px);
}

body.theme-blueanime .profile-panel,
body.theme-blueanime .profile-card-block,
body.theme-blueanime .left-sidebar,
body.theme-blueanime .right-sidebar,
body.theme-blueanime .bottom-mobile-nav,
body.theme-blueanime .message-card,
body.theme-blueanime .chat-message,
body.theme-blueanime .news-card,
body.theme-blueanime .thread-post,
body.theme-blueanime .roleplay-card,
body.theme-blueanime .settings-nav-link,
body.theme-blueanime .empty-state,
body.theme-blueanime .sidebar-section,
body.theme-blueanime .right-sidebar .character-card-sidebar,
body.theme-blueanime .messages-sidebar,
body.theme-blueanime .messages-thread,
body.theme-blueanime .messages-page-telegram .messages-sidebar,
body.theme-blueanime .messages-page-telegram .messages-thread,
body.theme-blueanime .messages-telegram-thread-shell,
body.theme-blueanime .album-locked-panel,
body.theme-blueanime .album-card-cover-fallback {
    background:
        linear-gradient(180deg, rgba(36, 45, 57, 0.96), rgba(24, 31, 40, 0.96));
    border-color: rgba(102, 168, 255, 0.16);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.26);
}

body.theme-blueanime .topbar {
    background: rgba(20, 27, 36, 0.9);
    border-bottom: 1px solid rgba(102, 168, 255, 0.14);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

body.theme-blueanime .brand-mark,
body.theme-blueanime .menu-toggle,
body.theme-blueanime .sidebar-link-card,
body.theme-blueanime .sidebar-inline-link,
body.theme-blueanime .messages-thread-head-telegram,
body.theme-blueanime .messages-thread-head,
body.theme-blueanime .messages-sidebar-head,
body.theme-blueanime .messages-conversation-card-telegram,
body.theme-blueanime .messages-conversation-card,
body.theme-blueanime .message-bubble-card,
body.theme-blueanime .home-highlight,
body.theme-blueanime .roleplay-legacy-item,
body.theme-blueanime .profile-info-item,
body.theme-blueanime .comment-card,
body.theme-blueanime .thread-post-rank-card,
body.theme-blueanime .thread-post-meta-pill,
body.theme-blueanime .thread-post-meta-strip span,
body.theme-blueanime .thread-post-stat,
body.theme-blueanime .album-card {
    background:
        linear-gradient(180deg, rgba(43, 54, 68, 0.96), rgba(29, 37, 48, 0.96));
    border-color: rgba(102, 168, 255, 0.14);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

body.theme-blueanime .button-secondary,
body.theme-blueanime .news-links a,
body.theme-blueanime .settings-nav-link,
body.theme-blueanime .chat-page-link,
body.theme-blueanime .online-panel-link,
body.theme-blueanime .section-return-link {
    background: linear-gradient(135deg, rgba(49, 62, 78, 0.98), rgba(34, 43, 54, 0.98));
    color: #dbe9fb;
    border-color: rgba(102, 168, 255, 0.18);
}

body.theme-blueanime .button,
body.theme-blueanime button[type="submit"],
body.theme-blueanime input[type="submit"],
body.theme-blueanime .news-like-button {
    background: linear-gradient(135deg, #3d84d9, #65b7ff);
    color: #f7fbff;
    border-color: rgba(118, 191, 255, 0.28);
    box-shadow: 0 12px 28px rgba(41, 118, 196, 0.28);
}

body.theme-blueanime .news-like-button.is-liked {
    background: linear-gradient(135deg, rgba(64, 87, 113, 0.96), rgba(45, 60, 78, 0.96));
    color: #b9d9ff;
    border-color: rgba(102, 168, 255, 0.16);
}

body.theme-blueanime input,
body.theme-blueanime textarea,
body.theme-blueanime select {
    background: rgba(19, 26, 34, 0.88);
    color: #eef4ff;
    border-color: rgba(102, 168, 255, 0.16);
}

body.theme-blueanime a,
body.theme-blueanime .sidebar-link-copy strong,
body.theme-blueanime .sidebar-inline-link,
body.theme-blueanime .right-sidebar .character-summary-name,
body.theme-blueanime .right-sidebar .character-summary-meta a,
body.theme-blueanime .news-card h3 a,
body.theme-blueanime .thread-post-title,
body.theme-blueanime .brand-text strong {
    color: #82c3ff;
}

body.theme-blueanime .brand-text small,
body.theme-blueanime .sidebar-link-copy small,
body.theme-blueanime .profile-meta p,
body.theme-blueanime .sidebar-footer p,
body.theme-blueanime .right-sidebar .character-summary-meta,
body.theme-blueanime .roleplay-legacy-copy,
body.theme-blueanime .news-excerpt,
body.theme-blueanime .news-meta,
body.theme-blueanime .thread-post-meta-line,
body.theme-blueanime .thread-post-time,
body.theme-blueanime .thread-post-symbols,
body.theme-blueanime .messages-thread-user p,
body.theme-blueanime .album-card-body p,
body.theme-blueanime .album-card-stats,
body.theme-blueanime .album-lightbox-caption,
body.theme-blueanime .message-bubble-meta,
body.theme-blueanime .messages-history-status,
body.theme-blueanime .messages-pagination-copy small {
    color: #95a8c0;
}

body.theme-blueanime .news-card-glow,
body.theme-blueanime .thread-post::before,
body.theme-blueanime .right-sidebar .character-card-sidebar::before,
body.theme-blueanime .right-sidebar .sidebar-section::before {
    background: radial-gradient(circle, rgba(89, 167, 255, 0.18), transparent 65%);
}

body.theme-blueanime .news-badge,
body.theme-blueanime .chat-kicker,
body.theme-blueanime .thread-reply-quote-label,
body.theme-blueanime .profile-badge,
body.theme-blueanime .ticket-status,
body.theme-blueanime .section-kicker {
    background: rgba(108, 182, 255, 0.12);
    border-color: rgba(108, 182, 255, 0.16);
    color: #9ed1ff;
}

body.theme-blueanime .bottom-mobile-nav {
    background: rgba(18, 25, 34, 0.92);
    border-top: 1px solid rgba(102, 168, 255, 0.14);
    box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.24);
}

body.theme-blueanime .mobile-menu-item.is-active,
body.theme-blueanime .mobile-nav-link.is-active,
body.theme-blueanime .messages-conversation-card-telegram.is-active,
body.theme-blueanime .messages-conversation-card.is-active,
body.theme-blueanime .sidebar-link-card.is-active {
    background: linear-gradient(135deg, rgba(61, 132, 217, 0.22), rgba(38, 51, 66, 0.92));
    border-color: rgba(108, 182, 255, 0.22);
    box-shadow: 0 12px 24px rgba(22, 67, 114, 0.22);
}

body.theme-blueanime .online-toggle,
body.theme-blueanime .online-panel {
    background: rgba(28, 36, 47, 0.96);
    border-color: rgba(102, 168, 255, 0.16);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

body.theme-blueanime .online-user-card {
    background: rgba(39, 49, 62, 0.94);
    border-color: rgba(102, 168, 255, 0.12);
}

body.theme-blueanime table {
    background: rgba(31, 40, 52, 0.96);
}

@media (max-width: 768px) {
    body.theme-blueanime .left-sidebar,
    body.theme-blueanime .right-sidebar {
        background: rgba(23, 30, 39, 0.96);
        border-color: rgba(102, 168, 255, 0.16);
        box-shadow: 0 24px 44px rgba(0, 0, 0, 0.28);
    }

    body.theme-blueanime .topbar {
        background: rgba(16, 22, 30, 0.94);
    }
}

/* Final BlueAnime override: dark navy + blue + gray only */
body.theme-blueanime {
    --bg: #0d1520;
    --bg-soft: #162231;
    --panel: linear-gradient(180deg, rgba(22, 33, 48, 0.98), rgba(14, 22, 33, 0.98));
    --panel-strong: #1d2b3d;
    --panel-border: rgba(97, 172, 255, 0.16);
    --text: #dce8f7;
    --muted: #8399b4;
    --accent: #4aa3ff;
    --accent-strong: #79c1ff;
    --accent-soft: rgba(74, 163, 255, 0.16);
    --blue-soft: rgba(74, 163, 255, 0.12);
    --shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
    background:
        radial-gradient(circle at top left, rgba(51, 129, 214, 0.16), transparent 24%),
        radial-gradient(circle at top right, rgba(77, 177, 255, 0.08), transparent 20%),
        linear-gradient(180deg, #0d1520 0%, #0a111a 100%);
    color: var(--text);
}

body.theme-blueanime .app-shell {
    background:
        radial-gradient(circle at top left, rgba(54, 133, 219, 0.10), transparent 18%),
        linear-gradient(180deg, rgba(76, 163, 255, 0.03), transparent 220px);
}

body.theme-blueanime .roleplay-village-subsection-card {
    background:
        radial-gradient(circle at 12% 0%, rgba(74, 163, 255, 0.20), transparent 34%),
        linear-gradient(145deg, rgba(29, 43, 61, 0.98), rgba(14, 22, 33, 0.98));
    border-color: rgba(97, 172, 255, 0.20);
    box-shadow: var(--shadow);
}

body.theme-blueanime .topbar,
body.theme-blueanime .left-sidebar,
body.theme-blueanime .right-sidebar,
body.theme-blueanime .bottom-mobile-nav,
body.theme-blueanime .profile-panel,
body.theme-blueanime .profile-card-block,
body.theme-blueanime .message-card,
body.theme-blueanime .chat-message,
body.theme-blueanime .news-card,
body.theme-blueanime .thread-post,
body.theme-blueanime .thread-post-card,
body.theme-blueanime .thread-post-character-card,
body.theme-blueanime .thread-post-user-card,
body.theme-blueanime .roleplay-card,
body.theme-blueanime .settings-nav-link,
body.theme-blueanime .empty-state,
body.theme-blueanime .sidebar-section,
body.theme-blueanime .right-sidebar .character-card-sidebar,
body.theme-blueanime .right-sidebar .sidebar-section,
body.theme-blueanime .messages-sidebar,
body.theme-blueanime .messages-thread,
body.theme-blueanime .messages-page-telegram .messages-sidebar,
body.theme-blueanime .messages-page-telegram .messages-thread,
body.theme-blueanime .messages-telegram-thread-shell,
body.theme-blueanime .album-locked-panel,
body.theme-blueanime .album-card-cover-fallback,
body.theme-blueanime .album-card,
body.theme-blueanime .comments-card,
body.theme-blueanime .news-article-card,
body.theme-blueanime .roleplay-map-shell,
body.theme-blueanime .roleplay-feature-card,
body.theme-blueanime .roleplay-legacy-village,
body.theme-blueanime .profile-legacy-head-rich,
body.theme-blueanime .character-game-hero,
body.theme-blueanime .home-hero,
body.theme-blueanime .roleplay-legacy-intro,
body.theme-blueanime .roleplay-legacy-summary {
    background: linear-gradient(180deg, rgba(22, 33, 48, 0.98), rgba(14, 22, 33, 0.98)) !important;
    border-color: rgba(97, 172, 255, 0.14) !important;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28) !important;
}

body.theme-blueanime .topbar {
    background: rgba(11, 18, 28, 0.94) !important;
    border-bottom: 1px solid rgba(97, 172, 255, 0.12) !important;
}

body.theme-blueanime .brand-mark,
body.theme-blueanime .menu-toggle,
body.theme-blueanime .sidebar-link-card,
body.theme-blueanime .sidebar-inline-link,
body.theme-blueanime .messages-thread-head-telegram,
body.theme-blueanime .messages-thread-head,
body.theme-blueanime .messages-sidebar-head,
body.theme-blueanime .messages-conversation-card-telegram,
body.theme-blueanime .messages-conversation-card,
body.theme-blueanime .message-bubble-card,
body.theme-blueanime .home-highlight,
body.theme-blueanime .roleplay-legacy-item,
body.theme-blueanime .profile-info-item,
body.theme-blueanime .comment-card,
body.theme-blueanime .thread-post-rank-card,
body.theme-blueanime .thread-post-meta-pill,
body.theme-blueanime .thread-post-meta-strip span,
body.theme-blueanime .thread-post-stat,
body.theme-blueanime .online-user-card,
body.theme-blueanime .album-lightbox-comments,
body.theme-blueanime .album-lightbox-comment-card {
    background: linear-gradient(180deg, rgba(28, 42, 60, 0.98), rgba(18, 28, 40, 0.98)) !important;
    border-color: rgba(97, 172, 255, 0.14) !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.20) !important;
}

body.theme-blueanime .button-secondary,
body.theme-blueanime .news-links a,
body.theme-blueanime .settings-nav-link,
body.theme-blueanime .chat-page-link,
body.theme-blueanime .online-panel-link,
body.theme-blueanime .section-return-link {
    background: linear-gradient(135deg, rgba(33, 49, 69, 0.98), rgba(22, 33, 48, 0.98)) !important;
    color: #d9e9fb !important;
    border-color: rgba(97, 172, 255, 0.16) !important;
}

body.theme-blueanime .button,
body.theme-blueanime button[type="submit"],
body.theme-blueanime input[type="submit"],
body.theme-blueanime .news-like-button {
    background: linear-gradient(135deg, #2f78ca, #55adff) !important;
    color: #f3f9ff !important;
    border-color: rgba(111, 191, 255, 0.28) !important;
    box-shadow: 0 12px 26px rgba(29, 103, 177, 0.30) !important;
}

body.theme-blueanime .news-like-button.is-liked {
    background: linear-gradient(135deg, rgba(46, 61, 81, 0.98), rgba(29, 40, 55, 0.98)) !important;
    color: #acd8ff !important;
    border-color: rgba(97, 172, 255, 0.14) !important;
}

body.theme-blueanime input,
body.theme-blueanime textarea,
body.theme-blueanime select {
    background: rgba(10, 17, 26, 0.92) !important;
    color: #edf5ff !important;
    border-color: rgba(97, 172, 255, 0.14) !important;
}

body.theme-blueanime a,
body.theme-blueanime .sidebar-link-copy strong,
body.theme-blueanime .sidebar-inline-link,
body.theme-blueanime .right-sidebar .character-summary-name,
body.theme-blueanime .right-sidebar .character-summary-meta a,
body.theme-blueanime .news-card h3 a,
body.theme-blueanime .thread-post-title,
body.theme-blueanime .brand-text strong {
    color: #7ec4ff !important;
}

body.theme-blueanime .brand-text small,
body.theme-blueanime .sidebar-link-copy small,
body.theme-blueanime .profile-meta p,
body.theme-blueanime .sidebar-footer p,
body.theme-blueanime .right-sidebar .character-summary-meta,
body.theme-blueanime .roleplay-legacy-copy,
body.theme-blueanime .news-excerpt,
body.theme-blueanime .news-meta,
body.theme-blueanime .thread-post-meta-line,
body.theme-blueanime .thread-post-time,
body.theme-blueanime .thread-post-symbols,
body.theme-blueanime .messages-thread-user p,
body.theme-blueanime .album-card-body p,
body.theme-blueanime .album-card-stats,
body.theme-blueanime .album-lightbox-caption,
body.theme-blueanime .message-bubble-meta,
body.theme-blueanime .messages-history-status,
body.theme-blueanime .messages-pagination-copy small {
    color: #869cb7 !important;
}

body.theme-blueanime .news-card-glow,
body.theme-blueanime .thread-post::before,
body.theme-blueanime .right-sidebar .character-card-sidebar::before,
body.theme-blueanime .right-sidebar .sidebar-section::before {
    background: radial-gradient(circle, rgba(74, 163, 255, 0.18), transparent 65%) !important;
}

body.theme-blueanime .news-badge,
body.theme-blueanime .chat-kicker,
body.theme-blueanime .thread-reply-quote-label,
body.theme-blueanime .profile-badge,
body.theme-blueanime .ticket-status,
body.theme-blueanime .section-kicker {
    background: rgba(74, 163, 255, 0.12) !important;
    border-color: rgba(74, 163, 255, 0.16) !important;
    color: #a7d7ff !important;
}

body.theme-blueanime .thread-post-stat-bar {
    background: rgba(94, 122, 153, 0.14) !important;
}

body.theme-blueanime .thread-post-stat-bar-life > span {
    background: linear-gradient(90deg, #627ba0, #3f97f4) !important;
}

body.theme-blueanime .thread-post-stat-bar-chakra > span {
    background: linear-gradient(90deg, #3c8ecf, #79c1ff) !important;
}

body.theme-blueanime .bottom-mobile-nav,
body.theme-blueanime .online-toggle,
body.theme-blueanime .online-panel {
    background: rgba(14, 21, 31, 0.94) !important;
    border-color: rgba(97, 172, 255, 0.14) !important;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28) !important;
}

body.theme-blueanime .mobile-menu-item.is-active,
body.theme-blueanime .mobile-nav-link.is-active,
body.theme-blueanime .messages-conversation-card-telegram.is-active,
body.theme-blueanime .messages-conversation-card.is-active,
body.theme-blueanime .sidebar-link-card.is-active {
    background: linear-gradient(135deg, rgba(43, 116, 196, 0.24), rgba(24, 35, 49, 0.98)) !important;
    border-color: rgba(97, 172, 255, 0.20) !important;
    box-shadow: 0 12px 24px rgba(18, 69, 122, 0.26) !important;
}

body.theme-blueanime .mobile-menu-icon,
body.theme-blueanime .sidebar-link-icon {
    color: #78c0ff !important;
}

body.theme-blueanime table {
    background: rgba(21, 32, 46, 0.96) !important;
}

@media (max-width: 768px) {
    body.theme-blueanime .left-sidebar,
    body.theme-blueanime .right-sidebar {
        background: rgba(12, 19, 28, 0.97) !important;
        border-color: rgba(97, 172, 255, 0.14) !important;
        box-shadow: 0 24px 44px rgba(0, 0, 0, 0.34) !important;
    }

    body.theme-blueanime .topbar {
        background: rgba(8, 14, 22, 0.96) !important;
    }
}

body.theme-blueanime .sidebar-link-card,
body.theme-blueanime .mobile-menu-item,
body.theme-blueanime .character-sidebar-spoiler-summary,
body.theme-blueanime .character-sidebar-panel,
body.theme-blueanime .character-sidebar-rank-card,
body.theme-blueanime .character-sidebar-meta-pill,
body.theme-blueanime .character-sidebar-stat,
body.theme-blueanime .character-summary-actions .sidebar-inline-link,
body.theme-blueanime .right-sidebar .sidebar-inline-link {
    background: linear-gradient(180deg, rgba(17, 28, 50, 0.96), rgba(10, 18, 34, 0.98)) !important;
    border-color: rgba(84, 136, 255, 0.26) !important;
    color: #dce9ff !important;
    box-shadow: 0 16px 36px rgba(2, 8, 20, 0.36) !important;
}

body.theme-blueanime .sidebar-link-card:hover,
body.theme-blueanime .sidebar-link-card.is-active,
body.theme-blueanime .mobile-menu-item:hover,
body.theme-blueanime .mobile-menu-item.is-active,
body.theme-blueanime .character-summary-actions .sidebar-inline-link:hover,
body.theme-blueanime .character-summary-actions .sidebar-inline-link.is-active,
body.theme-blueanime .right-sidebar .sidebar-inline-link:hover,
body.theme-blueanime .right-sidebar .sidebar-inline-link.is-active,
body.theme-blueanime .character-sidebar-spoiler[open] .character-sidebar-spoiler-summary {
    background: linear-gradient(180deg, rgba(28, 49, 88, 0.98), rgba(14, 28, 54, 0.98)) !important;
    border-color: rgba(116, 172, 255, 0.38) !important;
    color: #f3f8ff !important;
    box-shadow: 0 20px 38px rgba(6, 16, 34, 0.42) !important;
}

body.theme-blueanime .sidebar-link-copy strong,
body.theme-blueanime .mobile-menu-label,
body.theme-blueanime .character-sidebar-spoiler-title,
body.theme-blueanime .character-sidebar-stat strong,
body.theme-blueanime .character-sidebar-rank-card,
body.theme-blueanime .right-sidebar .sidebar-inline-link {
    color: #eef5ff !important;
}

body.theme-blueanime .sidebar-link-copy small,
body.theme-blueanime .character-sidebar-meta-pill,
body.theme-blueanime .character-sidebar-stat span {
    color: rgba(201, 221, 255, 0.72) !important;
}

body.theme-blueanime .sidebar-link-icon,
body.theme-blueanime .mobile-menu-icon,
body.theme-blueanime .character-sidebar-spoiler-arrow,
body.theme-blueanime .character-sidebar-rank-icon {
    color: #7fc0ff !important;
    filter: drop-shadow(0 0 8px rgba(95, 178, 255, 0.32));
}

body.theme-blueanime .character-sidebar-avatar-shell {
    background: linear-gradient(180deg, rgba(14, 29, 57, 0.98), rgba(7, 16, 34, 0.98)) !important;
    border-color: rgba(98, 156, 255, 0.3) !important;
    box-shadow: 0 18px 40px rgba(3, 10, 24, 0.42) !important;
}

body.theme-blueanime .roleplay-menu-list-item,
body.theme-blueanime .roleplay-village-menu-card,
body.theme-blueanime .roleplay-active-thread-item {
    background: linear-gradient(180deg, rgba(17, 28, 50, 0.96), rgba(10, 18, 34, 0.98)) !important;
    border-color: rgba(84, 136, 255, 0.26) !important;
    box-shadow: 0 16px 36px rgba(2, 8, 20, 0.36) !important;
}

body.theme-blueanime .roleplay-menu-list-item::before,
body.theme-blueanime .roleplay-village-menu-card::before {
    background: radial-gradient(circle at 16% 20%, rgba(74, 163, 255, 0.16), transparent 36%) !important;
}

body.theme-blueanime .roleplay-menu-list-item:hover,
body.theme-blueanime .roleplay-active-thread-item:hover {
    background: linear-gradient(180deg, rgba(28, 49, 88, 0.98), rgba(14, 28, 54, 0.98)) !important;
    border-color: rgba(116, 172, 255, 0.38) !important;
}

body.theme-blueanime .roleplay-menu-art::after {
    border-color: rgba(116, 172, 255, 0.32) !important;
}

body.theme-blueanime .roleplay-menu-art span,
body.theme-blueanime .roleplay-menu-art::before,
body.theme-blueanime .roleplay-menu-arrow,
body.theme-blueanime .roleplay-menu-copy strong,
body.theme-blueanime .roleplay-active-thread-copy strong {
    color: #eef5ff !important;
}

body.theme-blueanime .roleplay-menu-badges span,
body.theme-blueanime .roleplay-active-thread-meta {
    background: rgba(74, 163, 255, 0.12) !important;
    border-color: rgba(74, 163, 255, 0.16) !important;
    color: #a7d7ff !important;
}

body.theme-blueanime .bb-tool,
body.theme-blueanime .bb-help-link {
    border-color: rgba(97, 172, 255, 0.22) !important;
    background: linear-gradient(135deg, rgba(26, 48, 78, 0.96), rgba(18, 34, 56, 0.98)) !important;
    background-image: linear-gradient(135deg, rgba(26, 48, 78, 0.96), rgba(18, 34, 56, 0.98)) !important;
    color: #e8f3ff !important;
    box-shadow: 0 10px 22px rgba(6, 18, 34, 0.28) !important;
}

body.theme-blueanime .bb-tool:hover,
body.theme-blueanime .bb-help-link:hover {
    border-color: rgba(116, 172, 255, 0.38) !important;
    background: linear-gradient(135deg, rgba(38, 68, 108, 0.98), rgba(21, 41, 66, 0.98)) !important;
    background-image: linear-gradient(135deg, rgba(38, 68, 108, 0.98), rgba(21, 41, 66, 0.98)) !important;
    box-shadow: 0 12px 24px rgba(9, 28, 52, 0.32) !important;
}

body.theme-blueanime .bb-link {
    color: #82c3ff !important;
    border-bottom-color: rgba(97, 172, 255, 0.34) !important;
}

body.theme-blueanime .bb-frame,
body.theme-blueanime .bb-spoiler,
body.theme-blueanime .bb-input {
    border-color: rgba(97, 172, 255, 0.20) !important;
}

body.theme-blueanime .bb-razdiv {
    background: linear-gradient(135deg, rgba(74, 163, 255, 0.18), rgba(74, 163, 255, 0.06)) !important;
}

body.theme-blueanime .flash-banner {
    border-color: rgba(97, 172, 255, 0.18) !important;
    background: linear-gradient(180deg, rgba(22, 33, 48, 0.96), rgba(14, 22, 33, 0.96)) !important;
    color: #dce8f7 !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26) !important;
}

body.theme-blueanime .flash-success {
    border-color: rgba(74, 163, 255, 0.22) !important;
    background: linear-gradient(135deg, rgba(24, 58, 96, 0.96), rgba(18, 38, 62, 0.98)) !important;
    color: #e8f3ff !important;
}

body.theme-blueanime .flash-error {
    border-color: rgba(255, 126, 126, 0.22) !important;
    background: linear-gradient(135deg, rgba(84, 28, 38, 0.96), rgba(54, 18, 26, 0.98)) !important;
    color: #ffe1e1 !important;
}

.roleplay-inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: inherit;
}

.roleplay-inline-actions a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
}

.roleplay-inline-actions a:hover {
    opacity: 0.85;
}

body.theme-blueanime .profile-card,
body.theme-blueanime .profile-card-block,
body.theme-blueanime .character-card,
body.theme-blueanime .profile-panel,
body.theme-blueanime .roleplay-story-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px !important;
    background:
        radial-gradient(circle at top right, rgba(74, 163, 255, 0.08), transparent 38%),
        linear-gradient(180deg, rgba(16, 24, 40, 0.98), rgba(8, 14, 26, 0.99)) !important;
    border-color: rgba(84, 136, 255, 0.16) !important;
    color: #dce9ff !important;
    box-shadow: 0 14px 30px rgba(2, 8, 20, 0.3) !important;
}

body.theme-blueanime .profile-card-featured,
body.theme-blueanime .character-card-featured {
    position: relative;
    overflow: hidden;
    border-radius: 22px !important;
    background:
        radial-gradient(circle at top right, rgba(92, 182, 255, 0.16), transparent 36%),
        linear-gradient(145deg, rgba(20, 34, 58, 0.98), rgba(10, 18, 34, 0.99)) !important;
    border-color: rgba(104, 162, 255, 0.22) !important;
    box-shadow: 0 18px 36px rgba(3, 10, 24, 0.34) !important;
}

body.theme-blueanime .character-card-sidebar {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(80, 171, 255, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(16, 24, 40, 0.98), rgba(8, 14, 26, 0.99)) !important;
    border: 1px solid rgba(84, 136, 255, 0.16) !important;
    box-shadow: 0 16px 34px rgba(2, 8, 20, 0.32) !important;
}

body.theme-blueanime .character-card-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(80, 171, 255, 0.08), transparent 34%, rgba(255, 255, 255, 0.02)) !important;
}

body.theme-blueanime .character-card-sidebar > * {
    position: relative;
    z-index: 1;
}

body.theme-blueanime .profile-card-block::before,
body.theme-blueanime .character-card::before,
body.theme-blueanime .character-card-featured::before,
body.theme-blueanime .profile-panel::before,
body.theme-blueanime .roleplay-story-card::before {
    background: radial-gradient(circle at 16% 18%, rgba(74, 163, 255, 0.16), transparent 38%) !important;
}

body.theme-blueanime .profile-card-featured::after,
body.theme-blueanime .character-card-featured::after {
    background: radial-gradient(circle, rgba(92, 182, 255, 0.14), transparent 68%) !important;
}

body.theme-blueanime .profile-card:hover,
body.theme-blueanime .profile-card-featured:hover,
body.theme-blueanime .profile-card-block:hover,
body.theme-blueanime .character-card:hover,
body.theme-blueanime .character-card-featured:hover,
body.theme-blueanime .roleplay-story-card:hover {
    background:
        radial-gradient(circle at top right, rgba(96, 184, 255, 0.14), transparent 36%),
        linear-gradient(180deg, rgba(22, 36, 60, 0.98), rgba(10, 18, 34, 0.99)) !important;
    border-color: rgba(116, 172, 255, 0.26) !important;
    box-shadow: 0 18px 36px rgba(5, 16, 34, 0.36) !important;
}

body.theme-blueanime .profile-card a,
body.theme-blueanime .profile-card-featured a,
body.theme-blueanime .profile-card-block a,
body.theme-blueanime .character-card a,
body.theme-blueanime .character-card-featured a,
body.theme-blueanime .character-card-sidebar a,
body.theme-blueanime .profile-panel a,
body.theme-blueanime .roleplay-story-card a {
    color: #b7dcff !important;
}

body.theme-blueanime .profile-card strong,
body.theme-blueanime .profile-card-featured strong,
body.theme-blueanime .profile-card-block strong,
body.theme-blueanime .character-card strong,
body.theme-blueanime .character-card-featured strong,
body.theme-blueanime .character-card-sidebar strong,
body.theme-blueanime .profile-panel strong,
body.theme-blueanime .roleplay-story-card strong,
body.theme-blueanime .bb-spoiler summary {
    color: #eef5ff !important;
}

body.theme-blueanime .profile-card p,
body.theme-blueanime .profile-card-featured p,
body.theme-blueanime .profile-card-block p,
body.theme-blueanime .character-card p,
body.theme-blueanime .character-card-featured p,
body.theme-blueanime .character-card-sidebar p,
body.theme-blueanime .profile-panel p,
body.theme-blueanime .roleplay-story-card p {
    color: rgba(210, 225, 255, 0.82) !important;
}

body.theme-blueanime .profile-panel .character-artifact-board-stat strong,
body.theme-blueanime .profile-card-block .character-artifact-board-stat strong,
body.theme-blueanime .character-artifact-board .character-artifact-board-stat strong {
    color: #160c08 !important;
}

body.theme-blueanime .bb-spoiler {
    background: linear-gradient(180deg, rgba(18, 30, 54, 0.96), rgba(10, 18, 34, 0.98)) !important;
    border-color: rgba(84, 136, 255, 0.26) !important;
    color: rgba(210, 225, 255, 0.82) !important;
}

body.theme-blueanime .bb-spoiler summary:hover {
    color: #ffffff !important;
}


.examiner-page {
    display: grid;
    gap: 18px;
}

.examiner-hero .section-head,
.examiner-main-panel .section-head,
.examiner-side-panel .section-head {
    margin-bottom: 14px;
}

.examiner-copy {
    margin: 0;
    opacity: 0.82;
}

.examiner-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.examiner-request-form,
.examiner-current-status {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.examiner-form-label {
    font-weight: 600;
}

.examiner-request-list,
.examiner-list {
    display: grid;
    gap: 14px;
}

.examiner-request-card,
.examiner-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(17, 20, 27, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.examiner-request-card.is-matched {
    border-color: rgba(101, 183, 255, 0.35);
    box-shadow: 0 0 0 1px rgba(101, 183, 255, 0.12) inset;
}

.examiner-request-head,
.examiner-card-main,
.examiner-request-actions,
.examiner-call-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.examiner-request-date,
.examiner-card small,
.examiner-card span,
.examiner-request-own-mark {
    opacity: 0.72;
}

.examiner-fighters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.examiner-fighter {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.examiner-fighter > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.examiner-fighter strong,
.examiner-fighter span,
.examiner-card strong,
.examiner-card span,
.examiner-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.examiner-fighter-divider {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.55;
}

.examiner-fighter-avatar,
.examiner-card-avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.examiner-fighter-placeholder {
    opacity: 0.68;
    font-size: 0.94rem;
}

.examiner-request-note {
    margin: 0;
    white-space: pre-line;
}

.examiner-card-main {
    align-items: flex-start;
}

.examiner-card-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.examiner-card-copy strong,
.examiner-card-copy span {
    display: block;
}

.examiner-call-form .button-secondary {
    width: 100%;
}

.examiner-status-badge.is-open,
.character-fight-status-badge.is-open {
    background: rgba(97, 196, 255, 0.18);
    color: #bde8ff;
}

.examiner-status-badge.is-matched,
.character-fight-status-badge.is-matched {
    background: rgba(132, 231, 189, 0.18);
    color: #b9f5d8;
}

@media (max-width: 960px) {
    .examiner-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .examiner-fighters {
        grid-template-columns: 1fr;
    }

    .examiner-fighter-divider {
        justify-self: center;
    }

    .examiner-request-head,
    .examiner-card-main,
    .examiner-request-actions,
    .examiner-call-form {
        flex-wrap: wrap;
        align-items: stretch;
    }
}


.roleplay-daily-task-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid rgba(97, 196, 255, 0.22);
    box-shadow: 0 0 0 1px rgba(97, 196, 255, 0.08) inset;
}

.roleplay-daily-task-banner-copy {
    display: grid;
    gap: 6px;
}

.roleplay-daily-task-banner-copy h2,
.roleplay-daily-task-banner-copy p {
    margin: 0;
}

@media (max-width: 720px) {
    .roleplay-daily-task-banner {
        flex-direction: column;
        align-items: stretch;
    }
}

.thread-battle-challenge-panel {
    display: grid;
    gap: 14px;
}

.thread-battle-challenge-panel p {
    margin: 0;
}

.thread-battle-challenge-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.thread-battle-challenge-actions form {
    margin: 0;
}

.thread-battle-status-card {
    display: grid;
    gap: 10px;
}

.thread-battle-status-spoiler > summary {
    cursor: pointer;
    font-weight: 800;
}

.thread-battle-status-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.thread-battle-status-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
}

.thread-battle-status-item.is-accepted {
    border-color: rgba(113, 181, 255, 0.32);
    background: linear-gradient(135deg, rgba(71, 133, 255, 0.14), rgba(255, 255, 255, 0.045));
}

.thread-battle-status-item strong,
.thread-battle-status-item small {
    display: block;
}

.thread-battle-status-item small {
    margin-top: 3px;
    opacity: 0.78;
}

.thread-battle-status-link {
    white-space: nowrap;
}

.thread-battle-inline-status {
    align-self: center;
}

@media (max-width: 720px) {
    .thread-battle-challenge-actions {
        flex-direction: column;
    }

    .thread-battle-challenge-actions form,
    .thread-battle-challenge-actions button {
        width: 100%;
    }

    .thread-battle-status-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .thread-battle-status-link {
        width: 100%;
        text-align: center;
    }
}

body.theme-blueanime .notifications-page .notification-card,
body.theme-blueanime .notifications-page .notifications-filters {
    background:
        radial-gradient(circle at top right, rgba(89, 149, 255, 0.18), transparent 44%),
        linear-gradient(180deg, rgba(16, 27, 50, 0.96), rgba(10, 18, 35, 0.98));
    border: 1px solid rgba(97, 156, 255, 0.24);
    box-shadow: 0 18px 42px rgba(2, 8, 22, 0.44);
}

body.theme-blueanime .notifications-page .notifications-type-head {
    background:
        radial-gradient(circle at top right, rgba(89, 149, 255, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(15, 29, 54, 0.96), rgba(9, 18, 35, 0.98));
    border-color: rgba(97, 156, 255, 0.24);
    box-shadow: 0 12px 28px rgba(2, 8, 22, 0.28);
}

body.theme-blueanime .notifications-page .notification-card::before,
body.theme-blueanime .notifications-page .notifications-filters::before {
    background:
        linear-gradient(180deg, rgba(126, 178, 255, 0.2), rgba(126, 178, 255, 0)),
        linear-gradient(90deg, rgba(95, 143, 241, 0.26), rgba(95, 143, 241, 0));
}

body.theme-blueanime .notifications-page .notification-card-fresh {
    border-color: rgba(113, 181, 255, 0.42);
    box-shadow: 0 0 0 1px rgba(113, 181, 255, 0.16), 0 22px 46px rgba(3, 9, 24, 0.5);
}

body.theme-blueanime .notifications-page .news-badge,
body.theme-blueanime .notifications-page .profile-badge,
body.theme-blueanime .notifications-page .profile-badge-role {
    background: linear-gradient(180deg, rgba(63, 107, 194, 0.9), rgba(40, 72, 141, 0.96));
    border-color: rgba(136, 188, 255, 0.28);
    color: #eef6ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-blueanime .checkbox-field:has(input[type="checkbox"]:checked) > span,
body.theme-blueanime .settings-checkbox:has(input[type="checkbox"]:checked) > span,
body.theme-blueanime .checkbox-group label:has(input[type="checkbox"]:checked),
body.theme-blueanime .battle-character-option:has(input:checked),
body.theme-blueanime .profile-badge:has(input[type="checkbox"]:checked),
body.theme-blueanime .character-element-option:has(input[type="checkbox"]:checked) {
    border-color: rgba(157, 219, 255, 0.88);
    background: linear-gradient(135deg, rgba(63, 139, 255, 0.34), rgba(116, 205, 255, 0.12));
    color: #f2fbff;
    box-shadow: 0 0 0 1px rgba(112, 190, 255, 0.28) inset, 0 12px 28px rgba(52, 149, 255, 0.15);
}

body.theme-blueanime .checkbox-field:has(input[type="checkbox"]:checked) > span::before,
body.theme-blueanime .settings-checkbox:has(input[type="checkbox"]:checked) > span::before,
body.theme-blueanime .checkbox-group label:has(input[type="checkbox"]:checked)::before,
body.theme-blueanime .battle-character-option:has(input:checked)::after {
    border-color: rgba(157, 219, 255, 0.92);
    background: linear-gradient(135deg, #a8e6ff, #5bbdff);
    color: #06111f;
    box-shadow: 0 0 0 3px rgba(91, 189, 255, 0.22), 0 0 18px rgba(91, 189, 255, 0.42);
}

body.theme-blueanime input[type="checkbox"] {
    border-color: rgba(157, 219, 255, 0.28);
    background:
        radial-gradient(circle at 30% 20%, rgba(157, 219, 255, 0.16), transparent 34%),
        rgba(10, 27, 46, 0.72);
    box-shadow: inset 0 0 0 3px rgba(5, 13, 25, 0.88);
}

body.theme-blueanime input[type="checkbox"]:checked {
    border-color: rgba(157, 219, 255, 0.88);
    background: linear-gradient(135deg, rgba(63, 139, 255, 0.34), rgba(116, 205, 255, 0.12));
    box-shadow: 0 0 0 3px rgba(91, 189, 255, 0.18), inset 0 0 0 3px rgba(5, 13, 25, 0.62);
}

body.theme-blueanime input[type="checkbox"]::before,
body.theme-blueanime .auth-check input:checked + .auth-check-box::after {
    background: linear-gradient(135deg, #a8e6ff, #5bbdff);
    color: #06111f;
}

body.theme-blueanime input[type="checkbox"]:focus-visible {
    outline-color: rgba(157, 219, 255, 0.72);
}

body.theme-blueanime .auth-check-box {
    border-color: rgba(157, 219, 255, 0.28);
    background:
        radial-gradient(circle at 30% 20%, rgba(157, 219, 255, 0.16), transparent 34%),
        rgba(10, 27, 46, 0.72);
    box-shadow: inset 0 0 0 3px rgba(5, 13, 25, 0.88);
}

body.theme-blueanime .auth-check input:checked + .auth-check-box {
    border-color: rgba(157, 219, 255, 0.88);
    background: linear-gradient(135deg, rgba(63, 139, 255, 0.34), rgba(116, 205, 255, 0.12));
    box-shadow: 0 0 0 3px rgba(91, 189, 255, 0.18), inset 0 0 0 3px rgba(5, 13, 25, 0.62);
}

body.theme-blueanime .profile-badge:has(input[type="checkbox"]:checked)::after,
body.theme-blueanime .character-element-option:has(input[type="checkbox"]:checked)::after {
    background: linear-gradient(135deg, #a8e6ff, #5bbdff);
    color: #06111f;
    box-shadow: 0 0 18px rgba(91, 189, 255, 0.42);
}

body.theme-blueanime .notifications-page .notification-card .news-excerpt,
body.theme-blueanime .notifications-page .notification-card .news-meta,
body.theme-blueanime .notifications-page .notifications-filter-head,
body.theme-blueanime .notifications-page .notifications-filter-head h3 {
    color: #b7c9e8;
}

body.theme-blueanime .notifications-page .notifications-head-filter,
body.theme-blueanime .notifications-page .notifications-filter-chip {
    background: linear-gradient(180deg, rgba(24, 39, 71, 0.94), rgba(14, 24, 44, 0.98));
    border: 1px solid rgba(97, 156, 255, 0.24);
    color: #d9e9ff;
    box-shadow: 0 10px 26px rgba(3, 9, 22, 0.34);
}

body.theme-blueanime .notifications-page .notifications-head-filter:hover,
body.theme-blueanime .notifications-page .notifications-filter-chip:hover {
    background: linear-gradient(180deg, rgba(33, 53, 93, 0.96), rgba(20, 33, 60, 0.98));
    border-color: rgba(124, 184, 255, 0.34);
}

body.theme-blueanime .notifications-page .notifications-head-filter.is-active,
body.theme-blueanime .notifications-page .notifications-filter-chip.is-active {
    background: linear-gradient(180deg, rgba(72, 119, 208, 0.95), rgba(48, 82, 160, 0.98));
    border-color: rgba(160, 208, 255, 0.42);
    color: #f7fbff;
}

body.theme-blueanime .notifications-page .notifications-filter-chip span {
    background: rgba(173, 214, 255, 0.16);
    color: #e9f5ff;
}

body.theme-blueanime .notifications-page .notification-mark-read-form .button-secondary,
body.theme-blueanime .notifications-page .notification-card .button-secondary {
    background: linear-gradient(180deg, rgba(25, 42, 77, 0.95), rgba(15, 27, 49, 0.98));
    border-color: rgba(103, 164, 255, 0.3);
    color: #e3f0ff;
}

body.theme-blueanime .notifications-page .notification-mark-read-form .button-secondary:hover,
body.theme-blueanime .notifications-page .notification-card .button-secondary:hover {
    background: linear-gradient(180deg, rgba(37, 59, 102, 0.96), rgba(22, 38, 69, 0.98));
    border-color: rgba(140, 197, 255, 0.38);
}

body.theme-blueanime .notifications-page .notification-card .button-danger {
    background: linear-gradient(180deg, rgba(130, 45, 70, 0.94), rgba(97, 28, 50, 0.98));
    border-color: rgba(241, 143, 171, 0.28);
    color: #fff3f7;
}

.notifications-page .notifications-list,
.notifications-page .notifications-list.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.notifications-page .notifications-type-section {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.notifications-page .notifications-type-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 188, 105, 0.16);
    border-radius: 14px;
    background: rgba(255, 247, 230, 0.72);
}

.notifications-page .notifications-type-head h2 {
    margin: 2px 0 0;
    font-size: 1rem;
    line-height: 1.2;
}

.notifications-page .notifications-type-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-width: 0;
}

.notifications-page .section-head {
    gap: 10px;
    margin-bottom: 10px;
}

.notifications-page .section-head h1 {
    margin: 4px 0 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.notifications-page .section-head > .profile-badges {
    gap: 6px;
}

.notifications-page .notifications-head-filter {
    min-height: 28px;
    padding: 5px 9px;
    gap: 5px;
    font-size: 0.8rem;
}

.notifications-page .notifications-filters {
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
}

.notifications-page .notifications-filter-group {
    gap: 6px;
}

.notifications-page .notifications-filter-head {
    gap: 2px;
}

.notifications-page .notifications-filter-head h3 {
    font-size: 0.95rem;
    line-height: 1.2;
}

.notifications-page .notifications-filter-row {
    gap: 6px;
}

.notifications-page .notifications-filter-chip {
    min-height: 28px;
    padding: 5px 9px;
    gap: 5px;
    font-size: 0.8rem;
}

.notifications-page .notifications-filter-chip span {
    min-width: 19px;
    height: 19px;
    padding: 0 6px;
    font-size: 0.68rem;
}

.notifications-page .notification-card {
    gap: 7px;
    min-height: 0;
    padding: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    align-content: start;
}

.notifications-page .notification-card-fresh {
    box-shadow: 0 0 0 1px rgba(255, 188, 105, 0.16), 0 10px 24px rgba(0, 0, 0, 0.18);
}

.notifications-page .notification-card .news-card-glow {
    position: absolute;
    top: -38px;
    right: -32px;
    z-index: 0;
    width: 110px;
    height: 110px;
    margin: 0;
    opacity: 0.55;
    pointer-events: none;
}

.thread-moderation-card .thread-moderation-actions {
    width: min(100%, 420px);
}

.thread-moderation-card .thread-moderation-actions > button {
    min-width: 160px;
}

@media (max-width: 768px) {
    .thread-moderation-card .thread-moderation-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .thread-moderation-card .thread-moderation-actions > button {
        width: 100%;
        min-width: 0;
    }
}

.notifications-page .notification-card .news-card-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
    min-height: 0;
    min-width: 0;
}

.notifications-page .notification-card .news-card-head > .profile-badges {
    max-width: 100%;
    min-width: 0;
}

.notifications-page .notification-card .news-card-head > div:not(.profile-badges) {
    min-width: 0;
    width: 100%;
}

.notifications-page .notification-card .news-links:empty,
.notifications-page .notification-card .news-actions:empty {
    display: none;
}

.notifications-page .notification-card .profile-badges {
    gap: 5px;
}

.notifications-page .notification-card .news-badge,
.notifications-page .notification-card .profile-badge {
    min-height: 22px;
    padding: 3px 8px;
    gap: 5px;
    font-size: 0.72rem;
    line-height: 1.1;
}

.notifications-page .notification-card h3 {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.22;
}

.notifications-page .notification-card .news-excerpt {
    display: -webkit-box;
    margin: 3px 0 0;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.34;
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.notifications-page .notification-card .news-meta {
    gap: 5px 10px;
    margin-top: 0;
    font-size: 0.78rem;
    line-height: 1.25;
}

.notifications-page .notification-card .news-actions {
    gap: 6px;
    margin-top: 0;
    min-width: 0;
}

.notifications-page .notification-card .news-links {
    gap: 6px;
    min-width: 0;
}

.notifications-page .notification-card .button-secondary,
.notifications-page .notification-card .button-danger,
.notifications-page .notification-mark-read-form .button-secondary {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 0.8rem;
    line-height: 1.1;
}

.notifications-page .notification-action-form {
    gap: 6px;
}

.notifications-page .notification-application-copy {
    gap: 6px;
    padding: 8px 10px;
    border-radius: 12px;
}

body.theme-blueanime .notifications-page .notification-card-fresh {
    box-shadow: 0 0 0 1px rgba(113, 181, 255, 0.16), 0 10px 24px rgba(3, 9, 24, 0.34);
}

@media (max-width: 768px) {
    .notifications-page .notifications-list,
    .notifications-page .notifications-list.news-grid {
        gap: 7px;
    }

    .notifications-page .notification-card {
        gap: 6px;
        padding: 9px 10px;
        border-radius: 13px;
    }

    .notifications-page .notification-card .news-card-head {
        display: grid;
        gap: 4px;
    }

    .notifications-page .notification-card h3 {
        font-size: 0.9rem;
    }

    .notifications-page .notification-card .news-excerpt {
        font-size: 0.84rem;
        line-height: 1.3;
    }

    .notifications-page .notification-card .news-actions {
        gap: 5px;
    }

    .notifications-page .notification-card .button-secondary,
    .notifications-page .notification-card .button-danger,
    .notifications-page .notification-mark-read-form .button-secondary {
        min-height: 28px;
        padding: 5px 8px;
        font-size: 0.78rem;
    }
}
.profile-level-reward-next {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    padding: 18px;
    margin-bottom: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(135deg, rgba(255, 196, 76, 0.14), rgba(255, 159, 67, 0.08)),
        rgba(255, 255, 255, 0.04);
}

.profile-level-reward-next-badge {
    display: grid;
    gap: 8px;
    align-content: center;
    padding: 16px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-level-reward-next-badge span,
.profile-level-reward-date {
    color: var(--muted);
    font-size: 0.84rem;
}

.profile-level-reward-next-badge strong {
    font-size: 1.2rem;
    line-height: 1.25;
}

.profile-level-reward-next-copy,
.profile-level-reward-card {
    display: grid;
    gap: 10px;
}

.profile-level-reward-next-copy h3,
.profile-level-reward-card h3 {
    margin: 0;
    font-size: 1.06rem;
}

.profile-level-reward-next-copy p,
.profile-level-reward-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.58;
}

.profile-level-reward-next-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.profile-level-reward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.profile-level-reward-card {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.profile-level-reward-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.profile-level-reward-level,
.profile-level-reward-coins {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
}

.profile-level-reward-level {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.profile-level-reward-coins {
    background: rgba(255, 196, 76, 0.14);
    color: #ffd67b;
}

.profile-level-reward-card.accent-starter,
.profile-level-reward-next.accent-starter {
    border-color: rgba(137, 201, 255, 0.18);
}

.profile-level-reward-card.accent-active,
.profile-level-reward-next.accent-active {
    border-color: rgba(120, 224, 186, 0.2);
}

.profile-level-reward-card.accent-star,
.profile-level-reward-next.accent-star {
    border-color: rgba(255, 214, 122, 0.2);
}

.profile-level-reward-card.accent-veteran,
.profile-level-reward-next.accent-veteran {
    border-color: rgba(220, 168, 255, 0.22);
}

.profile-level-reward-card.accent-legend,
.profile-level-reward-next.accent-legend {
    border-color: rgba(255, 124, 124, 0.24);
}

body.theme-blueanime .profile-level-reward-next {
    background:
        linear-gradient(135deg, rgba(48, 120, 198, 0.18), rgba(14, 36, 72, 0.16)),
        rgba(11, 18, 31, 0.92);
    border-color: rgba(96, 162, 255, 0.2);
}

body.theme-blueanime .profile-level-reward-card {
    background: rgba(10, 17, 31, 0.92);
    border-color: rgba(93, 155, 255, 0.18);
}

body.theme-blueanime .profile-level-reward-next-badge,
body.theme-blueanime .profile-level-reward-level {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(96, 162, 255, 0.14);
}

body.theme-blueanime .profile-level-reward-coins {
    background: rgba(74, 163, 255, 0.16);
    color: #b8ddff;
}

@media (max-width: 768px) {
    .profile-level-reward-next {
        grid-template-columns: 1fr;
    }
}

.thread-topic-panel .thread-topic-meta {
    display: grid;
    grid-template-columns: 72px repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    align-items: stretch;
}

.thread-topic-panel .thread-topic-meta::before {
    content: "F";
    display: grid;
    place-items: center;
    min-height: 72px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 159, 67, 0.18), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 159, 67, 0.22);
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.thread-topic-panel.is-mission .thread-topic-meta::before {
    content: "M";
}

.thread-topic-panel.is-training .thread-topic-meta::before {
    content: "T";
}

.thread-topic-panel .thread-topic-meta .profile-info-item {
    min-height: 72px;
    padding: 12px 14px;
    justify-content: center;
}

.thread-topic-panel .thread-topic-meta .profile-info-item span {
    font-size: 0.76rem;
}

.thread-topic-panel .thread-topic-meta .profile-info-item strong {
    font-size: 0.92rem;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .thread-topic-panel .thread-topic-meta {
        grid-template-columns: 56px repeat(2, minmax(0, 1fr));
    }

    .thread-topic-panel .thread-topic-meta::before,
    .thread-topic-panel .thread-topic-meta .profile-info-item {
        min-height: 56px;
    }

    .thread-topic-panel .thread-topic-meta .profile-info-item {
        padding: 10px 12px;
    }
}

body.theme-blueanime .thread-topic-panel .thread-topic-meta::before {
    background: linear-gradient(180deg, rgba(60, 117, 184, 0.34), rgba(23, 42, 70, 0.9)) !important;
    border-color: rgba(115, 184, 255, 0.26) !important;
    color: #dff1ff !important;
}

.thread-post-card {
    grid-template-columns: 180px minmax(0, 1fr);
}

.thread-post-aside {
    padding: 12px;
    gap: 8px;
}

.thread-post-aside .thread-post-character-card,
.thread-post-user-card {
    padding: 8px;
}

.thread-post-character-avatar {
    width: 84px;
    height: 84px;
}

.thread-post-character img {
    width: 74px;
    height: 74px;
}

.thread-post-character > span:last-child {
    font-size: 0.92rem;
}

.thread-post-character-meta {
    gap: 6px;
}

.thread-post-rank-card-large .character-rank-icon-small {
    height: 42px;
}

.thread-post-rank-card-large span,
.thread-post-meta-pill,
.thread-post-stat-head span,
.thread-post-stat-head strong,
.thread-post-meta-strip span {
    font-size: 0.74rem;
}

.thread-post-stat {
    padding: 7px 8px;
}

@media (max-width: 768px) {
    .thread-post-card {
        display: grid;
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "aside"
            "body";
        align-items: start;
    }

    .thread-post-aside {
        grid-area: aside;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 138, 28, 0.10);
        background: linear-gradient(180deg, rgba(255, 138, 28, 0.08), rgba(255, 255, 255, 0.02));
    }

    .thread-post-body {
        grid-area: body;
        padding: 16px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
            rgba(0, 0, 0, 0.08);
    }

    .thread-post-aside .thread-post-character-card {
        display: grid;
        grid-template-columns: 1fr;
    }

    .thread-post-body > .thread-post-character-card {
        display: none !important;
    }

    .thread-post-body-inner {
        position: relative;
        padding: 16px 16px 18px;
        border-radius: 18px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
            rgba(0, 0, 0, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.07);
        box-shadow:
            0 10px 22px rgba(0, 0, 0, 0.14),
            inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .thread-post-body-inner::before {
        content: "\0421\043e\043e\0431\0449\0435\043d\0438\0435";
        display: inline-flex;
        align-items: center;
        min-height: 24px;
        margin-bottom: 12px;
        padding: 4px 10px;
        border-radius: 999px;
        background: rgba(255, 138, 28, 0.12);
        border: 1px solid rgba(255, 138, 28, 0.16);
        color: var(--accent-strong);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .thread-post-content {
        font-size: 0.97rem;
        line-height: 1.78;
    }

    .thread-post-actions {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
}

.bb-toolbar-spoiler {
    margin: 8px 0;
    border: 1px solid rgba(255, 138, 0, 0.16);
    border-radius: 12px;
    background: rgba(255, 138, 0, 0.04);
    overflow: hidden;
}

.bb-toolbar-spoiler > summary {
    cursor: pointer;
    list-style: none;
    padding: 10px 12px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}

.bb-toolbar-spoiler > summary::-webkit-details-marker {
    display: none;
}

.bb-toolbar-spoiler[open] > summary {
    border-bottom: 1px solid rgba(255, 138, 0, 0.12);
}

.bb-toolbar-spoiler .bb-toolbar {
    margin: 0;
    padding: 10px 12px;
}

.bb-toolbar-spoiler + textarea {
    width: 100%;
    min-height: 140px;
}

.profile-field .bb-toolbar-spoiler + textarea,
label .bb-toolbar-spoiler + textarea {
    min-height: 150px;
}

.thread-compose-form .bb-toolbar-spoiler + textarea,
.battle-reply-form .bb-toolbar-spoiler + textarea,
.ticket-thread .bb-toolbar-spoiler + textarea,
.ticket-thread-card .bb-toolbar-spoiler + textarea {
    min-height: 180px;
}

.chat-page-compact .bb-toolbar-spoiler + textarea,
.chat-form-monolith .bb-toolbar-spoiler + textarea {
    min-height: 220px !important;
    height: 220px !important;
    max-height: none !important;
}

.messages-form .bb-toolbar-spoiler + textarea,
.messages-form-telegram .bb-toolbar-spoiler + textarea,
.messages-page .bb-toolbar-spoiler + textarea,
.messages-page-telegram .bb-toolbar-spoiler + textarea {
    min-height: 88px;
}

body.theme-blueanime .bb-toolbar-spoiler {
    background: linear-gradient(180deg, rgba(20, 35, 57, 0.96), rgba(14, 26, 43, 0.98)) !important;
    border-color: rgba(97, 172, 255, 0.18) !important;
}

body.theme-blueanime .bb-toolbar-spoiler > summary {
    color: #e8f3ff !important;
}

body.theme-blueanime .bb-toolbar-spoiler[open] > summary {
    border-bottom-color: rgba(97, 172, 255, 0.14) !important;
}

.thread-post-character-spoiler {
    width: 100%;
    margin: 0;
}

.thread-post-character-spoiler > summary {
    padding: 8px 10px;
    font-size: 0.78rem;
    text-align: center;
}

.thread-post-character-spoiler .thread-post-character-meta {
    padding-top: 8px;
}

.chat-page-compact .chat-form-monolith .bb-toolbar-spoiler + textarea,
.chat-page-compact .chat-form-monolith textarea#chat-input,
.chat-page-compact #chat-input {
    min-height: 180px !important;
    height: 180px !important;
    max-height: none !important;
    resize: vertical !important;
}

.banana-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 160;
}

.banana-overlay-item {
    --banana-drift: 0px;
    --banana-sway: 0px;
    --banana-rotate-start: 0deg;
    --banana-rotate-end: 180deg;
    position: absolute;
    top: -12vh;
    will-change: transform;
    animation-name: banana-fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.banana-overlay-item img {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18));
}

@keyframes banana-fall {
    0% {
        transform: translate3d(0, -14vh, 0) rotate(var(--banana-rotate-start));
    }
    25% {
        transform: translate3d(calc(var(--banana-sway) * -1), 24vh, 0) rotate(calc(var(--banana-rotate-start) + 55deg));
    }
    50% {
        transform: translate3d(var(--banana-drift), 52vh, 0) rotate(calc(var(--banana-rotate-start) + 110deg));
    }
    75% {
        transform: translate3d(calc(var(--banana-drift) + var(--banana-sway)), 78vh, 0) rotate(calc(var(--banana-rotate-start) + 165deg));
    }
    100% {
        transform: translate3d(calc(var(--banana-drift) * 1.2), 118vh, 0) rotate(var(--banana-rotate-end));
    }
}

@media (max-width: 768px) {
    .banana-overlay {
        z-index: 120;
    }

    .banana-overlay-item img {
        filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.14));
    }
}

.chat-page.chat-page-compact form.chat-form.chat-form-monolith textarea#chat-input,
.chat-page.chat-page-compact .chat-form-monolith #chat-input,
.chat-page.chat-page-compact textarea#chat-input {
    min-height: 220px !important;
    height: 220px !important;
    max-height: none !important;
    padding: 12px 14px !important;
    line-height: 1.45;
}

.chat-page.chat-page-compact details.bb-toolbar-spoiler + textarea#chat-input,
.chat-page.chat-page-compact .chat-form-monolith details.bb-toolbar-spoiler + textarea#chat-input,
.chat-page.chat-page-compact details.bb-toolbar-spoiler + #chat-input {
    min-height: 220px !important;
    height: 220px !important;
    max-height: none !important;
    flex: 0 0 auto !important;
}

.diary-page {
    display: grid;
    gap: 22px;
}

.diary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.diary-card,
.home-diary-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 220px;
    padding: 20px;
    border: 1px solid rgba(255, 138, 28, 0.18);
    border-radius: 24px;
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 157, 58, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(24, 20, 18, 0.96), rgba(35, 29, 24, 0.92));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.diary-card::before,
.home-diary-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, #f3ad5f, #4f86ff);
    opacity: 0.9;
}

body:not(.theme-blueanime) .diary-card,
body:not(.theme-blueanime) .home-diary-card {
    border-color: rgba(255, 138, 28, 0.24);
    background:
        radial-gradient(circle at 14% 10%, rgba(255, 159, 67, 0.22), transparent 34%),
        radial-gradient(circle at 86% 18%, rgba(255, 94, 20, 0.1), transparent 30%),
        linear-gradient(145deg, rgba(30, 22, 17, 0.98), rgba(17, 15, 14, 0.96));
    color: var(--text);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 188, 105, 0.08);
}

body:not(.theme-blueanime) .diary-card::before,
body:not(.theme-blueanime) .home-diary-card::before {
    background: linear-gradient(180deg, #ffb15f, #ff7a1a 54%, #5b3122);
}

.diary-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.88rem;
}

.diary-card h3,
.home-diary-card h3 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.25;
}

.diary-card h3 a,
.home-diary-card h3 a {
    color: inherit;
    text-decoration: none;
}

.diary-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.diary-card .news-actions,
.home-diary-card .news-actions {
    margin-top: auto;
}

.home-diary-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 300px);
    gap: 16px;
    overflow-x: auto;
    padding: 4px 4px 14px;
    scroll-snap-type: x proximity;
}

.home-diary-card {
    min-height: 185px;
    scroll-snap-align: start;
}

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

.diary-form textarea {
    width: 100%;
    min-height: 320px;
    resize: vertical;
}

.diary-privacy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.diary-privacy-option {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 138, 28, 0.16);
    border-radius: 18px;
    background: rgba(28, 24, 21, 0.78);
    cursor: pointer;
}

.diary-privacy-option input {
    width: auto;
    justify-self: start;
}

.diary-privacy-option:has(input:checked) {
    border-color: rgba(255, 138, 28, 0.42);
    background: linear-gradient(135deg, rgba(255, 138, 28, 0.2), rgba(36, 28, 23, 0.9));
    box-shadow: 0 0 0 1px rgba(255, 138, 28, 0.12) inset;
}

.diary-privacy-option span {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.35;
}

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

.diary-poll-editor {
    display: grid;
    gap: 14px;
}

.diary-poll-editor[hidden] {
    display: none;
}

.diary-poll-options {
    display: grid;
    gap: 10px;
}

.diary-poll-option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.diary-poll-option-row > span {
    grid-column: 1 / -1;
}

.diary-poll-remove {
    min-height: 44px;
}

.diary-article-card {
    overflow: hidden;
}

.diary-article-head {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.diary-article-body {
    font-size: 1.02rem;
    line-height: 1.72;
}

.diary-poll-card {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(255, 138, 28, 0.16);
    border-radius: 20px;
    background: rgba(28, 24, 21, 0.78);
}

.diary-poll-form,
.diary-poll-results {
    display: grid;
    gap: 10px;
}

.diary-poll-choice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid rgba(255, 138, 28, 0.14);
    border-radius: 16px;
    background: rgba(20, 18, 16, 0.72);
    cursor: pointer;
}

.diary-poll-choice input {
    width: auto;
    margin-top: 4px;
    accent-color: var(--accent);
}

.diary-poll-choice.is-selected {
    border-color: rgba(255, 138, 28, 0.46);
    background: linear-gradient(135deg, rgba(255, 138, 28, 0.2), rgba(36, 28, 23, 0.9));
}

.diary-poll-choice-main {
    display: grid;
    gap: 6px;
    width: 100%;
}

.diary-poll-choice-main small {
    color: var(--muted);
}

.diary-poll-bar {
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: rgba(43, 54, 80, 0.12);
}

.diary-poll-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.diary-lock-state {
    margin: 0;
}

.diary-unlock-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
}

.diary-unlock-form input {
    max-width: 280px;
}

body.theme-blueanime .diary-card,
body.theme-blueanime .home-diary-card,
body.theme-blueanime .diary-privacy-option,
body.theme-blueanime .diary-poll-card,
body.theme-blueanime .diary-poll-choice {
    border-color: rgba(95, 187, 255, 0.22);
    background:
        radial-gradient(circle at 12% 12%, rgba(65, 172, 255, 0.2), transparent 34%),
        linear-gradient(145deg, rgba(18, 28, 42, 0.96), rgba(27, 39, 56, 0.92));
    box-shadow: 0 20px 55px rgba(0, 10, 22, 0.34);
}

body.theme-blueanime .diary-poll-choice.is-selected {
    border-color: rgba(112, 190, 255, 0.52);
    background: linear-gradient(135deg, rgba(63, 139, 255, 0.24), rgba(116, 205, 255, 0.075));
}

body.theme-blueanime .diary-privacy-option:has(input:checked) {
    border-color: rgba(112, 190, 255, 0.52);
    background: linear-gradient(135deg, rgba(63, 139, 255, 0.24), rgba(116, 205, 255, 0.075));
}

body.theme-blueanime .diary-poll-bar {
    background: rgba(116, 205, 255, 0.12);
}

body.theme-blueanime .diary-poll-bar span {
    background: linear-gradient(90deg, #4aa3ff, #78ddff);
}

body.theme-blueanime .diary-card::before,
body.theme-blueanime .home-diary-card::before {
    background: linear-gradient(180deg, #63c7ff, #6d7f96);
}

.diary-share-panel {
    margin-top: 16px;
    border: 1px solid rgba(255, 138, 28, 0.16);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 138, 28, 0.16), transparent 34%),
        linear-gradient(145deg, rgba(28, 24, 21, 0.88), rgba(18, 17, 16, 0.94));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.diary-share-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 800;
    list-style: none;
}

.diary-share-panel summary::-webkit-details-marker {
    display: none;
}

.diary-share-panel summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 138, 28, 0.12);
    color: var(--accent-strong);
    box-shadow: inset 0 0 0 1px rgba(255, 138, 28, 0.2);
}

.diary-share-panel[open] summary::after {
    content: "-";
}

.diary-share-summary-text,
.diary-share-summary-text strong,
.diary-share-panel summary small {
    display: block;
}

.diary-share-panel summary small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.diary-share-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 16px 16px;
}

.diary-share-card {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 16px;
    border: 1px solid rgba(255, 138, 28, 0.14);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 179, 71, 0.1), transparent 34%),
        rgba(20, 18, 16, 0.76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.diary-share-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.diary-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 138, 28, 0.24), rgba(255, 179, 71, 0.12));
    color: var(--accent-strong);
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(255, 138, 28, 0.18);
}

.diary-share-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.diary-share-search,
.diary-share-recipient {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.diary-share-search input {
    flex: 1 1 180px;
}

.diary-share-autocomplete {
    position: relative;
}

.diary-share-input {
    width: 100%;
}

.diary-share-suggest {
    position: absolute;
    z-index: 60;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: grid;
    gap: 6px;
    max-height: 280px;
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(255, 138, 28, 0.22);
    border-radius: 16px;
    background: rgba(16, 15, 14, 0.98);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
}

.diary-share-suggest-item,
.diary-share-selected {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.diary-share-suggest-item {
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.diary-share-suggest-item:hover {
    background: rgba(255, 138, 28, 0.14);
}

.diary-share-suggest-item img,
.diary-share-selected img {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    object-fit: cover;
}

.diary-share-suggest-item span,
.diary-share-selected span {
    display: grid;
    min-width: 0;
}

.diary-share-suggest-item strong,
.diary-share-suggest-item small,
.diary-share-selected strong,
.diary-share-selected small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.diary-share-suggest-item small,
.diary-share-selected small,
.diary-share-hint {
    color: var(--muted);
    font-size: 0.82rem;
}

.diary-share-suggest-item i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #31e981;
    box-shadow: 0 0 0 3px rgba(49, 233, 129, 0.14), 0 0 12px rgba(49, 233, 129, 0.55);
}

.diary-share-suggest-empty {
    padding: 10px;
    color: var(--muted);
    text-align: center;
}

.diary-share-selected {
    padding: 10px;
    border: 1px solid rgba(255, 138, 28, 0.2);
    border-radius: 15px;
    background: rgba(255, 138, 28, 0.08);
}

.diary-share-message-form button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    filter: grayscale(0.35);
}

.diary-share-recipients {
    display: grid;
    gap: 8px;
}

.diary-share-recipient {
    justify-content: space-between;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.chat-pinned-message {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid rgba(243, 173, 95, 0.28);
    border-radius: 22px;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 179, 71, 0.18), transparent 38%),
        linear-gradient(145deg, rgba(32, 25, 20, 0.94), rgba(17, 16, 15, 0.95));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.chat-pinned-stack {
    display: block;
}

.chat-pinned-details > summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.chat-pinned-details > summary::-webkit-details-marker {
    display: none;
}

.chat-pinned-summary-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.chat-pinned-summary-copy strong,
.chat-pinned-summary-copy small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-pinned-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    max-height: min(52vh, 520px);
    overflow: auto;
    padding-right: 4px;
}

.chat-pinned-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-pinned-diary-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 320px);
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
}

.profile-pinned-diary-card {
    scroll-snap-align: start;
}

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

.profile-diary-card {
    gap: 6px;
}

.profile-diary-preview {
    margin: 0;
    color: rgba(242, 226, 194, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

.profile-diary-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.profile-diary-meta .button-secondary {
    min-height: 30px;
    padding: 5px 10px;
    white-space: nowrap;
}

.profile-diary-pagination {
    margin-bottom: 0;
}

.bb-help-page {
    display: grid;
    gap: 16px;
}

.bb-help-intro {
    margin: 0;
}

.bb-help-section {
    display: grid;
    gap: 10px;
}

.bb-help-section h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.08rem;
}

.bb-help-list {
    gap: 8px;
}

.bb-help-item {
    grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
    align-items: start;
}

.bb-help-item code {
    white-space: normal;
    word-break: break-word;
}

.bb-help-copy {
    display: grid;
    gap: 6px;
}

.bb-help-copy small {
    color: var(--muted);
    font-weight: 600;
}

.bb-help-copy strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .profile-diary-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .bb-help-item {
        grid-template-columns: 1fr;
    }
}

.chat-pinned-message::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-strong), var(--accent));
    opacity: 0.9;
}

.chat-pinned-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 138, 28, 0.26), rgba(255, 179, 71, 0.1));
    color: var(--accent-strong);
    font-weight: 950;
    font-size: 1.08rem;
    box-shadow: inset 0 0 0 1px rgba(255, 138, 28, 0.22);
}

.chat-pinned-label {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(243, 173, 95, 0.18);
    color: var(--accent-strong);
    font-weight: 800;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.chat-pinned-body {
    display: grid;
    gap: 9px;
    align-content: start;
    min-width: 0;
}

.chat-pinned-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.chat-pinned-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.chat-pinned-head time {
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.chat-pinned-text {
    max-height: 108px;
    overflow: auto;
    padding: 10px 12px;
    border: 1px solid rgba(255, 138, 28, 0.12);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.14);
}

.chat-pinned-text .chat-text {
    margin: 0;
}

.chat-pinned-unpin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    gap: 7px;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 138, 28, 0.2);
    border-radius: 999px;
    background: rgba(255, 138, 28, 0.1);
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.chat-pinned-unpin:hover {
    border-color: rgba(255, 138, 28, 0.38);
    background: rgba(255, 138, 28, 0.16);
    transform: translateY(-1px);
}

body.theme-blueanime .diary-share-panel,
body.theme-blueanime .diary-share-card,
body.theme-blueanime .chat-pinned-message {
    border-color: rgba(95, 187, 255, 0.22);
    background:
        radial-gradient(circle at 12% 12%, rgba(65, 172, 255, 0.16), transparent 34%),
        linear-gradient(145deg, rgba(18, 28, 42, 0.96), rgba(27, 39, 56, 0.92));
}

body.theme-blueanime .diary-share-recipient {
    background: rgba(95, 187, 255, 0.08);
}

body.theme-blueanime .diary-share-panel {
    box-shadow: 0 20px 55px rgba(0, 10, 22, 0.34);
}

body.theme-blueanime .diary-share-panel summary::after,
body.theme-blueanime .diary-share-icon {
    background: rgba(95, 187, 255, 0.12);
    color: #9ed8ff;
    box-shadow: inset 0 0 0 1px rgba(95, 187, 255, 0.22);
}

body.theme-blueanime .diary-share-suggest {
    border-color: rgba(95, 187, 255, 0.22);
    background: rgba(10, 20, 34, 0.98);
    box-shadow: 0 18px 38px rgba(0, 10, 22, 0.48);
}

body.theme-blueanime .diary-share-suggest-item:hover {
    background: rgba(95, 187, 255, 0.13);
}

body.theme-blueanime .diary-share-selected {
    border-color: rgba(95, 187, 255, 0.22);
    background: rgba(95, 187, 255, 0.08);
}

body.theme-blueanime .chat-pinned-label {
    background: rgba(95, 187, 255, 0.16);
    color: #87d7ff;
}

body.theme-blueanime .chat-pinned-message::before {
    background: linear-gradient(180deg, #9ed8ff, #4aa3ff);
}

body.theme-blueanime .chat-pinned-mark,
body.theme-blueanime .chat-pinned-unpin {
    border-color: rgba(95, 187, 255, 0.22);
    background: rgba(95, 187, 255, 0.1);
    color: #d7f0ff;
    box-shadow: inset 0 0 0 1px rgba(95, 187, 255, 0.12);
}

body.theme-blueanime .chat-pinned-text {
    border-color: rgba(95, 187, 255, 0.16);
    background: rgba(3, 10, 20, 0.18);
}

@media (max-width: 780px) {
    .diary-grid {
        grid-template-columns: 1fr;
    }

    .diary-privacy-grid {
        grid-template-columns: 1fr;
    }

    .home-diary-strip {
        grid-auto-columns: minmax(230px, 86vw);
    }

    .diary-share-grid,
    .chat-pinned-message {
        grid-template-columns: 1fr;
    }

    .chat-pinned-message {
        padding: 12px 12px 14px 16px;
    }

    .chat-pinned-mark {
        width: 38px;
        min-height: 38px;
    }

    .chat-pinned-head {
        display: grid;
        gap: 6px;
    }

    .chat-pinned-head time {
        white-space: normal;
    }

    .chat-pinned-unpin {
        width: 100%;
    }

    .diary-poll-option-row {
        grid-template-columns: 1fr;
    }

.diary-poll-remove {
        width: 100%;
    }
}

.home-hero-compact {
    min-height: auto;
    padding: 20px 24px;
}

.home-hero-compact p,
.home-hero-compact .home-hero-side {
    display: none;
}

.home-section-tight {
    margin-top: 10px !important;
}

.mobile-download-card .news-counters {
    gap: 8px;
}

.mobile-download-section,
.home-diaries-section,
.home-online-section {
    margin-bottom: 0 !important;
}

.mobile-download-card,
.home-diary-strip,
.home-online-list,
.news-grid,
.chat-pagination-top {
    margin-top: 10px;
}

.news-card-glow {
    min-height: 0;
}
#emoji-button,
#emoji-picker {
    display: none !important;
}

.chat-sticker-wrap {
    display: inline-flex;
    margin: 5px 0;
    vertical-align: middle;
}

.chat-sticker {
    display: block;
    height: auto;
    max-height: 180px;
    max-width: 180px;
    object-fit: contain;
}

.chat-sticker-missing {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

.sticker-settings-page .sticker-settings-hero {
    background:
        radial-gradient(circle at top left, rgba(88, 190, 255, 0.2), transparent 32%),
        linear-gradient(135deg, rgba(8, 24, 39, 0.98), rgba(13, 43, 68, 0.92));
}

.sticker-settings-grid {
    align-items: stretch;
}

.sticker-management-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.sticker-management-card {
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(108, 211, 255, 0.16);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.sticker-management-card img {
    align-self: center;
    height: 112px;
    object-fit: contain;
    width: 112px;
}

.sticker-management-card strong,
.sticker-pack-row strong {
    color: var(--text-color, #f2fbff);
}

.sticker-management-card small,
.sticker-pack-row small {
    color: var(--muted-color, rgba(230, 244, 255, 0.68));
}

.sticker-management-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.sticker-management-actions form,
.sticker-management-card form {
    margin: 0;
}

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

.sticker-pack-row {
    align-items: center;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
}

@media (max-width: 720px) {
    .chat-sticker {
        max-height: 160px;
        max-width: min(160px, 62vw);
    }

    .sticker-pack-row {
        align-items: stretch;
        flex-direction: column;
    }
}

.profile-gift-send-inline {
    margin-top: 12px;
    max-width: 620px;
}

.profile-gift-send-inline > summary {
    list-style: none;
    width: fit-content;
}

.profile-gift-send-inline > summary::-webkit-details-marker {
    display: none;
}

.profile-gift-send-form {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    margin-top: 10px;
    padding: 14px;
}

body.theme-blueanime .profile-gift-send-form {
    background: rgba(8, 20, 36, 0.74);
    border-color: rgba(99, 179, 237, 0.22);
}

/* Compact profile view */
.profile-page-legacy {
    gap: 14px;
}

.profile-page-legacy .profile-card-block,
.profile-page-legacy .profile-panel {
    border-radius: 20px;
}

.profile-page-legacy > .profile-legacy-head {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
}

.profile-page-legacy .profile-legacy-avatar {
    width: 104px;
    height: 104px;
    border-radius: 20px;
}

.profile-page-legacy .profile-legacy-copy {
    gap: 8px;
}

.profile-page-legacy .profile-nick-title {
    gap: 8px;
    margin: 0;
}

.profile-page-legacy .profile-nick-icon {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
}

.profile-page-legacy .profile-nick-icon img {
    width: 22px;
    height: 22px;
}

.profile-page-legacy .profile-legacy-subtitle,
.profile-page-legacy .section-kicker {
    font-size: 0.82rem;
}

.profile-page-legacy .profile-head-gifts {
    margin: 0;
}

.profile-page-legacy .profile-head-gifts-link {
    gap: 6px;
}

.profile-page-legacy .profile-head-gift-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 9px;
}

.profile-page-legacy .profile-head-gift-more {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    font-size: 0.78rem;
}

.profile-page-legacy .profile-badges {
    gap: 6px;
}

.profile-page-legacy .profile-badge {
    padding: 5px 9px;
    font-size: 0.78rem;
}

.profile-page-legacy .profile-toolbar {
    gap: 8px;
    margin-top: 6px;
}

.profile-page-legacy .profile-toolbar > *,
.profile-page-legacy .profile-compact-actions > * {
    min-height: 34px;
    padding: 8px 11px;
    font-size: 0.84rem;
}

.profile-page-legacy .profile-grid-legacy {
    gap: 14px;
}

.profile-page-legacy .profile-card-block {
    padding: 16px;
}

.profile-page-legacy .section-head {
    gap: 10px;
    margin-bottom: 10px;
}

.profile-page-legacy .section-head h2 {
    margin: 2px 0 0;
    font-size: 1.08rem;
}

.profile-page-legacy .profile-info-list {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}

.profile-page-legacy .profile-info-item {
    gap: 3px;
    padding: 9px 11px;
    border-radius: 13px;
}

.profile-page-legacy .profile-info-item strong {
    line-height: 1.25;
}

.profile-page-legacy .profile-preview-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    padding: 11px;
    border-radius: 16px;
}

.profile-page-legacy .profile-preview-card .profile-hero-avatar {
    width: 76px;
    height: 76px;
    border-radius: 16px;
}

.profile-page-legacy .profile-preview-copy {
    gap: 7px;
}

.profile-page-legacy .profile-preview-copy h3 {
    font-size: 1.02rem;
}

.profile-page-legacy .profile-preview-copy p {
    font-size: 0.88rem;
    line-height: 1.45;
}

.profile-page-legacy .profile-compact-spoiler {
    padding: 0;
    overflow: hidden;
}

.profile-compact-summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    list-style: none;
    min-height: 48px;
    padding: 12px 16px;
}

.profile-compact-summary::-webkit-details-marker {
    display: none;
}

.profile-compact-summary span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.profile-compact-summary small {
    color: var(--muted);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-compact-summary strong {
    font-size: 1rem;
}

.profile-compact-summary em {
    align-items: center;
    background: rgba(255, 138, 28, 0.12);
    border: 1px solid rgba(255, 138, 28, 0.18);
    border-radius: 999px;
    display: inline-flex;
    font-style: normal;
    font-weight: 800;
    justify-content: center;
    min-width: 34px;
    padding: 5px 10px;
}

.profile-compact-spoiler[open] .profile-compact-summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-compact-spoiler-body {
    display: grid;
    gap: 12px;
    padding: 12px 16px 16px;
}

.profile-compact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-page-legacy .profile-level-reward-next {
    gap: 12px;
    padding: 12px;
}

.profile-page-legacy .profile-level-reward-grid {
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.profile-page-legacy .profile-level-reward-card {
    gap: 8px;
    padding: 12px;
}

.profile-page-legacy .album-card-grid {
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.profile-page-legacy .album-card-body {
    gap: 8px;
    padding: 12px;
}

.profile-page-legacy .album-card-cover,
.profile-page-legacy .album-card-cover-fallback {
    min-height: 120px;
}

.profile-page-legacy .profile-gift-card-list {
    gap: 10px;
}

.profile-page-legacy .profile-gift-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 15px;
}

.profile-page-legacy .profile-gift-card-cover {
    width: 52px;
    height: 52px;
    border-radius: 14px;
}

.profile-page-legacy .profile-gift-card-copy {
    gap: 5px;
}

.profile-page-legacy .profile-gift-card-comment {
    font-size: 0.88rem;
    line-height: 1.45;
}

body.theme-blueanime .profile-compact-summary em {
    background: rgba(74, 163, 255, 0.14);
    border-color: rgba(99, 179, 237, 0.22);
}

@media (max-width: 760px) {
    .profile-page-legacy > .profile-legacy-head {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .profile-page-legacy .profile-legacy-avatar {
        width: 76px;
        height: 76px;
        border-radius: 50%;
    }

    .profile-page-legacy .profile-grid-legacy {
        grid-template-columns: 1fr;
    }

    .profile-page-legacy .profile-card-block {
        padding: 12px;
    }

    .profile-page-legacy .profile-compact-spoiler {
        padding: 0;
    }

    .profile-compact-summary {
        padding: 11px 12px;
    }

    .profile-compact-spoiler-body {
        padding: 11px 12px 12px;
    }

    .profile-page-legacy .profile-preview-card {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .profile-page-legacy .profile-preview-card .profile-hero-avatar {
        width: 60px;
        height: 60px;
        border-radius: 50%;
    }
}

/* Final compact settings overrides */
.settings-page-clean .settings-clean-card {
    padding: 16px;
}

.settings-page-clean .settings-section-spoiler.profile-panel {
    padding: 0;
}

.settings-page-clean .settings-section-spoiler > .bb-spoiler-summary {
    margin: 0;
    min-height: 48px;
    padding: 13px 16px;
    border-radius: inherit;
}

.settings-page-clean .settings-spoiler-body {
    padding: 14px 16px 16px;
}

.settings-page-clean .profile-field {
    min-height: 0;
}

/* Final artifact overrides: keep mobile from falling back to legacy cards. */
.artifact-page .artifact-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 16px !important;
}

.artifact-page .artifact-card,
.artifact-page .artifact-detail,
.artifact-page .artifact-slot {
    overflow: hidden !important;
    border-radius: 22px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.035) !important;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.16) !important;
}

.artifact-page .artifact-card-media {
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    background: rgba(0, 0, 0, 0.18) !important;
}

.artifact-page .artifact-detail-media {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(0, 0, 0, 0.18) !important;
}

.artifact-page .artifact-card-media img,
.artifact-page .artifact-detail-media img,
.artifact-page .artifact-detail > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    object-position: center !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.artifact-page .artifact-card-body {
    display: grid !important;
    gap: 12px !important;
    padding: 16px !important;
}

.artifact-property-badge-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.artifact-property-badge-list-compact {
    gap: 5px;
}

.artifact-property-badge {
    border-color: rgba(185, 129, 68, 0.55);
    background: rgba(44, 28, 19, 0.72);
    color: #f4dfbd;
}

.artifact-property-target {
    flex-basis: 100%;
    color: rgba(245, 229, 200, 0.72);
    font-size: 0.82rem;
    line-height: 1.35;
}

.artifact-property-group-list {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.artifact-property-group {
    min-width: 0;
}

.artifact-property-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.artifact-property-group > summary small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.14);
    color: #f59e0b;
    font-size: 0.78rem;
    font-weight: 800;
}

.artifact-set-tier-color {
    border-color: rgba(255, 255, 255, 0.16);
}

.artifact-set-tier-common {
    color: #d8d1c2;
}

.artifact-set-tier-uncommon {
    color: #5ee08a;
}

.artifact-set-tier-rare {
    color: #6db8ff;
}

.artifact-set-tier-epic {
    color: #c18cff;
}

.artifact-set-tier-legendary {
    color: #ffcc66;
}

.artifact-set-tier-mythic {
    color: #ff6f6f;
}

.battle-character-artifact-properties em {
    border-color: rgba(185, 129, 68, 0.45);
    background: rgba(44, 28, 19, 0.66);
    color: #f4dfbd;
}

.artifact-inventory-slot-groups {
    display: grid;
    gap: 14px;
}

.artifact-page .artifact-inventory-slot-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 280px)) !important;
    justify-content: start !important;
    align-items: start !important;
}

.artifact-page .artifact-inventory-slot-grid .artifact-card {
    width: 100% !important;
    max-width: 280px !important;
}

.artifact-set-item-picker {
    display: grid;
    gap: 10px;
    padding-top: 10px;
}

.artifact-set-item-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    padding: 12px;
}

.artifact-set-item-picker .profile-field {
    min-height: 0;
}

.artifact-create-spoiler {
    padding: 0;
    overflow: hidden;
}

.artifact-create-spoiler > summary {
    margin: 0;
}

.artifact-create-spoiler-body {
    padding: 12px;
}

.artifact-create-spoiler > .profile-field,
.artifact-create-spoiler > .bb-spoiler {
    margin: 12px;
}

.artifact-set-admin-body {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.specialization-admin-page .specialization-property-picker {
    align-items: stretch;
}

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

.specialization-admin-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 16px;
}

.specialization-admin-card-main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.specialization-admin-card h3 {
    margin: 0;
    font-size: 1.12rem;
}

.specialization-admin-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

@media (max-width: 720px) {
    .specialization-admin-card {
        grid-template-columns: 1fr;
    }

    .specialization-admin-card .comment-form-actions {
        justify-content: stretch;
    }

    .specialization-admin-card .comment-form-actions a {
        flex: 1 1 auto;
    }
}

.specialization-admin-page .artifact-property-group-list {
    width: 100%;
    gap: 12px;
}

.specialization-admin-page .artifact-property-group {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255, 138, 28, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 138, 28, 0.055), rgba(255, 255, 255, 0.02)),
        rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.specialization-admin-page .artifact-property-group > summary {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 0;
    background: rgba(255, 138, 28, 0.055);
}

.specialization-admin-page .artifact-property-group[open] > summary {
    border-bottom: 1px solid rgba(255, 138, 28, 0.12);
}

.specialization-admin-page .artifact-property-group .artifact-set-item-picker-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    padding: 14px;
}

.specialization-admin-page .artifact-property-group .checkbox-field {
    width: 100%;
    min-height: 44px;
    margin: 0;
}

body.theme-blueanime .specialization-admin-page .artifact-property-group {
    border-color: rgba(95, 187, 255, 0.18);
    background:
        linear-gradient(180deg, rgba(95, 187, 255, 0.07), rgba(255, 255, 255, 0.015)),
        rgba(6, 14, 26, 0.2);
}

body.theme-blueanime .specialization-admin-page .artifact-property-group > summary {
    background: rgba(95, 187, 255, 0.06);
}

body.theme-blueanime .specialization-admin-page .artifact-property-group[open] > summary {
    border-bottom-color: rgba(95, 187, 255, 0.14);
}

.artifact-active-set-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.artifact-active-set-list article {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 138, 28, 0.18);
    border-radius: 8px;
    background: rgba(25, 18, 14, 0.54);
}

.artifact-active-set-list strong {
    color: var(--text-primary);
}

.artifact-active-set-list span {
    color: var(--text-muted);
    font-size: 0.92rem;
}

body.theme-blueanime .artifact-page .artifact-card,
body.theme-blueanime .artifact-page .artifact-detail,
body.theme-blueanime .artifact-page .artifact-slot {
    border-color: rgba(95, 187, 255, 0.16) !important;
    background: linear-gradient(145deg, rgba(9, 20, 34, 0.94), rgba(8, 14, 26, 0.9)) !important;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28) !important;
}

body.theme-blueanime .artifact-page .artifact-card-media,
body.theme-blueanime .artifact-page .artifact-detail-media {
    background: rgba(2, 7, 16, 0.72) !important;
}

.artifact-card.artifact-card-no-media {
    min-height: 0 !important;
    max-width: 420px;
    justify-self: start;
}

.artifact-card.artifact-card-no-media .artifact-card-body {
    padding-top: 16px !important;
}

.artifact-page .artifact-card.artifact-card-no-media {
    width: 100%;
    max-width: 420px !important;
}

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

/* Final Telegram-like sticker and emoji picker layout. */
.chat-actions,
.messages-form-actions {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.sticker-emoji-tools {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    order: 0;
    position: relative !important;
}

.chat-actions .chat-submit-state,
.messages-form-actions .chat-submit-state {
    flex: 1 1 auto !important;
    min-width: 120px !important;
}

.sticker-emoji-toggle {
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 171, 77, 0.36) !important;
    background:
        radial-gradient(circle at 28% 20%, rgba(255, 228, 171, 0.34), transparent 28%),
        linear-gradient(135deg, rgba(255, 138, 28, 0.22), rgba(35, 24, 16, 0.94)) !important;
    color: var(--text) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    font-size: 1.18rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 10px 22px rgba(0, 0, 0, 0.18) !important;
}

.sticker-emoji-panel {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: calc(100% + 8px) !important;
    z-index: 120 !important;
    width: min(520px, calc(100vw - 28px)) !important;
    max-width: min(520px, calc(100vw - 28px)) !important;
    margin: 0 !important;
    padding: 10px !important;
    overflow: hidden !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 171, 77, 0.22) !important;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 138, 28, 0.13), transparent 32%),
        linear-gradient(145deg, rgba(25, 20, 17, 0.98), rgba(10, 11, 14, 0.98)) !important;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.42) !important;
}

.sticker-emoji-tools.is-open .sticker-emoji-panel {
    position: absolute !important;
    width: min(520px, calc(100vw - 28px)) !important;
}

.sticker-emoji-tools.is-align-right .sticker-emoji-panel {
    left: auto !important;
    right: 0 !important;
}

.sticker-picker-input-return {
    display: block !important;
    width: 100% !important;
    margin: 0 0 8px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: var(--text) !important;
    cursor: pointer !important;
    font-size: 0.86rem !important;
    font-weight: 800 !important;
    text-align: center !important;
}

.sticker-picker-switch,
.sticker-picker-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin: 0 0 8px !important;
    overflow-x: auto !important;
    padding: 0 0 2px !important;
    scrollbar-width: thin;
}

.sticker-picker-section {
    margin: 0 !important;
    padding: 0 !important;
}

.sticker-picker-switch::-webkit-scrollbar,
.sticker-picker-tabs::-webkit-scrollbar,
.sticker-picker-grid::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.sticker-picker-switch::-webkit-scrollbar-thumb,
.sticker-picker-tabs::-webkit-scrollbar-thumb,
.sticker-picker-grid::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.sticker-picker-switch button,
.sticker-picker-tabs button,
.sticker-picker-switch a {
    flex: 0 0 auto !important;
    padding: 6px 9px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text) !important;
    cursor: pointer !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.sticker-picker-switch button.is-active,
.sticker-picker-tabs button.is-active {
    border-color: rgba(255, 205, 112, 0.52) !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong)) !important;
    color: #211006 !important;
}

.sticker-picker-grid {
    display: grid !important;
    gap: 3px !important;
    max-height: 240px !important;
    overflow: auto !important;
    padding: 2px 4px 2px 0 !important;
    scrollbar-width: thin;
}

.sticker-picker-emoji-grid {
    grid-template-columns: repeat(10, minmax(28px, 1fr)) !important;
}

.sticker-picker-sticker-grid {
    grid-template-columns: repeat(5, minmax(58px, 1fr)) !important;
    gap: 6px !important;
}

.sticker-picker-item {
    align-items: center !important;
    display: inline-flex !important;
    justify-content: center !important;
    min-height: 32px !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: var(--text) !important;
    cursor: pointer !important;
    transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease !important;
}

.sticker-picker-item:hover {
    border-color: rgba(255, 171, 77, 0.28) !important;
    background: rgba(255, 138, 28, 0.14) !important;
    transform: translateY(-1px) !important;
}

.sticker-picker-emoji {
    font-size: 22px !important;
    line-height: 1 !important;
}

.sticker-picker-sticker {
    align-items: center !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    padding: 5px !important;
}

.sticker-picker-sticker img {
    width: 50px !important;
    height: 50px !important;
    object-fit: contain !important;
}

.sticker-picker-sticker span {
    max-width: 58px !important;
    color: var(--muted) !important;
    font-size: 10px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.sticker-picker-empty {
    grid-column: 1 / -1 !important;
    padding: 14px !important;
    color: var(--muted) !important;
    text-align: center !important;
}

body.theme-blueanime .sticker-emoji-toggle {
    border-color: rgba(95, 187, 255, 0.34) !important;
    background:
        radial-gradient(circle at 28% 20%, rgba(157, 224, 255, 0.28), transparent 28%),
        linear-gradient(135deg, rgba(74, 163, 255, 0.22), rgba(8, 19, 34, 0.96)) !important;
    color: #eaf8ff !important;
}

body.theme-blueanime .sticker-emoji-panel {
    border-color: rgba(95, 187, 255, 0.22) !important;
    background:
        radial-gradient(circle at 12% 8%, rgba(74, 163, 255, 0.16), transparent 32%),
        linear-gradient(145deg, rgba(9, 20, 34, 0.98), rgba(5, 10, 20, 0.98)) !important;
}

body.theme-blueanime .sticker-picker-switch button.is-active,
body.theme-blueanime .sticker-picker-tabs button.is-active {
    border-color: rgba(157, 224, 255, 0.58) !important;
    background: linear-gradient(135deg, #5bbdff, #2877d8) !important;
    color: #03101b !important;
}

body.theme-blueanime .sticker-picker-item:hover {
    border-color: rgba(95, 187, 255, 0.32) !important;
    background: rgba(95, 187, 255, 0.14) !important;
}

@media (max-width: 720px) {
    .sticker-emoji-panel,
    .sticker-emoji-tools.is-open .sticker-emoji-panel {
        position: fixed !important;
        left: 8px !important;
        right: 8px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 76px) !important;
        top: auto !important;
        width: auto !important;
        max-width: none !important;
        max-height: 52vh !important;
        transform: none !important;
    }

    .sticker-picker-grid {
        max-height: calc(52vh - 104px) !important;
    }

    .sticker-picker-emoji-grid {
        grid-template-columns: repeat(8, minmax(30px, 1fr)) !important;
    }

    .sticker-picker-sticker-grid {
        grid-template-columns: repeat(4, minmax(54px, 1fr)) !important;
    }
}
.technique-mark-picker .checkbox-tile,
.technique-mark-tile {
  align-items: center;
  gap: 8px;
}

.technique-filter-form .profile-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.technique-filter-form details.profile-field {
  padding: 14px;
  border: 1px solid rgba(255, 179, 71, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 138, 28, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.035);
}

.technique-filter-form details.profile-field > summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0;
}

.technique-filter-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.technique-filter-checkbox-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 12px 10px 44px;
  border: 1px solid rgba(255, 179, 71, 0.16);
  border-radius: 12px;
  background: rgba(9, 16, 28, 0.42);
  color: var(--text);
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.technique-filter-checkbox-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 179, 71, 0.44);
  background: rgba(255, 138, 28, 0.08);
}

.technique-filter-checkbox-tile::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 179, 71, 0.45);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  transform: translateY(-50%);
}

.technique-filter-checkbox-tile::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 50%;
  width: 5px;
  height: 10px;
  border-right: 2px solid #14110c;
  border-bottom: 2px solid #14110c;
  opacity: 0;
  transform: translateY(-60%) rotate(45deg) scale(0.7);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.technique-filter-checkbox-tile input[type="checkbox"] {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: 0;
  opacity: 0;
  transform: translateY(-50%);
  cursor: pointer;
}

.technique-filter-checkbox-tile img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex: 0 0 26px;
  border-radius: 7px;
}

.technique-filter-checkbox-tile span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.technique-filter-checkbox-tile:has(input[type="checkbox"]:checked) {
  border-color: rgba(255, 179, 71, 0.70);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.22), transparent 38%),
    rgba(255, 138, 28, 0.12);
  box-shadow: 0 10px 26px rgba(255, 138, 28, 0.10);
}

.technique-filter-checkbox-tile:has(input[type="checkbox"]:checked)::before {
  border-color: var(--accent-strong);
  background: linear-gradient(135deg, #ffe0a8, var(--accent));
}

.technique-filter-checkbox-tile:has(input[type="checkbox"]:checked)::after {
  opacity: 1;
  transform: translateY(-60%) rotate(45deg) scale(1);
}

.technique-filter-checkbox-tile:has(input[type="checkbox"]:focus-visible) {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

body.theme-blueanime .technique-filter-form details.profile-field {
  border-color: rgba(124, 179, 240, 0.22);
  background:
    radial-gradient(circle at top right, rgba(74, 163, 255, 0.10), transparent 34%),
    rgba(6, 17, 31, 0.42);
}

body.theme-blueanime .technique-filter-checkbox-tile {
  border-color: rgba(124, 179, 240, 0.22);
  background: rgba(6, 17, 31, 0.48);
}

body.theme-blueanime .technique-filter-checkbox-tile:hover,
body.theme-blueanime .technique-filter-checkbox-tile:has(input[type="checkbox"]:checked) {
  border-color: rgba(124, 179, 240, 0.72);
  background:
    radial-gradient(circle at top right, rgba(124, 179, 240, 0.22), transparent 38%),
    rgba(74, 163, 255, 0.12);
}

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

  .technique-filter-checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technique-filter-checkbox-tile {
    min-height: 44px;
    padding: 9px 10px 9px 40px;
    font-size: 0.88rem;
  }
}

@media (max-width: 420px) {
  .technique-filter-checkbox-grid {
    grid-template-columns: 1fr;
  }
}

/* Design diary #20: visible identity refresh layer. */
body:not(.theme-blueanime) {
  background:
    url("/assets/img/patterns/shinobi-ui-pattern-256.webp") 50% 0 / 260px 260px repeat,
    radial-gradient(circle at 16% 0%, rgba(255, 143, 45, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 8%, rgba(120, 38, 20, 0.18), transparent 30rem),
    linear-gradient(180deg, #090807 0%, #120d0a 38%, #070706 100%);
  background-blend-mode: soft-light, normal, normal, normal;
  color: var(--text);
}

body:not(.theme-blueanime)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 72%);
}

body:not(.theme-blueanime)::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 205, 123, 0.08), transparent 32rem),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.26) 100%);
}

.topbar,
.site-header,
.mobile-topbar {
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 190, 103, 0.18);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

.left-sidebar,
.right-sidebar,
.profile-card,
.character-card,
.profile-panel,
.profile-card-block,
.news-card,
.news-article-card,
.comments-card,
.roleplay-card,
.village-card,
.subsection-card,
.thread-card,
.thread-post-card,
.thread-compose-card,
.mission-form-section,
.technique-form-section,
.artifact-card,
.gift-card,
.auth-card,
.settings-clean-card,
.settings-mini-card,
.admin-card,
.admin-panel,
.content-card {
  border: 1px solid rgba(255, 181, 88, 0.18);
  background:
    linear-gradient(145deg, rgba(39, 25, 17, 0.92), rgba(16, 13, 11, 0.96)),
    rgba(18, 14, 12, 0.94);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 232, 194, 0.07);
}

.profile-card:hover,
.character-card:hover,
.news-card:hover,
.roleplay-card:hover,
.village-card:hover,
.subsection-card:hover,
.thread-card:hover,
.artifact-card:hover,
.gift-card:hover,
.technique-card-modern:hover,
.character-modern-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 190, 103, 0.34);
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 181, 88, 0.08),
    inset 0 1px 0 rgba(255, 232, 194, 0.08);
}

.profile-card,
.character-card,
.news-card,
.roleplay-card,
.village-card,
.subsection-card,
.thread-card,
.artifact-card,
.gift-card,
.technique-card-modern,
.character-modern-card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.page-title,
.section-title,
.profile-section-title,
.roleplay-section-title,
.admin-page-title,
.settings-page-title,
.home-title,
.news-section h1,
.news-section h2,
.roleplay-page h1,
.technique-page h1,
.technique-school-page h1,
.character-page h1,
.profile-page h1 {
  color: #fff1c9;
  letter-spacing: 0;
  text-shadow: 0 8px 28px rgba(255, 136, 38, 0.18);
}

.page-title::after,
.section-title::after,
.profile-section-title::after,
.roleplay-section-title::after,
.admin-page-title::after,
.settings-page-title::after,
.home-title::after,
.news-section h1::after,
.news-section h2::after,
.roleplay-page h1::after,
.technique-page h1::after,
.technique-school-page h1::after,
.character-page h1::after,
.profile-page h1::after {
  content: "";
  display: block;
  width: min(132px, 42%);
  height: 3px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb454, rgba(255, 138, 28, 0.18), transparent);
  box-shadow: 0 0 18px rgba(255, 138, 28, 0.28);
}

.button,
.button-primary,
.btn,
button[type="submit"],
input[type="submit"] {
  border: 1px solid rgba(255, 201, 118, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 184, 82, 0.96), rgba(196, 91, 31, 0.96));
  color: #261105;
  box-shadow:
    0 10px 22px rgba(255, 126, 35, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  font-weight: 800;
}

.button:hover,
.button-primary:hover,
.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(255, 126, 35, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.button-secondary,
.btn-secondary,
a.button-secondary {
  border: 1px solid rgba(255, 186, 97, 0.22);
  background:
    linear-gradient(180deg, rgba(72, 44, 28, 0.88), rgba(40, 27, 21, 0.92));
  color: #ffe1aa;
  box-shadow: inset 0 1px 0 rgba(255, 232, 194, 0.08);
}

.profile-badge,
.badge,
.tag,
.technique-mark-badge,
.roleplay-badge,
.character-rank-badge,
.news-badge {
  border: 1px solid rgba(255, 185, 91, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 145, 40, 0.18), rgba(63, 37, 25, 0.72));
  color: #ffe4b5;
  box-shadow: inset 0 1px 0 rgba(255, 232, 194, 0.08);
}

.home-page,
.news-section,
.roleplay-page,
.technique-page,
.technique-school-page,
.profile-page,
.character-page,
.settings-page-clean,
.admin-hub-page {
  position: relative;
}

.home-page > .profile-panel:first-child,
.roleplay-page > .profile-panel:first-child,
.technique-school-page > .profile-panel:first-child,
.news-section > .profile-panel:first-child,
.settings-clean-head,
.admin-hub-page > .profile-panel:first-child {
  overflow: hidden;
  border-color: rgba(255, 184, 82, 0.28);
  background:
    radial-gradient(circle at 9% 20%, rgba(255, 172, 70, 0.2), transparent 20rem),
    radial-gradient(circle at 85% 10%, rgba(129, 43, 24, 0.18), transparent 22rem),
    linear-gradient(145deg, rgba(48, 29, 19, 0.96), rgba(17, 13, 11, 0.98));
}

.home-page > .profile-panel:first-child::before,
.roleplay-page > .profile-panel:first-child::before,
.technique-school-page > .profile-panel:first-child::before,
.news-section > .profile-panel:first-child::before,
.settings-clean-head::before,
.admin-hub-page > .profile-panel:first-child::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.055) 42%, transparent 62%);
  opacity: 0.7;
}

.news-card h3,
.thread-card h3,
.subsection-card h3,
.roleplay-card h3,
.technique-card-modern h2,
.character-modern-card h2,
.artifact-card h3,
.profile-card h3 {
  color: #ffe6b2;
}

.news-card h3 a,
.thread-card h3 a,
.subsection-card h3 a,
.roleplay-card h3 a,
.technique-card-modern h2 a,
.character-modern-card h2 a {
  color: inherit;
  text-decoration: none;
}

.news-card p,
.thread-card p,
.subsection-card p,
.roleplay-card p,
.technique-card-modern p,
.character-modern-card p,
.artifact-card p,
.profile-card p {
  color: rgba(255, 239, 210, 0.76);
}

.left-sidebar .sidebar-link,
.left-sidebar a,
.mobile-bottom-nav a,
.bottom-nav a {
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.left-sidebar .sidebar-link:hover,
.left-sidebar a:hover,
.mobile-bottom-nav a:hover,
.bottom-nav a:hover {
  transform: translateX(2px);
}

.left-sidebar .is-active,
.left-sidebar .active,
.mobile-bottom-nav .is-active,
.mobile-bottom-nav .active,
.bottom-nav .is-active,
.bottom-nav .active {
  border-color: rgba(255, 192, 106, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 139, 38, 0.24), rgba(42, 26, 18, 0.86));
  color: #fff2cf;
  box-shadow: inset 3px 0 0 rgba(255, 160, 52, 0.9);
}

.chat-message,
.message-card,
.private-message,
.comment-card,
.diary-card,
.diary-entry-card {
  border: 1px solid rgba(255, 181, 88, 0.16);
  background:
    linear-gradient(145deg, rgba(36, 24, 18, 0.88), rgba(17, 13, 11, 0.94));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.chat-message.is-own,
.message-card.is-own,
.private-message.is-own {
  border-color: rgba(255, 194, 108, 0.28);
  background:
    linear-gradient(145deg, rgba(63, 38, 22, 0.9), rgba(28, 18, 14, 0.95));
}

body.theme-blueanime {
  background:
    url("/assets/img/patterns/shinobi-ui-pattern-256.webp") 50% 0 / 270px 270px repeat,
    radial-gradient(circle at 14% 0%, rgba(88, 166, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 86% 6%, rgba(26, 84, 150, 0.14), transparent 30rem),
    linear-gradient(180deg, #eef6ff 0%, #dfeaf7 42%, #edf5ff 100%);
  background-blend-mode: luminosity, normal, normal, normal;
}

body.theme-blueanime .profile-card,
body.theme-blueanime .character-card,
body.theme-blueanime .profile-panel,
body.theme-blueanime .profile-card-block,
body.theme-blueanime .news-card,
body.theme-blueanime .news-article-card,
body.theme-blueanime .comments-card,
body.theme-blueanime .roleplay-card,
body.theme-blueanime .village-card,
body.theme-blueanime .subsection-card,
body.theme-blueanime .thread-card,
body.theme-blueanime .thread-post-card,
body.theme-blueanime .thread-compose-card,
body.theme-blueanime .mission-form-section,
body.theme-blueanime .technique-form-section,
body.theme-blueanime .artifact-card,
body.theme-blueanime .gift-card,
body.theme-blueanime .auth-card,
body.theme-blueanime .settings-clean-card,
body.theme-blueanime .settings-mini-card,
body.theme-blueanime .admin-card,
body.theme-blueanime .admin-panel,
body.theme-blueanime .content-card {
  border-color: rgba(62, 132, 202, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(231, 242, 255, 0.94));
  box-shadow:
    0 18px 42px rgba(44, 83, 130, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.theme-blueanime .page-title,
body.theme-blueanime .section-title,
body.theme-blueanime .profile-section-title,
body.theme-blueanime .roleplay-section-title,
body.theme-blueanime .admin-page-title,
body.theme-blueanime .settings-page-title,
body.theme-blueanime .home-title,
body.theme-blueanime .news-section h1,
body.theme-blueanime .news-section h2,
body.theme-blueanime .roleplay-page h1,
body.theme-blueanime .technique-page h1,
body.theme-blueanime .technique-school-page h1,
body.theme-blueanime .character-page h1,
body.theme-blueanime .profile-page h1 {
  color: #15395b;
  text-shadow: 0 8px 28px rgba(45, 116, 190, 0.12);
}

body.theme-blueanime .page-title::after,
body.theme-blueanime .section-title::after,
body.theme-blueanime .profile-section-title::after,
body.theme-blueanime .roleplay-section-title::after,
body.theme-blueanime .admin-page-title::after,
body.theme-blueanime .settings-page-title::after,
body.theme-blueanime .home-title::after,
body.theme-blueanime .news-section h1::after,
body.theme-blueanime .news-section h2::after,
body.theme-blueanime .roleplay-page h1::after,
body.theme-blueanime .technique-page h1::after,
body.theme-blueanime .technique-school-page h1::after,
body.theme-blueanime .character-page h1::after,
body.theme-blueanime .profile-page h1::after {
  background: linear-gradient(90deg, #2d82d8, rgba(83, 166, 237, 0.2), transparent);
  box-shadow: 0 0 18px rgba(45, 130, 216, 0.16);
}

body.theme-blueanime .button,
body.theme-blueanime .button-primary,
body.theme-blueanime .btn,
body.theme-blueanime button[type="submit"],
body.theme-blueanime input[type="submit"] {
  border-color: rgba(42, 120, 194, 0.32);
  background: linear-gradient(180deg, #66b8ff, #2e7fd1);
  color: #f7fbff;
  box-shadow:
    0 10px 22px rgba(46, 127, 209, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

body.theme-blueanime .button-secondary,
body.theme-blueanime .btn-secondary,
body.theme-blueanime a.button-secondary {
  border-color: rgba(76, 144, 213, 0.24);
  background: linear-gradient(180deg, rgba(235, 246, 255, 0.95), rgba(212, 230, 249, 0.96));
  color: #1e4e7b;
}

body.theme-blueanime .profile-badge,
body.theme-blueanime .badge,
body.theme-blueanime .tag,
body.theme-blueanime .technique-mark-badge,
body.theme-blueanime .roleplay-badge,
body.theme-blueanime .character-rank-badge,
body.theme-blueanime .news-badge {
  border-color: rgba(56, 137, 212, 0.24);
  background:
    linear-gradient(135deg, rgba(83, 166, 237, 0.18), rgba(231, 242, 255, 0.9));
  color: #1f5688;
}

@media (max-width: 720px) {
  body:not(.theme-blueanime)::before {
    background-size: 34px 34px;
    opacity: 0.55;
  }

  .profile-card:hover,
  .character-card:hover,
  .news-card:hover,
  .roleplay-card:hover,
  .village-card:hover,
  .subsection-card:hover,
  .thread-card:hover,
  .artifact-card:hover,
  .gift-card:hover,
  .technique-card-modern:hover,
  .character-modern-card:hover,
  .button:hover,
  .button-primary:hover,
  .btn:hover,
  button[type="submit"]:hover,
  input[type="submit"]:hover {
    transform: none;
  }

  .page-title::after,
  .section-title::after,
  .profile-section-title::after,
  .roleplay-section-title::after,
  .admin-page-title::after,
  .settings-page-title::after,
  .home-title::after,
  .news-section h1::after,
  .news-section h2::after,
  .roleplay-page h1::after,
  .technique-page h1::after,
  .technique-school-page h1::after,
  .character-page h1::after,
  .profile-page h1::after {
    width: 92px;
    height: 2px;
    margin-top: 8px;
  }

  .left-sidebar .sidebar-link:hover,
  .left-sidebar a:hover,
  .mobile-bottom-nav a:hover,
  .bottom-nav a:hover {
    transform: none;
  }
}

/* Design diary #20: long forms, spoilers and BB panels polish. */
.bb-spoiler,
.bb-toolbar-spoiler,
.settings-admin-spoiler,
.settings-section-spoiler,
.artifact-create-spoiler,
.artifact-property-group,
.artifact-admin-item-group,
.battle-picker-spoiler,
.battle-judge-tools-spoiler,
.character-spoiler,
.character-profile-spoiler,
.thread-location-spoiler,
.thread-battle-status-spoiler,
.profile-compact-spoiler,
.profile-gifts-more,
.diary-share-panel,
.map-area-json-spoiler,
.technique-filter-form details.profile-field {
  border-radius: 14px;
  border: 1px solid rgba(142, 101, 62, 0.24);
  background:
    linear-gradient(145deg, rgba(39, 25, 19, 0.88), rgba(20, 15, 13, 0.92));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.bb-spoiler > summary,
.bb-spoiler-summary,
.bb-toolbar-spoiler > summary,
.settings-admin-spoiler > summary,
.settings-section-spoiler > summary,
.artifact-create-spoiler > summary,
.artifact-property-group > summary,
.artifact-admin-item-group > summary,
.battle-picker-spoiler > summary,
.battle-judge-tools-spoiler > summary,
.character-spoiler > summary,
.character-profile-spoiler > summary,
.thread-location-spoiler > summary,
.thread-battle-status-spoiler > summary,
.profile-compact-summary,
.profile-gifts-more > summary,
.diary-share-panel > summary,
.map-area-json-spoiler > summary,
.technique-filter-form details.profile-field > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(104, 64, 40, 0.58), rgba(55, 33, 24, 0.62));
  color: #f8dba6;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
}

.bb-spoiler > summary::-webkit-details-marker,
.bb-spoiler-summary::-webkit-details-marker,
.bb-toolbar-spoiler > summary::-webkit-details-marker,
.settings-admin-spoiler > summary::-webkit-details-marker,
.settings-section-spoiler > summary::-webkit-details-marker,
.artifact-create-spoiler > summary::-webkit-details-marker,
.artifact-property-group > summary::-webkit-details-marker,
.artifact-admin-item-group > summary::-webkit-details-marker,
.battle-picker-spoiler > summary::-webkit-details-marker,
.battle-judge-tools-spoiler > summary::-webkit-details-marker,
.character-spoiler > summary::-webkit-details-marker,
.character-profile-spoiler > summary::-webkit-details-marker,
.thread-location-spoiler > summary::-webkit-details-marker,
.thread-battle-status-spoiler > summary::-webkit-details-marker,
.profile-compact-summary::-webkit-details-marker,
.profile-gifts-more > summary::-webkit-details-marker,
.diary-share-panel > summary::-webkit-details-marker,
.map-area-json-spoiler > summary::-webkit-details-marker,
.technique-filter-form details.profile-field > summary::-webkit-details-marker {
  display: none;
}

.bb-spoiler > summary::after,
.bb-spoiler-summary::after,
.bb-toolbar-spoiler > summary::after,
.settings-admin-spoiler > summary::after,
.settings-section-spoiler > summary::after,
.artifact-create-spoiler > summary::after,
.artifact-property-group > summary::after,
.artifact-admin-item-group > summary::after,
.battle-picker-spoiler > summary::after,
.battle-judge-tools-spoiler > summary::after,
.character-spoiler > summary::after,
.character-profile-spoiler > summary::after,
.thread-location-spoiler > summary::after,
.thread-battle-status-spoiler > summary::after,
.profile-compact-summary::after,
.profile-gifts-more > summary::after,
.diary-share-panel > summary::after,
.map-area-json-spoiler > summary::after,
.technique-filter-form details.profile-field > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.76;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.bb-spoiler[open] > summary::after,
.bb-spoiler[open] > .bb-spoiler-summary::after,
.bb-toolbar-spoiler[open] > summary::after,
.settings-admin-spoiler[open] > summary::after,
.settings-section-spoiler[open] > summary::after,
.artifact-create-spoiler[open] > summary::after,
.artifact-property-group[open] > summary::after,
.artifact-admin-item-group[open] > summary::after,
.battle-picker-spoiler[open] > summary::after,
.battle-judge-tools-spoiler[open] > summary::after,
.character-spoiler[open] > summary::after,
.character-profile-spoiler[open] > summary::after,
.thread-location-spoiler[open] > summary::after,
.thread-battle-status-spoiler[open] > summary::after,
.profile-compact-spoiler[open] > .profile-compact-summary::after,
.profile-gifts-more[open] > summary::after,
.diary-share-panel[open] > summary::after,
.map-area-json-spoiler[open] > summary::after,
.technique-filter-form details.profile-field[open] > summary::after {
  transform: rotate(225deg);
  opacity: 1;
}

.bb-spoiler-content,
.settings-spoiler-body,
.artifact-create-spoiler-body,
.character-sidebar-spoiler-body,
.profile-compact-spoiler-body,
.battle-picker-spoiler > .battle-team-picker-grid,
.battle-judge-tools-spoiler > form,
.battle-judge-tools-spoiler > div,
.thread-location-spoiler > div,
.thread-battle-status-spoiler > div,
.diary-share-panel > div,
.map-area-json-spoiler > div {
  padding: 14px;
}

.bb-toolbar-spoiler {
  overflow: hidden;
}

.bb-toolbar-spoiler > summary {
  min-height: 42px;
  background:
    linear-gradient(135deg, rgba(80, 49, 32, 0.72), rgba(39, 26, 20, 0.76));
}

.bb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 100%;
  padding: 10px;
  border-radius: 0 0 14px 14px;
  background: rgba(20, 14, 12, 0.42);
}

.bb-toolbar button,
.bb-toolbar .button,
.bb-toolbar select,
.bb-toolbar input[type="color"] {
  flex: 0 0 auto;
  min-height: 32px;
  max-width: 100%;
}

.bb-toolbar button,
.bb-toolbar .button {
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 0.88rem;
  line-height: 1.15;
}

.profile-form-grid,
.admin-form-grid,
.mission-form-grid,
.artifact-create-spoiler-body,
.battle-team-picker-grid,
.technique-form-grid {
  align-items: start;
}

.profile-field,
.profile-info-item,
.form-field,
.admin-field,
.mission-field,
.technique-field {
  min-width: 0;
}

.profile-field input,
.profile-field select,
.profile-field textarea,
.form-field input,
.form-field select,
.form-field textarea,
.admin-field input,
.admin-field select,
.admin-field textarea,
.mission-field input,
.mission-field select,
.mission-field textarea,
.technique-field input,
.technique-field select,
.technique-field textarea {
  max-width: 100%;
}

.mission-form-section,
.technique-form-section,
.profile-card-block,
.profile-panel {
  min-width: 0;
}

body.theme-blueanime .bb-spoiler,
body.theme-blueanime .bb-toolbar-spoiler,
body.theme-blueanime .settings-admin-spoiler,
body.theme-blueanime .settings-section-spoiler,
body.theme-blueanime .artifact-create-spoiler,
body.theme-blueanime .artifact-property-group,
body.theme-blueanime .artifact-admin-item-group,
body.theme-blueanime .battle-picker-spoiler,
body.theme-blueanime .battle-judge-tools-spoiler,
body.theme-blueanime .character-spoiler,
body.theme-blueanime .character-profile-spoiler,
body.theme-blueanime .thread-location-spoiler,
body.theme-blueanime .thread-battle-status-spoiler,
body.theme-blueanime .profile-compact-spoiler,
body.theme-blueanime .profile-gifts-more,
body.theme-blueanime .diary-share-panel,
body.theme-blueanime .map-area-json-spoiler,
body.theme-blueanime .technique-filter-form details.profile-field {
  border-color: rgba(93, 176, 255, 0.28);
  background:
    linear-gradient(145deg, rgba(19, 38, 61, 0.9), rgba(10, 18, 31, 0.94));
}

body.theme-blueanime .bb-spoiler > summary,
body.theme-blueanime .bb-spoiler-summary,
body.theme-blueanime .bb-toolbar-spoiler > summary,
body.theme-blueanime .settings-admin-spoiler > summary,
body.theme-blueanime .settings-section-spoiler > summary,
body.theme-blueanime .artifact-create-spoiler > summary,
body.theme-blueanime .artifact-property-group > summary,
body.theme-blueanime .artifact-admin-item-group > summary,
body.theme-blueanime .battle-picker-spoiler > summary,
body.theme-blueanime .battle-judge-tools-spoiler > summary,
body.theme-blueanime .character-spoiler > summary,
body.theme-blueanime .character-profile-spoiler > summary,
body.theme-blueanime .thread-location-spoiler > summary,
body.theme-blueanime .thread-battle-status-spoiler > summary,
body.theme-blueanime .profile-compact-summary,
body.theme-blueanime .profile-gifts-more > summary,
body.theme-blueanime .diary-share-panel > summary,
body.theme-blueanime .map-area-json-spoiler > summary,
body.theme-blueanime .technique-filter-form details.profile-field > summary {
  background:
    linear-gradient(135deg, rgba(42, 101, 156, 0.58), rgba(22, 48, 80, 0.66));
  color: #d9efff;
}

body.theme-blueanime .bb-toolbar {
  background: rgba(8, 17, 30, 0.5);
}

@media (max-width: 720px) {
  .bb-spoiler,
  .bb-toolbar-spoiler,
  .settings-admin-spoiler,
  .settings-section-spoiler,
  .artifact-create-spoiler,
  .artifact-property-group,
  .artifact-admin-item-group,
  .battle-picker-spoiler,
  .battle-judge-tools-spoiler,
  .character-spoiler,
  .character-profile-spoiler,
  .thread-location-spoiler,
  .thread-battle-status-spoiler,
  .profile-compact-spoiler,
  .profile-gifts-more,
  .diary-share-panel,
  .map-area-json-spoiler,
  .technique-filter-form details.profile-field {
    border-radius: 12px;
  }

  .bb-spoiler > summary,
  .bb-spoiler-summary,
  .bb-toolbar-spoiler > summary,
  .settings-admin-spoiler > summary,
  .settings-section-spoiler > summary,
  .artifact-create-spoiler > summary,
  .artifact-property-group > summary,
  .artifact-admin-item-group > summary,
  .battle-picker-spoiler > summary,
  .battle-judge-tools-spoiler > summary,
  .character-spoiler > summary,
  .character-profile-spoiler > summary,
  .thread-location-spoiler > summary,
  .thread-battle-status-spoiler > summary,
  .profile-compact-summary,
  .profile-gifts-more > summary,
  .diary-share-panel > summary,
  .map-area-json-spoiler > summary,
  .technique-filter-form details.profile-field > summary {
    min-height: 42px;
    padding: 11px 12px;
    font-size: 0.94rem;
  }

  .bb-spoiler-content,
  .settings-spoiler-body,
  .artifact-create-spoiler-body,
  .character-sidebar-spoiler-body,
  .profile-compact-spoiler-body,
  .battle-picker-spoiler > .battle-team-picker-grid,
  .battle-judge-tools-spoiler > form,
  .battle-judge-tools-spoiler > div,
  .thread-location-spoiler > div,
  .thread-battle-status-spoiler > div,
  .diary-share-panel > div,
  .map-area-json-spoiler > div {
    padding: 12px;
  }

  .bb-toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .bb-toolbar button,
  .bb-toolbar .button,
  .bb-toolbar select,
  .bb-toolbar input[type="color"] {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .bb-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Design diary #20: final states, service pages and mobile polish. */
.empty-state,
.site-empty-state,
.module-empty,
.content-empty,
.no-items,
.no-results {
  width: min(100%, 760px);
  margin: 14px auto;
  padding: 22px;
  border: 1px solid rgba(142, 101, 62, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(42, 25, 18, 0.93), rgba(22, 15, 13, 0.96)),
    rgba(30, 20, 17, 0.95);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  color: rgba(252, 239, 214, 0.9);
  text-align: left;
}

.empty-state h1,
.empty-state h2,
.empty-state h3,
.site-empty-state h1,
.site-empty-state h2,
.site-empty-state h3,
.module-empty h1,
.module-empty h2,
.module-empty h3,
.content-empty h1,
.content-empty h2,
.content-empty h3,
.no-items h1,
.no-items h2,
.no-items h3,
.no-results h1,
.no-results h2,
.no-results h3 {
  margin: 0 0 8px;
  color: #f6d69c;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  line-height: 1.25;
  letter-spacing: 0;
}

.empty-state p,
.site-empty-state p,
.module-empty p,
.content-empty p,
.no-items p,
.no-results p {
  margin: 0;
  color: rgba(252, 239, 214, 0.76);
  font-size: 0.96rem;
  line-height: 1.55;
}

.empty-state .button,
.empty-state .button-primary,
.empty-state .btn,
.site-empty-state .button,
.module-empty .button,
.content-empty .button {
  margin-top: 14px;
}

.site-error-page {
  min-height: min(72vh, 760px);
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.site-error-card {
  width: min(100%, 760px);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(221, 166, 91, 0.32);
  border-radius: 20px;
  background:
    radial-gradient(circle at 14% 18%, rgba(227, 134, 54, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(45, 27, 20, 0.96), rgba(18, 14, 13, 0.98));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
  padding: 30px;
}

.site-error-code {
  color: #f6d69c;
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 8px 28px rgba(238, 144, 54, 0.2);
}

.site-error-copy {
  color: rgba(252, 239, 214, 0.88);
}

.site-error-copy h1 {
  color: #fff2cc;
  font-size: clamp(1.25rem, 4vw, 2rem);
  letter-spacing: 0;
}

.site-error-copy p,
.site-error-copy small {
  color: rgba(252, 239, 214, 0.74);
  line-height: 1.6;
}

.site-error-actions,
.form-actions,
.admin-form-actions,
.actions-row,
.button-row,
.inline-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.form-actions > *,
.admin-form-actions > *,
.actions-row > *,
.button-row > *,
.inline-action-row > * {
  min-width: 0;
}

.pagination,
.chat-pagination,
.messages-pagination,
.battle-pagination,
.diary-pagination,
.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 16px 0;
  padding: 10px;
  border: 1px solid rgba(142, 101, 62, 0.24);
  border-radius: 14px;
  background: rgba(28, 18, 15, 0.72);
}

.pagination a,
.pagination span,
.chat-pagination a,
.chat-pagination span,
.messages-pagination a,
.messages-pagination span,
.battle-pagination a,
.battle-pagination span,
.diary-pagination a,
.diary-pagination span,
.admin-pagination a,
.admin-pagination span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid rgba(221, 166, 91, 0.22);
  background: rgba(56, 35, 25, 0.72);
  color: rgba(252, 239, 214, 0.86);
  text-decoration: none;
  line-height: 1.2;
}

.pagination .active,
.pagination .current,
.chat-pagination .active,
.chat-pagination .current,
.messages-pagination .active,
.messages-pagination .current,
.battle-pagination .active,
.battle-pagination .current,
.diary-pagination .active,
.diary-pagination .current,
.admin-pagination .active,
.admin-pagination .current {
  border-color: rgba(246, 199, 119, 0.55);
  background: linear-gradient(135deg, rgba(154, 91, 43, 0.9), rgba(96, 51, 34, 0.92));
  color: #fff4d3;
  font-weight: 700;
}

.pagination .disabled,
.pagination .is-disabled,
.chat-pagination .disabled,
.chat-pagination .is-disabled,
.messages-pagination .disabled,
.messages-pagination .is-disabled,
.battle-pagination .disabled,
.battle-pagination .is-disabled,
.diary-pagination .disabled,
.diary-pagination .is-disabled,
.admin-pagination .disabled,
.admin-pagination .is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.flash-message,
.alert,
.notice,
.system-message,
.status-message,
.loading-message,
.roleplay-system-message,
.npc-pending-message,
.ai-pending-message {
  max-width: 100%;
  border: 1px solid rgba(221, 166, 91, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(45, 29, 21, 0.92), rgba(23, 16, 14, 0.94));
  color: rgba(252, 239, 214, 0.88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  padding: 12px 14px;
  line-height: 1.5;
}

.flash-message.success,
.alert-success,
.notice-success,
.status-success {
  border-color: rgba(99, 188, 120, 0.38);
  background:
    linear-gradient(145deg, rgba(28, 69, 43, 0.9), rgba(17, 34, 25, 0.94));
}

.flash-message.error,
.alert-error,
.notice-error,
.status-error {
  border-color: rgba(222, 91, 78, 0.42);
  background:
    linear-gradient(145deg, rgba(87, 35, 30, 0.92), rgba(34, 18, 16, 0.96));
}

.flash-message.warning,
.alert-warning,
.notice-warning,
.status-warning {
  border-color: rgba(230, 184, 89, 0.44);
  background:
    linear-gradient(145deg, rgba(86, 58, 24, 0.92), rgba(34, 24, 16, 0.96));
}

.table-wrap,
.admin-table-wrap,
.responsive-table {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 14px;
}

.table-wrap table,
.admin-table-wrap table,
.responsive-table table {
  width: 100%;
  min-width: 620px;
}

.bb-content img,
.bbcode-content img,
.post-content img,
.diary-content img,
.comment-content img,
.roleplay-post-content img,
.news-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.bb-content iframe,
.bbcode-content iframe,
.post-content iframe,
.diary-content iframe,
.comment-content iframe,
.roleplay-post-content iframe,
.news-content iframe {
  max-width: 100%;
}

body.theme-blueanime .empty-state,
body.theme-blueanime .site-empty-state,
body.theme-blueanime .module-empty,
body.theme-blueanime .content-empty,
body.theme-blueanime .no-items,
body.theme-blueanime .no-results,
body.theme-blueanime .pagination,
body.theme-blueanime .chat-pagination,
body.theme-blueanime .messages-pagination,
body.theme-blueanime .battle-pagination,
body.theme-blueanime .diary-pagination,
body.theme-blueanime .admin-pagination,
body.theme-blueanime .flash-message,
body.theme-blueanime .alert,
body.theme-blueanime .notice,
body.theme-blueanime .system-message,
body.theme-blueanime .status-message,
body.theme-blueanime .loading-message,
body.theme-blueanime .roleplay-system-message,
body.theme-blueanime .npc-pending-message,
body.theme-blueanime .ai-pending-message {
  border-color: rgba(93, 176, 255, 0.28);
  background:
    linear-gradient(145deg, rgba(19, 36, 58, 0.92), rgba(10, 18, 31, 0.95));
  color: rgba(226, 241, 255, 0.9);
}

body.theme-blueanime .empty-state h1,
body.theme-blueanime .empty-state h2,
body.theme-blueanime .empty-state h3,
body.theme-blueanime .site-empty-state h1,
body.theme-blueanime .site-empty-state h2,
body.theme-blueanime .site-empty-state h3,
body.theme-blueanime .module-empty h1,
body.theme-blueanime .module-empty h2,
body.theme-blueanime .module-empty h3,
body.theme-blueanime .content-empty h1,
body.theme-blueanime .content-empty h2,
body.theme-blueanime .content-empty h3,
body.theme-blueanime .no-items h1,
body.theme-blueanime .no-items h2,
body.theme-blueanime .no-items h3,
body.theme-blueanime .no-results h1,
body.theme-blueanime .no-results h2,
body.theme-blueanime .no-results h3 {
  color: #d6ecff;
}

body.theme-blueanime .pagination a,
body.theme-blueanime .pagination span,
body.theme-blueanime .chat-pagination a,
body.theme-blueanime .chat-pagination span,
body.theme-blueanime .messages-pagination a,
body.theme-blueanime .messages-pagination span,
body.theme-blueanime .battle-pagination a,
body.theme-blueanime .battle-pagination span,
body.theme-blueanime .diary-pagination a,
body.theme-blueanime .diary-pagination span,
body.theme-blueanime .admin-pagination a,
body.theme-blueanime .admin-pagination span {
  border-color: rgba(99, 184, 255, 0.25);
  background: rgba(27, 55, 86, 0.72);
  color: rgba(226, 241, 255, 0.88);
}

body.theme-blueanime .pagination .active,
body.theme-blueanime .pagination .current,
body.theme-blueanime .chat-pagination .active,
body.theme-blueanime .chat-pagination .current,
body.theme-blueanime .messages-pagination .active,
body.theme-blueanime .messages-pagination .current,
body.theme-blueanime .battle-pagination .active,
body.theme-blueanime .battle-pagination .current,
body.theme-blueanime .diary-pagination .active,
body.theme-blueanime .diary-pagination .current,
body.theme-blueanime .admin-pagination .active,
body.theme-blueanime .admin-pagination .current {
  border-color: rgba(133, 205, 255, 0.55);
  background: linear-gradient(135deg, rgba(41, 118, 187, 0.92), rgba(28, 70, 121, 0.94));
  color: #f3fbff;
}

@media (max-width: 720px) {
  img,
  video,
  iframe,
  canvas {
    max-width: 100%;
  }

  .site-error-page {
    min-height: auto;
    padding: 18px 10px 88px;
  }

  .site-error-card,
  .empty-state,
  .site-empty-state,
  .module-empty,
  .content-empty,
  .no-items,
  .no-results {
    border-radius: 14px;
    padding: 16px;
  }

  .site-error-actions,
  .form-actions,
  .admin-form-actions,
  .actions-row,
  .button-row,
  .inline-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-error-actions > *,
  .form-actions > *,
  .admin-form-actions > *,
  .actions-row > *,
  .button-row > *,
  .inline-action-row > * {
    width: 100%;
  }

  .pagination,
  .chat-pagination,
  .messages-pagination,
  .battle-pagination,
  .diary-pagination,
  .admin-pagination {
    gap: 6px;
    padding: 8px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .pagination a,
  .pagination span,
  .chat-pagination a,
  .chat-pagination span,
  .messages-pagination a,
  .messages-pagination span,
  .battle-pagination a,
  .battle-pagination span,
  .diary-pagination a,
  .diary-pagination span,
  .admin-pagination a,
  .admin-pagination span {
    flex: 0 0 auto;
    min-width: 36px;
    padding: 7px 10px;
    white-space: nowrap;
  }

  .flash-message,
  .alert,
  .notice,
  .system-message,
  .status-message,
  .loading-message,
  .roleplay-system-message,
  .npc-pending-message,
  .ai-pending-message {
    border-radius: 12px;
    padding: 11px 12px;
  }
}

/* Design diary #20: shell, sidebars, home and admin pages polish. */
.app-shell {
  gap: 16px;
}

.topbar,
.left-sidebar,
.right-sidebar,
.bottom-mobile-nav,
.mobile-menu,
.sidebar-section,
.right-sidebar .character-card-sidebar,
.admin-hub-hero,
.settings-admin-spoiler,
.admin-table,
.home-hero,
.home-online-section {
  border-color: var(--ui-card-border);
  box-shadow: var(--ui-soft-glow);
}

.topbar {
  min-height: 74px;
  border-radius: 0 0 22px 22px;
  background:
    radial-gradient(circle at top left, rgba(255, 179, 71, 0.10), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg-strong), var(--ui-card-bg));
  backdrop-filter: blur(16px);
}

.brand-mark,
.menu-toggle,
.sidebar-link-icon,
.mobile-menu-icon {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 10px 22px rgba(0, 0, 0, 0.20);
}

.left-sidebar,
.right-sidebar {
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.075), transparent 32%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.sidebar-section {
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.06), transparent 36%),
    rgba(255, 255, 255, 0.03);
}

.sidebar-section-head {
  gap: 8px;
}

.sidebar-section-kicker {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid var(--ui-card-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  letter-spacing: 0;
}

.sidebar-nav-grid,
.sidebar-stack {
  gap: 8px;
}

.sidebar-link-card,
.sidebar-inline-link,
.character-sidebar-spoiler-summary,
.character-sidebar-panel,
.character-sidebar-rank-card,
.character-sidebar-meta-pill,
.character-sidebar-stat {
  border-color: var(--ui-card-border);
  border-radius: 14px;
}

.sidebar-link-card {
  min-height: 48px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.055), transparent 36%),
    rgba(255, 255, 255, 0.035);
}

.sidebar-link-card:hover,
.sidebar-link-card.is-active,
.sidebar-inline-link:hover,
.sidebar-inline-link.is-active,
.character-sidebar-spoiler[open] .character-sidebar-spoiler-summary {
  border-color: var(--ui-card-border-hover);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.13), transparent 36%),
    rgba(255, 138, 28, 0.08);
}

.sidebar-inline-counter,
.messages-unread-badge,
.profile-badge-role {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-strong) 16%, transparent);
}

.character-sidebar-avatar-shell {
  border-color: var(--ui-card-border);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.character-sidebar-stat-bar {
  border-radius: 999px;
  overflow: hidden;
}

.bottom-mobile-nav,
.mobile-menu {
  border-radius: 22px 22px 0 0;
  background:
    radial-gradient(circle at top, rgba(255, 179, 71, 0.10), transparent 46%),
    color-mix(in srgb, var(--ui-card-bg-strong) 94%, transparent);
  backdrop-filter: blur(18px);
}

.mobile-menu-item {
  border-radius: 14px;
  min-width: 0;
}

.mobile-menu-item.is-active {
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.15), transparent 36%),
    rgba(255, 138, 28, 0.10);
}

.mobile-menu-label {
  letter-spacing: 0;
}

.home-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.12), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.home-hero-compact {
  min-height: 0;
}

.home-hero h1 {
  line-height: 1.06;
}

.home-hero p,
.home-highlight span,
.home-online-section p {
  line-height: 1.55;
}

.home-hero-side,
.home-highlight,
.home-online-section {
  border-radius: var(--ui-radius);
}

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

.admin-hub-page,
.settings-admin-stack,
.admin-hub-stack,
.roleplay-map-admin-page,
.specialization-admin-page {
  gap: 14px;
}

.admin-hub-hero,
.settings-admin-spoiler,
.admin-table,
.specialization-admin-card,
.artifact-admin-item-group,
.map-admin-card {
  border-radius: var(--ui-radius);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.075), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.settings-admin-spoiler > .bb-spoiler-summary,
.admin-hub-page .settings-admin-spoiler > .bb-spoiler-summary {
  min-height: 48px;
  padding: 12px 15px;
}

.admin-hub-page .profile-action-grid {
  gap: 10px;
}

.admin-table {
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  border-color: var(--ui-card-border);
}

.admin-mode-active .topbar {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--ui-warning) 22%, transparent),
    0 18px 44px rgba(0, 0, 0, 0.36);
}

body.theme-blueanime .topbar,
body.theme-blueanime .left-sidebar,
body.theme-blueanime .right-sidebar,
body.theme-blueanime .sidebar-section,
body.theme-blueanime .home-hero,
body.theme-blueanime .admin-hub-hero,
body.theme-blueanime .settings-admin-spoiler,
body.theme-blueanime .home-online-section {
  background:
    radial-gradient(circle at top right, rgba(95, 187, 255, 0.11), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.025));
}

body.theme-blueanime .sidebar-link-card:hover,
body.theme-blueanime .sidebar-link-card.is-active,
body.theme-blueanime .sidebar-inline-link:hover,
body.theme-blueanime .sidebar-inline-link.is-active,
body.theme-blueanime .mobile-menu-item.is-active {
  border-color: rgba(125, 211, 252, 0.46);
  background:
    radial-gradient(circle at top right, rgba(95, 187, 255, 0.16), transparent 36%),
    rgba(74, 163, 255, 0.10);
}

@media (max-width: 1180px) {
  .left-sidebar,
  .right-sidebar {
    border-radius: 18px;
  }
}

@media (max-width: 900px) {
  .topbar {
    min-height: 66px;
    border-radius: 0 0 18px 18px;
  }

  .content {
    padding-bottom: 88px;
  }

  .mobile-menu {
    padding: 8px;
    gap: 5px;
  }

  .mobile-menu-item {
    min-height: 54px;
    padding: 6px 4px;
  }

  .mobile-menu-icon {
    width: 26px;
    height: 26px;
  }

  .mobile-menu-label {
    max-width: 100%;
    font-size: 0.72rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  .app-shell {
    gap: 10px;
  }

  .topbar {
    min-height: 62px;
  }

  .brand-text small {
    display: none;
  }

  .home-hero,
  .admin-hub-hero,
  .settings-admin-spoiler {
    border-radius: 14px;
  }

  .home-hero h1 {
    font-size: clamp(1.55rem, 8vw, 2.25rem);
  }

  .home-highlight,
  .home-online-section {
    border-radius: 14px;
  }

  .admin-hub-page .profile-action-grid {
    grid-template-columns: 1fr;
  }

  .admin-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 14px;
  }
}

.technique-mark-tile img,
.technique-mark-admin-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 6px;
}

.technique-mark-badges {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.technique-mark-badge {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(13, 26, 43, 0.72);
  color: #f4d58b;
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1;
}

.technique-mark-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  max-width: min(260px, 82vw);
  width: max-content;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 179, 71, 0.24);
  background: rgba(10, 13, 20, 0.96);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.technique-mark-badge:hover::after,
.technique-mark-badge:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.technique-mark-badge img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

/* UX refresh layer: shared visual foundation for the design diary #20 pass. */
:root {
  --ui-card-bg: rgba(18, 18, 18, 0.9);
  --ui-card-bg-strong: rgba(27, 24, 22, 0.96);
  --ui-card-border: rgba(255, 179, 71, 0.18);
  --ui-card-border-hover: rgba(255, 179, 71, 0.34);
  --ui-soft-glow: 0 18px 40px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  --ui-focus-ring: 0 0 0 3px rgba(255, 179, 71, 0.18);
  --ui-control-height: 44px;
  --ui-radius: 16px;
  --ui-gap: 16px;
  --ui-success: #43d17d;
  --ui-danger: #ff5b5b;
  --ui-warning: #f4c15d;
}

body.theme-blueanime {
  --ui-card-bg: rgba(11, 19, 31, 0.86);
  --ui-card-bg-strong: rgba(14, 28, 48, 0.94);
  --ui-card-border: rgba(86, 178, 255, 0.22);
  --ui-card-border-hover: rgba(112, 199, 255, 0.42);
  --ui-soft-glow: 0 18px 42px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --ui-focus-ring: 0 0 0 3px rgba(82, 169, 255, 0.2);
}

.profile-panel,
.profile-card-block,
.roleplay-card,
.diary-card,
.home-diary-card,
.mission-board-card,
.artifact-card,
.artifact-detail,
.site-confirm-dialog,
.roleplay-map-modal-dialog,
.thread-post,
.message-card,
.chat-message,
.empty-state {
  border-color: var(--ui-card-border);
  border-radius: min(var(--ui-radius), var(--radius));
  box-shadow: var(--ui-soft-glow);
}

.profile-panel:hover,
.profile-card-block:hover,
.roleplay-card:hover,
.diary-card:hover,
.home-diary-card:hover,
.mission-board-card:hover,
.artifact-card:hover {
  border-color: var(--ui-card-border-hover);
}

.profile-field {
  gap: 8px;
}

.profile-field span,
.profile-field label > span,
.profile-field > label {
  letter-spacing: 0;
}

.profile-field input,
.profile-field select,
.profile-field textarea,
.bb-input,
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="url"],
select,
textarea {
  min-height: var(--ui-control-height);
  border-radius: 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.profile-field textarea,
textarea {
  min-height: 132px;
}

.profile-field input:focus,
.profile-field select:focus,
.profile-field textarea:focus,
.bb-input:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  border-color: var(--ui-card-border-hover);
  box-shadow: var(--ui-focus-ring);
  outline: none;
}

.bb-spoiler {
  width: 100%;
  border-color: var(--ui-card-border);
  border-radius: var(--ui-radius);
  background: linear-gradient(135deg, var(--ui-card-bg), rgba(255, 255, 255, 0.025));
  box-shadow: var(--ui-soft-glow);
  overflow: hidden;
}

.bb-spoiler > summary,
.bb-spoiler-summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: calc(var(--ui-radius) - 2px);
  color: var(--text);
  letter-spacing: 0;
  list-style: none;
  cursor: pointer;
}

.bb-spoiler > summary::-webkit-details-marker,
.bb-spoiler-summary::-webkit-details-marker {
  display: none;
}

.bb-spoiler > summary::after,
.bb-spoiler-summary::after {
  content: "+";
  width: 26px;
  height: 26px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--ui-card-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-strong);
  font-weight: 900;
  line-height: 1;
}

.bb-spoiler[open] > summary::after,
.bb-spoiler[open] > .bb-spoiler-summary::after {
  content: "-";
}

.bb-spoiler > summary:hover,
.bb-spoiler-summary:hover {
  background: rgba(255, 255, 255, 0.055);
}

.profile-badge,
.news-badge,
.ticket-status,
.section-kicker,
.chat-kicker {
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0;
}

.button,
.button-secondary,
.button-danger,
button[type="submit"],
input[type="submit"] {
  min-height: 40px;
  border-radius: 12px;
}

@media (max-width: 720px) {
  :root {
    --ui-control-height: 42px;
    --ui-radius: 14px;
    --ui-gap: 12px;
  }

  .profile-panel,
  .profile-card-block,
  .roleplay-card,
  .diary-card,
  .home-diary-card,
  .mission-board-card {
    border-radius: var(--ui-radius);
  }

  .bb-spoiler > summary,
  .bb-spoiler-summary {
    min-height: 44px;
    padding: 11px 13px;
    font-size: 0.94rem;
  }

  .bb-spoiler > summary::after,
  .bb-spoiler-summary::after {
    width: 24px;
    height: 24px;
  }

  .profile-field textarea,
  textarea {
    min-height: 116px;
  }
}

/* Design diary #20: roleplay map and location modal polish. */
.roleplay-map-shell {
  padding: clamp(14px, 2vw, 22px);
}

.roleplay-map-toolbar {
  gap: 12px;
  margin-bottom: 14px;
}

.roleplay-map-breadcrumbs {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--ui-card-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  width: fit-content;
  max-width: 100%;
}

.roleplay-map-crumb {
  padding: 3px 8px;
  border-radius: 999px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.roleplay-map-crumb:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-strong);
}

.roleplay-map-caption {
  font-size: 0.92rem;
  line-height: 1.45;
}

.roleplay-map-area-quick-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.roleplay-map-area-quick {
  justify-content: center;
  min-height: 38px;
  padding-inline: 12px;
}

.roleplay-map-viewport {
  border-radius: 22px;
  border-color: var(--ui-card-border);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 179, 71, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(8, 10, 16, 0.92), rgba(8, 12, 20, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 22px 48px rgba(0, 0, 0, 0.34);
}

.roleplay-map-tooltip {
  border-color: var(--ui-card-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.12), transparent 34%),
    rgba(9, 11, 17, 0.96);
}

.roleplay-map-area {
  fill-opacity: calc(var(--area-opacity, 0.22) * 0.34);
  stroke-width: 0.34;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--area-color, #ff9223) 16%, transparent));
}

.roleplay-map-area:hover,
.roleplay-map-area.is-active {
  fill-opacity: calc(var(--area-opacity, 0.22) * 0.8);
  stroke-width: 0.48;
  filter: drop-shadow(0 0 13px color-mix(in srgb, var(--area-color, #ff9223) 32%, transparent));
}

.roleplay-map-point {
  width: calc(var(--point-size, 14px) + 10px);
  height: calc(var(--point-size, 14px) + 10px);
  margin-left: calc((var(--point-size, 14px) + 10px) / -2);
  margin-top: calc((var(--point-size, 14px) + 10px) / -2);
}

.roleplay-map-point-dot {
  border: 2px solid rgba(255, 244, 214, 0.9);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.92), transparent 24%),
    radial-gradient(circle, var(--point-color, #ff9223), color-mix(in srgb, var(--point-color, #ff9223) 74%, #4b1e08));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--point-color, #ff9223) 22%, transparent),
    0 0 14px color-mix(in srgb, var(--point-color, #ff9223) 44%, transparent);
}

.roleplay-map-point.is-active .roleplay-map-point-dot,
.roleplay-map-point:hover .roleplay-map-point-dot {
  transform: scale(1.12);
}

.roleplay-map-point-label {
  max-width: 180px;
  padding: 6px 9px;
  border: 1px solid var(--ui-card-border);
  border-radius: 999px;
  background: rgba(8, 10, 16, 0.88);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(8px);
}

.roleplay-map-mobile-sheet {
  border: 1px solid var(--ui-card-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(255, 179, 71, 0.12), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg-strong), var(--ui-card-bg));
  box-shadow: var(--ui-soft-glow);
}

.roleplay-map-mobile-description,
.roleplay-map-modal-description {
  line-height: 1.58;
}

.roleplay-map-mobile-description b,
.roleplay-map-mobile-description strong,
.roleplay-map-modal-description b,
.roleplay-map-modal-description strong {
  color: var(--accent-strong);
}

.roleplay-map-modal {
  padding: 16px;
}

.roleplay-map-modal-dialog {
  display: grid;
  gap: 14px;
  border-color: var(--ui-card-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(28, 22, 18, 0.98), rgba(10, 11, 15, 0.98));
}

.roleplay-map-modal-dialog h2 {
  margin-right: 42px;
  line-height: 1.15;
}

.roleplay-map-modal-close {
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.roleplay-map-topic-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.roleplay-map-topic-card {
  min-height: 76px;
  border-color: var(--ui-card-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.10), transparent 38%),
    rgba(255, 255, 255, 0.045);
  transition: border-color 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

.roleplay-map-topic-card:hover {
  border-color: var(--ui-card-border-hover);
  transform: translateY(-1px);
}

body.theme-blueanime .roleplay-map-viewport {
  background:
    radial-gradient(circle at 50% 0%, rgba(95, 187, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(8, 18, 32, 0.94), rgba(5, 12, 24, 0.98));
}

body.theme-blueanime .roleplay-map-point-label,
body.theme-blueanime .roleplay-map-tooltip {
  background: rgba(6, 16, 30, 0.9);
}

body.theme-blueanime .roleplay-map-mobile-sheet,
body.theme-blueanime .roleplay-map-modal-dialog {
  background:
    radial-gradient(circle at top right, rgba(95, 187, 255, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(14, 29, 50, 0.98), rgba(6, 13, 26, 0.98));
}

@media (max-width: 720px) {
  .roleplay-map-shell {
    padding: 10px;
  }

  .roleplay-map-toolbar {
    gap: 9px;
    margin-bottom: 10px;
  }

  .roleplay-map-breadcrumbs {
    width: 100%;
    justify-content: center;
    border-radius: 14px;
  }

  .roleplay-map-area-quick-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    max-height: 148px;
    overflow: auto;
    padding-right: 2px;
  }

  .roleplay-map-area-quick {
    min-height: 36px;
    padding: 8px 9px;
    font-size: 0.84rem;
  }

  .roleplay-map-viewport {
    border-radius: 16px;
  }

  .roleplay-map-area {
    fill-opacity: calc(var(--area-opacity, 0.22) * 0.20);
    stroke-width: 0.28;
  }

  .roleplay-map-area:hover,
  .roleplay-map-area.is-active {
    fill-opacity: calc(var(--area-opacity, 0.22) * 0.46);
  }

  .roleplay-map-point {
    width: 18px;
    height: 18px;
    margin-left: -9px;
    margin-top: -9px;
  }

  .roleplay-map-point-dot {
    width: min(var(--point-size, 14px), 7px);
    height: min(var(--point-size, 14px), 7px);
    border-width: 1px;
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--point-color, #ff9223) 18%, transparent),
      0 0 7px color-mix(in srgb, var(--point-color, #ff9223) 32%, transparent);
  }

  .roleplay-map-mobile-sheet {
    margin-top: 10px;
    padding: 14px;
    border-radius: 18px;
  }

  .roleplay-map-mobile-sheet .roleplay-card-actions {
    gap: 8px;
  }

  .roleplay-map-mobile-sheet .button,
  .roleplay-map-mobile-sheet .button-secondary {
    width: 100%;
  }

  .roleplay-map-modal {
    align-items: end;
    padding: 8px;
  }

  .roleplay-map-modal-dialog {
    width: 100%;
    max-width: none;
    max-height: min(84vh, 760px);
    padding: 18px 14px;
    border-radius: 20px 20px 16px 16px;
  }

  .roleplay-map-topic-list {
    grid-template-columns: 1fr;
  }
}

/* Design diary #20: unified alerts, confirmations and notification cards. */
.flash-banner,
.flash-success,
.flash-error {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin: 0 0 14px;
  padding: 12px 14px 12px 44px;
  border-radius: 14px;
  border: 1px solid var(--ui-card-border);
  background:
    radial-gradient(circle at top left, rgba(255, 179, 71, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--ui-card-bg);
  color: var(--text);
  box-shadow: var(--ui-soft-glow);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.flash-banner::before,
.flash-success::before,
.flash-error::before {
  content: "!";
  position: absolute;
  left: 13px;
  top: 12px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #170f06;
  background: var(--ui-warning);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.flash-success {
  border-color: color-mix(in srgb, var(--ui-success) 42%, transparent);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--ui-success) 18%, transparent), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--ui-card-bg);
}

.flash-success::before {
  content: "\2713";
  background: var(--ui-success);
}

.flash-error {
  border-color: color-mix(in srgb, var(--ui-danger) 46%, transparent);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--ui-danger) 20%, transparent), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--ui-card-bg);
}

.flash-error::before {
  content: "!";
  background: var(--ui-danger);
  color: #fff;
}

.site-confirm-backdrop,
.roleplay-map-modal-backdrop {
  backdrop-filter: blur(16px);
}

.site-confirm-dialog {
  gap: 14px;
  border-color: var(--ui-card-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.15), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg-strong), rgba(10, 11, 15, 0.98));
}

.site-confirm-kicker {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid var(--ui-card-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  letter-spacing: 0;
}

.site-confirm-dialog p {
  color: var(--text);
  opacity: 0.92;
}

.site-confirm-close {
  border-radius: 50%;
}

.site-confirm-actions {
  padding-top: 4px;
}

.notifications-page .notification-card,
.notifications-page .notifications-filters,
.notifications-page .notifications-type-section {
  border-color: var(--ui-card-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-soft-glow);
}

.notifications-page .notification-card-fresh {
  border-color: color-mix(in srgb, var(--accent-strong) 48%, transparent);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.34),
    0 0 0 1px color-mix(in srgb, var(--accent-strong) 18%, transparent);
}

.notifications-page .notifications-filter-row {
  gap: 8px;
}

.notifications-page .notifications-filter-chip,
.notifications-page .notifications-head-filter {
  min-height: 36px;
  border-radius: 999px;
  border-color: var(--ui-card-border);
}

.notifications-page .notification-card .news-actions,
.notifications-page .notification-card .news-links {
  gap: 8px;
}

body.theme-blueanime .flash-banner,
body.theme-blueanime .flash-success,
body.theme-blueanime .flash-error {
  background:
    radial-gradient(circle at top left, rgba(95, 187, 255, 0.13), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    var(--ui-card-bg);
}

body.theme-blueanime .site-confirm-dialog {
  background:
    radial-gradient(circle at top right, rgba(95, 187, 255, 0.16), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg-strong), rgba(6, 13, 26, 0.98));
}

@media (max-width: 720px) {
  .flash-banner,
  .flash-success,
  .flash-error {
    min-height: 42px;
    margin-bottom: 10px;
    padding: 11px 12px 11px 40px;
    border-radius: 13px;
    font-size: 0.92rem;
  }

  .flash-banner::before,
  .flash-success::before,
  .flash-error::before {
    left: 11px;
    top: 11px;
    width: 20px;
    height: 20px;
  }

  .site-confirm-dialog {
    gap: 12px;
    padding: 18px 14px;
    border-radius: 20px;
  }

  .site-confirm-dialog h2 {
    font-size: 1.28rem;
  }

  .site-confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-confirm-actions .button-secondary,
  .site-confirm-actions .button-danger {
    width: 100%;
  }

  .notifications-page .notifications-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notifications-page .notifications-filter-chip {
    justify-content: center;
    width: 100%;
    padding-inline: 9px;
  }
}

/* Design diary #20: battles and mission boards polish. */
.battle-page,
.roleplay-missions-page,
.mission-editor-page {
  gap: 16px;
}

.battle-section-panel,
.battle-page-hero,
.mission-form-section,
.mission-board-card {
  border-color: var(--ui-card-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-soft-glow);
}

.battle-page-hero,
.battle-section-panel {
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.08), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.battle-meta-grid,
.battle-participants,
.battle-team-picker-grid,
.battle-team-size-grid {
  gap: 10px;
}

.battle-meta-grid > div,
.battle-participant,
.battle-character-option,
.battle-result-participant-card,
.battle-technique-review-card,
.battle-post-resource-card {
  border-color: var(--ui-card-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.07), transparent 36%),
    rgba(255, 255, 255, 0.035);
}

.battle-participant.is-current-turn,
.battle-turn-order-item.is-current {
  border-color: color-mix(in srgb, var(--ui-success) 54%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--ui-success) 20%, transparent),
    0 14px 30px rgba(0, 0, 0, 0.24);
}

.battle-current-turn-badge,
.battle-status,
.battle-technique-status,
.battle-examiner-badge {
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0;
}

.battle-turn-order {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.battle-turn-order-item {
  flex: 0 0 auto;
  min-width: 150px;
  border-color: var(--ui-card-border);
  border-radius: 14px;
}

.battle-picker-spoiler,
.battle-judge-tools-spoiler {
  border-color: var(--ui-card-border);
  border-radius: var(--ui-radius);
  background: linear-gradient(135deg, var(--ui-card-bg), rgba(255, 255, 255, 0.025));
}

.battle-picker-spoiler summary,
.battle-judge-tools-spoiler > summary {
  min-height: 46px;
  padding: 12px 15px;
  border-radius: calc(var(--ui-radius) - 2px);
}

.battle-reply-form,
.battle-form-panel,
.battle-equipment-picker,
.battle-technique-picker,
.battle-vitals-adjust-panel,
.battle-technique-review-panel {
  border-color: var(--ui-card-border);
}

.battle-technique-grid,
.battle-equipment-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.battle-technique-option span,
.battle-technique-used,
.battle-equipment-option {
  border-color: var(--ui-card-border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.battle-technique-option span:hover,
.battle-technique-used:hover,
.battle-equipment-option:hover {
  border-color: var(--ui-card-border-hover);
  transform: translateY(-1px);
}

.battle-technique-option input:checked + span {
  border-color: color-mix(in srgb, var(--accent-strong) 56%, transparent);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.16), transparent 36%),
    rgba(255, 138, 28, 0.10);
}

.battle-technique-review-actions,
.battle-review-action-group,
.battle-hp-review-actions {
  gap: 8px;
}

.battle-review-action-group,
.battle-review-hp-field,
.battle-review-target-field,
.battle-focus-chakra-field {
  min-width: 0;
}

.battle-post-list {
  gap: 12px;
}

.battle-post {
  border-color: var(--ui-card-border);
  border-radius: var(--ui-radius);
  background:
    radial-gradient(circle at top left, rgba(255, 179, 71, 0.055), transparent 32%),
    var(--ui-card-bg);
}

.battle-post header {
  gap: 8px;
}

.battle-post p {
  line-height: 1.62;
}

#battle-inline-assistant-status,
#battle-inline-assistant-result {
  border-color: var(--ui-card-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.035);
}

#battle-inline-assistant-result {
  max-height: min(56vh, 560px);
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.mission-editor-form {
  gap: 14px;
}

.mission-form-section {
  padding: clamp(14px, 2vw, 20px);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.075), transparent 36%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.mission-form-section h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.mission-form-section h2::before {
  content: "";
  width: 9px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent-strong) 28%, transparent);
}

.mission-checkbox-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
}

.mission-form-actions {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  padding: 10px;
  border: 1px solid var(--ui-card-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--ui-card-bg-strong) 92%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: var(--ui-soft-glow);
}

.mission-board-card {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.08), transparent 36%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.mission-board-card .roleplay-card-body {
  gap: 10px;
}

.mission-board-card p {
  line-height: 1.55;
}

.mission-board-card .profile-badges {
  gap: 7px;
}

.mission-board-card .profile-badge {
  min-height: 28px;
  padding-inline: 10px;
}

.mission-review-form {
  border-color: var(--ui-card-border);
  border-radius: var(--ui-radius);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.035);
}

body.theme-blueanime .battle-page-hero,
body.theme-blueanime .battle-section-panel,
body.theme-blueanime .mission-form-section,
body.theme-blueanime .mission-board-card {
  background:
    radial-gradient(circle at top right, rgba(95, 187, 255, 0.11), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.025));
}

body.theme-blueanime .battle-technique-option input:checked + span {
  border-color: rgba(125, 211, 252, 0.62);
  background:
    radial-gradient(circle at top right, rgba(95, 187, 255, 0.18), transparent 36%),
    rgba(74, 163, 255, 0.11);
}

@media (max-width: 720px) {
  .battle-page,
  .roleplay-missions-page,
  .mission-editor-page {
    gap: 12px;
  }

  .battle-page-hero,
  .battle-section-panel,
  .mission-form-section {
    padding: 13px;
  }

  .battle-meta-grid,
  .battle-participants,
  .battle-team-picker-grid,
  .battle-team-size-grid,
  .mission-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .battle-turn-order {
    margin-inline: -2px;
  }

  .battle-turn-order-item {
    min-width: 132px;
  }

  .battle-technique-grid,
  .battle-equipment-grid {
    grid-template-columns: 1fr;
  }

  .battle-technique-review-actions,
  .battle-review-action-group,
  .battle-hp-review-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .battle-review-action-group > *,
  .battle-hp-review-actions > *,
  .battle-technique-review-actions > * {
    width: 100%;
  }

  .battle-post {
    padding: 13px;
  }

  .battle-post p {
    line-height: 1.56;
  }

  #battle-inline-assistant-result {
    max-height: 52vh;
    padding: 12px;
  }

  .mission-form-section h2 {
    font-size: 1.08rem;
  }

  .mission-form-actions {
    bottom: 72px;
    display: grid;
    grid-template-columns: 1fr;
  }

  .mission-form-actions > * {
    width: 100%;
  }
}

/* Design diary #20: profile, artifact market and equipment sheet polish. */
.character-game-sheet,
.profile-page-legacy,
.artifact-page,
.artifact-section-page {
  gap: 16px;
}

.character-game-hero,
.profile-showcase-main,
.profile-showcase-side,
.artifact-page-hero,
.artifact-section-panel {
  border-color: var(--ui-card-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-soft-glow);
}

.character-game-hero,
.artifact-page-hero,
.artifact-section-panel {
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.08), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.character-game-avatar {
  border-color: var(--ui-card-border);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.30),
    0 0 0 1px rgba(255, 255, 255, 0.035);
}

.character-game-grid,
.character-inventory-grid,
.character-roleplay-inventory-grid {
  gap: 10px;
}

.character-game-field,
.character-roleplay-inventory-item,
.character-roleplay-mission-rank,
.character-battle-card,
.character-mission-rank {
  border-color: var(--ui-card-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.065), transparent 36%),
    rgba(255, 255, 255, 0.035);
}

.character-game-field strong,
.character-roleplay-inventory-item strong,
.character-mission-rank strong,
.character-battle-card strong {
  letter-spacing: 0;
}

.character-game-traits,
.character-equipment-inline {
  gap: 8px;
}

.character-equipment-inline strong,
.character-equipment-inline span,
.artifact-meta-list span,
.artifact-slot small,
.artifact-property-badge,
.artifact-set-hint {
  border-radius: 999px;
}

.character-artifact-board {
  border: 1px solid var(--ui-card-border);
  border-radius: 22px;
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.character-artifact-board::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 65% 34%, rgba(255, 220, 150, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.12));
}

.character-artifact-board-slot {
  border-color: color-mix(in srgb, var(--accent-strong) 36%, transparent);
  background:
    radial-gradient(circle, rgba(255, 229, 171, 0.28), rgba(22, 13, 7, 0.78) 54%, rgba(2, 2, 5, 0.84));
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.20),
    0 0 20px color-mix(in srgb, var(--accent-strong) 22%, transparent),
    inset 0 0 18px rgba(0, 0, 0, 0.46);
}

.character-artifact-board-slot img {
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.55));
}

.character-artifact-board-stat {
  border-color: rgba(58, 37, 18, 0.28);
  background: rgba(244, 217, 172, 0.78);
  color: #2e1b0e;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.12);
}

.character-artifact-board-stat strong,
.character-artifact-board-stat span {
  color: #2e1b0e !important;
}

.character-artifact-board-stat strong {
  font-size: 0.88rem;
}

.character-artifact-board-stat span {
  font-size: 0.74rem;
}

.character-artifact-board-sets {
  border-color: var(--ui-card-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.10), transparent 36%),
    rgba(8, 9, 13, 0.72);
  backdrop-filter: blur(8px);
}

.artifact-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  align-items: start;
}

.artifact-card,
.artifact-detail,
.artifact-slot,
.artifact-admin-item-group,
.artifact-property-group,
.artifact-card-mastery {
  border-color: var(--ui-card-border);
  border-radius: var(--ui-radius);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.075), transparent 36%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.artifact-card {
  min-height: 0;
  overflow: hidden;
}

.artifact-card-media,
.artifact-detail-media {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background:
    radial-gradient(circle, rgba(255, 179, 71, 0.10), transparent 54%),
    rgba(0, 0, 0, 0.34);
}

.artifact-card-media img,
.artifact-detail-media img,
.artifact-detail > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.artifact-card-body {
  gap: 10px;
}

.artifact-card-body h3 {
  line-height: 1.2;
}

.artifact-card-body p,
.artifact-detail-text p {
  line-height: 1.56;
}

.artifact-card-no-media {
  max-width: 420px;
}

.artifact-property-badge-list,
.artifact-set-hint-list,
.artifact-meta-list {
  gap: 7px;
}

.artifact-property-badge,
.artifact-set-hint {
  border-color: var(--ui-card-border);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.055);
}

.artifact-property-target {
  opacity: 0.82;
}

.artifact-inventory-slot-groups,
.artifact-property-group-list,
.artifact-set-item-picker {
  display: grid;
  gap: 10px;
}

.artifact-inventory-slot-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 260px));
  justify-content: start;
  align-items: start;
}

.artifact-inventory-slot-group > summary,
.artifact-admin-item-group > summary,
.artifact-property-group > summary,
.artifact-create-spoiler > summary {
  min-height: 44px;
  border-radius: calc(var(--ui-radius) - 2px);
}

.artifact-set-item-picker-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.artifact-set-picker-group {
  padding: 0;
  overflow: hidden;
}

.artifact-set-picker-group > summary {
  padding: 12px 14px;
}

.artifact-set-admin-body,
.artifact-create-spoiler-body {
  gap: 12px;
  padding: 12px;
}

.artifact-market-form {
  gap: 8px;
}

.artifact-market-form input {
  min-width: 0;
}

body.theme-blueanime .character-game-hero,
body.theme-blueanime .artifact-page-hero,
body.theme-blueanime .artifact-section-panel,
body.theme-blueanime .artifact-card,
body.theme-blueanime .artifact-detail,
body.theme-blueanime .artifact-slot,
body.theme-blueanime .artifact-admin-item-group,
body.theme-blueanime .artifact-property-group {
  background:
    radial-gradient(circle at top right, rgba(95, 187, 255, 0.11), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.025));
}

body.theme-blueanime .character-artifact-board-slot {
  border-color: rgba(125, 211, 252, 0.36);
  background:
    radial-gradient(circle, rgba(169, 225, 255, 0.26), rgba(11, 31, 55, 0.78) 54%, rgba(2, 8, 18, 0.86));
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.20),
    0 0 20px rgba(95, 187, 255, 0.20),
    inset 0 0 18px rgba(0, 0, 0, 0.46);
}

body.theme-blueanime .character-artifact-board-stat {
  border-color: rgba(70, 119, 170, 0.32);
  background: rgba(218, 239, 255, 0.82);
  color: #132b45;
}

body.theme-blueanime .character-artifact-board-stat strong,
body.theme-blueanime .character-artifact-board-stat span {
  color: #132b45 !important;
}

@media (max-width: 720px) {
  .character-game-sheet,
  .profile-page-legacy,
  .artifact-page,
  .artifact-section-page {
    gap: 12px;
  }

  .character-game-hero,
  .artifact-page-hero,
  .artifact-section-panel {
    padding: 13px;
  }

  .character-game-grid,
  .character-inventory-grid,
  .character-roleplay-inventory-grid,
  .artifact-grid,
  .artifact-slot-grid {
    grid-template-columns: 1fr;
  }

  .artifact-inventory-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .artifact-card-no-media {
    max-width: none;
  }

  .artifact-card-media,
  .artifact-detail-media {
    max-height: 240px;
  }

  .character-artifact-board {
    border-radius: 16px;
  }

  .character-artifact-board-stat strong {
    font-size: 0.78rem;
  }

  .character-artifact-board-stat span {
    font-size: 0.66rem;
  }

  .artifact-set-item-picker-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .artifact-inventory-slot-grid {
    grid-template-columns: 1fr;
  }
}

/* Design diary #20: chat, private messages and diaries polish. */
.chat-page,
.messages-page,
.diary-page,
.diaries-page,
.profile-diaries-page {
  gap: 16px;
}

.chat-panel,
.chat-composer,
.chat-monolith,
.messages-sidebar,
.messages-thread,
.messages-page-telegram .messages-sidebar,
.messages-page-telegram .messages-thread,
.messages-telegram-thread-shell,
.diary-card,
.home-diary-card,
.diary-share-panel,
.diary-share-card,
.comments-card,
.comment-card {
  border-color: var(--ui-card-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-soft-glow);
}

.chat-panel,
.chat-composer,
.messages-sidebar,
.messages-thread,
.diary-card,
.home-diary-card,
.comments-card {
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.075), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.chat-room-head,
.chat-panel-head,
.chat-composer-head,
.messages-sidebar-head,
.messages-thread-head,
.messages-thread-head-telegram {
  gap: 10px;
}

.chat-live-pill,
.chat-mode-pill,
.chat-submit-state,
.messages-page-badge,
.messages-unread-badge,
.diary-privacy-badge {
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0;
}

.chat-feed,
.chat-feed-modern,
.chat-feed-flow,
.messages-thread-feed,
.messages-thread-feed-telegram {
  gap: 10px;
  scrollbar-width: thin;
}

.chat-message,
.chat-bubble-body,
.message-bubble-card,
.message-bubble-telegram .message-bubble-card,
.chat-pinned-message {
  border-color: var(--ui-card-border);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.065), transparent 36%),
    rgba(255, 255, 255, 0.035);
}

.chat-bubble.own .chat-bubble-body,
.message-bubble.is-own .message-bubble-card,
.message-bubble-telegram.is-own .message-bubble-card {
  border-color: color-mix(in srgb, var(--accent-strong) 34%, transparent);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.12), transparent 36%),
    rgba(255, 138, 28, 0.08);
}

.chat-meta,
.message-bubble-meta {
  gap: 7px;
  flex-wrap: wrap;
}

.chat-text,
.message-bubble-text,
.comment-body,
.diary-card-body,
.diary-content {
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.chat-text img,
.message-bubble-text img,
.comment-body img,
.diary-content img {
  max-width: min(100%, 720px);
  height: auto;
  border-radius: 12px;
}

.chat-reply-quote,
.chat-reply-composer,
.chat-reply-alert,
.diary-reply-composer {
  border-color: var(--ui-card-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.04);
}

.chat-pinned-message {
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
}

.chat-pinned-message::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
}

.chat-pinned-label,
.chat-pinned-mark {
  border-radius: 999px;
  letter-spacing: 0;
}

.chat-pinned-text {
  line-height: 1.45;
}

.chat-actions,
.messages-form-actions,
.comment-form-actions {
  gap: 8px;
}

.chat-form textarea,
.messages-form textarea,
.messages-form-telegram textarea,
.comment-form textarea {
  min-height: 108px;
}

.bb-toolbar-spoiler {
  border-color: var(--ui-card-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.bb-toolbar-spoiler > summary {
  min-height: 42px;
  border-radius: 13px;
}

.bb-toolbar {
  gap: 6px;
}

.bb-tool,
.bb-help-link {
  min-height: 34px;
  border-radius: 10px;
}

.sticker-emoji-panel {
  border-color: var(--ui-card-border) !important;
}

.messages-shell,
.messages-shell-telegram {
  gap: 14px;
}

.messages-conversations {
  gap: 8px;
}

.messages-conversation-card,
.messages-conversation-card-telegram {
  border-color: var(--ui-card-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.messages-conversation-card:hover,
.messages-conversation-card.is-active,
.messages-conversation-card-telegram:hover,
.messages-conversation-card-telegram.is-active {
  border-color: var(--ui-card-border-hover);
}

.messages-conversation-card.has-unread,
.messages-conversation-card-telegram.has-unread {
  border-color: color-mix(in srgb, var(--ui-success) 44%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ui-success) 16%, transparent);
}

.messages-pagination,
.chat-pagination {
  gap: 8px;
}

.messages-pagination-pages,
.chat-pagination-pages {
  gap: 5px;
}

.chat-page-link,
.chat-page-gap {
  min-width: 34px;
  min-height: 34px;
  border-radius: 10px;
}

.diary-card,
.home-diary-card {
  overflow: hidden;
}

.diary-card h2,
.diary-card h3,
.home-diary-card h3 {
  line-height: 1.2;
}

.diary-share-panel,
.diary-pinned-panel,
.diary-poll-card,
.diary-poll-choice {
  border-color: var(--ui-card-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.075), transparent 36%),
    rgba(255, 255, 255, 0.035);
}

.diary-share-selected,
.diary-share-suggest {
  gap: 8px;
}

.comment-list {
  gap: 10px;
}

.comment-card {
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.06), transparent 36%),
    rgba(255, 255, 255, 0.035);
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.theme-blueanime .chat-panel,
body.theme-blueanime .chat-composer,
body.theme-blueanime .messages-sidebar,
body.theme-blueanime .messages-thread,
body.theme-blueanime .diary-card,
body.theme-blueanime .home-diary-card,
body.theme-blueanime .comments-card {
  background:
    radial-gradient(circle at top right, rgba(95, 187, 255, 0.11), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.025));
}

body.theme-blueanime .chat-bubble.own .chat-bubble-body,
body.theme-blueanime .message-bubble.is-own .message-bubble-card,
body.theme-blueanime .message-bubble-telegram.is-own .message-bubble-card {
  border-color: rgba(125, 211, 252, 0.38);
  background:
    radial-gradient(circle at top right, rgba(95, 187, 255, 0.16), transparent 36%),
    rgba(74, 163, 255, 0.10);
}

@media (max-width: 720px) {
  .chat-page,
  .messages-page,
  .diary-page,
  .diaries-page,
  .profile-diaries-page {
    gap: 12px;
  }

  .chat-panel,
  .chat-composer,
  .messages-sidebar,
  .messages-thread,
  .diary-card,
  .home-diary-card,
  .comments-card {
    border-radius: 14px;
  }

  .chat-room-head,
  .chat-panel-head,
  .chat-composer-head,
  .messages-sidebar-head,
  .messages-thread-head,
  .messages-thread-head-telegram {
    align-items: stretch;
  }

  .chat-message,
  .chat-bubble-body,
  .message-bubble-card,
  .message-bubble-telegram .message-bubble-card,
  .chat-pinned-message {
    border-radius: 13px;
  }

  .chat-form textarea,
  .messages-form textarea,
  .messages-form-telegram textarea,
  .comment-form textarea {
    min-height: 96px;
  }

  .chat-actions,
  .messages-form-actions,
  .comment-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chat-actions > *,
  .messages-form-actions > *,
  .comment-form-actions > * {
    width: 100%;
  }

  .sticker-emoji-tools,
  .chat-actions .sticker-emoji-tools,
  .messages-form-actions .sticker-emoji-tools {
    width: auto;
    justify-self: start;
  }

  .messages-conversation-card,
  .messages-conversation-card-telegram {
    padding: 10px;
  }

  .messages-pagination,
  .chat-pagination {
    display: grid;
    grid-template-columns: 1fr;
  }

  .messages-pagination-pages,
  .chat-pagination-pages {
    justify-content: center;
  }

  .chat-page-link,
  .chat-page-gap {
    min-width: 32px;
    min-height: 32px;
  }
}

/* Design diary #20: technique school, feeds and ad blocks polish. */
.technique-page,
.technique-school-page,
.technique-editor-page,
.home-page,
.news-section,
.roleplay-page {
  gap: 16px;
}

.technique-page-hero,
.technique-school-hero,
.technique-card-modern,
.technique-rank-card,
.technique-form-section,
.technique-filter-form,
.news-card,
.news-article-card,
.home-highlight,
.roleplay-menu-list-item,
.donate-sidebar-section,
.donate-widget-frame,
.buzzplayer-1324342,
.buzzplayer-1324524 {
  border-color: var(--ui-card-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-soft-glow);
}

.technique-page-hero,
.technique-school-hero,
.technique-card-modern,
.technique-rank-card,
.technique-form-section,
.news-card,
.news-article-card,
.home-highlight {
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.075), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.technique-school-grid,
.technique-grid,
.technique-subcategory-grid,
.news-grid {
  gap: 14px;
  align-items: start;
}

.technique-card-modern,
.technique-rank-card {
  overflow: hidden;
}

.technique-card-modern .character-modern-image,
.technique-rank-image,
.technique-image {
  border-radius: 14px;
  background:
    radial-gradient(circle, rgba(255, 179, 71, 0.10), transparent 54%),
    rgba(0, 0, 0, 0.30);
}

.technique-card-modern h2,
.technique-rank-card h2,
.technique-rank-card h3 {
  line-height: 1.2;
}

.technique-description,
.technique-card-modern p,
.technique-rank-card p,
.news-excerpt,
.news-article-body {
  line-height: 1.58;
}

.technique-card-meta,
.technique-requirement-badges,
.technique-stat-requirements,
.technique-mark-badges,
.news-counters,
.news-links,
.news-actions {
  gap: 7px;
}

.technique-card-meta .profile-badge,
.technique-requirement-badges .profile-badge,
.technique-scroll-price-bar,
.technique-stat-chip,
.news-pill,
.news-badge {
  border-radius: 999px;
}

.technique-scroll-price-bar,
.technique-stat-requirement-panel {
  border-color: var(--ui-card-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.035);
}

.technique-mark-badge,
.technique-mark-admin-icon,
.technique-mark-tile img {
  width: 42px;
  height: 42px;
}

.technique-mark-badge {
  border-color: var(--ui-card-border);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.18), transparent 28%),
    rgba(13, 26, 43, 0.72);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.technique-mark-badge img {
  width: 36px;
  height: 36px;
}

.technique-filter-form {
  padding: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.075), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.technique-filter-form details.profile-field {
  border-color: var(--ui-card-border);
  border-radius: 14px;
}

.technique-filter-form details.profile-field > summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.technique-filter-checkbox-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 9px;
}

.technique-filter-checkbox-tile {
  border-color: var(--ui-card-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.technique-filter-checkbox-tile:has(input[type="checkbox"]:checked) {
  border-color: color-mix(in srgb, var(--accent-strong) 58%, transparent);
}

.technique-form-actions {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  padding: 10px;
  border: 1px solid var(--ui-card-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--ui-card-bg-strong) 92%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: var(--ui-soft-glow);
}

.news-card {
  overflow: hidden;
}

.news-card h3,
.news-card h3 a,
.news-article-page h1 {
  line-height: 1.2;
}

.news-card-head,
.news-actions,
.news-links {
  align-items: center;
}

.news-pill,
.news-like-button,
.news-links > .button-secondary,
.news-links > .button,
.news-links > .button-danger {
  min-height: 34px;
  border-radius: 999px;
}

.news-cover-image {
  border-radius: 16px;
  border: 1px solid var(--ui-card-border);
  box-shadow: var(--ui-soft-glow);
}

.roleplay-menu-list {
  gap: 10px;
}

.roleplay-menu-list-item {
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.075), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

.roleplay-menu-list-item:hover {
  border-color: var(--ui-card-border-hover);
}

.roleplay-menu-art {
  border-color: var(--ui-card-border);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.16), transparent 30%),
    rgba(255, 138, 28, 0.10);
}

.roleplay-menu-badges span {
  border-radius: 999px;
}

.donate-widget-frame,
.buzzplayer-1324342,
.buzzplayer-1324524 {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.10), transparent 34%),
    rgba(255, 255, 255, 0.035);
}

.donate-sidebar-section {
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.10), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.02));
}

body.theme-blueanime .technique-page-hero,
body.theme-blueanime .technique-school-hero,
body.theme-blueanime .technique-card-modern,
body.theme-blueanime .technique-rank-card,
body.theme-blueanime .technique-form-section,
body.theme-blueanime .technique-filter-form,
body.theme-blueanime .news-card,
body.theme-blueanime .news-article-card,
body.theme-blueanime .home-highlight,
body.theme-blueanime .roleplay-menu-list-item,
body.theme-blueanime .donate-sidebar-section {
  background:
    radial-gradient(circle at top right, rgba(95, 187, 255, 0.11), transparent 34%),
    linear-gradient(145deg, var(--ui-card-bg), rgba(255, 255, 255, 0.025));
}

body.theme-blueanime .technique-filter-checkbox-tile:has(input[type="checkbox"]:checked) {
  border-color: rgba(125, 211, 252, 0.62);
}

body.theme-blueanime .roleplay-menu-art {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.15), transparent 30%),
    rgba(74, 163, 255, 0.12);
}

@media (max-width: 720px) {
  .technique-page,
  .technique-school-page,
  .technique-editor-page,
  .home-page,
  .news-section,
  .roleplay-page {
    gap: 12px;
  }

  .technique-school-grid,
  .technique-grid,
  .technique-subcategory-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .technique-filter-form {
    padding: 11px;
  }

  .technique-filter-checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technique-filter-checkbox-tile {
    min-height: 42px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .technique-mark-badge,
  .technique-mark-admin-icon,
  .technique-mark-tile img {
    width: 40px;
    height: 40px;
  }

  .technique-form-actions {
    bottom: 72px;
    display: grid;
    grid-template-columns: 1fr;
  }

  .technique-form-actions > * {
    width: 100%;
  }

  .news-actions,
  .news-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .news-links > * {
    width: 100%;
  }

  .roleplay-menu-list-item {
    padding: 12px;
  }

  .roleplay-menu-copy strong {
    font-size: 1rem;
  }
}

@media (max-width: 420px) {
  .technique-filter-checkbox-grid {
    grid-template-columns: 1fr;
  }
}
/* Artifact stats and configurable property colors */
.artifact-property-badge {
    --artifact-property-color: #60a5fa;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    border-color: color-mix(in srgb, var(--artifact-property-color) 58%, transparent) !important;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--artifact-property-color) 42%, transparent), transparent 48%),
        linear-gradient(135deg, color-mix(in srgb, var(--artifact-property-color) 34%, rgba(255, 255, 255, 0.06)), color-mix(in srgb, var(--artifact-property-color) 13%, rgba(255, 255, 255, 0.055))) !important;
    color: color-mix(in srgb, var(--artifact-property-color) 34%, #fff7df) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 16px color-mix(in srgb, var(--artifact-property-color) 14%, transparent);
}

.artifact-property-badge-image {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.24);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--artifact-property-color) 52%, rgba(255, 255, 255, 0.22));
}

.artifact-property-badge-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artifact-property-image-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin: 2px 0 8px;
    padding: 7px 9px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.86rem;
}

.artifact-property-image-preview img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.artifact-stat-badge {
    border-color: color-mix(in srgb, var(--artifact-stat-color, #f8c36a) 58%, transparent) !important;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--artifact-stat-color, #f8c36a) 22%, rgba(255, 255, 255, 0.035)), rgba(255, 255, 255, 0.045)) !important;
    color: color-mix(in srgb, var(--artifact-stat-color, #f8c36a) 38%, #fff8e7) !important;
}

.stat-color-density,
.artifact-stat-density { --stat-color: #f97373; --artifact-stat-color: #f97373; }
.stat-color-speed,
.artifact-stat-speed { --stat-color: #38d7a4; --artifact-stat-color: #38d7a4; }
.stat-color-intellect,
.artifact-stat-intellect { --stat-color: #8fb8ff; --artifact-stat-color: #8fb8ff; }
.stat-color-control,
.artifact-stat-control { --stat-color: #d48cff; --artifact-stat-color: #d48cff; }

.stat-color-density,
.stat-color-speed,
.stat-color-intellect,
.stat-color-control {
    --artifact-stat-color: var(--stat-color);
    color: color-mix(in srgb, var(--stat-color) 48%, var(--text, #fff7df));
}

.profile-badge.stat-color-density,
.profile-badge.stat-color-speed,
.profile-badge.stat-color-intellect,
.profile-badge.stat-color-control,
.technique-stat-chip.stat-color-density,
.technique-stat-chip.stat-color-speed,
.technique-stat-chip.stat-color-intellect,
.technique-stat-chip.stat-color-control,
.battle-character-stats .stat-color-density,
.battle-character-stats .stat-color-speed,
.battle-character-stats .stat-color-intellect,
.battle-character-stats .stat-color-control,
.character-roleplay-parameter-card.stat-color-density,
.character-roleplay-parameter-card.stat-color-speed,
.character-roleplay-parameter-card.stat-color-intellect,
.character-roleplay-parameter-card.stat-color-control,
.character-roleplay-biology-item.stat-color-density,
.character-roleplay-biology-item.stat-color-speed,
.character-roleplay-biology-item.stat-color-intellect,
.character-roleplay-biology-item.stat-color-control,
.character-card-stat.stat-color-density,
.character-card-stat.stat-color-speed,
.character-card-stat.stat-color-intellect,
.character-card-stat.stat-color-control,
.profile-field.stat-color-density,
.profile-field.stat-color-speed,
.profile-field.stat-color-intellect,
.profile-field.stat-color-control,
.character-editor-grid > label.stat-color-density,
.character-editor-grid > label.stat-color-speed,
.character-editor-grid > label.stat-color-intellect,
.character-editor-grid > label.stat-color-control,
.profile-form-grid > label.stat-color-density,
.profile-form-grid > label.stat-color-speed,
.profile-form-grid > label.stat-color-intellect,
.profile-form-grid > label.stat-color-control {
    border-color: color-mix(in srgb, var(--stat-color) 48%, var(--ui-card-border, rgba(255, 255, 255, 0.12))) !important;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--stat-color) 18%, transparent), transparent 42%),
        linear-gradient(135deg, color-mix(in srgb, var(--stat-color) 12%, rgba(255, 255, 255, 0.04)), rgba(255, 255, 255, 0.035)) !important;
    color: color-mix(in srgb, var(--stat-color) 38%, var(--text, #fff7df)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 14px color-mix(in srgb, var(--stat-color) 12%, transparent);
}

.stat-color-density strong,
.stat-color-density span,
.stat-color-density em,
.stat-color-speed strong,
.stat-color-speed span,
.stat-color-speed em,
.stat-color-intellect strong,
.stat-color-intellect span,
.stat-color-intellect em,
.stat-color-control strong,
.stat-color-control span,
.stat-color-control em,
.stat-color-density .character-card-stat-code,
.stat-color-density .character-card-stat-value,
.stat-color-speed .character-card-stat-code,
.stat-color-speed .character-card-stat-value,
.stat-color-intellect .character-card-stat-code,
.stat-color-intellect .character-card-stat-value,
.stat-color-control .character-card-stat-code,
.stat-color-control .character-card-stat-value,
.technique-stat-chip.stat-color-density .technique-stat-chip-code,
.technique-stat-chip.stat-color-density .technique-stat-chip-level,
.technique-stat-chip.stat-color-speed .technique-stat-chip-code,
.technique-stat-chip.stat-color-speed .technique-stat-chip-level,
.technique-stat-chip.stat-color-intellect .technique-stat-chip-code,
.technique-stat-chip.stat-color-intellect .technique-stat-chip-level,
.technique-stat-chip.stat-color-control .technique-stat-chip-code,
.technique-stat-chip.stat-color-control .technique-stat-chip-level {
    color: color-mix(in srgb, var(--stat-color) 48%, var(--text, #fff7df)) !important;
}

.character-artifact-board-stat.artifact-stat-density,
.character-artifact-board-stat.artifact-stat-speed,
.character-artifact-board-stat.artifact-stat-intellect,
.character-artifact-board-stat.artifact-stat-control {
    border-color: color-mix(in srgb, var(--artifact-stat-color) 58%, rgba(58, 37, 18, 0.28)) !important;
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--artifact-stat-color) 28%, transparent), transparent 62%),
        linear-gradient(145deg, color-mix(in srgb, var(--artifact-stat-color) 18%, rgba(244, 217, 172, 0.82)), rgba(244, 217, 172, 0.78)) !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 235, 0.28),
        0 0 14px color-mix(in srgb, var(--artifact-stat-color) 18%, transparent),
        0 7px 16px rgba(0, 0, 0, 0.12) !important;
}

.character-artifact-board-stat.artifact-stat-density strong,
.character-artifact-board-stat.artifact-stat-speed strong,
.character-artifact-board-stat.artifact-stat-intellect strong,
.character-artifact-board-stat.artifact-stat-control strong {
    color: color-mix(in srgb, var(--artifact-stat-color) 42%, #160c08) !important;
}

.character-artifact-board-stat.artifact-stat-density span,
.character-artifact-board-stat.artifact-stat-speed span,
.character-artifact-board-stat.artifact-stat-intellect span,
.character-artifact-board-stat.artifact-stat-control span {
    color: color-mix(in srgb, var(--artifact-stat-color) 56%, #102517) !important;
}

.artifact-color-field {
    gap: 8px;
}

.artifact-color-field input[type="color"] {
    width: 46px;
    min-height: 38px;
    padding: 3px;
    border-radius: 10px;
    cursor: pointer;
}

.artifact-color-field input[type="text"] {
    max-width: 120px;
    text-transform: uppercase;
}

/* Character sheet stat cards and main tab layout. */
.character-roleplay-parameter-grid,
.character-roleplay-biology-grid,
.character-roleplay-derived-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.character-derived-stats-spoiler .character-roleplay-biology-item,
.character-derived-stats-spoiler .character-roleplay-parameter-card-derived {
    min-height: 0;
    padding: 11px 12px;
    border-left: 4px solid color-mix(in srgb, var(--stat-color, var(--accent-strong)) 76%, transparent);
    text-align: left;
}

.character-derived-stats-spoiler .character-roleplay-biology-item span,
.character-derived-stats-spoiler .character-roleplay-parameter-card-derived > span {
    margin-bottom: 5px;
    color: color-mix(in srgb, var(--stat-color, var(--accent-strong)) 66%, var(--text));
    font-weight: 900;
}

.character-derived-stats-spoiler .character-roleplay-biology-item strong,
.character-derived-stats-spoiler .character-roleplay-biology-item em,
.character-derived-stats-spoiler .character-roleplay-parameter-card-derived > em {
    display: inline-flex;
    width: fit-content;
    margin: 0 6px 0 0;
    padding: 7px 9px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--stat-color, var(--accent-strong)) 18%, rgba(255, 255, 255, 0.045));
    color: color-mix(in srgb, var(--stat-color, var(--accent-strong)) 70%, var(--text));
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.2;
}

.character-derived-stats-spoiler .character-roleplay-biology-item em {
    margin-top: 7px;
    font-style: normal;
}

.character-roleplay-page .character-roleplay-hero-main {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px 12px;
}

.character-roleplay-page .character-roleplay-hero-main .character-roleplay-top {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "avatar"
        "meta"
        "main";
    gap: 6px;
}

.character-roleplay-page .character-roleplay-hero-main .character-roleplay-side {
    grid-area: avatar;
    justify-items: center;
}

.character-roleplay-page .character-roleplay-hero-main .character-roleplay-headline {
    margin-bottom: 8px;
    text-align: center;
}

.character-roleplay-page .character-roleplay-hero-main .character-roleplay-avatar {
    width: min(150px, 54vw);
    height: min(150px, 54vw);
    object-fit: cover;
}

.character-roleplay-page .character-roleplay-hero-main .character-roleplay-side-strip {
    grid-area: meta;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
}

.character-roleplay-page .character-roleplay-side-item,
.character-roleplay-page .character-roleplay-tag,
.character-roleplay-page .character-roleplay-parameter-card,
.character-roleplay-page .character-roleplay-biology-item,
.character-roleplay-page .character-roleplay-parameter-card-derived,
.character-roleplay-page .profile-info-item {
    min-height: 0 !important;
    padding: 1px 3px !important;
}

.character-roleplay-page .character-roleplay-side-item span,
.character-roleplay-page .character-roleplay-tag span,
.character-roleplay-page .character-roleplay-parameter-card span,
.character-roleplay-page .character-roleplay-biology-item span,
.character-roleplay-page .character-roleplay-parameter-card-derived > span,
.character-roleplay-page .profile-info-item span {
    margin-bottom: 2px;
    line-height: 1.12;
}

.character-roleplay-page .character-roleplay-side-item strong,
.character-roleplay-page .character-roleplay-tag strong,
.character-roleplay-page .character-roleplay-parameter-card strong,
.character-roleplay-page .character-roleplay-biology-item strong,
.character-roleplay-page .character-roleplay-parameter-card-derived > strong,
.character-roleplay-page .profile-info-item strong {
    line-height: 1.12;
}

.character-roleplay-page .character-roleplay-hero-main .character-roleplay-main {
    grid-area: main;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 4px;
    width: 100%;
}

.character-roleplay-page .character-roleplay-hero-main .character-roleplay-status-grid,
.character-roleplay-page .character-roleplay-hero-main .character-roleplay-resource-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 1fr;
    gap: 4px;
}

.character-roleplay-page .character-roleplay-hero-main .character-roleplay-status-grid {
    grid-column: 1;
}

.character-roleplay-page .character-roleplay-hero-main .character-roleplay-resource-grid {
    grid-column: 2;
}

.character-roleplay-page .character-roleplay-resource-level,
.character-roleplay-page .character-roleplay-resource-xp,
.character-roleplay-page .character-roleplay-resource-salary,
.character-roleplay-page .character-roleplay-salary-form {
    display: none !important;
}

.character-roleplay-page .character-roleplay-resource-ryo,
.character-roleplay-page .character-roleplay-resource-stat-scroll,
.character-roleplay-page .character-roleplay-resource-technique-scroll,
.character-roleplay-page .character-roleplay-progress-card-exp,
.character-roleplay-page .character-roleplay-progress-card-life,
.character-roleplay-page .character-roleplay-progress-card-chakra {
    grid-column: auto !important;
}

.character-roleplay-page .character-roleplay-resource-card,
.character-roleplay-page .character-roleplay-progress-card {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.character-roleplay-page .character-roleplay-resource-card {
    min-height: 48px !important;
    padding: 1px 3px 1px 54px !important;
}

.character-roleplay-page .character-roleplay-resource-card .character-roleplay-resource-icon,
.character-roleplay-page .character-roleplay-resource-icon {
    position: absolute;
    left: 1px !important;
    top: 50%;
    width: 50px !important;
    height: 50px !important;
    object-fit: contain;
    transform: translateY(-50%);
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.48));
}

.character-roleplay-page .character-roleplay-resource-stat-scroll .character-roleplay-resource-icon,
.character-roleplay-page .character-roleplay-resource-technique-scroll .character-roleplay-resource-icon {
    width: 54px !important;
    height: 54px !important;
}

.character-roleplay-page .character-roleplay-resource-card span {
    margin-bottom: 1px;
    font-size: 0.72rem;
    line-height: 1.12;
}

.character-roleplay-page .character-roleplay-resource-card strong {
    font-size: 0.9rem;
    line-height: 1.12;
}

.character-roleplay-page .character-roleplay-resource-card em {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1.12;
}

.character-roleplay-page .character-roleplay-resource-ryo {
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
}

.character-roleplay-page .character-roleplay-resource-ryo .character-roleplay-resource-icon {
    justify-self: start;
}

.character-roleplay-page .character-roleplay-resource-ryo span,
.character-roleplay-page .character-roleplay-resource-ryo strong,
.character-roleplay-page .character-roleplay-resource-ryo em {
    width: 100%;
    text-align: center;
}

.character-roleplay-page .character-roleplay-ryo-salary-form {
    margin-top: 4px;
}

.character-roleplay-page .character-roleplay-ryo-salary-form .button-secondary {
    width: 100%;
    min-height: 24px;
    padding: 3px 6px;
    font-size: 0.68rem;
}

.character-roleplay-page .character-roleplay-status-grid .character-roleplay-progress-card,
.character-roleplay-page .character-roleplay-progress-card {
    min-height: 46px !important;
    padding: 1px 3px 1px 47px !important;
}

.character-roleplay-page .character-roleplay-progress-icon {
    position: absolute;
    left: 1px !important;
    top: 50%;
    width: 48px !important;
    height: 48px !important;
    object-fit: contain;
    transform: translateY(-50%);
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.46));
}

.character-roleplay-page .character-roleplay-progress-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 4px;
    align-items: center;
}

.character-roleplay-page .character-roleplay-progress-head,
.character-roleplay-page .character-roleplay-progress-meta {
    gap: 4px;
    line-height: 1.12;
}

.character-roleplay-page .character-roleplay-progress-head strong,
.character-roleplay-page .character-roleplay-progress-meta strong {
    justify-self: start;
    text-align: left;
}

.character-roleplay-page .character-roleplay-progress-bar {
    height: 5px;
    margin: 2px 0;
}

.character-roleplay-progress-card-exp .character-roleplay-progress-bar i {
    background: linear-gradient(90deg, #f3a92e, #ffe36b 56%, #fff4a8);
    box-shadow: 0 0 18px rgba(255, 214, 76, 0.36);
}

.character-roleplay-progress-card-life .character-roleplay-progress-bar i {
    background: linear-gradient(90deg, #b8142f, #ff4056 58%, #ff9aa5);
    box-shadow: 0 0 18px rgba(255, 64, 86, 0.36);
}

.character-roleplay-progress-card-chakra .character-roleplay-progress-bar i {
    background: linear-gradient(90deg, #1377ff, #26c8ff 58%, #a8f1ff);
    box-shadow: 0 0 18px rgba(38, 200, 255, 0.36);
}

.character-roleplay-page .character-roleplay-side-item-village,
.character-roleplay-page .character-roleplay-rank-item,
.character-roleplay-page .character-roleplay-level-item,
.character-roleplay-page .character-roleplay-side-strip > .character-roleplay-side-item:not(.character-roleplay-side-item-village):not(.character-roleplay-rank-item):not(.character-roleplay-level-item) {
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
}

.character-roleplay-page .character-roleplay-side-strip > .character-roleplay-side-item:not(.character-roleplay-side-item-village):not(.character-roleplay-rank-item):not(.character-roleplay-level-item) > span,
.character-roleplay-page .character-roleplay-side-strip > .character-roleplay-side-item:not(.character-roleplay-side-item-village):not(.character-roleplay-rank-item):not(.character-roleplay-level-item) > strong {
    display: block;
    width: 100%;
    text-align: center;
}

.character-roleplay-page .character-roleplay-side-strip > .character-roleplay-side-item:not(.character-roleplay-side-item-village):not(.character-roleplay-rank-item):not(.character-roleplay-level-item) > span {
    justify-self: center;
    text-align: center;
}

.character-roleplay-page .character-roleplay-side-item-village > span {
    order: 1;
}

.character-roleplay-page .character-roleplay-side-item-village .character-roleplay-village-protector {
    order: 2;
    width: min(100%, 96px);
    height: auto;
    max-height: 46px;
    margin: 1px auto;
    object-fit: contain;
}

.character-roleplay-page .character-roleplay-side-item-village > strong {
    order: 3;
}

.character-roleplay-page .character-roleplay-rank-item > span {
    display: block;
    margin-bottom: 1px;
}

.character-roleplay-page .character-roleplay-rank-badge {
    display: grid;
    width: 100%;
    min-height: 76px;
    place-items: center;
}

.character-roleplay-page .character-roleplay-rank-badge::before {
    display: none;
}

.character-roleplay-page .character-roleplay-rank-badge img {
    display: block;
}

.character-roleplay-page .character-roleplay-rank-badge em {
    display: none;
}

.character-roleplay-page .character-roleplay-rank-item .character-rank-icon-small {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: min(100%, 96px);
    height: 76px;
    object-fit: contain;
    margin: 0;
    transform: none !important;
}

.character-roleplay-page .character-roleplay-level-icon {
    width: 58px;
    height: 58px;
    object-fit: contain;
    margin: 0 auto 1px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.42));
}

.character-rank-select-preview {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
    margin: 0 0 6px;
}

.village-protector-picker {
    display: grid;
    gap: 10px;
}

.village-protector-presets {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.village-protector-preset {
    display: grid;
    gap: 5px;
    justify-items: center;
    align-content: center;
    min-height: 86px;
    padding: 8px 6px;
    border: 1px solid rgba(255, 179, 71, 0.24);
    border-radius: 8px;
    background: rgba(12, 16, 8, 0.72);
    color: var(--text);
    cursor: pointer;
}

.village-protector-preset:hover,
.village-protector-preset.is-active {
    border-color: rgba(255, 179, 71, 0.68);
    box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.22), 0 12px 24px rgba(0, 0, 0, 0.28);
}

.village-protector-preset img {
    width: 76px;
    height: 38px;
    object-fit: contain;
}

.village-protector-preset span {
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
}

@media (max-width: 720px) {
    .character-roleplay-parameter-grid,
    .character-roleplay-biology-grid,
    .character-roleplay-derived-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .character-roleplay-page .character-roleplay-hero-main {
        width: 100%;
        padding: 12px;
    }

    .character-roleplay-page .character-roleplay-hero-main .character-roleplay-main {
        grid-auto-flow: row;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .character-roleplay-page .character-roleplay-hero-main .character-roleplay-status-grid,
    .character-roleplay-page .character-roleplay-hero-main .character-roleplay-resource-grid {
        grid-column: 1;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .character-roleplay-page .character-roleplay-hero-main .character-roleplay-side-strip {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .character-roleplay-page .character-roleplay-side-item,
    .character-roleplay-page .character-roleplay-resource-card,
    .character-roleplay-page .character-roleplay-progress-card {
        width: 100%;
    }

    .village-protector-presets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .character-derived-stats-spoiler .character-roleplay-biology-item,
    .character-derived-stats-spoiler .character-roleplay-parameter-card-derived {
        padding: 9px;
    }

    .character-derived-stats-spoiler .character-roleplay-biology-item span,
    .character-derived-stats-spoiler .character-roleplay-parameter-card-derived > span {
        font-size: 0.78rem;
    }

    .character-derived-stats-spoiler .character-roleplay-biology-item strong,
    .character-derived-stats-spoiler .character-roleplay-biology-item em,
    .character-derived-stats-spoiler .character-roleplay-parameter-card-derived > em {
        padding: 6px 7px;
        font-size: 0.78rem;
    }
}

@media (max-width: 430px) {
    .village-protector-presets {
        grid-template-columns: 1fr;
    }
}

/* Final left-spoiler compact block lock. */
.profile-info-item,
.character-game-field,
.character-roleplay-page .character-roleplay-side-item,
.character-roleplay-page .character-roleplay-tag,
.character-roleplay-page .character-roleplay-counter-card,
.character-roleplay-page .character-roleplay-progress-card,
.character-roleplay-page .character-roleplay-parameter-card,
.character-roleplay-page .character-roleplay-biology-item,
.character-roleplay-page .character-roleplay-parameter-card-derived {
    position: relative;
    overflow: hidden;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background:
        linear-gradient(90deg, rgba(255, 145, 38, 0.18) 0, rgba(255, 145, 38, 0.07) 32px, rgba(255, 255, 255, 0.028) 68px, rgba(0, 0, 0, 0.12) 100%) !important;
}

.profile-info-item::before,
.character-game-field::before,
.character-roleplay-page .character-roleplay-side-item::before,
.character-roleplay-page .character-roleplay-tag::before,
.character-roleplay-page .character-roleplay-counter-card::before,
.character-roleplay-page .character-roleplay-progress-card::before,
.character-roleplay-page .character-roleplay-parameter-card::before,
.character-roleplay-page .character-roleplay-biology-item::before,
.character-roleplay-page .character-roleplay-parameter-card-derived::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0 !important;
    width: 6px;
    border-radius: inherit;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    background:
        linear-gradient(180deg, rgba(255, 214, 126, 0.95), var(--accent) 46%, rgba(132, 60, 12, 0.7));
    box-shadow: 0 0 14px rgba(255, 138, 0, 0.26);
    pointer-events: none;
    z-index: 0;
}

.profile-info-item::after,
.character-game-field::after,
.character-roleplay-page .character-roleplay-side-item::after,
.character-roleplay-page .character-roleplay-tag::after,
.character-roleplay-page .character-roleplay-counter-card::after,
.character-roleplay-page .character-roleplay-progress-card::after,
.character-roleplay-page .character-roleplay-parameter-card::after,
.character-roleplay-page .character-roleplay-biology-item::after,
.character-roleplay-page .character-roleplay-parameter-card-derived::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(255, 210, 138, 0.42), transparent);
    pointer-events: none;
    z-index: 0;
}

.profile-info-item > *,
.character-game-field > *,
.character-roleplay-page .character-roleplay-side-item > *,
.character-roleplay-page .character-roleplay-tag > *,
.character-roleplay-page .character-roleplay-counter-card > *,
.character-roleplay-page .character-roleplay-progress-card > *,
.character-roleplay-page .character-roleplay-parameter-card > *,
.character-roleplay-page .character-roleplay-biology-item > *,
.character-roleplay-page .character-roleplay-parameter-card-derived > * {
    position: relative;
    z-index: 1;
}

/* Final double-sided spoiler blocks without layout overlays. */
.profile-info-item,
.character-game-field,
.character-roleplay-page .character-roleplay-side-item,
.character-roleplay-page .character-roleplay-tag,
.character-roleplay-page .character-roleplay-counter-card,
.character-roleplay-page .character-roleplay-progress-card,
.character-roleplay-page .character-roleplay-parameter-card,
.character-roleplay-page .character-roleplay-biology-item,
.character-roleplay-page .character-roleplay-parameter-card-derived {
    overflow: visible !important;
    background:
        linear-gradient(90deg, rgba(255, 191, 92, 0.86) 0 5px, transparent 5px),
        linear-gradient(270deg, rgba(255, 191, 92, 0.86) 0 5px, transparent 5px),
        linear-gradient(90deg, rgba(255, 145, 38, 0.16) 0, rgba(255, 145, 38, 0.065) 42px, rgba(255, 255, 255, 0.028) 50%, rgba(255, 145, 38, 0.065) calc(100% - 42px), rgba(255, 145, 38, 0.16) 100%) !important;
}

.profile-info-item::before,
.profile-info-item::after,
.character-game-field::before,
.character-game-field::after,
.character-roleplay-page .character-roleplay-side-item::before,
.character-roleplay-page .character-roleplay-side-item::after,
.character-roleplay-page .character-roleplay-tag::before,
.character-roleplay-page .character-roleplay-tag::after,
.character-roleplay-page .character-roleplay-counter-card::before,
.character-roleplay-page .character-roleplay-counter-card::after,
.character-roleplay-page .character-roleplay-progress-card::before,
.character-roleplay-page .character-roleplay-progress-card::after,
.character-roleplay-page .character-roleplay-parameter-card::before,
.character-roleplay-page .character-roleplay-parameter-card::after,
.character-roleplay-page .character-roleplay-biology-item::before,
.character-roleplay-page .character-roleplay-biology-item::after,
.character-roleplay-page .character-roleplay-parameter-card-derived::before,
.character-roleplay-page .character-roleplay-parameter-card-derived::after {
    content: none !important;
    display: none !important;
}

/* Compact block content breathing room. */
.profile-info-item,
.character-game-field,
.character-roleplay-page .character-roleplay-side-item,
.character-roleplay-page .character-roleplay-tag,
.character-roleplay-page .character-roleplay-counter-card,
.character-roleplay-page .character-roleplay-progress-card,
.character-roleplay-page .character-roleplay-parameter-card,
.character-roleplay-page .character-roleplay-biology-item,
.character-roleplay-page .character-roleplay-parameter-card-derived {
    padding-left: max(7px, var(--compact-block-pad-left, 7px)) !important;
    padding-right: max(7px, var(--compact-block-pad-right, 7px)) !important;
}

.profile-info-item span,
.character-game-field span,
.character-roleplay-page .character-roleplay-side-item span,
.character-roleplay-page .character-roleplay-tag span,
.character-roleplay-page .character-roleplay-counter-card span,
.character-roleplay-page .character-roleplay-parameter-card span,
.character-roleplay-page .character-roleplay-biology-item span,
.character-roleplay-page .character-roleplay-parameter-card-derived > span {
    font-size: clamp(0.66rem, 0.62rem + 0.18vw, 0.78rem) !important;
    line-height: 1.08 !important;
}

.profile-info-item strong,
.character-game-field strong,
.character-roleplay-page .character-roleplay-side-item strong,
.character-roleplay-page .character-roleplay-tag strong,
.character-roleplay-page .character-roleplay-counter-card strong,
.character-roleplay-page .character-roleplay-parameter-card strong,
.character-roleplay-page .character-roleplay-biology-item strong,
.character-roleplay-page .character-roleplay-parameter-card-derived > strong,
.character-roleplay-page .character-roleplay-parameter-card-derived > em {
    font-size: clamp(0.72rem, 0.66rem + 0.22vw, 0.9rem) !important;
    line-height: 1.08 !important;
}

.character-roleplay-page .character-roleplay-resource-card {
    min-height: 44px !important;
    padding: 2px 8px 2px 46px !important;
}

.character-roleplay-page .character-roleplay-resource-card .character-roleplay-resource-icon,
.character-roleplay-page .character-roleplay-resource-icon {
    left: 7px !important;
    width: 38px !important;
    height: 38px !important;
}

.character-roleplay-page .character-roleplay-resource-stat-scroll .character-roleplay-resource-icon,
.character-roleplay-page .character-roleplay-resource-technique-scroll .character-roleplay-resource-icon {
    width: 42px !important;
    height: 42px !important;
}

.character-roleplay-page .character-roleplay-progress-icon {
    width: 34px !important;
    height: 34px !important;
}

.character-roleplay-page .character-roleplay-rank-item .character-rank-icon-small {
    width: min(100%, 84px) !important;
    height: 64px !important;
}
/* Final BB image upload controls. */
.bb-upload-image-input {
    display: none !important;
}

.bb-upload-image-tool {
    min-width: 54px;
}

.bb-standalone-upload {
    display: flex;
    justify-content: flex-start;
    margin: 6px 0 0;
}

.bb-standalone-upload .bb-upload-image-tool {
    width: auto;
    min-height: 30px;
    padding: 5px 10px;
    font-size: 12px;
}

/* Final Telegram-like compact composer tools. */
.sticker-emoji-tools {
    align-items: center !important;
    display: inline-flex !important;
    gap: 4px !important;
}

.sticker-emoji-toggle,
.sticker-attachment-toggle {
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--muted) !important;
    box-shadow: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    font-size: 22px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
}

.sticker-emoji-toggle:hover,
.sticker-attachment-toggle:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: var(--text) !important;
    transform: none !important;
}

.sticker-attachment-toggle svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
}

.sticker-attachment-input {
    display: none !important;
}

.bb-toolbar .bb-upload-image-tool {
    display: none !important;
}

.bb-standalone-upload {
    margin-top: 4px !important;
}

.bb-standalone-upload .sticker-attachment-toggle {
    width: 34px !important;
    height: 34px !important;
}

body.theme-blueanime .sticker-emoji-toggle,
body.theme-blueanime .sticker-attachment-toggle {
    background: transparent !important;
    color: rgba(218, 239, 255, 0.76) !important;
}

body.theme-blueanime .sticker-emoji-toggle:hover,
body.theme-blueanime .sticker-attachment-toggle:hover {
    background: rgba(95, 187, 255, 0.1) !important;
    color: #eaf8ff !important;
}
