/* ==========================================
   BERANDA NURSEDU
   Token warna & huruf ada di css/tema.css
   ========================================== */

body {
    overscroll-behavior-y: none; /* Cegah pull-to-refresh agar swipe lancar */
    -webkit-user-select: none;
    user-select: none;
    height: 100dvh; /* dynamic viewport: navigasi bawah tidak tertutup UI browser */
    width: 100vw;
    margin: 0;
    overflow: hidden;
}

.native-scroll-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    transform: translateZ(0);
    touch-action: pan-y; /* scroll atas-bawah oleh browser, swipe kiri-kanan oleh JS */
}
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.app-view { display: none; flex-direction: column; width: 100%; padding: 20px 16px 48px; }
.app-view.active { display: flex; animation: viewIn 0.28s cubic-bezier(0.25, 1, 0.5, 1); }
@keyframes viewIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: none; }
}
/* dipakai juga oleh kalkulator.css */
@keyframes slideFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- Judul halaman ---------- */
.eyebrow {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.page-head { margin-bottom: 20px; max-width: 640px; }
.page-head h1, .page-head h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-top: 4px;
}
.page-head p { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; margin-top: 6px; }

.section { margin-top: 28px; }
.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.section-head { margin-bottom: 20px; max-width: 640px; }
.section-head h2 { font-size: 28px; font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; }
.section-head p { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin-top: 8px; }
.section-title small { font-size: 12.5px; font-weight: 500; color: var(--muted); }

/* ---------- Hero (gaya Astroship: putih, judul besar, ilustrasi garis) ---------- */
.hero {
    display: grid;
    align-items: center;
    gap: 24px;
    padding: 12px 0 8px;
    color: var(--ink);
}
.hero-date { font-size: 13px; color: var(--muted); font-weight: 500; }
.hero h1 { font-size: 38px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; margin-top: 10px; }
.hero p { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; margin-top: 14px; max-width: 480px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; }
.hero-stat { font-size: 13px; color: var(--muted); }
.hero-stat b { color: var(--ink); font-weight: 700; }
.hero-art { display: none; width: 100%; max-width: 380px; justify-self: center; }

/* ---------- Kartu simulasi ---------- */
.feature-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.feature {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: 22px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.feature:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: #fff;
    margin-bottom: 14px;
}
.feature-icon svg { width: 19px; height: 19px; stroke-width: 1.9; }
.pill {
    align-self: flex-start;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink-2);
}
.feature h3 { font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; margin: 12px 0 6px; }
.feature p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.feature-actions { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.powered { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255, 255, 255, 0.75); }
.powered img { width: 22px; height: 22px; border-radius: 6px; }

/* ---------- Kartu umum ---------- */
.card-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
button.card, a.card { text-align: left; width: 100%; color: inherit; }
button.card:hover, a.card:hover { border-color: var(--ink); box-shadow: var(--shadow-hover); }
button.card:active, a.card:active { transform: scale(0.985); }

/* Akses cepat */
.tile { display: flex; align-items: center; gap: 14px; padding: 14px; }
.tile-title { font-size: 14.5px; font-weight: 700; }
.tile-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tile-end { margin-left: auto; color: var(--muted); display: flex; }
.tile-end svg { width: 18px; height: 18px; }
button.card:hover .tile-end, a.card:hover .tile-end { color: var(--accent); }

/* Modul latihan */
.module { display: flex; flex-direction: column; padding: 16px; }
.module-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.module h3 { font-size: 16.5px; letter-spacing: -0.01em; font-weight: 700; line-height: 1.35; margin-top: 12px; }
.module-meta { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.module-meta span { display: inline-flex; align-items: center; gap: 4px; }
.module-meta svg { width: 14px; height: 14px; }
.module .btn { margin-top: 14px; width: 100%; }
.badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink-2);
}
.badge-missing { background: var(--danger-soft); border-color: transparent; color: var(--danger); margin-left: 6px; }

/* Baris (panduan PDF, tim) */
.row-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.row-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.row-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row-action {
    margin-left: auto;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    color: var(--muted);
    transition: all 0.15s;
}
.row-action svg { width: 17px; height: 17px; }
a.card:hover .row-action, button.card:hover .row-action { color: #fff; border-color: var(--ink); background: var(--ink); }
.person-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--line);
    flex-shrink: 0;
}

/* ---------- Kartu video (Video OSCE) ---------- */
.video-card { display: flex; flex-direction: column; overflow: hidden; }
.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--vt-a, #0e6b42), var(--vt-b, #19a66a));
    overflow: hidden;
}
.video-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.22), transparent 62%);
}
.video-thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-art {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.video-art svg { width: 64px; height: 64px; stroke-width: 1.4; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.28)); }
.video-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    color: #0f3d2e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.video-play svg { width: 17px; height: 17px; margin-left: 2px; fill: currentColor; stroke-width: 1.5; }
.video-card:hover .video-play,
.video-card:focus-visible .video-play { transform: scale(1.12); }
.video-tag {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}
.video-tag svg { width: 13px; height: 13px; }
.video-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.video-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.video-sub { font-size: 12.5px; color: var(--muted); }

.app-footer {
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

/* ---------- Sidebar ---------- */
#sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 268px;
    max-width: 85vw;
    z-index: 80;
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(16, 42, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
body.sidebar-open #sidebar { transform: translateX(0); box-shadow: 0 10px 40px rgba(16, 42, 42, 0.2); }
body.sidebar-open #sidebar-backdrop { opacity: 1; pointer-events: auto; }

.brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 14px; }
.brand img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.brand-name { font-family: var(--font-heading); font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; }
.brand-name span { font-weight: 500; color: var(--muted); }
.brand-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.side-nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.side-group { padding: 16px 10px 6px; color: var(--muted); font-size: 11px; }
.side-item, .side-subitem {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}
.side-item svg { width: 19px; height: 19px; stroke-width: 1.9; flex-shrink: 0; }
.side-item:hover, .side-subitem:hover { background: var(--surface-2); color: var(--ink); }
.side-item.active { background: var(--ink); color: #fff; font-weight: 600; }
.side-sub { margin: 2px 0 4px 21px; padding-left: 10px; border-left: 2px solid var(--line); }
.side-subitem { padding: 7px 10px; font-size: 13px; }
.side-subitem.active { color: var(--accent); font-weight: 700; }
.side-subitem.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 7px;
    bottom: 7px;
    width: 2px;
    border-radius: 2px;
    background: var(--accent);
}
.side-foot { padding: 12px; border-top: 1px solid var(--line); }

/* ---------- Top bar (HP) ---------- */
.topbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.icon-btn { padding: 8px; border-radius: var(--radius-sm); color: var(--ink); display: flex; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; stroke-width: 1.9; }
#topbar-title { font-family: var(--font-heading); font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }

/* ---------- Navigasi bawah (HP) ---------- */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
    flex-shrink: 0;
    z-index: 50;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 64px;
    padding: 4px 0;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.15s;
}
.nav-item svg {
    width: 40px;
    height: 26px;
    padding: 3px 10px;
    border-radius: 999px;
    stroke-width: 1.9;
    transition: background 0.2s;
}
.nav-item.bottom-nav-active { color: var(--accent); font-weight: 700; }
.nav-item.bottom-nav-active svg { background: var(--accent-soft); }

/* ---------- Overlay profil tim ---------- */
#overlay-profile {
    position: absolute;
    inset: 0;
    z-index: 60;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100%);
}
#overlay-profile.active { transform: translateY(0); }
.profile-body { flex: 1; overflow-y: auto; padding: 28px 16px 48px; }
.profile-inner { max-width: 520px; margin: 0 auto; text-align: center; }
.profile-photo {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--line);
    margin: 0 auto;
    border: 4px solid #fff;
    box-shadow: var(--shadow-hover);
}
.profile-name { font-family: var(--font-heading); font-size: 26px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; margin-top: 16px; }
.profile-role {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
}
.profile-card {
    margin-top: 24px;
    padding: 18px;
    text-align: left;
}
.profile-card h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.profile-desc { color: var(--ink-2); font-size: 14.5px; line-height: 1.7; margin-top: 8px; }

/* ---------- Layar game / modul ---------- */
#view-game.active {
    display: flex;
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 9999;
    padding: 0;
    overflow: hidden;
}
#view-game iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.forced-landscape-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100dvh !important;
    height: 100vw !important;
    transform: rotate(90deg) !important;
    transform-origin: top left !important;
    margin-top: 0 !important;
    margin-left: 100vw !important;
    z-index: 99999 !important;
}

/* ==========================================
   RESPONSIF
   HP (< 1024px): sidebar = laci geser, ada top bar + navigasi bawah
   Desktop (>= 1024px): layar penuh, sidebar tetap di kiri
   ========================================== */
@media (min-width: 640px) {
    .app-view { padding: 28px 28px 56px; }
    .hero h1 { font-size: 48px; }
    .page-head h1, .page-head h2 { font-size: 36px; }
    .section-head h2 { font-size: 34px; }
    .card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .card-grid.cols-2, .card-grid.cols-auto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; padding: 28px 0 16px; }
    .hero-art { display: block; }
}
@media (min-width: 1024px) {
    .hero h1 { font-size: 56px; }
}
@media (min-width: 1024px) {
    #sidebar { position: static; transform: none; flex-shrink: 0; }
    #sidebar-backdrop { display: none; }
    .app-view { max-width: 1120px; margin: 0 auto; padding: 36px 40px 64px; }
}
@media (min-width: 1280px) {
    .card-grid.cols-auto { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Kartu Sinergi: blok hitam seperti CTA Astroship ---------- */
.feature-wide { background: linear-gradient(135deg, #0e6b42 0%, #19a66a 100%); border-color: #0e6b42; color: #fff; }
.feature-wide .feature-icon { background: #fff; color: #0e6b42; }
.feature-wide .pill { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
.feature-wide p { color: rgba(255, 255, 255, 0.72); }
@media (min-width: 768px) {
    .feature-wide { grid-column: 1 / -1; padding: 32px; }
    .feature-wide h3 { font-size: 26px; }
}

/* ==========================================
   PERPUSTAKAAN: RAK BUKU (carousel buka buku)
   Posisi tiap buku diatur js/konten.js lewat --off (jarak dari buku aktif).
   ========================================== */
.book-carousel {
    --bw: 164px;   /* lebar sampul */
    --bh: 232px;   /* tinggi sampul */
    --gap: 128px;  /* jarak antar buku di rak */
    position: relative;
    margin: 8px -16px 0;
    padding: 24px 0 12px;
    overflow: hidden;
    touch-action: pan-y;
}
.book-stage {
    position: relative;
    height: calc(var(--bh) + 40px);
    perspective: 1800px;
}
/* bayangan rak */
.book-stage::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: min(560px, 90%);
    height: 18px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(0, 0, 0, 0.12), transparent);
    pointer-events: none;
}
.book {
    --off: 0;
    --abs: 0;
    position: absolute;
    left: 50%;
    top: 0;
    width: var(--bw);
    height: var(--bh);
    margin-left: calc(var(--bw) / -2);
    transform-style: preserve-3d;
    transform:
        translateX(calc(var(--off) * var(--gap)))
        translateZ(calc(var(--abs) * -90px))
        rotateY(calc(var(--off) * -22deg));
    opacity: calc(1 - var(--abs) * 0.28);
    z-index: calc(20 - var(--abs));
    cursor: pointer;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s;
    -webkit-tap-highlight-color: transparent;
}
.book.is-far { opacity: 0; pointer-events: none; }
.book:focus-visible { outline: none; }
.book:focus-visible .cover-front { outline: 3px solid var(--ink); outline-offset: 4px; }
/* buku lain meredup saat satu buku terbuka */
.book-stage.has-open .book:not(.is-active) { opacity: 0.12; }

.book-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.6, 0.05, 0.3, 1);
}
/* saat terbuka, geser setengah lebar supaya halaman ganda tetap di tengah */
.book.is-open .book-inner { transform: translateX(50%); }

/* Halaman dalam (kanan) */
.book-page {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 18px 16px 16px 20px;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.09), transparent 18px),
        #fffdf7;
    border-radius: 2px 8px 8px 2px;
    box-shadow:
        2px 2px 0 -1px #f2eee3, 4px 4px 0 -2px #e6e0d1, 6px 6px 0 -3px #dcd5c3,
        0 18px 30px -10px rgba(0, 0, 0, 0.35);
    color: var(--ink);
    text-align: left;
}
.book-page-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.book-page h4 { font-family: var(--font-heading); font-size: 17px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-top: 8px; }
.book-page-lines { margin-top: 12px; display: grid; gap: 7px; }
.book-page-lines span { height: 3px; border-radius: 2px; background: #ece7da; }
.book-page-lines span:nth-child(2) { width: 86%; }
.book-page-lines span:nth-child(3) { width: 64%; }
.book-page .book-actions { margin-top: auto; display: grid; gap: 6px; }
.book-page .btn { width: 100%; padding: 8px 10px; font-size: 12.5px; }
.book-page .badge-missing { align-self: flex-start; margin: 0; }

/* Sampul: berputar pada engsel kiri */
.book-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 1.1s cubic-bezier(0.6, 0.05, 0.3, 1);
}
.book.is-open .book-cover { transform: rotateY(-168deg); }
.cover-front, .cover-back {
    position: absolute;
    inset: 0;
    border-radius: 2px 8px 8px 2px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.cover-front {
    display: flex;
    flex-direction: column;
    padding: 18px 16px 16px 24px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.32) 0, rgba(255, 255, 255, 0.18) 5px, rgba(0, 0, 0, 0.12) 9px, transparent 16px),
        linear-gradient(160deg, rgba(255, 255, 255, 0.14), transparent 55%),
        var(--cover, #111);
    box-shadow: 0 18px 30px -10px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.cover-front .cover-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cover-front .cover-icon svg { width: 17px; height: 17px; }
.cover-front h4 { font-family: var(--font-heading); font-size: 18px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin-top: auto; }
.cover-front .cover-brand { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.25); }
.cover-back {
    transform: rotateY(180deg);
    background:
        linear-gradient(-90deg, rgba(0, 0, 0, 0.1), transparent 18px),
        repeating-linear-gradient(0deg, transparent 0 22px, rgba(0, 0, 0, 0.035) 22px 23px),
        #f6f1e5;
    box-shadow: 0 18px 30px -10px rgba(0, 0, 0, 0.3);
}

.book-nav {
    position: absolute;
    top: calc(50% - 22px);
    z-index: 40;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.book-nav:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.book-nav:disabled { opacity: 0.3; pointer-events: none; }
.book-nav svg { width: 20px; height: 20px; }
.book-nav-prev { left: 12px; }
.book-nav-next { right: 12px; }
.book-dots { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
.book-dots button { width: 7px; height: 7px; border-radius: 999px; background: var(--line-strong); transition: width 0.25s, background 0.25s; }
.book-dots button.active { width: 22px; background: var(--ink); }
.book-hint { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 10px; }

@media (min-width: 640px) {
    .book-carousel { --bw: 196px; --bh: 276px; --gap: 170px; margin: 8px 0 0; }
    .book-page h4, .cover-front h4 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .book, .book-inner, .book-cover { transition-duration: 0.01s; }
}
