/* Text stays in the site's one family (css/typography.css), so the app's serif title is drawn in Inter.
   batch4-bookpage — the app's Book Details on the website (app/(booksv2)/book/[bookId].tsx + DetailHero tokens).
   The hero is ALWAYS dark (literal colours, like the app); the tabs and panels below follow the site theme.
   Phone (<760px): full-bleed hero over the cover. Desktop: the same dark hero with the cover card beside the text. */
#bookDetailPage:has(.bp-page) #btnBackBooks { display: none; }
.bp-page { display: block; max-width: 1040px; margin: 0 auto; grid-template-columns: none; gap: 0; }
.bp-page .bp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── hero ─────────────────────────────────────────────────────────────────── */
.bp-hero { position: relative; overflow: hidden; border-radius: 22px; background: #0b090f; color: #fff; isolation: isolate; }
.bp-hero-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; z-index: -2; filter: blur(26px) saturate(1.15); transform: scale(1.18); opacity: .6; }
.bp-hero-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,5,12,.62) 0%, rgba(8,5,12,.12) 20%, rgba(8,5,12,.55) 42%, rgba(8,5,12,.93) 62%, rgba(8,5,12,.99) 80%); }
.bp-topbar { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; z-index: 3; }
.bp-topbar-end { display: flex; gap: 8px; }
.bp-icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(28,22,38,.72); color: #fff; cursor: pointer; }
.bp-icon-btn:hover { background: rgba(48,38,64,.9); }
.bp-icon-btn:focus-visible, .bp-swipe:focus-visible, .bp-round-btn:focus-visible, .bp-stat-btn:focus-visible, .bp-rating-pill:focus-visible, .bp-cta:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.bp-dots { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; align-items: center; }
.bp-dot { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.4); }
.bp-dot.is-active { width: 22px; background: #fff; }
.bp-dot.is-small { width: 4px; height: 4px; }
.bp-swipe { position: absolute; top: 50%; z-index: 3; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(28,22,38,.72); color: #fff; cursor: pointer; }
.bp-swipe[hidden] { display: none; }
.bp-swipe-prev { left: 10px; }
.bp-swipe-next { right: 10px; }
.bp-hero-body { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: end; padding: 76px 64px 26px; }
.bp-hero .book-detail-cover { width: 220px; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.55); background: #1d1726; position: static; max-width: none; margin: 0; }
.bp-hero .book-detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-hero-info { min-width: 0; color: #fff; }
.bp-caption-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.bp-age-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #2563eb; color: #fff; font-size: 10px; font-weight: 800; }
.bp-age-dot.is-mature { background: #e11d48; }
.bp-series { font-size: 11px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; color: #efeaf6; }
.bp-series[hidden] { display: none; }
.bp-hero .book-battle-honor:empty { display: none; }
.bp-hero .bp-hero-info h1 { margin: 0 0 12px; color: #fff; font-weight: 750; font-size: clamp(30px, 4vw, 44px); line-height: 1.04; letter-spacing: -.4px; overflow-wrap: anywhere; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.bp-author-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.bp-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bp-hero .book-detail-author { margin: 0; padding: 4px 8px 4px 4px; color: #fff; background: transparent; border: 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bp-hero .book-detail-author:hover { background: rgba(255,255,255,.08); }
.bp-hero .book-detail-author .avatar { width: 44px; height: 44px; flex: none; }
.bp-hero .book-detail-author span { color: #fff; font-size: 15px; font-weight: 600; }
.bp-hero .book-detail-author strong, .bp-hero .book-detail-author-link:hover strong { color: #fff; }
.bp-follow { border: 0; border-radius: 4px; padding: 6px 16px; background: #7c4dff; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 6px 16px rgba(124,77,255,.45); }
.bp-follow[data-following="1"] { background: rgba(255,255,255,.14); box-shadow: none; }
.bp-rating-pill { display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; background: rgba(30,24,40,.45); border: 1px solid rgba(255,255,255,.12); color: #d6d0e0; font-size: 14px; cursor: pointer; }
.bp-rating-score { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(46,39,57,.8); color: #fff; font-weight: 700; }
.bp-star { color: #f5b93b; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.bp-hero .bp-chips .book-meta-badges { display: contents; }
.bp-hero .bp-chips .book-meta-badge, .bp-tag { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; border: 1px solid rgba(255,255,255,.22); color: #dcd6e6; background: transparent; text-transform: none; letter-spacing: 0; }
.bp-tag { font-weight: 600; }
.bp-hero .bp-chips .book-meta-badge-ongoing { background: rgba(245,166,35,.16); border-color: rgba(245,166,35,.48); color: #f5c26b; }
.bp-hero .bp-chips .book-meta-badge-completed { background: rgba(23,178,106,.18); border-color: rgba(23,178,106,.5); color: #3ddc97; }
.bp-hero .bp-chips .book-meta-badge-free { background: rgba(23,178,106,.18); border-color: rgba(23,178,106,.5); color: #3ddc97; }
.bp-hero .bp-chips .book-meta-badge-paid { background: rgba(124,77,255,.22); border-color: rgba(124,77,255,.55); color: #c9b5ff; }
.bp-hero .bp-chips .book-meta-badge-rating { background: rgba(37,99,235,.22); border-color: rgba(37,99,235,.55); color: #a9c3ff; }
.bp-hero .bp-chips .book-meta-badge-rating-mature { background: rgba(225,29,72,.2); border-color: rgba(225,29,72,.55); color: #ff8aa3; }
.bp-hero .bp-chips .book-meta-badge-ai { background: rgba(56,189,248,.16); border-color: rgba(56,189,248,.5); color: #7dd3fc; }
.bp-stats.book-detail-meta { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 18px 0 0; padding: 0; color: #a9a2b8; font-size: inherit; max-width: 560px; }
.bp-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 6px 2px; border: 0; background: transparent; color: #fff; border-radius: 10px; }
.bp-stat-btn { cursor: pointer; }
.bp-stat-btn:hover { background: rgba(255,255,255,.07); }
.bp-stats .bp-stat strong { color: #fff; margin: 0; font-size: 18px; font-weight: 600; line-height: 1.2; text-shadow: 0 0 4px rgba(0,0,0,.5); }
.bp-stat-label { font-size: 12.5px; color: #b7b0c5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bp-stat-icon { color: #fff; }
#btnLikeBook[data-active="1"] .bp-stat-icon { color: #ff5c8a; }
.bp-hero .book-resume { margin: 12px 0 0; max-width: 560px; }
.bp-hero .book-resume-track { height: 4px; background: rgba(255,255,255,.16); }
.bp-hero .book-resume-track span { background: linear-gradient(90deg, #9b5cff, #c08bff); }
.bp-hero .book-resume-label { color: #c7bedc; }
.bp-cta-row.book-detail-actions { display: flex; align-items: center; flex-wrap: nowrap; gap: 10px; margin-top: 14px; max-width: 560px; }
.bp-cta { flex: 1; min-width: 0; height: 52px; border-radius: 999px !important; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #6a3de8 0%, #7c4dff 55%, #8650f5 100%) !important; box-shadow: 0 10px 26px rgba(124,77,255,.35); }
.bp-cta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-round-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(26,21,34,.82); color: #d8d0e6; display: grid; place-items: center; cursor: pointer; position: relative; }
.bp-round-btn[hidden] { display: none; }
.bp-round-btn[data-active="1"], .bp-round-btn[data-on="1"] { color: #c08bff; border-color: rgba(192,139,255,.6); }
.bp-cta-row .book-editors-pick-btn { flex: none; }
.bp-hero .book-exclusive-info, .bp-hero [class*="exclusive"] { color: #fff; }

/* ── tabs + panels (theme-following) ───────────────────────────────────────── */
.bp-tabs { position: sticky; top: var(--header-h, 70px); z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px; overflow: hidden; }
.bp-tabs button { border: 0; background: transparent; padding: 14px 6px 12px; color: var(--text3); font-weight: 700; font-size: 15px; cursor: pointer; border-bottom: 3px solid transparent; }
.bp-tabs button[aria-selected="true"] { color: var(--text); font-weight: 800; border-bottom-color: #7c4dff; }
.bp-tabs button:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: -3px; }
.bp-panels { padding: 16px 2px 8px; color: var(--text); }
.bp-panel[hidden] { display: none; }
.bp-panel > * + * { margin-top: 14px; }
.bp-muted { color: var(--text3); }
body.light .bp-muted, body.light .bp-unavailable p, body.light .bp-state p { color: #5f5975; }
.bp-small { font-size: 12px; }
.bp-link { border: 0; background: none; color: var(--accent-light, #c4b5fd); font-weight: 700; cursor: pointer; padding: 4px 0; }
body.light .bp-link { color: var(--accent-dark, #5b21b6); }
.bp-link[hidden] { display: none; }
.bp-card, .bp-quotes, .bp-voice, .bp-compose-card, .bp-gifts, .bp-rating-summary, .bp-highlight, .bp-review, .bp-space-post, .bp-continue, .bp-toc-btn, .bp-state { border: 1px solid var(--border2); background: var(--bg2); border-radius: 14px; color: var(--text); }
.bp-card { padding: 14px 16px; }
.bp-card h3, .bp-quotes h3, .bp-gifts h3, .bp-card-head h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--text); }
.bp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bp-state { padding: 22px 16px; text-align: center; }
.bp-state p { margin: 4px 0 0; color: var(--text3); }
.bp-dashed { border-style: dashed; background: transparent; }
.bp-pill-btn { border: 0; border-radius: 999px; padding: 9px 18px; background: #6d28d9; color: #fff; font-weight: 700; cursor: pointer; }
.bp-pill-btn:hover { background: #5b21b6; }
.bp-more { display: block; width: 100%; margin-top: 10px; min-height: 44px; border-radius: 22px; border: 1px solid var(--border2); background: var(--bg2); color: var(--accent-light, #c4b5fd); font-weight: 700; cursor: pointer; }
body.light .bp-more { color: var(--accent-dark, #5b21b6); }

/* Overview */
.bp-synopsis-wrap { display: flex; gap: 8px; }
.bp-quote-mark { font-size: 34px; font-weight: 800; line-height: 1; color: #b79bff; }
body.light .bp-quote-mark { color: #7c4dff; }
.bp-synopsis.book-detail-description { margin: 0; padding: 0; background: none; border: 0; font-size: 16px; line-height: 1.6; white-space: pre-wrap; color: var(--text); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bp-synopsis.is-open { display: block; -webkit-line-clamp: unset; }
.bp-quotes { padding: 16px; background: linear-gradient(135deg, #2c1f55, #1f1838); }
body.light .bp-quotes { background: linear-gradient(135deg, #ece3fb, #f3edfd); border-color: #e1d6f7; }
.bp-quotes h3 { display: flex; align-items: center; gap: 8px; }
.bp-quotes > p { margin: 8px 0 12px; color: var(--text2); }
.bp-quotes blockquote { margin: 10px 0 4px; font-style: italic; font-size: 17px; line-height: 1.45; color: var(--text); }
.bp-quote-meta { margin: 0 0 12px; font-size: 12px; color: var(--text2); }
.bp-quote-list { display: grid; gap: 10px; margin-top: 14px; }
.bp-quote { border-radius: 12px; background: var(--bg2); border: 1px solid var(--border2); padding: 10px 12px; }
.bp-quote header { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.bp-quote header small { color: var(--text3); }
.bp-quote p { margin: 6px 0 0; line-height: 1.5; }
.bp-quote .is-spoiler { filter: blur(5px); cursor: pointer; user-select: none; }
.bp-quote-note { color: var(--text2); font-size: 13px; }
.bp-quote footer { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.bp-quote-like { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--text2); cursor: pointer; }
.bp-quote-like[aria-pressed="true"] { color: #ff5c8a; }
.bp-voice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; background: linear-gradient(135deg, #2b1747, #3b1f5f); border-color: transparent; color: #fff; }
.bp-voice strong { display: block; color: #fff; }
.bp-voice small { color: rgba(255,255,255,.72); }
.bp-voice audio { flex: 1; min-width: 200px; height: 36px; }
.bp-voice .bp-link { color: rgba(255,255,255,.8); }
.bp-space-banner { position: relative; overflow: hidden; border-radius: 16px; padding: 16px; color: #fff; background: linear-gradient(135deg, #3b1f74, #6b2fa6); }
.bp-space-banner::before { content: ''; position: absolute; inset: 0; background: var(--bp-space-cover, none) center / cover; opacity: .25; }
.bp-space-banner > * { position: relative; }
.bp-space-top { display: flex; gap: 12px; align-items: center; }
.bp-space-top small { font-size: 10px; letter-spacing: .8px; font-weight: 700; color: rgba(255,255,255,.7); }
.bp-space-top strong { display: block; font-size: 17px; color: #fff; }
.bp-space-top p { margin: 2px 0 0; font-size: 13px; color: rgba(255,255,255,.82); }
.bp-space-avatar { width: 54px; height: 54px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); font-weight: 800; font-size: 20px; }
.bp-space-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bp-space-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 12.5px; color: rgba(255,255,255,.85); }
.bp-space-visit { margin-left: auto; border: 0; border-radius: 999px; padding: 8px 16px; background: rgba(255,255,255,.18); color: #fff; font-weight: 700; cursor: pointer; }
.bp-space-visit:hover { background: rgba(255,255,255,.28); }
.bp-support-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.bp-support-row p { flex: 1; margin: 0; color: var(--text2); font-size: 14px; }
.bp-tile { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; background: rgba(124,77,255,.18); color: #c4b5fd; }
body.light .bp-tile { background: #efe9fd; color: #5b21b6; }
.bp-tile.is-gold { background: rgba(245,185,59,.18); color: #f5b93b; }
body.light .bp-tile.is-gold { background: #fdf3dc; color: #92400e; }
.bp-faces { display: flex; }
.bp-faces .bp-avatar + .bp-avatar { margin-left: -9px; }
.bp-avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: #6d28d9; color: #fff; font-weight: 800; }
.bp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bp-avatar-sm { width: 36px; height: 36px; font-size: 14px; }
.bp-avatar-xs { width: 26px; height: 26px; font-size: 11px; border: 2px solid var(--bg2); }
.bp-rail { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.bp-suggested.is-all .bp-rail { flex-wrap: wrap; overflow: visible; }
.bp-rail-book { flex: 0 0 112px; width: 112px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; padding: 0; }
.bp-rail-book img, .bp-rail-ph { display: block; width: 112px; aspect-ratio: 2 / 3; border-radius: 8px; object-fit: cover; background: var(--bg3); }
.bp-rail-ph { display: grid; place-items: center; font-size: 28px; color: var(--text3); }
.bp-rail-book > span:last-child { display: -webkit-box; margin-top: 6px; font-size: 13px; font-weight: 700; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Chapters (TOC) */
.bp-toc-summary { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text2); font-size: 14px; }
.bp-toc-summary strong { color: var(--text); }
.bp-continue { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; cursor: pointer; text-align: left; background: rgba(124,77,255,.12); border-color: rgba(124,77,255,.35); }
.bp-continue[hidden] { display: none; }
body.light .bp-continue { background: #faf7ff; border-color: #e3d9fb; }
.bp-continue-play { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #7c4dff; color: #fff; flex: none; }
.bp-continue-text { flex: 1; min-width: 0; }
.bp-continue-text small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .6px; color: #c4b5fd; }
body.light .bp-continue-text small, body.light .bp-continue b { color: #5527c4; }
.bp-continue-text strong { display: block; font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-continue b { color: #c4b5fd; font-size: 15px; }
.bp-toc-controls { display: flex; gap: 10px; }
.bp-toc-btn { padding: 11px 14px; font-weight: 600; cursor: pointer; color: var(--text2); }
.bp-toc-btn:first-child { flex: 1; text-align: left; }
.bp-toc-btn[aria-pressed="true"] { color: #c4b5fd; border-color: rgba(124,77,255,.6); }
body.light .bp-toc-btn[aria-pressed="true"] { color: #5527c4; }
.bp-panel .chapter-list { margin: 0; border: 1px solid var(--border2); border-radius: 14px; overflow: hidden; background: var(--bg2); }
.bp-panel .chapter-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; margin: 0; padding: 12px 10px 12px 14px; border: 0; border-bottom: 1px solid var(--border2); border-radius: 0; background: transparent; }
.bp-panel .chapter-row:last-child { border-bottom: 0; }
.bp-panel .chapter-row[hidden] { display: none; }
.bp-panel .chapter-row.is-reading { background: rgba(124,77,255,.10); }
body.light .bp-panel .chapter-row.is-reading { background: #faf7ff; }
.bp-panel .chapter-row-num { flex: none; min-width: 38px; height: 38px; padding: 0 6px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--border2); background: var(--bg3); font-weight: 800; font-size: 13px; }
.bp-panel .chapter-row.is-reading .chapter-row-num { background: #7c4dff; border-color: #7c4dff; color: #fff; }
.bp-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bp-row-title-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bp-panel .chapter-row-title { margin: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-row-meta { display: flex; flex-wrap: wrap; align-items: center; color: var(--text3); font-size: 12.5px; }
.bp-row-meta { gap: 2px 0; }
.bp-row-meta > * + *::before { content: '•'; margin: 0 7px; color: var(--text3); }
.bp-row-meta > .chapter-row-app-only::before { content: none; }
.bp-row-meta > .chapter-row-app-only { margin-left: 10px; }
.bp-row-meta > .chapter-row-cc:empty, .bp-row-meta > .chapter-row-cc:empty::before { display: none; }
.bp-panel .chapter-row-meta, .chapter-row-min { font-size: 12.5px; color: var(--text3); }
.bp-panel .chapter-row-app-only { flex-basis: auto; text-align: left; white-space: normal; }
.bp-row-state { flex: none; display: flex; align-items: center; gap: 8px; }
.bp-row-state:empty { display: none; }
.bp-pill { padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.bp-pill-unread { background: rgba(255,255,255,.08); color: var(--text2); }
.bp-pill-reading, .bp-pill-paid { background: rgba(124,77,255,.2); color: #c4b5fd; }
.bp-pill-completed, .bp-pill-unlocked { background: rgba(23,178,106,.18); color: #4ade80; }
body.light .bp-pill-unread { background: #efecf3; color: #5b5468; }
body.light .bp-pill-reading, body.light .bp-pill-paid { background: #ede6fd; color: #5527c4; }
body.light .bp-pill-completed, body.light .bp-pill-unlocked { background: #dff5e7; color: #1e7a46; }
.bp-ring { width: 34px; height: 34px; border-radius: 50%; border: 1.6px solid rgba(217,211,228,.45); display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #b79bff; }
.bp-ring-reading, .bp-ring-completed, .bp-ring-unlocked { border-color: #7c4dff; }
body.light .bp-ring { border-color: #d9d3e4; color: #7c4dff; }
body.light .bp-ring-reading, body.light .bp-ring-completed, body.light .bp-ring-unlocked { border-color: #7c4dff; }
.bp-row-more { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--text3); font-size: 20px; line-height: 1; cursor: pointer; }
.bp-row-more:hover { background: var(--bg3); color: var(--text); }

/* Reviews */
.bp-compose-card { display: flex; gap: 14px; padding: 14px; background: linear-gradient(135deg, #f2e4f5, #eadcf7); border-color: transparent; color: #2a1747; }
.bp-compose-card img { width: 84px; height: 112px; border-radius: 8px; object-fit: cover; flex: none; }
.bp-compose-card h3 { margin: 0; font-size: 17px; color: #2a1747; }
.bp-compose-card p { margin: 4px 0 0; color: #5b4a78; font-size: 14px; }
.bp-compose-btn { display: block; width: 100%; margin-top: 10px; min-height: 40px; border: 0; border-radius: 999px; background: linear-gradient(90deg, #b5379b, #7c4dff); color: #fff; font-weight: 800; letter-spacing: .3px; cursor: pointer; }
.bp-trust { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; font-weight: 600; color: #5527c4; }
.bp-trust span:last-child { color: #a3267f; }
.bp-gifts { padding: 14px 12px; background: linear-gradient(135deg, #fbf6fe, #fdf3f8, #fefaf2); border-color: #f0e6f8; color: #2c2439; text-align: center; }
.bp-gifts h3 { color: #6d28d9; letter-spacing: 1.4px; font-size: 13px; }
.bp-gift-groups { display: grid; grid-template-columns: 2fr 2fr 3fr; gap: 8px; margin-top: 10px; }
.bp-gift-group { border-radius: 11px; padding: 9px 6px; border: 1px solid #e3d9f8; background: #f3eefd; }
.bp-gift-group.is-pink { background: #fdf0f5; border-color: #f6d4e3; }
.bp-gift-group.is-gold { background: #fdf7e8; border-color: #f2e2b8; }
.bp-gift-group strong { display: block; font-size: 11px; letter-spacing: .4px; color: #6d28d9; }
.bp-gift-group.is-pink strong { color: #be185d; }
.bp-gift-group.is-gold strong { color: #92400e; }
.bp-gift-group small { display: block; font-size: 10px; color: #6b5f80; }
.bp-gift-group > div { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.bp-gift { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; flex: 1; }
.bp-gift img { width: 44px; height: 44px; padding: 5px; border-radius: 50%; background: #fff; object-fit: contain; box-shadow: 0 3px 7px rgba(90,50,140,.16); }
.bp-gift em { font-style: normal; font-size: 11px; font-weight: 600; color: #2c2439; white-space: nowrap; }
.bp-gifts > p { margin: 10px 0 0; font-size: 12px; color: #6b5f80; }
.bp-sort-rail { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.bp-sort-rail button { flex: none; border: 1px solid var(--border2); background: var(--bg2); color: var(--text2); border-radius: 999px; padding: 9px 16px; font-weight: 600; cursor: pointer; }
.bp-sort-rail button[aria-pressed="true"] { background: #7c4dff; border-color: #7c4dff; color: #fff; }
.bp-highlight { padding: 12px 14px; background: linear-gradient(135deg, #3a1630, #2a1d4f); }
body.light .bp-highlight { background: linear-gradient(135deg, #fde8ee, #efe8fd); border-color: #eadff7; }
.bp-highlight small { font-size: 11px; letter-spacing: 1.1px; font-weight: 800; color: #ff8aa3; }
body.light .bp-highlight small { color: #be123c; }
.bp-highlight strong { display: block; margin-top: 3px; }
.bp-highlight p { margin: 2px 0 0; color: var(--text2); font-size: 13px; }
.bp-highlight b { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; color: #ff8aa3; font-size: 13px; }
body.light .bp-highlight b { color: #be123c; }
.bp-rating-summary { display: flex; gap: 18px; align-items: center; padding: 14px 16px; }
.bp-rating-summary.is-empty { display: block; }
.bp-rating-summary.is-empty p { margin: 2px 0 0; color: var(--text3); }
.bp-rating-big { text-align: center; }
.bp-rating-big b { display: block; font-size: 34px; line-height: 1; }
.bp-rating-big small { display: block; color: var(--text3); font-size: 12px; }
.bp-bars { flex: 1; display: grid; gap: 4px; }
.bp-bar { display: grid; grid-template-columns: 12px 1fr 34px; align-items: center; gap: 8px; font-size: 12px; color: var(--text3); }
.bp-bar i { height: 7px; border-radius: 4px; background: var(--bg3); overflow: hidden; }
.bp-bar em { display: block; height: 100%; background: #f5b93b; border-radius: inherit; }
.bp-bar span:last-child { text-align: right; }
.bp-stars { color: #f5b93b; letter-spacing: 1px; font-size: 13px; }
.bp-stars span { color: #6f6890; }
body.light .bp-stars { color: #b7791f; }
body.light .bp-stars span { color: #8e87a3; }
.bp-review-list { display: grid; gap: 10px; }
.bp-review { padding: 12px 14px; }
.bp-review header { display: flex; gap: 10px; align-items: center; }
.bp-review header strong { color: var(--text); }
.bp-review-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text3); }
.bp-you { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(124,77,255,.2); color: #c4b5fd; font-size: 11px; font-weight: 700; }
body.light .bp-you { background: #ede6fd; color: #5527c4; }
.bp-review-text { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; color: var(--text); }
.bp-review.is-compact .bp-review-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bp-review.is-compact { border: 0; border-top: 1px solid var(--border2); border-radius: 0; padding: 10px 0 0; background: transparent; }
.bp-author-reply { margin-top: 8px; padding: 8px 10px; border-left: 3px solid #7c4dff; background: var(--bg3); border-radius: 0 8px 8px 0; }
.bp-author-reply small { color: var(--text3); font-weight: 700; }
.bp-author-reply p { margin: 3px 0 0; }
.bp-review footer { margin-top: 8px; }
.bp-helpful { border: 1px solid var(--border2); background: transparent; color: var(--text2); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.bp-helpful[aria-pressed="true"] { color: #c4b5fd; border-color: rgba(124,77,255,.6); }
body.light .bp-helpful[aria-pressed="true"] { color: #5527c4; }
.bp-helpful:disabled { opacity: .55; cursor: default; }

/* Space tab */
.bp-space-feed { display: grid; gap: 10px; }
.bp-space-post { display: block; width: 100%; padding: 12px 14px; text-align: left; cursor: pointer; }
.bp-space-post header { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.bp-space-post header time { margin-left: auto; color: var(--text3); font-size: 12px; }
.bp-space-post p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.bp-space-post img { display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; margin-top: 8px; }
.bp-space-post footer { display: flex; gap: 14px; margin-top: 8px; color: var(--text3); font-size: 12.5px; }
.bp-space-post footer span { display: inline-flex; align-items: center; gap: 4px; }
.bp-exclusive-tag { display: inline-block; margin-top: 8px; padding: 3px 9px; border-radius: 999px; background: linear-gradient(90deg, #f7d774, #c99a1e); color: #2b1d00; font-size: 11.5px; font-weight: 800; }

/* Not found (books-komiks-023) */
.bp-unavailable { padding: 56px 16px; text-align: center; }
.bp-unavailable h2 { margin: 0 0 6px; font-size: 20px; color: var(--text); }
.bp-unavailable p { margin: 0; color: var(--text3); }

/* ── centred dialogs (owner rule: pop-ups always centred) ─────────────────── */
.bp-dialog-backdrop { position: fixed; inset: 0; z-index: 11000; display: grid; place-items: center; padding: 16px; background: rgba(8,5,14,.6); }
.bp-dialog { width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 18px; border-radius: 20px; background: var(--bg2); color: var(--text); border: 1px solid var(--border2); box-shadow: 0 24px 70px rgba(0,0,0,.45); animation: bp-in .18s ease-out; }
@keyframes bp-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bp-dialog { animation: none; } }
.bp-dialog h2 { margin: 0 0 10px; font-size: 18px; color: var(--text); }
.bp-menu-head { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--border2); }
.bp-menu-head h2 { margin: 0; font-size: 16px; }
.bp-menu-head p { margin: 2px 0 0; color: var(--text3); font-size: 13px; }
.bp-menu-cover { width: 44px; height: 64px; border-radius: 6px; object-fit: cover; }
.bp-menu-group { display: grid; padding: 6px 0; border-bottom: 1px solid var(--border2); }
.bp-menu-row { border: 0; background: none; color: var(--text); text-align: left; padding: 12px 6px; border-radius: 10px; font-weight: 600; cursor: pointer; }
.bp-menu-row:hover { background: var(--bg3); }
.bp-menu-row.is-danger { color: #f87171; }
body.light .bp-menu-row.is-danger { color: #b91c1c; }
.bp-menu-cancel { display: block; width: 100%; margin-top: 8px; border: 0; background: none; color: var(--text3); padding: 12px; font-weight: 600; cursor: pointer; border-radius: 10px; }
.bp-menu-cancel:hover { background: var(--bg3); }
.bp-confirm { text-align: center; }
.bp-confirm p { color: var(--text3); }
.bp-confirm-actions, .bp-composer-actions { display: flex; gap: 10px; margin-top: 14px; }
.bp-confirm-actions button, .bp-composer-actions button { flex: 1; min-height: 44px; border-radius: 999px; border: 1px solid var(--border2); background: transparent; color: var(--text2); font-weight: 700; cursor: pointer; }
.bp-confirm-actions .is-danger { color: #fff; background: #dc2626; border-color: #dc2626; }
.bp-composer-actions .is-primary { color: #fff; background: #6d28d9; border-color: #6d28d9; }
.bp-composer-actions .is-primary:disabled { background: var(--bg4); border-color: var(--bg4); color: var(--text3); cursor: not-allowed; }
.bp-composer textarea, .bp-list-new input, .bp-field select { width: 100%; box-sizing: border-box; border: 1px solid var(--border2); background: var(--bg3); color: var(--text); border-radius: 10px; padding: 10px; font: inherit; }
.bp-composer textarea { min-height: 110px; resize: vertical; }
.bp-star-row { display: flex; gap: 6px; margin-bottom: 10px; }
.bp-star-row button { border: 0; background: none; font-size: 32px; line-height: 1; color: #6f6890; cursor: pointer; padding: 2px; }
body.light .bp-star-row button { color: #8e87a3; }
body.light .bp-star-row button.is-on { color: #b7791f; }
.bp-star-row button.is-on { color: #f5b93b; }
.bp-counter { margin: 4px 0 0; font-size: 12px; color: var(--text3); }
.bp-error { margin: 6px 0 0; font-size: 13px; color: #f87171; font-weight: 600; }
body.light .bp-error { color: #be123c; }
.bp-error[hidden] { display: none; }
.bp-gift-note { margin: 8px 0 0; font-size: 13px; color: var(--text2); }
.bp-field { display: grid; gap: 4px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--text2); }
.bp-check { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 14px; }
.bp-list-rows { display: grid; gap: 6px; }
.bp-list-row { display: flex; justify-content: space-between; gap: 10px; border: 1px solid var(--border2); background: var(--bg3); color: var(--text); border-radius: 12px; padding: 12px; cursor: pointer; text-align: left; }
.bp-list-row small { color: var(--text3); white-space: nowrap; }
.bp-list-row[aria-disabled="true"] { opacity: .6; cursor: default; }
.bp-list-new { display: flex; gap: 8px; margin-top: 12px; }
.bp-list-new button { border: 0; border-radius: 10px; padding: 0 14px; background: #6d28d9; color: #fff; font-weight: 700; cursor: pointer; }

/* ── phone: the app's full-bleed hero ─────────────────────────────────────── */
@media (max-width: 759px) {
  #bookDetailPage:has(.bp-page) { padding-top: 0; }
  .bp-hero { margin: calc(-1 * var(--bp-page-pad-top, 16px)) calc(-1 * var(--bp-page-pad-x, 16px)) 0; border-radius: 0; min-height: 560px; display: flex; flex-direction: column; justify-content: flex-end; }
  .bp-hero-backdrop { filter: none; transform: none; opacity: 1; height: 62%; }
  .bp-hero-body { display: block; padding: 260px 16px 18px; }
  .bp-hero .book-detail-cover { display: none; }
  .bp-hero-info h1 { font-size: 34px; }
  .bp-author-row { gap: 10px; }
  .bp-rating-pill { font-size: 13px; }
  .bp-stats.book-detail-meta { max-width: none; }
  .bp-stats .bp-stat strong { font-size: 17px; }
  .bp-stat-label { font-size: 12px; }
  .bp-swipe { top: 210px; }
  .bp-tabs { margin: 0 calc(-1 * var(--bp-page-pad-x, 16px)); border-radius: 0; border-left: 0; border-right: 0; top: var(--header-h, 100px); }
  .bp-tabs button { font-size: 14px; }
  .bp-panel .chapter-row { gap: 10px; padding: 11px 8px 11px 10px; }
  .bp-pill { padding: 3px 8px; font-size: 11px; }
  .bp-ring { width: 30px; height: 30px; }
  .bp-gift-groups { grid-template-columns: 1fr 1fr; }
  .bp-gift-group.is-gold { grid-column: 1 / -1; }
  .bp-compose-card img { width: 66px; height: 88px; }
}
@media (max-width: 480px) {
  .bp-row-state .bp-pill { display: none; }
}
[data-bp-space] > * + *, [data-bp-reviews] > * + *, [data-bp-overview] > :not(:empty) ~ :not(:empty), [data-bp-overview] > :not(:empty) ~ section:not([hidden]) { margin-top: 14px; }
[data-bp-overview] > :empty { display: none; }
