.rules_card {
    padding: 20px;
    background: var(--card);
    border-radius: var(--br-16);
    min-height: 100px;
}
.rules_card-options {
    display: flex;
    gap: 10px;
}
.rules_card-header {
    padding: 1rem 1.5rem;
    color: var(--text-custom);
    font-size: 16px;
    font-weight: var(--font-weight-6);
    background: var(--transparent-3-w);
    border-radius: var(--br-16) var(--br-16) 0 0;
}
.rules_header {
    position: relative;
    padding-block: 5rem;
    text-align: center;
    background: var(--card);
    border-radius: var(--br-16);
    border: 1px solid var(--transparent-5-w);
    overflow: hidden;
}
.rules_header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--span-middle), transparent 80%);
    z-index: 0;
    opacity: 0;
    animation: headerGlow 8s ease-in-out infinite alternate;
    filter: blur(10px);
}
@keyframes headerGlow {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.5; transform: scale(1.1); }
}
.rules_header h5,
.rules_header h6 {
    position: relative;
    z-index: 2;
}
.rules_header h5 {
    font-family: var(--font-family-1);
    font-weight: var(--font-weight-8);
    color: var(--text-default);
    font-size: var(--font-size-5xl);
    text-transform: uppercase;
    margin: 0;
}
.rules_header h6 {
    font-weight: var(--font-weight-6);
    font-size: var(--font-size-l);
    color: var(--text-custom);
}
.rules_header_right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    margin-top: 18px;
}
.rules_last_updated {
    font-size: 13px;
    font-weight: var(--font-weight-5);
    white-space: nowrap;
    color: var(--text-custom);
    opacity: .7;
}
.time_short_text {
    position: relative;
    z-index: 3;
    margin-top: 15px;
    padding-top: 12px;
    text-align: right;
    color: var(--text-custom);
    opacity: .7;
}
.rules_menu-header {
    font-weight: var(--font-weight-7);
    font-family: var(--font-family-1);
    color: var(--text-custom);
    margin: 5px 0 12px;
    display: flex;
    gap: 10px;
}
.rules_menu-btns {
    display: grid;
    gap: 4px;
}
.rules_menu-btns a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--button);
    border-radius: var(--br-8);
    font-weight: var(--font-weight-5);
    color: var(--text-default);
    cursor: pointer;
    transition: .2s ease-in-out;
}
.rules_menu-btns a:hover {
    background: var(--button-hover);
}
.rules_menu_icon {
    align-items: center;
    justify-content: center;
}
.rules_menu_icon svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}
.rules_menu_label {
    flex: 1;
}
.rules_active {
    background: var(--span) !important;
}
.rules_block {
    display: none;
    gap: 10px;
    width: 100%;
}
.rules_block.active {
    display: grid;
}
.rules_title {
    font-family: var(--font-family-1);
    color: var(--text-default);
    font-size: 22px;
    font-weight: var(--font-weight-7);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}
.rules_text {
    padding: 10px 15px;
    line-height: 1.6;
    color: var(--text-default);
    background: var(--transparent-3-w);
    border-radius: var(--br-6);
}
.rules_text.no-bg,
.punishment-no-bg,
.number-no-bg {
    background: transparent !important;
    padding: 0 !important;
    text-align: left !important;
    border-radius: 0;
}
.rules_text_line {
    margin-bottom: 9px;
    font-size: var(--font-size-m);
}
.rules_text .rules_number {
    font-weight: var(--font-weight-7);
    font-size: 15px;
    color: var(--text-default);
    background: var(--span-10);
    border-radius: var(--br-6);
    text-align: center;
    width: max-content;
    padding: 2px 8px;
    margin-right: 8px;
}
.rules_text .rules_number:empty {
    display: none;
}
.rules_text_punishment {
    display: inline-block;
    font-weight: var(--font-weight-6);
    color: var(--red);
    background: var(--red-10);
    border-radius: var(--br-8);
    width: max-content;
    padding: 2px 8px;
    font-size: 14px;
}
.rules_export {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: var(--button);
    border: 1px solid var(--transparent-10-w);
    border-radius: var(--br-6);
    height: 41px;
    color: var(--text-custom);
    font-size: var(--font-size-m);
    font-weight: var(--font-weight-5);
    gap: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    transition: all .2s ease;
}
.rules_export:hover {
    background: var(--button-hover);
    color: var(--text-default);
}
.rules_export svg {
    fill: currentColor;
    height: 1.2rem;
    width: 1.2rem;
}
.rules_import-preview {
    display: block;
    margin-top: 15px;
    padding: 15px;
    background: var(--transparent-3-w);
    border-radius: var(--br-12);
    max-height: 400px;
    overflow-y: auto;
}
.rules_import-preview.visible {
    display: block;
}
.rules_import-preview-header {
    font-weight: 600;
    margin-bottom: 10px;
}
.rules_import-preview-stats {
    font-size: 13px;
    color: var(--text-custom);
    margin-bottom: 10px;
}
.rules_import-preview-list {
    display: grid;
    gap: 8px;
}
.rules_import-preview-item {
    background: var(--transparent-2-w);
    padding: 8px 12px;
    border-radius: var(--br-6);
}
.rules_import-preview-item-name {
    font-weight: var(--font-weight-6);
    margin-bottom: 4px;
}
.rules_import-preview-item-count {
    font-size: 13px;
    color: var(--text-custom);
}
.rules_import-preview-item-rules {
    font-size: 12px;
    color: var(--text-custom);
    opacity: 0.7;
    margin-top: 4px;
}
.rules_file-upload {
    justify-content: space-between;
}
.rules_file-info {
    flex: 1;
    font-size: 13px;
    opacity: 0.7;
    padding-left: 8px;
}
.rules_file-info.loaded {
    opacity: 1;
    color: var(--green);
}
.rulesopt_card-categories {
    position: sticky;
    top: 20px;
    z-index: 10;
}
.rulesopt_categories {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
}
.rulesopt_categories-wrapper {
    padding: 0;
    flex-shrink: 0;
}
.rulesopt_rules-wrapper {
    padding: 0;
    flex: 1;
}
.rulesopt_category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    background: var(--transparent-5-w);
    border-radius: var(--br-8);
    cursor: pointer;
    transition: all .2s ease;
}
.rulesopt_category-active {
    background: var(--span) !important;
}
.rulesopt_category:hover {
    background: var(--transparent-10-w);
}
.rulesopt_category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.rulesopt_category-drag {
    font-size: 18px;
    cursor: grab;
    opacity: .5;
}
.rulesopt_category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rulesopt_category-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.rulesopt_category-name {
    flex: 1;
}
.rulesopt_category-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--br-6);
    cursor: pointer;
    transition: all .2s ease;
}
.rulesopt_category-edit:hover {
    background: var(--transparent-2-w);
}
.rulesopt_category-edit svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
}
.rulesopt_rules-block {
    display: none;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
    overflow-x: auto;
}
.rulesopt_rules-block-active {
    display: grid;
}
.rulesopt_rule {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 16px;
    background: var(--transparent-2-w);
    border-radius: var(--br-8);
    transition: .2s;
    width: auto;
    min-width: 0;
}
.rulesopt_removed {
    opacity: .5;
}
.rulesopt_text {
    color: var(--text-default);
    font-size: var(--font-size-m);
}
.rulesopt_text_punishment {
    color: var(--red);
    font-weight: var(--font-weight-6);
}
.rulesopt_rule-content {
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}
.rulesopt_rule-left {
    display: flex;
    gap: 12px;
    flex: 1;
    align-items: flex-start;
}
.rulesopt_rule-drag {
    margin-top: 2px;
    font-size: 16px;
    cursor: grab;
    opacity: .4;
}
.rulesopt_rule-number {
    margin-top: 2px;
    min-width: 24px;
    font-size: var(--font-size-l);
    font-weight: var(--font-weight-8);
    color: var(--span);
}
.rules_content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.rulesopt_rule .rules_text {
    font-size: 14px;
    color: var(--text-default);
}
.rulesopt_rule .rules_text_punishment {
    font-size: 13px;
    font-weight: var(--font-weight-6);
    color: var(--red);
}
.rulesopt_rule-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 2px;
    border-radius: var(--br-8);
    background: var(--red-10);
    cursor: pointer;
    flex-shrink: 0;
    transition: all .2s ease;
    opacity: 1 !important;
}
.rulesopt_rule-delete:hover {
    background: var(--red-20);
}
.rulesopt_rule-delete svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: var(--red);
    transition: all .2s ease;
}
.rulesopt_rule-delete.marked svg {
    fill: var(--green);
}
.rulesopt_rule-delete.marked {
    background: color-mix(in srgb, var(--green) 10%, transparent 90%) !important;
}
.rulesopt_rule-delete.marked:hover {
    background: color-mix(in srgb, var(--green) 20%, transparent 80%) !important;
}
.rulesopt_rule-fields {
    max-height: 0;
    overflow: hidden;
    width: 100%;
    border-top: 0 solid var(--transparent-5-w);
    transition: max-height 0.3s ease, border-top-width 0.3s ease;
    padding: 0 10px;
}
.rulesopt_rule.editing .rulesopt_rule-fields {
    max-height: 600px;
    border-top-width: 1px;
    padding-top: 10px;
}
.rulesopt_rule-fields .flex-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.rulesopt_rule-fields .inputs-inline {
    flex: 1;
    min-width: 150px;
}
.rulesopt_rule-fields .inputs-inline label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: var(--font-weight-5);
    color: var(--text-custom);
}
.rulesopt_addRule {
    width: 100%;
    padding: 10px;
    font-weight: 500;
    color: var(--span);
    background: transparent;
    border: 2px dashed var(--span-10);
    border-radius: var(--br-8);
    cursor: pointer;
    transition: all .2s ease;
}
.rulesopt_addRule:hover {
    background: var(--transparent-2-w);
    border-color: var(--span);
}
.rulesopt_placeholder {
    border: 2px dashed var(--span);
    border-radius: var(--br-8);
    background: var(--transparent-2-w);
    min-height: 50px;
    margin: 4px 0;
    transition: all 0.2s ease;
}
.rulesopt_dragging {
    position: fixed !important;
    pointer-events: none !important;
    z-index: 9999 !important;
    opacity: 0.9 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    background: var(--card) !important;
    border-radius: var(--br-8) !important;
    transition: none !important;
    width: auto !important;
}
.rulesopt_sortable_active {
    cursor: grabbing !important;
}
.rulesopt_sortable_active .rulesopt_placeholder {
    border-color: var(--span);
    background: var(--span-10);
}
.rulesopt_category,
.rulesopt_rule {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.rulesopt_category.rulesopt_dragging_source,
.rulesopt_rule.rulesopt_dragging_source {
    display: none !important;
}
.rulesopt_hint {
    display: block;
    font-weight: 400;
    opacity: 0.6;
    font-size: 12px;
    margin-top: 2px;
}