.quiz-slide-shell {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.9), rgba(248, 250, 252, 0.98));
}

.quiz-slide-card {
    width: min(760px, 100%);
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.08);
    padding: 28px;
}

.quiz-slide-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #0f766e;
    text-transform: uppercase;
}

.quiz-slide-card h2 {
    margin: 12px 0 0;
    font-size: 26px;
    line-height: 1.5;
}

.quiz-slide-description {
    margin-top: 10px;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
}

.quiz-choice-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.quiz-choice-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(248, 250, 252, 0.84);
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    cursor: pointer;
}

.quiz-choice-item.is-selected {
    border-color: rgba(37, 99, 235, 0.9);
    background: rgba(239, 246, 255, 0.96);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.quiz-choice-input {
    margin-top: 3px;
    accent-color: #2563eb;
}

.quiz-choice-copy {
    flex: 1;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.7;
}

.quiz-choice-item.is-selected .quiz-choice-copy {
    color: #1d4ed8;
    font-weight: 700;
}

.quiz-choice-state {
    display: none;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.quiz-choice-item.is-selected .quiz-choice-state {
    display: inline-flex;
}

.quiz-short-text {
    margin-top: 20px;
    min-height: 120px;
}

.quiz-input-stack {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.quiz-text-input {
    min-height: 54px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    padding: 12px 16px;
    font: inherit;
    line-height: 1.6;
}

.quiz-input-assist {
    display: flex;
    justify-content: flex-start;
}

.quiz-use-login-profile-button {
    border-radius: 999px;
    font-weight: 700;
}

.quiz-slide-result,
.quiz-slide-error {
    margin-top: 16px;
    display: none;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.6;
}

.quiz-slide-result.is-visible,
.quiz-slide-error.is-visible {
    display: block;
}

.quiz-slide-result.is-correct {
    background: rgba(220, 252, 231, 0.9);
    color: #166534;
}

.quiz-slide-result.is-incorrect {
    background: rgba(254, 226, 226, 0.9);
    color: #991b1b;
}

.quiz-slide-error {
    background: rgba(254, 242, 242, 0.92);
    color: #b91c1c;
}

.quiz-auto-next {
    display: none;
    margin-top: 14px;
}

.quiz-auto-next.is-visible {
    display: block;
}

.quiz-auto-next-track {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.58);
}

.quiz-auto-next-bar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(125, 211, 252, 0.72), rgba(147, 197, 253, 0.82));
    transform: scaleX(0);
    transform-origin: left center;
}

.quiz-auto-next.is-visible .quiz-auto-next-bar {
    animation: quiz-auto-next-progress var(--quiz-auto-next-duration, 900ms) linear forwards;
}

.quiz-slide-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.quiz-next-button {
    min-width: 132px;
}

.quiz-next-button:disabled {
    cursor: not-allowed;
    opacity: 0.56;
}

.quiz-progress-lock-note {
    margin-top: 12px;
    color: #52606d;
    font-size: 13px;
    text-align: right;
}

.quiz-progress-lock-note.is-hidden {
    display: none;
}

#new-shiso-web-pdf-viewer .swiper-button-prev,
#new-shiso-web-pdf-viewer .swiper-button-next {
    top: 50%;
    width: 64px;
    height: 64px;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    color: #3b82f6;
    z-index: 24;
}

#new-shiso-web-pdf-viewer .swiper-button-prev {
    left: max(12px, env(safe-area-inset-left));
}

#new-shiso-web-pdf-viewer .swiper-button-next {
    right: max(12px, env(safe-area-inset-right));
}

#new-shiso-web-pdf-viewer .swiper-button-prev::after,
#new-shiso-web-pdf-viewer .swiper-button-next::after {
    font-size: 32px;
    font-weight: 700;
}

.swiper-pagination {
    position: fixed !important;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: auto !important;
    left: 50% !important;
    right: auto !important;
    bottom: 20px !important;
    transform: translate3d(-50%, 0, 0) !important;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    z-index: 20;
    max-width: min(calc(100vw - 48px), 860px);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    cursor: default;
}

.swiper-pagination::-webkit-scrollbar {
    display: none;
}

.swiper-pagination.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.swiper-pagination .pdf-pagination-bullet {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12px;
    height: 12px;
    margin: 0 !important;
    border-radius: 999px;
    background: #cbd5e1;
    border: 1px solid transparent;
    color: #94a3b8;
    opacity: 1;
    scroll-margin-inline: 20px;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.swiper-pagination .pdf-pagination-edge-spacer {
    flex: 0 0 20px;
    width: 20px;
    height: 1px;
}

.swiper-pagination .pdf-pagination-bullet-core {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    font-size: 0;
    line-height: 1;
}

.swiper-pagination .pdf-pagination-bullet-icon {
    display: block;
    width: 11px;
    height: 11px;
    overflow: visible;
}

.swiper-pagination .pdf-pagination-bullet.is-quiz {
    min-width: 24px;
    height: 20px;
    padding: 0 7px;
    background: #e2e8f0;
    color: #64748b;
}

.swiper-pagination .pdf-pagination-bullet.is-quiz .pdf-pagination-bullet-core {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 11px;
    height: 11px;
    background: transparent;
}

.swiper-pagination .pdf-pagination-bullet.is-locked {
    background: #fff7ed;
    border-color: #f59e0b;
    color: #c2410c;
}

.swiper-pagination .pdf-pagination-bullet.is-correct {
    background: #dcfce7;
    border-color: rgba(22, 101, 52, 0.28);
    color: #166534;
}

.swiper-pagination .pdf-pagination-bullet.is-incorrect {
    background: #fee2e2;
    border-color: rgba(185, 28, 28, 0.24);
    color: #b91c1c;
}

.swiper-pagination .pdf-pagination-bullet.is-gated {
    opacity: 0.32;
    transform: scale(0.94);
}

.swiper-pagination .pdf-pagination-bullet.is-future {
    background: rgba(203, 213, 225, 0.5);
    border-color: transparent;
    color: rgba(148, 163, 184, 0.7);
    opacity: 0.8;
    cursor: default;
}

.swiper-pagination .pdf-pagination-bullet.is-future .pdf-pagination-bullet-core {
    width: 7px;
    height: 7px;
}

.swiper-pagination .swiper-pagination-bullet-active.pdf-pagination-bullet {
    background: #dbeafe;
    border-color: rgba(37, 99, 235, 0.32);
    color: #2563eb;
    transform: scale(1.08);
}

.swiper-pagination .swiper-pagination-bullet-active.pdf-pagination-bullet.is-locked {
    background: #ffedd5;
    border-color: rgba(234, 88, 12, 0.3);
    color: #c2410c;
}

.swiper-pagination .swiper-pagination-bullet-active.pdf-pagination-bullet.is-correct {
    background: #bbf7d0;
    border-color: rgba(22, 101, 52, 0.32);
    color: #166534;
}

.swiper-pagination .swiper-pagination-bullet-active.pdf-pagination-bullet.is-incorrect {
    background: #fecaca;
    border-color: rgba(185, 28, 28, 0.3);
    color: #991b1b;
}

.swiper-pagination .swiper-pagination-bullet-active.pdf-pagination-bullet.is-quiz {
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.16);
}

.swiper-scrollbar {
    display: none !important;
}


@keyframes quiz-auto-next-progress {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@media (max-width: 640px) {
    .quiz-slide-shell {
        align-items: center;
        justify-content: center;
        min-height: 100%;
        height: 100%;
        padding: 12px 8px 78px;
        box-sizing: border-box;
    }

    .quiz-slide-card {
        min-height: 0;
        max-height: calc(100vh - 108px);
        max-height: calc(100dvh - 108px);
        overflow-y: auto;
        padding: 12px 10px;
        border-radius: 16px;
        box-sizing: border-box;
        text-align: left;
    }

    .quiz-slide-card h2 {
        margin-top: 8px;
        font-size: 17px;
        line-height: 1.45;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .quiz-slide-description {
        font-size: 12px;
        line-height: 1.55;
    }

    .quiz-choice-list,
    .quiz-input-stack {
        gap: 7px;
        margin-top: 12px;
    }

    .quiz-choice-item {
        align-items: center;
        width: 100%;
        gap: 8px;
        min-height: 38px;
        padding: 8px 10px;
        border-radius: 12px;
        box-sizing: border-box;
        text-align: left;
    }

    .quiz-choice-input {
        flex: 0 0 auto;
        width: 14px;
        height: 14px;
        margin: 0;
    }

    .quiz-choice-copy {
        min-width: 0;
        font-size: 13px;
        line-height: 1.45;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .quiz-choice-state {
        flex: 0 0 auto;
        min-height: 20px;
        padding: 3px 7px;
        font-size: 10px;
        line-height: 1.2;
    }

    .quiz-short-text {
        margin-top: 12px;
        min-height: 92px;
    }

    .quiz-text-input {
        min-height: 46px;
        padding: 9px 10px;
        border-radius: 12px;
    }

    .quiz-slide-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 14px;
    }

    .quiz-slide-actions .btn {
        appearance: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        padding: 0 16px;
        border: 1px solid transparent;
        border-radius: 999px;
        font: inherit;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.2;
        text-decoration: none;
        cursor: pointer;
        transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
    }

    .quiz-slide-actions .btn:active:not(:disabled) {
        transform: translateY(1px);
    }

    .quiz-slide-actions .btn:focus-visible {
        outline: 3px solid rgba(59, 130, 246, 0.28);
        outline-offset: 2px;
    }

    .quiz-slide-actions .btn-outline-secondary {
        border-color: rgba(148, 163, 184, 0.42);
        background: #ffffff;
        color: #334155;
    }

    .quiz-slide-actions .btn-outline-secondary:hover:not(:disabled) {
        border-color: rgba(71, 85, 105, 0.46);
        background: #f8fafc;
        color: #0f172a;
    }

    .quiz-slide-actions .btn-primary,
    .quiz-slide-actions .quiz-submit-button {
        border-color: rgba(37, 99, 235, 0.92);
        background: #2563eb;
        color: #ffffff;
        box-shadow: 0 10px 18px rgba(37, 99, 235, 0.18);
    }

    .quiz-slide-actions .btn-primary:hover:not(:disabled),
    .quiz-slide-actions .quiz-submit-button:hover:not(:disabled) {
        border-color: #1d4ed8;
        background: #1d4ed8;
        color: #ffffff;
    }

    .quiz-slide-actions .btn,
    .quiz-next-button {
        width: 100%;
        min-width: 0;
    }

    .quiz-progress-lock-note {
        font-size: 11px;
        text-align: left;
    }

    #new-shiso-web-pdf-viewer .swiper-button-prev,
    #new-shiso-web-pdf-viewer .swiper-button-next {
        width: 42px;
        height: 42px;
    }

    #new-shiso-web-pdf-viewer .swiper-button-prev::after,
    #new-shiso-web-pdf-viewer .swiper-button-next::after {
        font-size: 22px;
    }

    .swiper-pagination {
        bottom: 10px !important;
        max-width: min(calc(100vw - 20px), 860px);
        padding: 6px 12px;
    }
}
