.book-detail-page {
    position: relative;
    padding-top: 24px;
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
}

.book-detail-page img,
.book-detail-page video {
    max-width: 100%;
    height: auto;
}

.book-detail-page .rn-section-gap {
    padding-top: 90px;
    padding-bottom: 60px;
}

.book-detail-page .book-hero-row {
    margin-top: 0;
    padding-top: 12px;
}

.book-detail-page::before,
.book-detail-page::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
    will-change: auto;
}

.book-detail-page::before {
    top: 70px;
    left: -150px;
    background: radial-gradient(circle, rgba(255, 1, 79, 0.55), rgba(255, 1, 79, 0));
}

.book-detail-page::after {
    right: -160px;
    bottom: 180px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.45), rgba(37, 99, 235, 0));
}

.book-detail-page .container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.book-detail-page .book-detail-bottom {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.book-hero-banner {
    margin-top: 20px;
    margin-bottom: 36px;
    padding: 28px 32px;
    border-radius: 28px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.94) 55%, rgba(255, 241, 246, 0.9) 100%);
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}

.book-hero-banner::before {
    content: "";
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 0;
    width: 5px;
    height: auto;
    border-radius: 0 6px 6px 0;
    background: linear-gradient(180deg, var(--color-primary), #ff6b9d);
}

.book-hero-banner-inner {
    position: relative;
    z-index: 1;
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
}

.book-hero-top {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.book-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(255, 1, 79, 0.1);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.book-hero-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.12);
    border: 1px solid rgba(5, 150, 105, 0.28);
    color: #047857;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.book-hero-title {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.65rem, 4.8vw, 2.85rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    word-break: break-word;
}

.book-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.book-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #475569;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
}

.book-hero-chip i {
    color: var(--color-primary);
    font-size: 0.85rem;
}

.book-premium-grid {
    align-items: flex-start;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.book-glass-card {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 30px;
    background: var(--gradient-box-w);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    contain: layout style;
}

.book-cover-panel {
    padding: 30px;
}

.book-cover-stage {
    position: relative;
    min-height: 520px;
    border-radius: 26px;
    padding: 28px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.28), transparent 28%),
        linear-gradient(145deg, #111827 0%, #1f2937 48%, #070b14 100%);
    overflow: hidden;
}

.book-cover-stage::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
}

.book-cover-stage::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150%;
    left: 12%;
    top: -24%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: rotate(19deg);
}

.book-cover-image {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.book-meta-panel {
    margin-top: 24px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.88) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.book-meta-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.book-meta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 1, 79, 0.14), rgba(255, 1, 79, 0.04));
    color: var(--color-primary);
    font-size: 1.1rem;
}

.book-meta-heading {
    text-align: left;
}

.book-meta-subtitle {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
}

.book-section-eyebrow {
    display: inline-block;
    margin-bottom: 0;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.book-facts {
    display: grid;
    gap: 0;
    margin: 0;
}

.book-fact-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 4px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.book-fact-row:last-child {
    border-bottom: 0;
    padding-bottom: 4px;
}

.book-fact-row:first-child {
    padding-top: 4px;
}

.book-fact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
    font-size: 0.95rem;
}

.book-fact-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    text-align: left;
}

.book-fact-label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.book-fact-value {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-word;
}

.book-fact-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.book-fact-row--price {
    margin-top: 6px;
    padding: 18px 16px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(16, 185, 129, 0.06));
    align-items: center;
}

.book-fact-row--price-solo {
    padding: 16px 18px;
}

.book-fact-row--price-solo .book-fact-content {
    gap: 6px;
}

.book-fact-icon--price {
    background: rgba(5, 150, 105, 0.14);
    color: #047857;
}

.book-price-display {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.book-price-offers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.book-price-original {
    color: #64748b;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: line-through;
    line-height: 1.4;
}

.book-price-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 1, 79, 0.1);
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
}

.book-price-value {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    color: #047857;
    font-size: clamp(1.25rem, 2vw + 0.95rem, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(5, 150, 105, 0.22);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.08);
}

.book-fact-row--price-solo .book-price-display {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 19px;
}

.book-fact-row--price-solo .book-price-value {
    margin-top: 0;
}

.book-price-value--free {
    color: #047857;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: clamp(1.05rem, 1.5vw + 0.85rem, 1.3rem);
}

.book-price-coupon-hint {
    display: block;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed rgba(5, 150, 105, 0.18);
    color: #475569;
    font-size: clamp(0.82rem, 0.5vw + 0.75rem, 0.92rem);
    font-weight: 600;
    line-height: 1.5;
}

.book-price-coupon-hint strong {
    color: #0f172a;
    font-weight: 800;
}

.book-content-panel {
    padding: 36px;
}

.book-summary-card {
    margin-bottom: 28px;
}

.book-summary-title {
    color: #0f172a;
    font-size: clamp(1.9rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.book-author-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 22px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 1, 79, 0.08);
    color: #475569;
    font-weight: 700;
}

.book-author-pill i {
    color: var(--color-primary);
    font-size: 0.95rem;
}

.book-detail-page .book-content-panel .book-description,
.book-detail-page .book-description {
    font-size: clamp(1rem, 0.45vw + 0.92rem, 1.12rem);
}

/* Rich text — override CKEditor inline styles; match book detail light theme */
.book-description.book-rich-text {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
    padding: 1.2rem 1.3rem;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
    color: #475569;
    font-size: clamp(1rem, 0.45vw + 0.92rem, 1.12rem);
    line-height: 1.9;
    text-align: justify;
    text-justify: inter-word;
    -webkit-text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.book-description.book-rich-text,
.book-description.book-rich-text p,
.book-description.book-rich-text li,
.book-description.book-rich-text div,
.book-description.book-rich-text span,
.book-description.book-rich-text td,
.book-description.book-rich-text th {
    font-family: var(--font-primary, 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
}

.book-description.book-rich-text p,
.book-description.book-rich-text li,
.book-description.book-rich-text div,
.book-description.book-rich-text span {
    font-size: inherit !important;
    line-height: 1.9 !important;
    color: #475569 !important;
}

.book-description.book-rich-text h1,
.book-description.book-rich-text h2,
.book-description.book-rich-text h3,
.book-description.book-rich-text h4,
.book-description.book-rich-text h5,
.book-description.book-rich-text h6 {
    display: block;
    width: 100%;
    max-width: 100%;
    color: #0f172a !important;
    font-family: var(--font-primary, inherit);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.35;
    text-align: left;
}

.book-description.book-rich-text h1 {
    font-size: clamp(1.35rem, 3vw, 1.6rem) !important;
    font-weight: 800;
    margin: 0 0 0.85rem;
}

.book-description.book-rich-text h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.38rem) !important;
    margin: 1.35rem 0 0.65rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--color-primary);
}

.book-description.book-rich-text h3 {
    font-size: clamp(1.1rem, 2.2vw, 1.24rem) !important;
    margin: 1.1rem 0 0.5rem;
}

.book-description.book-rich-text h4 {
    font-size: clamp(1.02rem, 2vw, 1.12rem) !important;
    margin: 0.95rem 0 0.45rem;
    font-weight: 600;
}

.book-description.book-rich-text h5,
.book-description.book-rich-text h6 {
    font-size: clamp(0.98rem, 1.8vw, 1.05rem) !important;
    margin: 0.85rem 0 0.4rem;
    font-weight: 600;
}

.book-description.book-rich-text p {
    margin: 0 0 1.1rem;
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.book-description.book-rich-text p:last-child {
    margin-bottom: 0;
}

.book-description.book-rich-text strong,
.book-description.book-rich-text b {
    font-weight: 700;
    color: #0f172a !important;
}

.book-description.book-rich-text em,
.book-description.book-rich-text i:not([class]) {
    font-style: italic;
}

.book-description.book-rich-text ul,
.book-description.book-rich-text ol {
    margin: 0.35rem 0 1rem;
    padding: 0 0 0 1.35rem;
    color: #475569;
}

.book-description.book-rich-text li {
    margin: 0.5rem 0;
    text-align: justify;
    text-justify: inter-word;
}

.book-description.book-rich-text a {
    color: var(--color-primary) !important;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 1, 79, 0.35);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.book-description.book-rich-text a:hover {
    color: #c4003d !important;
    border-bottom-color: rgba(196, 0, 61, 0.55);
}

.book-description.book-rich-text hr {
    border: none;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
    margin: 1.25rem 0;
}

.book-description.book-rich-text blockquote {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    border-left: 4px solid var(--color-primary);
    border-radius: 0 10px 10px 0;
    background: rgba(255, 1, 79, 0.06);
    color: #475569 !important;
    font-style: italic;
}

.book-description.book-rich-text p code,
.book-description.book-rich-text li code,
.book-description.book-rich-text code:not(pre code) {
    display: inline-block;
    max-width: 100%;
    background: rgba(255, 1, 79, 0.07) !important;
    color: var(--color-primary) !important;
    padding: 0.12rem 0.45rem !important;
    border-radius: 6px !important;
    font-family: var(--font-primary, 'Fira Code', Consolas, monospace) !important;
    font-size: 0.88em !important;
    border: 1px solid rgba(255, 1, 79, 0.16) !important;
    word-break: break-word;
    white-space: pre-wrap;
}

.book-description.book-rich-text pre {
    margin: 1rem 0;
    padding: 1rem 1.1rem !important;
    border-radius: 12px !important;
    background: #0d1013 !important;
    color: #c4cfde !important;
    border: 1px solid #212428 !important;
    font-family: var(--font-primary, 'Fira Code', Consolas, monospace) !important;
    font-size: clamp(0.78rem, 1.5vw, 0.86rem) !important;
    line-height: 1.7 !important;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 100%;
}

.book-description.book-rich-text pre::-webkit-scrollbar {
    height: 6px;
}

.book-description.book-rich-text pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.book-description.book-rich-text pre code {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    border: none !important;
    font-size: inherit !important;
}

.book-description.book-rich-text table {
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.9em;
}

.book-description.book-rich-text th,
.book-description.book-rich-text td {
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    text-align: left;
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
}

.book-description.book-rich-text th {
    background: rgba(255, 1, 79, 0.08);
    color: #0f172a !important;
    font-weight: 700;
}

.book-description.book-rich-text figure {
    margin: 1.25rem 0;
    max-width: 100%;
}

.book-description.book-rich-text img {
    display: block;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    margin: 0.75rem auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.book-description.book-rich-text iframe,
.book-description.book-rich-text video {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    min-height: 200px;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 12px;
}

.book-preview-card,
.book-review-card,
.book-reviews-card {
    padding: 30px;
}

.book-preview-frame {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: clamp(580px, 84vh, 980px);
    min-height: 460px;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #0f172a;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    -webkit-overflow-scrolling: touch;
}

.book-flipbook {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 50% 18%, rgba(102, 126, 234, 0.16), transparent 42%),
        linear-gradient(160deg, #111827 0%, #0f172a 52%, #1e1b4b 100%);
}

.book-flipbook__loader {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    color: rgba(248, 250, 252, 0.88);
    text-align: center;
}

.book-flipbook__loader p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.book-flipbook__loader-ring {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.14);
    border-top-color: var(--color-primary);
    animation: bookFlipbookSpin 0.85s linear infinite;
}

@keyframes bookFlipbookSpin {
    to {
        transform: rotate(360deg);
    }
}

.book-flipbook__shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0.85rem 0.85rem 1rem;
}

.book-flipbook__toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.book-flipbook__toolbar-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.14);
    margin: 0 0.15rem;
}

.book-flipbook__zoom {
    min-width: 52px;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-align: center;
}

.book-flipbook__btn--reset {
    font-size: 0.82rem;
}

.book-flipbook__status {
    min-width: 72px;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
}

.book-flipbook__btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.book-flipbook__btn:hover:not(:disabled) {
    background: rgba(255, 1, 79, 0.18);
    border-color: rgba(255, 1, 79, 0.35);
    color: #fff;
    transform: translateY(-1px);
}

.book-flipbook__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.book-flipbook__viewport {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0.5rem;
    position: relative;
    touch-action: pan-x pan-y;
}

.book-flipbook__viewport.is-zoomed {
    overflow: auto;
    align-items: flex-start;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y pinch-zoom;
}

.book-flipbook.is-zoom-loading .book-flipbook__stage {
    opacity: 0.72;
    pointer-events: none;
}

.book-flipbook__stage {
    position: relative;
    width: var(--flip-spread-w, 840px);
    height: var(--flip-page-h, 594px);
    flex-shrink: 0;
}

.book-flipbook__mount {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-flipbook__pageflip {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-flipbook__viewport::before {
    content: "";
    position: absolute;
    inset: 8% 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, transparent 72%);
    pointer-events: none;
    z-index: 0;
}

.book-flipbook__mount .stf__wrapper {
    margin: 0 auto;
}

.book-flipbook__mount .stf__block {
    border-radius: 4px;
    overflow: hidden;
}

.book-flipbook__mount .stf__item,
.book-flipbook__mount .stf__block {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.book-flipbook__mount .stf__item img,
.book-flipbook__mount .stf__block img {
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

.book-flipbook__mount canvas.stf__canvas {
    display: block;
}

.book-preview-iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    border: 0;
    background: #ffffff;
}

.book-preview-iframe--fallback[hidden] {
    display: none !important;
}

.book-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.book-card-heading h3,
.book-card-heading h4,
.book-card-heading h5 {
    margin: 0;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: clamp(1.05rem, 2.8vw, 1.45rem);
    line-height: 1.3;
    word-break: break-word;
    flex: 1;
    min-width: 0;
}

.book-card-heading .heading-line {
    flex: 1;
    height: 1px;
    min-width: 42px;
    background: linear-gradient(90deg, rgba(255, 1, 79, 0.45), rgba(15, 23, 42, 0.04));
}

.book-review-card {
    margin-top: 28px;
}

.book-review-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.book-review-header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 197, 24, 0.22), rgba(245, 197, 24, 0.08));
    color: #d97706;
    font-size: 1.1rem;
}

.book-review-header-copy {
    text-align: left;
    min-width: 0;
}

.book-review-header-title {
    margin: 6px 0 0;
    color: #0f172a;
    font-size: clamp(1.1rem, 2.6vw, 1.45rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.book-review-header-sub {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.book-review-form {
    display: grid;
    gap: 22px;
}

.book-rating-stage {
    padding: 22px 20px 24px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
}

.book-rating-stage-top {
    text-align: center;
    margin-bottom: 18px;
}

.book-rating-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 1, 79, 0.1);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.book-rating-prompt {
    margin: 12px 0 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
}

.book-review-card .wrapper {
    margin: 0 auto;
    width: 100%;
    max-width: 380px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}

.book-review-card .wrapper .content {
    padding: 28px 24px 22px;
}

.book-review-card .wrapper .footer {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    height: auto;
    min-height: 55px;
    padding: 12px 20px;
}

.book-review-card .wrapper .footer span {
    color: #334155;
    font-size: 0.95rem;
    font-weight: 600;
}

.book-review-card .stars {
    margin-top: 22px;
}

.book-review-card .stars label {
    font-size: 32px;
    margin: 0 4px;
    color: #cbd5e1;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.book-review-card .stars label:hover {
    transform: scale(1.08);
}

.book-review-compose {
    padding: 22px 20px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.88) 100%);
}

.book-review-compose-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.book-review-compose-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.book-review-compose-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 1, 79, 0.1);
    color: var(--color-primary);
    font-size: 0.9rem;
}

.book-review-compose label {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.book-review-compose textarea {
    width: 100%;
    min-height: 160px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    padding: 18px 20px;
    resize: vertical;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.65;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.book-review-compose textarea::placeholder {
    color: #94a3b8;
}

.book-review-compose textarea:focus {
    outline: none;
    border-color: rgba(255, 1, 79, 0.45);
    box-shadow: 0 0 0 4px rgba(255, 1, 79, 0.1);
}

.book-review-submit {
    display: flex;
    justify-content: center;
    margin-top: 4px;
    padding-top: 6px;
}

.book-review-card .book-review-submit .book-review-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    min-height: 52px;
    padding: 14px 32px;
    border: 0;
    border-radius: 999px;
    background: var(--color-primary);
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(255, 1, 79, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.book-review-card .book-review-submit .book-review-btn::before {
    display: none;
}

.book-review-card .book-review-submit .book-review-btn:hover,
.book-review-card .book-review-submit .book-review-btn:focus {
    transform: translateY(-2px);
    background: #e6004a;
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(255, 1, 79, 0.34);
    outline: none;
}

.book-review-card .book-review-submit .book-review-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(255, 1, 79, 0.24);
}

.book-review-body {
    flex: 1;
    min-width: 0;
}

.book-alerts .alert {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.book-preview-card {
    margin-top: 8px;
}

.book-reviews-card {
    margin-top: 24px;
}

.book-review-list {
    display: grid;
    gap: 18px;
}

.book-user-review {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    content-visibility: auto;
    contain-intrinsic-size: auto 180px;
}

.book-review-person {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.book-review-avatar {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(145deg, #e2e8f0, #ffffff);
    box-shadow: var(--shadow-white-3);
}

.book-review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-review-meta {
    margin-bottom: 8px;
}

.book-review-date {
    display: block;
    margin-bottom: 5px;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.book-review-name {
    margin: 0;
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 800;
}

.book-review-copy {
    margin: 0;
    color: #475569;
    line-height: 1.75;
}

.book-review-stars {
    min-width: 0;
    text-align: right;
}

.book-review-stars .rating {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px;
}

.book-review-stars .fa-star,
.book-review-stars .fa {
    color: #f5c518;
    font-size: 1.25rem;
}

.book-preview-card,
.book-reviews-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

@media only screen and (max-width: 1199px) {
    .book-cover-stage {
        min-height: 460px;
    }

    .book-cover-image {
        max-height: 420px;
    }

    .book-content-panel {
        padding: 30px;
    }
}

@media only screen and (max-width: 991px) {
    .book-detail-page.main-page-wrapper {
        margin-top: 2rem !important;
    }

    .book-detail-page .rn-section-gap {
        padding-top: 72px;
        padding-bottom: 48px;
    }

    .book-detail-page .book-hero-row {
        padding-top: 10px;
    }

    .book-hero-banner {
        margin-top: 16px;
    }

    .book-premium-grid > [class*="col-"] {
        padding-left: 12px;
        padding-right: 12px;
    }

    .book-cover-panel,
    .book-content-panel,
    .book-preview-card,
    .book-review-card,
    .book-reviews-card {
        padding: 24px;
    }

    .book-preview-frame {
        height: clamp(520px, 80vh, 840px);
        min-height: 420px;
    }
}

@media only screen and (max-width: 767px) {
    .book-detail-page {
        padding-top: 16px;
    }

    .book-detail-page .rn-section-gap {
        padding-top: 56px;
        padding-bottom: 36px;
    }

    .book-detail-page .book-hero-row {
        padding-top: 8px;
    }

    .book-hero-banner {
        margin-top: 12px;
    }

    .book-hero-banner::before {
        top: 16px;
        bottom: 16px;
    }

    .book-detail-page .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .book-detail-page .row {
        margin-left: 0;
        margin-right: 0;
    }

    .book-detail-bottom > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    .book-detail-page::before,
    .book-detail-page::after {
        display: none;
    }

    .book-hero-banner {
        margin-bottom: 22px;
        padding: 22px 18px;
        border-radius: 22px;
    }

    .book-hero-title {
        font-size: clamp(1.45rem, 6.5vw, 2rem);
    }

    .book-hero-meta {
        margin-top: 14px;
        gap: 8px;
    }

    .book-hero-chip {
        font-size: 0.86rem;
        padding: 8px 12px;
    }

    .book-glass-card {
        border-radius: 22px;
    }

    .book-cover-panel {
        padding: 20px;
    }

    .book-cover-stage {
        min-height: auto;
        aspect-ratio: 4 / 5;
        max-height: 520px;
        padding: 20px 16px;
    }

    .book-cover-image {
        max-height: 100%;
        width: auto;
        max-width: 100%;
    }

    .book-meta-panel {
        padding: 16px 14px;
        border-radius: 18px;
    }

    .book-meta-header {
        gap: 12px;
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .book-meta-badge {
        width: 40px;
        height: 40px;
    }

    .book-meta-subtitle {
        font-size: 0.82rem;
    }

    .book-fact-row {
        padding: 14px 2px;
    }

    .book-fact-row--price {
        padding: 14px 12px;
    }

    .book-fact-row--price-solo .book-price-display {
        flex-direction: row;
    }

    .book-fact-title {
        font-size: 1.05rem;
    }

    .book-price-display {
        gap: 8px;
    }

    .book-price-value {
        font-size: 1.25rem;
        padding: 7px 14px;
    }

    .book-price-original {
        font-size: 0.92rem;
    }

    .book-content-panel {
        padding: 22px 20px;
    }

    .book-summary-title {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .book-author-pill {
        display: flex;
        width: 100%;
        max-width: 100%;
        flex-wrap: wrap;
        border-radius: 16px;
        font-size: 0.95rem;
    }

    .book-description.book-rich-text {
        padding: 1rem 0.95rem;
        border-radius: 14px;
        font-size: 0.95rem;
        line-height: 1.75;
    }

    .book-description.book-rich-text p,
    .book-description.book-rich-text li,
    .book-description.book-rich-text div,
    .book-description.book-rich-text span {
        line-height: 1.75 !important;
    }

    .book-description.book-rich-text h1 {
        font-size: 1.28rem !important;
    }

    .book-description.book-rich-text h2 {
        font-size: 1.15rem !important;
        margin-top: 1rem;
    }

    .book-description.book-rich-text h3 {
        font-size: 1.06rem !important;
    }

    .book-description.book-rich-text pre {
        padding: 0.85rem 0.9rem !important;
        font-size: 0.76rem !important;
    }

    .book-description.book-rich-text ul,
    .book-description.book-rich-text ol {
        padding-left: 1.15rem;
    }

    .book-card-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .book-card-heading .heading-line {
        width: 100%;
    }

    .book-preview-card,
    .book-review-card,
    .book-reviews-card {
        padding: 20px;
    }

    .book-preview-frame {
        height: clamp(480px, 74vh, 720px);
        min-height: 380px;
        border-radius: 16px;
    }

    .book-preview-card {
        width: 100%;
        max-width: 100%;
    }

    .book-user-review {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
        border-radius: 18px;
    }

    .book-review-stars {
        text-align: left;
    }

    .book-review-stars .rating {
        justify-content: flex-start;
    }

    .book-review-submit .book-review-btn {
        max-width: 100%;
    }

    .book-alerts .alert {
        font-size: 0.9rem;
        text-align: left;
    }
}

@media only screen and (max-width: 575px) {
    .book-detail-page.main-page-wrapper {
        margin-top: 1.25rem !important;
    }

    .book-detail-page .rn-section-gap {
        padding-top: 48px;
        padding-bottom: 28px;
    }

    .book-hero-banner {
        margin-top: 10px;
    }

    .book-hero-banner::before {
        top: 14px;
        bottom: 14px;
    }

    .book-detail-page .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .book-hero-banner {
        margin-bottom: 18px;
        padding: 18px 14px;
        border-radius: 18px;
    }

    .book-premium-grid > [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    .book-cover-panel,
    .book-content-panel,
    .book-preview-card,
    .book-review-card,
    .book-reviews-card {
        padding: 16px;
    }

    .book-cover-stage {
        aspect-ratio: 3 / 4;
        border-radius: 18px;
        padding: 16px 12px;
    }

    .book-cover-stage::before {
        inset: 12px;
        border-radius: 14px;
    }

    .book-fact-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .book-fact-value {
        font-size: 0.98rem;
    }

    .book-summary-card {
        margin-bottom: 0;
    }

    .book-review-card {
        margin-top: 20px;
    }

    .book-review-card .wrapper {
        max-width: 100%;
    }

    .book-review-card .wrapper .content {
        padding: 20px 14px;
    }

    .book-review-card .wrapper .outer {
        height: 110px;
        width: 110px;
    }

    .book-review-card #star-2:checked ~ .content .emojis .slideImg {
        margin-top: -110px;
    }

    .book-review-card #star-3:checked ~ .content .emojis .slideImg {
        margin-top: -220px;
    }

    .book-review-card #star-4:checked ~ .content .emojis .slideImg {
        margin-top: -330px;
    }

    .book-review-card #star-5:checked ~ .content .emojis .slideImg {
        margin-top: -440px;
    }

    .book-review-card .stars label {
        font-size: 24px;
        margin: 0;
    }

    .book-review-header {
        gap: 12px;
        margin-bottom: 18px;
        padding-bottom: 16px;
    }

    .book-review-header-badge {
        width: 40px;
        height: 40px;
    }

    .book-rating-stage,
    .book-review-compose {
        padding: 16px 14px;
        border-radius: 18px;
    }

    .book-review-compose textarea {
        min-height: 120px;
        padding: 14px 16px;
        border-radius: 16px;
        font-size: 0.95rem;
    }

    .book-review-submit .book-review-btn {
        max-width: 100%;
    }

    .book-review-person {
        gap: 14px;
    }

    .book-review-avatar {
        width: 56px;
        height: 56px;
        flex: 0 0 56px;
        border-radius: 16px;
    }

    .book-review-name {
        font-size: 1rem;
    }

    .book-review-stars .fa-star,
    .book-review-stars .fa {
        font-size: 1.1rem;
    }

    .book-preview-frame {
        height: clamp(400px, 68vh, 620px);
        min-height: 340px;
        border-radius: 14px;
    }

    .book-flipbook__shell {
        padding: 0.65rem 0.55rem 0.75rem;
    }

    .book-flipbook__toolbar {
        width: 100%;
        gap: 0.45rem;
        margin-bottom: 0.55rem;
        padding: 0.35rem 0.45rem;
        border-radius: 16px;
    }

    .book-flipbook__toolbar-divider {
        height: 24px;
    }

    .book-flipbook__btn {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
    }

    .book-flipbook__zoom {
        min-width: 46px;
        font-size: 0.72rem;
        padding: 0.3rem 0.4rem;
    }

    .book-flipbook__status {
        min-width: 64px;
        font-size: 0.76rem;
        padding: 0.35rem 0.65rem;
    }

    .book-flipbook__viewport {
        padding: 0.35rem;
    }

    .book-preview-card {
        padding: 14px;
    }
}

@media only screen and (max-width: 480px) {
    .book-preview-frame {
        height: clamp(360px, 62vh, 560px);
        min-height: 320px;
    }

    .book-flipbook__shell {
        padding: 0.5rem 0.4rem 0.65rem;
    }

    .book-flipbook__toolbar {
        gap: 0.35rem;
        padding: 0.3rem 0.35rem;
    }

    .book-flipbook__btn {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .book-flipbook__btn--reset {
        margin-left: 0.1rem;
    }

    .book-flipbook__zoom {
        min-width: 42px;
    }
}

@media only screen and (orientation: landscape) and (max-height: 520px) {
    .book-preview-frame {
        height: clamp(280px, 86vh, 520px);
        min-height: 240px;
    }

    .book-flipbook__shell {
        padding: 0.45rem 0.5rem 0.55rem;
    }

    .book-flipbook__toolbar {
        margin-bottom: 0.4rem;
        padding: 0.25rem 0.4rem;
    }

    .book-flipbook__viewport {
        padding: 0.25rem;
    }

    .book-cover-stage {
        max-height: 320px;
        aspect-ratio: auto;
        min-height: 220px;
    }
}

@media only screen and (max-width: 380px) {
    .book-hero-banner {
        padding: 18px 14px;
        border-radius: 18px;
    }

    .book-hero-eyebrow,
    .book-hero-status {
        font-size: 10px;
        padding: 6px 12px;
    }

    .book-hero-title {
        font-size: 1.35rem;
    }

    .book-hero-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .book-hero-chip {
        justify-content: center;
    }

    .book-section-eyebrow {
        font-size: 10px;
        letter-spacing: 0.1em;
    }

    .book-meta-subtitle {
        font-size: 0.78rem;
    }

    .book-card-heading h3,
    .book-card-heading h4,
    .book-card-heading h5 {
        font-size: 1rem;
    }
}

/* ── Premium layout stack (matches course details) ─────────────────────────── */
.book-premium-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    height: 100%;
}

.book-cover-panel.book-glass-card {
    padding: 24px;
}

.book-purchase-panel {
    padding: 24px;
    border-radius: 30px;
    background: var(--gradient-box-w);
}

.book-purchase-panel .book-meta-header {
    margin-bottom: 18px;
    padding-bottom: 16px;
}

.book-purchase-panel .book-facts {
    margin-bottom: 4px;
}

.book-premium-stack .book-review-card {
    margin-top: 0;
}

.book-meta-actions {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.book-meta-actions a.rn-btn.book-meta-btn {
    display: inline-flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 14px 24px;
    border-radius: 999px;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-align: center;
    vertical-align: middle;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-meta-actions a.rn-btn.book-meta-btn::before {
    display: none;
}

.book-meta-actions a.rn-btn.book-meta-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.15em;
    height: 1.15em;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-size: 1.1em;
    vertical-align: middle;
}

.book-meta-actions a.rn-btn.book-meta-btn--primary {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(255, 1, 79, 0.28);
}

.book-meta-actions a.rn-btn.book-meta-btn--primary:hover {
    transform: translateY(-2px);
    background: #e6004a;
    box-shadow: 0 14px 30px rgba(255, 1, 79, 0.34);
    color: #ffffff;
}

@media only screen and (min-width: 992px) {
    .book-premium-column {
        margin-bottom: 2.5rem;
    }

    .book-premium-stack {
        min-height: 100%;
    }
}

/* ── Inline Ratings Widget ───────────────────────────────────────────────── */
.book-ratings-widget-panel {
    padding: 24px;
    border-radius: 30px;
    background: var(--gradient-box-w);
    margin-top: 0;
}

.book-ratings-widget-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.book-ratings-widget-badge {
    margin-top: 2px;
}

.book-ratings-widget-head-copy {
    flex: 1;
    min-width: 0;
}

.book-ratings-widget-title {
    margin: 4px 0 8px;
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;
}

.book-ratings-widget-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.book-ratings-widget-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 1, 79, 0.14), rgba(255, 1, 79, 0.05));
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

.book-ratings-widget-score-label {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
}

.book-ratings-widget-count {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
}

.book-ratings-widget-scroll {
    max-height: min(560px, 62vh);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    margin-bottom: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.18) transparent;
}

.book-ratings-widget-scroll::-webkit-scrollbar {
    width: 5px;
}

.book-ratings-widget-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.book-ratings-widget-scroll::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.16);
    border-radius: 999px;
}

.book-ratings-widget-list {
    display: grid;
    gap: 12px;
}

.book-ratings-widget-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    animation: bookRatingsWidgetFadeIn 0.32s ease both;
}

@keyframes bookRatingsWidgetFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-ratings-widget-avatar {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(145deg, #e2e8f0, #ffffff);
    box-shadow: var(--shadow-white-3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-ratings-widget-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-ratings-widget-avatar .book-ratings-widget-initials {
    color: #475569;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
}

.book-ratings-widget-body {
    flex: 1;
    min-width: 0;
}

.book-ratings-widget-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.book-ratings-widget-meta {
    min-width: 0;
}

.book-ratings-widget-name {
    display: block;
    margin: 0 0 3px;
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.3;
    word-break: break-word;
}

.book-ratings-widget-date {
    display: block;
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.book-ratings-widget-stars {
    display: flex;
    flex-shrink: 0;
    gap: 2px;
    margin-top: 2px;
}

.book-ratings-widget-stars .fa-star {
    color: #f5c518;
    font-size: 0.88rem;
}

.book-ratings-widget-stars .fa-star.empty {
    color: #cbd5e1;
}

.book-ratings-widget-feedback {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.65;
    word-break: break-word;
}

.book-ratings-widget-loading,
.book-ratings-widget-empty,
.book-ratings-widget-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 180px;
    padding: 24px 16px;
    border-radius: 20px;
    border: 1px dashed rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.55);
    color: #64748b;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
}

.book-ratings-widget-loading-ring {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(15, 23, 42, 0.08);
    border-top-color: var(--color-primary);
    animation: bookRatingsWidgetSpin 0.75s linear infinite;
}

@keyframes bookRatingsWidgetSpin {
    to {
        transform: rotate(360deg);
    }
}

.book-ratings-widget-pagination {
    margin-top: 4px;
    padding-top: 18px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.book-ratings-pagination-bar {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
    align-items: center;
    gap: 12px 14px;
    width: 100%;
}

.book-ratings-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    min-width: 0;
    padding: 0 18px;
    margin: 0;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    color: #0f172a;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 6px 16px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.book-ratings-pagination-bar .book-ratings-pager-btn--prev {
    justify-self: start;
}

.book-ratings-pagination-bar .book-ratings-pager-btn--next {
    justify-self: end;
}

.book-ratings-pager-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 1, 79, 0.14), rgba(255, 1, 79, 0.05));
    color: var(--color-primary);
    font-size: 0.76rem;
    line-height: 1;
}

.book-ratings-pager-label {
    line-height: 1;
}

.book-ratings-pager-btn:not(:disabled):hover {
    transform: translateY(-2px);
    border-color: rgba(255, 1, 79, 0.28);
    color: var(--color-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 10px 24px rgba(255, 1, 79, 0.18);
}

.book-ratings-pager-btn:not(:disabled):active {
    transform: translateY(0);
}

.book-ratings-pager-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.book-ratings-pager-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.book-ratings-pager-status {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.book-ratings-page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
}

.book-ratings-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0 !important;
    margin: 0;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 50%;
    background: #ffffff;
    color: #475569;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.book-ratings-page-btn--wide {
    width: auto;
    min-width: 38px;
    padding: 0 8px !important;
    border-radius: 999px;
}

.book-ratings-page-btn:hover {
    border-color: rgba(255, 1, 79, 0.35);
    color: var(--color-primary);
}

.book-ratings-page-btn.is-active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(255, 1, 79, 0.22);
}

.book-ratings-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

@media only screen and (max-width: 991px) {
    .book-purchase-panel,
    .book-ratings-widget-panel {
        padding: 20px;
    }
}

@media only screen and (max-width: 767px) {
    .book-ratings-widget-panel {
        padding: 18px 16px;
        border-radius: 24px;
    }

    .book-ratings-widget-head {
        gap: 12px;
    }

    .book-ratings-widget-title {
        font-size: 1.05rem;
    }

    .book-ratings-widget-scroll {
        max-height: min(460px, 56vh);
    }

    .book-ratings-widget-item {
        padding: 14px;
        border-radius: 18px;
    }

    .book-ratings-widget-top {
        flex-direction: column;
        gap: 6px;
    }

    .book-ratings-widget-pagination {
        padding-top: 14px;
    }

    .book-ratings-pagination-bar {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "center center"
            "prev next";
        gap: 10px;
    }

    .book-ratings-pager-center {
        grid-area: center;
    }

    .book-ratings-pagination-bar .book-ratings-pager-btn--prev {
        grid-area: prev;
        justify-self: stretch;
    }

    .book-ratings-pagination-bar .book-ratings-pager-btn--next {
        grid-area: next;
        justify-self: stretch;
    }

    .book-ratings-pager-btn {
        width: 100%;
        padding: 0 14px;
    }

    .book-ratings-widget-summary {
        gap: 6px 10px;
    }

    .book-meta-actions a.rn-btn.book-meta-btn {
        min-height: 48px;
        font-size: 0.92rem;
    }
}

/* ==========================================================================
   Dark mode — book details
   Hero banner + glass cards are light surfaces; keep original dark ink.
   ========================================================================== */

html[data-pyguru-theme="dark"] .book-detail-page .book-hero-title {
    color: #0f172a !important;
}

html[data-pyguru-theme="dark"] .book-detail-page .book-hero-chip {
    color: #475569 !important;
}

html[data-pyguru-theme="dark"] .book-detail-page .book-hero-eyebrow {
    color: var(--color-primary, #ff014f) !important;
}
