/* Application styles. Linked with a file-modification version so browsers fetch a new copy after this file changes. */

:root {
    /* Same Kowcha palette as coaching_people/public/css/website.css */
    --primary-1: rgb(10, 47, 53);
    --primary-1-rgb: 10, 47, 53;
    --primary-2: rgb(4, 36, 41);
    --primary-3: #f5f9fc;
    --primary-4: #ffe9cc;
    --primary-5: #f6eee2;
    --secondary-1: #f7a325;
    --secondary-1-rgb: 247, 163, 37;
    --secondary-1-dark: #e49217;
    --secondary-2: #f56038;
    --secondary-3: #ffca7a;
    --secondary-4: #12492f;
    --secondary-5: #fffaf4;
    --grey-1: #181818;
    --grey-2: #282828;
    --grey-3: #f5f4f4;

    --x-font-sans-serif:
        "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    --x-font-display: var(--x-font-sans-serif);
    --x-font-serif: var(--x-font-sans-serif);
    --x-body-font-family: var(--x-font-sans-serif);
}

:root:not([data-bs-theme="dark"]) {
    --x-primary: var(--primary-1);
    --x-primary-rgb: var(--primary-1-rgb);
    --x-primary-bg-subtle: #d7e4e6;
    --x-body-color: var(--primary-1);
    --x-body-color-rgb: var(--primary-1-rgb);
    --x-body-bg: var(--primary-3);
    --x-body-bg-rgb: 245, 249, 252;
    --x-heading-color: var(--primary-1);
    --x-emphasis-color: var(--primary-2);
    --x-link-color: var(--primary-1);
    --x-link-hover-color: var(--primary-2);
    --x-link-color-rgb: var(--primary-1-rgb);
    --x-link-hover-color-rgb: 4, 36, 41;
    --x-nav-pills-link-active-bg: var(--primary-1);
    --x-nav-pills-link-active-color: #fff;
}

html:not([data-bs-theme="dark"]),
html:not([data-bs-theme="dark"]) body {
    color: var(--primary-1);
    background-color: var(--primary-3);
    font-size: 15px;
}

html:not([data-bs-theme="dark"]) a:not(.btn) {
    color: var(--primary-1);
    text-decoration: none;
}

html:not([data-bs-theme="dark"]) a:not(.btn):hover {
    color: var(--primary-2);
}

.btn-primary {
    --x-btn-color: #fff;
    --x-btn-bg: var(--secondary-1);
    --x-btn-border-color: var(--secondary-1);
    --x-btn-hover-color: #fff;
    --x-btn-hover-bg: var(--secondary-1-dark);
    --x-btn-hover-border-color: var(--secondary-1-dark);
    --x-btn-focus-shadow-rgb: var(--secondary-1-rgb);
    --x-btn-active-color: #fff;
    --x-btn-active-bg: var(--secondary-1-dark);
    --x-btn-active-border-color: var(--secondary-1-dark);
    --x-btn-active-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    --x-btn-disabled-color: #fff;
    --x-btn-disabled-bg: var(--secondary-1);
    --x-btn-disabled-border-color: var(--secondary-1);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    color: #fff;
    background-color: var(--secondary-1-dark);
    border-color: var(--secondary-1-dark);
}

.btn-neutral {
    --x-btn-color: #fff;
    --x-btn-bg: var(--primary-1);
    --x-btn-border-color: var(--primary-1);
    --x-btn-hover-color: #fff;
    --x-btn-hover-bg: var(--primary-2);
    --x-btn-hover-border-color: var(--primary-2);
    --x-btn-focus-shadow-rgb: var(--primary-1-rgb);
    --x-btn-active-color: #fff;
    --x-btn-active-bg: var(--primary-2);
    --x-btn-active-border-color: var(--primary-2);
    --x-btn-disabled-color: #fff;
    --x-btn-disabled-bg: var(--primary-1);
    --x-btn-disabled-border-color: var(--primary-1);
}

.btn-outline-primary {
    --x-btn-color: var(--primary-1);
    --x-btn-border-color: var(--primary-1);
    --x-btn-hover-color: #fff;
    --x-btn-hover-bg: var(--primary-1);
    --x-btn-hover-border-color: var(--primary-1);
    --x-btn-focus-shadow-rgb: var(--primary-1-rgb);
    --x-btn-active-color: #fff;
    --x-btn-active-bg: var(--primary-1);
    --x-btn-active-border-color: var(--primary-1);
    --x-btn-disabled-color: var(--primary-1);
    --x-btn-disabled-bg: transparent;
    --x-btn-disabled-border-color: var(--primary-1);
}

.btn-link {
    --x-btn-font-weight: 400;
    --x-btn-color: var(--primary-1);
    --x-btn-bg: transparent;
    --x-btn-border-color: transparent;
    --x-btn-hover-color: var(--primary-2);
    --x-btn-hover-bg: transparent;
    --x-btn-hover-border-color: transparent;
    --x-btn-active-color: var(--primary-2);
    --x-btn-active-border-color: transparent;
    --x-btn-box-shadow: none;
    text-decoration: none;
}

.kowcha-nav {
    background-color: #fff;
    border-bottom: 3px solid var(--grey-3);
}

.catalogue-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.catalogue-brand {
    flex: 0 0 auto;
}

.catalogue-search-slot {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.catalogue-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.catalogue-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--primary-1);
}

a.catalogue-icon-btn {
    position: relative;
    text-decoration: none;
}

.catalogue-icon-btn svg {
    width: 1.35rem;
    height: 1.35rem;
}

.catalogue-cart-count {
    position: absolute;
    top: 0.1rem;
    right: 0;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--primary-1);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.05rem;
    text-align: center;
}

.catalogue-icon-btn:hover,
.catalogue-icon-btn:focus,
.catalogue-icon-btn[aria-expanded="true"] {
    background: var(--secondary-5);
    color: var(--primary-1);
}

html:not([data-bs-theme="dark"]) a.catalogue-icon-btn.is-current {
    color: var(--secondary-1);
}

.catalogue-user-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--primary-1);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.catalogue-account-menu {
    min-width: 16rem;
}

.catalogue-account-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.catalogue-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.15rem 0.35rem;
    padding: 0.15rem 1rem 0.35rem;
    border-top: 1px solid var(--grey-3);
}

.catalogue-categories .nav-link {
    color: var(--primary-1);
    border-bottom: 3px solid transparent;
    padding: 0.45rem 0.7rem;
}

.catalogue-categories .nav-link:hover,
.catalogue-categories .nav-link:focus,
.catalogue-categories .nav-link.active {
    color: var(--primary-1);
    background: transparent;
    border-bottom-color: var(--primary-1);
}

@media (max-width: 767.98px) {
    .catalogue-toolbar {
        flex-wrap: wrap;
    }

    .catalogue-search-slot {
        flex: 1 0 100%;
        order: 3;
    }
}

html:not([data-bs-theme="dark"]) .card {
    background-color: #fff;
    border: 0;
    box-shadow: 0 0 20px rgb(0 0 0 / 4%);
}

body.auth .card a:not(.btn) {
    border-bottom: 1px solid var(--primary-1);
}

body.auth .card a:not(.btn):hover {
    border-bottom-color: var(--secondary-1-dark);
}

input[type="checkbox"] {
    accent-color: var(--primary-1);
}

.page-link {
    color: var(--primary-1);
}

html:not([data-bs-theme="dark"]) .page-item.active .page-link {
    background-color: var(--primary-1);
    border-color: var(--primary-1);
    color: #fff;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #fff;
    background-color: var(--primary-1);
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--primary-1);
    border-color: var(--primary-1);
}

.primary-intro-wrapper.pt-16 {
    padding-top: 0 !important;
}

.hub-hero-wrapper {
    position: relative;
    background-color: #0a2f35;
    background-image:
        linear-gradient(180deg, rgb(10 47 53 / 28%), rgb(10 47 53 / 42%)),
        url("../img/website/home-hero-3.jpg");
    background-position: center center;
    background-size: cover;
    color: #fff;
}

.hub-hero-copy {
    padding-top: 3.5rem;
    padding-bottom: 3rem;
}

.hub-hero-copy .lead,
.hub-hero-copy h1,
.hub-hero-copy p {
    /* color: #fff; */
    color: var(--primary-3);
}

.catalogue-search {
    width: min(40rem, 100%);
}

.catalogue-search-field {
    position: relative;
    width: 100%;
}

#catalogue-search {
    text-align: left;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding-inline: 0;
}

.catalogue-search-icon {
    position: absolute;
    z-index: 5;
    left: 0.9rem;
    top: 50%;
    width: 1.15rem;
    height: 1.15rem;
    transform: translateY(-50%);
    color: var(--primary-1);
    pointer-events: none;
}

.catalogue-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    background-color: #e7ebf3;
    overflow: hidden;
}

.catalogue-cover img {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalogue-cover-fallback {
    display: flex;
    align-items: flex-end;
    height: 100%;
    padding: 1.25rem;
    background: linear-gradient(160deg, #12492f 0%, #0a2f35 68%, #f56038 100%);
    color: #fff;
}

.catalogue-cover-fallback span {
    font-size: 2.75rem;
    line-height: 1;
}

.favourite-toggle {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--primary-1);
    box-shadow: 0 1px 6px rgb(10 47 53 / 16%);
}

.favourite-toggle svg {
    width: 1.15rem;
    height: 1.15rem;
}

.favourite-toggle svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
}

.favourite-toggle.is-favourite {
    color: var(--secondary-1);
}

.favourite-toggle.is-favourite svg path {
    fill: currentColor;
}

.favourite-toggle:hover,
.favourite-toggle:focus-visible {
    background: var(--secondary-5);
}

.catalogue-card {
    overflow: hidden;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.catalogue-card:hover {
    transform: translateY(-3px);
}

.catalogue-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.book-show-media {
    position: relative;
    max-width: 22rem;
}

.book-show-cover {
    max-width: 22rem;
}

.book-reviews .progress {
    height: 0.45rem;
}

.book-review-meter {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr) 2rem;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
}

.brand-logo {
    height: 3.5rem;
    width: auto;
}

.brand-logo-lg {
    height: 4.5rem;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
}

[data-bs-theme="dark"] .brand-logo,
[data-bs-theme="dark"] .brand-mark {
    filter: brightness(0) invert(1);
}

.card-empty-state {
    background: transparent !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 8vh;
    padding-bottom: 8vh;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    margin-bottom: 1.25rem;
    border-radius: 999px;
    background: var(--secondary-5);
    color: var(--primary-1);
}

.empty-state-icon svg {
    width: 1.85rem;
    height: 1.85rem;
}

.site-footer {
    background: var(--primary-2);
    color: #fff;
    padding-top: 4.5rem;
}

.site-footer-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    column-gap: 1.5rem;
    row-gap: 0.75rem;
    margin-top: 2.25rem;
    font-size: 0.875rem;
    font-weight: 400;
}

html:not([data-bs-theme="dark"]) .site-footer a,
.site-footer a {
    color: rgb(255 255 255 / 70%);
    text-decoration: none;
}

html:not([data-bs-theme="dark"]) .site-footer a:hover,
.site-footer a:hover {
    color: #fff;
}

.site-footer-mark {
    height: 4.5rem;
    width: auto;
    filter: brightness(0) invert(1);
}

.site-footer-tagline {
    margin: 1.5rem auto 0;
    max-width: 18rem;
    color: #fffaf4;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
}

.site-footer-rule {
    margin: 3rem 0 1.75rem;
    border: 0;
    border-top: 1px solid rgb(255 255 255 / 10%);
    opacity: 1;
}

.site-footer-meta {
    padding-bottom: 1.75rem;
    color: rgb(255 255 255 / 40%);
    font-size: 0.75rem;
    font-weight: 400;
}

.floating-alerts {
    position: fixed;
    top: 5.5rem;
    left: 50%;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: min(32rem, calc(100% - 2rem));
    transform: translateX(-50%);
    pointer-events: none;
}

.floating-alerts .alert {
    margin-bottom: 0;
    pointer-events: auto;
}

body.catalogue-page {
    background: #f6f1e8;
    --storefront-rust: #c2612c;
    --x-font-display: var(--x-body-font-family);
}

.storefront-display {
    font-family: var(--x-body-font-family);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.storefront-kicker {
    margin-bottom: 0.75rem;
    color: var(--primary-1);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.storefront-announcement {
    background: var(--primary-1);
    color: #fff;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
}

.storefront-search-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding: 0.35rem 0.35rem 0.35rem 2.5rem;
    background: #fff;
    border: 1px solid rgb(10 47 53 / 12%);
    border-radius: 0.85rem;
}

.storefront-search-field .catalogue-search-icon {
    left: 0.9rem;
}

.storefront-search-field .btn {
    flex: 0 0 auto;
}

.storefront-subnav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-top: 1px solid var(--grey-3);
    padding-top: 0.75rem;
}

.storefront-subnav-links {
    display: none;
}

.storefront-subnav-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.storefront-subnav-links .nav-link {
    color: var(--primary-1);
    border-bottom: 3px solid transparent;
    padding: 0.45rem 0.7rem;
    font-weight: 600;
}

.storefront-subnav-links .nav-link:hover,
.storefront-subnav-links .nav-link:focus,
.storefront-subnav-links .nav-link.active {
    color: var(--primary-1);
    background: transparent;
    border-bottom-color: var(--primary-1);
}

.storefront-menu-button,
.storefront-currency-button {
    border: 0;
    background: transparent;
    color: var(--primary-1);
    font-weight: 600;
    padding: 0;
}

.storefront-currency-button,
.storefront-currency-option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.storefront-currency-button {
    white-space: nowrap;
}

.storefront-currency-option {
    width: 100%;
}

.storefront-flag {
    display: block;
    width: 1.35rem;
    height: 0.9rem;
    flex: none;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgb(10 47 53 / 18%);
}

@media (min-width: 992px) {
    .storefront-menu-button {
        display: none;
    }

    .storefront-subnav-links {
        display: flex;
        flex: 1 1 auto;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.15rem 0.35rem;
    }
}

.storefront-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    font-size: 1.15rem;
}

.storefront-hero {
    padding: 1.5rem 0 2.5rem;
}

.storefront-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 1fr);
    align-items: center;
    gap: 1.5rem 2rem;
    min-height: 34rem;
}

.storefront-hero-copy {
    max-width: 38rem;
}

.storefront-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.15rem;
}

.storefront-hero-title {
    font-size: clamp(2.8rem, 4.6vw, 4.15rem);
    margin-bottom: 1rem;
}

.hero-caption {
    display: grid;
    gap: 0.35rem;
    margin-top: 2.4rem;
    padding-left: 1rem;
    border-left: 2px solid #c58d60;
}

.hero-caption > span {
    color: #9e5c3f;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-caption strong {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.hero-caption small {
    color: #67746b;
}

.hero-stage {
    position: relative;
    width: min(100%, 30rem);
    aspect-ratio: 1.05 / 1;
    margin-inline: auto;
    justify-self: end;
}

.hero-stage-disc {
    position: absolute;
    z-index: 0;
    top: 4%;
    left: 7%;
    width: 86%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #eeece0;
    border: 1px solid #e1e1d3;
}

.hero-book {
    position: absolute;
    bottom: 12%;
    display: block;
    width: 48%;
    color: inherit;
    text-decoration: none;
}

.hero-book-alltime {
    left: 3%;
    height: 86%;
    transform: rotate(-10deg);
    z-index: 2;
}

.hero-book-current {
    right: 4%;
    height: 80%;
    transform: rotate(8deg);
    z-index: 3;
}

.hero-book-float {
    display: block;
    height: 100%;
    animation: hero-float 5.6s ease-in-out infinite;
}

.hero-book-current .hero-book-float {
    animation-duration: 6.8s;
    animation-delay: -2.1s;
}

.hero-book img,
.hero-book-fallback {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(8px 12px 9px rgb(10 47 53 / 16%));
}

.hero-book-fallback {
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    border-radius: 0.2rem;
    background: linear-gradient(160deg, #12492f 0%, #0a2f35 68%, #c2612c 100%);
    color: #fff;
    font-family: var(--x-body-font-family);
    font-size: 3rem;
    line-height: 1;
}

.hero-book-label {
    position: absolute;
    left: 0;
    bottom: 8%;
    z-index: 4;
    width: 48%;
    padding: 0.35rem 0.4rem;
    border: 1px solid #dfc3a4;
    border-radius: 3px;
    background: #faf4e8;
    color: #955132;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
}

.hero-stamp {
    position: absolute;
    top: 6%;
    right: 8%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 5.6rem;
    height: 5.6rem;
    padding: 0.45rem;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #a85635;
    color: #fff;
    text-align: center;
    line-height: 1.1;
    transform: rotate(10deg);
    box-shadow: 0 3px 10px rgb(10 47 53 / 12%);
}

.hero-stamp-kicker {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-stamp b {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@keyframes hero-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-book-float {
        animation: none;
    }
}

@media (max-width: 767.98px) {
    .storefront-hero-layout {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .hero-stage {
        order: -1;
        width: min(100%, 24rem);
        justify-self: center;
    }

    .storefront-hero-copy,
    .hero-caption,
    .hero-caption strong {
        text-align: center;
        justify-content: center;
    }

    .storefront-hero-copy {
        max-width: none;
    }

    .storefront-hero-actions {
        justify-content: center;
    }

    .hero-caption {
        border-left: 0;
        padding-left: 0;
    }
}

.storefront-hero-title span,
.storefront-text-link {
    color: var(--storefront-rust);
}

.storefront-hero-lead {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.storefront-text-link {
    font-weight: 600;
    text-decoration: none;
}

.storefront-section {
    padding: 2.5rem 0;
}

.storefront-section-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    margin-bottom: 1rem;
}

.storefront-band {
    background: #efe7da;
}

.storefront-chapter {
    background: var(--primary-1);
    color: #f6f1e8;
    padding: 4rem 0;
}

.storefront-chapter .storefront-kicker,
.storefront-chapter .storefront-display {
    color: #f6f1e8;
}

.storefront-sell-band {
    background: #fff;
}

.spotlight-book {
    color: inherit;
    text-decoration: none;
}

.spotlight-cover {
    max-width: 16rem;
    border-radius: 0.4rem;
    box-shadow: 0 16px 40px rgb(10 47 53 / 12%);
}

.shelf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.shelf-chips a {
    border: 1px solid rgb(10 47 53 / 25%);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    text-decoration: none;
}

.shelf-chips a.is-current,
.shelf-chips a:hover {
    background: var(--primary-1);
    color: #fff;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.2rem 1.5rem;
}

.book-card-slot,
.book-card,
.book-card-copy {
    background: transparent;
}

.book-card {
    position: relative;
    min-width: 0;
}

.book-art {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12%;
    border: 0;
    border-radius: 3px;
    overflow: hidden;
    background: #efe7da;
}

button.book-art {
    cursor: pointer;
}

.book-art img {
    max-width: 74%;
    max-height: 84%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(6px 9px 5px rgb(0 0 0 / 13%));
    transition: transform 0.25s ease;
}

.book-art:hover img {
    transform: translateY(-6px) rotate(-2deg);
}

.book-art-fallback {
    font-family: var(--x-body-font-family);
    font-size: 3.5rem;
    line-height: 1;
    color: var(--primary-1);
}

.book-card-copy {
    padding-top: 0.9rem;
}

.book-tag {
    margin-bottom: 0.25rem;
    color: var(--storefront-rust);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.book-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.book-title button,
.book-view {
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    text-align: left;
}

.book-title button {
    font: inherit;
    font-weight: 700;
}

.book-author {
    margin-bottom: 0.55rem;
    font-size: 0.9rem;
}

.book-price {
    margin-bottom: 0.55rem;
    font-weight: 600;
}

.book-view {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.book-preview {
    background: #f6f1e8;
    color: var(--primary-1);
    border: 0;
    border-radius: 0.75rem;
}

.book-preview-layout {
    display: grid;
    gap: 1.5rem;
}

.book-preview-buy {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.book-preview-buy label {
    font-weight: 600;
}

.kowcha-format-picker {
    display: grid;
    gap: 0.85rem;
}

.kowcha-book-format-modal-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.75rem 1rem;
    align-items: center;
    padding: 0.8rem 0.85rem;
    border: 1px solid rgb(10 47 53 / 12%);
    border-radius: 0.75rem;
    background: #fff;
}

.kowcha-book-format-modal-option.is-selected {
    border-color: rgb(10 47 53 / 45%);
    background: var(--primary-5);
}

.kowcha-book-format-modal-choice {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    font-weight: 600;
}

.kowcha-book-format-modal-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.kowcha-book-format-modal-option-price {
    font-weight: 700;
}

.kowcha-book-format-modal-option-guide {
    color: rgb(10 47 53 / 68%);
    font-size: 0.78rem;
}

.kowcha-book-format-modal-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgb(10 47 53 / 18%);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.kowcha-book-format-modal-qty button,
.kowcha-book-format-modal-qty input {
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    background: transparent;
    color: var(--primary-1);
    text-align: center;
    font-weight: 600;
}

.kowcha-book-format-modal-qty input {
    width: 2.6rem;
    -moz-appearance: textfield;
    appearance: textfield;
}

.kowcha-book-format-modal-qty input::-webkit-outer-spin-button,
.kowcha-book-format-modal-qty input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.kowcha-book-format-modal-qty button:disabled {
    opacity: 0.35;
}

@media (max-width: 575.98px) {
    .kowcha-book-format-modal-option {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .kowcha-book-format-modal-pricing {
        grid-column: 1;
        align-items: flex-start;
        text-align: left;
    }
}

@media (min-width: 768px) {
    .book-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .book-preview-layout {
        grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
        align-items: start;
    }
}

@media (min-width: 992px) {
    .book-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.format-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.format-pills span {
    border: 1px solid rgb(194 97 44 / 45%);
    border-radius: 999px;
    color: var(--storefront-rust);
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
}

.book-stars {
    color: rgb(10 47 53 / 25%);
    letter-spacing: 0.08em;
}

.book-stars .is-on {
    color: #c9892d;
}

.mood-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem;
    background: #fff;
    border-radius: 0.6rem;
    color: inherit;
    text-decoration: none;
}

.mood-card span {
    margin-top: auto;
    color: var(--primary-1);
    font-size: 0.85rem;
}

.author-row {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-top: 1px solid rgb(10 47 53 / 12%);
}

.author-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--primary-1);
    color: #fff;
    font-weight: 700;
}

.shelf-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.shelf-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.gift-preview {
    padding: 1.5rem;
    background: var(--primary-1);
    color: #f6f1e8;
    border-radius: 1rem;
}

.gift-preview-amount {
    font-family: var(--x-body-font-family);
    font-size: 2.4rem;
}

.site-footer-columns h2 {
    color: #fff;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-footer-columns a,
.site-footer-columns p {
    display: block;
    margin: 0 0 0.45rem;
}

@media (max-width: 767.98px) {
    .shelf-filters {
        grid-template-columns: 1fr;
    }
}

main {
    min-height: 70vh;
}

a.book-art {
    text-decoration: none;
}

.library-card .book-title a {
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.reading-page {
    min-height: 100vh;
    background: #f6f1e8;
    color: var(--primary-1);
}

.reading-main {
    display: flex;
    flex-direction: column;
    min-height: 70vh;
}

.reading-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 0.85rem 1.25rem;
    background: #fff;
    border-bottom: 3px solid var(--grey-3);
}

.reading-bar h1 {
    flex: 1 1 12rem;
    margin: 0;
    font-size: 1.05rem;
}

.reading-progress {
    margin: 0;
    font-weight: 700;
}

.reading-controls {
    display: flex;
    gap: 0.5rem;
}

.reading-controls button,
.reading-toc button {
    border: 0;
    background: transparent;
    color: var(--primary-1);
    font-weight: 600;
    text-align: left;
}

.reading-stage {
    flex: 1 1 auto;
    min-height: 70vh;
    height: calc(100vh - 4.5rem);
    overflow: auto;
    background: #fff;
}

.reading-stage canvas {
    display: block;
    max-width: 100%;
    height: auto !important;
    margin: 0 auto;
}

.reading-toc {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 16rem;
    overflow: auto;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--grey-3);
}

.reading-toc[hidden],
.reading-controls button[hidden] {
    display: none;
}

.reading-unavailable {
    padding: 2rem 1.25rem;
}

.kowcha-account-switch {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.kowcha-account-switch .btn {
    flex: 1 1 0;
}

.checkout-steps {
    display: flex;
    gap: 1rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.checkout-steps li {
    flex: 1 1 0;
    padding-bottom: 0.45rem;
    border-bottom: 3px solid rgb(10 47 53 / 15%);
    color: rgb(10 47 53 / 55%);
    font-weight: 600;
}

.checkout-steps li.is-current,
.checkout-steps li.is-complete {
    color: var(--primary-1);
    border-bottom-color: var(--primary-1);
}

.checkout-secure {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    font-weight: 600;
}

.checkout-secure svg {
    width: 1.15rem;
    height: 1.15rem;
}

.checkout-pay-marks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checkout-pay-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 1.9rem;
    padding: 0 0.65rem;
    border: 1px solid rgb(10 47 53 / 14%);
    border-radius: 0.4rem;
    background: #fff;
    color: #1a1f71;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.checkout-pay-mark-mastercard {
    color: #222;
}

.checkout-pay-circles {
    width: 1.35rem;
    height: 0.85rem;
    background:
        radial-gradient(circle at 0.42rem 50%, #eb001b 0 0.38rem, transparent 0.4rem),
        radial-gradient(circle at 0.92rem 50%, #f79e1b 0 0.38rem, transparent 0.4rem);
}

.checkout-pay-mark-mpesa {
    color: #4caf50;
}
