.thirteenp-counter-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.thirteenp-counter-modal.is-open {
    display: flex;
}

.thirteenp-counter-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.thirteenp-counter-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 20px 22px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.thirteenp-counter-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.thirteenp-counter-modal__title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
}

.thirteenp-counter-modal__notice {
    margin: 0 0 10px;
    font-size: 13px;
    color: #666;
}

.thirteenp-counter-modal__notice.is-error {
    color: #b32d2e;
}

.thirteenp-counter-modal__label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.thirteenp-counter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.thirteenp-counter-options__empty {
    color: #666;
}

.thirteenp-counter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.thirteenp-counter-option__label {
    font-size: 14px;
}

.thirteenp-counter-add {
    margin: 12px 0 16px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
}

.thirteenp-counter-add.is-hidden {
    display: none;
}

.thirteenp-counter-add__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.thirteenp-counter-add__row label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 180px;
}

.thirteenp-counter-add__row input {
    padding: 6px 8px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.thirteenp-counter-add__actions {
    text-align: right;
}

.thirteenp-counter-modal__actions {
    text-align: right;
}

.thirteenp-counter-modal__empty {
    margin: 0 0 16px;
    color: #666;
}
