.chapter-email-modal-backdrop,
.chapter-picker-modal-backdrop,
.chapter-pending-modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1100;
}

.chapter-pending-modal-backdrop {
    padding: 18px;
}

.chapter-email-modal-backdrop.open,
.chapter-picker-modal-backdrop.open,
.chapter-pending-modal-backdrop.open {
    display: flex;
}

.chapter-email-modal-card,
.chapter-picker-modal-card {
    width: min(980px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.chapter-pending-modal-card {
    width: min(640px, 100%);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.chapter-email-modal-head,
.chapter-picker-modal-head,
.chapter-pending-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #ddd;
}

.chapter-email-modal-body,
.chapter-picker-modal-body,
.chapter-pending-modal-body {
    padding: 20px;
}

.chapter-email-modal-copy {
    margin: 0 0 14px;
}

.chapter-email-modal-actions,
.chapter-pending-modal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.chapter-pending-modal-actions {
    margin-top: 18px;
}

.chapter-pending-modal-actions button,
.chapter-pending-modal-actions a {
    min-height: 40px;
}

.chapter-pending-modal-title {
    margin: 0;
    font-size: 24px;
    color: #600;
}

.chapter-pending-modal-name {
    margin: 8px 0 0;
}

.chapter-pending-modal-copy,
.chapter-pending-intro-copy {
    margin: 0;
    line-height: 1.75;
    color: #2f2923;
}

.chapter-empty-cell {
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
}

.chapter-status-note {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

.chapter-helper-copy {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.chapter-helper-copy--top,
.chapter-readonly-copy {
    margin-top: 6px;
}

.chapter-mini-action,
.chapter-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    text-decoration: none;
}

.chapter-mini-action svg,
.chapter-inline-action svg {
    width: 26px;
    height: 26px;
}

.chapter-inline-action-text {
    min-width: auto;
    padding: 0 14px;
    font-weight: 600;
}

.chapter-mini-action:hover,
.chapter-inline-action:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chapter-picker-tab {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-decoration: none;
    color: inherit;
}

.chapter-picker-tab.is-active {
    background: rgba(255, 255, 255, 0.1);
}

.chapter-picker-search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.chapter-picker-search input {
    flex: 1 1 220px;
}

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

.chapter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.chapter-editor-actions {
    margin-top: 18px;
}

.chapter-hidden-input {
    display: none;
}

.chapter-inline-form {
    display: inline;
    margin: 0;
}

.chapter-field-flush {
    margin-bottom: 0;
}

.chapter-actions-end {
    justify-content: flex-end;
}

.chapter-tools-between,
.chapter-pagination-between {
    justify-content: space-between;
}

.chapter-spacing-bottom {
    margin-bottom: 14px;
}

.chapter-spacing-top {
    margin-top: 16px;
}

.chapter-modal-copy-top {
    margin: 8px 0 0;
}

.chapter-modal-copy-tight {
    margin-bottom: 14px;
}

.chapter-modal-note {
    margin-top: 6px;
}

.chapter-request-list {
    display: grid;
    gap: 14px;
}

.chapter-request-card {
    border: 1px solid #dfd7cc;
    border-radius: 16px;
    padding: 16px 18px;
    background: #fff;
}

.chapter-request-card--pending {
    background: #fffcf4;
}

.chapter-request-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.chapter-request-title {
    margin: 0 0 6px;
    font-size: 20px;
}

.chapter-request-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border: 1px solid #d8c9a1;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chapter-request-pill--approved {
    background: #edf8ef;
    color: #1f6b2d;
    border-color: #b5dfbf;
}

.chapter-request-pill--denied {
    background: #fff3f3;
    color: #8a2424;
    border-color: #e7b2b2;
}

.chapter-request-pill--deleted {
    background: #f1f1f1;
    color: #555;
    border-color: #d0d0d0;
}

.chapter-request-pill--pending {
    background: #fff8e8;
    color: #8a5a00;
    border-color: #e7cd92;
}

.chapter-request-meta,
.chapter-account-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.chapter-account-summary {
    margin-top: 10px;
}

.chapter-request-meta {
    margin-top: 12px;
}

.chapter-request-motto,
.chapter-request-note {
    margin-top: 12px;
}

.chapter-request-motto {
    color: #2f2923;
}


.chapter-browser-location-status {
    margin: -4px 0 10px;
}

.chapter-status-copy {
    margin-top: -4px;
    line-height: 1.7;
}

.chapter-error-card {
    border: 1px solid #d58b8b;
    background: #fff4f4;
}

.chapter-error-flash {
    margin: 0;
}

@media (max-width: 720px) {
    .chapter-email-action-row,
    .chapter-email-modal-head,
    .chapter-email-modal-actions,
    .chapter-picker-modal-head,
    .chapter-picker-tabs,
    .chapter-picker-tools,
        .chapter-email-modal-actions button,
    .chapter-email-modal-actions .alt,
    .chapter-email-action-row button,
    .chapter-picker-search button,
    .chapter-picker-search input,
    .chapter-inline-action-text,
    .chapter-mini-action,
    .chapter-pending-modal-actions button,
    .chapter-pending-modal-actions a {
        width: 100%;
    }

}

@media (max-width: 640px) {
    .chapter-pending-modal-head,
    .chapter-pending-modal-actions {
        flex-direction: column;
    }
}
