/*
 * Tampilan Backpacker Indonesia (palet "Laut & Senja").
 * Satu-satunya stylesheet situs selain Bootstrap 5 dan Bootstrap Icons; jangan tambah
 * <style> di template. Warna diambil dari logo paus (navy) dan senja (oranye).
 */

:root {
    --bpi-navy: #0A345A;
    --bpi-navy-rgb: 10, 52, 90;
    --bpi-navy-soft: #E5ECF3;
    --bpi-sunset: #F26B3A;          /* aksen: titik notifikasi, garis aktif */
    --bpi-action: #C8501F;          /* tombol aksi; versi gelap senja agar teks putih terbaca */
    --bpi-action-hover: #A9431A;
    --bpi-action-soft: #FDEBE2;
    --bpi-action-text: #8A3A12;
    --bpi-teal: #157282;
    --bpi-teal-soft: #E3F2F4;
    --bpi-sand: #F7F5F0;
    --bpi-sand-deep: #F3F0EA;
    --bpi-line: #E7E2D8;
    --bpi-line-soft: #F0ECE4;
    --bpi-text: #1A2533;
    --bpi-text-2: #3D4756;
    --bpi-muted: #5B6675;
    --bpi-radius: 14px;
    --bpi-topbar-h: 60px;
    --bpi-bottomnav-h: 64px;
    --bpi-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Bootstrap memakai warna utama situs */
    --bs-primary: var(--bpi-navy);
    --bs-primary-rgb: var(--bpi-navy-rgb);
    --bs-primary-text-emphasis: var(--bpi-navy);
    --bs-primary-bg-subtle: var(--bpi-navy-soft);
    --bs-primary-border-subtle: #B9CAD9;
    --bs-link-color: var(--bpi-teal);
    --bs-link-color-rgb: 21, 114, 130;
    --bs-link-hover-color: var(--bpi-navy);
    --bs-link-hover-color-rgb: var(--bpi-navy-rgb);
    --bs-body-font-family: var(--bpi-font);
    --bs-body-color: var(--bpi-text);
    --bs-body-bg: var(--bpi-sand);
    --bs-border-color: var(--bpi-line);
    --bs-secondary-color: var(--bpi-muted);
    --bs-border-radius: 10px;
    --bs-border-radius-lg: var(--bpi-radius);
}

body {
    font-family: var(--bpi-font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--bpi-text);
    background: var(--bpi-sand);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { color: var(--bpi-text); letter-spacing: -0.005em; }
h1 { font-size: 1.375rem; font-weight: 800; line-height: 1.25; }
h2 { font-size: 1.125rem; font-weight: 800; }
@media (min-width: 992px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }
}
.text-muted, .text-secondary { color: var(--bpi-muted) !important; }
.text-break { overflow-wrap: anywhere; }

/* ---------- Tombol ---------- */
.btn { font-weight: 700; border-radius: 12px; }
.btn-sm { border-radius: 10px; }
.btn-primary {
    --bs-btn-bg: var(--bpi-navy); --bs-btn-border-color: var(--bpi-navy);
    --bs-btn-hover-bg: #072845; --bs-btn-hover-border-color: #072845;
    --bs-btn-active-bg: #072845; --bs-btn-active-border-color: #072845;
    --bs-btn-disabled-bg: var(--bpi-navy); --bs-btn-disabled-border-color: var(--bpi-navy);
}
.btn-outline-primary {
    --bs-btn-color: var(--bpi-navy); --bs-btn-border-color: #B9CAD9; --bs-btn-bg: #fff;
    --bs-btn-hover-bg: var(--bpi-navy-soft); --bs-btn-hover-color: var(--bpi-navy); --bs-btn-hover-border-color: #B9CAD9;
    --bs-btn-active-bg: var(--bpi-navy-soft); --bs-btn-active-color: var(--bpi-navy); --bs-btn-active-border-color: var(--bpi-navy);
    --bs-btn-disabled-color: var(--bpi-muted); --bs-btn-disabled-border-color: var(--bpi-line);
}
.btn-accent {
    --bs-btn-color: #fff; --bs-btn-bg: var(--bpi-action); --bs-btn-border-color: var(--bpi-action);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--bpi-action-hover); --bs-btn-hover-border-color: var(--bpi-action-hover);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--bpi-action-hover); --bs-btn-active-border-color: var(--bpi-action-hover);
    --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--bpi-action); --bs-btn-disabled-border-color: var(--bpi-action);
}
.btn-line {
    --bs-btn-color: var(--bpi-navy); --bs-btn-bg: #fff; --bs-btn-border-color: #CFC9BD;
    --bs-btn-hover-color: var(--bpi-navy); --bs-btn-hover-bg: var(--bpi-sand-deep); --bs-btn-hover-border-color: #BDB6A8;
    --bs-btn-active-color: var(--bpi-navy); --bs-btn-active-bg: var(--bpi-navy-soft); --bs-btn-active-border-color: #B9CAD9;
}
.btn-ghost {
    --bs-btn-color: var(--bpi-text-2); --bs-btn-bg: transparent; --bs-btn-border-color: transparent;
    --bs-btn-hover-color: var(--bpi-navy); --bs-btn-hover-bg: var(--bpi-sand-deep); --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: var(--bpi-navy); --bs-btn-active-bg: var(--bpi-navy-soft); --bs-btn-active-border-color: transparent;
    font-weight: 600;
}
.btn-icon {
    width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; position: relative; font-size: 1.15rem;
}
.form-control, .form-select { border-color: #DCD6CA; border-radius: 12px; background-color: #FBFAF7; }
.form-control:focus, .form-select:focus { border-color: #8FA9C2; box-shadow: 0 0 0 .2rem rgba(var(--bpi-navy-rgb), .12); background-color: #fff; }

/* ---------- Bilah atas ---------- */
.bpi-topbar {
    position: sticky; top: 0; z-index: 1030;
    background: #fff; border-bottom: 1px solid var(--bpi-line);
}
.bpi-topbar-inner {
    max-width: 1320px; margin: 0 auto; height: var(--bpi-topbar-h);
    display: flex; align-items: center; gap: 8px; padding: 0 8px 0 14px;
}
@media (min-width: 992px) { .bpi-topbar-inner { padding: 0 24px; gap: 16px; } }
.bpi-brand { display: flex; align-items: center; gap: 10px; color: var(--bpi-navy); font-weight: 800; font-size: 16px; white-space: nowrap; }
.bpi-brand:hover { text-decoration: none; color: var(--bpi-navy); }
.bpi-brand img { border-radius: 50%; }
@media (min-width: 992px) { .bpi-brand { font-size: 18px; width: 236px; flex: none; } }
.bpi-search {
    flex: 1 1 320px; max-width: 560px; height: 42px; display: flex; align-items: center; gap: 8px;
    padding: 0 6px 0 14px; border-radius: 999px; background: var(--bpi-sand-deep); border: 1px solid var(--bpi-line);
}
.bpi-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 14.5px; outline: none; }
.bpi-search:focus-within { border-color: #8FA9C2; background: #fff; }
.bpi-topbar .btn-icon { color: var(--bpi-navy); }
.bpi-topbar .btn-icon:hover { background: var(--bpi-sand-deep); }
.bpi-badge {
    position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 9px; background: var(--bpi-sunset); color: var(--bpi-text);
    font-size: 10.5px; font-weight: 800; line-height: 14px; text-align: center; border: 2px solid #fff;
}
.bpi-avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--bpi-navy-soft); }

/* ---------- Kerangka halaman ---------- */
.bpi-shell {
    max-width: 1320px; margin: 0 auto; display: flex; align-items: flex-start; gap: 28px;
    padding: 12px 12px calc(var(--bpi-bottomnav-h) + 28px + env(safe-area-inset-bottom));
}
@media (min-width: 992px) { .bpi-shell { padding: 20px 24px 48px; } }
.bpi-main { flex: 1 1 auto; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.bpi-main.bpi-main-wide { max-width: none; }
.bpi-sidebar {
    flex: 0 0 236px; position: sticky; top: calc(var(--bpi-topbar-h) + 20px);
    max-height: calc(100vh - var(--bpi-topbar-h) - 32px); overflow-y: auto; scrollbar-width: thin;
    flex-direction: column;
}
/* Kolom kanan setinggi konten; hanya iklannya yang menempel saat discroll. Jangan buat seluruh
   kolom sticky: kolom yang lebih tinggi dari layar membuat iklan di bawahnya tidak pernah terlihat. */
.bpi-aside { flex: 0 0 300px; flex-direction: column; gap: 18px; align-self: stretch; }
.bpi-aside-sticky { position: sticky; top: calc(var(--bpi-topbar-h) + 20px); }
.bpi-nav-link {
    display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px;
    color: #2A3442; font-weight: 600; font-size: 14.5px;
}
.bpi-nav-link i { font-size: 1.1rem; color: var(--bpi-muted); }
.bpi-nav-link:hover { background: var(--bpi-sand-deep); color: var(--bpi-navy); text-decoration: none; }
.bpi-nav-link.active { background: var(--bpi-navy-soft); color: var(--bpi-navy); font-weight: 800; }
.bpi-nav-link.active i { color: var(--bpi-navy); }
.bpi-nav-heading { margin: 16px 12px 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bpi-muted); }
.bpi-footer-links { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--bpi-muted); }
.bpi-footer-links a { color: var(--bpi-muted); }

/* ---------- Navigasi bawah (HP) ---------- */
.bpi-bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    height: calc(var(--bpi-bottomnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: #fff; border-top: 1px solid var(--bpi-line);
    display: flex; align-items: center; justify-content: space-around;
}
.bpi-bn-item {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    min-width: 60px; height: 100%; font-size: 11.5px; font-weight: 600; color: var(--bpi-muted);
    background: none; border: 0; font-family: inherit;
}
.bpi-bn-item i { font-size: 1.3rem; line-height: 1.1; }
.bpi-bn-item:hover { text-decoration: none; color: var(--bpi-navy); }
.bpi-bn-item.active { color: var(--bpi-navy); }
.bpi-bn-item.active::before { content: ""; position: absolute; top: 0; left: 18px; right: 18px; height: 3px; border-radius: 0 0 3px 3px; background: var(--bpi-sunset); }
.bpi-bn-item .bpi-badge { top: 6px; right: 10px; }
.bpi-bn-create {
    width: 52px; height: 52px; margin-top: -22px; border-radius: 16px; border: 0;
    background: var(--bpi-action); color: #fff; font-size: 1.6rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 14px rgba(200, 80, 31, .35);
}
.bpi-bn-create:hover { background: var(--bpi-action-hover); color: #fff; text-decoration: none; }

/* ---------- Kartu umum ---------- */
.bpi-card { background: #fff; border: 1px solid var(--bpi-line); border-radius: var(--bpi-radius); padding: 14px; }
@media (min-width: 992px) { .bpi-card { padding: 16px; } }
.bpi-card-title { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.bpi-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bpi-section-head h2 { margin: 0; }
.bpi-meta { font-size: 13px; color: var(--bpi-muted); }
.bpi-clamp-2, .bpi-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.bpi-clamp-2 { -webkit-line-clamp: 2; }
.bpi-clamp-3 { -webkit-line-clamp: 3; }
.bpi-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--bpi-muted); }
.bpi-breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #9A9385; }
.bpi-breadcrumb [aria-current] { color: var(--bpi-muted); }
.bpi-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 16px; }
.bpi-empty img { border-radius: 50%; opacity: .85; }
.bpi-alerts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bpi-alerts .alert { margin: 0; border-radius: 12px; }

/* Tag, label perjalanan, peringkat user */
.bpi-tag {
    display: inline-block; font-size: 12.5px; font-weight: 600; line-height: 1.6; color: var(--bpi-teal);
    background: var(--bpi-teal-soft); border-radius: 6px; padding: 1px 8px;
}
.bpi-tag:hover { text-decoration: none; background: #CFE8EC; color: var(--bpi-navy); }
.bpi-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bpi-trip {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; line-height: 1.6;
    color: var(--bpi-action-text); background: var(--bpi-action-soft); border-radius: 6px; padding: 1px 8px;
}
.bpi-trip.is-past { color: var(--bpi-muted); background: #EFECE6; }
.bpi-rank { font-size: 11.5px; font-weight: 700; color: var(--bpi-navy); background: var(--bpi-navy-soft); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.bpi-rank.is-author { color: var(--bpi-action-text); background: var(--bpi-action-soft); }

/* Chip (urutkan) dan tab feed */
.bpi-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 2px 12px; }
.bpi-chips::-webkit-scrollbar { display: none; }
@media (min-width: 992px) { .bpi-chips { margin: 0; padding: 2px 0; flex-wrap: wrap; } }
.bpi-chip {
    display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; flex: none;
    border: 1px solid #E1DCD1; background: #fff; color: var(--bpi-text); font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.bpi-chip:hover { text-decoration: none; border-color: #B9CAD9; color: var(--bpi-navy); }
.bpi-chip.active { background: var(--bpi-navy); border-color: var(--bpi-navy); color: #fff; }
.bpi-tabs { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; margin: -12px -12px 0; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--bpi-line); }
.bpi-tabs::-webkit-scrollbar { display: none; }
.bpi-tab { display: inline-flex; align-items: center; height: 46px; padding: 0 2px; flex: none; font-size: 14.5px; font-weight: 700; color: var(--bpi-muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.bpi-tab:hover { text-decoration: none; color: var(--bpi-navy); }
.bpi-tab.active { color: var(--bpi-navy); border-bottom-color: var(--bpi-sunset); }

/* ---------- Kartu topik (daftar node) ---------- */
.bpi-feed { display: flex; flex-direction: column; gap: 12px; }
.bpi-node { display: flex; flex-direction: column; gap: 10px; }
.bpi-node-head { display: flex; align-items: center; gap: 10px; }
.bpi-node-head .bpi-meta { line-height: 1.35; }
.bpi-node-author { font-size: 13.5px; font-weight: 700; color: var(--bpi-text); }
.bpi-node-body { display: flex; gap: 12px; }
.bpi-node-title { font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--bpi-text); overflow-wrap: anywhere; }
.bpi-node-title:hover { color: var(--bpi-navy); }
.bpi-node-excerpt { margin: 4px 0 0; font-size: 14px; color: var(--bpi-muted); overflow-wrap: anywhere; }
.bpi-node-thumb { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bpi-navy-soft); }
@media (min-width: 992px) {
    .bpi-node-title { font-size: 17px; }
    .bpi-node-thumb { width: 148px; height: 112px; border-radius: 12px; }
}
.bpi-node-foot { display: flex; align-items: center; gap: 2px; border-top: 1px solid var(--bpi-line-soft); padding-top: 6px; margin: 0 -6px -6px; }
.bpi-act {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px;
    font-size: 13.5px; font-weight: 600; color: var(--bpi-text-2); background: transparent; border: 0; font-family: inherit;
}
.bpi-act:hover { background: var(--bpi-sand-deep); color: var(--bpi-navy); text-decoration: none; }
.bpi-act i { font-size: 1rem; }
.bpi-node .dropdown-toggle::after { display: none; }

/* ---------- Beranda ---------- */
.bpi-hero { background: var(--bpi-navy); color: #fff; border-radius: 20px; padding: 24px 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.bpi-hero h1 { color: #fff; margin: 0; font-size: 26px; }
.bpi-hero p { margin: 6px 0 0; color: #D7E2EC; font-size: 15.5px; }
.bpi-hero .bpi-hero-text { flex: 1 1 320px; }
.bpi-hero .btn-hero-line { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.5); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: rgba(255,255,255,.1); --bs-btn-hover-border-color: #fff; }
@media (min-width: 992px) { .bpi-hero { padding: 28px; } .bpi-hero h1 { font-size: 30px; } }
.bpi-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .bpi-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bpi-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--bpi-radius); background: #fff; border: 1px solid var(--bpi-line); color: var(--bpi-text); }
.bpi-tile:hover { text-decoration: none; border-color: #B9CAD9; color: var(--bpi-text); }
.bpi-tile strong { font-size: 14.5px; color: var(--bpi-text); }
.bpi-tile span:not(.bpi-icon-box) { font-size: 12.5px; color: var(--bpi-muted); }
.bpi-icon-box { width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; flex: none; }
.bpi-tone-trip { background: var(--bpi-action-soft); color: var(--bpi-action-hover); }
.bpi-tone-qna { background: var(--bpi-teal-soft); color: var(--bpi-teal); }
.bpi-tone-blog { background: var(--bpi-navy-soft); color: var(--bpi-navy); }
.bpi-tone-gallery { background: #E7F1E8; color: #2F6B3A; }
.bpi-tone-ad { background: #F1EBF8; color: #5A3F8C; }

.bpi-composer { display: flex; flex-direction: column; gap: 10px; }
.bpi-composer-open {
    flex: 1; height: 44px; display: flex; align-items: center; padding: 0 16px; border-radius: 999px;
    background: var(--bpi-sand-deep); border: 0; color: var(--bpi-muted); font: inherit; font-size: 14.5px; text-align: left;
}
.bpi-composer-open:hover { background: #ECE8E0; }
.bpi-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.bpi-quick a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--bpi-text-2); }
.bpi-quick a:hover { background: var(--bpi-sand-deep); text-decoration: none; }
.bpi-quick i { font-size: 1.2rem; }

.bpi-trips { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 4px; }
.bpi-trips::-webkit-scrollbar { display: none; }
.bpi-trip-card { flex: none; width: 250px; display: flex; flex-direction: column; gap: 8px; }
.bpi-trip-card .bpi-trip { align-self: flex-start; }
.bpi-trip-title { font-weight: 700; color: var(--bpi-text); line-height: 1.35; min-height: 2.7em; }
.bpi-trip-list a { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-top: 1px solid var(--bpi-line-soft); color: var(--bpi-text); }
.bpi-trip-list a:hover { text-decoration: none; color: var(--bpi-navy); }
.bpi-trip-list .bpi-trip-date { font-size: 12px; font-weight: 700; color: var(--bpi-action-text); }

/* ---------- Iklan ---------- */
.bpi-ad-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bpi-muted); margin-bottom: 6px; }
.bpi-ad { min-height: 280px; }
.bpi-ad-side { min-height: 600px; }
.bpi-ad-feed[hidden] { display: none; }
.bpi-ad-dev { border: 1px dashed #BDB6A8; border-radius: var(--bpi-radius); background: #F1EEE7; color: #6E685C; display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* ---------- Memuat (infinite scroll) ---------- */
.bpi-more { display: block; text-align: center; padding: 12px; font-size: 13.5px; color: var(--bpi-muted); }
.bpi-more .bpi-skeleton { display: none; }
.bpi-more.htmx-request .bpi-skeleton { display: flex; }
.bpi-more.htmx-request .bpi-more-text { display: none; }
.bpi-skeleton { flex-direction: column; gap: 10px; text-align: left; }
.bpi-skeleton span { display: block; height: 13px; border-radius: 8px; background: #ECE8E0; animation: bpi-pulse 1.2s ease-in-out infinite; }
@keyframes bpi-pulse { 50% { opacity: .5; } }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-block; }

/* ---------- Detail posting ---------- */
.bpi-post { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 991.98px) {
    .bpi-post { margin: -12px -12px 0; border-radius: 0; border-left: 0; border-right: 0; }
}
@media (min-width: 992px) { .bpi-post { padding: 24px; gap: 16px; } }
.bpi-post h1 { margin: 0; overflow-wrap: anywhere; }
.bpi-author { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bpi-author-name { font-weight: 700; color: var(--bpi-text); }
.bpi-trip-box { display: flex; gap: 10px; align-items: center; background: var(--bpi-action-soft); color: var(--bpi-action-text); border-radius: 12px; padding: 10px 12px; }
.bpi-trip-box i { font-size: 1.25rem; }
.bpi-trip-box small { display: block; font-size: 12px; font-weight: 600; }
.bpi-trip-box strong { font-weight: 800; }
.bpi-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.bpi-gallery a:first-child { grid-column: 1 / -1; }
.bpi-gallery img { width: 100%; height: 86px; object-fit: cover; border-radius: 10px; background: var(--bpi-navy-soft); }
.bpi-gallery a:first-child img { height: auto; max-height: 520px; aspect-ratio: 4 / 3; }
@media (min-width: 992px) {
    .bpi-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .bpi-gallery img { height: 110px; }
}
.bpi-body { font-size: 15.5px; line-height: 1.7; overflow-wrap: anywhere; }
.bpi-body p:last-child { margin-bottom: 0; }
@media (min-width: 992px) { .bpi-body { font-size: 16px; } }
.bpi-post-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--bpi-line-soft); padding-top: 12px; }
.bpi-post-actions .btn { display: inline-flex; align-items: center; gap: 6px; }

/* Komentar */
.bpi-comment-form { display: flex; gap: 10px; align-items: flex-start; }
.bpi-comment-form form { flex: 1; min-width: 0; }
.bpi-comment-form textarea { resize: vertical; min-height: 64px; }
.bpi-comment { display: flex; gap: 10px; }
.bpi-comment-main { flex: 1; min-width: 0; }
.bpi-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; line-height: 1.3; }
.bpi-comment-head a { font-weight: 700; font-size: 14px; color: var(--bpi-text); }
.bpi-comment-body { margin-top: 4px; font-size: 14.5px; overflow-wrap: anywhere; }
.bpi-comment-body p { margin-bottom: .4rem; }
.bpi-comment-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-left: -8px; }
.bpi-comment-tools .btn, .bpi-comment-tools .bpi-act { height: 34px; font-size: 13px; }
.bpi-replies { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.bpi-reply { display: flex; gap: 8px; }
.bpi-reply-bubble { flex: 1; min-width: 0; background: var(--bpi-sand); border-radius: 12px; padding: 8px 10px; }
.bpi-comment.is-new, .bpi-reply.is-new .bpi-reply-bubble { animation: bpi-flash 2.4s ease-out; }
@keyframes bpi-flash { 0%, 40% { background-color: var(--bpi-action-soft); } }
.bpi-commentbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    height: calc(var(--bpi-bottomnav-h) + env(safe-area-inset-bottom)); padding: 0 10px env(safe-area-inset-bottom);
    background: #fff; border-top: 1px solid var(--bpi-line); display: flex; align-items: center; gap: 6px;
}
.bpi-commentbar-input {
    flex: 1; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 999px;
    background: var(--bpi-sand-deep); color: var(--bpi-muted); font-size: 14.5px;
}
.bpi-commentbar-input:hover { text-decoration: none; color: var(--bpi-text-2); }
.transition-opacity { transition: opacity 1s ease-out; opacity: 1; }
.transition-opacity.htmx-swapping { opacity: 0; }

/* ---------- Pesan pribadi ---------- */
.bpi-chat-page { max-width: 1320px; margin: 0 auto; display: flex; height: calc(100dvh - var(--bpi-topbar-h)); }
@media (max-width: 991.98px) {
    .bpi-chat-page { height: 100dvh; }
    .bpi-chat-page.has-topbar { height: calc(100dvh - var(--bpi-topbar-h) - var(--bpi-bottomnav-h) - env(safe-area-inset-bottom)); }
}
.bpi-chat-list { flex: 0 0 340px; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--bpi-line); min-height: 0; }
.bpi-chat-list-scroll { flex: 1; overflow-y: auto; }
.bpi-chat { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; background: var(--bpi-sand); }
.bpi-chat-head { flex: none; height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 4px; background: #fff; border-bottom: 1px solid var(--bpi-line); }
.bpi-chat-head h1 { margin: 0; font-size: 16px; }
.bpi-chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.bpi-chat-body > :first-child { margin-top: auto; }
.bpi-chat-form { flex: none; padding: 10px 10px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--bpi-line); }
.bpi-chat-form .form-control { border-radius: 22px; height: 44px; }
.bpi-chat-send { width: 44px; height: 44px; flex: none; border-radius: 50%; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.bpi-dot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: #C9C3B8; }
.bpi-dot.is-online { background: #2E9E5B; }
.msg-row { display: flex; flex-direction: column; align-items: flex-start; }
.msg-row.is-mine { align-items: flex-end; }
.msg-bubble { display: flex; align-items: center; gap: 4px; max-width: 82%; }
.msg-row.is-mine .msg-bubble { flex-direction: row-reverse; }
.msg { min-width: 0; padding: 9px 13px; font-size: 14.5px; overflow-wrap: anywhere; white-space: pre-line; }
.msg-in { background: #fff; border: 1px solid var(--bpi-line); border-radius: 18px 18px 18px 6px; }
.msg-out { background: var(--bpi-navy); color: #fff; border-radius: 18px 18px 6px 18px; }
.msg-time { font-size: 11.5px; color: var(--bpi-muted); margin: 2px 6px 6px; }
.msg-day { align-self: center; font-size: 12px; font-weight: 700; color: var(--bpi-muted); background: #ECE8E0; border-radius: 999px; padding: 3px 12px; margin: 8px 0; }
.msg-delete { opacity: 0; }
.msg-bubble:hover .msg-delete, .msg-delete:focus { opacity: 1; }
.chat-bubble { opacity: 0; transform: translateY(6px); transition: all .2s ease-out; }
.chat-bubble.show { opacity: 1; transform: none; }
.bpi-thread { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--bpi-text); border-bottom: 1px solid var(--bpi-line-soft); }
.bpi-thread:hover { background: var(--bpi-sand); text-decoration: none; color: var(--bpi-text); }
.bpi-thread.active { background: var(--bpi-navy-soft); }

/* ---------- Lain-lain ---------- */
.min-w-0 { min-width: 0; }
.bpi-ink-trip { color: var(--bpi-action-hover); }
.bpi-ink-qna { color: var(--bpi-teal); }
.bpi-ink-blog { color: var(--bpi-navy); }
.bpi-ink-gallery { color: #2F6B3A; }
.bpi-notify-menu { max-width: 360px; }
.bpi-page-head { display: flex; gap: 12px; align-items: flex-start; }
.bpi-page-head p { margin: 4px 0 0; color: var(--bpi-muted); font-size: 14px; }
.bpi-page-head p:last-child { margin-bottom: 0; }
.dropdown-menu { border-color: var(--bpi-line); border-radius: 12px; box-shadow: 0 8px 24px rgba(26, 37, 51, .1); }
.offcanvas-bottom { height: auto; max-height: 85vh; border-radius: 18px 18px 0 0; }
.modal-content { border-radius: 18px; border: 0; }
.list-group-item-action { font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.bpi-icon-box-lg { width: 48px; height: 48px; border-radius: 14px; font-size: 1.4rem; }

/* Breadcrumb Bootstrap di halaman lama disamakan dengan .bpi-breadcrumb */
.breadcrumb { --bs-breadcrumb-divider: '›'; --bs-breadcrumb-item-active-color: var(--bpi-muted); font-size: 12.5px; margin: 0 !important; }
.bpi-ad[hidden], .bpi-ad:has(ins[data-ad-status="unfilled"]) { display: none !important; }

/* ---------- Tab Bootstrap (profil, feedback) bergaya garis bawah ---------- */
.nav-tabs { --bs-nav-tabs-border-width: 0; gap: 20px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--bpi-line); }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs .nav-link { border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 2px; color: var(--bpi-muted); font-weight: 700; white-space: nowrap; background: none; }
.nav-tabs .nav-link:hover { color: var(--bpi-navy); text-decoration: none; }
.nav-tabs .nav-link.active { color: var(--bpi-navy); border-bottom-color: var(--bpi-sunset); background: none; }

/* ---------- Profil ---------- */
.bpi-profile-head { display: flex; align-items: center; gap: 14px; }
.bpi-profile-head img { border-radius: 20px; object-fit: cover; }
.bpi-profile-head h1 { margin: 0; overflow-wrap: anywhere; }
.bpi-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 576px) { .bpi-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bpi-stat { background: var(--bpi-sand); border-radius: 12px; padding: 8px 12px; min-width: 0; }
.bpi-stat-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--bpi-muted); }
.bpi-stat-value { display: block; font-weight: 800; color: var(--bpi-text); overflow-wrap: anywhere; }
.bpi-section-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--bpi-muted); margin: 0 0 4px; }

/* ---------- Tujuan wisata, singgah, pencarian ---------- */
.bpi-place { display: flex; gap: 12px; align-items: flex-start; color: var(--bpi-text); }
.bpi-place:hover { text-decoration: none; color: var(--bpi-text); border-color: #B9CAD9; }
.bpi-place-thumb { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex: none; background: var(--bpi-navy-soft); display: flex; align-items: center; justify-content: center; color: var(--bpi-navy); font-size: 1.6rem; }
.bpi-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--bpi-action-text); }
.bpi-filter { display: grid; gap: 10px; }
@media (min-width: 768px) { .bpi-filter { grid-template-columns: 1fr 1fr; } .bpi-filter .bpi-filter-wide { grid-column: 1 / -1; } }
.bpi-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.bpi-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.bpi-def dt { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--bpi-muted); }
.bpi-def dd { margin: 2px 0 12px; overflow-wrap: anywhere; }
.bpi-def dd:last-child { margin-bottom: 0; }
.bpi-def dd p:last-child { margin-bottom: 0; }
.bpi-notify { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; color: var(--bpi-text); border-bottom: 1px solid var(--bpi-line-soft); }
.bpi-notify:last-child { border-bottom: 0; }
.bpi-notify:hover { background: var(--bpi-sand); text-decoration: none; color: var(--bpi-text); }
.bpi-narrow { max-width: 640px; width: 100%; }
.errorlist { list-style: none; padding: 0; margin: 4px 0 0; color: #B02A37; font-size: 13px; }
.bpi-prose { font-size: 15.5px; line-height: 1.7; overflow-wrap: anywhere; }
.bpi-prose h2 { font-size: 1.1rem; margin-top: 1.5rem; }
.bpi-search-grow { flex: 1 1 240px; max-width: 100%; }
