.rsvp-settings-shell {
    min-height: 100svh;
    padding: 1rem;
    color: var(--ink, #3f4740);
    background:
        radial-gradient(circle at 100% 0%, rgb(203 221 225 / 58%), transparent 25rem),
        var(--cream, #fbf7ef);
}

.rsvp-settings-nav,
.rsvp-settings-header,
.rsvp-settings-grid,
.rsvp-settings-page-alert,
.rsvp-settings-shell > .rsvp-settings-success {
    width: min(100%, 82rem);
    margin-right: auto;
    margin-left: auto;
}

.rsvp-settings-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    gap: 0.8rem;
}

.rsvp-settings-nav strong {
    display: block;
    margin-top: 0.15rem;
    color: var(--sage-deep, #586c56);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
}

.rsvp-settings-eyebrow {
    color: var(--sage-deep, #586c56);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.rsvp-settings-secondary,
.rsvp-settings-primary {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.95rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.rsvp-settings-secondary {
    border: 1px solid #bcc1bd;
    color: var(--ink, #3f4740);
    background: rgb(255 253 249 / 75%);
}

.rsvp-settings-primary {
    border: 1px solid var(--sage-deep, #586c56);
    color: white;
    background: var(--sage-deep, #586c56);
}

.rsvp-settings-secondary:hover,
.rsvp-settings-secondary:focus-visible {
    border-color: var(--sage-deep, #586c56);
    color: var(--sage-deep, #586c56);
    background: white;
}

.rsvp-settings-primary:hover,
.rsvp-settings-primary:focus-visible {
    color: white;
    background: #485c47;
}

.rsvp-settings-primary:disabled,
.rsvp-settings-secondary:disabled {
    cursor: wait;
    opacity: 0.6;
}

.rsvp-settings-header {
    display: grid;
    margin-bottom: 1rem;
    padding: 1.4rem;
    border: 1px solid rgb(183 185 184 / 65%);
    border-radius: 1.25rem;
    background: var(--warm-white, #fffdf9);
    box-shadow: 0 1rem 3rem rgb(63 71 64 / 7%);
    gap: 1rem;
}

.rsvp-settings-header h1 {
    margin: 0.5rem 0 0.4rem;
    color: var(--sage-deep, #586c56);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 10vw, 3.6rem);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 1;
}

.rsvp-settings-event-date {
    margin: 0;
    color: #637067;
    font-size: 0.86rem;
    font-weight: 650;
}

.rsvp-settings-header-note {
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid #e2e4e2;
    color: #69746c;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.65;
}

.rsvp-settings-success {
    margin-bottom: 1rem;
    border-color: rgb(135 155 130 / 45%);
    color: var(--sage-deep, #586c56);
    background: rgb(135 155 130 / 15%);
}

.rsvp-settings-page-alert {
    margin-bottom: 1rem;
}

.rsvp-settings-grid,
.rsvp-settings-main {
    display: grid;
    gap: 1rem;
}

.rsvp-settings-panel,
.rsvp-settings-editor {
    padding: 1.2rem;
    border: 1px solid rgb(183 185 184 / 65%);
    border-radius: 1.2rem;
    background: var(--warm-white, #fffdf9);
    box-shadow: 0 1rem 3rem rgb(63 71 64 / 7%);
}

.rsvp-settings-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.rsvp-settings-section-heading h2 {
    margin: 0.28rem 0 0;
    color: var(--sage-deep, #586c56);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 7vw, 2rem);
    font-weight: 400;
}

.rsvp-settings-copy {
    margin: 0.65rem 0 1.1rem;
    color: #727c74;
    font-size: 0.84rem;
    line-height: 1.5;
}

.rsvp-settings-set-badge,
.rsvp-settings-count {
    flex: 0 0 auto;
    padding: 0.32rem 0.58rem;
    border-radius: 999px;
    color: #536a70;
    background: rgb(203 221 225 / 46%);
    font-size: 0.68rem;
    font-weight: 750;
}

.rsvp-settings-count {
    display: inline-grid;
    min-width: 2.25rem;
    min-height: 2.25rem;
    place-items: center;
    padding: 0;
}

.rsvp-settings-deadline-form {
    display: grid;
    gap: 1rem;
}

.rsvp-settings-deadline-form > div:first-child {
    min-width: 0;
}

.rsvp-settings-deadline-form .form-label,
.rsvp-settings-editor .form-label,
.rsvp-settings-options > legend {
    color: #4f5951;
    font-size: 0.86rem;
    font-weight: 750;
}

.rsvp-settings-editor .form-label span {
    color: #858d87;
    font-size: 0.72rem;
    font-weight: 500;
}

.rsvp-settings-deadline-form .form-control,
.rsvp-settings-editor .form-control,
.rsvp-settings-editor .form-select {
    min-height: 2.85rem;
    border-color: #c9cdca;
    border-radius: 0.72rem;
    color: var(--ink, #3f4740);
    background-color: #fffefa;
}

.rsvp-settings-editor textarea.form-control {
    min-height: 5.5rem;
    resize: vertical;
}

.rsvp-settings-deadline-form small {
    display: block;
    margin-top: 0.35rem;
    color: #7b847d;
    font-size: 0.72rem;
}

.rsvp-settings-deadline-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.rsvp-settings-text-action,
.rsvp-settings-icon-action,
.rsvp-settings-add-option {
    border: 0;
    border-radius: 0.35rem;
    color: var(--sage-deep, #586c56);
    background: transparent;
    font-size: 0.76rem;
    font-weight: 700;
}

.rsvp-settings-text-action {
    min-height: 2.4rem;
    padding: 0.35rem;
    text-decoration: underline;
    text-decoration-color: rgb(88 108 86 / 35%);
    text-underline-offset: 0.18rem;
}

.rsvp-settings-text-action.is-danger {
    color: #945f5a;
}

.rsvp-settings-text-action:disabled,
.rsvp-settings-icon-action:disabled,
.rsvp-settings-add-option:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.rsvp-settings-question-list {
    display: grid;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    gap: 0.75rem;
}

.rsvp-settings-question-card {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    padding: 0.9rem;
    border: 1px solid #dfe2df;
    border-radius: 0.9rem;
    background: #fffefa;
    gap: 0.65rem;
}

.rsvp-settings-question-card.is-editing {
    border-color: var(--sage, #879b82);
    box-shadow: 0 0 0 3px rgb(135 155 130 / 10%);
}

.rsvp-settings-question-position {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    border-radius: 50%;
    color: #5d7075;
    background: rgb(203 221 225 / 48%);
    font-size: 0.72rem;
    font-weight: 800;
}

.rsvp-settings-question-content {
    min-width: 0;
}

.rsvp-settings-question-topline,
.rsvp-settings-badges,
.rsvp-settings-question-actions,
.rsvp-settings-option-preview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.rsvp-settings-question-topline {
    align-items: flex-start;
    justify-content: space-between;
}

.rsvp-settings-badges span,
.rsvp-settings-response-count {
    padding: 0.25rem 0.46rem;
    border-radius: 999px;
    color: #5a6e73;
    background: rgb(203 221 225 / 42%);
    font-size: 0.62rem;
    font-weight: 750;
}

.rsvp-settings-badges .is-required {
    color: #65574e;
    background: #eee4da;
}

.rsvp-settings-response-count {
    flex: 0 0 auto;
    color: #747d76;
    background: #f0f1ef;
}

.rsvp-settings-response-count.has-responses {
    color: #53664f;
    background: rgb(135 155 130 / 15%);
}

.rsvp-settings-question-card h3 {
    margin: 0.7rem 0 0.25rem;
    color: var(--sage-deep, #586c56);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    font-weight: 400;
}

.rsvp-settings-question-card h3 + p {
    margin: 0;
    color: #737c75;
    font-size: 0.77rem;
    line-height: 1.45;
}

.rsvp-settings-option-preview {
    margin-top: 0.65rem;
}

.rsvp-settings-option-preview span {
    padding: 0.28rem 0.5rem;
    border: 1px solid #e0e3e0;
    border-radius: 999px;
    color: #657067;
    background: #faf9f5;
    font-size: 0.68rem;
}

.rsvp-settings-protection-note {
    margin: 0.7rem 0 0;
    padding: 0.55rem 0.65rem;
    border-left: 3px solid var(--sage, #879b82);
    color: #687368;
    background: rgb(135 155 130 / 9%);
    font-size: 0.7rem;
    line-height: 1.45;
}

.rsvp-settings-question-actions {
    margin-top: 0.7rem;
}

.rsvp-settings-icon-action {
    display: inline-grid;
    width: 2.4rem;
    height: 2.4rem;
    place-items: center;
    border: 1px solid #d7dbd7;
    background: #faf9f5;
    font-size: 1rem;
}

.rsvp-settings-saving {
    margin: 0.75rem 0 0;
    color: #66736a;
    font-size: 0.75rem;
}

.rsvp-settings-empty {
    padding: 2.75rem 1rem 2rem;
    color: #737c75;
    text-align: center;
}

.rsvp-settings-empty > span {
    display: inline-grid;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    border-radius: 50%;
    color: var(--ice-blue-deep, #7999a1);
    background: rgb(203 221 225 / 40%);
    font-size: 1.4rem;
}

.rsvp-settings-empty h3 {
    margin: 0.9rem 0 0.35rem;
    color: var(--sage-deep, #586c56);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
    font-weight: 400;
}

.rsvp-settings-empty p {
    max-width: 26rem;
    margin: 0 auto 1rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.rsvp-settings-editor {
    align-self: start;
}

.rsvp-settings-editor .rsvp-settings-section-heading {
    margin-bottom: 1rem;
}

.rsvp-settings-options {
    min-width: 0;
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
}

.rsvp-settings-options > legend {
    float: none;
    width: auto;
    margin-bottom: 0.2rem;
}

.rsvp-settings-options > p {
    margin: 0 0 0.65rem;
    color: #7a837c;
    font-size: 0.7rem;
    line-height: 1.4;
}

.rsvp-settings-option-list {
    display: grid;
    gap: 0.5rem;
}

.rsvp-settings-option-list > div {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.rsvp-settings-option-list input {
    min-width: 0;
    flex: 1;
}

.rsvp-settings-option-list button {
    width: 2.85rem;
    height: 2.85rem;
    flex: 0 0 auto;
    border: 1px solid #d3d7d3;
    border-radius: 0.7rem;
    color: #7b615d;
    background: #faf7f3;
    font-size: 1.2rem;
}

.rsvp-settings-add-option {
    min-height: 2.6rem;
    margin-top: 0.45rem;
    padding: 0.45rem 0.2rem;
}

.rsvp-settings-field-errors {
    margin-top: 0.4rem;
    color: #b02a37;
    font-size: 0.78rem;
}

.rsvp-settings-field-errors p {
    margin: 0.15rem 0;
}

.rsvp-settings-required-toggle {
    display: flex;
    min-height: 3.5rem;
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid #dfe2df;
    border-radius: 0.8rem;
    cursor: pointer;
    background: #fcfbf7;
    gap: 0.65rem;
}

.rsvp-settings-required-toggle .form-check-input {
    flex: 0 0 auto;
    margin-top: 0.18rem;
}

.rsvp-settings-required-toggle strong,
.rsvp-settings-required-toggle small {
    display: block;
}

.rsvp-settings-required-toggle strong {
    color: #4f5951;
    font-size: 0.83rem;
}

.rsvp-settings-required-toggle small {
    margin-top: 0.1rem;
    color: #78817a;
    font-size: 0.7rem;
}

.rsvp-settings-submit-question {
    width: 100%;
    margin-top: 1rem;
}

.rsvp-settings-deadline-form .form-control:focus,
.rsvp-settings-editor .form-control:focus,
.rsvp-settings-editor .form-select:focus,
.rsvp-settings-required-toggle:focus-within,
.rsvp-settings-option-list button:focus-visible,
.rsvp-settings-text-action:focus-visible,
.rsvp-settings-icon-action:focus-visible,
.rsvp-settings-add-option:focus-visible,
.rsvp-settings-secondary:focus-visible,
.rsvp-settings-primary:focus-visible,
#question-editor-title:focus-visible {
    border-color: var(--ice-blue-deep, #7999a1);
    outline: 3px solid rgb(121 153 161 / 28%);
    outline-offset: 2px;
    box-shadow: none;
}

.rsvp-settings-required-toggle .form-check-input:checked {
    border-color: var(--sage-deep, #586c56);
    background-color: var(--sage-deep, #586c56);
}

@media (min-width: 576px) {
    .rsvp-settings-shell {
        padding: 1.5rem;
    }

    .rsvp-settings-header,
    .rsvp-settings-panel,
    .rsvp-settings-editor {
        padding: 1.6rem;
    }

    .rsvp-settings-deadline-form {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    .rsvp-settings-deadline-actions {
        justify-content: flex-end;
    }
}

@media (min-width: 768px) {
    .rsvp-settings-header {
        grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.7fr);
        align-items: center;
        gap: 2rem;
    }

    .rsvp-settings-header-note {
        padding: 0 0 0 2rem;
        border-top: 0;
        border-left: 1px solid #e2e4e2;
    }
}

@media (min-width: 992px) {
    .rsvp-settings-shell {
        padding: 2.5rem;
    }

    .rsvp-settings-nav {
        margin-bottom: 2rem;
    }

    .rsvp-settings-grid {
        grid-template-columns: minmax(0, 1fr) 23rem;
        align-items: start;
        gap: 1.5rem;
    }

    .rsvp-settings-editor {
        position: sticky;
        top: 2rem;
        max-height: calc(100svh - 4rem);
        overflow-y: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rsvp-settings-shell *,
    .rsvp-settings-shell *::before,
    .rsvp-settings-shell *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
