:root {
    --bk-pink: #ff85a2;
    --bk-sky: #38bdf8;
    --bk-mint: #34d399;
    --bk-cream: #f0f9ff;
    --bk-ink: #4a304d;
}
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
    background: radial-gradient(ellipse at 10% 8%, #ffe4ec 0, transparent 38%),
                radial-gradient(ellipse at 92% 18%, #dff6ff 0, transparent 36%),
                radial-gradient(ellipse at 50% 85%, #d1fae5 0, transparent 40%),
                #f0f9ff !important;
    color: var(--bk-ink);
    overflow-x: hidden;
}
button, a { cursor: pointer; position: relative; z-index: 2; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f0f9ff; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #ff85a2, #38bdf8, #34d399); border-radius: 9999px; }

.tab-panel { animation: fadeSlide 0.25s ease-out forwards; }
@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Reader Themes */
.reader-light { background-color: #FFFFFF; color: #1F2937; }
.reader-sepia { background-color: #FBF5E6; color: #3E2F1C; }
.reader-dark  { background-color: #18181B; color: #E4E4E7; }

/* Top Nav 3D Pastel Jelly Icon Buttons */
header.sticky {
    background: rgba(240, 249, 255, .94) !important;
    border-bottom: 2px solid #bae6fd !important;
    box-shadow: 0 6px 24px rgba(56, 189, 248, .12) !important;
}
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4a3556;
    background: linear-gradient(180deg, #ffffff, #f0f9ff);
    border: 1.5px solid #bae6fd;
    box-shadow: 0 3px 0 #7dd3fc;
    transition: transform 0.15s, background 0.15s;
}
.nav-btn:hover { transform: translateY(-2px); background: #e0f2fe; }
.nav-btn img { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(56, 189, 248, .22)); }
.nav-btn.active-nav-3d {
    background: linear-gradient(135deg, #ff85a2 0%, #38bdf8 55%, #34d399 100%) !important;
    color: #ffffff !important;
    border-color: #ffffff;
    box-shadow: 0 4px 0 #0284c7, 0 8px 15px rgba(56, 189, 248, 0.28);
}

/* Hero Section - Pastel Pink / Sky Blue / Mint */
.bk-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 16px;
    align-items: center;
    overflow: hidden;
    min-height: 340px;
    padding: 28px 35px;
    border: 3px solid #fff;
    outline: 2px solid #bae6fd;
    border-radius: 34px;
    background: radial-gradient(circle at 12% 18%, #fef3c7 0, transparent 35%),
                linear-gradient(125deg, #ffe4ec 0%, #e0f2fe 50%, #d1fae5 100%) !important;
    box-shadow: 0 11px 0 #7dd3fc, 0 22px 45px rgba(56, 189, 248, .18);
}
.bk-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1.5px solid #7dd3fc; background: #f0f9ff; color: #0369a1;
    border-radius: 50px; padding: 7px 13px; font-size: 10px; font-weight: 700;
    box-shadow: 0 3px 0 #bae6fd;
}
.bk-hero h2 {
    font-size: clamp(1.65rem, 3.1vw, 2.65rem);
    color: #4a304d; font-weight: 800; line-height: 1.42; margin: 15px 0 9px;
}
.bk-hero h2 em { font-style: normal; color: #0284c7; text-shadow: 0 2px 0 #fff; }
.bk-jelly-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: 17px; font-weight: 700; font-size: .84rem;
    border: 2px solid rgba(255, 255, 255, .95); transition: transform .18s;
    text-decoration: none; white-space: nowrap; cursor: pointer;
}
.bk-jelly-btn:hover { transform: translateY(-3px); }
.bk-jelly-primary {
    background: linear-gradient(135deg, #ff85a2 0%, #38bdf8 100%); color: white;
    box-shadow: 0 5px 0 #0284c7, 0 10px 17px rgba(56, 189, 248, .25);
}
.bk-jelly-light {
    background: linear-gradient(180deg, #ffffff, #ecfdf5); color: #047857;
    box-shadow: 0 5px 0 #6ee7b7, 0 10px 17px rgba(16, 185, 129, .14);
}
.bk-hero-art { position: relative; display: flex; align-items: center; justify-content: center; height: 300px; pointer-events: none; }
.bk-hero-art img { width: min(100%, 340px); height: 100%; object-fit: contain; filter: drop-shadow(0 16px 17px rgba(56, 189, 248, .22)); }

/* 3D Jelly Cards & Banners */
.bk-jelly-card {
    background: #fff; border: 2px solid #fff; outline: 1.5px solid #bae6fd;
    border-radius: 26px; box-shadow: 0 6px 0 #bae6fd, 0 14px 25px rgba(56, 189, 248, .10);
    transition: transform .18s;
}
.bk-art-banner {
    position: relative; display: flex; align-items: center; gap: 20px;
    min-height: 165px; padding: 18px 28px; border: 2px solid #fff; border-radius: 30px;
    outline: 2px solid #bae6fd; background: linear-gradient(120deg, #e0f2fe 0%, #fce7f3 52%, #d1fae5 100%) !important;
    box-shadow: 0 7px 0 #7dd3fc, 0 13px 22px rgba(56, 189, 248, .15); overflow: hidden;
}
.bk-art-banner > img {
    width: 195px; height: 145px; object-fit: contain; flex-shrink: 0;
    filter: drop-shadow(0 8px 12px rgba(56, 189, 248, .22));
}
.bk-art-banner h2 { font-size: clamp(1.25rem, 2.5vw, 1.8rem); font-weight: 800; color: #0369a1; line-height: 1.4; }
.bk-art-banner p { font-size: .88rem; color: #475569; line-height: 1.6; margin-top: 4px; }

/* Community Links */
.bk-community {
    background: linear-gradient(135deg, #e0f2fe 0%, #fce7f3 50%, #d1fae5 100%) !important;
    border: 2px solid #fff; outline: 2px solid #bae6fd; border-radius: 28px; padding: 22px;
    box-shadow: 0 7px 0 #7dd3fc, 0 15px 32px rgba(56, 189, 248, .14);
}
.bk-community-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.bk-community-link {
    display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 13px;
    border-radius: 20px; border: 1.5px solid rgba(255, 255, 255, .9);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .9), 0 5px 0 rgba(56, 189, 248, .16);
    text-decoration: none; color: #334155; transition: transform .18s;
}
.bk-community-link:hover { transform: translateY(-3px); }
.bk-community-link i {
    width: 39px; height: 39px; border-radius: 14px; background: rgba(255, 255, 255, .8);
    display: flex; justify-content: center; align-items: center; font-size: 1.1rem; flex-shrink: 0;
}
.bk-community-link.fb { background: #dbeafe; }
.bk-community-link.tiktok { background: #fce7f3; }
.bk-community-link.line { background: #d1fae5; }
.bk-community-link.openchat { background: #fef3c7; }
.bk-reading-platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.bk-reading-platforms a, .bk-reading-platforms span {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    text-align: center; padding: 10px 6px; border-radius: 14px; font-weight: 600; font-size: .75rem;
}
.bk-reading-platforms a {
    background: #fff; border: 1.5px solid #bae6fd; color: #0369a1;
    box-shadow: 0 3px 0 #7dd3fc; text-decoration: none;
}
.bk-reading-platforms span { background: #f0f9ff; color: #64748b; border: 1px dashed #93c5fd; }

.bk-plaque-img {
    display: block; object-fit: contain; width: min(100%, 340px); height: auto; max-height: 135px;
    filter: drop-shadow(0 6px 10px rgba(56, 189, 248, .22));
}

@media(min-width: 700px) { .bk-community-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media(max-width: 1023px) {
    nav.mob-nav {
        padding: 4px 4px 6px !important;
        background: rgba(240, 249, 255, .97) !important;
        box-shadow: 0 -7px 25px rgba(56, 189, 248, .2) !important;
    }
    body { padding-bottom: 96px !important; }
}
@media(max-width: 700px) {
    .bk-hero { grid-template-columns: 1fr; padding: 22px 20px 16px; border-radius: 27px; }
    .bk-hero-art { height: 210px; }
    .bk-art-banner { flex-direction: column; text-align: center; padding: 18px 16px; gap: 10px; }
    .bk-art-banner > img { width: 185px; height: 135px; }
    .bk-reading-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
   SECURITY & ANTI-COPY PROTECTION (ห้ามคลุมดำ / ห้ามเซฟรูป / ห้ามปริ้นท์)
========================================================== */
#chapter-reader-modal,
#comic-reader-modal,
#reader-text-body,
#comic-reader-images {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

#comic-reader-images img,
#gallery-grid img {
    pointer-events: none !important;
    -webkit-user-drag: none !important;
}

/* เอฟเฟกต์เบลอเนื้อหาทันทีเมื่อสลับหน้าจอหรือพยายามแคปจอ */
.bk-security-blur #reader-text-body,
.bk-security-blur #comic-reader-images {
    filter: blur(22px) brightness(0.3) !important;
    transition: filter 0.1s ease !important;
}