:root {
    --red: #f57c00;        /* oranye Firebase (aksen brand) */
    --red-hover: #e65100;
    --red-soft: #fff3e0;
    --text: #333;
    --text-sub: rgba(51, 51, 51, 0.8);
    --text-mute: rgba(51, 51, 51, 0.5);
    --bg: #fff;
    --hover-bg: #f5f5f5;
    --line: #ededed;
    --skeleton: #f2f2f2;
    --topbar-h: 68px;
    --tabs-h: 74px;
    --rail-w: 256px;
    --cover-radius: 14px;
    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Noto Sans", "Helvetica Neue", Arial, "PingFang SC", "Microsoft Yahei", sans-serif;
}

/* ================= DARK MODE (toggle dinamis) ================= */
html[data-theme="dark"] {
    --red: #ff9800;
    --red-hover: #ffa726;
    --red-soft: #3a2a12;
    --text: #eaeaea;
    --text-sub: rgba(234, 234, 234, 0.78);
    --text-mute: rgba(234, 234, 234, 0.5);
    --bg: #121212;
    --hover-bg: #1f1f1f;
    --line: #2a2a2a;
    --skeleton: #1e1e1e;
}
html[data-theme="dark"] .searchbar { background: #1c1c1c; }
html[data-theme="dark"] .searchbar:focus-within { background: #242424; border-color: #3a3a3a; }
html[data-theme="dark"] .user-dropdown { background: #1c1c1c; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
html[data-theme="dark"] .auth-tab.active { background: #2a2a2a; }
html[data-theme="dark"] img { opacity: .96; }
html[data-theme="dark"] .brand-name { color: #cfcfcf; }
/* ikon toggle: bulan di light, matahari di dark */
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ================= TOPBAR ================= */
.topbar {
    position: sticky; top: 0; z-index: 30;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 24px;
    background: var(--bg);
}
/* brand selebar area rail (rail-w + gap page) supaya search mulai sejajar kiri feed */
.brand {
    display: flex; flex-direction: row; align-items: center; gap: 9px;
    flex: none; line-height: 1;
    width: calc(var(--rail-w) + 20px);
    padding-right: 16px;
}
.brand-icon { flex: none; display: inline-flex; transform: translateY(2px); }
/* Wordmark "vinote" teks gelap, ikon terpisah = SVG hijau */
.brand-name {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: #5e5e5e;
    margin-left: -8px;
}
.brand-tag { font-size: 11px; color: var(--text-mute); letter-spacing: 0.02em; margin-top: 2px; }

.searchbar {
    flex: 1;
    max-width: 640px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 8px 0 16px;
    background: var(--hover-bg);
    border-radius: 100px;
    border: 1px solid transparent;
}
.searchbar:focus-within { border-color: #ddd; background: var(--bg); }
.searchbar .search-icon { color: var(--text-mute); flex: none; }
.searchbar input {
    flex: 1; min-width: 0;
    border: none; background: transparent; outline: none;
    font-size: 14px; color: var(--text);
}
.searchbar input::placeholder { color: var(--text-mute); }
.loc-picker {
    flex: none;
    display: flex; align-items: center; gap: 4px;
    height: 32px; padding: 0 10px;
    border: none; border-radius: 100px;
    background: var(--bg);
    color: var(--text-sub);
    font-size: 13px; font-weight: 600;
    box-shadow: 0 0 0 1px var(--line);
}
.loc-picker svg:first-child { color: var(--red); }

.top-actions { flex: none; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.btn-write {
    display: flex; align-items: center; gap: 6px;
    height: 40px; padding: 0 16px;
    border: none; border-radius: 100px;
    background: var(--red); color: #fff;
    font-size: 14px; font-weight: 600;
}
.btn-write:hover { background: var(--red-hover); }
.btn-write--link { text-decoration: none; }
.btn-signin { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; font-size: 14px; font-weight: 600; color: var(--text); border-radius: 100px; }
.btn-signin:hover { background: var(--hover-bg); }
.btn-signout { height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 100px; background: var(--bg); color: var(--text-sub); font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-signout:hover { background: var(--hover-bg); }
.icon-btn {
    width: 40px; height: 40px;
    border: none; border-radius: 50%;
    background: transparent; color: var(--text-sub);
    display: grid; place-items: center;
}
.icon-btn:hover { background: var(--hover-bg); }
.user-chip {
    display: flex; align-items: center; gap: 6px;
    height: 40px; padding: 3px 10px 3px 3px;
    border: 1px solid var(--line); border-radius: 100px;
    background: var(--bg); color: var(--text);
    font-size: 14px; font-weight: 600;
}
.user-chip:hover { background: var(--hover-bg); }
.user-chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* ---- Menu akun (avatar bulat + dropdown) ---- */
.user-menu { position: relative; }
.avatar-btn {
    width: 38px; height: 38px; padding: 0;
    border: none; border-radius: 50%; cursor: pointer;
    background: transparent; display: grid; place-items: center;
}
.avatar-btn img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; }
.avatar-btn:hover img { box-shadow: 0 0 0 2px var(--red); }
.user-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 244px; padding: 6px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12); z-index: 60;
}
.user-dropdown__head {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: 10px;
}
.user-dropdown__head:hover { background: var(--hover-bg); }
.user-dropdown__head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.user-dropdown__head strong { display: block; font-size: 14px; color: var(--text); }
.user-dropdown__head span { display: block; font-size: 12px; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.user-dropdown hr, .user-dropdown__sep { border: none; border-top: 1px solid var(--line); margin: 6px 4px; }
.user-dropdown form { margin: 0; }
.user-dropdown__item {
    display: block; width: 100%; text-align: left;
    padding: 10px; border: none; background: none; cursor: pointer;
    font-size: 14px; color: var(--text); border-radius: 10px; font-weight: 500;
}
.user-dropdown__item:hover { background: var(--hover-bg); }
.user-dropdown__logout { color: #e5484d; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }

/* ================= CHANNEL TABS (kategori tetap) — di dalam kolom konten, rata kiri feed ================= */
.channel-tabs {
    position: sticky; top: var(--topbar-h); z-index: 25;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 0 8px;
    margin-bottom: 8px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
    transition: transform 0.28s ease;
    will-change: transform;
}
.channel-tabs::-webkit-scrollbar { display: none; }
/* Auto-hide: sembunyi ke atas saat scroll turun, muncul lagi saat scroll balik */
.channel-tabs.tabs-hidden { transform: translateY(calc(-100% - var(--topbar-h))); }
.channel {
    flex: none;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    min-width: 68px;
    padding: 8px 12px;
    border-radius: 14px;
    color: var(--text-sub);
    transition: background 0.15s, color 0.15s;
}
.channel:hover { background: var(--hover-bg); }
.channel.active { background: var(--red-soft); color: var(--red); }
.channel .ch-icon { display: inline-flex; align-items: center; justify-content: center; height: 24px; }
.channel .ch-label { font-size: 12px; font-weight: 600; white-space: nowrap; }

/* ================= PAGE ================= */
.page {
    display: flex;
    gap: 20px;
    padding: 0 24px 40px;
    align-items: flex-start;
}

/* ---- RAIL (nempel di bawah logo, sejajar kiri dgn logo) ---- */
.rail {
    flex: none;
    width: var(--rail-w);
    position: sticky;
    top: calc(var(--topbar-h) + 16px);
    display: flex; flex-direction: column; gap: 16px;
}

/* ---- CONTENT (tabs + feed) ---- */
.content { flex: 1; min-width: 0; }
.card {
    background: var(--bg);
    border-radius: 16px;
    padding: 4px 4px 8px;
}
.card-title { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.muted { color: var(--text-mute); font-size: 12px; margin: 0; line-height: 1.5; }

.trend-list { list-style: none; margin: 0; padding: 0; }
.trend-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; }
.trend-list li:hover .trend-text { color: var(--red); }
.rank {
    flex: none; width: 20px; height: 20px;
    display: grid; place-items: center;
    border-radius: 6px; font-size: 12px; font-weight: 700;
    background: #f0f0f0; color: var(--text-mute);
}
.rank.hot { background: var(--red); color: #fff; }
.trend-text { color: var(--text-sub); }

.invite-card { display: flex; gap: 12px; align-items: flex-start; }
.invite-ico { font-size: 26px; flex: none; }
.btn-share {
    margin-top: 10px;
    width: 100%;
    height: 38px;
    border: 1px solid var(--red);
    border-radius: 10px;
    background: var(--red-soft);
    color: var(--red);
    font-size: 13px; font-weight: 700;
}
.btn-share:hover { background: #ffe0e5; }

.city-list { list-style: none; margin: 0 0 6px; padding: 0; }
.city-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.city-thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.city-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.city-name { font-size: 14px; font-weight: 600; }
.city-list .chev { color: var(--text-mute); flex: none; }
.card-link { display: inline-block; margin-top: 4px; color: var(--red); font-size: 13px; font-weight: 700; }

.promo-card {
    position: relative;
    border-radius: 16px;
    padding: 18px;
    min-height: 180px;
    display: flex; flex-direction: column; justify-content: flex-end;
    color: #fff;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(20,20,30,0.15), rgba(20,20,30,0.85)),
        url('https://picsum.photos/seed/vinotepromo/400/300') center/cover;
}
.promo-card h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; line-height: 1.15; }
.promo-card p { margin: 0; font-size: 12px; opacity: 0.9; line-height: 1.4; }

/* ================= FEED (6 KOLOM MASONRY) ================= */
.feed-col { flex: 1; min-width: 0; }
/* Masonry JS: baris flex berisi kolom; kartu di-append ke kolom terpendek
   (muncul dari BAWAH, tak reflow seperti column-count). */
.feeds-container {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.feed-column { flex: 1 1 0; min-width: 0; }

.note-item {
    display: block;
    width: 100%;
    margin-bottom: 18px;
}
.note-item .cover {
    position: relative; display: block;
    width: 100%; height: 0;
    border-radius: var(--cover-radius);
    overflow: hidden;
    background: var(--skeleton);
}
.note-item .cover img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    /* Tampil langsung (tanpa blur-up yg sempat macet). Sedikit fade saat muncul. */
    opacity: 1;
    transition: transform 0.35s ease;
}
.note-item:hover .cover img { transform: scale(1.03); }
.play-badge {
    position: absolute; top: 8px; right: 8px;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0,0,0,0.35);
    display: grid; place-items: center;
}
.note-item .footer { padding: 8px 4px 0; }
.note-item .title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--text);
}
.author-wrapper { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.author { display: flex; align-items: center; gap: 6px; min-width: 0; }
.author-avatar { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex: none; }
.author .name { font-size: 12px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.like-wrapper { display: flex; align-items: center; gap: 3px; flex: none; }
.like-wrapper .like-icon { color: var(--text-mute); }
.like-wrapper .count { font-size: 12px; color: var(--text-sub); }

/* ================= SKELETON ================= */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.note-item.skeleton .cover { height: 0; padding-bottom: 130%; }
.note-item.skeleton .cover, .sk-line {
    background: linear-gradient(90deg, #f2f2f2 25%, #e9e9e9 37%, #f2f2f2 63%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 6px;
}
.note-item.skeleton .cover { border-radius: var(--cover-radius); }
.sk-line { display: block; height: 11px; margin-top: 8px; }
.sk-title { width: 100%; } .sk-title.short { width: 60%; }
.sk-author { width: 60px; } .sk-like { width: 28px; }
.note-item.skeleton .author-wrapper { width: 100%; }

/* ================= SENTINEL / END ================= */
.sentinel { height: 1px; }
.feed-end { text-align: center; padding: 20px 0 40px; color: var(--text-mute); font-size: 14px; }

/* ================= PROFIL PUBLIK ================= */
.profile-wrap { max-width: 720px; margin: 0 auto; padding: 32px 20px 60px; }
.profile-head { display: flex; align-items: center; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); position: relative; }
.profile-avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; flex: none; }
.profile-meta { flex: 1; min-width: 0; }
.profile-name { margin: 0; font-size: 24px; font-weight: 800; }
.profile-username { margin: 2px 0 0; color: var(--text-sub); font-size: 14px; }
.profile-stats { display: flex; gap: 20px; margin: 12px 0 0; font-size: 14px; color: var(--text-sub); }
.profile-stats b { color: var(--text); }
.profile-joined { margin: 10px 0 0; font-size: 13px; color: var(--text-mute); }
.profile-edit, .profile-follow { flex: none; height: 40px; padding: 0 20px; border-radius: 100px; font-size: 14px; font-weight: 700; cursor: pointer; }
.profile-edit { border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.profile-edit:hover { background: var(--hover-bg); }
.profile-follow { border: none; background: var(--red); color: #fff; }
.profile-follow:hover { background: var(--red-hover); }
.profile-tabs { display: flex; gap: 6px; margin: 18px 0 8px; }
.profile-tabs a { padding: 8px 18px; border-radius: 100px; font-size: 14px; font-weight: 600; color: var(--text-sub); cursor: pointer; }
.profile-tabs a.active { background: var(--red-soft); color: var(--red); }
.profile-empty { text-align: center; padding: 60px 20px; color: var(--text-sub); }
.profile-empty-ico { font-size: 40px; margin-bottom: 10px; }
.profile-empty p { margin: 4px 0; }
.profile-empty .muted { color: var(--text-mute); font-size: 14px; }
@media (max-width: 560px) {
    .profile-head { flex-wrap: wrap; gap: 16px; }
    .profile-avatar { width: 72px; height: 72px; }
}

/* ================= MODAL AUTH (gaya rednote) ================= */
.auth-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.auth-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.auth-dialog {
    position: relative; z-index: 1;
    width: 100%; max-width: 380px;
    background: var(--bg); border-radius: 18px; padding: 28px 26px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.auth-x { position: absolute; top: 12px; right: 14px; border: none; background: none; font-size: 26px; line-height: 1; color: var(--text-mute); cursor: pointer; }
.auth-x:hover { color: var(--text); }
.auth-head { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 18px; }
.auth-tabs { display: flex; gap: 6px; background: var(--hover-bg); padding: 4px; border-radius: 100px; }
.auth-tab { border: none; background: none; padding: 7px 20px; border-radius: 100px; font-size: 14px; font-weight: 600; color: var(--text-sub); cursor: pointer; }
.auth-tab.active { background: var(--bg); color: var(--red); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.auth-google { display: flex; justify-content: center; margin-bottom: 14px; min-height: 44px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--text-mute); font-size: 12px; margin-bottom: 14px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-panel { display: flex; flex-direction: column; }
.af { margin-bottom: 12px; }
.af input { width: 100%; height: 46px; padding: 0 15px; font-size: 15px; font-family: inherit; border: 1px solid var(--line); border-radius: 11px; outline: none; }
.af input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.ae { color: #e5484d; font-size: 12.5px; margin: -6px 2px 10px; }
.ar { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-sub); margin-bottom: 14px; }
.auth-submit { height: 48px; border: none; border-radius: 100px; background: var(--red); color: #fff; font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer; }
.auth-submit:hover { background: var(--red-hover); }
.aswitch { text-align: center; font-size: 13.5px; color: var(--text-sub); margin: 16px 0 0; }
.aswitch a { color: var(--red); font-weight: 600; text-decoration: none; }
body.auth-lock { overflow: hidden; }

/* ================= RESPONSIVE (jumlah kolom diatur JS masonry) ================= */
@media (max-width: 1024px) {
    .rail { display: none; }
    .brand-tag { display: none; }
    .brand { width: auto; }
}
@media (max-width: 560px) {
    .top-actions .btn-write span, .user-chip span { display: none; }
    .searchbar .loc-picker span { display: none; }
    .channel .ch-label { font-size: 11px; }
    .page { padding: 12px 12px 40px; }
}

/* ================= PARITAS APP: detail catatan, cari, notifikasi, profil ================= */
.profile-wrap { max-width: 1100px; }
.profile-bio { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-sub); white-space: pre-line; }
.profile-edit { display: inline-flex; align-items: center; }
.profile-follow.on { background: var(--hover-bg); color: var(--text-sub); border: 1px solid var(--line); }
.static-grid { display: block; column-count: 5; column-gap: 14px; }
.static-grid .note-item { break-inside: avoid; display: inline-block; }
@media (max-width: 1280px) { .static-grid { column-count: 4; } }
@media (max-width: 1024px) { .static-grid { column-count: 3; } }
@media (max-width: 760px) { .static-grid { column-count: 2; column-gap: 10px; } }
.flash-ok { background: #e8f5e9; color: #1b5e20; padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.icon-btn.bell { position: relative; }
.icon-btn.bell .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #ff2e4d; }

.search-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
.search-wrap.narrow { max-width: 640px; }
.page-h { font-size: 22px; margin: 0 0 6px; }
.center { text-align: center; padding: 40px 0; }
.search-pop { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.search-pop a { background: var(--hover-bg); padding: 7px 14px; border-radius: 100px; font-size: 14px; }
.search-pop a:hover { color: var(--red); }
.user-row { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.user-row img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.user-row span { display: flex; flex-direction: column; }
.user-row small { color: var(--text-mute); font-size: 13px; }
.profile-tabs .badge { font-style: normal; background: #ff2e4d; color: #fff; border-radius: 100px; font-size: 11px; padding: 1px 6px; margin-left: 4px; }
.notif { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.notif.unread { background: var(--red-soft); }
.notif img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.notif-text { flex: 1; min-width: 0; }
.notif-text p { margin: 0; font-size: 14px; }
.notif-text small { color: var(--text-mute); font-size: 12px; }
.notif .notif-cover { border-radius: 6px; width: 48px; height: 48px; }

.pe-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.pe-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.pe-form input[type=text], .pe-form textarea { font: inherit; font-weight: 400; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.pe-ava { flex-direction: row !important; align-items: center; gap: 14px !important; cursor: pointer; }
.pe-ava img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.pe-ava span { color: var(--red); }
.pe-err { color: #d32f2f; margin: 0; }
.pe-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Detail catatan */
.nd-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.nd-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.nd-dialog { position: relative; width: min(1100px, 94vw); height: min(820px, 90vh); background: var(--bg); border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.nd-close { position: fixed; top: 18px; right: 22px; z-index: 101; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 18px; }
.nd-loading { width: 100%; height: 100%; background: var(--skeleton); animation: ndpulse 1s infinite alternate; }
@keyframes ndpulse { to { opacity: .5; } }
.nd { display: flex; height: 100%; }
.nd-page { max-width: 1100px; margin: 20px auto 40px; padding: 0 16px; }
.nd-page .nd { height: min(820px, calc(100vh - 110px)); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.nd-media { position: relative; flex: 1 1 60%; background: #f6f6f6; display: flex; align-items: center; justify-content: center; min-width: 0; }
html[data-theme="dark"] .nd-media { background: #0b0b0b; }
.nd-media.is-video { background: #000; }
.nd-media iframe { width: 100%; height: 100%; border: 0; }
.nd-track { position: relative; width: 100%; height: 100%; user-select: none; }
.nd-track img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .25s; }
.nd-track img.on { opacity: 1; }
.nd-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); font-size: 24px; line-height: 1; color: #333; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.nd-nav.prev { left: 14px; }
.nd-nav.next { right: 14px; }
.nd-count { position: absolute; top: 14px; right: 14px; background: rgba(0,0,0,.45); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 100px; }
.nd-count b { font-weight: 600; }
.nd-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.nd-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,.25); }
.nd-dots i.on { background: #ff2e4d; }
.nd-heart { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(0); color: #ff2e4d; pointer-events: none; opacity: 0; }
.nd-heart.pop { animation: ndheart .8s ease forwards; }
@keyframes ndheart { 0% { transform: translate(-50%,-50%) scale(.4); opacity: 1; } 30% { transform: translate(-50%,-50%) scale(1.2); opacity: 1; } 100% { transform: translate(-50%,-50%) scale(1); opacity: 0; } }
.nd-side { flex: 0 0 420px; display: flex; flex-direction: column; border-left: 1px solid var(--line); min-width: 0; }
.nd-author { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.nd-who { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.nd-who img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.nd-follow { border: 0; background: #ff2e4d; color: #fff; font-weight: 700; padding: 8px 20px; border-radius: 100px; }
.nd-follow:hover { color: #fff; filter: brightness(.95); }
.nd-follow.on { background: var(--hover-bg); color: var(--text-sub); }
.nd-scroll { flex: 1; overflow-y: auto; padding: 18px 20px; }
.nd-title { font-size: 18px; margin: 0 0 10px; line-height: 1.4; }
.nd-body { font-size: 15px; line-height: 1.65; color: var(--text); }
.nd-body a, .nd-tags a { color: #13386c; }
html[data-theme="dark"] .nd-body a, html[data-theme="dark"] .nd-tags a { color: #7fb0ff; }
.nd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 15px; }
.nd-meta { color: var(--text-mute); font-size: 13px; margin: 14px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.nd-ctotal { color: var(--text-sub); font-size: 13px; margin: 14px 0 6px; }
.nd-cempty { color: var(--text-mute); text-align: center; padding: 24px 0; font-size: 14px; }
.nd-c { display: flex; gap: 10px; padding: 10px 0; }
.nd-c img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.nd-c .nd-c img { width: 24px; height: 24px; }
.nd-cname { font-size: 13px; color: var(--text-sub); }
.nd-cbody { margin: 3px 0; font-size: 14px; line-height: 1.5; }
.nd-ctime { font-size: 12px; color: var(--text-mute); }
.nd-bar { border-top: 1px solid var(--line); padding: 10px 16px 14px; }
.nd-actions { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.nd-act { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--text); font-size: 14px; padding: 0; }
.nd-act svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; transition: transform .15s; }
.nd-act:active svg { transform: scale(.85); }
.nd-act.on { color: #ff2e4d; }
.nd-act.on svg { fill: currentColor; }
.nd-act.save.on { color: #ffb300; }
.nd-act.share { margin-left: auto; }
.nd-act.static { cursor: default; }
.nd-cform { display: flex; gap: 8px; width: 100%; }
.nd-cform input { flex: 1; min-width: 0; border: 0; background: var(--hover-bg); color: var(--text); border-radius: 100px; padding: 10px 16px; font: inherit; font-size: 14px; outline: none; }
.nd-cform button { border: 0; background: #ff2e4d; color: #fff; border-radius: 100px; padding: 0 18px; font-weight: 700; }
.nd-cform.guest { justify-content: center; border: 0; background: var(--hover-bg); color: var(--text-sub); border-radius: 100px; padding: 11px; font: inherit; font-size: 14px; }
.vn-toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 100px; font-size: 14px; z-index: 200; }
@media (max-width: 900px) {
    .nd-side { flex-basis: 340px; }
}
@media (max-width: 760px) {
    .nd-page { padding: 0; margin: 0; }
    .nd-page .nd { flex-direction: column; height: auto; border: 0; border-radius: 0; }
    .nd-page .nd-media { flex: none; height: auto; aspect-ratio: 3 / 4; max-height: 78vh; }
    .nd-page .nd-track img { object-fit: cover; } /* HP: isi bingkai (crop) seperti app/rednote */
    .nd-page .nd-media.is-video { height: 56vw; }
    .nd-page .nd-side { flex: none; border-left: 0; }
    .nd-page .nd-scroll { overflow: visible; }
    .nd-page .nd-bar { position: sticky; bottom: 0; background: var(--bg); }
}

/* Pilihan gaya penulisan AI (Edit Profil) */
.pe-styles { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; display: grid; gap: 8px; }
.pe-styles legend { font-size: 14px; font-weight: 600; padding: 0 6px; }
.pe-styles legend small { font-weight: 400; color: var(--text-mute); }
.pe-style { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.pe-style:hover { background: var(--hover-bg); }
.pe-style input { margin-top: 3px; accent-color: var(--red); }
.pe-style span { display: flex; flex-direction: column; }
.pe-style small { color: var(--text-mute); font-size: 12.5px; }

/* ================= HEADER HP (responsif) =================
   Di layar sempit isi topbar sempat lebih lebar dari layar → halaman melebar dan feed
   jadi 5 kolom. Versi HP: logo ringkas, cari fleksibel, pemilih kota & "Daftar" disembunyikan. */
html, body { overflow-x: hidden; }
@media (max-width: 760px) {
    :root { --topbar-h: 56px; }
    .topbar { padding: 0 12px; gap: 8px; }
    .brand { width: auto; padding-right: 0; gap: 6px; }
    .brand-icon svg { width: 26px; height: 26px; }
    .brand-name { font-size: 22px; margin-left: -4px; }
    .searchbar { flex: 1 1 auto; min-width: 0; max-width: none; height: 38px; padding: 0 12px; gap: 6px; }
    .searchbar .search-icon { width: 17px; height: 17px; }
    .searchbar input { font-size: 13.5px; }
    .searchbar .loc-picker { display: none; }
    .top-actions { gap: 2px; margin-left: 0; }
    .top-actions .theme-toggle, .top-actions .icon-btn { width: 34px; height: 34px; }
    .top-actions .btn-write[data-auth-open="daftar"] { display: none; }
    .btn-signin { height: 34px; padding: 0 14px; font-size: 13px; background: var(--red); color: #fff; }
    .btn-signin:hover { background: var(--red-hover); color: #fff; }
    .avatar-btn img { width: 30px; height: 30px; }
    .page { padding: 8px 10px 40px; gap: 0; }
    .channel-tabs { gap: 2px; padding-bottom: 6px; }
    .channel { min-width: 58px; padding: 6px 8px; border-radius: 12px; }
    .channel .ch-icon { height: 20px; }
    .channel .ch-icon svg { width: 20px; height: 20px; }
    .feeds-container { gap: 10px; }
    .note-item { margin-bottom: 14px; }
    .note-item .footer { padding: 6px 2px 0; }
    .note-item .title { font-size: 13px; }
}
@media (max-width: 400px) {
    .brand-name { font-size: 19px; }
    .top-actions .theme-toggle { display: none; }
}

/* ================= Tombol "Buka vinote" (web HP, ala rednote) ================= */
.open-app { display: none; }
@media (max-width: 760px) {
    .open-app {
        display: inline-flex; align-items: center; justify-content: center;
        position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
        z-index: 40; height: 48px; padding: 0 30px; border-radius: 100px;
        background: var(--red); color: #fff; font-size: 16px; font-weight: 700; /* --red = oranye brand */
        box-shadow: 0 6px 20px rgba(245, 124, 0, .35);
    }
    .open-app:hover, .open-app:active { color: #fff; background: var(--red-hover); }
}
.unduh { text-align: center; padding-top: 48px; }
.unduh-ico { display: flex; justify-content: center; margin-bottom: 14px; }
.unduh .muted { color: var(--text-sub); line-height: 1.6; }
.unduh-btn { display: inline-flex; justify-content: center; margin: 22px auto 10px; height: 48px; padding: 0 28px; font-size: 16px; }
.unduh-btn:hover { color: #fff; }
.unduh-soon { margin: 22px 0 10px; font-weight: 600; color: var(--red); }
.unduh-web { display: inline-flex; margin-top: 4px; }

/* ================= A11y: fokus keyboard (oranye brand) ================= */
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
.nd-dialog:focus, .nd-dialog:focus-visible { outline: none; }
.nd-cform input:focus-visible, .loc-pop input:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--red); }
.searchbar input:focus-visible { outline: none; }
/* Modal masuk selalu di atas modal catatan (tamu klik suka di dalam modal). */
.auth-modal { z-index: 120; }
.auth-gerr { margin: -4px 2px 12px; text-align: center; }

/* ================= Kartu feed: status suka ================= */
.like-wrapper.liked .like-icon { color: #ff2e4d; }

/* ================= Rail: trending & kota bisa diklik ================= */
.trend-link { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.city-list li[data-city] { cursor: pointer; border-radius: 12px; }
.city-list li[data-city]:hover .city-name { color: var(--red); }

/* ================= Pemilih kota (topbar) ================= */
.loc-wrap { position: relative; flex: none; }
.loc-pop {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 45;
    width: 260px; padding: 10px; border-radius: 14px;
    background: var(--bg); box-shadow: 0 10px 30px rgba(0,0,0,.14); border: 1px solid var(--line);
}
html[data-theme="dark"] .loc-pop { background: #1c1c1c; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.loc-pop input {
    width: 100%; height: 38px; padding: 0 12px; border: 0; border-radius: 10px;
    background: var(--hover-bg); color: var(--text); font: inherit; font-size: 14px; outline: none;
}
.loc-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 280px; overflow-y: auto; }
.loc-opt {
    display: block; width: 100%; text-align: left; border: 0; background: none;
    padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--text);
}
.loc-opt:hover { background: var(--hover-bg); }
.loc-opt.on { color: var(--red); font-weight: 700; }

/* ================= Feed: kosong / gagal muat ================= */
.feed-empty-state { padding: 48px 20px; }
.feed-retry {
    height: 38px; padding: 0 18px; border-radius: 100px; border: 1px solid var(--line);
    background: var(--bg); color: var(--text); font-size: 14px; font-weight: 600;
}
.feed-retry:hover { border-color: var(--red); color: var(--red); }

/* ================= Detail catatan: menu pemilik, komentar balas/suka/hapus ================= */
.nd-menu { position: relative; flex: none; }
.nd-menu-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--text-sub); display: grid; place-items: center; }
.nd-menu-btn:hover { background: var(--hover-bg); }
.nd-menu-list {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; min-width: 170px; padding: 6px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14);
}
.nd-menu-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--text); }
.nd-menu-item:hover { background: var(--hover-bg); }
.nd-menu-item.danger { color: #e5484d; }
.nd-cmain { flex: 1; min-width: 0; }
.nd-cfoot { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.nd-clink { border: 0; background: none; padding: 0; font-size: 12px; font-weight: 600; color: var(--text-mute); }
.nd-clink:hover { color: var(--text); }
.nd-clike { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; padding: 0; color: var(--text-mute); font-size: 12px; }
.nd-clike svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.nd-clike.on { color: #ff2e4d; }
.nd-clike.on svg { fill: currentColor; }
.nd-replies:empty { display: none; }
.nd-replies { margin-top: 4px; }
.nd-c.is-reply { padding: 8px 0; }
.nd-act[data-act="comment"] { cursor: pointer; }
.nd-replying {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-bottom: 8px; padding: 6px 6px 6px 12px; border-radius: 10px;
    background: var(--hover-bg); color: var(--text-sub); font-size: 12.5px;
}
.nd-replying b { color: var(--red); font-weight: 600; }
.nd-replying button { border: 0; background: none; color: var(--text-mute); font-size: 18px; line-height: 1; width: 26px; height: 26px; border-radius: 50%; }
.nd-replying button:hover { background: var(--bg); color: var(--text); }

/* Halaman legal (/ketentuan, /privasi) */
.legal h2 { font-size: 16px; margin: 22px 0 6px; }
.legal p { line-height: 1.65; margin: 0 0 10px; }

/* ================= P2: halaman tagar/kota/koleksi, catatan serupa, koleksi, modal umum ================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.explore-wrap { max-width: 1240px; margin: 0 auto; padding: 24px 20px 60px; }
.explore-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 0 22px; }
.explore-owner { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-sub); font-weight: 600; }
.explore-owner img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.explore-title { margin: 0; font-size: 28px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; word-break: break-word; }
.explore-lock { color: var(--text-mute); }
.explore-count { margin: 0; color: var(--text-sub); font-size: 14px; }
.explore-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--hover-bg); border-radius: 100px; }
.seg a { padding: 7px 18px; border-radius: 100px; font-size: 14px; font-weight: 600; color: var(--text-sub); }
.seg a.active { background: var(--bg); color: var(--red); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg-btn { height: 38px; padding: 0 16px; border-radius: 100px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 14px; font-weight: 600; }
.seg-btn:hover { border-color: var(--red); color: var(--red); }
.seg-btn.danger { color: #e5484d; }
.seg-btn.danger:hover { border-color: #e5484d; }
.board-admin { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* masonry generik (data-masonry): kartu dibagi ke kolom oleh JS */
.feeds-container.is-masonry { display: flex; align-items: flex-start; }
.masonry-tail .feed-end { padding: 16px 0 30px; }
.spin { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--red); animation: vnspin .8s linear infinite; }
@keyframes vnspin { to { transform: rotate(360deg); } }

/* Detail catatan: lokasi, menu, komentar lainnya, catatan serupa */
.nd-author-act { display: flex; align-items: center; gap: 6px; flex: none; }
.nd-loc { color: var(--text-sub); }
.nd-loc:hover { color: var(--red); }
.nd-cmore { display: block; margin: 8px auto 4px; border: 1px solid var(--line); background: var(--bg); color: var(--text-sub); border-radius: 100px; padding: 7px 16px; font-size: 13px; font-weight: 600; }
.nd-cmore:hover { color: var(--red); border-color: var(--red); }
.nd-cmenu { position: relative; display: inline-flex; }
.nd-cmenu-btn { font-size: 16px; line-height: 1; letter-spacing: 1px; }
.nd-cmenu-list { position: absolute; left: 0; top: calc(100% + 4px); z-index: 6; min-width: 170px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14); }
.nd-dialog { overflow-y: auto; overscroll-behavior: contain; }
.nd-dialog > .nd { height: 100%; }
.nd-related { padding: 22px 20px 10px; }
.nd-page .nd-related { padding: 28px 0 10px; }
.nd-related-h { font-size: 17px; margin: 0 0 14px; }
.nd-bar { position: relative; }

/* Pemilih koleksi (popover di atas tombol Simpan) */
.bp { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 6px); z-index: 8; max-width: 360px; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.18); }
html[data-theme="dark"] .bp, html[data-theme="dark"] .nd-cmenu-list, html[data-theme="dark"] .sugg, html[data-theme="dark"] .vn-dialog { background: #1c1c1c; }
.bp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 6px; }
.bp-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--text-mute); width: 28px; height: 28px; border-radius: 50%; }
.bp-x:hover { background: var(--hover-bg); color: var(--text); }
.bp-list { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow-y: auto; }
.bp-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.bp-row:hover { background: var(--hover-bg); }
.bp-row input { accent-color: var(--red); width: 16px; height: 16px; }
.bp-row svg { color: var(--text-mute); flex: none; }
.bp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-note { padding: 8px 6px; font-size: 13px; }
.bp-new { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--red); font-weight: 700; font-size: 14px; padding: 8px 6px; border-radius: 8px; }
.bp-new:hover { background: var(--hover-bg); }
.bp-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.bp-form input[type=text] { flex: 1 1 140px; min-width: 0; height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.bp-priv { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-sub); }
.bp-form button { height: 36px; border: 0; border-radius: 100px; background: var(--red); color: #fff; font-weight: 700; padding: 0 14px; }

/* Modal umum (laporkan, edit, pengikut, koleksi, onboarding) */
.vn-modal { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 16px; }
.vn-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.vn-dialog { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--bg); color: var(--text); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
.vn-dialog.edit { width: min(560px, 100%); }
.vn-dialog.onboard { width: min(620px, 100%); padding: 22px 22px 18px; overflow-y: auto; display: block; }
.vn-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 10px; border-bottom: 1px solid var(--line); }
.vn-h { margin: 0; font-size: 18px; font-weight: 800; }
.vn-x { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--text-mute); width: 34px; height: 34px; border-radius: 50%; }
.vn-x:hover { background: var(--hover-bg); color: var(--text); }
.vn-body { padding: 14px 18px 18px; overflow-y: auto; overscroll-behavior: contain; }
.vn-dialog.list .vn-body { min-height: 200px; max-height: 70vh; }
.vn-sub { margin: 4px 0 14px; font-size: 14px; }
.vn-form { display: flex; flex-direction: column; gap: 12px; }
.vn-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.vn-form input[type=text], .vn-form textarea, .vn-form select { font: inherit; font-weight: 400; font-size: 15px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%; }
.vn-form textarea { resize: vertical; }
.vn-form input:focus, .vn-form textarea:focus, .vn-form select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.vn-form .ae, .ob-err { margin: 0; }
.vn-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.auth-submit.sm { height: 40px; padding: 0 20px; font-size: 14px; }
.auth-submit:disabled { opacity: .5; cursor: default; }
.rp-reasons { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-reasons legend { padding: 0; margin-bottom: 6px; font-size: 13px; }
.vn-form .rp-opt { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.rp-opt:hover { background: var(--hover-bg); }
.rp-opt input { accent-color: var(--red); }

/* Onboarding */
.ob-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 16px; }
.ob-chip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font-size: 14px; font-weight: 600; text-align: left; }
.ob-chip:hover { border-color: var(--red); }
.ob-chip[aria-pressed="true"] { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.ob-city { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.ob-city input { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }

/* Profil: statistik bisa diklik, aksi, koleksi, blokir */
.pstat { border: 0; background: none; padding: 0; font: inherit; font-size: 14px; color: var(--text-sub); cursor: pointer; }
.pstat:hover { color: var(--red); }
.pstat b { color: var(--text); }
.profile-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.blocked-note { text-align: center; padding: 48px 20px; color: var(--text-sub); }
.blocked-note p { margin: 4px 0; }
.blocked-note .seg-btn { margin-top: 12px; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; padding-top: 8px; }
.board-card { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 0; background: none; padding: 0; color: var(--text); font: inherit; cursor: pointer; }
.board-cover { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; aspect-ratio: 4 / 3; border-radius: var(--cover-radius); overflow: hidden; background: var(--skeleton); }
.board-cover img { width: 100%; height: 100%; object-fit: cover; }
.board-cover img:first-child { grid-row: 1 / 3; }
.board-cover.n1 img { grid-column: 1 / 3; grid-row: 1 / 3; }
.board-cover.n2 img { grid-row: 1 / 3; }
.board-empty { grid-column: 1 / 3; grid-row: 1 / 3; display: grid; place-items: center; font-size: 34px; color: var(--text-mute); }
.board-new .board-cover { border: 2px dashed var(--line); background: none; }
.board-card:hover .board-cover { filter: brightness(.95); }
.board-meta { display: flex; align-items: center; gap: 6px; font-size: 15px; margin-top: 4px; min-width: 0; }
.board-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-meta svg { color: var(--text-mute); flex: none; }

/* Baris pengguna / tagar / tempat (cari, pengikut) */
.user-row { justify-content: space-between; }
.user-row-link { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.user-row-link span { display: flex; flex-direction: column; min-width: 0; }
.user-row-link small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-follow.sm { padding: 6px 16px; font-size: 13px; flex: none; }
.tag-row { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.tag-row:hover b { color: var(--red); }
.tag-row span:last-child { display: flex; flex-direction: column; }
.tag-row small { color: var(--text-mute); font-size: 13px; }
.tag-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--hover-bg); display: grid; place-items: center; font-size: 18px; font-weight: 800; color: var(--red); flex: none; }
.search-list { max-width: 720px; margin: 0 auto; }
.page-h-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.page-h-row .seg-btn { height: 34px; font-size: 13px; }

/* Saran pencarian (topbar) */
.searchbar { position: relative; }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 46; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.14); max-height: 420px; overflow-y: auto; }
.sg-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: 12px; color: var(--text-mute); }
.sg-head button { border: 0; background: none; color: var(--red); font-size: 12px; font-weight: 600; }
.sg-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; color: var(--text); }
.sg-item:hover, .sg-item.on { background: var(--hover-bg); }
.sg-item img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; }
.sg-ico { width: 24px; height: 24px; display: grid; place-items: center; color: var(--text-mute); flex: none; font-size: 14px; }
.sg-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-type { color: var(--text-mute); font-size: 12px; flex: none; }

/* Modal auth: Lupa sandi */
.ar-row { justify-content: space-between; }
.ar-row .ar { margin: 0; }
.aforgot { color: var(--red); font-size: 13px; font-weight: 600; }

/* Rail kota = tautan /kota/{X} */
.city-link { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.city-link:hover .city-name { color: var(--red); }

@media (max-width: 760px) {
    .explore-wrap { padding: 14px 10px 90px; }
    .explore-title { font-size: 22px; }
    .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .profile-head { flex-wrap: wrap; }
    .profile-actions { width: 100%; }
    .nd-page .nd-related { padding: 22px 10px 90px; }
    .vn-modal { padding: 0; align-items: end; }
    .vn-dialog, .vn-dialog.edit, .vn-dialog.onboard { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .ob-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sugg { position: fixed; left: 8px; right: 8px; top: calc(var(--topbar-h) + 4px); }
}

/* =====================================================================================
   P4 — WEB HP = APP FLUTTER (≤760px). Desktop (>1024) & tablet tidak berubah: semua elemen
   m-* disembunyikan di luar media query; aturan HP hanya di dalam @media (max-width: 760px).
   Warna = VColors app (lib/ui/theme.dart).
   ===================================================================================== */
:root {
    --m-bg: #fff; --m-surface: #fff; --m-strong: #000; --m-text: rgba(0,0,0,.87);
    --m-sub: rgba(0,0,0,.54); --m-muted: rgba(0,0,0,.45); --m-faint: rgba(0,0,0,.38);
    --m-divider: #ededed; --m-border: #e6e6e6; --m-field: #f5f5f5; --m-tint: #fff3e0; --m-tint-soft: #fff7ee;
    --m-accent: #ff2e4d; --m-orange: #f57c00; --m-nav-h: 58px;
}
html[data-theme="dark"] {
    --m-bg: #121212; --m-surface: #1c1c1e; --m-strong: #fff; --m-text: #e8e8ea;
    --m-sub: #b4b4b8; --m-muted: #909096; --m-faint: #7c7c82;
    --m-divider: #2c2c30; --m-border: #3a3a3e; --m-field: #26262a; --m-tint: #3d2a14; --m-tint-soft: #2b2117;
    --m-orange: #ff9800;
}
.m-head, .m-nav, .m-search, .m-doors, .nd-back, .nd-mshare { display: none; }
.m-recent, .m-trend-h { display: none !important; }

/* ---- Sheet bawah generik (dipakai juga di desktop oleh komentar /video → panel tengah) ---- */
.m-sheet-wrap { position: fixed; inset: 0; z-index: 150; }
.m-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.m-sheet-wrap .m-scrim { opacity: 0; transition: opacity .2s; }
.m-sheet-wrap.open .m-scrim { opacity: 1; }
.m-scrim--sheet { position: fixed; z-index: 135; }
.m-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; max-height: 88dvh;
    display: flex; flex-direction: column; background: var(--m-surface); color: var(--m-text);
    border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(100%); transition: transform .22s ease; outline: none;
}
.m-sheet-wrap.open .m-sheet { transform: none; }
.m-sheet-grab { flex: none; width: 40px; height: 4px; border-radius: 2px; background: var(--m-border); margin: 10px auto 4px; }
.m-sheet-top { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 4px 10px 6px 16px; }
.m-sheet-h { margin: 0; font-size: 16px; font-weight: 700; color: var(--m-strong); }
.m-sheet-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--m-muted); font-size: 26px; line-height: 1; }
.m-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 16px; }
.m-sheet.is-actions .m-sheet-body { padding: 4px 0 6px; }
.m-act { display: block; width: 100%; height: 52px; border: 0; background: none; color: var(--m-text); font-size: 16px; font-weight: 500; white-space: nowrap; }
.m-act + .m-act { border-top: 1px solid var(--m-divider); }
.m-act.danger { color: var(--m-accent); }
.m-act-cancel { color: var(--m-sub); border-top: 6px solid var(--m-field) !important; }
.m-cat-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 12px; }
.m-cat { border: 0; border-radius: 100px; padding: 8px 14px; background: var(--m-field); color: var(--m-text); font-size: 14px; font-weight: 500; white-space: nowrap; }
.m-cat.active { background: var(--m-tint); color: var(--m-orange); font-weight: 700; }
.m-sheet.is-comments { height: 72vh; height: 72dvh; }
.m-sheet.is-comments .m-sheet-body { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.vc-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px; }
.vc-more { flex: none; }
.vc-more:not([hidden]) { padding: 0 16px 6px; }
.vc-bar { flex: none; border-top: 1px solid var(--m-divider); padding: 8px 12px; }
.vc-bar .nd-cform input { height: 40px; }
@media (min-width: 761px) {
    .m-sheet { left: 50%; right: auto; width: min(480px, 100vw); margin-left: max(-240px, -50vw); }
}
html.m-lock, html.m-lock body { overflow: hidden; }

/* ---- Drawer samping ---- */
.m-drawer-wrap { position: fixed; inset: 0; z-index: 140; }
.m-drawer-wrap .m-scrim { opacity: 0; transition: opacity .22s; }
.m-drawer-wrap.open .m-scrim { opacity: 1; }
.m-drawer {
    position: absolute; top: 0; bottom: 0; left: 0; width: min(304px, 84vw);
    display: flex; flex-direction: column; background: var(--m-surface); color: var(--m-text);
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(-100%); transition: transform .22s ease; outline: none;
    box-shadow: 4px 0 24px rgba(0,0,0,.18);
}
.m-drawer-wrap.open .m-drawer { transform: none; }
.m-dr-head { padding: 18px 18px 12px; border-bottom: 1px solid var(--m-divider); }
.m-dr-me { display: flex; align-items: center; gap: 12px; min-width: 0; }
.m-dr-me img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; }
.m-dr-me span { display: flex; flex-direction: column; min-width: 0; }
.m-dr-me b { font-size: 16px; font-weight: 800; color: var(--m-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-dr-me small { font-size: 13px; color: var(--m-muted); }
.m-dr-brand { display: flex; align-items: center; gap: 9px; }
.m-dr-brand b { font-size: 22px; font-weight: 800; color: #5e5e5e; }
html[data-theme="dark"] .m-dr-brand b { color: #d0d0d4; }
.m-dr-login { margin-top: 12px; height: 40px; padding: 0 20px; border: 0; border-radius: 100px; background: var(--m-orange); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; }
.m-dr-list { flex: 1; padding: 4px 0; }
.m-dr-list form { margin: 0; }
.m-dr-list hr { border: 0; border-top: 1px solid var(--m-divider); margin: 4px 0; }
.m-dr-i {
    display: flex; align-items: center; gap: 18px; width: 100%; height: 48px; padding: 0 18px;
    border: 0; background: none; color: var(--m-text); font: inherit; font-size: 15px; font-weight: 500; text-align: left; white-space: nowrap;
}
.m-dr-i:active { background: var(--m-field); }
.m-dr-i svg { flex: none; }
.m-dr-i.danger { color: var(--m-accent); }
.m-switch { position: relative; margin-left: auto; width: 40px; height: 24px; border-radius: 100px; background: var(--m-border); transition: background .2s; flex: none; }
.m-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.m-dr-dark[aria-checked="true"] .m-switch { background: var(--m-orange); }
.m-dr-dark[aria-checked="true"] .m-switch::after { transform: translateX(16px); }
.m-dr-foot { margin: 0; padding: 16px 18px; font-size: 12px; color: var(--m-faint); }

/* ---- Halaman /video (desktop: kolom 9:16 di tengah; HP: layar penuh di atas nav) ---- */
.pg-video { background: #000; }
.vp { position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 0; background: #000; color: #fff; }
.vp:fullscreen { top: 0; bottom: 0; }
.vp-list {
    height: 100%; width: min(100%, calc((100vh - var(--topbar-h)) * 9 / 16)); margin: 0 auto;
    overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; outline: none;
}
.vp:fullscreen .vp-list, .vp:fullscreen .vp-top { width: min(100%, calc(100vh * 9 / 16)); }
.vp-list::-webkit-scrollbar { display: none; }
.vp-item { position: relative; height: 100%; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; background: #000; }
.vp-loading { display: grid; place-items: center; }
.vp-loading p { color: rgba(255,255,255,.7); }
.vp-media, .vp-media video, .vp-yt, .vp-yt iframe, .vp-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.vp-yt iframe { pointer-events: none; }
.vp-tap { position: absolute; inset: 0; z-index: 1; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.vp-paused { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; color: rgba(255,255,255,.75); pointer-events: none; }
.vp-burst { position: absolute; left: 50%; top: 50%; z-index: 3; color: #ff2e4d; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0); }
.vp-burst.pop { animation: ndheart .8s ease forwards; }
.vp-grad { position: absolute; left: 0; right: 0; bottom: 0; height: 240px; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,0)); }
.vp-top {
    position: absolute; top: 0; left: 50%; z-index: 5; transform: translateX(-50%);
    width: min(100%, calc((100vh - var(--topbar-h)) * 9 / 16));
    display: flex; align-items: center; gap: 2px; padding: calc(4px + env(safe-area-inset-top)) 4px 4px; pointer-events: none;
}
.vp-top > * { pointer-events: auto; }
.vp-h { flex: 1; margin: 0; text-align: center; font-size: 17px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.55); pointer-events: none !important; }
.vp-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: #fff; display: grid; place-items: center; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.vp-btn .vp-ico-on, .vp-btn.on .vp-ico-off { display: none; }
.vp-btn.on .vp-ico-on { display: block; }
.vp-cap { position: absolute; left: 14px; right: 78px; bottom: 22px; z-index: 3; text-shadow: 0 1px 4px rgba(0,0,0,.55); }
.vp-author { display: inline-block; margin-bottom: 6px; font-size: 15px; font-weight: 700; color: #fff; }
.vp-title {
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
    width: 100%; padding: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 14.5px; line-height: 1.35; text-align: left;
}
.vp-title.open { -webkit-line-clamp: 12; max-height: 45vh; overflow-y: auto; }
.vp-rail { position: absolute; right: 6px; bottom: 24px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.vp-ava { position: relative; margin-bottom: 8px; }
.vp-ava img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; background: #fff; }
.vp-follow {
    position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); width: 20px; height: 20px; padding: 0;
    border: 0; border-radius: 50%; background: #ff2e4d; color: #fff; font-size: 15px; font-weight: 800; line-height: 20px; text-align: center;
}
.vp-follow.on { background: #fff; color: #ff2e4d; font-size: 12px; }
.vp-act { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 52px; padding: 0; border: 0; background: none; color: #fff; font-size: 11.5px; text-shadow: 0 1px 4px rgba(0,0,0,.55); }
.vp-act span { white-space: nowrap; }
.vp-act svg { fill: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); transition: transform .15s; }
.vp-act:active svg { transform: scale(.85); }
.vp-act.on svg { fill: #ff2e4d; }
.vp-act.save.on svg { fill: #ffb300; }

@media (max-width: 760px) {
    /* overflow-x: clip (bukan hidden) agar position:sticky tetap jalan di HP. */
    html, body { overflow-x: clip; }
    body { background: var(--m-bg); }
    .topbar, .channel-tabs { display: none; }
    body:has(> #mNav) { padding-bottom: calc(var(--m-nav-h) + env(safe-area-inset-bottom)); }

    /* ---- Header (feed.dart _header + _channelChips) ---- */
    .m-head {
        display: block; position: sticky; top: 0; z-index: 30; background: var(--m-bg);
        padding-top: env(safe-area-inset-top); transition: transform .25s ease; will-change: transform;
    }
    .m-head.m-hide { transform: translateY(-100%); }
    .m-bar { display: flex; align-items: center; height: 52px; padding: 0 4px 0 6px; }
    .m-ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--m-text); padding: 0; }
    .m-ico:active { background: var(--m-field); }
    .m-modes { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center; }
    .m-mode {
        position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 44px; padding: 0 10px;
        font-size: 16px; font-weight: 500; color: var(--m-muted); white-space: nowrap; -webkit-tap-highlight-color: transparent;
    }
    .m-mode::after { content: ""; width: 18px; height: 3px; margin-top: 3px; border-radius: 3px; background: transparent; }
    .m-mode.active { font-size: 18px; font-weight: 800; color: var(--m-strong); }
    .m-mode.active::after { background: var(--m-accent); }
    .m-title { flex: 1; min-width: 0; margin: 0; text-align: center; font-size: 17px; font-weight: 700; color: var(--m-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .m-chips { display: flex; align-items: center; height: 42px; }
    .m-chips[hidden] { display: none; }
    .m-chip-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 20px; height: 100%; padding: 0 14px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
    .m-chip-row::-webkit-scrollbar { display: none; }
    .m-chip { flex: none; font-size: 15px; font-weight: 500; color: var(--m-sub); white-space: nowrap; -webkit-tap-highlight-color: transparent; }
    .m-chip.active { font-weight: 700; color: var(--m-strong); }
    .m-chip-more { color: var(--m-sub); }
    .m-city { display: flex; align-items: center; gap: 4px; padding: 2px 14px 8px; font-size: 15px; color: var(--m-strong); }
    .m-city b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .m-city-btn { margin-left: auto; height: 32px; padding: 0 14px; border: 0; border-radius: 100px; background: var(--m-tint); color: var(--m-orange); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
    .page { padding: 4px 10px 24px; }
    #feed.m-swipe-l { animation: mSwipeL .28s ease; }
    #feed.m-swipe-r { animation: mSwipeR .28s ease; }

    /* ---- Nav bawah (shell.dart _bottomBar) ---- */
    .m-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        height: calc(var(--m-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        background: var(--m-surface); border-top: 1px solid var(--m-divider);
    }
    .m-nav-i {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        color: var(--m-muted); font-size: 11px; font-weight: 500; white-space: nowrap; -webkit-tap-highlight-color: transparent;
    }
    .m-nav-i.active { color: var(--m-strong); font-weight: 700; }
    .m-nav-ico { position: relative; display: inline-flex; }
    .m-badge { position: absolute; right: -4px; top: -2px; width: 8px; height: 8px; border-radius: 50%; background: #1a7f37; }
    .m-nav-plus { flex: 1; display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
    .m-nav-plus svg { width: 46px; height: 32px; padding: 4px 11px; border-radius: 9px; background: linear-gradient(135deg, #ff9100, #f03e00); }
    .m-nav-plus:active svg { filter: brightness(.92); }
    .m-nav.is-dark { background: #000; border-top-color: #1c1c1e; }
    .m-nav.is-dark .m-nav-i { color: rgba(255,255,255,.6); }
    .m-nav.is-dark .m-nav-i.active { color: #fff; }
    html.m-fs .m-nav { display: none; } /* satu-satunya kondisi nav disembunyikan (video layar penuh) */

    /* ---- Toast di tengah layar (pakem) ---- */
    .vn-toast { top: 50%; bottom: auto; transform: translate(-50%, -50%); max-width: calc(100vw - 48px); text-align: center; border-radius: 12px; line-height: 1.4; }

    /* ---- Modal → sheet bawah (auth, umum, kota, koleksi) ---- */
    .auth-modal { padding: 0; align-items: end; justify-items: stretch; }
    .auth-dialog { max-width: none; max-height: 92vh; max-height: 92dvh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 26px 20px calc(20px + env(safe-area-inset-bottom)); }
    .auth-dialog::before, .vn-dialog::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--m-border); }
    .vn-dialog { padding-top: 10px; }
    .vn-dialog.onboard { padding-top: 26px; }
    .loc-pop.is-sheet {
        position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 140; width: auto;
        display: flex; flex-direction: column; max-height: 72vh; max-height: 72dvh;
        padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); border: 0; border-radius: 18px 18px 0 0;
        background: var(--m-surface); box-shadow: none;
    }
    .loc-pop.is-sheet[hidden] { display: none; }
    .loc-pop.is-sheet::before { content: "Pilih kota"; display: block; padding: 14px 0 10px; font-size: 16px; font-weight: 700; color: var(--m-strong); background: linear-gradient(var(--m-border), var(--m-border)) center 0 / 40px 4px no-repeat; }
    .loc-pop.is-sheet input { flex: none; height: 42px; background: var(--m-field); }
    .loc-pop.is-sheet .loc-list { flex: 1 1 auto; min-height: 0; max-height: none; }
    .loc-pop.is-sheet .loc-opt { padding: 12px 8px; font-size: 15px; }
    .bp.is-sheet {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 140; max-width: none;
        padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: 18px 18px 0 0; box-shadow: none;
        background: var(--m-surface);
    }
    .bp.is-sheet .bp-list { max-height: 45vh; }
    .bp.is-sheet .bp-row { padding: 12px 6px; }

    /* ---- Detail catatan halaman penuh (note_detail.dart) ---- */
    .pg-note { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
    .nd-page { margin: 0; padding: 0; }
    .nd-page .nd { overflow: visible; } /* bukan kontainer scroll → bar atas sticky jalan */
    .nd-page .nd-side { display: contents; }
    .nd-page .nd-author {
        order: 0; position: sticky; top: 0; z-index: 30; gap: 4px; justify-content: flex-start;
        padding: calc(4px + env(safe-area-inset-top)) 4px 4px 0; background: var(--m-bg); border-bottom: 0;
    }
    .nd-page .nd-back, .nd-page .nd-mshare { display: grid; place-items: center; }
    .nd-back { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--m-text); }
    .nd-page .nd-who { flex: 1; min-width: 0; gap: 10px; font-size: 15px; font-weight: 700; }
    .nd-page .nd-who img { width: 34px; height: 34px; flex: none; }
    .nd-page .nd-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .nd-page .nd-author-act { gap: 0; }
    .nd-page .nd-follow { padding: 7px 16px; font-size: 13px; margin-right: 4px; white-space: nowrap; }
    .nd-page .nd-menu-btn { width: 40px; height: 40px; color: var(--m-text); }
    .nd-page .nd-media { order: 1; }
    .nd-page .nd-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
    .nd-page .nd-track::-webkit-scrollbar { display: none; }
    .nd-page .nd-track img { position: relative; inset: auto; flex: 0 0 100%; width: 100%; height: 100%; opacity: 1; scroll-snap-align: start; object-fit: cover; }
    .nd-page .nd-nav { display: none; }
    .nd-page .nd-dots { align-items: center; }
    .nd-page .nd-dots i { width: 6px; height: 6px; background: rgba(0,0,0,.26); transition: all .2s; }
    .nd-page .nd-dots i.on { width: 8px; height: 8px; background: var(--m-accent); }
    .nd-page .nd-scroll { order: 2; padding: 14px 16px 6px; }
    .nd-page .nd-title { font-size: 18px; font-weight: 700; line-height: 1.35; }
    .nd-page .nd-meta { font-size: 12.5px; }
    .nd-page .nd-bar {
        order: 3; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
        display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom)) 12px;
        background: var(--m-surface); border-top: 1px solid var(--m-divider);
    }
    .nd-page .nd-replying { order: 0; flex: 0 0 100%; margin: 0 0 4px; }
    .nd-page .nd-cform { order: 1; flex: 1 1 0; min-width: 0; }
    .nd-page .nd-cform input { height: 38px; padding: 0 14px; background: var(--m-field); }
    .nd-page .nd-cform input:placeholder-shown + button { display: none; }
    .nd-page .nd-cform.guest { height: 38px; padding: 0 14px; text-align: left; color: var(--m-muted); background: var(--m-field); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .nd-page .nd-actions { order: 2; gap: 0; margin: 0; }
    .nd-page .nd-act { padding: 0 8px; height: 38px; font-size: 12.5px; color: var(--m-text); }
    .nd-page .nd-act.on { color: #ff2e4d; }
    .nd-page .nd-act.save.on { color: #ffb300; }
    .nd-page .nd-act svg { width: 23px; height: 23px; }
    .nd-page .nd-act.share { display: none; }
    .nd-page .nd-bar:focus-within .nd-actions { display: none; }
    .nd-page .nd-related { padding: 18px 10px 20px; border-top: 6px solid var(--m-field); }

    /* ---- Profil (profile.dart _headerBlock: blok gradasi gelap, teks putih) ---- */
    .profile-wrap { padding: 0 0 20px; }
    .profile-wrap > :not(.profile-head) { margin-left: 10px; margin-right: 10px; }
    .profile-wrap > .flash-ok { margin-top: 10px; }
    .profile-head {
        display: grid; grid-template-columns: auto 1fr auto; column-gap: 16px;
        grid-template-areas: "ava name name" "ava user user" "bio bio bio" "stats stats acts";
        padding: 18px; border-bottom: 0; color: #fff;
        background: linear-gradient(135deg, #3a2a22, #5b3a26 50%, #2b2b35);
    }
    .profile-meta { display: contents; }
    .profile-avatar { grid-area: ava; width: 76px; height: 76px; border: 2px solid #fff; align-self: center; }
    .profile-name { grid-area: name; align-self: end; min-width: 0; font-size: 20px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .profile-username { grid-area: user; align-self: start; margin-top: 4px; font-size: 12.5px; color: rgba(255,255,255,.72); }
    .profile-bio { grid-area: bio; margin-top: 14px; font-size: 13.5px; line-height: 1.45; color: rgba(255,255,255,.92); }
    .profile-stats { grid-area: stats; align-self: end; margin-top: 16px; gap: 16px; font-size: 11.5px; color: rgba(255,255,255,.7); }
    .profile-head .pstat, .profile-stats > span { display: flex; flex-direction: column; align-items: flex-start; font-size: 11.5px; color: rgba(255,255,255,.7); white-space: nowrap; }
    .profile-head .pstat b, .profile-stats > span b { font-size: 16px; font-weight: 800; color: #fff; }
    .profile-actions { grid-area: acts; width: auto; align-self: end; margin-top: 16px; gap: 6px; }
    .profile-edit, .profile-follow { height: 36px; padding: 0 16px; font-size: 13.5px; white-space: nowrap; }
    .profile-edit, .profile-follow.on { border: 0; background: rgba(255,255,255,.2); color: #fff; }
    .profile-follow { background: #ff2e4d; }
    .profile-head .nd-menu-btn { color: #fff; }

    /* Tab garis-bawah (profil, cari) seperti app */
    .profile-tabs { gap: 0; margin: 4px 10px 10px; border-bottom: 1px solid var(--m-divider); overflow-x: auto; scrollbar-width: none; }
    .profile-tabs a { position: relative; flex: none; padding: 12px 16px 10px; border-radius: 0; background: none; font-size: 15px; font-weight: 500; color: var(--m-muted); white-space: nowrap; }
    .profile-tabs a.active { background: none; color: var(--m-strong); font-weight: 800; }
    .profile-tabs a.active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: var(--m-accent); }

    /* ---- Layar cari (search.dart) ---- */
    .m-search {
        display: flex; align-items: center; gap: 4px; position: sticky; top: 0; z-index: 30;
        padding: calc(6px + env(safe-area-inset-top)) 10px 6px 2px; background: var(--m-bg);
    }
    .m-sform { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 100px; background: var(--m-field); color: var(--m-muted); }
    .m-sform input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--m-text); font: inherit; font-size: 15px; }
    .m-sform input::-webkit-search-cancel-button { display: none; }
    .m-sform .sugg { position: fixed; left: 8px; right: 8px; top: calc(54px + env(safe-area-inset-top)); }
    .m-sgo { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 100px; background: var(--m-orange); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; }
    .search-wrap { padding: 6px 12px 24px; }
    .search-wrap > .profile-empty { text-align: left; padding: 4px 2px; }
    .search-wrap > .profile-empty > .profile-empty-ico, .search-wrap > .profile-empty > p:not(.m-sec-h) { display: none; }
    .m-trend-h { display: flex !important; }
    .m-recent:not([hidden]) { display: block !important; }
    .m-sec-h { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; font-size: 15px; color: var(--m-strong); }
    .m-sec-h .m-ico { width: 36px; height: 36px; color: var(--m-muted); }
    .search-wrap .search-pop { justify-content: flex-start; margin-top: 0; }
    .search-wrap .search-pop a { background: var(--m-field); padding: 7px 12px; font-size: 13.5px; color: var(--m-text); }
    .user-row { padding: 10px 2px; }
    .user-row img { width: 44px; height: 44px; }
    .tag-row { padding: 10px 2px; }

    /* ---- Pesan/notifikasi (chat.dart: 3 pintu) ---- */
    .m-doors { display: flex; margin: 0 -12px 6px; border-bottom: 1px solid var(--m-divider); }
    .m-door { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0 10px; font-size: 12.5px; color: var(--m-text); white-space: nowrap; }
    .m-door-ico { position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--door); }
    .m-door-ico::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; opacity: .12; }
    .m-door-ico svg { position: relative; }
    .m-door-n { position: absolute; right: -4px; top: -2px; min-width: 18px; padding: 1px 5px; border-radius: 100px; background: #ff2e4d; color: #fff; font-size: 10px; font-weight: 700; font-style: normal; line-height: 16px; text-align: center; }
    .m-door.active { box-shadow: inset 0 -3px 0 var(--door); }
    .m-door.active .m-door-l { font-weight: 800; color: var(--m-strong); }
    .m-doors + .profile-tabs { display: none; }
    body:has(.m-doors) .page-h-row { justify-content: flex-end; }
    body:has(.m-doors) .page-h-row .page-h { display: none; }
    .notif { padding: 12px 4px; border-radius: 0; }
    .notif.unread { background: var(--m-tint-soft); }

    /* ---- Video HP: penuh di atas nav bawah (nav tetap tampil, varian gelap) ---- */
    .vp { top: 0; bottom: calc(var(--m-nav-h) + env(safe-area-inset-bottom)); }
    .vp-list, .vp-top { width: 100%; }
    html.m-fs .vp { bottom: 0; }
}
@keyframes mSwipeL { from { opacity: .4; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes mSwipeR { from { opacity: .4; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
