html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.main-grid,
.subpage-wrap,
.panel-user-page,
.character-system-shell,
.character-system-body,
.character-system-workspace-panel,
.character-system-workspace-shell,
.character-system-workspace-body,
.panel-frame-shell,
.panel-frame-content {
    min-width: 0;
    max-width: 100%;
}

.character-system-chip-row,
.home-priority-actions,
.dashboard-character-actions,
.panel-user-actions,
#panelActions,
.mrshop-actions,
.mrshop-controls,
.checkout-actions,
.portal-service-list {
    flex-wrap: wrap;
    gap: 8px;
}

.character-system-chip,
.character-system-action,
.dashboard-character-actions a,
.dashboard-character-actions button,
#panelActions a,
#panelActions button,
.home-priority-actions .btn,
.mrshop-actions button,
.mrshop-controls button,
.checkout-actions a,
.checkout-actions button {
    min-height: 34px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

body.option-character_system .character-system-card-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    grid-template-columns: none;
    padding: 10px;
}

body.option-character_system .character-system-card {
    display: flex;
    flex: 0 0 122px;
    flex-direction: column;
    align-items: center;
    width: 122px;
    min-width: 122px;
    max-width: 122px;
    height: 142px;
    min-height: 142px;
    max-height: 142px;
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 2px;
    outline: 1px solid rgba(180, 210, 235, 0.18);
    background: #0a1116;
    box-shadow: none;
    overflow: hidden;
    text-align: center;
    transform: none;
}

body.option-character_system .character-system-card:hover,
body.option-character_system .character-system-card.is-selected {
    outline-color: rgba(201, 168, 76, 0.58);
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.14), 0 8px 18px rgba(0, 0, 0, 0.28);
    transform: none;
}

body.option-character_system .character-system-card-meta {
    order: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 122px;
    height: 17px;
    min-height: 17px;
    padding: 0 3px;
    background: rgba(10, 17, 22, 0.96);
}

body.option-character_system .character-system-card-meta strong {
    display: block;
    width: 100%;
    color: #d8e9f8;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.option-character_system .character-system-card-meta span,
body.option-character_system .character-system-card-facts,
body.option-character_system .character-system-card-note {
    display: none;
}

body.option-character_system .character-system-card-photo {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    height: 125px;
    min-height: 125px;
    max-height: 125px;
    margin: 0 auto;
    padding: 0;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    background: #5f88ad;
    overflow: hidden;
}

body.option-character_system .character-system-card-photo img {
    display: block;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    height: 125px;
    min-height: 125px;
    max-height: 125px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    object-fit: cover;
    object-position: center top;
}

body.option-character_system .character-system-card-photo.is-empty {
    flex-direction: column;
    gap: 8px;
    padding: 8px 7px;
    color: #c9dcec;
    background: #5f88ad;
}

body.option-character_system .character-system-card-photo.is-empty span {
    color: rgba(235, 244, 252, 0.72);
    font-size: 15px;
    line-height: 1.1;
}

body.option-character_system .character-system-card-photo.is-empty small,
body.option-character_system .character-system-card-photo.is-empty em {
    display: block;
    color: rgba(235, 244, 252, 0.58);
    font-size: 9px;
    font-style: normal;
    line-height: 1.22;
}

@media (max-width: 1080px) {
    .character-system-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .character-system-actions-panel {
        position: static;
    }

    .character-system-action-list,
    .portal-service-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (max-width: 720px) {
    .character-system-chip-row,
    .home-priority-actions,
    .dashboard-character-actions,
    .panel-user-actions,
    #panelActions,
    .mrshop-actions,
    .mrshop-controls,
    .checkout-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .character-system-chip,
    .character-system-action,
    .home-priority-actions .btn,
    .dashboard-character-actions a,
    .dashboard-character-actions button,
    #panelActions a,
    #panelActions button,
    .mrshop-actions button,
    .mrshop-controls button,
    .checkout-actions a,
    .checkout-actions button {
        width: 100%;
    }

    body.option-character_system .character-system-card-grid {
        justify-content: center;
        padding: 10px 6px;
    }

    .character-system-selected {
        grid-template-columns: minmax(0, 1fr);
        text-align: center;
    }

    .character-system-stat-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    body.option-character_system .character-system-card-grid {
        gap: 8px;
    }

    .character-system-stat-list {
        grid-template-columns: minmax(0, 1fr);
    }
}