
    :root {
        --v8-bg: #000000;
        --v8-surface: #111111;
        --v8-surface-hover: #1a1a1a;
        --v8-text: #ffffff;
        --v8-text-inverse: #000000;
        --v8-subtext: #666666;
        --v8-border: #1f1f1f;
        --v8-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
        --v8-red: #ff453a;
        --v8-green: #30d158;
    }

    #nv-root {
        position: relative; width: 100%; overscroll-behavior-y: contain;
        padding-bottom: 120px; background: var(--v8-bg);
        /* หัวหน้า (ปฏิทิน/ปุ่มโน้ต) ถูกเอาออก — เว้นขอบบนเองให้พ้นรอยบาก/Dynamic Island */
        padding-top: max(8px, env(safe-area-inset-top));
        /* 🐞 100vh บน Safari ใหญ่กว่าพื้นที่มองเห็นจริงตอนแถบเครื่องมือโผล่อยู่ — เดิมไม่มีผลเพราะ
           .app-view เคยบังคับความสูงตายตัวทับอยู่แล้ว ดู [[project_hqux_full_page_scroll]] 🌟 */
        min-height: 100vh; min-height: 100dvh;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Noto Sans Thai', sans-serif;
        font-style: normal !important;
    }

    /* ── Header ── */
    .nv-header { padding: 24px 20px 10px; position: sticky; top: 0; z-index: 100; background: var(--v8-bg); }
    .nv-header-row { display: flex; align-items: center; justify-content: space-between; }
    .nv-header-left { display: flex; flex-direction: row; align-items: center; gap: 4px; }
    .nv-notes-btn {
        width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
        background: var(--v8-surface); color: var(--v8-text);
        display: flex; align-items: center; justify-content: center;
        font-size: 22px; transition: 0.2s; flex-shrink: 0; margin-bottom: 2px;
    }
    .nv-notes-btn:active { transform: scale(0.88); background: var(--v8-surface-hover); }

    /* ── Calendar Strip (7-day fixed) ── */
    .nv-strip-section { padding: 4px 0 10px; }
    .nv-strip-month-label { font-size: 14px; font-weight: 700; color: var(--v8-text); }
    .nv-strip-nav-btn {
        width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
        background: var(--v8-surface); color: var(--v8-text);
        display: flex; align-items: center; justify-content: center; font-size: 18px; transition: 0.15s;
    }
    .nv-strip-nav-btn:active { background: var(--v8-surface-hover); transform: scale(0.88); }
    .nv-strip-scroll {
        display: grid; grid-template-columns: repeat(7, 1fr);
        padding: 4px 16px 6px; overflow: hidden;
    }
    .nv-strip-day {
        display: flex; flex-direction: column; align-items: center; gap: 4px;
        padding: 2px 0; cursor: pointer;
    }
    .nv-strip-day-label { font-size: 9px; font-weight: 700; color: var(--v8-subtext); text-transform: uppercase; letter-spacing: 0.3px; }
    .nv-strip-day-num {
        width: 34px; height: 34px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 14px; font-weight: 500; color: var(--v8-subtext);
        background: rgba(255,255,255,0.06);
        transition: all 0.15s;
    }
    .nv-strip-day.has-event .nv-strip-day-num { color: var(--v8-text); font-weight: 700; }
    .nv-strip-day.today .nv-strip-day-num { background: #ffffff; color: #000000; font-weight: 800; }
    .nv-strip-day.selected:not(.today) .nv-strip-day-num { background: rgba(255,255,255,0.14); color: var(--v8-text); }
    .nv-strip-day-dots { display: flex; gap: 2px; min-height: 6px; align-items: center; justify-content: center; }
    .nv-strip-dot { width: 4px; height: 4px; border-radius: 50%; flex-shrink: 0; }

    /* ── Widget Grid ── */
    .nv-widget-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 16px 16px; }
    .nv-wg-tasks-card { grid-column: 1 / -1; min-height: 110px !important; }
    .nv-wg-card {
        background: var(--v8-surface); border-radius: 24px;
        padding: 16px 16px 14px; display: flex; flex-direction: column;
        min-height: 175px; cursor: pointer; overflow: hidden;
        transition: transform 0.18s var(--v8-ease);
        -webkit-user-select: none; user-select: none;
    }
    .nv-wg-card:active { transform: scale(0.96); background: var(--v8-surface-hover); }
    .nv-wg-card-header { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-shrink: 0; }
    .nv-wg-card-icon { font-size: 13px; color: var(--v8-subtext); }
    .nv-wg-card-label { font-size: 10px; font-weight: 800; color: var(--v8-subtext); text-transform: uppercase; letter-spacing: 0.8px; flex: 1; }

    /* Slide track (horizontal scroll) */
    .nv-wg-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex: 1; touch-action: pan-x; }
    .nv-wg-track::-webkit-scrollbar { display: none; }
    .nv-wg-slide { min-width: 100%; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: flex-end; }

    /* Dots */
    .nv-wg-dots { display: flex; gap: 5px; margin-top: 10px; flex-shrink: 0; justify-content: center; }
    .nv-wg-dot { width: 6px; height: 6px; border-radius: 6px; background: rgba(255,255,255,0.25); transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1); flex-shrink: 0; }
    .nv-wg-dot.active { background: rgba(255,255,255,0.9); width: 16px; border-radius: 6px; }

    /* Plan slide */
    .nv-wg-active-badge { font-size: 9px; font-weight: 800; padding: 2px 8px; border-radius: 20px; background: rgba(48,209,88,0.12); color: #30d158; width: fit-content; margin-bottom: 8px; }
    .nv-wg-plan-name { font-size: 30px; font-weight: 900; color: var(--v8-text); letter-spacing: -1.2px; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 4px; }
    .nv-wg-plan-tasks { font-size: 10px; font-weight: 600; color: var(--v8-subtext); margin-bottom: 10px; }
    .nv-wg-plan-bar { height: 2px; background: var(--v8-border); border-radius: 2px; overflow: hidden; margin-bottom: 4px; }
    .nv-wg-plan-fill { height: 100%; border-radius: 2px; }
    .nv-wg-plan-period { font-size: 10px; font-weight: 600; color: var(--v8-subtext); }
    .nv-wg-plan-owner { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; color: var(--v8-subtext); margin-bottom: 5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .nv-wg-owner-av { width: 14px; height: 14px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
    .nv-sl-owner { display: inline-flex; align-items: center; gap: 4px; }
    .nv-sl-owner .nv-wg-owner-av { width: 12px; height: 12px; }

    /* Task slide — 2-column layout */
    .nv-wg-task-inner { display: flex; align-items: center; gap: 10px; flex: 1; }
    .nv-wg-task-left { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
    .nv-wg-task-right { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
    .nv-wg-task-countdown-label { font-size: 10px; font-weight: 300; color: rgba(255,255,255,0.35); letter-spacing: 0.3px; line-height: 1.4; }
    .nv-wg-task-countdown { font-size: 30px; font-weight: 900; color: var(--v8-text); letter-spacing: -1.5px; line-height: 1; }
    .nv-wg-task-countdown-unit-inline { font-size: 14px; font-weight: 700; letter-spacing: 0; }
    .nv-wg-task-countdown-unit { font-size: 10px; font-weight: 600; color: var(--v8-subtext); margin-top: 2px; }
    .nv-wg-task-status { font-size: 10px; font-weight: 800; color: #30d158; letter-spacing: 0.3px; }
    .nv-wg-task-name { font-size: 30px; font-weight: 900; color: var(--v8-text); letter-spacing: -1.2px; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .nv-wg-task-time { font-size: 10px; color: var(--v8-subtext); margin-top: 3px; }
    .nv-wg-task-next-label { font-size: 10px; font-weight: 300; color: rgba(255,255,255,0.35); letter-spacing: 0.3px; line-height: 1.4; margin-bottom: 2px; }
    .nv-wg-task-next-name { font-size: 22px; font-weight: 900; color: var(--v8-text); letter-spacing: -0.8px; line-height: 1.1; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* Debt slide in widget */
    .nv-wg-debt-slide-name { font-size: 30px; font-weight: 900; color: var(--v8-text); letter-spacing: -1.2px; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .nv-wg-debt-slide-amt { font-size: 15px; font-weight: 800; color: var(--v8-text); letter-spacing: -0.5px; margin-top: 6px; }
    .nv-wg-debt-slide-due { font-size: 11px; font-weight: 600; color: var(--v8-subtext); margin-top: 3px; }

    /* Widget empty */
    .nv-wg-empty { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--v8-subtext); font-weight: 600; }
    @keyframes nvShimmer { 0%{opacity:1} 50%{opacity:0.4} 100%{opacity:1} }

    /* Widget skeleton */
    .nv-wg-sk { border-radius: 6px; background: linear-gradient(90deg, #1c1c1e 25%, #2a2a2c 50%, #1c1c1e 75%); background-size: 400px 100%; animation: nv-sk-anim 1.3s linear infinite; }
    @keyframes nv-sk-anim { 0%{background-position:-400px 0} 100%{background-position:400px 0} }

    /* ── Section Bottom Sheet Popup ── */
    .nv-sheet { position: fixed; inset: 0; z-index: 9998; display: none; align-items: flex-end; }
    .nv-sheet.open { display: flex; }
    .nv-sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.8); animation: nvFadeIn 0.22s ease; backdrop-filter: blur(4px); }
    .nv-sheet-panel {
        position: relative; width: 100%; max-height: 84vh;
        background: #0d0d0d; border-radius: 28px 28px 0 0;
        display: flex; flex-direction: column;
        animation: nvSlideUp 0.32s cubic-bezier(0.16,1,0.3,1);
        overflow: hidden;
    }
    .nv-sheet-handle-wrap { padding: 10px 0 0; flex-shrink: 0; }
    .nv-sheet-handle { width: 36px; height: 4px; background: rgba(255,255,255,0.15); border-radius: 2px; margin: 0 auto; }

    /* Cover — white, bold, editorial */
    .nv-sheet-cover {
        background: #ffffff; padding: 28px 24px 24px;
        flex-shrink: 0; position: relative; overflow: hidden;
    }
    .nv-sheet-cover-icon { font-size: 32px; margin-bottom: 6px; display: block; color: #000; }
    .nv-sheet-cover-title { font-size: 34px; font-weight: 900; color: #000; letter-spacing: -1.5px; line-height: 1; margin-bottom: 16px; }
    .nv-sheet-cover-chips { display: flex; gap: 6px; flex-wrap: wrap; }
    .nv-sheet-cover-chip {
        background: #000; color: #fff; padding: 5px 12px;
        border-radius: 30px; font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
    }
    .nv-sheet-cover-chip.light {
        background: rgba(0,0,0,0.07); color: #000;
    }

    /* List area */
    .nv-sheet-list {
        flex: 1; overflow-y: auto; padding: 14px 14px 40px;
        display: flex; flex-direction: column; gap: 12px;
        scrollbar-width: none;
        cursor: grab;
        -webkit-user-select: none; user-select: none;
        -webkit-touch-callout: none;
    }
    .nv-sheet-list:active { cursor: grabbing; }
    .nv-sheet-list::-webkit-scrollbar { display: none; }

    /* Horizontal scroll on mobile for popups (Optimized for iOS Native Feel) */
    @media (max-width: 600px) {
        .nv-sheet-list {
            flex-direction: row !important;
            overflow-x: auto !important;
            overflow-y: hidden !important;
            scroll-snap-type: x mandatory;
            padding: 20px 20px 40px;
            gap: 16px;
            align-items: stretch;
            /* iOS Specific Smooth Scroll & Gesture constraints */
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-x: contain;
            touch-action: pan-x;
        }
        .nv-sl-item, .nv-sl-debt, .nv-sl-task {
            min-width: 82vw;
            width: 82vw;
            scroll-snap-align: center;
            flex-shrink: 0;
            margin-bottom: 0;
            box-shadow: 0 8px 30px rgba(0,0,0,0.25);
            display: flex;
            flex-direction: column;
            justify-content: center;
            -webkit-user-select: none;
            user-select: none;
        }
        .nv-sl-item { flex-direction: row; align-items: center; }
    }

    /* List item */
    .nv-sl-item {
        background: var(--v8-surface); border-radius: 24px; padding: 20px;
        display: flex; align-items: center; gap: 16px;
        cursor: pointer; transition: 0.2s;
        border: 1px solid var(--v8-border);
    }
    .nv-sl-item:active { transform: scale(0.97); opacity: 0.8; }
    .nv-sl-bar { width: 4px; border-radius: 3px; flex-shrink: 0; align-self: stretch; min-height: 32px; }
    .nv-sl-body { flex: 1; min-width: 0; }
    .nv-sl-name { font-size: 15px; font-weight: 700; color: var(--v8-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .nv-sl-sub { font-size: 12px; color: var(--v8-subtext); margin-top: 3px; }
    .nv-sl-badge { font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 20px; flex-shrink: 0; }
    .nv-sl-badge.active-badge { background: rgba(48,209,88,0.15); color: #30d158; }
    .nv-sl-badge.now-badge { background: rgba(255,255,255,0.12); color: #fff; }

    /* Debt item */
    .nv-sl-debt { background: var(--v8-surface); border-radius: 20px; padding: 18px; cursor: pointer; transition: 0.2s; border: 1px solid var(--v8-border); }
    .nv-sl-debt:active { transform: scale(0.97); opacity: 0.8; }
    .nv-sl-debt-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
    .nv-sl-debt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
    .nv-sl-debt-name { font-size: 15px; font-weight: 700; color: var(--v8-text); flex: 1; }
    .nv-sl-debt-due { font-size: 11px; color: var(--v8-subtext); font-weight: 600; }
    .nv-sl-debt-amount { font-size: 22px; font-weight: 900; color: var(--v8-text); letter-spacing: -0.8px; }
    .nv-sl-debt-prog { height: 4px; background: var(--v8-border); border-radius: 2px; margin-top: 10px; overflow: hidden; }
    .nv-sl-debt-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }

    /* Debt donut in popup */
    .nv-sl-donut-wrap { padding: 20px 14px 10px; display: flex; align-items: center; gap: 20px; }
    .nv-sl-donut-svg { flex-shrink: 0; position: relative; width: 100px; height: 100px; }
    .nv-sl-donut-svg svg { width: 100%; height: 100%; }
    .nv-sl-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
    .nv-sl-donut-total { font-size: 14px; font-weight: 900; color: #fff; letter-spacing: -0.5px; }
    .nv-sl-donut-sub { font-size: 9px; color: var(--v8-subtext); margin-top: 1px; }
    .nv-sl-donut-legend { flex: 1; display: flex; flex-direction: column; gap: 5px; }
    .nv-sl-donut-leg-row { display: flex; align-items: center; gap: 6px; }
    .nv-sl-donut-leg-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
    .nv-sl-donut-leg-name { font-size: 11px; color: var(--v8-subtext); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* Debt summary card (first item in debt popup) */
    .nv-sl-debt-summary {
        background: var(--v8-surface); border-radius: 20px; padding: 18px 20px 16px;
        border: 1px solid var(--v8-border); margin-bottom: 0;
    }
    .nv-sl-sum-label { font-size: 11px; font-weight: 700; color: var(--v8-subtext); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 6px; }
    .nv-sl-sum-main { font-size: 26px; font-weight: 900; color: var(--v8-text); letter-spacing: -0.8px; line-height: 1.1; }
    .nv-sl-sum-main .sum-slash { color: var(--v8-subtext); font-weight: 400; font-size: 20px; margin: 0 4px; }
    .nv-sl-sum-main .sum-total { font-size: 18px; color: var(--v8-subtext); font-weight: 700; }
    .nv-sl-sum-remain { font-size: 13px; font-weight: 700; color: var(--v8-text); margin-top: 6px; }
    .nv-sl-sum-mini { font-size: 11px; font-weight: 600; color: var(--v8-subtext); margin-top: 3px; }
    .nv-sl-sum-bar { height: 4px; background: var(--v8-border); border-radius: 2px; margin-top: 10px; overflow: hidden; }
    .nv-sl-sum-bar-fill { height: 100%; border-radius: 2px; background: #17c964; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }

    /* Empty state inside popup */
    .nv-sl-empty { text-align: center; padding: 40px 20px; color: var(--v8-subtext); font-size: 13px; font-weight: 600; }

    /* โครงกระดูกแบบ Facebook — กระดูกทุกชิ้นค่อยๆ จางลงแล้วเข้มขึ้นพร้อมกันทั้งหน้า (ไม่ใช่แสงวิ่ง)
       ใช้ animation-delay ติดลบตามนาฬิกาเดียวกัน (ดู nvBoneSync) ให้กระดูกที่เพิ่มทีหลังเต้นจังหวะเดียวกับชุดแรก */
    .nv-shimmer { background: #2a2a2c; animation: nv-bone-pulse 1.6s ease-in-out infinite; }
    @keyframes nv-bone-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

    /* ── Notifications ── */
    .nv-divider { height: 1px; background: var(--v8-border); margin: 6px 20px 0; }
    #nv-list { display: flex; flex-direction: column; }
    /* แถวแจ้งเตือน + ปุ่มตอบรับ (ถ้ามี) ห่อรวมกันใน .nv-item — มือถือ display: contents จึงวางเหมือนเดิมเป๊ะ */
    .nv-item { display: contents; }
    /* 🖥️ คอม (≥768px): แคปซูลเต็มแถวยาวเกินไป → จัดเป็นตารางหลายคอลัมน์ แคปซูลละ ~360-520px
       หัวข้อวันที่คร่อมทุกคอลัมน์ ยังเต็มหน้าต่างเหมือนเดิม */
    @media (min-width: 768px) {
        #nv-list {
            display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
            column-gap: 12px; align-items: start; padding: 0 16px;
        }
        .nv-item { display: block; min-width: 0; }
        #nv-list .nv-row, #nv-list .nv-skel-row { margin: 0 0 12px; }
        #nv-list .nv-req-actions { padding: 0 4px 10px; }
        #nv-list .nv-date-header { grid-column: 1 / -1; padding: 24px 4px 10px; }
    }
    .nv-date-header { font-size: 14px; font-weight: 800; color: var(--v8-text); padding: 24px 20px 10px; }
    .nv-row {
        display: flex; gap: 14px; align-items: center;
        margin: 0 16px 12px; padding: 18px 20px;
        background: var(--v8-surface); border-radius: 42px;
        transition: transform 0.2s var(--v8-ease), background 0.2s;
        cursor: pointer; position: relative;
        -webkit-user-select: none; user-select: none;
        /* ไม่มีแอนิเมชันตอนแสดง — เดิม fadeIn เล่นซ้ำทุกครั้งที่กลับเข้าหน้านี้ (display:none → block) รายการกระพริบไล่ทีละอัน */
    }
    .nv-row:active { background: var(--v8-surface-hover); transform: scale(0.96); }
    /* จุดยังไม่อ่าน — อยู่นอกแคปซูล ชิดขอบซ้ายด้านหน้า (เดิมอยู่ในแคปซูลหน้าไอคอน ดันไอคอนเยื้องไปทางขวา) */
    .nv-row.unread::after {
        content: ''; position: absolute; left: -11px; top: 50%; transform: translateY(-50%);
        width: 6px; height: 6px; background: var(--v8-text); border-radius: 50%;
    }
    .nv-av-wrap { flex-shrink: 0; width: 46px; height: 46px; position: relative; }
    .nv-av { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #000; border: none; }
    /* รูปโปรไฟล์ซ้อน (แจ้งเตือนที่รวมหลายคน) — แบบไอจี: คนล่าสุดอยู่หน้าสุด ขอบตัดด้วยสีพื้นแถว */
    .nv-av-stack { position: relative; width: 100%; height: 100%; }
    .nv-av-stack img { position: absolute; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #222; box-sizing: border-box;
        border: 2px solid var(--nv-row-bg, #121212); }
    .nv-av-stack img:nth-child(1) { right: -2px; bottom: -2px; z-index: 3; }
    .nv-av-stack img:nth-child(2) { left: 0; top: 0; z-index: 2; }
    .nv-av-stack.n3 img { width: 28px; height: 28px; }
    .nv-av-stack.n3 img:nth-child(1) { right: -3px; bottom: -1px; }
    .nv-av-stack.n3 img:nth-child(2) { left: -2px; bottom: 2px; top: auto; }
    .nv-av-stack.n3 img:nth-child(3) { left: 9px; top: -4px; z-index: 1; }
    .nv-icon-box { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #242426; color: var(--v8-text); border: none; }
    .nv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }   /* หัวข้อ ↔ เนื้อหา ไม่ชิดกันเกิน */
    .nv-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
    .nv-title { font-size: 15px; font-weight: 600; color: var(--v8-text); line-height: 1.3; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .nv-time { font-size: 12px; font-weight: 500; color: var(--v8-subtext); flex-shrink: 0; }
    /* แคปซูลมีข้อความแค่ 2 บรรทัด: หัวข้อ (.nv-title) + เนื้อหา (.nv-sub) — ยาวเกินตัดด้วย … ทั้งคู่ */
    .nv-sub { font-size: 13.5px; color: var(--v8-subtext); font-weight: 400; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .nv-sub i { font-size: 14px; vertical-align: -2px; margin-right: 4px; }
    /* 📝 เนื้อหาแบบ Instagram: ก้อนเดียว ตัดบรรทัดได้ (สูงสุด 3 บรรทัด) — ชื่อผู้ใช้ตัวหนา · การกระทำตัวปกติ · ข้อความอ้างอิงสีอ่อนลง · เวลาสีเทาอยู่มุมขวาบน */
    .nv-text {
        font-size: 14.5px; line-height: 1.42; color: var(--v8-text); font-weight: 400; letter-spacing: -0.1px;
        display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere;
    }
    .nv-text .nv-name { font-weight: 700; }
    .nv-text .nv-q { color: #d6d6d6; }
    .nv-text .nv-note { color: var(--v8-subtext); }
    /* เวลาอยู่มุมขวาบนของรายการเสมอ: ข้อความคอลัมน์ซ้าย เวลาคอลัมน์ขวา (ชิดบน) */
    .nv-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 6px; align-items: start; }
    .nv-main > *:not(.nv-text):not(.nv-time-br) { grid-column: 1 / -1; }
    .nv-main > .nv-time-br { padding-top: 3px; font-size: 12px; font-weight: 500; color: var(--v8-subtext); white-space: nowrap; }
    .nv-row.nv-long .nv-text { -webkit-line-clamp: 6; }
    .nv-row.has-cover .nv-text { text-shadow: 0 1px 6px rgba(0,0,0,0.45); }
    .nv-sub .nv-quote { color: #d6d6d6; }

    /* 🌟 รายละเอียดแบบ Facebook — ข้อความอ้างอิง (แคปชัน/คอมเมนต์) + ป้ายข้อมูล (จำนวนรูป/วิดีโอ/ผู้ติดตาม) ต่อกันในบรรทัดเนื้อหา
       และรูปปกของโพสต์/สตอรี่เป็นพื้นหลังฝั่งขวาของแคปซูล ขอบไล่จางกลืนไปกับสีแคปซูล 🌟 */
    /* ไม่ใช้ overflow:hidden ที่แคปซูล (จะตัดจุดยังไม่อ่านที่อยู่นอกแคปซูล) — ตัดมุมที่ตัวรูปปก/เงาเองแทน */
    .nv-row.has-cover { isolation: isolate; }
    .nv-cover {
        position: absolute; top: 0; right: 0; bottom: 0; width: 62%; z-index: -1; pointer-events: none;
        border-radius: 0 42px 42px 0;
        background-image: var(--nv-cover); background-size: cover; background-position: center;
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.35) 35%, rgba(0,0,0,0.85) 75%, #000 100%);
                mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.35) 35%, rgba(0,0,0,0.85) 75%, #000 100%);
        opacity: 0; transition: opacity 0.5s var(--v8-ease);
    }
    .nv-cover.ready { opacity: 0.55; }
    .nv-row:active .nv-cover.ready { opacity: 0.4; }
    /* เงาไล่จากสีแคปซูล ให้ตัวหนังสือด้านซ้ายอ่านง่ายเสมอ */
    .nv-row.has-cover::before {
        content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
        background: linear-gradient(90deg, var(--v8-surface) 0%, var(--v8-surface) 38%, rgba(17,17,17,0.55) 70%, rgba(17,17,17,0.15) 100%);
    }
    .nv-row.has-cover .nv-time { color: rgba(255,255,255,0.75); text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
    .nv-cover-badge {
        position: absolute; right: 18px; bottom: 12px; z-index: 1; pointer-events: none;
        display: flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px;
        background: rgba(0,0,0,0.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
        font-size: 11px; font-weight: 700; color: #fff;
    }
    .nv-cover-badge i { font-size: 13px; }
    /* เวลาอยู่ชิดขวาสุดของแคปซูลเสมอ — ชื่อ/การกระทำกินพื้นที่ที่เหลือ */
    .nv-title-row .nv-title { flex: 1; min-width: 0; }
    .nv-title-row .nv-time { margin-left: auto; text-align: right; }
    /* แคปชันต่อท้ายการกระทำในบรรทัดหัวข้อ */
    .nv-inline { font-weight: 400; color: #d6d6d6; }
    /* ── ปุ่มในแจ้งเตือน (คำขอติดตาม / ชวนเข้าแพลน / ขอแชร์ตำแหน่ง) — อยู่ในแคปซูล มุมขวาล่าง ── */
    .nv-row.has-actions { flex-wrap: wrap; row-gap: 10px; }
    .nv-row.has-actions:has(.nv-req-btn:active) { transform: none; background: var(--v8-surface); }   /* กดปุ่ม ไม่ให้ทั้งแคปซูลยุบตาม */
    #nv-list .nv-row > .nv-req-actions {
        flex-basis: 100%; justify-content: flex-end; padding: 0; margin: 0;
        position: relative; z-index: 1;
    }
    .nv-req-actions {
        display: flex; align-items: center; gap: 8px;
        padding: 0 20px 10px 20px;
        margin-top: -6px;
        transition: opacity 0.2s, transform 0.2s;
    }
    .nv-req-btn {
        padding: 8px 20px; height: 34px; border-radius: 20px; border: none; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        background: #1c1c1e; color: var(--v8-text);
        font-size: 13px; font-weight: 600; transition: transform 0.15s, background 0.15s;
        font-family: inherit;
    }
    .nv-req-btn:active { transform: scale(0.90); background: #2c2c2e; }
    .nv-req-btn.primary { background: #e5e5ea; color: #000; }
    .nv-req-btn.primary:active { background: #d1d1d6; }
    /* แจ้งเตือนเลื่อนเลเวล — พื้นไล่สีตามช่วงเลเวล (--lv1/--lv2 ตั้งใน renderRow) + ไอคอนดาวไล่สีเดียวกัน */
    .nv-row.nv-level {
        background:
            radial-gradient(120% 160% at 0% 50%, color-mix(in srgb, var(--lv1) 42%, transparent) 0%, transparent 60%),
            linear-gradient(100deg, color-mix(in srgb, var(--lv2) 30%, var(--v8-surface)) 0%, var(--v8-surface) 75%);
    }
    .nv-row.nv-level:active { filter: brightness(1.15); }
    /* ✉️ จดหมาย/ข้อความใหม่ — พื้นแคปซูลไล่สีขาวจากฝั่งไอคอน ให้เด่นกว่าแจ้งเตือนทั่วไป */
    .nv-row.nv-letter {
        background:
            radial-gradient(120% 160% at 0% 50%, rgba(255,255,255,0.30) 0%, transparent 62%),
            linear-gradient(100deg, color-mix(in srgb, #ffffff 16%, var(--v8-surface)) 0%, var(--v8-surface) 78%);
    }
    .nv-row.nv-letter:active { filter: brightness(1.15); }
    /* 👀 มีคนเข้าชมโปรไฟล์ — พื้นโทนเงินเย็น + วงเรดาร์จาง ๆ รอบรูปผู้ชม (นิ่ง ไม่มีแอนิเมชัน — ผู้ใช้แจ้งว่าลายตา) (ศูนย์กลาง = กลางรูป 20px + 46/2) */
    .nv-row.nv-views {
        background:
            radial-gradient(circle 60px at 43px 50%, transparent 31px, rgba(225,235,255,0.10) 32px, transparent 33.5px, transparent 44px, rgba(225,235,255,0.07) 45px, transparent 46.5px, transparent 57px, rgba(225,235,255,0.045) 58px, transparent 59.5px),
            radial-gradient(120% 160% at 0% 50%, rgba(178,200,255,0.20) 0%, transparent 60%),
            linear-gradient(100deg, color-mix(in srgb, #c4d4ff 11%, var(--v8-surface)) 0%, var(--v8-surface) 78%);
    }
    .nv-row.nv-views:active { filter: brightness(1.15); }
    .nv-pv-badge { position: absolute; right: -4px; bottom: -4px; z-index: 4; width: 21px; height: 21px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #ffffff, #cdd6e6); color: #0b0c10;
        font-size: 12px; box-shadow: 0 0 0 2.5px #1c1d22, 0 0 12px rgba(200,215,255,0.45); }
    .nv-pv-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
    .nv-pv-meta span { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 11px;
        background: rgba(225,235,255,0.09); color: #dfe6f5; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
    .nv-pv-meta i { font-size: 13px; opacity: 0.85; }
    .nv-row.nv-letter .nv-icon-box { background: linear-gradient(135deg, #ffffff, #cfcfd4); color: #111; box-shadow: 0 0 18px rgba(255,255,255,0.35); }
    .nv-row.nv-letter .nv-sub { color: #e2e2e6; }
    .nv-row.nv-level .nv-icon-box { background: linear-gradient(135deg, var(--lv1), var(--lv2)); color: #fff; box-shadow: 0 0 18px color-mix(in srgb, var(--lv1) 55%, transparent); }
    .nv-row.nv-level .nv-sub { color: color-mix(in srgb, var(--lv1) 55%, #fff); }
    .nv-skel-row { display: flex; align-items: center; gap: 14px; margin: 0 16px 12px; padding: 18px 20px; background: var(--v8-surface); border-radius: 42px; }
    .nv-skel-av { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; }
    .nv-skel-info { flex: 1; display: flex; flex-direction: column; gap: 10px; }
    .nv-skel-line { border-radius: 6px; }
    .nv-skel-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .nv-skel-time { width: 38px; height: 11px; flex-shrink: 0; }
    .nv-skel-date { width: 64px; height: 17px; }
    /* ไม่มีแจ้งเตือน: ไอคอนกระดิ่งเส้นเดียวกลางหน้า มินิมอล (ไม่มีข้อความ) */
    .nv-empty-state { display:flex; align-items:center; justify-content:center; min-height: calc(100lvh - 260px); color:var(--v8-subtext); }
    .nv-empty-state i { font-size: 46px; opacity: 0.35; }
    @media (min-width: 768px) { #nv-list .nv-empty-state { grid-column: 1 / -1; } }

    /* ── Day Popup ── */
    .nv-day-popup { position: fixed; inset: 0; z-index: 9999; display: none; align-items: flex-end; }
    .nv-day-popup.open { display: flex; }
    .nv-day-popup-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.65); animation: nvFadeIn 0.25s ease; }
    .nv-day-popup-sheet { position: relative; width: 100%; max-height: 65vh; background: #18181a; border-radius: 24px 24px 0 0; overflow-y: auto; padding: 0 0 40px; animation: nvSlideUp 0.3s var(--v8-ease); }
    .nv-day-popup-handle { width: 36px; height: 4px; background: var(--v8-border); border-radius: 2px; margin: 12px auto 0; }
    .nv-day-popup-hdr { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; }
    .nv-day-popup-title { font-size: 17px; font-weight: 800; color: var(--v8-text); }
    .nv-day-popup-close { width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; background: var(--v8-surface-hover); color: var(--v8-subtext); display: flex; align-items: center; justify-content: center; font-size: 18px; }
    .nv-popup-section { padding: 4px 20px 8px; }
    .nv-popup-section-title { font-size: 11px; font-weight: 700; color: var(--v8-subtext); text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 6px; }
    .nv-popup-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
    .nv-popup-item:last-child { border-bottom: none; }
    .nv-popup-item-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
    .nv-popup-item-bar { width: 3px; height: 28px; border-radius: 2px; flex-shrink: 0; }
    .nv-popup-item-body { flex: 1; min-width: 0; }
    .nv-popup-item-name { font-size: 14px; font-weight: 600; color: var(--v8-text); }
    .nv-popup-item-sub { font-size: 12px; color: var(--v8-subtext); margin-top: 1px; }
    .nv-popup-divider { height: 1px; background: var(--v8-border); margin: 4px 20px; }

    @keyframes nvSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
    @keyframes nvFadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes fadeIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
    i { font-style: normal !important; }

    /* Widget Settings Panel */
    .nv-ws-row {
        display: flex; align-items: center; justify-content: space-between;
        padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
        cursor: pointer; transition: 0.15s;
    }
    .nv-ws-row:last-child { border-bottom: none; }
    .nv-ws-row:active { background: rgba(255,255,255,0.04); }
    .nv-ws-label { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: #fff; }
    .nv-ws-label i { font-size: 18px; color: var(--v8-subtext); }
    .nv-ws-toggle {
        width: 44px; height: 26px; border-radius: 13px; background: rgba(255,255,255,0.12);
        position: relative; transition: background 0.2s; flex-shrink: 0;
    }
    .nv-ws-toggle::after {
        content: ''; position: absolute; top: 3px; left: 3px;
        width: 20px; height: 20px; border-radius: 50%; background: #fff;
        transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }
    .nv-ws-toggle.on { background: #30d158; }
    .nv-ws-toggle.on::after { transform: translateX(18px); }

    /* Grid full-width when only 1 half-card is active */
    .nv-widget-grid.solo-half > .nv-wg-card:not(.nv-wg-tasks-card) { grid-column: 1 / -1; }

    /* ── Task two-column popup grid ── */
    .nv-task-grid { column-count: 2; column-gap: 10px; }
    .nv-sl-task {
        background: var(--v8-surface); border-radius: 18px; padding: 14px 12px 12px;
        cursor: pointer; transition: opacity 0.15s; border: 1px solid var(--v8-border);
        display: flex; flex-direction: column; gap: 5px;
        break-inside: avoid; margin-bottom: 10px;
    }
    .nv-sl-task:active { opacity: 0.55; }
    .nv-sl-task-name { font-size: 13px; font-weight: 700; color: var(--v8-text); line-height: 1.3; }
    .nv-sl-task-time { font-size: 11px; font-weight: 600; color: var(--v8-subtext); padding-left: 15px; }
    .nv-sl-task-days { display: flex; flex-wrap: wrap; gap: 3px; padding-left: 15px; margin-top: 2px; }
    .nv-sl-day-pill {
        font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 20px; flex-shrink: 0;
        color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.05);
    }
    .nv-sl-day-pill.active { color: #fff; background: rgba(255,255,255,0.13); }

