/* KYOBASE bundle explorer — namespaced so it does not restyle the landing page. */

.kb-explorer [hidden],
.kb-cover-missing[hidden] {
    display: none !important;
}

.kb-explore-title {
    margin: 0 0 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.content .kb-explore-lead {
    margin: 0 0 1.35rem;
    color: var(--text);
    font-size: 1.02rem;
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 0 0 2.75rem;
}

.kb-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    min-width: 0;
    margin: 0;
    padding: 0.7rem 0.7rem 0.85rem;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kb-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    margin-bottom: 0.35rem;
}

.kb-card-media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.kb-cover-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0.5rem;
    border: 1px dashed rgba(245, 166, 35, 0.55);
    border-radius: 6px;
    color: var(--gold);
    font-size: 0.75rem;
    line-height: 1.35;
    text-align: center;
}

.kb-card-kicker,
.kb-kicker {
    color: var(--orange);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.kb-card-title {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text);
}

.kb-card-sub {
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
}

.kb-card-blurb {
    margin: 0.15rem 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.kb-card-action {
    margin-top: auto;
    padding-top: 0.55rem;
    color: var(--cyan);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .kb-card:hover {
        transform: translateY(-4px);
        border-color: rgba(245, 166, 35, 0.55);
        box-shadow: var(--shadow-glow);
    }
}

.kb-card:focus-visible,
.kb-dialog :focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.kb-card[aria-expanded="true"] {
    border-color: rgba(245, 166, 35, 0.75);
}

.kb-explorer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    overflow: hidden;
}

.kb-explorer[hidden] {
    display: none !important;
}

.kb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 20, 0.78);
}

.kb-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(980px, 100%);
    max-height: 90vh;
    max-height: 90dvh;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.kb-explorer.is-open .kb-dialog {
    opacity: 1;
    transform: none;
}

.kb-dialog-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem 0.35rem 1rem;
}

.kb-switch {
    display: flex;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.kb-switch-btn {
    flex: 0 0 auto;
    width: 48px;
    margin: 0;
    padding: 0.15rem;
    border: 2px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.kb-switch-btn img {
    display: block;
    width: 100%;
    height: 52px;
    object-fit: contain;
}

.kb-switch-btn[aria-current="true"] {
    border-color: var(--gold);
}

.kb-close {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    background: var(--surface-elevated);
    color: var(--text);
    font: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.kb-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0.35rem 1.15rem 1.1rem;
}

.kb-body.is-preview {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kb-identity {
    display: grid;
    grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
    gap: 1.15rem;
    align-items: start;
    margin-bottom: 1.15rem;
}

.kb-identity-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.kb-identity-cover img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
}

.kb-title {
    margin: 0.15rem 0 0.3rem;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    line-height: 1.15;
    color: var(--text);
}

.kb-subtitle {
    margin: 0 0 0.45rem;
    color: var(--gold);
    font-size: 1.02rem;
    font-weight: 700;
}

.kb-author {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.kb-block {
    margin: 0 0 1rem;
}

.kb-block h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
}

.kb-block p,
.kb-note {
    margin: 0;
    color: var(--text-muted);
}

.kb-outcomes {
    margin: 0;
    padding: 0;
    list-style: none;
}

.kb-outcomes li {
    position: relative;
    margin: 0 0 0.4rem;
    padding-left: 1.35rem;
    color: var(--text-muted);
}

.kb-outcomes li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #86efac;
    font-weight: 800;
}

.kb-toc {
    margin: 0 0 1rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;
    background: rgba(10, 22, 40, 0.35);
}

.kb-toc summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 700;
}

.kb-toc ol {
    margin: 0;
    padding: 0 1rem 0.9rem 2.2rem;
    color: var(--text-muted);
}

.kb-preview-open,
.kb-btn {
    appearance: none;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
}

.kb-preview-open {
    display: block;
    width: 100%;
    margin: 0.35rem 0 0.85rem;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--cyan);
    border-radius: 8px;
    background: transparent;
    color: var(--cyan);
}

.kb-preview-open:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--text);
}

.kb-solo {
    margin: 0.25rem 0 0.5rem;
    font-size: 0.92rem;
}

.kb-solo a {
    color: var(--text-muted);
}

.kb-solo a:hover {
    color: var(--cyan);
}

.kb-note {
    margin-bottom: 0.85rem;
}

.kb-preview {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 0.7rem;
}

.kb-preview-tools,
.kb-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.kb-pager {
    justify-content: space-between;
}

.kb-btn {
    min-height: 44px;
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    background: var(--surface-elevated);
    color: var(--text);
}

.kb-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.kb-zoom {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.kb-zoom-level,
.kb-pager-count {
    min-width: 4.5rem;
    color: var(--text);
    font-weight: 700;
    text-align: center;
}

.kb-stage {
    display: grid;
    place-items: center;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border-radius: 8px;
    background: #08111d;
}

.kb-stage.is-zoomed {
    display: block;
}

.kb-stage img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #fff;
}

.kb-stage.is-zoomed img {
    max-width: none;
    max-height: none;
}

.kb-page-status {
    margin: 0;
    padding: 1.5rem 1rem;
    color: var(--text);
    text-align: center;
}

.kb-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(245, 166, 35, 0.35);
    background: #0c1a2e;
}

.kb-foot-label {
    margin: 0;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.kb-foot-label strong {
    color: #ffe14a;
    font-size: 1.15rem;
}

.kb-foot .button {
    text-align: center;
}

.kb-booknav {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem 0.85rem;
    background: #0c1a2e;
}

.kb-booknav .kb-btn {
    flex: 1 1 0;
}

.kb-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1040px) {
    .kb-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .kb-explorer {
        padding: 0;
    }

    .kb-dialog {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
        padding-top: env(safe-area-inset-top);
    }

    .kb-identity {
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 0.75rem;
    }

    .kb-identity-cover {
        min-height: 0;
    }

    .kb-identity-cover img {
        max-height: 150px;
    }

    .kb-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .kb-foot .button {
        width: 100%;
    }

    .kb-booknav {
        padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
    }

    .kb-zoom {
        margin-left: 0;
    }
}

@media (max-width: 680px) {
    .kb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kb-card-media {
        height: 168px;
    }
}

@media (max-width: 380px) {
    .kb-card {
        padding: 0.55rem;
    }

    .kb-card-media {
        height: 142px;
    }

    .kb-card-title {
        font-size: 0.84rem;
    }

    .kb-booknav .kb-btn,
    .kb-btn {
        padding-left: 0.45rem;
        padding-right: 0.45rem;
        font-size: 0.78rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kb-card,
    .kb-dialog,
    .kb-backdrop,
    .collection-banner.is-armed.is-shown img {
        transition: none;
    }

    .collection-banner.is-armed img,
    .collection-banner.is-armed.is-ready img,
    .collection-banner.is-armed.is-shown img {
        opacity: 1;
        transform: none;
    }
}

/* Bundle-up coupon under the FAQ: half of its 1024px display width. */
.collection-banner img {
    width: 50%;
    max-width: 512px;
    height: auto;
    margin-right: auto;
    margin-left: auto;
    transform-origin: center center;
}

.collection-banner.is-ready {
    position: relative;
    z-index: 40;
}

.collection-banner.is-armed img {
    opacity: 0;
}

.collection-banner.is-armed.is-ready img {
    transform: translateY(var(--kb-coupon-shift, 0px)) scale(var(--kb-coupon-scale, 1));
}

.collection-banner.is-armed.is-shown img {
    opacity: 1;
    transform: none;
    transition: opacity 0.55s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

html.kb-coupon-zoom,
html.kb-coupon-zoom body {
    overflow-x: hidden;
}

/* One line between the FAQ and the coupon. The list margin and section padding were both adding space. */
.content .faq-list {
    margin-bottom: 0;
}

.content {
    padding-bottom: 1.5rem;
}
