.remainder-main {
    padding: 56px 0 72px;
}

.remainder-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 32px;
}

.remainder-hero {
    margin-bottom: 24px;
}

.remainder-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.remainder-heading-line {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex-wrap: nowrap;
}

.remainder-eyebrow {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.remainder-title {
    margin: 0;
    font-size: 3rem;
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: var(--text-color);
}

.remainder-description {
    margin: 0;
    max-width: none;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--muted-color);
    white-space: nowrap;
}

.remainder-demo-note {
    width: min(100%, 560px);
    margin: 4px 0 0;
    padding: 12px 14px;
    border: 1px solid rgba(30, 58, 138, 0.18);
    border-radius: 12px;
    background: rgba(30, 58, 138, 0.08);
    color: var(--primary-color);
    line-height: 1.4;
}

.remainder-demo-note__title,
.remainder-demo-note__text {
    margin: 0;
}

.remainder-demo-note__title {
    font-size: 0.95rem;
    font-weight: 800;
}

.remainder-demo-note__text {
    margin-top: 4px;
    font-size: 0.9rem;
    color: var(--muted-color);
}

.remainder-setup-card {
    border: 1px solid #d8dce4;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
    padding: 28px;
}

.remainder-setup-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.remainder-setup-card__eyebrow {
    margin: 0 0 8px;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-color);
}

.remainder-setup-card__title {
    margin: 0;
    font-size: 2rem;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.remainder-setup-card__subtitle {
    margin: 0;
    max-width: 420px;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--muted-color);
}

.remainder-setup-card [x-cloak] {
    display: none !important;
}

.remainder-errors {
    margin-bottom: 20px;
    padding: 16px 18px;
    border: 1px solid rgba(239, 68, 68, 0.16);
    border-radius: 16px;
    background: rgba(254, 242, 242, 0.9);
}

.remainder-errors__title {
    margin: 0 0 8px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #991b1b;
}

.remainder-errors__list {
    margin: 0;
    padding-left: 18px;
    color: #991b1b;
    font-size: 0.92rem;
    line-height: 1.55;
}

.remainder-setup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 20px;
}

.remainder-setup-grid--secondary {
    margin-top: 20px;
}

.remainder-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 16px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.88) 0%, rgba(241, 245, 249, 0.72) 100%);
}

.remainder-section + .remainder-section {
    margin-top: 0;
}

.remainder-section__header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.remainder-section__title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.25;
    color: var(--text-color);
}

.remainder-section__description {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--muted-color);
}

.remainder-section__note {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--primary-color);
}

.remainder-option-grid {
    display: grid;
    gap: 14px;
}

.remainder-option-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.remainder-option-card {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    padding: 18px;
    border: 1px solid #d7dbe2;
    border-radius: 16px;
    background: #fff;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.remainder-option-card:hover {
    border-color: #bcc5d1;
    transform: translateY(-1px);
}

.remainder-option-card--active {
    border-color: rgba(30, 58, 138, 0.42);
    background: rgba(30, 58, 138, 0.12);
    box-shadow: inset 0 0 0 1px rgba(30, 58, 138, 0.12);
}

.remainder-option-card__title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.remainder-option-card__meta {
    display: block;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted-color);
}

.remainder-dictionary-list {
    max-height: 340px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 2px 6px 2px 0;
}

.remainder-dictionary-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.remainder-dictionary-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.remainder-dictionary-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 42px;
}

.remainder-dictionary-filter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.remainder-dictionary-filter--placeholder {
    visibility: hidden;
    pointer-events: none;
}

.remainder-dictionary-filter__label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--muted-color);
}

.remainder-dictionary-filter__control {
    min-width: 160px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #c8ced9;
    border-radius: 12px;
    background: #fff;
    color: var(--text-color);
    font-size: 0.95rem;
}

.remainder-dictionary-filter__control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.remainder-dictionary-column__title {
    margin: 0;
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.remainder-dictionary-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    user-select: none;
}

.remainder-dictionary-select-all__input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.remainder-dictionary-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid #d7dbe2;
    border-radius: 16px;
    background: #fff;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.remainder-dictionary-item:hover {
    border-color: #bcc5d1;
    transform: translateY(-1px);
}

.remainder-dictionary-item--active {
    border-color: rgba(30, 58, 138, 0.42);
    background: rgba(30, 58, 138, 0.12);
    box-shadow: inset 0 0 0 1px rgba(30, 58, 138, 0.12);
}

.remainder-dictionary-item__main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.remainder-dictionary-item__name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-color);
}

.remainder-dictionary-item__meta {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--muted-color);
}

.remainder-dictionary-item__status {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid #c8ced9;
    background: #fff;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.remainder-dictionary-item--active .remainder-dictionary-item__status {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: inset 0 0 0 3px #fff;
}

.remainder-empty-state {
    padding: 20px 22px;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
}

.remainder-empty-state__title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

.remainder-empty-state__text {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.55;
    color: var(--muted-color);
}

.remainder-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.remainder-chip {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #d7dbe2;
    background: #fff;
    color: var(--text-color);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.remainder-chip:hover {
    border-color: #bcc5d1;
}

.remainder-chip--active {
    border-color: rgba(30, 58, 138, 0.42);
    background: rgba(30, 58, 138, 0.14);
    color: var(--primary-color);
}

.remainder-count-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.remainder-count-label {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-color);
}

.remainder-count-input {
    width: 100%;
    max-width: 180px;
    height: 56px;
    border-radius: 16px;
    border: 1px solid #d7dbe2;
    background: #fff;
    padding: 0 18px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.remainder-count-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.remainder-count-hint {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted-color);
}

.remainder-actions {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.remainder-actions .btn {
    min-width: 152px;
    height: 54px;
    border-radius: 14px;
    font-size: 0.98rem;
}

.remainder-actions__start:disabled,
.remainder-actions__start--disabled {
    background: #cbd5e1;
    border-color: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
}

@media (max-width: 992px) {
    .remainder-main {
        padding: 42px 0 56px;
    }

    .remainder-container {
        padding: 0 24px;
    }

    .remainder-title {
        font-size: 2.3rem;
    }

    .remainder-setup-card {
        padding: 22px;
    }

    .remainder-setup-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .remainder-setup-card__subtitle {
        max-width: 100%;
    }

    .remainder-setup-grid,
    .remainder-option-grid--two,
    .remainder-dictionary-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .remainder-main {
        padding: 34px 0 48px;
    }

    .remainder-container {
        padding: 0 20px;
        padding-bottom: 20px;
    }

    .remainder-title {
        font-size: 1.95rem;
        line-height: 1.08;
    }

    .remainder-heading-line {
        flex-wrap: wrap;
        gap: 8px;
    }

    .remainder-description {
        white-space: normal;
        line-height: 1.55;
    }

    .remainder-demo-note {
        width: 100%;
    }

    .remainder-setup-card__title {
        font-size: 1.65rem;
    }

    .remainder-setup-card {
        padding: 18px;
    }

    .remainder-setup-card__header {
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .remainder-setup-card__subtitle {
        max-width: 100%;
        font-size: 0.94rem;
        line-height: 1.55;
    }

    .remainder-section {
        padding: 18px;
    }

    .remainder-dictionary-item {
        padding: 15px 16px;
    }

    .remainder-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        padding-top: 18px;
    }

    .remainder-actions .btn {
        width: 100%;
    }
}
