/* «Подобрать книгу»: анкета из четырёх вопросов и результат */
.picker-title {
    margin: 0 0 10px;
}

.picker-lead {
    max-width: 720px;
    margin: 0 0 24px;
    font-size: 17px;
    line-height: 26px;
    color: #4a4a55;
}

.picker-form {
    max-width: 960px;
    padding: 24px 20px;
    background: #fff;
    border: 1px solid #E0E0EA;
    border-radius: 24px;
}

.picker-form[hidden],
.picker-step[hidden],
.picker-progress[hidden],
.picker-actions [hidden] {
    display: none;
}

.picker-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    font-size: 14px;
    color: #52535D;
}

.picker-progress-bar {
    flex: 1;
    max-width: 240px;
    height: 6px;
    overflow: hidden;
    background: #F0F1F9;
    border-radius: 999px;
}

.picker-progress-bar span {
    display: block;
    width: 25%;
    height: 100%;
    background: #CAEF63;
    border-radius: 999px;
    transition: width .2s;
}

.picker-step {
    min-width: 0;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

.picker-form.is-stepped .picker-step {
    margin-bottom: 8px;
}

.picker-question {
    margin: 0 0 14px;
    font-family: Montserrat, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 28px;
    color: #222228;
}

.picker-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.picker-option {
    position: relative;
    display: flex;
    margin: 0;
    cursor: pointer;
}

.picker-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.picker-option-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 56px;
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid #E0E0EA;
    border-radius: 16px;
    transition: border-color .15s, background-color .15s;
}

.picker-option:hover .picker-option-body {
    border-color: #222228;
}

.picker-option input:focus-visible + .picker-option-body {
    outline: 3px solid #CAEF63;
    outline-offset: 2px;
}

.picker-option input:checked + .picker-option-body {
    background: #E6F3C1;
    border-color: #222228;
}

.picker-option-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    color: #222228;
}

.picker-option-note {
    font-size: 14px;
    line-height: 20px;
    color: #52535D;
}

.picker-option-any .picker-option-title {
    font-weight: 500;
}

.picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.picker-submit,
.picker-next,
.picker-back,
.picker-skip,
.picker-edit,
.picker-more-btn {
    min-height: 48px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
}

.picker-submit,
.picker-next,
.picker-more-btn {
    color: #222228;
    background: #CAEF63;
    border: 0;
}

.picker-submit:hover,
.picker-next:hover,
.picker-more-btn:hover {
    background: #BDE352;
}

.picker-back,
.picker-skip,
.picker-edit {
    color: #222228;
    background: #fff;
    border: 1.5px solid #222228;
}

.picker-back:hover,
.picker-skip:hover,
.picker-edit:hover {
    background: #F0F1F9;
}

.picker-more-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.picker-edit {
    margin: 0 0 16px;
}

.picker-result {
    margin-top: 32px;
}

.picker-result-title {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 32px;
}

.picker-chosen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}

.picker-chip {
    padding: 4px 12px;
    font-size: 14px;
    line-height: 20px;
    color: #222228;
    background: #E6F3C1;
    border-radius: 999px;
}

.picker-restart {
    margin-left: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #222228;
    text-decoration: underline;
    text-decoration-color: #CAEF63;
    text-decoration-thickness: 3px;
    text-underline-offset: 3px;
}

.picker-note {
    max-width: 720px;
    margin: 0 0 18px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 22px;
    color: #222228;
    background: #F0F1F9;
    border-radius: 14px;
}

.picker-reasons {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: #52535D;
}

.picker-more {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .picker-form {
        padding: 28px 32px;
    }
}

/* ---------- версия 2: темы, «Пропустить», пояснения, состояния ---------- */
.picker-hint {
    margin: -6px 0 14px;
    font-size: 15px;
    line-height: 22px;
    color: #52535D;
}

.picker-option input[type="checkbox"] + .picker-option-body {
    padding-left: 48px;
    position: relative;
}

.picker-option input[type="checkbox"] + .picker-option-body::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 16px;
    width: 20px;
    height: 20px;
    border: 1.5px solid #222228;
    border-radius: 6px;
    background: #fff;
    transform: translateY(-50%);
}

.picker-option input[type="checkbox"]:checked + .picker-option-body::before {
    background: #222228 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23CAEF63' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.picker-skip {
    margin-right: auto;
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.picker-skip:hover {
    background: transparent;
    text-decoration-thickness: 2px;
}

.picker-form.is-stepped .picker-actions {
    align-items: center;
}

.picker-sub {
    max-width: 720px;
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 24px;
    color: #4a4a55;
}

.picker-why {
    margin: 0 0 12px;
    padding: 12px 14px;
    background: #F4F9E6;
    border-radius: 14px;
}

.picker-why-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #52535D;
}

.picker-why-list {
    margin: 0;
    padding-left: 18px;
    font-size: 15px;
    line-height: 22px;
    color: #222228;
}

.picker-missed {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 20px;
    color: #6b4a00;
}

.picker-card-secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-top: 12px;
}

.picker-read {
    font-size: 15px;
    color: #4a4a55;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.picker-read:hover {
    color: #222228;
}

.picker-card.is-leaving {
    opacity: .4;
}

.picker-result-wrap.is-loading .picker-result {
    opacity: .45;
    pointer-events: none;
}

.picker-loading {
    margin: 24px 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #222228;
}

.picker-loading::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    vertical-align: -2px;
    border: 2px solid #CAEF63;
    border-top-color: #222228;
    border-radius: 50%;
    animation: picker-spin .8s linear infinite;
}

@keyframes picker-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .picker-loading::before { animation: none; }
}

.picker-empty,
.picker-error {
    max-width: 720px;
    margin-top: 8px;
    padding: 20px;
    background: #F0F1F9;
    border-radius: 20px;
}

.picker-empty p,
.picker-error p {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 24px;
}

.picker-empty-title {
    font-size: 18px !important;
    font-weight: 700;
}

.picker-end {
    margin: 0;
    font-size: 15px;
    color: #4a4a55;
}

@media (max-width: 575.98px) {
    .picker-options {
        grid-template-columns: 1fr;
    }

    .picker-form {
        padding: 20px 16px;
    }

    .picker-question {
        font-size: 20px;
        line-height: 26px;
    }

    .picker-actions > button {
        flex: 1 1 auto;
    }

    .picker-skip {
        order: 3;
        flex-basis: 100%;
    }
}

/* ---------- версия 3: группы, «Подробнее», «Хочу прочитать» как основное действие ---------- */
.picker-group-title {
    margin: 24px 0 12px;
    font-size: 20px;
    line-height: 26px;
}

.picker-card.is-close {
    background: #FBFBFD;
}

.picker-unknown {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 20px;
    color: #52535D;
}

.picker-card-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    margin-top: 14px;
}

/* Стиль кнопки задан здесь полностью, чтобы не зависеть от want.css (и его копии в кэше браузера). */
.picker-card-main .book-want-btn.picker-want {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    color: #222228;
    background: #CAEF63;
    border: 1.5px solid #CAEF63;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
}

.picker-card-main .book-want-btn.picker-want::before {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222228' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M6.5 3.5h11a1 1 0 0 1 1 1V20l-6.5-4.2L5.5 20V4.5a1 1 0 0 1 1-1z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.picker-card-main .book-want-btn.picker-want.is-saved::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23222228' stroke='%23222228' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M6.5 3.5h11a1 1 0 0 1 1 1V20l-6.5-4.2L5.5 20V4.5a1 1 0 0 1 1-1z'/%3E%3C/svg%3E");
}

.picker-card-main .book-want-btn.picker-want:hover {
    background: #BDE352;
    border-color: #BDE352;
}

.picker-card-main .book-want-btn.picker-want.is-saved {
    background: #fff;
    border-color: #222228;
}

.picker-card-main .book-want-btn:focus-visible,
.picker-details:focus-visible,
.picker-litres-btn:focus-visible,
.picker-read:focus-visible {
    outline: 3px solid #222228;
    outline-offset: 3px;
}

.picker-details {
    font-size: 16px;
    font-weight: 600;
    color: #222228;
    text-decoration: underline;
    text-decoration-color: #CAEF63;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.picker-card-extra {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px 20px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #E0E0EA;
}

.picker-litres {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
}

.picker-litres-btn {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: #222228;
    text-decoration: none;
    background: #fff;
    border: 1.5px solid rgba(34, 34, 40, 0.35);
    border-radius: 999px;
}

.picker-litres-btn:hover {
    border-color: #222228;
    background: #F0F1F9;
}

.picker-card-extra .book-ad-marking {
    font-size: 12px;
}

.picker-card-extra .picker-read {
    align-self: center;
    font-size: 14px;
}

@media (max-width: 575.98px) {
    .picker-card-main .book-want-btn.picker-want {
        flex: 1 1 100%;
        justify-content: center;
    }

    .picker-card-extra {
        flex-direction: column;
    }
}

/* Порядок чтения цикла */
.picker-series {
    margin: 0 0 12px;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 22px;
    color: #222228;
    background: #FFF4D6;
    border-left: 4px solid #E3B341;
    border-radius: 10px;
}

.picker-series a {
    font-weight: 700;
    color: #222228;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.picker-series-soft,
.picker-series-read {
    background: #F0F1F9;
    border-left-color: #9A9BA8;
}
