/* Theme: purenudism (site 7) -- built 2026-03-12 20:44:52 */

:root {

    --c-focus-ring: rgba(53, 95, 150, 0.25);

    --c-primary: #355f96;

    --c-primary-dark: #2a4c78;

    --c-primary-light: rgba(53, 95, 150, 0.05);

}

[data-theme="dark"] {

    --c-focus-ring: rgba(93, 127, 169, 0.3);

    --c-primary: #5d7fa9;

    --c-primary-dark: #355f96;

    --c-primary-light: rgba(93, 127, 169, 0.1);

}

/* Members Area CSS -- built 2026-03-12 20:44:52 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   Layer 1: Design Tokens
   ==========================================================================
   Every visual decision lives here as a CSS custom property.
   Components, utilities, and layouts reference tokens -- never raw values.
   Per-site themes override these via a :root block prepended by CSSBuilder.

   Structure:
     A. Primitive tokens   -- raw palette, scale, radii, motion, elevation
     B. Semantic tokens    -- meaning-based mappings (light mode default)
     C. Dark mode tokens   -- [data-theme="dark"] overrides semantics only
   ========================================================================== */

/* --------------------------------------------------------------------------
   A. PRIMITIVE TOKENS
   --------------------------------------------------------------------------
   Foundation values for scale and geometry.
   Components/layouts may reference these for spacing, typography, radius,
   motion, and z-index. Appearance decisions (colors/state/focus) should use
   semantic tokens from sections B/C.
   -------------------------------------------------------------------------- */
:root {
    /* -- Color palette -- */
    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    --blue-400:  #5d7fa9;
    --blue-500:  #355f96;
    --blue-600:  #355f96;
    --blue-700:  #2a4c78;

    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;

    --red-400:   #f87171;
    --red-500:   #ef4444;
    --red-600:   #dc2626;

    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;

    --white: #ffffff;
    --black: #000000;

    /* -- Spacing scale (4px base) -- */
    --sp-1:  4px;
    --sp-2:  8px;
    --sp-3:  12px;
    --sp-4:  16px;
    --sp-5:  20px;
    --sp-6:  24px;
    --sp-8:  32px;
    --sp-10: 40px;
    --sp-12: 48px;
    --sp-16: 64px;
    --sp-20: 80px;

    /* -- Typography scale -- */
    --fs-xs:   0.75rem;
    --fs-sm:   0.8125rem;
    --fs-base: 0.875rem;
    --fs-md:   1rem;
    --fs-lg:   1.125rem;
    --fs-xl:   1.25rem;
    --fs-2xl:  1.5rem;
    --fs-3xl:  1.875rem;
    --ff-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ff-mono: 'SFMono-Regular', Consolas, monospace;
    --lh: 1.5;

    /* -- Borders + Radius -- */
    --border-width: 1px;
    --radius-sm:   4px;
    --radius:      8px;
    --radius-lg:   12px;
    --radius-full: 9999px;

    /* -- Focus -- */
    --focus-ring-width: 3px;

    /* -- Badge -- */
    --badge-ls: 0.3px;
    --ls-wide: 0.6px;

    /* -- Transitions -- */
    --ease:      0.2s ease;
    --ease-fast: 0.15s ease;

    /* -- Layout primitives -- */
    --container-max: 1200px;
    --header-height: 77px;
    --container-px-mobile: var(--sp-4);
    --container-px: var(--sp-6);
    --card-px-mobile: var(--sp-4);
    --card-px: var(--sp-6);

    /* -- Touch targets -- */
    --tap-min: 34px;

    /* -- Nav panel -- */
    --nav-panel-width: 280px;

    /* -- Breakpoints (used via media queries) -- */
    --bp-sm:  640px;
    --bp-md:  768px;
    --bp-lg:  1024px;

    /* -- Feed layout breakpoints (documented exception to 3-tier rule) -- */
    --bp-feed-2col: 900px;
    --bp-feed-3col: 1100px;
    --bp-xl:        1400px;

    /* -- Max-width scale -- */
    --max-w-sm: 400px;
    --max-w-md: 640px;
    --max-w-lg:      960px;
    --max-w-xs:      480px;
    --max-w-profile: 560px;
    --max-w-feed:    740px;
    --max-w-viewer:  900px;

    /* -- Z-index scale -- */
    --z-dropdown: 100;
    --z-sticky:   200;
    --z-modal:    300;
    --z-nav:      350;
    --z-toast:    400;
    --z-progress: 500;
    --z-local:    2;
    --z-above:    10;

    /* -- Overlay tokens -- */
    --c-overlay-light:        rgba(0, 0, 0, 0.10);
    --c-overlay-dark:         rgba(0, 0, 0, 0.72);
    --c-overlay-white:        rgba(255, 255, 255, 0.92);
    --c-overlay-white-subtle: rgba(255, 255, 255, 0.15);
    --c-overlay-modal:        rgba(2, 6, 23, 0.92);
    --c-overlay-white-hover:  rgba(255, 255, 255, 0.30);
    --c-overlay-medium:       rgba(0, 0, 0, 0.6);
    --c-overlay-soft:         rgba(0, 0, 0, 0.3);
    --c-primary-hover-bg:     rgba(53, 95, 150, 0.08);

    /* -- Elevation -- */
    --shadow-elevated: 0 2px 12px rgba(0, 0, 0, 0.15);

    /* -- Border accent -- */
    --border-width-accent: 3px;

    /* -- Icon sizing -- */
    --icon-sm: 18px;
    --icon-md: 20px;
    --icon-lg: 36px;

    /* -- Toggle component -- */
    --toggle-width:  34px;
    --toggle-height: 18px;
    --toggle-thumb:  14px;

    /* -- SPA-specific primitives -- */
    --spa-bar-height: 3px;

    /* -- Nudge (sub-spacing offset) -- */
    --nudge: 3px;

    /* -- Avatar sizes -- */
    --avatar-xs: 14px;
    --avatar-sm: 30px;
    --avatar-lg: 96px;
    --avatar-xl: 120px;

    /* -- Cover image heights -- */
    --cover-sm: 160px;
    --cover-md: 220px;
    --cover-lg: 280px;

    /* -- Feed grid columns -- */
    --feed-col-sm:        136px;
    --feed-col-sm-max:    180px;
    --feed-col-md:        123px;
    --feed-col-md-max:    162px;
    --feed-col-lg:        162px;
    --feed-col-right-min: 120px;
    --feed-col-right-max: 260px;

    /* -- Component sizing -- */
    --emoji-panel-w:       256px;
    --emoji-panel-h:       260px;
    --menu-dropdown-w:     160px;
    --menu-avatar-w:       200px;
    --media-placeholder-h: 200px;
    --textarea-min-h:      120px;
    --feed-min-h:          100px;
    --play-triangle-h:     9px;
    --notif-fs:            11px;
}

/* --------------------------------------------------------------------------
   B. SEMANTIC TOKENS -- Light (default)
   --------------------------------------------------------------------------
   Meaning-based values that components, utilities, and layouts reference.
   These map to primitives above. Dark mode (section C) remaps them.
   -------------------------------------------------------------------------- */
:root {
    /* -- Backgrounds -- */
    --c-bg:            var(--slate-50);
    --c-surface:       var(--white);
    --c-surface-raised: var(--white);

    /* -- Text -- */
    --c-text:       var(--slate-800);
    --c-text-muted: var(--slate-500);
    --c-text-soft:  var(--slate-400);

    /* -- Interactive states -- */
    --c-hover: var(--slate-100);

    /* -- Borders + overlays -- */
    --c-border: var(--slate-200);
    --c-overlay-backdrop: rgba(2, 6, 23, 0.4);

    /* -- Primary accent -- */
    --c-primary:       var(--blue-600);
    --c-primary-dark:  var(--blue-700);
    --c-primary-light: rgba(53, 95, 150, 0.05);
    --c-on-primary:    var(--white);

    /* -- Success state -- */
    --c-success:        var(--green-500);
    --c-success-light:  #f0fdf4;
    --c-success-border: #bbf7d0;
    --c-on-success:     var(--white);

    /* -- Danger state -- */
    --c-danger:        var(--red-500);
    --c-danger-dark:   var(--red-600);
    --c-danger-light:  #fef2f2;
    --c-danger-border: #fecaca;
    --c-on-danger:     var(--white);

    /* -- Warning state -- */
    --c-warning:        var(--amber-500);
    --c-warning-light:  #fffbeb;
    --c-warning-border: #fde68a;
    --c-on-warning:     var(--slate-900);

    /* -- Focus ring -- */
    --c-focus-ring: rgba(53, 95, 150, 0.25);

    /* -- Elevation -- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow:    0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
}

/* --------------------------------------------------------------------------
   C. SEMANTIC TOKENS -- Dark
   --------------------------------------------------------------------------
   Activated by [data-theme="dark"] on <html>.
   Only appearance tokens are remapped; spacing/typography/radii are stable.
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
    /* -- Backgrounds (three visible layers: page < card < drawer) -- */
    --c-bg:             #0c1222;
    --c-surface:        #162032;
    --c-surface-raised: #243450;

    /* -- Text (slightly off-white to reduce glare) -- */
    --c-text:       var(--slate-200);
    --c-text-muted: var(--slate-400);
    --c-text-soft:  var(--slate-500);

    /* -- Interactive states -- */
    --c-hover: rgba(255, 255, 255, 0.08);

    /* -- Borders + overlays (visible structure without harshness) -- */
    --c-border: #283348;
    --c-overlay-backdrop: rgba(0, 0, 0, 0.6);

    /* -- Primary accent (bright on dark for strong contrast) -- */
    --c-primary:       #5d7fa9;
    --c-primary-dark:  var(--blue-400);
    --c-primary-light: rgba(93, 127, 169, 0.12);
    --c-on-primary:    #0c1222;

    /* -- Success state -- */
    --c-success:        #6ee7a0;
    --c-success-light:  rgba(110, 231, 160, 0.1);
    --c-success-border: rgba(110, 231, 160, 0.25);
    --c-on-success:     #0c1222;

    /* -- Danger state -- */
    --c-danger:        #fca5a5;
    --c-danger-dark:   #f87171;
    --c-danger-light:  rgba(252, 165, 165, 0.1);
    --c-danger-border: rgba(252, 165, 165, 0.2);
    --c-on-danger:     #0c1222;

    /* -- Warning state -- */
    --c-warning:        #fcd34d;
    --c-warning-light:  rgba(252, 211, 77, 0.1);
    --c-warning-border: rgba(252, 211, 77, 0.2);
    --c-on-warning:     #0c1222;

    /* -- Focus ring -- */
    --c-focus-ring: rgba(93, 127, 169, 0.35);

    /* -- Elevation (more prominent on dark backgrounds) -- */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow:    0 2px 6px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   Layer 2: Reset
   ==========================================================================
   Minimal reset: box-sizing, margin/padding strip, base body styles.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--ff-sans);
    background: var(--c-bg);
    color: var(--c-text);
    line-height: var(--lh);
    font-size: var(--fs-base);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ==========================================================================
   Layer 3: Utility Classes
   ==========================================================================
   Curated, append-only set of single-purpose helpers.
   Every value references a token -- never raw numbers.
   Add new utilities at the end; never remove existing ones.
   ========================================================================== */

/* -- Display -- */
.flex    { display: flex; }
.grid    { display: grid; }
.block   { display: block; }
.hidden  { display: none; }
.inline  { display: inline; }

/* -- Flex alignment -- */
.flex-col        { flex-direction: column; }
.flex-row        { flex-direction: row; }
.flex-wrap       { flex-wrap: wrap; }
.flex-1          { flex: 1; }
.items-center    { align-items: center; }
.items-start     { align-items: flex-start; }
.items-end       { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }

/* -- Gap -- */
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

/* -- Margin: top -- */
.mt-1  { margin-top: var(--sp-1); }
.mt-2  { margin-top: var(--sp-2); }
.mt-3  { margin-top: var(--sp-3); }
.mt-4  { margin-top: var(--sp-4); }
.mt-6  { margin-top: var(--sp-6); }
.mt-8  { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }

/* -- Margin: bottom -- */
.mb-1  { margin-bottom: var(--sp-1); }
.mb-2  { margin-bottom: var(--sp-2); }
.mb-3  { margin-bottom: var(--sp-3); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-6  { margin-bottom: var(--sp-6); }
.mb-8  { margin-bottom: var(--sp-8); }

/* -- Margin: horizontal auto -- */
.mx-auto { margin-left: auto; margin-right: auto; }

/* -- Padding -- */
.p-2  { padding: var(--sp-2); }
.p-3  { padding: var(--sp-3); }
.p-4  { padding: var(--sp-4); }
.p-6  { padding: var(--sp-6); }
.p-8  { padding: var(--sp-8); }
.px-4 { padding-left: var(--sp-4); padding-right: var(--sp-4); }
.px-6 { padding-left: var(--sp-6); padding-right: var(--sp-6); }
.py-3 { padding-top: var(--sp-3); padding-bottom: var(--sp-3); }
.py-4 { padding-top: var(--sp-4); padding-bottom: var(--sp-4); }
.py-6 { padding-top: var(--sp-6); padding-bottom: var(--sp-6); }

/* -- Typography: size -- */
.text-xs  { font-size: var(--fs-xs); }
.text-sm  { font-size: var(--fs-sm); }
.text-base { font-size: var(--fs-base); }
.text-md  { font-size: var(--fs-md); }
.text-lg  { font-size: var(--fs-lg); }
.text-xl  { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }
.text-3xl { font-size: var(--fs-3xl); }

/* -- Typography: weight -- */
.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

/* -- Typography: alignment + decoration -- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.no-underline { text-decoration: none; }

/* -- Typography: color -- */
.text-muted   { color: var(--c-text-muted); }
.text-soft    { color: var(--c-text-soft); }
.text-primary { color: var(--c-primary); }
.text-danger  { color: var(--c-danger); }
.text-success { color: var(--c-success); }
.text-warning { color: var(--c-warning); }

/* -- Width -- */
.w-full   { width: 100%; }
.max-w-sm { max-width: var(--max-w-sm); }
.max-w-md { max-width: var(--max-w-md); }
.max-w-lg { max-width: var(--max-w-lg); }

/* -- Overflow -- */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.overflow-hidden { overflow: hidden; }

/* -- Misc -- */
.rounded    { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.shadow     { box-shadow: var(--shadow); }
.shadow-md  { box-shadow: var(--shadow-md); }
.cursor-pointer { cursor: pointer; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* -- Responsive: sm (>=640px, tablet portrait) -- */
@media (min-width: 640px) {
    .sm\:flex     { display: flex; }
    .sm\:hidden   { display: none; }
    .sm\:block    { display: block; }
    .sm\:inline   { display: inline; }
    .sm\:flex-row { flex-direction: row; }
    .sm\:grid-2   { grid-template-columns: repeat(2, 1fr); }
    .sm\:w-auto   { width: auto; }
    .sm\:text-left { text-align: left; }
}

/* -- Responsive: md (>=768px, tablet landscape) -- */
@media (min-width: 768px) {
    .md\:flex     { display: flex; }
    .md\:hidden   { display: none; }
    .md\:block    { display: block; }
    .md\:inline   { display: inline; }
    .md\:flex-row { flex-direction: row; }
    .md\:grid-2   { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-3   { grid-template-columns: repeat(3, 1fr); }
    .md\:gap-6    { gap: var(--sp-6); }
    .md\:p-6      { padding: var(--sp-6); }
    .md\:text-left { text-align: left; }
}

/* -- Responsive: lg (>=1024px, desktop) -- */
@media (min-width: 1024px) {
    .lg\:flex     { display: flex; }
    .lg\:hidden   { display: none; }
    .lg\:block    { display: block; }
    .lg\:flex-row { flex-direction: row; }
    .lg\:grid-2   { grid-template-columns: repeat(2, 1fr); }
    .lg\:grid-3   { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-4   { grid-template-columns: repeat(4, 1fr); }
    .lg\:gap-8    { gap: var(--sp-8); }
}

/* ==========================================================================
   Layer 4: Components
   ==========================================================================
   Multi-property visual patterns. Each component references tokens only.
   Components must not contain mode-specific selectors (dark/light).
   ========================================================================== */

/* -- Card (phone-first: edge-to-edge, restored at sm) -- */
.card {
    background: var(--c-surface);
    border-top: var(--border-width) solid var(--c-border);
    border-bottom: var(--border-width) solid var(--c-border);
    border-left: none;
    border-right: none;
    border-radius: 0;
    box-shadow: var(--shadow);
    padding: var(--card-px-mobile);
    margin-bottom: var(--sp-4);
    margin-left: calc(-1 * var(--container-px-mobile));
    margin-right: calc(-1 * var(--container-px-mobile));
}
@media (min-width: 640px) {
    .card {
        border: var(--border-width) solid var(--c-border);
        border-radius: var(--radius);
        padding: var(--card-px);
        margin-left: 0;
        margin-right: 0;
    }
}

/* -- Buttons -- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-5);
    border: none;
    border-radius: var(--radius);
    font-size: var(--fs-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--ease);
    text-decoration: none;
    line-height: var(--lh);
    min-height: var(--tap-min);
}
.btn-block {
    display: flex;
    width: 100%;
}
@media (min-width: 640px) {
    .btn-block {
        display: inline-flex;
        width: auto;
    }
}
.btn-primary { background: var(--c-primary); color: var(--c-on-primary); }
.btn-primary:hover { background: var(--c-primary-dark); }
.btn-outline {
    background: transparent;
    border: var(--border-width) solid var(--c-border);
    color: var(--c-text);
}
.btn-outline:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}
.btn-ghost {
    background: transparent;
    border: none;
    color: var(--c-text-muted);
}
.btn-ghost:hover { color: var(--c-primary); }
.btn-danger { background: var(--c-danger); color: var(--c-on-danger); }
.btn-danger:hover { background: var(--c-danger-light); color: var(--c-danger); }
.btn-sm {
    padding: var(--sp-1) var(--sp-3);
    font-size: var(--fs-sm);
}
.btn-lg {
    padding: var(--sp-4) var(--sp-8);
    font-size: var(--fs-md);
}

/* -- Forms -- */
.form-group { margin-bottom: var(--sp-4); }
.form-label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 500;
    margin-bottom: var(--sp-1);
    color: var(--c-text-muted);
}
.form-group label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 500;
    margin-bottom: var(--sp-1);
    color: var(--c-text-muted);
}
.form-control {
    width: 100%;
    padding: var(--sp-3) var(--sp-3);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color var(--ease);
    font-family: inherit;
    background: var(--c-surface);
    color: var(--c-text);
    min-height: var(--tap-min);
}
@media (min-width: 640px) {
    .form-control {
        font-size: var(--fs-base);
    }
}
.form-control:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 var(--focus-ring-width) var(--c-focus-ring);
}

/* -- Alerts -- */
.alert {
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius);
    margin-bottom: var(--sp-4);
    font-size: var(--fs-base);
}
.alert-danger {
    background: var(--c-danger-light);
    color: var(--c-danger);
    border: var(--border-width) solid var(--c-danger-border);
}
.alert-success {
    background: var(--c-success-light);
    color: var(--c-success);
    border: var(--border-width) solid var(--c-success-border);
}
.alert-warning {
    background: var(--c-warning-light);
    color: var(--c-warning);
    border: var(--border-width) solid var(--c-warning-border);
}

/* -- Badge -- */
.badge {
    display: inline-block;
    padding: var(--sp-1) var(--sp-2);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--badge-ls);
}
.badge-success { background: var(--c-success-light); color: var(--c-success); }
.badge-danger  { background: var(--c-danger-light);  color: var(--c-danger); }
.badge-warning { background: var(--c-warning-light); color: var(--c-warning); }

/* -- Toast (phone-first: full-width bottom bar, restored at sm) -- */
.toast {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--sp-3) var(--sp-5);
    border-radius: 0;
    font-size: var(--fs-base);
    z-index: var(--z-toast);
    opacity: 0;
    transition: opacity var(--ease);
    text-align: center;
}
@media (min-width: 640px) {
    .toast {
        left: auto;
        right: var(--sp-5);
        bottom: var(--sp-5);
        border-radius: var(--radius);
        text-align: left;
        max-width: var(--max-w-sm);
    }
}
.toast-visible { opacity: 1; }
.toast-error   { background: var(--c-danger);  color: var(--c-on-danger); }
.toast-success { background: var(--c-success); color: var(--c-on-success); }
.toast-info    { background: var(--c-primary); color: var(--c-on-primary); }

/* -- Section title -- */
.section-title {
    font-size: var(--fs-lg);
    font-weight: 600;
    margin-bottom: var(--sp-4);
    color: var(--c-text);
}

/* -- Hero card (accent variant) -- */
.hero-card {
    border-left: var(--sp-1) solid var(--c-primary);
}

/* -- Content grid (responsive card grid) -- */
.content-grid {
    display: grid;
    gap: var(--sp-4);
}
@media (min-width: 640px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--sp-6);
    }
}
@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* -- Content card (image + body, independent of .card edge-bleed) -- */
.content-card {
    background: var(--c-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: var(--border-width) solid var(--c-border);
}
.content-card-img {
    aspect-ratio: 5 / 3;
    overflow: hidden;
    background: var(--c-bg);
}
.content-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.content-card-body {
    padding: var(--sp-4);
}
.content-card-body h4 {
    font-size: var(--fs-md);
    font-weight: 600;
    margin-bottom: var(--sp-1);
}
.content-card-body p {
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
    margin-bottom: var(--sp-2);
    line-height: var(--lh);
}

/* -- Milestone list -- */
.milestone-list {
    display: flex;
    flex-direction: column;
}
.milestone-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) 0;
    border-bottom: var(--border-width) solid var(--c-border);
}
.milestone-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.milestone-item:first-child {
    padding-top: 0;
}
.milestone-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--sp-10);
    height: var(--sp-10);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}
.badge-primary {
    background: var(--c-primary-light);
    color: var(--c-primary);
}

/* -- Feed sidebar -- */
.feed-sidebar-section {
    margin-bottom: var(--sp-5);
}
.feed-sidebar-section:last-child {
    margin-bottom: 0;
}
.feed-sidebar-heading {
    font-size: var(--fs-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    color: var(--c-text);
    padding: 0 var(--sp-3);
    margin-bottom: var(--sp-1);
    padding-bottom: var(--sp-3);
}
.feed-sidebar-subheading {
    margin: 0;
    padding: 0 var(--sp-3) var(--sp-3);
    font-size: var(--fs-xs);
    font-weight: 400;
    line-height: 1.4;
    color: var(--c-text-muted);
}

/* Heading row with collapse/expand toggle */
.feed-sidebar-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-3);
}
.feed-sidebar-heading-row .feed-sidebar-heading {
    margin-bottom: 0;
    padding: 0;
    flex: 1 1 auto;
}
.feed-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--c-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.35;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}
@media (min-width: 640px) {
    .feed-sidebar-toggle {
        display: inline-flex;
    }
}
.feed-sidebar-heading-row:hover .feed-sidebar-toggle,
.feed-sidebar-toggle:focus-visible {
    opacity: 1;
}
.feed-sidebar-toggle:hover {
    background: var(--c-hover);
    color: var(--c-text);
}
.feed-sidebar-toggle-expand {
    display: none;
}
.feed-sidebar-toggle-collapse {
    display: block;
}
.feed-sidebar.is-collapsed .feed-sidebar-toggle {
    opacity: 1;
}
.feed-sidebar.is-collapsed .feed-sidebar-toggle-collapse {
    display: none;
}
.feed-sidebar.is-collapsed .feed-sidebar-toggle-expand {
    display: block;
}

/* Collapsed sidebar: icon-only mode */
.feed-sidebar.is-collapsed .feed-sidebar-heading,
.feed-sidebar.is-collapsed .feed-filter-text,
.feed-sidebar.is-collapsed .feed-bookmark-badge,
.feed-sidebar.is-collapsed .feed-sidebar-footer {
    display: none;
}
.feed-sidebar.is-collapsed .feed-sidebar-heading-row {
    justify-content: flex-start;
    margin-bottom: var(--sp-2);
    padding: 0;
}
.feed-sidebar.is-collapsed .feed-filter-list {
    align-items: flex-start;
    overflow: visible;
}
.feed-sidebar.is-collapsed .feed-sidebar-section {
    padding: 0;
    overflow: visible;
}
.feed-sidebar.is-collapsed .feed-filter-item {
    justify-content: center;
    padding: 0;
    border-left-color: transparent;
    border-left-width: 0;
    width: 36px;
    height: 36px;
    min-height: 36px;
    margin: var(--sp-1) auto var(--sp-1) 0;
    border-radius: var(--radius-full);
}
.feed-sidebar.is-collapsed .feed-filter-item.active {
    background: var(--c-primary-light);
    border-left-color: transparent;
}
.feed-sidebar.is-collapsed .feed-milestone-btn {
    justify-content: center;
    padding: 0;
    width: 36px;
    height: 36px;
    min-height: 36px;
    margin: var(--sp-1) auto var(--sp-1) 0;
    border-radius: var(--radius-full);
    color: var(--c-text);
}

/* Tooltip for collapsed menu items */
.feed-sidebar.is-collapsed .feed-filter-item,
.feed-sidebar.is-collapsed .feed-milestone-btn {
    position: relative;
}
.feed-sidebar.is-collapsed .feed-filter-item::after,
.feed-sidebar.is-collapsed .feed-milestone-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    padding: var(--sp-1) var(--sp-2);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--c-on-primary, #fff);
    background: var(--c-text, #1e293b);
    border-radius: var(--radius);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: var(--z-tooltip, 1000);
}
.feed-sidebar.is-collapsed .feed-filter-item:hover::after,
.feed-sidebar.is-collapsed .feed-milestone-btn:hover::after {
    opacity: 1;
}

/* Force collapsed visual at 640-899px so there is no flash before JS adds .is-collapsed */
@media (min-width: 640px) and (max-width: 1099px) {
    #feed-sidebar .feed-sidebar-heading,
    #feed-sidebar .feed-filter-text,
    #feed-sidebar .feed-bookmark-badge,
    #feed-sidebar .feed-sidebar-footer,
    #feed-sidebar .feed-sidebar-toggle {
        display: none;
    }
    #feed-sidebar .feed-sidebar-heading-row {
        justify-content: flex-start;
        margin-bottom: var(--sp-2);
        padding: 0;
    }
    #feed-sidebar .feed-filter-list {
        align-items: flex-start;
        overflow: visible;
    }
    #feed-sidebar .feed-sidebar-section {
        padding: 0;
        overflow: visible;
    }
    #feed-sidebar .feed-filter-item {
        justify-content: center;
        padding: 0;
        border-left-color: transparent;
        border-left-width: 0;
        width: 36px;
        height: 36px;
        min-height: 36px;
        margin: var(--sp-1) auto var(--sp-1) 0;
        border-radius: var(--radius-full);
    }
    #feed-sidebar .feed-filter-item.active {
        background: var(--c-primary-light);
        border-left-color: transparent;
    }
    #feed-sidebar .feed-milestone-btn {
        justify-content: center;
        padding: 0;
        width: 36px;
        height: 36px;
        min-height: 36px;
        margin: var(--sp-1) auto var(--sp-1) 0;
        border-radius: var(--radius-full);
        color: var(--c-text);
    }
    #feed-sidebar .feed-milestone-btn svg {
        display: block;
        width: 18px;
        height: 18px;
        opacity: 1;
        visibility: visible;
    }
    #feed-sidebar .feed-filter-item,
    #feed-sidebar .feed-milestone-btn {
        position: relative;
    }
    #feed-sidebar .feed-filter-item::after,
    #feed-sidebar .feed-milestone-btn::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(100% + 8px);
        top: 50%;
        transform: translateY(-50%);
        white-space: nowrap;
        padding: var(--sp-1) var(--sp-2);
        font-size: var(--fs-xs);
        font-weight: 500;
        color: var(--c-on-primary, #fff);
        background: var(--c-text, #1e293b);
        border-radius: var(--radius);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.15s ease;
        z-index: var(--z-tooltip, 1000);
    }
    #feed-sidebar .feed-filter-item:hover::after,
    #feed-sidebar .feed-milestone-btn:hover::after {
        opacity: 1;
    }
}

/* Label text span (visible in expanded, hidden in collapsed via rules above) */
.feed-filter-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Feed filter list */
.feed-filter-list {
    display: flex;
    flex-direction: column;
}
.feed-filter-more-toggle {
    color: var(--c-text-muted);
    font-weight: 600;
}
.feed-filter-more-toggle .feed-filter-icon svg {
    transition: transform var(--ease-fast);
}
.feed-filter-more-toggle[aria-expanded="true"] .feed-filter-icon svg {
    transform: rotate(180deg);
}
.feed-filter-more-list {
    display: flex;
    flex-direction: column;
}
.feed-filter-more-list[hidden] {
    display: none !important;
}
.feed-filter-item {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text);
    background: none;
    border: none;
    border-left: var(--border-width-accent) solid transparent;
    border-radius: 0;
    cursor: pointer;
    text-align: left;
    transition: color var(--ease), border-color var(--ease), background var(--ease);
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: var(--tap-min);
}
@media (min-width: 1400px) {
    .feed-filter-item {
        gap: var(--sp-3);
        padding: var(--sp-2) var(--sp-4);
    }
    .feed-sidebar-heading {
        padding: 0 var(--sp-4);
        padding-bottom: var(--sp-3);
        margin-bottom: var(--sp-1);
    }
}
.feed-filter-item:hover {
    color: var(--c-text);
    background: var(--c-hover);
}
.feed-filter-item.active {
    color: var(--c-primary);
    font-weight: 600;
    border-left-color: var(--c-primary);
    background: var(--c-primary-light);
}
.feed-filter-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    width: var(--icon-md);
    height: var(--icon-md);
    color: inherit;
}
.feed-filter-icon svg {
    width: var(--icon-md);
    height: var(--icon-md);
}

/* Feed bookmark badge (circle counter) */
.feed-bookmark-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    background: var(--c-hover, var(--slate-200));
    color: var(--c-text-soft, var(--slate-700));
    font-size: 11px;
    font-weight: 600;
    line-height: 24px;
    text-align: center;
    margin-left: var(--sp-2);
    box-sizing: border-box;
}
.feed-bookmark-badge:empty {
    display: none;
}
.feed-bookmark-badge.is-bumped {
    animation: bookmarkBump 400ms var(--ease-fn);
}
@keyframes bookmarkBump {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.35); }
    60%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.feed-filter-icon.is-shaking {
    animation: iconShake 500ms var(--ease-fn);
}
@keyframes iconShake {
    0%   { transform: rotate(0deg); }
    15%  { transform: rotate(-12deg); }
    30%  { transform: rotate(10deg); }
    45%  { transform: rotate(-8deg); }
    60%  { transform: rotate(5deg); }
    75%  { transform: rotate(-2deg); }
    100% { transform: rotate(0deg); }
}

/* Feed eDVD tile grid (right sidebar) */
.feed-sidebar-section--edvd {
    margin-top: var(--sp-8);
    --feed-dvd-tile-size: 46px;
    --feed-dvd-gap: var(--sp-2);
    --feed-dvd-inline-pad: var(--sp-3);
}
.feed-sidebar-section--mystery {
    --feed-dvd-tile-size: 46px;
    --feed-dvd-gap: var(--sp-2);
    --feed-dvd-inline-pad: var(--sp-3);
}
.feed-sidebar-section--edvd .feed-sidebar-heading {
    text-transform: none;
    letter-spacing: 0.01em;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    padding-left: var(--feed-dvd-inline-pad);
    padding-right: var(--feed-dvd-inline-pad);
    padding-bottom: var(--sp-1);
}
.feed-sidebar-heading--edvd {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.feed-sidebar-heading--mystery {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: 0;
    margin-bottom: 0;
    padding-left: var(--feed-dvd-inline-pad);
    padding-right: var(--feed-dvd-inline-pad);
    padding-bottom: 0;
    line-height: 1.2;
}
.feed-sidebar-heading--edvd .feed-sidebar-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: inherit;
}
.feed-sidebar-heading--edvd .feed-sidebar-heading-icon svg {
    width: 100%;
    height: 100%;
    transform: translateY(1px);
}
.feed-sidebar-heading--mystery .feed-sidebar-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: inherit;
}
.feed-sidebar-heading--mystery .feed-sidebar-heading-icon svg {
    width: 100%;
    height: 100%;
    transform: none;
}
.feed-sidebar-section--edvd .feed-sidebar-subheading {
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    padding-left: var(--feed-dvd-inline-pad);
    padding-right: var(--feed-dvd-inline-pad);
    padding-bottom: var(--sp-4);
}
.feed-dvd-grid {
    display: grid;
    grid-template-columns: repeat(3, var(--feed-dvd-tile-size));
    gap: var(--feed-dvd-gap);
    padding: 0 var(--feed-dvd-inline-pad);
    justify-content: start;
}
@media (min-width: 1100px) {
    .feed-sidebar-section--edvd {
        --feed-dvd-gap: var(--sp-1);
    }
    .feed-dvd-grid {
        grid-template-columns: repeat(3, var(--feed-dvd-tile-size));
        gap: var(--feed-dvd-gap);
        padding: 0 var(--feed-dvd-inline-pad);
    }
}
.feed-dvd-grid .feed-dvd-tile:nth-child(n + 16) {
    display: none;
}
.feed-dvd-tile {
    display: block;
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: 0 0 0 1px transparent;
    transition: box-shadow var(--ease), opacity var(--ease);
}
.feed-dvd-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 0 transparent;
    transition: box-shadow var(--ease);
}
.feed-dvd-tile--active {
    box-shadow: 0 0 0 2px var(--c-primary);
}
.feed-sidebar-section--edvd.is-player-mode .feed-dvd-tile {
    opacity: 0.5;
}
.feed-sidebar-section--edvd.is-player-mode .feed-dvd-tile--active {
    opacity: 1;
    box-shadow: none;
}
.feed-sidebar-section--edvd.is-player-mode .feed-dvd-tile--active::after {
    box-shadow: inset 0 0 0 1px var(--white, #fff), inset 0 0 0 3px var(--c-primary);
}
.feed-dvd-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform var(--ease), opacity var(--ease);
}
.feed-sidebar-section--edvd.is-player-mode .feed-dvd-tile--active img {
    transform: scale(0.92);
}
.feed-dvd-viewall {
    display: block;
    padding: var(--sp-2) var(--sp-4);
    font-size: var(--fs-xs);
    font-weight: 400;
    color: var(--c-text-muted);
    text-decoration: none;
}
.feed-dvd-viewall:hover {
    color: var(--c-text);
    text-decoration: underline;
}
.feed-dvd-countdown {
    margin: 12px 0 6px var(--feed-dvd-inline-pad);
    width: calc(var(--feed-dvd-tile-size) + var(--feed-dvd-tile-size) + var(--feed-dvd-tile-size) + var(--feed-dvd-gap) + var(--feed-dvd-gap));
    box-sizing: border-box;
    padding: var(--sp-3);
    background: var(--white, #fff);
    border: var(--border-width) dotted var(--slate-500, #64748b);
    border-radius: 8px;
    color: var(--slate-600);
    font-size: var(--fs-xs);
    line-height: 1.4;
}
.feed-dvd-countdown-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.feed-dvd-countdown-link:hover,
.feed-dvd-countdown-link:focus-visible {
    color: inherit;
    text-decoration: none;
}
.feed-dvd-countdown-label,
.feed-dvd-countdown-time {
    display: block;
}
.feed-dvd-countdown-label {
    margin-bottom: var(--sp-1);
}
.feed-dvd-countdown-time {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    font-weight: 500;
}

/* Milestone button (standalone rounded pill) */
.feed-milestone-btn {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin: var(--sp-5) var(--sp-3) 0;
    padding: var(--sp-2) var(--sp-3);
    font-size: var(--fs-sm);
    font-family: inherit;
    font-weight: 500;
    line-height: 1.2;
    color: var(--c-text);
    text-decoration: none;
    border: var(--border-width) solid transparent;
    border-radius: var(--radius-full);
    background:
        linear-gradient(var(--c-surface), var(--c-surface)) padding-box,
        linear-gradient(120deg, var(--slate-300) 0%, var(--slate-400) 50%, var(--slate-300) 100%) border-box;
    background-size: 100% 100%, 150% 150%;
    background-position: 0 0, 0% 50%;
    box-shadow: var(--shadow-sm);
    transition: color var(--ease), background var(--ease), background-position var(--ease);
    flex-shrink: 0;
}
.feed-milestone-btn.active {
    border: 1px solid #00000061;
    border-radius: var(--radius-full);
    color: var(--c-text);
    background:
        linear-gradient(135deg, rgba(140,82,255,0.05) 0%, rgba(73,94,235,0.05) 52%, rgba(38,164,222,0.05) 100%) padding-box,
        linear-gradient(135deg, #8c52ff14 0%, #495eeb14 52%, #26a4de14 100%) border-box;
}
.feed-milestone-btn:hover,
.feed-milestone-btn:focus-visible {
    color: var(--c-text);
    background:
        linear-gradient(var(--c-surface), var(--c-surface)) padding-box,
        linear-gradient(120deg, var(--slate-900) 0%, var(--slate-600) 52%, var(--slate-400) 100%) border-box;
    background-position: 0 0, 100% 50%;
}
.feed-milestone-btn:focus-visible {
    outline: none;
}
.feed-milestone-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: block;
    stroke: currentColor;
    visibility: visible;
    opacity: 1;
}

.feed-main-title {
    margin: 0;
    font-size: var(--fs-2xl);
    font-weight: 600;
    line-height: 1.2;
    color: var(--c-text);
}

/* Title area: title + subtitle left, mode tabs right */
.feed-title-area {
    margin-bottom: var(--sp-4);
}
.feed-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-3);
    flex-wrap: wrap;
}
.feed-title-left {
    min-width: 0;
    flex: 1;
}
.feed-subtitle {
    margin: var(--sp-1) 0 0;
    font-size: var(--fs-base);
    font-style: italic;
    font-weight: 400;
    color: var(--c-text-muted);
    line-height: var(--lh);
}
@media (max-width: 639px) {
    body[data-page="dashboard"].moments-active .feed-title-left {
        display: contents;
    }
    body[data-page="dashboard"].moments-active .feed-main-title {
        flex: 1;
        min-width: 0;
    }
    body[data-page="dashboard"].moments-active .feed-subtitle {
        flex-basis: 100%;
        order: 3;
    }
}

/* Posts / Moments segmented toggle */
.feed-mode-tabs {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-shrink: 0;
}
.feed-mode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 16px;
    font-size: var(--fs-sm);
    font-weight: 500;
    font-family: inherit;
    line-height: 1;
    color: var(--c-text);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: color var(--ease), background var(--ease);
    white-space: nowrap;
}
.feed-mode-tab:hover {
    background: none;
}
.feed-mode-tab.active {
    color: var(--c-on-primary);
    background: var(--c-primary);
    font-weight: 600;
}

/* Moments sub-tabs (Streams / Collections) */
.feed-moments-tabs {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-3);
}
@media (min-width: 640px) {
    .feed-moments-tabs {
        justify-content: center;
        margin-top: var(--sp-10);
        gap: var(--sp-4);
    }
}
.feed-moments-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 16px;
    font-size: var(--fs-base);
    font-weight: 400;
    font-family: inherit;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--c-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: color var(--ease), background var(--ease), opacity var(--ease);
    white-space: nowrap;
}
@media (min-width: 640px) {
    .feed-moments-tab {
        min-height: 40px;
        padding: 8px 28px;
        font-size: var(--fs-lg);
    }
}
.feed-moments-tab:hover {
    color: var(--c-text);
    background: none;
}
.feed-moments-tab.active {
    color: var(--c-text);
    font-weight: 600;
    background: none;
    border-bottom: 2px solid var(--c-text);
    border-radius: 0;
}

/* Moments streams mosaic */
.moments-streams-feed {
    display: none;
    margin-top: var(--sp-2);
}
.moments-streams-intro,
.moments-collections-intro {
    margin: 0 auto;
    max-width: none;
    padding-top: clamp(var(--sp-8), 8vh, var(--sp-12));
    padding-bottom: clamp(var(--sp-8), 8vh, var(--sp-12));
    padding-left: 24px;
    padding-right: 24px;
    text-align: center;
    font-size: var(--fs-lg);
    font-weight: 600;
    font-style: italic;
    line-height: 1.3;
    color: var(--c-text);
    white-space: nowrap;
}
@media (min-width: 640px) {
    .moments-streams-intro,
    .moments-collections-intro {
        padding-top: var(--sp-6);
    }
}
@media (max-width: 420px) {
    .moments-streams-intro,
    .moments-collections-intro {
        white-space: normal;
    }
}
body.reels-active .moments-streams-feed,
body.od-active .moments-streams-feed {
    display: none !important;
}
body[data-page="dashboard"].moments-active .moments-streams-feed.is-active {
    display: block;
}

/* Moments filter bar (category dropdown + toggle pills) */
.moments-filter-bar {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding: 0 var(--sp-3) var(--sp-4);
    flex-wrap: wrap;
}
#moments-collections-filter-bar {
    max-width: 1068px;
}
.moments-category-wrap {
    position: relative;
}
.moments-category-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: var(--icon-lg);
    padding: 0 var(--sp-3);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--c-text);
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: 500;
    white-space: nowrap;
    transition: border-color var(--ease), background var(--ease);
}
.moments-category-btn:hover {
    background: var(--c-hover);
}
.moments-category-btn:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}
.moments-category-prefix {
    font-weight: 700;
}
.moments-category-name {
    font-weight: 400;
}
.moments-category-chevron {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.moments-category-wrap.open .moments-category-chevron {
    transform: rotate(180deg);
}
.moments-category-menu {
    position: absolute;
    top: calc(100% + var(--sp-2));
    left: 0;
    min-width: 220px;
    max-height: 360px;
    overflow-y: auto;
    background: var(--c-surface);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--sp-2) 0;
    z-index: var(--z-dropdown);
    display: none;
    animation: moments-cat-slide 0.15s ease;
}
@keyframes moments-cat-slide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.moments-category-wrap.open .moments-category-menu {
    display: block;
}
.moments-category-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 6px var(--sp-4);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background var(--ease);
}
.moments-category-item:hover {
    background: var(--c-hover);
}
.moments-category-item.active {
    color: var(--c-primary);
    font-weight: 600;
}
.moments-filter-toggles {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
}
.moments-filter-toggle {
    display: inline-flex;
    align-items: center;
    height: var(--icon-lg);
    padding: 0 var(--sp-3);
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.moments-filter-toggle:hover {
    background: var(--c-hover);
}
.moments-filter-toggle.active {
    background: var(--c-primary);
    color: var(--c-on-primary);
    border-color: var(--c-primary);
}

.moments-streams-grid {
    --moments-grid-row: 6px;
    display: grid;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: var(--moments-grid-row);
    grid-auto-flow: dense;
    gap: var(--sp-1);
    padding: 0 var(--sp-3);
}
@media (min-width: 580px) {
    .moments-streams-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 780px) {
    .moments-streams-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (min-width: 1100px) {
    .moments-streams-grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: clamp(var(--sp-1), 0.8vw, var(--sp-2));
    }
}
@media (min-width: 1450px) {
    .moments-streams-grid {
        grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    }
}
.moments-mosaic-tile {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--c-surface-raised);
    cursor: pointer;
    appearance: none;
    grid-row: span var(--moments-row-span, 30);
    transition: transform var(--ease-fast), box-shadow var(--ease-fast), border-color var(--ease-fast);
}
.moments-mosaic-tile--span-2 {
    grid-column: span 1;
}
@media (min-width: 1100px) {
    .moments-mosaic-tile--span-2 {
        grid-column: span 2;
    }
}
.moments-mosaic-tile--span-3 {
    grid-column: span 1;
}
@media (min-width: 1450px) {
    .moments-mosaic-tile--span-3 {
        grid-column: span 3;
    }
}
.moments-mosaic-tile:hover {
    border-color: var(--c-primary-light);
}
.moments-mosaic-tile:focus-visible {
    outline: 2px solid var(--c-focus-ring);
    outline-offset: 2px;
}
.moments-mosaic-media {
    position: absolute;
    inset: 0;
}
.moments-mosaic-media img,
.moments-mosaic-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.moments-mosaic-video {
    background: #000;
}
.moments-mosaic-video-badge {
    position: absolute;
    right: var(--sp-2);
    bottom: var(--sp-2);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    pointer-events: none;
}
.moments-streams-status {
    min-height: var(--sp-7);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--sp-2);
    color: var(--c-text-muted);
    font-size: var(--fs-sm);
    text-align: center;
}
.moments-streams-status:empty {
    min-height: 0;
    margin-top: 0;
}
.moments-streams-status[data-state="loading"]::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: var(--radius-full);
    border: 2px solid var(--c-border);
    border-top-color: var(--c-primary);
    margin-right: var(--sp-2);
    animation: moments-spin 0.8s linear infinite;
}
@keyframes moments-spin {
    to { transform: rotate(360deg); }
}
.moments-streams-sentinel {
    width: 100%;
    height: 1px;
}
.moments-mosaic-tile--skeleton {
    pointer-events: none;
    border-color: transparent;
    background: linear-gradient(90deg, var(--c-surface-raised) 25%, var(--c-border) 50%, var(--c-surface-raised) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

/* -- Message tiles (positive-forward text cards in Streams grid) -- */
.moments-mosaic-tile--message {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    background: var(--c-surface-raised);
    border-color: var(--c-border);
    text-align: center;
    padding: var(--sp-3);
    user-select: text;
}
.moments-mosaic-tile--message:hover {
    border-color: var(--c-border);
    transform: none;
}
.moments-msg-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-1);
    width: 100%;
}
.moments-msg-text {
    margin: 0;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 500;
    font-size: clamp(0.92rem, 1.8vw + 0.4rem, 1.3rem);
    line-height: 1.3;
    color: var(--c-text);
    word-break: break-word;
    letter-spacing: -0.01em;
}
.moments-msg-subtext {
    margin: 0;
    font-family: var(--ff-sans);
    font-size: clamp(0.68rem, 0.8vw + 0.35rem, 0.82rem);
    font-weight: 400;
    line-height: 1.45;
    color: var(--c-text-muted);
    word-break: break-word;
}
.moments-mosaic-tile--msg-small .moments-msg-text {
    font-size: clamp(0.82rem, 1.4vw + 0.35rem, 1.1rem);
}
.moments-mosaic-tile--msg-medium .moments-msg-text {
    font-size: clamp(0.95rem, 2vw + 0.4rem, 1.4rem);
}
.moments-mosaic-tile--msg-medium .moments-msg-subtext {
    font-size: clamp(0.7rem, 0.9vw + 0.35rem, 0.85rem);
}
.moments-mosaic-tile--msg-large {
    grid-column: span 2;
}
.moments-mosaic-tile--msg-large .moments-msg-text {
    font-size: clamp(1.05rem, 2.4vw + 0.45rem, 1.75rem);
}
.moments-mosaic-tile--msg-large .moments-msg-subtext {
    font-size: clamp(0.72rem, 1vw + 0.35rem, 0.92rem);
}
.moments-mosaic-tile--msg-row {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--sp-2) var(--sp-3);
}
.moments-mosaic-tile--msg-row .moments-msg-text {
    font-style: italic;
    font-size: clamp(0.88rem, 1.6vw + 0.4rem, 1.2rem);
}
@media (min-width: 1100px) {
    .moments-mosaic-tile--msg-large {
        grid-column: span 3;
    }
}

/* -- Collections tab (Moments > Collections) -- */
.moments-collections-feed {
    display: none;
    margin-top: var(--sp-2);
}
body[data-page="dashboard"].moments-active .moments-collections-feed.is-active {
    display: block;
}
.moments-collections-grid {
    display: grid;
    width: 100%;
    max-width: 1068px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fill, minmax(280px, 340px));
    justify-content: start;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
}
.moments-collection-card {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    background: var(--c-bg);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-2);
    cursor: pointer;
    appearance: none;
    text-align: left;
    transition: box-shadow var(--ease-fast), border-color var(--ease-fast);
}
.moments-collection-card:hover {
    border-color: var(--c-primary-light);
    box-shadow: var(--shadow-md);
}
.moments-collection-card:focus-visible {
    outline: 2px solid var(--c-focus-ring);
    outline-offset: 2px;
}
.moments-collection-card-previews {
    display: flex;
    gap: var(--sp-1);
    overflow: hidden;
    border-radius: var(--radius-md);
}
.moments-collection-card-preview {
    flex: 1 1 0;
    aspect-ratio: 1 / 1.08;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
    min-width: 0;
}
.moments-collection-card-meta {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 0 var(--sp-1);
}
.moments-collection-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}
.moments-collection-card-name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-text);
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.moments-collection-card-count {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}
.moments-collection-card--message {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: default;
    min-height: 200px;
}
.moments-collection-card--message:hover {
    border-color: var(--c-border);
    box-shadow: none;
}
.moments-collection-card--message .moments-msg-text {
    font-size: clamp(0.95rem, 2vw + 0.4rem, 1.35rem);
}
.moments-collection-card--message .moments-msg-subtext {
    font-size: clamp(0.7rem, 0.9vw + 0.35rem, 0.85rem);
}
@media (max-width: 579px) {
    .moments-collections-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }
}

/* Feed sidebar footer links -- pushed to bottom via margin-top:auto */
.feed-sidebar-footer {
    margin-top: auto;
    padding: var(--sp-3) var(--sp-3) 0;
    font-size: var(--fs-xs);
    color: var(--c-text-soft);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-1);
    flex-shrink: 0;
}
.feed-sidebar-footer a {
    color: var(--c-text-muted);
    text-decoration: none;
    transition: color var(--ease);
}
.feed-sidebar-footer a:hover {
    color: var(--c-text);
    text-decoration: underline;
}
.feed-sidebar-footer-dot {
    color: var(--c-border);
}

/* Feed sidebar divider */
.feed-sidebar-divider {
    border: none;
    border-top: var(--border-width) solid var(--c-border);
    margin: 0 var(--sp-4) var(--sp-4);
    opacity: 0.6;
}

/* Right sidebar toggle (mirrors left but uses chevrons-right to collapse) */
.feed-sidebar-toggle-right {
    display: none;
}
@media (min-width: 1100px) {
    .feed-sidebar-toggle-right {
        display: inline-flex;
    }
}

/* eDVD disc icon (hidden when expanded, shown when collapsed) */
.feed-sidebar-edvd-icon {
    display: none;
}

/* Right sidebar collapsed: icon-only mode */
.feed-sidebar-right.is-collapsed .feed-sidebar-heading,
.feed-sidebar-right.is-collapsed .feed-sidebar-subheading,
.feed-sidebar-right.is-collapsed .feed-filter-text,
.feed-sidebar-right.is-collapsed .feed-bookmark-badge,
.feed-sidebar-right.is-collapsed .feed-dvd-viewall,
.feed-sidebar-right.is-collapsed .feed-dvd-countdown {
    display: none;
}
.feed-sidebar-right.is-collapsed .feed-sidebar-divider {
    margin: 0 0 var(--sp-2);
}
.feed-sidebar-right.is-collapsed .feed-sidebar-heading-row {
    justify-content: flex-end;
    margin-bottom: var(--sp-2);
    padding: 0;
}
.feed-sidebar-right.is-collapsed .feed-sidebar-section {
    padding: 0;
    overflow: visible;
    margin-bottom: var(--sp-1);
}
.feed-sidebar-right.is-collapsed .feed-sidebar-right-default {
    display: flex;
    flex-direction: column;
}
.feed-sidebar-right.is-collapsed .feed-sidebar-section--mystery {
    order: 2;
    margin-top: 0;
    margin-bottom: var(--sp-2);
}
.feed-sidebar-right.is-collapsed .feed-sidebar-section--edvd {
    order: 3;
}
.feed-sidebar-right.is-collapsed .feed-filter-item {
    justify-content: center;
    padding: 0;
    border-left-color: transparent;
    border-left-width: 0;
    width: 36px;
    height: 36px;
    min-height: 36px;
    margin: var(--sp-1) 0 var(--sp-1) auto;
    border-radius: var(--radius-full);
}
.feed-sidebar-right.is-collapsed .feed-filter-item.active {
    background: var(--c-primary-light);
    border-left-color: transparent;
}
.feed-sidebar-right.is-collapsed .feed-filter-item,
.feed-sidebar-right.is-collapsed .feed-sidebar-edvd-icon,
.feed-sidebar-right.is-collapsed .feed-sidebar-heading--mystery {
    position: relative;
}
.feed-sidebar-right.is-collapsed .feed-filter-item::after,
.feed-sidebar-right.is-collapsed .feed-sidebar-edvd-icon::after,
.feed-sidebar-right.is-collapsed .feed-sidebar-heading--mystery::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    padding: var(--sp-1) var(--sp-2);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--c-on-primary, #fff);
    background: var(--c-text, #1e293b);
    border-radius: var(--radius);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: var(--z-tooltip, 1000);
}
.feed-sidebar-right.is-collapsed .feed-filter-item:hover::after,
.feed-sidebar-right.is-collapsed .feed-sidebar-edvd-icon:hover::after,
.feed-sidebar-right.is-collapsed .feed-sidebar-heading--mystery:hover::after {
    opacity: 1;
}
.feed-sidebar-right.is-collapsed .feed-sidebar-heading--mystery {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    margin: var(--sp-1) 0 var(--sp-1) auto;
    padding: 0;
    color: var(--c-text-muted);
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: color var(--ease), background var(--ease);
}
.feed-sidebar-right.is-collapsed .feed-sidebar-heading--mystery:hover {
    background: var(--c-hover);
    color: var(--c-text);
}
.feed-sidebar-right.is-collapsed .feed-sidebar-heading--mystery .feed-sidebar-heading-icon {
    width: 18px;
    height: 18px;
}
.feed-sidebar-right.is-collapsed .feed-sidebar-heading--mystery span:last-child {
    display: none;
}
.feed-sidebar-right.is-collapsed .feed-sidebar-edvd-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: var(--sp-1) 0 var(--sp-1) auto;
    color: var(--c-text-muted);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: color var(--ease), background var(--ease);
}
.feed-sidebar-right.is-collapsed .feed-sidebar-edvd-icon:hover {
    background: var(--c-hover);
    color: var(--c-text);
}
.feed-sidebar-right.is-collapsed .feed-dvd-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-1);
    padding: 0;
}
.feed-sidebar-right.is-collapsed .feed-dvd-tile {
    width: 28px;
    height: 28px;
    margin-left: auto;
    margin-right: auto;
}
.feed-sidebar-right.is-collapsed .feed-sidebar-toggle-collapse { display: none; }
.feed-sidebar-right.is-collapsed .feed-sidebar-toggle-expand { display: block; }
.feed-sidebar-right.is-collapsed .feed-sidebar-toggle-right {
    opacity: 1;
}

/* Right sidebar auto-collapse via CSS at 850-1199px (no JS flash) */
@media (min-width: 850px) and (max-width: 1199px) {
    #feed-sidebar-right .feed-sidebar-heading,
    #feed-sidebar-right .feed-sidebar-subheading,
    #feed-sidebar-right .feed-filter-text,
    #feed-sidebar-right .feed-bookmark-badge,
    #feed-sidebar-right .feed-dvd-viewall,
    #feed-sidebar-right .feed-dvd-countdown,
    #feed-sidebar-right .feed-sidebar-toggle {
        display: none;
    }
    #feed-sidebar-right .feed-sidebar-divider {
        margin: 0 0 var(--sp-2);
    }
    #feed-sidebar-right .feed-sidebar-heading-row {
        justify-content: flex-end;
        margin-bottom: var(--sp-2);
        padding: 0;
    }
    #feed-sidebar-right .feed-sidebar-section {
        padding: 0;
        overflow: visible;
        margin-bottom: var(--sp-1);
    }
    #feed-sidebar-right .feed-sidebar-right-default {
        display: flex;
        flex-direction: column;
    }
    #feed-sidebar-right .feed-sidebar-section--mystery {
        order: 2;
        margin-top: 0;
        margin-bottom: var(--sp-2);
    }
    #feed-sidebar-right .feed-sidebar-section--edvd {
        order: 3;
    }
    #feed-sidebar-right .feed-filter-item {
        justify-content: center;
        padding: 0;
        border-left-color: transparent;
        border-left-width: 0;
        width: 36px;
        height: 36px;
        min-height: 36px;
        margin: var(--sp-1) 0 var(--sp-1) auto;
        border-radius: var(--radius-full);
    }
    #feed-sidebar-right .feed-filter-item.active {
        background: var(--c-primary-light);
        border-left-color: transparent;
    }
    #feed-sidebar-right .feed-filter-item,
    #feed-sidebar-right .feed-sidebar-edvd-icon,
    #feed-sidebar-right .feed-sidebar-heading--mystery {
        position: relative;
    }
    #feed-sidebar-right .feed-filter-item::after,
    #feed-sidebar-right .feed-sidebar-edvd-icon::after,
    #feed-sidebar-right .feed-sidebar-heading--mystery::after {
        content: attr(data-tooltip);
        position: absolute;
        right: calc(100% + 8px);
        top: 50%;
        transform: translateY(-50%);
        white-space: nowrap;
        padding: var(--sp-1) var(--sp-2);
        font-size: var(--fs-xs);
        font-weight: 500;
        color: var(--c-on-primary, #fff);
        background: var(--c-text, #1e293b);
        border-radius: var(--radius);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.15s ease;
        z-index: var(--z-tooltip, 1000);
    }
    #feed-sidebar-right .feed-filter-item:hover::after,
    #feed-sidebar-right .feed-sidebar-edvd-icon:hover::after,
    #feed-sidebar-right .feed-sidebar-heading--mystery:hover::after {
        opacity: 1;
    }
    #feed-sidebar-right .feed-sidebar-heading--mystery {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        min-height: 36px;
        margin: var(--sp-1) 0 var(--sp-1) auto;
        padding: 0;
        color: var(--c-text-muted);
        text-decoration: none;
        border-radius: var(--radius-full);
        transition: color var(--ease), background var(--ease);
    }
    #feed-sidebar-right .feed-sidebar-heading--mystery:hover {
        background: var(--c-hover);
        color: var(--c-text);
    }
    #feed-sidebar-right .feed-sidebar-heading--mystery .feed-sidebar-heading-icon {
        width: 18px;
        height: 18px;
    }
    #feed-sidebar-right .feed-sidebar-heading--mystery span:last-child {
        display: none;
    }
    #feed-sidebar-right .feed-sidebar-edvd-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        margin: var(--sp-1) 0 var(--sp-1) auto;
        color: var(--c-text-muted);
        cursor: pointer;
        border-radius: var(--radius-full);
        transition: color var(--ease), background var(--ease);
    }
    #feed-sidebar-right .feed-sidebar-edvd-icon:hover {
        background: var(--c-hover);
        color: var(--c-text);
    }
    #feed-sidebar-right .feed-dvd-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-1);
        padding: 0;
    }
    #feed-sidebar-right .feed-dvd-tile {
        width: 28px;
        height: 28px;
        margin-left: auto;
        margin-right: auto;
    }
    #feed-sidebar-right .feed-sidebar-toggle-collapse { display: none; }
    #feed-sidebar-right .feed-sidebar-toggle-expand { display: block; }
    #feed-sidebar-right .feed-sidebar-toggle-right {
        opacity: 1;
    }
    #feed-sidebar-right .feed-filter-list {
        overflow: visible;
    }
}

/* Mobile: horizontal filter strip for Experiences */
.feed-mobile-filters-wrap {
    position: relative;
    margin-bottom: var(--sp-3);
}
@media (min-width: 640px) {
    .feed-mobile-filters-wrap {
        display: none;
    }
}
.feed-mobile-filters {
    display: flex;
    gap: var(--sp-1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    border-bottom: var(--border-width) solid var(--c-border);
}
.feed-mobile-filters::-webkit-scrollbar {
    display: none;
}
@media (min-width: 640px) {
    .feed-mobile-filters {
        display: none;
    }
}
.feed-mobile-filter {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-2) var(--sp-3);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--ease), background var(--ease), border-color var(--ease);
    min-height: var(--tap-min);
}
.feed-mobile-filter:hover {
    color: var(--c-text);
    background: var(--c-hover);
}
.feed-mobile-filter.active {
    color: var(--c-primary);
    font-weight: 600;
    background: var(--c-primary-light);
    border-bottom-color: var(--c-primary);
}
.feed-mobile-filters-arrow {
    position: absolute;
    top: 0;
    bottom: var(--border-width);
    width: var(--sp-8);
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: var(--c-text-muted);
    z-index: 1;
    padding: 0;
}
.feed-mobile-filters-arrow:hover {
    color: var(--c-text);
}
.feed-mobile-filters-arrow--prev {
    left: 0;
    background: linear-gradient(to right, var(--c-bg) 50%, transparent);
}
.feed-mobile-filters-arrow--next {
    right: 0;
    background: linear-gradient(to left, var(--c-bg) 50%, transparent);
}
.feed-mobile-filters-arrow.visible {
    display: flex;
}

/* -- Feed window spacers (virtualization-lite) -- */
.feed-window-spacer {
    width: 100%;
    pointer-events: none;
    flex-shrink: 0;
}

/* -- Feed post card (.fp) -- */
.fp {
    background: var(--c-surface);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--sp-4);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--ease);
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
}
.fp:hover {
    box-shadow: var(--shadow);
}
.fp--pinned {
    border-left: var(--border-width-accent) solid var(--c-primary);
}
.fp--skeleton {
    pointer-events: none;
}
.fp--skeleton .fp-header {
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
}
.fp--skeleton .fp-body {
    padding: var(--sp-2) var(--sp-4) var(--sp-4);
}
.fp--skeleton > .skeleton-pulse {
    margin: 0 var(--sp-4) var(--sp-4);
}
.skeleton-pulse {
    background: linear-gradient(90deg, var(--c-surface-raised) 25%, var(--c-border) 50%, var(--c-surface-raised) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.fp--skeleton .fp-avatar {
    background: none;
}
.fp--skeleton .fp-avatar.skeleton-pulse {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}
.fp-feed-empty {
    text-align: center;
    padding: var(--sp-8) var(--sp-4);
    color: var(--c-text-muted);
    font-size: var(--fs-body);
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.fp-pin-label {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-3) var(--sp-4) 0;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--c-primary);
}
.fp-header {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4) var(--sp-2);
    position: relative;
}
@media (min-width: 1400px) {
    .fp-header {
        padding: var(--sp-4) var(--sp-5) var(--sp-2);
    }
}
.fp-avatar {
    width: var(--tap-min);
    height: var(--tap-min);
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--c-bg);
    cursor: pointer;
    transition: opacity var(--ease-fast);
}
.fp-avatar:hover {
    opacity: 0.85;
}
.fp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fp-author-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.fp-author-link:hover .fp-author {
    text-decoration: underline;
}
.fp-author-row {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.fp-author {
    font-size: var(--fs-base);
    font-weight: 600;
    line-height: 1.3;
}
.fp-meta {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    line-height: 1.3;
}
.fp-follow-btn {
    background: var(--c-hover, var(--slate-100));
    border: none;
    color: var(--c-text, var(--slate-700));
    font-size: var(--fs-xs);
    font-weight: 500;
    padding: 2px var(--sp-2);
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    transition: background var(--ease), color var(--ease);
}
.fp-follow-btn:hover {
    background: var(--c-border, var(--slate-200));
}
.fp-follow-btn.is-following {
    background: var(--c-primary, #355f96);
    color: #fff;
}
.fp-follow-btn.is-following:hover {
    background: var(--red-500);
    color: #fff;
}
.fp-more {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--c-text-soft);
    cursor: pointer;
    font-size: var(--fs-xl);
    padding: var(--sp-2);
    border-radius: var(--radius-full);
    line-height: 1;
    min-height: var(--tap-min);
    min-width: var(--tap-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.fp-more:hover {
    background: var(--c-hover);
    color: var(--c-text-muted);
}

.fp-more-menu {
    position: absolute;
    top: 100%;
    right: var(--sp-3);
    z-index: 50;
    min-width: 160px;
    background: var(--c-surface);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-lg, 10px);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    padding: 4px 0;
    opacity: 0;
    transform: translateY(-4px) scale(.97);
    pointer-events: none;
    transition: opacity .12s, transform .12s;
}
.fp-more-menu.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.fp-more-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    background: none;
    border: none;
    font-size: 0.85rem;
    color: var(--red-500, #ef4444);
    cursor: pointer;
    text-align: left;
    transition: background .1s;
}
.fp-more-menu-item:hover {
    background: var(--c-hover);
}
.fp-more-menu-item svg {
    flex-shrink: 0;
}

.fp-delete-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
    opacity: 0;
    transition: opacity .15s;
}
.fp-delete-overlay.is-visible {
    opacity: 1;
}
.fp-delete-panel {
    background: var(--c-surface);
    border-radius: var(--radius-lg, 10px);
    width: 90%;
    max-width: 360px;
    padding: 28px 24px 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    text-align: center;
    transform: scale(.95);
    transition: transform .15s;
}
.fp-delete-overlay.is-visible .fp-delete-panel {
    transform: scale(1);
}
.fp-delete-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text);
    margin: 0 0 6px;
}
.fp-delete-subtitle {
    font-size: 0.84rem;
    color: var(--c-text-muted);
    margin: 0 0 20px;
}
.fp-delete-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.fp-delete-cancel {
    flex: 1;
    padding: 8px 0;
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .1s;
}
.fp-delete-cancel:hover {
    background: var(--c-hover);
}
.fp-delete-confirm {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: var(--radius);
    background: var(--red-500, #ef4444);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .1s;
}
.fp-delete-confirm:hover {
    opacity: .9;
}
.fp-delete-confirm:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.fp-body {
    padding: var(--sp-1) var(--sp-4) var(--sp-3);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--c-text);
}
@media (min-width: 1400px) {
    .fp-body {
        padding: var(--sp-1) var(--sp-5) var(--sp-3);
    }
}
.fp-body p {
    margin-bottom: var(--sp-2);
}
.fp-body p:last-child {
    margin-bottom: 0;
}

/* Feed post media */
.fp-media {
    position: relative;
    margin: 0 var(--sp-4);
    border-radius: var(--radius);
    overflow: hidden;
}
@media (min-width: 1400px) {
    .fp-media {
        margin: 0 var(--sp-5);
    }
}
.fp-media > img {
    width: 100%;
    display: block;
    object-fit: cover;
}
.fp-media-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-1);
    margin: 0 var(--sp-4);
    border-radius: var(--radius);
    overflow: hidden;
}
@media (min-width: 1400px) {
    .fp-media-grid-2 {
        margin: 0 var(--sp-5);
    }
}
.fp-media-grid-2 img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.fp-media-grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-1);
    margin: 0 var(--sp-4);
    border-radius: var(--radius);
    overflow: hidden;
}
@media (min-width: 1400px) {
    .fp-media-grid-4 {
        margin: 0 var(--sp-5);
    }
}
.fp-media-grid-4 img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

/* -----------------------------------------------------------------------
   Media Collage Engine
   ----------------------------------------------------------------------- */
.fp-collage {
    position: relative;
    display: grid;
    gap: 2px;
    margin: 0 var(--sp-4);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}
@media (min-width: 1400px) {
    .fp-collage { margin: 0 var(--sp-5); }
}

.fp-cg-cell {
    position: relative;
    overflow: hidden;
    min-height: 0;
    min-width: 0;
}
.fp-cg-cell > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
}

/* -- 1 landscape -------------------------------------------------------- */
.fp-cg-s1l {
    grid-template: "a" auto / 1fr;
    max-height: 500px;
}
.fp-cg-s1l .fp-cg-cell > img {
    aspect-ratio: 16 / 10;
}

/* -- 1 portrait --------------------------------------------------------- */
.fp-cg-s1p {
    grid-template: "a" auto / 1fr;
    max-width: 65%;
    margin-left: auto;
    margin-right: auto;
    max-height: 600px;
}
.fp-cg-s1p .fp-cg-cell > img {
    aspect-ratio: 3 / 4;
}

/* -- 2 side-by-side ----------------------------------------------------- */
.fp-cg-s2row {
    grid-template: "a b" 280px / 1fr 1fr;
}

/* -- 2 stacked (portrait pair) ------------------------------------------ */
.fp-cg-s2col {
    grid-template: "a" 1fr "b" 1fr / 1fr;
    max-height: 560px;
}
.fp-cg-s2col .fp-cg-cell > img {
    aspect-ratio: 4 / 5;
}

/* -- 3-A: hero left + 2 right ------------------------------------------ */
.fp-cg-s3a {
    grid-template: "a b" 1fr "a c" 1fr / 3fr 2fr;
    max-height: 420px;
}

/* -- 3-B: hero top + 2 bottom ------------------------------------------ */
.fp-cg-s3b {
    grid-template: "a a" 3fr "b c" 2fr / 1fr 1fr;
    max-height: 460px;
}

/* -- 3-C: 2 left + hero right ------------------------------------------ */
.fp-cg-s3c {
    grid-template: "b a" 1fr "c a" 1fr / 2fr 3fr;
    max-height: 420px;
}

/* -- 4 grid (2x2) ------------------------------------------------------- */
.fp-cg-s4grid {
    grid-template: "a b" 1fr "c d" 1fr / 1fr 1fr;
    max-height: 420px;
}

/* -- 4-A: hero left + 3 right stacked ---------------------------------- */
.fp-cg-s4a {
    grid-template: "a b" 1fr "a c" 1fr "a d" 1fr / 3fr 2fr;
    max-height: 440px;
}

/* -- 4-B: hero top + 3 bottom ------------------------------------------ */
.fp-cg-s4b {
    grid-template: "a a a" 2fr "b c d" 1fr / 1fr 1fr 1fr;
    max-height: 440px;
}

/* -- 5-A: hero left + 2x2 right ---------------------------------------- */
.fp-cg-s5a {
    grid-template: "a b c" 1fr "a d e" 1fr / 2fr 1fr 1fr;
    max-height: 420px;
}

/* -- 5-B: hero top + 4 bottom ------------------------------------------ */
.fp-cg-s5b {
    grid-template: "a a a a" 2fr "b c d e" 1fr / 1fr 1fr 1fr 1fr;
    max-height: 440px;
}

/* -- 5-C: 2 top + 3 bottom --------------------------------------------- */
.fp-cg-s5c {
    grid-template: "a a b b" 1fr "c c d e" 1fr / 1fr 1fr 1fr 1fr;
    max-height: 400px;
}

/* -- 6-A: hero left + mixed right strip --------------------------------- */
.fp-cg-s6a {
    grid-template:
        "a a b c" 1fr
        "a a d e" 1fr
        "f f d e" 1fr / 2fr 1fr 1fr 1fr;
    max-height: 460px;
}

/* -- 6-B: wide top row + balanced bottom row ---------------------------- */
.fp-cg-s6b {
    grid-template:
        "a b c" 2fr
        "d e f" 1fr / 1fr 1fr 1fr;
    max-height: 440px;
}

/* -- Compact collage variants (dense image sets) ------------------------- */
.fp-cg-compact {
    gap: 3px;
}
.fp-cg-compact-c1 {
    grid-template-columns: 1fr;
}
.fp-cg-compact-c2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fp-cg-compact-c3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fp-cg-compact-c4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.fp-cg-compact .fp-cg-cell {
    aspect-ratio: 1 / 1;
}
.fp-cg-compact .fp-cg-cell > img {
    object-position: center;
}

/* -- "+N more" overlay -------------------------------------------------- */
.fp-cg-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    pointer-events: none;
    letter-spacing: 0.02em;
}

/* -- Video play icon overlay -------------------------------------------- */
.fp-cg-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
}

/* -- Responsive: narrow screens ----------------------------------------- */
@media (max-width: 480px) {
    .fp-cg-s1p {
        max-width: 80%;
        max-height: 480px;
    }
    .fp-cg-s2row { grid-template: "a b" 200px / 1fr 1fr; }
    .fp-cg-s2col { max-height: 440px; }

    .fp-cg-s3a { grid-template: "a a" 2fr "b c" 1fr / 1fr 1fr; max-height: 360px; }
    .fp-cg-s3b { max-height: 360px; }
    .fp-cg-s3c { grid-template: "a a" 2fr "b c" 1fr / 1fr 1fr; max-height: 360px; }

    .fp-cg-s4a { grid-template: "a a" 2fr "b c" 1fr "d d" 1fr / 1fr 1fr; max-height: 400px; }
    .fp-cg-s4b { grid-template: "a a" 2fr "b c" 1fr "d d" 1fr / 1fr 1fr; max-height: 400px; }

    .fp-cg-s5a { grid-template: "a a" 2fr "b c" 1fr "d e" 1fr / 1fr 1fr; max-height: 400px; }
    .fp-cg-s5b { grid-template: "a a" 2fr "b c" 1fr "d e" 1fr / 1fr 1fr; max-height: 400px; }
    .fp-cg-s5c { grid-template: "a a" 2fr "b c" 1fr "d e" 1fr / 1fr 1fr; max-height: 380px; }
    .fp-cg-s6a { grid-template: "a a" 2fr "b c" 1fr "d e" 1fr "f f" 1fr / 1fr 1fr; max-height: 420px; }
    .fp-cg-s6b { grid-template: "a a" 2fr "b c" 1fr "d e" 1fr "f f" 1fr / 1fr 1fr; max-height: 420px; }

    .fp-cg-more { font-size: 1.25rem; }
    .fp-cg-play svg { width: 36px; height: 36px; }
}

/* Video play overlay */
.fp-video-thumb {
    cursor: pointer;
}
.fp-video-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--c-overlay-light);
    z-index: 1;
}
.fp-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--sp-12);
    height: var(--sp-12);
    background: var(--c-overlay-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-local);
    box-shadow: var(--shadow-elevated);
}
.fp-video-play::after {
    content: '';
    border-style: solid;
    border-width: var(--play-triangle-h) 0 var(--play-triangle-h) 16px;
    border-color: transparent transparent transparent var(--c-primary);
    margin-left: var(--nudge);
}
.fp-video-duration {
    position: absolute;
    bottom: var(--sp-2);
    right: var(--sp-2);
    background: var(--c-overlay-dark);
    color: var(--white);
    font-size: var(--fs-xs);
    padding: 2px var(--sp-2);
    border-radius: var(--radius-sm);
    z-index: var(--z-local);
    font-weight: 500;
}

/* Article link preview */
.fp-link-preview {
    display: block;
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 var(--sp-4) var(--sp-3);
    text-decoration: none;
    color: inherit;
    transition: box-shadow var(--ease);
}
@media (min-width: 1400px) {
    .fp-link-preview {
        margin: 0 var(--sp-5) var(--sp-3);
    }
}
.fp-link-preview:hover {
    box-shadow: var(--shadow);
}
.fp-link-preview img {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
}
.fp-link-preview-body {
    padding: var(--sp-3) var(--sp-4);
}
.fp-link-preview-domain {
    font-size: var(--fs-xs);
    color: var(--c-text-soft);
    text-transform: uppercase;
    letter-spacing: var(--badge-ls);
}
.fp-link-preview-title {
    font-size: var(--fs-base);
    font-weight: 600;
    margin: var(--nudge) 0;
}
.fp-link-preview-desc {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    line-height: var(--lh);
}

/* Ã¢ÂÂÃ¢ÂÂ Article card variants Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.fp-article {
    display: block;
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 var(--sp-4) var(--sp-3);
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    transition: box-shadow var(--ease);
}
@media (min-width: 1400px) {
    .fp-article { margin: 0 var(--sp-5) var(--sp-3); }
}
.fp-article:hover {
    box-shadow: var(--shadow);
}
.fp-article:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--focus-ring-width) var(--c-focus-ring);
}

.fp-article-cover { position: relative; }
.fp-article-cover img {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
}
.fp-article-video-badge {
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    width: 32px;
    height: 32px;
    background: var(--c-overlay-medium);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fp-article-video-badge svg {
    fill: var(--white);
    stroke: var(--white);
}

.fp-article-info {
    padding: var(--sp-3) var(--sp-4);
}
.fp-article-source {
    font-size: var(--fs-xs);
    color: var(--c-text-soft);
    text-transform: uppercase;
    letter-spacing: var(--badge-ls);
    margin-bottom: var(--nudge);
}
.fp-article-title {
    font-size: var(--fs-base);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--nudge);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fp-article-summary {
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
    line-height: var(--lh);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Variant: cover-left */
.fp-article--cover-left .fp-article-row {
    display: flex;
    gap: 0;
}
.fp-article--cover-left .fp-article-cover--left {
    flex: 0 0 140px;
    position: relative;
}
.fp-article--cover-left .fp-article-cover--left img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    min-height: 120px;
}
.fp-article--cover-left .fp-article-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (min-width: 640px) {
    .fp-article--cover-left .fp-article-cover--left {
        flex: 0 0 180px;
    }
}

/* Variant: cover-overlay */
.fp-article--cover-overlay .fp-article-cover--overlay {
    position: relative;
}
.fp-article--cover-overlay .fp-article-cover--overlay img {
    aspect-ratio: 16 / 9;
}
.fp-article-overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--sp-5) var(--sp-4) var(--sp-4);
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    color: var(--white);
}
.fp-article-overlay-text .fp-article-source {
    color: rgba(255,255,255,.7);
}
.fp-article-overlay-text .fp-article-title {
    color: var(--white);
    font-size: var(--fs-lg);
}

/* Variant: minimal */
.fp-article-text-only {
    padding: var(--sp-4);
}
.fp-article-text-only--minimal {
    border-left: 3px solid var(--c-primary);
}
.fp-article-tag {
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--c-primary);
    letter-spacing: 0.08em;
    margin-bottom: var(--sp-1);
}

/* Variant: quote */
.fp-article--quote {
    border-left: 4px solid var(--c-primary);
    background: color-mix(in srgb, var(--c-primary) 4%, var(--c-surface, #fff));
}
.fp-article-quote {
    padding: var(--sp-4) var(--sp-5);
}
.fp-article-quote-text {
    font-size: var(--fs-lg, 1.0625rem);
    font-style: italic;
    line-height: 1.55;
    margin: 0 0 var(--sp-3);
    padding: 0;
    border: 0;
    color: var(--c-text);
}
.fp-article-quote-source {
    padding-top: var(--sp-2);
    border-top: 1px solid var(--c-border);
}
.fp-article-quote-source .fp-article-title {
    font-size: var(--fs-sm);
    -webkit-line-clamp: 1;
}
.fp-article-quote-source .fp-article-source {
    margin-top: var(--nudge, 2px);
}

/* Variant: banner */
.fp-article--banner .fp-article-cover--banner img {
    aspect-ratio: 3 / 1;
}

/* Variant: magazine */
.fp-article--magazine .fp-article-row--magazine {
    display: flex;
    gap: 0;
}
.fp-article--magazine .fp-article-cover--magazine {
    flex: 0 0 58%;
    position: relative;
}
.fp-article--magazine .fp-article-cover--magazine img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    min-height: 180px;
}
.fp-article--magazine .fp-article-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.fp-article-title--lg {
    font-size: var(--fs-lg, 1.0625rem);
    line-height: 1.25;
}
@media (max-width: 639px) {
    .fp-article--magazine .fp-article-row--magazine {
        flex-direction: column;
    }
    .fp-article--magazine .fp-article-cover--magazine {
        flex: none;
    }
    .fp-article--magazine .fp-article-cover--magazine img {
        aspect-ratio: 2 / 1;
        min-height: 0;
    }
}

/* Variant: notification */
.fp-article--notification {
    border-top: 3px solid var(--c-primary);
}
.fp-article-notification {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
}
.fp-article-notification-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--c-primary) 12%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-primary);
}
.fp-article-notification-body {
    flex: 1;
    min-width: 0;
}
.fp-article-notification-body .fp-article-title {
    -webkit-line-clamp: 2;
}
.fp-article-notification-body .fp-article-source {
    margin-top: var(--nudge, 2px);
}

/* Ã¢ÂÂÃ¢ÂÂ Composer link preview Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.profile-composer-link-preview {
    padding: 0 var(--sp-3) var(--sp-2);
}
.composer-link-loading {
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
    padding: var(--sp-2) 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.composer-link-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--c-border, #e0e0e0);
    border-top-color: var(--c-primary, #3b82f6);
    border-radius: 50%;
    animation: composer-spin 0.6s linear infinite;
}
@keyframes composer-spin {
    to { transform: rotate(360deg); }
}
.composer-link-failed {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--sp-2) 0;
    font-size: var(--fs-sm);
}
.composer-link-failed-msg {
    color: var(--red-500, #ef4444);
    flex: 1;
}
.composer-link-retry-btn,
.composer-link-dismiss-btn {
    font-size: var(--fs-xs);
    padding: 2px 10px;
    border: 1px solid var(--c-border, #e0e0e0);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    cursor: pointer;
    color: var(--c-text);
}
.composer-link-retry-btn:hover,
.composer-link-dismiss-btn:hover {
    background: var(--c-bg-muted, #f5f5f5);
}
.composer-link-card {
    display: flex;
    gap: var(--sp-3);
    align-items: flex-start;
    border: 1px solid var(--c-border, #e0e0e0);
    border-radius: var(--radius-md);
    padding: var(--sp-2);
    position: relative;
}
.composer-link-card-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.composer-link-card-info {
    flex: 1;
    min-width: 0;
}
.composer-link-card-title {
    font-size: var(--fs-sm);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.composer-link-card-desc {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.composer-link-card-domain {
    font-size: var(--fs-xs);
    color: var(--c-primary);
    margin-top: 2px;
}
.composer-link-card-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--c-surface);
    border: 1px solid var(--c-border, #e0e0e0);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: var(--c-text-muted);
}
.composer-link-card-remove:hover {
    background: var(--c-bg-muted, #f5f5f5);
}
.composer-link-card--degraded {
    border-left: 3px solid var(--c-primary, #3b82f6);
}

/* Rich composer link preview (cover-top layout) */
.composer-link-rich {
    position: relative;
    border: 1px solid var(--c-border, #e0e0e0);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.composer-link-rich .composer-link-card-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: var(--c-surface);
    border: 1px solid var(--c-border, #e0e0e0);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: var(--c-text-muted);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.composer-link-rich .composer-link-card-remove:hover {
    background: var(--c-bg-muted, #f5f5f5);
}
.composer-link-rich-inner {
    display: block;
    text-decoration: none;
    color: inherit;
}
.composer-link-rich-inner:hover .composer-link-card-title {
    color: var(--c-primary);
}
.composer-link-rich-cover img {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
}
.composer-link-rich-info {
    padding: var(--sp-2) var(--sp-3) var(--sp-3);
}
.composer-link-card-tag {
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--c-primary, #3b82f6);
    letter-spacing: 0.08em;
    margin-bottom: 2px;
}

/* Ã¢ÂÂÃ¢ÂÂ Link embed containers Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.fp-link-embed-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--c-bg-muted, #f5f5f5);
}
.fp-link-embed-container--trusted {
    border: 1px solid var(--c-border, #e0e0e0);
}
.fp-link-embed-container--sandboxed {
    border: 2px dashed var(--c-warning, #f59e0b);
}
.fp-link-embed-frame {
    width: 100%;
    height: 100%;
    border: 0;
}
.fp-link-embed-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
    background: var(--c-bg-muted, #f5f5f5);
    border: 1px dashed var(--c-border, #e0e0e0);
    border-radius: var(--radius-md);
    min-height: 56px;
}
.fp-link-embed-label {
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
}

/* Ã¢ÂÂÃ¢ÂÂ Article modal Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

body.article-modal-open {
    /* overflow managed by _lockBodyScroll() in JS for scrollbar-shift prevention */
}
.article-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 75%);
    z-index: var(--z-modal);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--sp-6) var(--sp-4);
    overflow-y: auto;
    opacity: 0;
    transition: opacity var(--ease);
}
.article-modal-overlay.active {
    opacity: 1;
}
.article-modal-panel {
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    max-width: 720px;
    width: 100%;
    position: relative;
    padding: var(--sp-6);
    margin: var(--sp-8) auto;
    box-shadow: var(--shadow-elevated);
}
.article-modal-close {
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    background: var(--c-surface);
    border: var(--border-width) solid var(--c-border);
    font-size: var(--fs-2xl);
    color: var(--c-text);
    cursor: pointer;
    line-height: 1;
    z-index: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    transition: background var(--ease), color var(--ease), box-shadow var(--ease);
}
.article-modal-close:hover {
    background: var(--c-hover);
    color: var(--c-text);
    box-shadow: var(--shadow);
}
.article-modal-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--focus-ring-width) var(--c-focus-ring);
}

.article-modal-hero {
    margin: calc(-1 * var(--sp-6)) calc(-1 * var(--sp-6)) var(--sp-5);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}
.article-modal-hero img,
.article-modal-hero video {
    width: 100%;
    display: block;
    max-height: 400px;
    object-fit: cover;
}
.article-modal-title {
    font-size: var(--fs-xl);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 var(--sp-2);
}
.article-modal-meta {
    font-size: var(--fs-sm);
    color: var(--c-text-soft);
    margin-bottom: var(--sp-4);
}
.article-modal-summary {
    font-size: var(--fs-base);
    color: var(--c-text);
    font-weight: 500;
    line-height: var(--lh);
    margin: 0 0 var(--sp-4);
    padding-bottom: var(--sp-4);
    border-bottom: var(--border-width) solid var(--c-border);
}
.article-modal-body {
    font-size: var(--fs-base);
    line-height: 1.7;
    color: var(--c-text);
}
.article-modal-body p {
    margin: 0 0 var(--sp-4);
}
.article-modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--sp-3);
    margin: var(--sp-5) 0;
}
.article-modal-hero,
.article-modal-gallery-item {
    cursor: pointer;
}
.article-modal-gallery-item img,
.article-modal-gallery-item video {
    width: 100%;
    border-radius: var(--radius);
    display: block;
    object-fit: cover;
}
.article-media-video-thumb {
    position: relative;
    display: block;
}
.article-media-video-thumb img {
    width: 100%;
    display: block;
    object-fit: cover;
}
.article-media-video-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--c-bg-subtle, #1a1a1a);
}
.article-modal-hero .article-media-video-thumb img {
    max-height: 400px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.article-modal-gallery-item .article-media-video-thumb img {
    border-radius: var(--radius);
}
.article-media-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: inherit;
    pointer-events: none;
}
.article-media-play-icon svg {
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}
.article-modal-source-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-4);
    padding: var(--sp-2) var(--sp-4);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-primary);
    text-decoration: none;
    transition: background var(--ease), border-color var(--ease);
}
.article-modal-source-link:hover {
    background: var(--c-primary-light);
    border-color: var(--c-primary);
}

/* Post stats & actions -- merged into a single soft bar */
.fp-stats {
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--fs-xs);
    color: var(--c-text-soft);
    display: flex;
    gap: var(--sp-4);
}
.fp-actions {
    display: flex;
    align-items: center;
    padding: var(--sp-1) var(--sp-3);
    border-top: var(--border-width) solid var(--c-border);
}
.fp-action {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3);
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    border-radius: var(--radius);
    transition: color var(--ease), background var(--ease);
    min-height: var(--tap-min);
}
.fp-action:hover {
    background: var(--c-hover);
    color: var(--c-text);
}
.fp-action--active {
    background: var(--c-hover);
    color: var(--c-text);
}
.fp-action--liked {
    color: var(--c-danger);
}
.fp-action--liked:hover {
    color: var(--c-danger);
}
.fp-action--liked svg {
    fill: var(--c-danger);
    stroke: var(--c-danger);
}
.fp-action--pop svg {
    animation: action-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes action-pop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.3); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.fp-action--bookmarked {
    color: var(--c-primary);
}
.fp-action--bookmarked:hover {
    color: var(--c-primary);
}
.fp-action--bookmarked svg {
    fill: var(--c-primary);
    stroke: var(--c-primary);
}
.fp-action--reposted {
    color: var(--c-success);
}
.fp-action--reposted:hover {
    color: var(--c-success);
}
.fp-action--reposted svg {
    stroke: var(--c-success);
}
.fp-action--end {
    margin-left: auto;
}
.fp-action svg {
    width: var(--icon-sm);
    height: var(--icon-sm);
    flex-shrink: 0;
    transition: fill var(--ease), stroke var(--ease);
}

/* Inline comment input at bottom of post */
.fp-comment-row {
    display: none;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4) var(--sp-4);
    border-top: var(--border-width) solid var(--c-border);
    position: relative;
}
.fp-comment-row.is-open {
    display: flex;
}
.fp-comment-send {
    display: none;
    width: var(--sp-8);
    height: var(--sp-8);
    border: none;
    border-radius: var(--radius-full);
    background: var(--c-primary);
    color: var(--c-on-primary);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--ease), transform var(--ease);
}
.fp-comment-send:hover {
    background: var(--c-primary-dark);
}
.fp-comment-send:active {
    transform: scale(0.97);
}
.fp-comment-send.is-sending {
    pointer-events: none;
    opacity: 0.7;
}
.fp-comment-send.is-sending svg {
    animation: send-spin 0.8s linear infinite;
}
@keyframes send-spin {
    to { transform: rotate(360deg); }
}
.fp-comment-send.is-sent {
    background: var(--c-success);
    pointer-events: none;
}
.fp-comment-send.is-sent svg {
    animation: send-check-pop 0.3s ease;
}
@keyframes send-check-pop {
    0%   { transform: scale(0.5); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.fp-comment-row.has-text .fp-comment-send {
    display: inline-flex;
}
.fp-comment-avatar {
    width: var(--sp-8);
    height: var(--sp-8);
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--c-bg);
}
.fp-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fp-comment-input {
    flex: 1;
    padding: var(--sp-2) var(--sp-3);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-family: inherit;
    background: var(--c-bg);
    color: var(--c-text);
    outline: none;
    transition: border-color var(--ease);
}
.fp-comment-input::placeholder {
    color: var(--c-text-soft);
}
.fp-comment-input:focus {
    border-color: var(--c-primary);
}

/* Emoji picker toggle */
.fp-comment-emoji {
    width: var(--sp-8);
    height: var(--sp-8);
    border: none;
    border-radius: var(--radius-full);
    background: none;
    color: var(--c-text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: color var(--ease), background var(--ease);
}
.fp-comment-emoji:hover {
    color: var(--c-primary);
    background: var(--c-hover);
}
.fp-comment-emoji.is-active {
    color: var(--c-primary);
}

/* Emoji picker panel */
.fp-emoji-panel {
    display: none;
    position: absolute;
    bottom: 100%;
    right: var(--sp-4);
    margin-bottom: var(--sp-2);
    width: var(--emoji-panel-w);
    max-height: var(--emoji-panel-h);
    overflow-y: auto;
    background: var(--c-surface-raised);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-2);
    z-index: var(--z-above);
}
.fp-emoji-panel.is-open {
    display: block;
}
.fp-emoji-panel-group-label {
    font-size: var(--fs-xs);
    color: var(--c-text-soft);
    padding: var(--sp-1) var(--sp-1) var(--sp-1);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.fp-emoji-panel-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.fp-emoji-panel-grid button {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: var(--fs-lg);
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease);
}
.fp-emoji-panel-grid button:hover {
    background: var(--c-hover);
}

/* -- Media viewer modal -- */
body.media-modal-open {
    /* overflow managed by _lockBodyScroll() in JS for scrollbar-shift prevention */
}
.media-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) + 10);
    background: rgb(15 15 15 / 75%);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
}
.media-modal-overlay.active {
    display: block;
}
.media-modal-close {
    position: fixed;
    top: var(--sp-5);
    right: var(--sp-6);
    z-index: calc(var(--z-modal) + 12);
    width: var(--sp-10);
    height: var(--sp-10);
    border: none;
    border-radius: var(--radius-full);
    background: var(--c-overlay-white-subtle);
    color: var(--white);
    font-size: var(--fs-2xl);
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease);
    backdrop-filter: blur(var(--sp-1));
}
.media-modal-close:hover {
    background: var(--c-overlay-white-hover);
}
.media-modal-back {
    position: fixed;
    top: var(--sp-5);
    left: var(--sp-6);
    z-index: calc(var(--z-modal) + 12);
    height: var(--sp-10);
    border: none;
    border-radius: var(--radius-full);
    background: var(--c-overlay-white-subtle);
    color: var(--white);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 16px 0 10px;
    transition: background var(--ease);
    backdrop-filter: blur(var(--sp-1));
}
.media-modal-back svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.media-modal-back:hover {
    background: var(--c-overlay-white-hover);
}
.media-modal-body {
    max-width: var(--max-w-viewer);
    margin: 0 auto;
    padding: var(--sp-12) var(--sp-4) var(--sp-8);
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
}
@media (min-width: 640px) {
    .media-modal-body {
        padding: var(--sp-16) var(--sp-6) var(--sp-12);
    }
}
.media-modal-item {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--black);
    flex-shrink: 0;
    position: relative;
}
.media-modal-item > img {
    width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    cursor: pointer;
}
.media-modal-item video {
    width: 100%;
    max-height: 85vh;
    display: block;
    margin: 0 auto;
    outline: none;
    background: var(--black);
}
.media-modal-item--expanded {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
    background: transparent;
}
.media-modal-item--expanded > img {
    max-height: none;
    object-fit: contain;
}
.media-modal-item--with-collection {
    overflow: visible;
    background: transparent;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.media-modal-item--with-collection > img {
    width: 100%;
    border-radius: var(--radius-lg);
}
.media-modal-item--with-collection .media-modal-collection {
    width: 100%;
    min-width: 0;
}
.media-modal-item--with-collection.media-modal-item--expanded > img {
    border-radius: 0;
}
.media-modal-item--playing {
    position: relative;
}
.media-modal-collection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 0;
    margin-top: 0;
}
.media-modal-collection-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}
.media-modal-collection-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--white);
    opacity: 0.6;
    transition: opacity var(--ease);
}
.media-modal-collection-link:hover .media-modal-collection-avatar,
.media-modal-collection-link:focus-visible .media-modal-collection-avatar {
    opacity: 1;
}
.media-modal-collection-name {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--fs-sm);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 30ch;
}
.media-modal-bookmark {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: color var(--ease), transform 0.15s;
    line-height: 0;
}
.media-modal-bookmark:hover {
    color: rgba(255, 255, 255, 0.9);
}
.media-modal-bookmark--active {
    color: var(--white);
}
.media-modal-bookmark--active svg {
    fill: currentColor;
}
.media-modal-bookmark--pop {
    animation: _bkPop 0.3s ease;
}
@keyframes _bkPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* -- Media modal controls row (top center) -- */
.media-modal-controls {
    position: fixed;
    top: var(--sp-5);
    left: 50%;
    transform: translateX(-50%);
    z-index: calc(var(--z-modal) + 12);
    display: flex;
    gap: var(--sp-2);
    align-items: center;
}
.media-modal-gallery-toggle,
.media-modal-related-toggle {
    width: var(--sp-10);
    height: var(--sp-10);
    border: none;
    border-radius: var(--radius-full);
    background: var(--c-overlay-white-subtle);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease);
    backdrop-filter: blur(var(--sp-1));
}
.media-modal-gallery-toggle:hover,
.media-modal-related-toggle:hover {
    background: var(--c-overlay-white-hover);
}
.media-modal-gallery-toggle.active,
.media-modal-related-toggle.active {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* -- Gallery nav arrows (left / right, visible only in gallery mode) -- */
.media-modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: calc(var(--z-modal) + 12);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--c-overlay-white-subtle);
    color: var(--white);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background var(--ease), opacity var(--ease);
    backdrop-filter: blur(var(--sp-1));
}
.media-modal-nav:hover { background: var(--c-overlay-white-hover); }
.media-modal-nav:disabled { opacity: 0.25; cursor: default; }
.media-modal-nav--prev { left: var(--sp-4); }
.media-modal-nav--next { right: var(--sp-4); }
@media (min-width: 640px) {
    .media-modal-nav--prev { left: var(--sp-6); }
    .media-modal-nav--next { right: var(--sp-6); }
}

/* -- Thumbnail strip (bottom, visible only in gallery mode) -- */
.media-modal-thumbs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: calc(var(--z-modal) + 12);
    display: none;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4);
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
    scrollbar-width: none;
}
.media-modal-thumbs::-webkit-scrollbar { display: none; }
.media-modal-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background: rgba(255,255,255,0.08);
    padding: 0;
    position: relative;
    transition: border-color 0.15s, opacity 0.15s;
    opacity: 0.6;
}
.media-modal-thumb:hover { opacity: 1; }
.media-modal-thumb.active {
    border-color: var(--white);
    opacity: 1;
}
.media-modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.media-modal-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-modal-thumb-play::after {
    content: '';
    border-style: solid;
    border-width: 5px 0 5px 9px;
    border-color: transparent transparent transparent var(--white);
}
.media-modal-thumb-video-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
}
.media-modal-thumb-video-icon::after {
    content: '';
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent rgba(255,255,255,0.5);
}

/* -- Gallery mode active state -- */
.media-modal--gallery .media-modal-nav { display: flex; }
.media-modal--gallery .media-modal-thumbs { display: flex; }
.media-modal--gallery .media-modal-overlay { overflow: hidden; }
.media-modal--gallery.media-modal-overlay { overflow: hidden; }
.media-modal--gallery .media-modal-stage {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-16) var(--sp-8) calc(56px + var(--sp-8) + var(--sp-3));
    overflow: hidden;
    gap: var(--sp-4);
}
@media (min-width: 768px) {
    .media-modal--gallery .media-modal-stage {
        padding-left: 80px;
        padding-right: 80px;
    }
}
.media-modal--gallery .media-modal-body {
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}
.media-modal--gallery .media-modal-item {
    display: none;
    width: auto;
    max-width: 90vw;
    max-height: calc(100vh - 160px);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
    background: transparent;
}
.media-modal--gallery .media-modal-item.media-modal-item--active {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}
.media-modal--gallery .media-modal-item--with-collection.media-modal-item--active {
    width: fit-content;
    max-width: 90vw;
}
.media-modal--gallery .media-modal-item--with-collection > img {
    width: 100%;
}
.media-modal--gallery .media-modal-item--with-collection .media-modal-collection {
    width: 100%;
    min-width: 0;
}
.media-modal--gallery .media-modal-item > img {
    max-height: calc(100vh - 160px);
    max-width: 90vw;
    width: auto;
    height: auto;
    margin: 0;
    object-fit: contain;
    cursor: default;
}
.media-modal--gallery .media-modal-item video {
    max-height: calc(100vh - 160px);
    max-width: 90vw;
    width: auto;
    height: auto;
    margin: 0;
}
.media-modal--has-related.media-modal--gallery .media-modal-item {
    max-width: 100%;
}
.media-modal--has-related.media-modal--gallery .media-modal-item > img {
    max-width: 100%;
}
.media-modal--has-related.media-modal--gallery .media-modal-item video {
    max-width: 100%;
}

/* -- Media modal stage (wrapper for body + related rails) -- */
.media-modal--has-related.media-modal--gallery .media-modal-stage {
    display: flex;
    gap: var(--sp-4);
    justify-content: center;
}
.media-modal--has-related.media-modal--gallery .media-modal-body {
    flex: 1;
    min-width: 0;
    margin: 0;
}
.media-modal--has-related:not(.media-modal--gallery) .media-modal-body {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: var(--sp-6);
    column-gap: var(--sp-3);
}
.media-modal--has-related:not(.media-modal--gallery) .media-modal-item {
    grid-column: 1;
}

/* -- Gallery-level related container (used only in gallery mode) -- */
.media-modal-related-container {
    display: none;
    flex-shrink: 0;
    gap: var(--sp-3);
}
.media-modal--has-related.media-modal--gallery .media-modal-related-container {
    display: flex;
    align-self: center;
}

/* -- Per-item related container (used only in non-gallery mode) -- */
.media-modal-item-related {
    grid-column: 2;
    display: flex;
    gap: var(--sp-2);
    align-self: start;
}
.media-modal--gallery .media-modal-item-related {
    display: none !important;
}

/* -- Related rail visual contract -- */
.media-modal-related-rail {
    width: 90px;
    flex-shrink: 0;
    background: var(--black);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.media-modal-related-header {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--sp-1) var(--sp-1) 0;
    flex-shrink: 0;
}
.media-modal-related-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    overflow: hidden;
    padding: var(--sp-1);
    flex: 1;
}
.media-modal-related-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity var(--ease);
}
.media-modal-related-item:hover {
    opacity: 0.8;
}
.media-modal-related-item img {
    width: 100%;
    display: block;
    object-fit: cover;
}
.media-modal-related-item--collection img {
    aspect-ratio: 154 / 166;
}
.media-modal-related-item-name {
    display: block;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.7);
    padding: 2px var(--sp-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 639px) {
    .media-modal-related-container { display: none !important; }
    .media-modal-item-related { display: none !important; }
    .media-modal-related-toggle { display: none; }
}

/* Collage video overlay indicator (small play badge) */
.fp-collage-video-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--sp-10);
    height: var(--sp-10);
    background: var(--c-overlay-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: var(--shadow-md);
}
.fp-collage-video-badge::after {
    content: '';
    border-style: solid;
    border-width: 6px 0 6px 11px;
    border-color: transparent transparent transparent var(--c-primary);
    margin-left: 2px;
}
.fp-media-grid-2 .fp-collage-video-item,
.fp-media-grid-4 .fp-collage-video-item {
    position: relative;
    cursor: pointer;
}

/* -- Solo video auto-play element (overlaid on cover to prevent layout shift) -- */
.fp-solo-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
    z-index: var(--z-above);
}

/* -- Clickable comment count link (rendered as <button>) -- */
.fp-comments-link {
    cursor: pointer;
    transition: color var(--ease);
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
}
.fp-comments-link:hover {
    color: var(--c-text);
    text-decoration: underline;
}

/* -- Reusable comment item component -- */
.comment-item {
    display: flex;
    gap: var(--sp-3);
    padding: var(--sp-3) 0;
}
.comment-item + .comment-item {
    border-top: var(--border-width) solid var(--c-border);
}
.comment-item-avatar {
    width: var(--sp-8);
    height: var(--sp-8);
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--c-bg);
}
.comment-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.comment-item-content {
    flex: 1;
    min-width: 0;
}
.comment-item-header {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    margin-bottom: var(--sp-1);
}
.comment-item-author {
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--c-text);
}
.comment-item-time {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
}
.comment-item-body {
    font-size: var(--fs-base);
    color: var(--c-text);
    line-height: var(--lh);
    margin-bottom: var(--sp-1);
}
.comment-item-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    font-size: var(--fs-xs);
    color: var(--c-text-soft);
}
.comment-like,
.comment-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    background: none;
    border: none;
    padding: var(--sp-1) var(--sp-2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: inherit;
    color: inherit;
    transition: background var(--ease), color var(--ease);
}
.comment-like:hover,
.comment-reply-btn:hover {
    background: var(--c-hover);
    color: var(--c-text);
}
.comment-like.comment-liked {
    color: var(--c-danger);
}
.comment-like svg {
    transition: fill var(--ease), stroke var(--ease);
}
.comment-like.comment-liked svg {
    fill: var(--c-danger);
    stroke: var(--c-danger);
}
.comment-like--pop svg {
    animation: action-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Own comment highlight */
.comment-item--own .comment-item-content {
    background: var(--c-primary-light);
    border-left: var(--border-width-accent) solid var(--c-primary);
    border-radius: var(--radius, 6px);
    padding: var(--sp-2) var(--sp-3);
}
.comment-item--own .comment-item-author {
    color: var(--c-primary);
}

.comment-menu-wrap {
    position: relative;
    margin-left: auto;
}
.comment-menu-btn {
    background: none;
    border: none;
    padding: var(--sp-1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--c-text-soft);
    display: flex;
    align-items: center;
    transition: background var(--ease);
}
.comment-menu-btn:hover {
    background: var(--c-hover);
}
.comment-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--c-surface);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: var(--sp-1);
    z-index: var(--z-dropdown);
    display: none;
    min-width: var(--menu-dropdown-w);
}
.comment-menu-dropdown.open {
    display: block;
}
.comment-menu-dropdown button {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    width: 100%;
    padding: var(--sp-2) var(--sp-3);
    border: none;
    background: none;
    font-size: var(--fs-sm);
    color: var(--c-text);
    cursor: pointer;
    border-radius: var(--radius-sm);
    text-align: left;
}
.comment-menu-dropdown button:hover {
    background: var(--c-hover);
}

/* Reply thread (indented level 2) */
.comment-replies {
    margin-left: var(--sp-8);
    padding-left: var(--sp-3);
    border-left: 2px solid var(--c-border);
}
.comment-replies .comment-item:first-child {
    border-top: none;
}
.comment-show-more {
    display: block;
    margin-left: var(--sp-8);
    padding: var(--sp-2) var(--sp-3);
    font-size: var(--fs-xs);
    color: var(--c-primary);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
}
.comment-show-more:hover {
    text-decoration: underline;
}

/* Inline reply input (appears under a comment when "Reply" is clicked) */
.comment-reply-input-row {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
    margin-left: var(--sp-8);
    padding-left: var(--sp-3);
}
.comment-reply-input-row input {
    flex: 1;
    padding: var(--sp-2) var(--sp-3);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    background: var(--c-bg);
    color: var(--c-text);
    outline: none;
    transition: border-color var(--ease);
}
.comment-reply-input-row input:focus {
    border-color: var(--c-primary);
}

/* -- Comments modal -- */
body.comments-modal-open {
    /* overflow managed by _lockBodyScroll() in JS for scrollbar-shift prevention */
}
.comments-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) + 10);
    background: var(--c-overlay-backdrop);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: var(--sp-8) var(--sp-4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.comments-modal-overlay.active {
    display: flex;
}
.comments-modal-panel {
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: var(--max-w-md);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
}
.comments-modal-close {
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    z-index: var(--z-local);
    width: var(--sp-8);
    height: var(--sp-8);
    border: none;
    border-radius: var(--radius-full);
    background: var(--c-hover);
    color: var(--c-text);
    font-size: var(--fs-lg);
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease);
}
.comments-modal-close:hover {
    background: var(--c-border);
}
.comments-modal-header {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    border-bottom: var(--border-width) solid var(--c-border);
    flex-shrink: 0;
}
.comments-modal-header-avatar {
    width: var(--sp-10);
    height: var(--sp-10);
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
}
.comments-modal-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comments-modal-header-info {
    flex: 1;
    min-width: 0;
}
.comments-modal-header-author {
    font-weight: 600;
    font-size: var(--fs-base);
    color: var(--c-text);
}
.comments-modal-header-preview {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comments-modal-count {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-text);
    padding: var(--sp-3) var(--sp-5) var(--sp-2);
    flex-shrink: 0;
}
.comments-modal-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 var(--sp-5) var(--sp-3);
    -webkit-overflow-scrolling: touch;
}
.comments-modal-composer {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-top: var(--border-width) solid var(--c-border);
    flex-shrink: 0;
    background: var(--c-surface);
}
.comments-modal-composer-avatar {
    width: var(--sp-8);
    height: var(--sp-8);
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
}
.comments-modal-composer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comments-modal-composer input {
    flex: 1;
    padding: var(--sp-2) var(--sp-3);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    background: var(--c-bg);
    color: var(--c-text);
    outline: none;
    transition: border-color var(--ease);
}
.comments-modal-composer input:focus {
    border-color: var(--c-primary);
}
.comments-modal-composer .fp-comment-send {
    display: none;
}
.comments-modal-composer.has-text .fp-comment-send {
    display: inline-flex;
}

/* Inline comment preview (under post) */
.fp-comment-inline {
    padding: 0 var(--sp-4) var(--sp-2);
    display: none;
}
.fp-comment-inline.is-open {
    display: block;
}
.fp-comment-inline .comment-item {
    padding: var(--sp-2) 0;
}
.fp-comment-inline .comment-item + .comment-item {
    border-top: none;
}
.fp-view-all-comments {
    display: block;
    padding: var(--sp-1) 0;
    font-size: var(--fs-xs);
    color: var(--c-text-soft);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
}
.fp-view-all-comments:hover {
    color: var(--c-text);
    text-decoration: underline;
}

/* Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ
   PROFILE PAGE COMPONENTS
   Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.profile-page {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
    position: relative;
}
.profile-page.is-loading .profile-cover-img,
.profile-page.is-loading .profile-avatar-img {
    visibility: hidden;
}
.profile-page.is-loading .profile-cover {
    background: var(--c-border);
}
.profile-page.is-loading .profile-avatar-wrap {
    background: var(--c-border);
    border-radius: var(--radius-full);
}

@media (min-width: 640px) and (max-width: 899px) {
    .profile-feed-layout > .feed-sidebar {
        display: none;
    }
    .profile-feed-layout .feed-mobile-filters-wrap {
        display: block;
    }
    .profile-feed-layout .feed-mobile-filters {
        display: flex;
    }
}
@media (min-width: 900px) and (max-width: 1099px) {
    #profile-sidebar {
        width: auto;
        min-width: 0;
        max-width: none;
        overflow: visible;
        z-index: auto;
    }
}

.profile-header {
    background: var(--c-surface);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--sp-4);
}
.profile-cover {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: var(--c-border);
}
@media (min-width: 640px) {
    .profile-cover { height: 160px; }
}
@media (min-width: 1024px) {
    .profile-cover { height: 200px; }
}
.profile-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity var(--ease), transform var(--ease);
}
.profile-cover-img.is-uploading {
    opacity: 0.7;
    transform: scale(1.01);
}
.profile-cover-edit {
    position: absolute;
    bottom: var(--sp-2);
    right: var(--sp-2);
    background: var(--c-surface);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-full);
    width: var(--icon-lg);
    height: var(--icon-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--c-text);
    box-shadow: var(--shadow-sm);
    transition: background var(--ease);
}
.profile-cover-edit:hover {
    background: var(--c-hover);
}
.profile-cover-edit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--focus-ring-width) var(--c-focus-ring);
}
.profile-cover-edit.is-loading {
    opacity: 0.8;
    cursor: progress;
}

.profile-info {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: 0 var(--sp-4);
    margin-top: calc(var(--sp-8) * -1);
    flex-wrap: wrap;
}
.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.profile-avatar-img {
    width: var(--avatar-lg);
    height: var(--avatar-lg);
    border-radius: var(--radius-full);
    border: 4px solid var(--c-surface);
    object-fit: cover;
    background: var(--c-border);
    transition: opacity var(--ease), transform var(--ease);
}
@media (min-width: 640px) {
    .profile-avatar-img { width: var(--avatar-xl); height: var(--avatar-xl); }
}
.profile-avatar-img.is-uploading {
    opacity: 0.7;
    transform: scale(1.02);
}
.profile-avatar-edit {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--c-surface);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-full);
    width: var(--avatar-sm);
    height: var(--avatar-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--c-text);
    transition: background var(--ease);
}
.profile-avatar-edit:hover {
    background: var(--c-hover);
}
.profile-avatar-edit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--focus-ring-width) var(--c-focus-ring);
}
.profile-avatar-edit.is-loading {
    opacity: 0.8;
    cursor: progress;
}

.profile-identity {
    padding-top: var(--sp-10);
    min-width: 0;
    flex: 1;
}
.profile-display-name {
    font-size: var(--fs-xl);
    font-weight: 700;
    line-height: 1.2;
    color: var(--c-text);
    margin: 0;
    word-break: break-word;
}
.profile-handle {
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
}

.profile-about-snippet {
    margin-top: 4px;
}
.profile-about-add {
    background: none;
    border: none;
    padding: 0;
    font-size: var(--fs-xs);
    color: var(--c-text-soft);
    font-weight: 400;
    cursor: pointer;
    transition: color 0.12s;
}
.profile-about-add:hover {
    color: var(--c-primary);
}
.profile-about-preview {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
    transition: color 0.12s;
}
.profile-about-preview:hover {
    color: var(--c-text);
}

.profile-actions {
    padding-top: var(--sp-10);
    display: flex;
    gap: var(--sp-2);
    flex-shrink: 0;
}
.profile-follow-btn {
    background: var(--c-hover, var(--slate-100));
    color: var(--c-text, var(--slate-700));
    border: none;
    border-radius: var(--radius);
    padding: var(--sp-2) var(--sp-5);
    font-size: var(--fs-sm);
    font-weight: 500;
    cursor: pointer;
    min-height: var(--tap-min);
    transition: background var(--ease), color var(--ease);
}
.profile-follow-btn:hover {
    background: var(--c-border, var(--slate-200));
}
.profile-follow-btn.is-following {
    background: var(--c-primary, #355f96);
    color: #fff;
}
.profile-follow-btn.is-following:hover {
    background: var(--red-500);
    color: #fff;
}
.profile-follow-btn.is-loading {
    opacity: 0.8;
    cursor: progress;
}
.profile-follow-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--focus-ring-width) var(--c-focus-ring);
}
.profile-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    background: var(--c-bg);
    color: var(--c-text-muted);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius);
    padding: var(--sp-1) var(--sp-3);
    font-size: var(--fs-sm);
    font-weight: 400;
    cursor: pointer;
    min-height: var(--tap-min);
    transition: background var(--ease), box-shadow var(--ease);
}
.profile-edit-btn:hover {
    background: var(--c-hover);
}
.profile-edit-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--focus-ring-width) var(--c-focus-ring);
}
.profile-edit-btn.is-loading {
    opacity: 0.8;
    cursor: progress;
    transform: none;
}

.profile-stats {
    display: flex;
    gap: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
}
.profile-stat strong {
    color: var(--c-text);
    font-weight: 600;
}
.profile-stat-btn {
    background: #fff;
    border: 1px solid var(--c-border);
    cursor: pointer;
    padding: var(--sp-1) var(--sp-3);
    font: inherit;
    color: inherit;
    border-radius: var(--radius-full);
    transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.profile-stat-btn:hover {
    color: var(--c-primary);
    border-color: var(--c-primary);
    background: var(--c-primary-light, #f0f6ff);
}
.profile-stat-btn:hover strong {
    color: var(--c-primary);
}

.profile-people-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 360px;
    overflow-y: auto;
}
.profile-people-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.1s;
    text-decoration: none;
    color: var(--c-text);
}
.profile-people-item:hover {
    background: var(--c-hover);
}
.profile-people-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.profile-people-name {
    font-size: 0.88rem;
    font-weight: 600;
}
.profile-people-handle {
    font-size: 0.78rem;
    color: var(--c-text-muted);
}
.profile-people-empty {
    text-align: center;
    padding: 24px 0;
    color: var(--c-text-muted);
    font-size: 0.85rem;
}

.profile-bio-wrap {
    padding: 0 var(--sp-4) var(--sp-3);
}
.profile-bio-text {
    font-size: var(--fs-sm);
    color: var(--c-text);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.profile-bio-text.is-expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
}
.profile-bio-expand {
    background: none;
    border: none;
    color: var(--c-primary);
    font-size: var(--fs-xs);
    font-weight: 500;
    cursor: pointer;
    padding: var(--sp-1) 0 0;
    transition: color var(--ease);
}
.profile-bio-expand:hover {
    text-decoration: underline;
}
.profile-bio-expand:focus-visible {
    outline: none;
    text-decoration: underline;
}

/* Ã¢ÂÂÃ¢ÂÂ Profile back bar Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.profile-back-bar {
    padding: var(--sp-2) 0 var(--sp-2);
}
.profile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    background: none;
    border: none;
    color: var(--c-text);
    font-size: var(--fs-lg);
    font-weight: 400;
    cursor: pointer;
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--radius);
    transition: color var(--ease), background var(--ease);
}
.profile-back-btn:hover {
    color: var(--c-text);
    background: var(--c-hover);
}
.profile-back-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--focus-ring-width) var(--c-focus-ring);
}

/* Ã¢ÂÂÃ¢ÂÂ Profile tab panels Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.profile-tab-panel {
    animation: profileTabFadeIn 200ms var(--ease-fn);
}
@keyframes profileTabFadeIn {
    from { opacity: 0; transform: translateY(var(--sp-1)); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Ã¢ÂÂÃ¢ÂÂ Profile right sidebar previews Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.profile-sidebar-bio {
    font-size: var(--fs-sm);
    color: var(--c-text);
    line-height: 1.5;
    margin: 0;
    padding: 0 var(--sp-3);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.profile-sidebar-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-1);
    padding: var(--sp-2) var(--sp-3) 0;
}
.profile-sidebar-preview {
    padding: 0 var(--sp-3);
}
.profile-sidebar-preview-empty {
    font-size: var(--fs-xs);
    color: var(--c-text-soft);
    margin: 0;
    padding: var(--sp-1) 0;
}
.profile-sidebar-preview-item {
    display: block;
    padding: var(--sp-2) 0;
    border-bottom: var(--border-width) solid var(--c-border);
    text-decoration: none;
    color: var(--c-text);
    font-size: var(--fs-xs);
    line-height: 1.4;
    transition: color var(--ease);
}
.profile-sidebar-preview-item:last-child {
    border-bottom: none;
}
.profile-sidebar-preview-item:hover {
    color: var(--c-primary);
}
.profile-sidebar-preview-meta {
    color: var(--c-text-soft);
    font-size: var(--fs-2xs, 10px);
    margin-top: 2px;
}
.profile-sidebar-viewall {
    display: inline-block;
    padding: var(--sp-1) var(--sp-3);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--c-primary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--ease);
}
.profile-sidebar-viewall:hover {
    text-decoration: underline;
}

/* Ã¢ÂÂÃ¢ÂÂ Profile composer Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.profile-composer {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--sp-4);
    box-shadow: var(--shadow-sm);
}

/* Collapsed trigger */
.profile-composer-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
}
.profile-composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.profile-composer-pill {
    flex: 1;
    height: 40px;
    line-height: 40px;
    padding: 0 16px;
    border-radius: 20px;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    color: var(--c-text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.profile-composer-pill:hover {
    background: var(--c-hover);
    border-color: var(--c-text-soft);
}
.profile-composer-trigger-actions {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 8px 10px;
    border-top: 1px solid var(--c-border);
    margin-top: 0;
    padding-top: 8px;
}
.profile-composer.is-expanded .profile-composer-trigger,
.profile-composer.is-expanded .profile-composer-trigger-actions {
    display: none;
}

/* Action buttons (used in collapsed + expanded) */
.profile-composer-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius);
    background: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--c-text-muted);
    cursor: pointer;
    transition: background 0.12s;
    white-space: nowrap;
}
.profile-composer-action-btn:hover {
    background: var(--c-hover);
}
.profile-composer-action-btn--photo svg {
    color: #22c55e;
}
.profile-composer-action-btn--feeling svg {
    color: #f59e0b;
}

/* Expanded editor */
.profile-composer-expanded {
    padding: 16px;
}
.profile-composer-expanded-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.profile-composer-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--c-text);
}
.profile-composer-input {
    width: 100%;
    border: none;
    padding: 0;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--c-text);
    background: transparent;
    resize: none;
    min-height: 24px;
    line-height: 1.5;
    outline: none;
}
.profile-composer-input::placeholder {
    color: var(--c-text-muted);
}

/* Media previews */
.profile-composer-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.profile-composer-previews:empty {
    display: none;
}
.profile-composer-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--c-border);
    background: var(--c-surface-raised);
    transition: transform 0.12s, box-shadow 0.12s, opacity 0.2s;
}
.profile-composer-preview:hover {
    border-color: var(--c-text-soft);
}
.profile-composer-preview img,
.profile-composer-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-composer-preview-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, transform 0.1s;
}
.profile-composer-preview-remove:hover {
    background: rgba(0,0,0,0.75);
    transform: scale(1.1);
}
.profile-composer-preview.is-pending::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.5);
}

/* Bottom toolbar */
.profile-composer-toolbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--c-border);
}
.profile-composer-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}
.profile-composer-submit {
    margin-left: auto;
    background: var(--c-primary);
    color: var(--c-on-primary);
    border: none;
    border-radius: var(--radius);
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.profile-composer-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.profile-composer-submit:not(:disabled):hover {
    background: var(--c-primary-dark);
}
.profile-composer-submit:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

/* Feeling badge in composer */
.profile-composer-feeling-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    margin-top: 8px;
    border-radius: var(--radius-full);
    background: var(--c-primary-light);
    color: var(--c-primary);
    font-size: 0.8rem;
    font-weight: 600;
}
.profile-composer-feeling-badge span {
    font-size: 1rem;
}
.profile-composer-feeling-badge-remove {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--c-text-muted);
    font-size: 14px;
    line-height: 1;
    padding: 0 0 0 4px;
    display: inline-flex;
    align-items: center;
}
.profile-composer-feeling-badge-remove:hover {
    color: var(--c-text);
}

/* Feeling picker dropdown */
.profile-composer-feeling-picker {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    margin-bottom: 6px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    z-index: 10;
    display: none;
}
.profile-composer-feeling-picker.is-open {
    display: block;
    animation: feeling-picker-enter 0.15s ease-out;
}
@keyframes feeling-picker-enter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.profile-composer-feeling-picker-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.profile-composer-feeling-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 4px;
}
.profile-composer-feeling-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: none;
    background: none;
    border-radius: var(--radius);
    font-size: 0.82rem;
    color: var(--c-text);
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
}
.profile-composer-feeling-option:hover {
    background: var(--c-hover);
}
.profile-composer-feeling-option span {
    font-size: 1.1rem;
}

/* Ã¢ÂÂÃ¢ÂÂ Profile feed Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.profile-feed {
    min-height: var(--feed-min-h);
}
.profile-feed-loading {
    text-align: center;
    color: var(--c-text-muted);
    font-size: var(--fs-sm);
    padding: var(--sp-5) 0;
}
.profile-feed-empty {
    text-align: center;
    padding: 0;
}
.profile-empty-placeholder {
    background: var(--c-hover, var(--slate-100));
    border: 2px dashed var(--c-border, var(--slate-200));
    border-radius: var(--radius-lg);
    padding: var(--sp-12) var(--sp-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
    color: var(--c-text-muted, var(--slate-400));
}
.profile-empty-placeholder svg {
    margin-bottom: var(--sp-2);
    opacity: 0.6;
}
.profile-empty-title {
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--c-text-soft, var(--slate-500));
    margin: 0;
}
.profile-empty-subtitle {
    font-size: var(--fs-sm);
    color: var(--c-text-muted, var(--slate-400));
    margin: 0;
}
.profile-feed .fp {
    margin-bottom: var(--sp-4);
    transition: opacity var(--ease), transform var(--ease);
}
.profile-feed .fp.profile-feed-item-enter {
    opacity: 0;
    transform: translateY(var(--sp-2));
}

.profile-media-status {
    width: 100%;
    height: var(--media-placeholder-h);
    background: var(--c-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-sm);
}
.profile-media-status--pending {
    color: var(--c-text-muted);
}
.profile-media-status--error {
    color: var(--c-danger);
}

/* Ã¢ÂÂÃ¢ÂÂ Repost wrapper Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.fp-repost-header {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-4);
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
}
.fp-repost-header svg {
    flex-shrink: 0;
}
.fp-repost-body {
    padding: 0 var(--sp-4) var(--sp-2);
    font-size: var(--fs-sm);
    color: var(--c-text);
}
.fp-repost-original {
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius);
    margin: 0 var(--sp-4) var(--sp-2);
    overflow: hidden;
}
.fp-repost-original .fp-header {
    padding: var(--sp-2) var(--sp-3);
}
.fp-repost-original .fp-body {
    padding: 0 var(--sp-3) var(--sp-2);
}

/* Ã¢ÂÂÃ¢ÂÂ Profile comment card Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.profile-comment-card {
    background: var(--c-surface);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--sp-4);
    transition: box-shadow var(--ease);
}
.profile-comment-card:hover {
    box-shadow: var(--shadow-sm);
}
.profile-comment-excerpt {
    padding: var(--sp-3) var(--sp-4);
    display: flex;
    gap: var(--sp-3);
    align-items: flex-start;
    border-bottom: var(--border-width) solid var(--c-border);
}
.profile-comment-excerpt-avatar img {
    width: var(--avatar-sm);
    height: var(--avatar-sm);
    border-radius: var(--radius-full);
    object-fit: cover;
}
.profile-comment-excerpt-body {
    flex: 1;
    min-width: 0;
}
.profile-comment-excerpt-text {
    font-size: var(--fs-sm);
    color: var(--c-text);
    line-height: 1.5;
    margin: 0;
}
.profile-comment-excerpt-meta {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    margin-top: var(--sp-1);
}
.profile-comment-context-label {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    padding: var(--sp-2) var(--sp-4) 0;
}

/* Ã¢ÂÂÃ¢ÂÂ Profile detail modal Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.profile-detail-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--c-overlay-backdrop);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--ease), visibility var(--ease);
}
.profile-detail-modal-panel {
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    max-width: var(--max-w-profile);
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: var(--sp-6);
    position: relative;
    transform: translateY(var(--sp-2));
    opacity: 0;
    transition: transform var(--ease), opacity var(--ease);
}
.profile-detail-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.profile-detail-modal-overlay.is-open .profile-detail-modal-panel {
    transform: translateY(0);
    opacity: 1;
}
.profile-detail-modal-close {
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    background: none;
    border: none;
    font-size: var(--fs-2xl);
    color: var(--c-text-muted);
    cursor: pointer;
    line-height: 1;
}
.profile-detail-modal-close:hover {
    color: var(--c-text);
}
.profile-detail-modal-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--focus-ring-width) var(--c-focus-ring);
    border-radius: var(--radius-full);
}
.profile-detail-modal-heading {
    font-size: var(--fs-lg);
    font-weight: 700;
    margin: 0 0 var(--sp-3);
}
.profile-detail-modal-bio {
    font-size: var(--fs-sm);
    color: var(--c-text);
    line-height: 1.6;
    white-space: pre-wrap;
    margin-bottom: var(--sp-4);
}

/* Ã¢ÂÂÃ¢ÂÂ Profile edit modal Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.profile-edit-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--c-overlay-backdrop);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--ease), visibility var(--ease);
}
.profile-edit-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.profile-edit-modal-panel {
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    max-width: var(--max-w-md);
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
    padding: var(--sp-6);
    position: relative;
    transform: translateY(var(--sp-2));
    opacity: 0;
    transition: transform var(--ease), opacity var(--ease);
}
.profile-edit-modal-overlay.is-open .profile-edit-modal-panel {
    transform: translateY(0);
    opacity: 1;
}
.profile-edit-form {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}
.profile-edit-label {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    font-weight: 600;
}
.profile-edit-input,
.profile-edit-textarea {
    width: 100%;
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-bg);
    color: var(--c-text);
    font-size: var(--fs-sm);
    font-family: inherit;
    padding: var(--sp-2) var(--sp-3);
    transition: border-color var(--ease), box-shadow var(--ease);
}
.profile-edit-input:focus,
.profile-edit-textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 var(--focus-ring-width) var(--c-focus-ring);
}
.profile-edit-textarea {
    resize: vertical;
    min-height: var(--textarea-min-h);
}
.profile-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
}
.profile-edit-cancel,
.profile-edit-save {
    border-radius: var(--radius);
    min-height: var(--tap-min);
    padding: var(--sp-1) var(--sp-4);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--ease), transform var(--ease-fast), box-shadow var(--ease);
}
.profile-edit-cancel {
    border: var(--border-width) solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text);
}
.profile-edit-save {
    border: none;
    background: var(--c-primary);
    color: var(--c-on-primary);
}
.profile-edit-cancel:hover,
.profile-edit-save:hover {
    transform: translateY(calc(var(--sp-1) * -1));
}
.profile-edit-cancel:hover {
    background: var(--c-hover);
}
.profile-edit-save:hover {
    background: var(--c-primary-dark);
}
.profile-edit-cancel:focus-visible,
.profile-edit-save:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--focus-ring-width) var(--c-focus-ring);
}
.profile-edit-save:disabled {
    opacity: 0.7;
    cursor: progress;
    transform: none;
}

body.profile-modal-open {
    /* overflow managed by _lockBodyScroll() in JS for scrollbar-shift prevention */
}

/* Ã¢ÂÂÃ¢ÂÂ Reels Experience Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.reels-stage {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height, 64px));
    overflow: hidden;
}

.reels-center {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: var(--sp-4);
    height: 100%;
}
.reels-edvd-title {
    display: none;
}
.reels-edvd-awarded {
    display: none;
}
.reels-edvd-meta {
    display: none;
}
.reels-stage--edvd .reels-edvd-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 30px;
    row-gap: var(--sp-1);
    width: min(100%, calc(100dvh * var(--reel-ratio, 1.7778)));
    margin: 0 auto;
    box-sizing: border-box;
    padding: var(--sp-3) 0 var(--sp-2);
}
.reels-stage--edvd .reels-edvd-title {
    display: block;
    margin: 0;
    padding: 0;
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--c-text);
    line-height: 1.25;
}
.reels-stage--edvd .reels-edvd-awarded {
    display: block;
    margin-top: 0;
    font-size: var(--fs-md);
    font-weight: 400;
    color: var(--c-text-muted);
    line-height: var(--lh);
}
.reels-stage--edvd .reels-side-rail {
    display: none;
}
.reels-stage--edvd .reels-item .reels-video-wrap {
    width: min(100%, calc(100dvh * var(--reel-ratio, 1.7778)));
    aspect-ratio: var(--reel-ratio, 1.7778);
}
.reels-stage--edvd .reels-video {
    object-fit: contain;
}

.reels-video-col {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1 1 0;
    min-width: 0;
}

.reels-viewport {
    position: relative;
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
}


.reels-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    padding-top: 12px;
    padding-bottom: 12px;
    box-sizing: border-box;
}

.reels-item--parked-above { transform: translateY(-100%); }
.reels-item--parked-below { transform: translateY(100%); }

.reels-item--animating {
    transition: transform 350ms cubic-bezier(.4,0,.2,1);
}

.reels-item--active {
    transform: translateY(0);
    pointer-events: auto;
    z-index: 2;
}

.reels-item--exit-up {
    transform: translateY(calc(-100% - 2px));
    z-index: 1;
}

.reels-item--exit-down {
    transform: translateY(100%);
    z-index: 1;
}

.reels-video-wrap {
    position: relative;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
    border-radius: var(--radius-lg);
    box-shadow: none;
}

.reels-item .reels-video-wrap {
    width: min(100%, calc(100dvh * var(--reel-ratio, 0.5625)));
    aspect-ratio: var(--reel-ratio, 0.5625);
}

.reels-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}
.reels-item--portrait .reels-video {
    transform: scale(1.1);
}
.reels-item--landscape .reels-video,
.reels-item--square .reels-video {
    object-fit: contain;
}

.reels-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    color: var(--white, #fff);
    pointer-events: auto;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    transition: background 250ms ease;
}
.reels-overlay--desc-open {
    background: linear-gradient(transparent 0%, rgba(0,0,0,.88) 35%);
}
.reels-overlay--desc-open .reels-view-film-btn {
    background: rgba(255,255,255,.28);
    border-color: rgba(255,255,255,.7);
}

.reels-author {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-1);
}

.reels-author-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.5);
    object-fit: cover;
}

.reels-author-name {
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

.reels-follow-btn {
    padding: 3px 12px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--white, #fff);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 150ms, border-color 150ms;
}

.reels-follow-btn:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.8);
}

.reels-follow-btn--active {
    background: rgba(0, 0, 0, 0.38);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
}
.reels-follow-btn--active:hover {
    background: rgba(0, 0, 0, 0.55);
    border-color: rgba(255, 255, 255, 0.4);
}

.reels-caption {
    font-size: 0.82rem;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,.4);
    max-height: 2.8em;
    overflow: hidden;
}

.reels-store-row {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-2);
}

.reels-store-cover {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(0,0,0,.6);
    object-fit: cover;
    flex-shrink: 0;
}

.reels-store-info {
    flex: 1;
    min-width: 0;
}

.reels-store-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0,0,0,.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reels-store-sub {
    font-size: 0.78rem;
    line-height: 1.35;
    opacity: 0.92;
    text-shadow: 0 1px 2px rgba(0,0,0,.4);
    margin-top: var(--sp-1);
}

.reels-store-cta-row {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-1);
}

.reels-view-film-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 14px;
    min-height: 32px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.12);
    color: var(--white, #fff);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 150ms, border-color 150ms;
    backdrop-filter: blur(4px);
}

.reels-view-film-btn:hover {
    background: rgba(255,255,255,.25);
    border-color: rgba(255,255,255,.8);
}


.reels-store-more {
    display: inline;
    background: none;
    border: none;
    color: rgba(255,255,255,.55);
    font-size: inherit;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: color 150ms;
    vertical-align: baseline;
}
.reels-store-more:hover {
    color: rgba(255,255,255,.85);
}

.reels-store-desc {
    font-size: 0.78rem;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,.4);
    margin-top: var(--sp-5);
}
.reels-store-desc p {
    margin: 0;
}

.reels-store-less {
    display: inline-block;
    background: none;
    border: none;
    color: rgba(255,255,255,.55);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 0;
    margin-top: 2px;
    transition: color 150ms;
}
.reels-store-less:hover {
    color: rgba(255,255,255,.85);
}

.reels-side-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-6);
    padding-bottom: 0;
    flex-shrink: 0;
    align-self: stretch;
}

.reels-actions-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
}

.reels-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--c-text-muted, #888);
    cursor: pointer;
    padding: var(--sp-2);
    border-radius: 50%;
    transition: color 150ms, transform 150ms;
}

.reels-action-btn:hover {
    color: var(--c-text, #333);
    transform: scale(1.12);
}

.reels-action-btn--active {
    color: var(--red-500, #e74c5f);
}
.reels-action-btn--bookmark-active {
    color: var(--c-primary);
}

.reels-action-count {
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1;
}

.reels-nav {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.reels-nav--fixed {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    flex-shrink: 0;
    align-self: center;
}

.reels-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: var(--border-width) solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms, border-color 150ms, transform 150ms;
}

.reels-nav-btn:hover:not(:disabled) {
    background: var(--c-hover, #f5f5f5);
    border-color: var(--c-text-muted);
    transform: scale(1.06);
}

.reels-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.reels-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--c-text-muted, #888);
    font-size: 1rem;
}

.reels-mute-btn {
    position: absolute;
    top: var(--sp-2);
    right: var(--sp-2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.45);
    color: var(--white, #fff);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: background 150ms;
}

.reels-mute-btn:hover {
    background: rgba(0,0,0,.65);
}

/* Reels / Moments mobile: hide filter bar, go edge-to-edge */
body.reels-active .feed-mobile-filters-wrap,
body[data-page="dashboard"].moments-active .feed-mobile-filters-wrap {
    display: none;
}

/* Reels view should not show feed title-mode additions */
body.reels-active #feed-title-area {
    display: none;
}

/* Tap-to-pause play/pause indicator (all viewports) */
.reels-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 15;
}
.reels-play-indicator svg {
    width: 36px;
    height: 36px;
    color: var(--white, #fff);
    fill: var(--white, #fff);
}

/* Mobile: full-screen immersive reels (TikTok / Shorts style) */
@media (max-width: 899px) {

    /* -- Header: keep only top navigation menu button in reels -- */
    body.reels-active .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        margin-bottom: 0;
        background: transparent;
        border-bottom: none;
        z-index: calc(var(--z-sticky) + 1);
        pointer-events: none;
    }
    body.reels-active .header .container {
        justify-content: flex-start;
    }
    body.reels-active .header .logo,
    body.reels-active .header .header-actions {
        display: none !important;
    }
    body.reels-active .header .menu-toggle {
        pointer-events: auto;
        width: 44px;
        height: 44px;
        border-radius: var(--radius-full);
        background: rgba(0, 0, 0, 0.42);
        border: 1px solid rgba(255, 255, 255, 0.26);
        color: var(--white, #fff);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.38);
        backdrop-filter: blur(4px);
    }
    body.reels-active .header .menu-toggle svg {
        width: 20px;
        height: 20px;
    }

    /* -- Layout: full viewport, edge-to-edge -- */
    body.reels-active .container {
        padding-left: 0;
        padding-right: 0;
    }
    body.reels-active .feed-main {
        padding: 0;
        margin: 0;
    }
    .reels-stage {
        height: 100dvh;
        background: #000;
    }
    .reels-center {
        gap: 0;
    }
    .reels-viewport {
        border-radius: 0;
        background: #000;
    }
    .reels-item {
        background: #000;
    }
    .reels-video-wrap {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        aspect-ratio: auto;
        border-radius: 0;
        box-shadow: none;
    }

    /* -- Video: cover-fill like TikTok -- */
    .reels-video {
        object-fit: cover;
    }
    .reels-stage--edvd .reels-edvd-meta {
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
        padding: calc(env(safe-area-inset-top, 0px) + 56px) 0 var(--sp-2);
    }
    .reels-stage--edvd .reels-edvd-title {
        color: var(--white, #fff);
    }
    .reels-stage--edvd .reels-edvd-awarded {
        color: rgba(255, 255, 255, 0.82);
    }
    .reels-stage--edvd .reels-video-wrap {
        width: 100%;
        height: auto;
        max-height: calc(100dvh - 200px);
        aspect-ratio: var(--reel-ratio, 1.7778);
    }
    .reels-stage--edvd .reels-video {
        object-fit: contain;
    }
    .reels-stage--edvd .reels-side-rail {
        display: none;
    }

    /* Transitions handled by shared .reels-item--animating class */

    /* -- Action rail: TikTok-style right column -- */
    .reels-side-rail {
        position: absolute;
        right: var(--sp-2);
        bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
        z-index: 5;
        padding-bottom: 0;
        gap: var(--sp-2);
    }
    .reels-actions-rail {
        gap: var(--sp-3);
    }
    .reels-action-btn {
        color: var(--white, #fff);
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
        padding: var(--sp-2);
    }
    .reels-action-btn svg {
        width: 32px;
        height: 32px;
    }
    .reels-action-btn:hover {
        color: var(--white, #fff);
    }
    .reels-action-count {
        color: var(--white, #fff);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        font-size: 0.7rem;
    }

    /* -- Desktop nav buttons: hidden on mobile -- */
    .reels-nav,
    .reels-nav--fixed {
        display: none;
    }

    /* -- Overlay: extended gradient, more caption room -- */
    .reels-overlay {
        border-radius: 0;
        padding: var(--sp-5) var(--sp-4) calc(env(safe-area-inset-bottom, 0px) + var(--sp-5));
        padding-right: 64px;
        background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.55) 100%);
    }
    .reels-caption {
        max-height: 4.2em;
        line-height: 1.45;
    }
    .reels-author {
        margin-bottom: var(--sp-2);
    }
    .reels-author-avatar {
        width: 40px;
        height: 40px;
    }
    .reels-author-name {
        font-size: 0.95rem;
    }
    .reels-follow-btn {
        padding: 4px 14px;
        font-size: 0.82rem;
    }
    .reels-store-cover {
        width: 44px;
        height: 44px;
    }
    .reels-store-title {
        font-size: 0.9rem;
    }
    .reels-view-film-btn {
        min-height: 36px;
        padding: 5px 16px;
        font-size: 0.82rem;
    }

    /* -- Mute button: inside the video wrap -- */
    .reels-mute-btn {
        top: var(--sp-3);
        right: var(--sp-3);
        z-index: 12;
    }

    .reels-item--portrait .reels-video-wrap {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        aspect-ratio: auto;
        border-radius: 0;
    }

    .reels-item--portrait .reels-video {
        object-fit: cover;
        object-position: center top;
    }

    .reels-item--landscape,
    .reels-item--square {
        background: #000;
        flex-direction: column;
        justify-content: center;
    }

    .reels-item--landscape .reels-video-wrap,
    .reels-item--square .reels-video-wrap {
        width: 100%;
        height: auto;
        max-height: none;
        aspect-ratio: auto;
        border-radius: 0;
        background: #000;
        overflow: visible;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        flex-shrink: 0;
    }

    .reels-item--landscape .reels-video,
    .reels-item--square .reels-video {
        width: 100%;
        height: auto;
        max-height: 65dvh;
        aspect-ratio: var(--reel-ratio, 1);
        object-fit: contain;
        object-position: center center;
        background: #000;
        flex: 0 0 auto;
    }

    .reels-item--landscape .reels-overlay,
    .reels-item--square .reels-overlay {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        border-radius: 0;
        background: #000;
        padding: var(--sp-3) var(--sp-4) calc(env(safe-area-inset-bottom, 0px) + var(--sp-4));
        padding-right: var(--sp-4);
    }
}

/* Reels desktop: zero header margin so stage bottom stays within viewport */
@media (min-width: 900px) {
    body.reels-active .header {
        margin-bottom: 0;
    }
}

/* Reels desktop: keep breathing room around centered video */
@media (min-width: 900px) {
    .reels-center {
        padding-left: clamp(var(--sp-2), 1.8vw, var(--sp-6));
        padding-right: clamp(var(--sp-2), 1.8vw, var(--sp-6));
    }
}
@media (min-width: 1700px) {
    .reels-center {
        padding-left: clamp(var(--sp-6), 3.2vw, var(--sp-12));
        padding-right: clamp(var(--sp-6), 3.2vw, var(--sp-12));
    }
}

/* Reels desktop: toggles appear only when expansion is allowed */
@media (min-width: 900px) {
    body.reels-active .feed-sidebar .feed-sidebar-toggle,
    body[data-page="dashboard"].moments-active .feed-sidebar .feed-sidebar-toggle,
    body.reels-active .feed-sidebar-right .feed-sidebar-toggle-right,
    body[data-page="dashboard"].moments-active .feed-sidebar-right .feed-sidebar-toggle-right {
        display: none;
    }
    body.reels-active .feed-sidebar.is-collapsed .feed-filter-item,
    body[data-page="dashboard"].moments-active .feed-sidebar.is-collapsed .feed-filter-item,
    body.reels-active .feed-sidebar.is-collapsed .feed-milestone-btn,
    body[data-page="dashboard"].moments-active .feed-sidebar.is-collapsed .feed-milestone-btn {
        margin-left: auto;
        margin-right: auto;
    }
    body.reels-active .feed-sidebar-right.is-collapsed .feed-filter-item,
    body[data-page="dashboard"].moments-active .feed-sidebar-right.is-collapsed .feed-filter-item,
    body.reels-active .feed-sidebar-right.is-collapsed .feed-sidebar-edvd-icon,
    body[data-page="dashboard"].moments-active .feed-sidebar-right.is-collapsed .feed-sidebar-edvd-icon {
        margin-left: auto;
        margin-right: auto;
    }
    body.reels-active .feed-sidebar-right.is-collapsed .feed-dvd-tile,
    body[data-page="dashboard"].moments-active .feed-sidebar-right.is-collapsed .feed-dvd-tile {
        margin-left: auto;
        margin-right: auto;
    }
    body.reels-active .feed-sidebar.is-collapsed .feed-sidebar-heading-row,
    body[data-page="dashboard"].moments-active .feed-sidebar.is-collapsed .feed-sidebar-heading-row,
    body.reels-active .feed-sidebar-right.is-collapsed .feed-sidebar-heading-row,
    body[data-page="dashboard"].moments-active .feed-sidebar-right.is-collapsed .feed-sidebar-heading-row {
        justify-content: center;
    }
}
@media (min-width: 1350px) {
    body.reels-active .feed-sidebar .feed-sidebar-toggle,
    body[data-page="dashboard"].moments-active .feed-sidebar .feed-sidebar-toggle {
        display: inline-flex;
    }
    body.reels-active .feed-sidebar:not(.is-collapsed) .feed-sidebar-heading,
    body[data-page="dashboard"].moments-active .feed-sidebar:not(.is-collapsed) .feed-sidebar-heading,
    body.reels-active .feed-sidebar:not(.is-collapsed) .feed-filter-text,
    body[data-page="dashboard"].moments-active .feed-sidebar:not(.is-collapsed) .feed-filter-text {
        display: block;
    }
    body.reels-active .feed-sidebar:not(.is-collapsed) .feed-filter-text,
    body[data-page="dashboard"].moments-active .feed-sidebar:not(.is-collapsed) .feed-filter-text {
        display: inline;
    }
}
@media (min-width: 1450px) {
    body.reels-active .feed-sidebar-right .feed-sidebar-toggle-right,
    body[data-page="dashboard"].moments-active .feed-sidebar-right .feed-sidebar-toggle-right {
        display: inline-flex;
    }
    body.reels-active .feed-sidebar-right:not(.is-collapsed) .feed-sidebar-heading,
    body[data-page="dashboard"].moments-active .feed-sidebar-right:not(.is-collapsed) .feed-sidebar-heading,
    body.reels-active .feed-sidebar-right:not(.is-collapsed) .feed-filter-text,
    body[data-page="dashboard"].moments-active .feed-sidebar-right:not(.is-collapsed) .feed-filter-text,
    body.reels-active .feed-sidebar-right:not(.is-collapsed) .feed-bookmark-badge,
    body[data-page="dashboard"].moments-active .feed-sidebar-right:not(.is-collapsed) .feed-bookmark-badge {
        display: block;
    }
    body.reels-active .feed-sidebar-right:not(.is-collapsed) .feed-filter-text,
    body[data-page="dashboard"].moments-active .feed-sidebar-right:not(.is-collapsed) .feed-filter-text {
        display: inline;
    }
    body.reels-active .feed-sidebar-right:not(.is-collapsed) .feed-bookmark-badge,
    body[data-page="dashboard"].moments-active .feed-sidebar-right:not(.is-collapsed) .feed-bookmark-badge {
        display: inline-flex;
    }
}

/* Ã¢ÂÂÃ¢ÂÂ On-demand Button (AI-inspired highlight) Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.feed-ondemand-btn {
    position: relative;
    z-index: 0;
    cursor: pointer;
}
body.od-active .feed-sidebar.is-collapsed .feed-milestone-btn {
    color: var(--c-text);
}
body.od-active .feed-sidebar.is-collapsed .feed-milestone-btn svg {
    visibility: visible;
    opacity: 1;
}

/* Ã¢ÂÂÃ¢ÂÂ On-demand Store Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */

.od-store {
    width: 100%;
}
.od-filter-bar {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: var(--sp-2);
    padding: var(--sp-4) 0 var(--sp-2);
}
.od-filter-bar .moments-category-menu {
    max-height: 320px;
    overflow-y: auto;
}
.od-store-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--sp-4);
    gap: var(--sp-3);
}
.od-store-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-text);
    margin: 0;
}
@media (max-width: 640px) {
    .od-store-title {
        font-size: 1.25rem;
        line-height: 1.25;
    }
}

/* Header cart icon */
.header-cart-wrap {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
}
.header-cart-wrap svg {
    stroke-width: 2;
}
body.od-active .header-cart-wrap,
.header-cart-wrap.has-items {
    display: flex;
}
.header-cart-wrap:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}
.header-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--c-primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

/* Ã¢ÂÂÃ¢ÂÂ Cart Drawer (Shopify-style slide-out) Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) + 10);
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}
.cart-drawer-overlay.is-open {
    background: rgba(0, 0, 0, 0.4);
}
.cart-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: var(--c-surface);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
.cart-drawer-overlay.is-open .cart-drawer-panel {
    transform: translateX(0);
}
@media (prefers-reduced-motion: reduce) {
    .cart-drawer-overlay,
    .cart-drawer-panel {
        transition: none;
    }
}
@media (max-width: 480px) {
    .cart-drawer-panel {
        width: 100vw;
    }
}
.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--c-border);
    flex-shrink: 0;
}
.cart-drawer-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--c-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-drawer-title svg {
    opacity: 0.55;
    flex-shrink: 0;
}
.cart-drawer-close {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--c-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease), color var(--ease);
}
.cart-drawer-close:hover {
    background: var(--c-hover);
    color: var(--c-text);
}
.cart-drawer-close:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.cart-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 56px 24px 40px;
    text-align: center;
    color: var(--c-text-muted);
}
.cart-drawer-empty svg {
    opacity: 0.18;
}
.cart-drawer-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text);
    margin: 0;
}
.cart-drawer-empty-sub {
    font-size: var(--fs-sm);
    margin: 0;
    line-height: 1.45;
}
.cart-drawer-line {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--c-border);
    align-items: flex-start;
}
.cart-drawer-line:last-child {
    border-bottom: none;
}
.cart-drawer-line-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--c-hover);
}
.cart-drawer-line-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-drawer-line-info {
    flex: 1;
    min-width: 0;
}
.cart-drawer-line-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--c-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-drawer-line-meta {
    font-size: 0.7rem;
    color: var(--c-text-muted);
    margin-top: 3px;
}
.cart-drawer-line-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--c-text);
    margin-top: 6px;
}
.cart-drawer-line-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 2px;
}
.cart-drawer-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.cart-drawer-qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--c-text);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease);
}
.cart-drawer-qty-btn:hover {
    background: var(--c-hover);
}
.cart-drawer-qty-btn:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: -2px;
}
.cart-drawer-qty-val {
    min-width: 28px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--c-text);
}
.cart-drawer-line-remove {
    border: none;
    background: none;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-muted);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: color var(--ease), background var(--ease);
    opacity: 0.5;
}
.cart-drawer-line-remove:hover {
    color: var(--c-danger);
    background: var(--c-hover);
    opacity: 1;
}
.cart-drawer-line-remove:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
    opacity: 1;
}
.cart-drawer-footer {
    border-top: 1px solid var(--c-border);
    padding: 16px 20px 20px;
    flex-shrink: 0;
    background: var(--c-surface);
}
.cart-drawer-totals {
    margin-bottom: 14px;
}
.cart-drawer-totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--c-text);
    font-weight: 600;
}
.cart-drawer-totals-price {
    font-weight: 700;
    font-size: 1.05rem;
}
.cart-drawer-tax-note {
    font-size: 0.7rem;
    color: var(--c-text-muted);
    margin: 6px 0 0;
    line-height: 1.3;
}
.cart-drawer-cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cart-drawer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color 0.15s, opacity 0.15s;
}
.cart-drawer-btn--primary {
    background: var(--c-text);
    color: var(--c-surface);
}
.cart-drawer-btn--primary:hover {
    opacity: 0.88;
}
.cart-drawer-btn--secondary {
    background: var(--c-hover);
    color: var(--c-text);
}
.cart-drawer-btn--secondary:hover {
    background: var(--c-border);
}
.cart-drawer-btn--link {
    background: transparent;
    color: var(--c-text-muted);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 6px 16px;
}
.cart-drawer-btn--link:hover {
    color: var(--c-text);
}

/* Ã¢ÂÂÃ¢ÂÂ Checkout Module (dimmed overlay + centered panel) Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂÃ¢ÂÂ */
.checkout-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) + 20);
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: background 0.3s ease;
}
.checkout-overlay.is-open {
    background: rgba(0, 0, 0, 0.75);
}
.checkout-confirm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: checkout-confirm-fade 0.15s ease;
}
@keyframes checkout-confirm-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.checkout-confirm-box {
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    padding: 28px 24px 20px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.checkout-confirm-msg {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-text);
    margin: 0 0 18px;
    line-height: 1.45;
}
.checkout-confirm-actions {
    display: flex;
    gap: 10px;
}
.checkout-confirm-actions button {
    flex: 1;
    padding: 10px 14px;
    border-radius: var(--radius-md, 8px);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, opacity 0.15s;
}
.checkout-confirm-stay {
    background: var(--c-primary);
    color: #fff;
}
.checkout-confirm-stay:hover {
    opacity: 0.88;
}
.checkout-confirm-leave {
    background: var(--c-hover, #f3f4f6);
    color: var(--c-text);
    border: 1px solid var(--c-border) !important;
}
.checkout-confirm-leave:hover {
    background: var(--c-border);
}
.checkout-panel {
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transform: translateY(24px) scale(0.97);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease;
}
.checkout-overlay.is-open .checkout-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    .checkout-overlay,
    .checkout-panel {
        transition: none;
    }
}
@media (max-width: 560px) {
    .checkout-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .checkout-panel {
        max-width: 100%;
        max-height: 95vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}
.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--c-border);
    flex-shrink: 0;
}
.checkout-header-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--c-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkout-header-title svg {
    opacity: 0.55;
    flex-shrink: 0;
}
.checkout-close {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--c-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease), color var(--ease);
}
.checkout-close:hover {
    background: var(--c-hover);
    color: var(--c-text);
}
.checkout-close:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}
.checkout-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.checkout-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 24px 40px;
    text-align: center;
    color: var(--c-text-muted);
}
.checkout-empty svg {
    opacity: 0.18;
}
.checkout-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text);
    margin: 0;
}
.checkout-empty-sub {
    font-size: var(--fs-sm);
    margin: 0;
    line-height: 1.45;
}
.checkout-section {
    padding: 0;
}
.checkout-section + .checkout-section {
    border-top: 1px solid var(--c-border);
}
.checkout-section-title {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--slate-800);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 16px 24px 8px;
    margin: 0;
}
.checkout-lines {
    padding: 0;
}
.checkout-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--c-border);
}
.checkout-line:last-child {
    border-bottom: none;
}
.checkout-line-thumb {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--c-hover);
}
.checkout-line-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.checkout-line-info {
    flex: 1;
    min-width: 0;
}
.checkout-line-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--c-text);
    line-height: 1.35;
}
.checkout-line-meta {
    font-size: 0.7rem;
    color: var(--c-text-muted);
    margin-top: 2px;
}
.checkout-line-qty {
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
    flex-shrink: 0;
}
.checkout-line-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--c-text);
    min-width: 56px;
    text-align: right;
    flex-shrink: 0;
}
.checkout-field {
    padding: 8px 24px 16px;
}
.checkout-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--c-text-muted);
    margin-bottom: 6px;
}
.checkout-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    color: var(--c-text);
    background: var(--c-surface);
    transition: border-color var(--ease);
}
.checkout-input:focus {
    outline: none;
    border-color: var(--c-primary);
}
.checkout-placeholder-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px 16px;
    font-size: 0.8rem;
    color: var(--c-text-muted);
    font-style: italic;
}
.checkout-placeholder-note svg {
    opacity: 0.4;
    flex-shrink: 0;
}
.checkout-totals {
    padding: 16px 24px;
    border-top: 1px solid var(--c-border);
}
.checkout-totals-row {
    display: flex;
    justify-content: space-between;
    font-size: var(--fs-sm);
    color: var(--c-text);
    margin-bottom: 6px;
}
.checkout-totals-row:last-child {
    margin-bottom: 0;
}
.checkout-totals-note {
    color: var(--c-text-muted);
    font-size: 0.75rem;
}
.checkout-totals-total {
    font-weight: 700;
    font-size: 1.05rem;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--c-border);
}
.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--c-border);
    position: sticky;
    bottom: 0;
    background: var(--c-surface);
    box-shadow: 0 -8px 16px rgba(15, 23, 42, 0.06);
}
.checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color 0.15s, opacity 0.15s;
}
.checkout-btn:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}
.checkout-btn--primary {
    background: var(--c-text);
    color: var(--c-surface);
}
.checkout-btn--primary:hover {
    opacity: 0.88;
}
.checkout-btn--secondary {
    background: var(--c-hover);
    color: var(--c-text);
}
.checkout-btn--secondary:hover {
    background: var(--c-border);
}
.checkout-btn--link {
    background: transparent;
    color: var(--c-text-muted);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 6px 16px;
}
.checkout-btn--link:hover {
    color: var(--c-text);
}
.checkout-btn--pay {
    gap: 8px;
    padding: 14px 20px;
    font-size: 0.95rem;
}
.checkout-summary-collapsible {
    border-bottom: 1px solid var(--c-border);
}
.checkout-summary-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 14px 24px;
    border: none;
    background: var(--c-hover);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--c-text);
    transition: background var(--ease);
}
.checkout-summary-toggle:hover {
    background: var(--c-border);
}
.checkout-summary-toggle:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: -2px;
}
.checkout-summary-toggle-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkout-summary-toggle-left svg {
    opacity: 0.5;
    flex-shrink: 0;
}
.checkout-summary-toggle-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkout-summary-toggle-price {
    font-weight: 500;
}
.checkout-summary-caret {
    transition: transform 0.2s ease;
    opacity: 0.4;
}
.checkout-summary-caret.is-expanded {
    transform: rotate(180deg);
}
.checkout-summary-details {
    padding: 0;
}
.checkout-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 24px 16px;
}
.checkout-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--c-border);
    background: var(--c-surface);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}
.checkout-card:hover {
    border-color: var(--c-text-soft);
}
.checkout-card:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}
.checkout-card--selected {
    border-color: var(--c-text);
    background: var(--c-hover);
}
.checkout-card-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s;
}
.checkout-card--selected .checkout-card-radio {
    border-color: var(--c-text);
}
.checkout-card-radio-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-text);
}
.checkout-card-brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    width: 36px;
    justify-content: center;
}
.checkout-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    text-align: left;
    margin-left: 0;
}
.checkout-card-network {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--c-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.checkout-card-mask {
    font-size: 0.8rem;
    color: var(--c-text);
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.04em;
}
.checkout-card--add-new {
    border-style: dashed;
    border-color: var(--c-border);
}
.checkout-card--add-new:hover {
    border-color: var(--c-text-soft);
}
.checkout-card--add-new.checkout-card--selected {
    border-style: solid;
}
.checkout-card-add-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    color: var(--c-text-muted);
}
.checkout-newcard-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0 4px;
}
.checkout-newcard-field {
    display: flex;
    flex-direction: column;
    position: relative;
}
.checkout-newcard-row {
    display: flex;
    gap: 10px;
}
.checkout-newcard-row > .checkout-newcard-field {
    flex: 1;
    min-width: 0;
}
.checkout-newcard-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bababa;
    border-radius: 7px;
    font-size: 0.875rem;
    font-family: inherit;
    font-weight: 500;
    color: var(--c-text);
    background: var(--c-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.checkout-newcard-input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.checkout-newcard-input::placeholder {
    color: #9a9a9a;
    opacity: 0.75;
}
.checkout-newcard-input.cc-valid {
    border-color: #28ae00;
    background-color: #fafefa;
}
.checkout-newcard-input.cc-valid:focus {
    box-shadow: 0 0 0 3px rgba(144, 220, 131, 0.45);
}
.checkout-newcard-input.cc-error {
    border-color: #d43131;
    background-color: #fefafa;
}
.checkout-newcard-input.cc-error:focus {
    border-color: #d43131;
    box-shadow: 0 0 0 0.2rem rgba(212, 49, 49, 0.35);
}
.checkout-cc-brand-icons {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
    pointer-events: none;
}
.checkout-cc-brand-icons svg {
    transition: opacity 0.15s ease;
}
.checkout-cc-brand-icons svg.cc-dim {
    opacity: 0.25;
}
.checkout-newcard-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}
.checkout-billing-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--c-text-muted);
    cursor: pointer;
    padding: 2px 0;
    -webkit-user-select: none;
    user-select: none;
}
.checkout-billing-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--c-primary);
}
.checkout-billing-choices {
    display: flex;
    gap: 8px;
    padding: 2px 0;
}
.checkout-billing-choice {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.8rem;
    line-height: 1.35;
    background: var(--c-surface);
    color: var(--c-text-muted);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 2px var(--c-border);
    transition: box-shadow 0.15s, color 0.15s, background 0.15s;
    flex: 1;
    text-align: center;
    font-weight: 500;
}
.checkout-billing-choice[aria-pressed="true"] {
    background: var(--c-surface);
    color: var(--c-text);
    box-shadow: 0 0 0 2px var(--c-primary);
}
.checkout-billing-choice:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}
.checkout-billing-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}
.checkout-billing-name-link {
    color: var(--c-text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 2px 0;
    text-decoration: none;
}
.checkout-billing-name-link:hover {
    color: var(--c-text);
}
.checkout-newcard-exp-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.checkout-newcard-exp-row .checkout-newcard-field {
    flex: 0 0 56px;
}
.checkout-newcard-exp-row .checkout-newcard-separator {
    color: #bababa;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}
.checkout-newcard-cvv-field {
    flex: 0 0 70px;
}
.checkout-newcard-hint {
    font-size: 0.7rem;
    color: var(--c-text-muted);
    padding-top: 2px;
}
.checkout-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px 32px;
    gap: 12px;
}
.checkout-success-icon {
    color: #16a34a;
    margin-bottom: 4px;
}
.checkout-success-icon svg {
    display: block;
}
.checkout-success-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--c-text);
    margin: 0;
}
.checkout-success-sub {
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
    margin: 0;
    line-height: 1.5;
}
.checkout-success-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    margin-top: 12px;
}
.purchased-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
}

/* Category pills */
.od-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--sp-5);
}
.od-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.od-pill svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.35;
    stroke: var(--c-text);
}
.od-pill.active {
    background: #000;
    border-color: #000;
    color: #fff;
}
.od-pill.active svg {
    opacity: 1;
    stroke: #fff;
}
.od-pill:hover:not(.active) {
    border-color: var(--c-text-soft);
    color: var(--c-text);
}
@media (max-width: 640px) {
    .od-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        margin-bottom: var(--sp-4);
        scrollbar-width: none;
    }
    .od-pills::-webkit-scrollbar {
        display: none;
    }
    .od-pill {
        flex: 0 0 auto;
    }
}

/* Store cards (post-like style) */
.od-cards {
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
    width: 100%;
}
.od-card {
    margin-bottom: 0;
    width: 100%;
    min-width: 0;
}
.od-post {
    content-visibility: visible;
}
.od-post-header {
    align-items: flex-start;
    padding-bottom: var(--sp-2);
}
.od-post-header-main {
    min-width: 0;
    flex: 1;
}
.od-post-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-2);
}
.od-post-title {
    display: inline-block;
    color: var(--c-text);
    line-height: 1.2;
    font-size: clamp(1.3rem, 1.6vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.od-post-subtext {
    margin-top: 4px;
    color: var(--c-text-muted);
    font-size: var(--fs-sm);
    line-height: 1.3;
}
.od-card-cat {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--c-border);
    color: var(--c-text);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 1px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.od-card-cat:hover {
    background: var(--c-primary);
    color: var(--white, #fff);
}

/* Card body (description) */
.od-card-body {
    padding-top: 0;
    padding-bottom: var(--sp-2);
}
.od-card-desc {
    font-size: 0.85rem;
    color: var(--c-text);
    line-height: 1.55;
    margin: 0;
}

/* Price + CTA row (above media) */
.od-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin: 0 var(--sp-4);
    padding: var(--sp-3) 0 var(--sp-4);
}
@media (min-width: 1400px) {
    .od-price-row {
        margin: 0 var(--sp-5);
        padding: var(--sp-3) 0 var(--sp-4);
    }
}
.od-price-value {
    display: inline-flex;
    align-items: center;
    font-size: clamp(1rem, 1vw, 1.15rem);
    font-weight: 400;
    letter-spacing: -0.015em;
    color: var(--c-text);
    margin-right: auto;
}
.od-price-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

/* Gallery -- reuses fp collage engine with OD sizing */
.od-media-wrap .fp-collage {
    margin: 0 var(--sp-4) var(--sp-1);
    border-radius: var(--radius-md);
}
@media (min-width: 1400px) {
    .od-media-wrap .fp-collage {
        margin: 0 var(--sp-5) var(--sp-1);
    }
}
.od-post .fp-cg-s2row {
    grid-template: "a b" 236px / 1fr 1fr;
}
.od-post .fp-cg-s3a,
.od-post .fp-cg-s3c,
.od-post .fp-cg-s4grid,
.od-post .fp-cg-s5a,
.od-post .fp-cg-s5c,
.od-post .fp-cg-s6a {
    max-height: 360px;
}
.od-post .fp-cg-s3b,
.od-post .fp-cg-s4a,
.od-post .fp-cg-s4b,
.od-post .fp-cg-s5b,
.od-post .fp-cg-s6b {
    max-height: 390px;
}
.od-post .fp-cg-compact {
    max-height: none;
}

.od-post .fp-stats {
    color: var(--c-text-soft);
    min-width: 0;
}
.od-post .fp-comments-link {
    color: var(--c-text-soft);
}
.od-post .fp-comments-link:hover {
    color: var(--c-text);
}

/* Buttons -- rounded to match app style */
.od-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s, background-color 0.15s, opacity 0.15s;
    border: none;
    white-space: nowrap;
}
.od-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.od-btn:active {
    transform: scale(0.97);
}
.od-btn--cart {
    background: var(--c-primary);
    color: #fff;
}
.od-btn--cart:hover {
    background: #2a4c78;
}
.od-btn--buy {
    background: #10b981;
    color: #fff;
}
.od-btn--buy:hover {
    background: #059669;
}
.od-btn--added {
    animation: od-pop 0.4s ease;
}
@keyframes od-pop {
    0% { transform: scale(1); }
    30% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
@media (max-width: 900px) {
    .od-post-title-row {
        flex-wrap: wrap;
    }
    .od-card-cat {
        margin-top: 0;
    }
    .od-price-row {
        margin: 0 var(--sp-3);
        padding: var(--sp-3) 0 var(--sp-4);
    }
    .od-price-actions {
        width: 100%;
    }
    .od-btn {
        padding: 7px 12px;
    }
    .od-media-wrap .fp-collage {
        margin: 0 var(--sp-3) var(--sp-1);
    }
    .od-post .fp-cg-s2row {
        grid-template: "a b" 200px / 1fr 1fr;
    }
}

/* On-demand right sidebar (landing + scrolled variants) */
.od-section-title {
    text-transform: none;
    letter-spacing: 0.01em;
    font-weight: 700;
}
.od-landing-controls {
    justify-content: flex-end;
    margin-bottom: 0;
}
.od-hero-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    padding: 0 var(--sp-3);
}
.feed-sidebar-right-ondemand-landing .od-hero-list {
    margin-top: 0;
}
@keyframes od-panel-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}
.od-panel-fadein {
    animation: od-panel-fadein 0.35s ease;
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item {
    min-height: 40px;
    border-radius: 14px;
    border-left: 0;
    border: 1px solid rgba(15, 23, 42, 0.24);
    padding: 8px 14px;
    justify-content: flex-start;
    gap: 10px;
    background: #fff;
    box-shadow: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item .feed-filter-icon svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.75;
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item .feed-filter-text {
    font-size: 0.92rem;
    font-weight: 700;
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item:hover {
    transform: none;
    box-shadow: none;
    background: #fff;
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item.od-special--new {
    color: #0f172a;
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item.od-special--new.active {
    background: #fff;
    color: #0f172a;
    border-color: #111827;
    box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.14);
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item.od-special--best {
    color: #2a4c78;
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item.od-special--best.active {
    background: #fff;
    color: #2a4c78;
    border-color: #2a4c78;
    box-shadow: inset 0 0 0 1px rgba(53, 95, 150, 0.16);
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item.od-special--hot {
    color: #dc2626;
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item.od-special--hot.active {
    background: #fff;
    color: #dc2626;
    border-color: #dc2626;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.16);
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item.od-special--new:hover {
    border-color: #6b7280;
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item.od-special--best:hover {
    border-color: #2a4c78;
    background: rgba(53, 95, 150, 0.04);
}
.feed-sidebar-right:not(.is-collapsed) .od-hero-item.od-special--hot:hover {
    border-color: #dc2626;
    background: rgba(239, 68, 68, 0.04);
}
.od-featured-section {
    margin-top: var(--sp-5);
}
.od-featured-heading {
    font-size: var(--fs-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    color: var(--c-text);
    padding: 0 var(--sp-3);
    margin-bottom: var(--sp-3);
}
.od-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, var(--od-featured-size, 48px));
    grid-auto-rows: var(--od-featured-size, 48px);
    gap: 8px;
    padding: 0 var(--sp-3);
    overflow: hidden;
    align-content: start;
    justify-content: center;
}
.od-featured-tile {
    display: block;
    width: var(--od-featured-size, 48px);
    height: var(--od-featured-size, 48px);
    aspect-ratio: 1 / 1;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    background: var(--c-surface);
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.od-featured-tile:hover {
    border-color: var(--c-text-soft);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.od-featured-tile--active {
    border-color: var(--c-primary, #355f96);
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(53, 95, 150, 0.25), 0 2px 8px rgba(15, 23, 42, 0.15);
}
.od-cat-more-btn {
    display: block;
    width: 100%;
    padding: 6px 12px 6px 42px;
    margin: 0;
    border: none;
    background: none;
    color: var(--c-text-soft);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease;
}
.od-cat-more-btn:hover {
    color: var(--c-primary);
}
.od-cat-scrollable {
    scrollbar-width: thin;
    scrollbar-color: var(--c-border, #cbd5e1) transparent;
}
.od-cat-scrollable::-webkit-scrollbar {
    width: 5px;
}
.od-cat-scrollable::-webkit-scrollbar-track {
    background: transparent;
}
.od-cat-scrollable::-webkit-scrollbar-thumb {
    background: var(--c-border, #cbd5e1);
    border-radius: 4px;
}
.od-cat-scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--c-text-soft, #94a3b8);
}
.od-featured-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.feed-sidebar-right.is-collapsed .od-featured-section {
    display: none;
}

/* Right-panel special section items */
.od-special-item {
    position: relative;
}
.od-special--new {
    color: var(--c-text);
}
.od-special--new.active {
    background: var(--c-text);
    color: var(--c-bg);
}
.od-special--best {
    color: var(--c-primary);
}
.od-special--best.active {
    background: var(--c-primary);
    color: #fff;
}
.od-special--hot {
    color: var(--red-500);
}
.od-special--hot.active {
    background: var(--red-500);
    color: #fff;
}

/* ==========================================================================
   Layer 5: Layouts
   ==========================================================================
   Structural page-level patterns: header, footer, container, login, nav.
   Phone-first: base styles target 375-440px, then layer up via min-width.
   Layouts define structure, not aesthetics. All visual values use tokens.
   ========================================================================== */

/* -- Container (phone: 16px gutters, sm+: 24px) -- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-px-mobile);
}
@media (min-width: 640px) {
    .container {
        padding: 0 var(--container-px);
    }
}

/* -- Header (sticky, stays at top on scroll) -- */
.header {
    background: var(--c-surface);
    border-bottom: var(--border-width) solid var(--c-border);
    height: var(--header-height);
    display: flex;
    align-items: center;
    margin-bottom: var(--sp-4);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}
@media (min-width: 640px) {
    .header {
        margin-bottom: var(--sp-6);
    }
}
.header .container {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    width: 100%;
}
.header .logo a {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    text-decoration: none;
    color: var(--c-primary);
    font-weight: 600;
    font-size: var(--fs-md);
}
@media (min-width: 640px) {
    .header .logo a {
        font-size: var(--fs-lg);
    }
}
.logo-img {
    max-height: var(--sp-10);
    width: auto;
}
.logo-text {
    white-space: nowrap;
}

/* -- Header actions (notification + avatar, pushed right) -- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}
.header-notif-wrap {
    position: relative;
}
.header-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--c-border);
    cursor: pointer;
    color: var(--c-text-muted);
    border-radius: 999px;
    transition: color var(--ease), background var(--ease);
}
.header-icon-btn:hover {
    background: var(--c-hover);
    color: var(--c-text);
}
.header-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 8px;
    background: var(--c-danger);
    color: var(--c-on-danger);
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.header-notif-badge:empty,
.header-notif-badge[data-count="0"] {
    display: none;
}

/* Notification dropdown */
.header-notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: var(--z-dropdown);
    display: none;
    overflow: hidden;
    animation: notif-dd-slide 0.15s ease;
}
@keyframes notif-dd-slide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.header-notif-wrap.open .header-notif-dropdown {
    display: block;
}
.header-notif-dd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--c-border);
}
.header-notif-dd-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-text);
}
.header-notif-dd-mark {
    font-size: 0.7rem;
    color: var(--c-primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}
.header-notif-dd-mark:hover {
    text-decoration: underline;
}
.header-notif-dd-list {
    max-height: 320px;
    overflow-y: auto;
}
.header-notif-dd-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.1s;
}
.header-notif-dd-item:hover {
    background: var(--c-hover);
}
.header-notif-dd-item.is-unread {
    background: rgba(53, 95, 150, 0.06);
}
.header-notif-dd-item.is-unread:hover {
    background: rgba(53, 95, 150, 0.1);
}
.header-notif-dd-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--c-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-muted);
}
.header-notif-dd-item.is-unread .header-notif-dd-icon {
    background: rgba(53, 95, 150, 0.12);
    color: var(--c-primary);
}
.header-notif-dd-content {
    flex: 1;
    min-width: 0;
}
.header-notif-dd-item-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--c-text);
    line-height: 1.3;
}
.header-notif-dd-item.is-unread .header-notif-dd-item-title {
    font-weight: 600;
}
.header-notif-dd-item-body {
    font-size: 0.75rem;
    color: var(--c-text-muted);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-notif-dd-item-time {
    font-size: 0.65rem;
    color: var(--c-text-soft);
    margin-top: 2px;
}
.header-notif-dd-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-primary);
    margin-top: 6px;
}
.header-notif-dd-footer {
    border-top: 1px solid var(--c-border);
    padding: 10px 16px;
    text-align: center;
}
.header-notif-dd-footer a {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--c-primary);
    text-decoration: none;
}
.header-notif-dd-footer a:hover {
    text-decoration: underline;
}
.header-notif-dd-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--c-text-muted);
    font-size: 0.8rem;
}

/* Notification modal */
body.notif-modal-open {
    /* overflow managed by _lockBodyScroll() in JS for scrollbar-shift prevention */
}
.notif-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) + 10);
    background: var(--c-overlay-backdrop);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: var(--sp-8) var(--sp-4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.notif-modal-overlay.active {
    display: flex;
}
.notif-modal-panel {
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: var(--max-w-xs);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
}
.notif-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-4) var(--sp-5);
    border-bottom: var(--border-width) solid var(--c-border);
    flex-shrink: 0;
}
.notif-modal-title {
    font-weight: 600;
    font-size: var(--fs-lg);
    color: var(--c-text);
}
.notif-modal-close {
    width: var(--sp-8);
    height: var(--sp-8);
    border: none;
    border-radius: var(--radius-full);
    background: var(--c-hover);
    color: var(--c-text);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease);
}
.notif-modal-close:hover {
    background: var(--c-border);
}
.notif-modal-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-2) 0;
    -webkit-overflow-scrolling: touch;
}
.notif-modal-item {
    display: flex;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-5);
    cursor: pointer;
    transition: background var(--ease);
}
.notif-modal-item:hover {
    background: var(--c-hover);
}
.notif-modal-item.is-unread {
    background: var(--c-primary-light);
}
.notif-modal-item.is-unread:hover {
    background: var(--c-primary-hover-bg);
}
.notif-modal-icon {
    width: var(--icon-lg);
    height: var(--icon-lg);
    border-radius: var(--radius-full);
    background: var(--c-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--c-text-muted);
}
.notif-modal-icon svg {
    width: var(--icon-sm);
    height: var(--icon-sm);
}
.notif-modal-content {
    flex: 1;
    min-width: 0;
}
.notif-modal-item-title {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-text);
    line-height: 1.3;
}
.notif-modal-item-body {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    line-height: 1.4;
    margin-top: 2px;
}
.notif-modal-item-time {
    font-size: var(--fs-xs);
    color: var(--c-text-soft);
    margin-top: var(--sp-1);
}
.notif-modal-unread-dot {
    width: var(--sp-2);
    height: var(--sp-2);
    border-radius: var(--radius-full);
    background: var(--c-primary);
    flex-shrink: 0;
    align-self: center;
}
.notif-modal-footer {
    padding: var(--sp-3) var(--sp-5);
    border-top: var(--border-width) solid var(--c-border);
    text-align: center;
    flex-shrink: 0;
}
.notif-modal-mark-read {
    background: none;
    border: none;
    color: var(--c-primary);
    font-size: var(--fs-sm);
    font-weight: 500;
    cursor: pointer;
    padding: var(--sp-1) var(--sp-2);
    border-radius: var(--radius);
    transition: background var(--ease);
}
.notif-modal-mark-read:hover {
    background: var(--c-hover);
}

/* Avatar button + dropdown */
.header-avatar-wrap {
    position: relative;
}
.header-avatar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: var(--icon-lg);
    height: var(--icon-lg);
    padding: 0;
    background: transparent;
    border: var(--border-width) solid var(--slate-600);
    border-radius: var(--radius-full);
    cursor: pointer;
    overflow: visible;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--ease), box-shadow var(--ease);
}
.header-avatar-btn:hover {
    border-color: var(--slate-700);
    box-shadow: var(--shadow);
}
.header-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
}
.header-avatar-anon-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: var(--avatar-xs);
    height: var(--avatar-xs);
    border-radius: var(--radius-full);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    color: var(--slate-700);
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.header-avatar-wrap.is-anonymous .header-avatar-anon-badge {
    display: inline-flex;
}
.header-avatar-wrap:not(.is-anonymous) .header-avatar-btn {
    border: 2px solid var(--c-success);
    box-shadow: var(--shadow-sm);
}
.header-avatar-wrap:not(.is-anonymous) .header-avatar-btn:hover {
    border-color: var(--c-success);
    box-shadow: var(--shadow);
}
.header-avatar-menu {
    position: absolute;
    top: calc(100% + var(--sp-2));
    right: 0;
    min-width: var(--menu-avatar-w);
    background: var(--c-surface);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--sp-2) 0;
    z-index: var(--z-dropdown);
    display: none;
}
.header-avatar-wrap.open .header-avatar-menu {
    display: block;
}
.header-avatar-menu-item {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-4);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    text-align: left;
    transition: background var(--ease);
    font-family: inherit;
}
.header-avatar-menu-item:hover {
    background: var(--c-hover);
}
.header-avatar-menu-item--danger {
    color: var(--c-danger);
}
.header-avatar-menu-divider {
    border: none;
    border-top: var(--border-width) solid var(--c-border);
    margin: var(--sp-1) 0;
}

/* Inline toggle inside avatar menu */
.header-avatar-menu-toggle {
    justify-content: flex-start;
}
.header-avatar-menu-toggle .header-toggle {
    margin-left: auto;
}
.header-toggle {
    position: relative;
    width: var(--toggle-width);
    height: var(--toggle-height);
    flex-shrink: 0;
    display: inline-block;
}
.header-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.header-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--c-border);
    border-radius: var(--radius-full);
    transition: background var(--ease);
}
.header-toggle input:checked + .header-toggle-track {
    background: var(--c-primary);
}
.header-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: var(--toggle-thumb);
    height: var(--toggle-thumb);
    background: var(--white);
    border-radius: var(--radius-full);
    transition: transform var(--ease);
    box-shadow: var(--shadow-sm);
}
.header-toggle input:checked ~ .header-toggle-thumb {
    transform: translateX(16px);
}

/* -- Header experience dropdown (desktop only, hidden below 781px) -- */
.header-experience-wrap {
    position: relative;
    display: none;
}
@media (min-width: 781px) {
    .header-experience-wrap {
        display: block;
    }
}
.header-experience-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: var(--icon-lg);
    padding: 0 var(--sp-3);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--c-text);
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: 500;
    white-space: nowrap;
    transition: border-color var(--ease), background var(--ease);
}
.header-experience-btn:hover {
    background: var(--c-hover);
}
.header-experience-btn:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}
.header-experience-prefix {
    font-weight: 700;
}
.header-experience-name {
    font-weight: 400;
}
.header-experience-chevron {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.header-experience-wrap.open .header-experience-chevron {
    transform: rotate(180deg);
}
.header-experience-menu {
    position: absolute;
    top: calc(100% + var(--sp-2));
    right: 0;
    min-width: 200px;
    background: var(--c-surface);
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--sp-2) 0;
    z-index: var(--z-dropdown);
    display: none;
    animation: exp-dd-slide 0.15s ease;
}
@keyframes exp-dd-slide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.header-experience-wrap.open .header-experience-menu {
    display: block;
}
.header-experience-section-title {
    padding: var(--sp-1) var(--sp-4) var(--sp-1);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    color: var(--c-text-soft);
}
.header-experience-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 6px var(--sp-4);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background var(--ease);
}
.header-experience-item:hover {
    background: var(--c-hover);
}
.header-experience-item.active {
    color: var(--c-primary);
    font-weight: 600;
}
.header-experience-divider {
    border: none;
    border-top: var(--border-width) solid var(--c-border);
    margin: var(--sp-1) 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    min-height: var(--tap-min);
    padding: var(--sp-2) var(--sp-4);
    font-size: var(--fs-base);
    font-weight: 500;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--c-text);
    border: var(--border-width) solid transparent;
}
.nav-link:hover {
    background: var(--c-hover);
}
.nav-icon {
    flex-shrink: 0;
}

/* -- Hamburger toggle (Lucide SVG icons, always visible) -- */
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tap-min);
    height: var(--tap-min);
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: calc(var(--z-nav) + 1);
    flex-shrink: 0;
    color: var(--c-text);
}
.menu-toggle .icon-close {
    display: none;
}
.nav-open .menu-toggle .icon-open {
    display: none;
}
.nav-open .menu-toggle .icon-close {
    display: block;
}

/* -- Secondary nav (hamburger panel, slides from left) -- */
.secondary-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--nav-panel-width);
    max-width: 85vw;
    background: var(--c-surface-raised);
    z-index: var(--z-nav);
    transform: translateX(-100%);
    overflow-y: auto;
}
.nav-open .secondary-nav {
    transform: translateX(0);
    transition: transform var(--ease);
    box-shadow: var(--sp-1) 0 var(--sp-4) var(--c-overlay-backdrop);
}
.secondary-nav-close {
    position: absolute;
    top: var(--sp-3);
    left: var(--container-px-mobile);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tap-min);
    height: var(--tap-min);
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--c-text);
    border-radius: var(--radius);
    z-index: 1;
}
@media (min-width: 640px) {
    .secondary-nav-close {
        top: var(--sp-4);
        left: var(--container-px);
    }
}
.secondary-nav-close:hover {
    background: var(--c-hover);
}
.secondary-nav-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: var(--sp-16) var(--sp-3) var(--sp-4);
    gap: 0;
}
.secondary-nav .nav-link {
    font-size: var(--fs-sm);
    padding: var(--sp-2) var(--sp-3);
    gap: var(--sp-2);
}
.secondary-nav-section-title {
    margin: var(--sp-2) var(--sp-3) var(--sp-1);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    color: var(--c-text-soft);
}
.secondary-nav-section-title--spaced {
    margin-top: var(--sp-3);
}
.nav-divider {
    border: none;
    border-top: var(--border-width) solid var(--c-border);
    margin: var(--sp-2) 0;
}
.nav-spacer {
    flex: 1;
}
.secondary-nav-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-3) var(--sp-2);
}
.secondary-nav-footer a {
    font-size: 0.7rem;
    color: var(--c-text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}
.secondary-nav-footer a:hover {
    color: var(--c-text);
}
.secondary-nav-footer-sep {
    font-size: 0.6rem;
    color: var(--c-border);
}

/* On phone: show primary links inside the hamburger panel */
.secondary-nav-mobile-links {
    display: contents;
}
/* On desktop: hide the primary links duplicate from the panel */
@media (min-width: 768px) {
    .secondary-nav-mobile-links {
        display: none;
    }
}
body:not([data-page="dashboard"]):not([data-page="profile"]) .secondary-nav-feed-left,
body:not([data-page="dashboard"]):not([data-page="profile"]) .secondary-nav-feed-right {
    display: none;
}
@media (min-width: 1200px) {
    body[data-page="dashboard"] .menu-toggle {
        display: none;
    }
    body[data-page="dashboard"] .secondary-nav,
    body[data-page="dashboard"] .nav-backdrop {
        display: none;
    }
}

/* -- Nav backdrop (all sizes, behind panel) -- */
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: var(--c-overlay-backdrop);
    z-index: calc(var(--z-nav) - 1);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ease), visibility var(--ease);
}
.nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
}

/* -- Footer (phone: centered) -- */
.footer {
    padding: var(--sp-6) 0;
    margin-top: var(--sp-8);
    border-top: var(--border-width) solid var(--c-border);
    color: var(--c-text-muted);
    font-size: var(--fs-sm);
    text-align: center;
}
@media (min-width: 640px) {
    .footer {
        margin-top: var(--sp-12);
    }
}

/* -- Login / auth pages (phone: reduced top margin) -- */
.login-container {
    max-width: var(--max-w-sm);
    margin: var(--sp-8) auto;
}
@media (min-width: 640px) {
    .login-container {
        margin: var(--sp-20) auto;
    }
}
.login-logo {
    text-align: center;
    margin-bottom: var(--sp-6);
}
.login-logo img {
    max-width: var(--max-w-sm);
    height: auto;
}
.login-title {
    text-align: center;
    font-size: var(--fs-xl);
    font-weight: 600;
    margin-bottom: var(--sp-6);
}
@media (min-width: 640px) {
    .login-title {
        font-size: var(--fs-2xl);
    }
}

/* -- Page grid (stacked on phone, sidebar at md) -- */
.page-grid {
    display: grid;
    gap: var(--sp-4);
}
@media (min-width: 640px) {
    .page-grid {
        gap: var(--sp-6);
    }
}
@media (min-width: 768px) {
    .page-grid--sidebar {
        grid-template-columns: var(--max-w-sm) 1fr;
    }
}

/* -- Feed layout (left sidebar + feed + right sidebar, phone-first) -- */
.feed-layout {
    display: grid;
    gap: var(--sp-4);
    align-items: start;
}
@media (min-width: 640px) {
    .feed-layout {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: var(--sp-3);
        min-height: calc(100vh - var(--header-height) - var(--sp-4));
        padding-bottom: calc(var(--sp-20) + var(--sp-8));
    }
}
@media (min-width: 850px) {
    .feed-layout {
        grid-template-columns: 48px minmax(0, 1fr) 48px;
    }
}
@media (min-width: 1100px) {
    .feed-layout {
        grid-template-columns: minmax(var(--feed-col-md), var(--feed-col-md-max)) minmax(0, 1fr) 48px;
        gap: var(--sp-4);
    }
}
@media (min-width: 1200px) {
    .feed-layout {
        grid-template-columns: minmax(var(--feed-col-md), var(--feed-col-md-max)) minmax(0, 1fr) minmax(var(--feed-col-right-min), 192px);
        gap: var(--sp-5);
    }
}
@media (min-width: 1400px) {
    .feed-layout {
        grid-template-columns: var(--feed-col-lg) minmax(0, 1fr) 192px;
        gap: var(--sp-6);
    }
}

.feed-sidebar,
.feed-sidebar-right {
    display: none;
    overflow-anchor: none;
}
@media (min-width: 640px) {
    .feed-sidebar {
        display: flex;
        flex-direction: column;
        align-self: start;
        position: sticky;
        top: calc(var(--header-height) + var(--sp-6));
        height: calc(100vh - var(--header-height) - var(--sp-6));
        padding-top: calc(var(--sp-4) - 12px);
        padding-bottom: var(--sp-3);
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        padding-left: 0;
        padding-right: 0;
        overflow: visible;
        z-index: 2;
    }
}
@media (min-width: 850px) {
    .feed-sidebar-right {
        display: block;
        align-self: start;
        position: sticky;
        top: calc(var(--header-height) + var(--sp-6));
        max-height: calc(100vh - var(--header-height) - var(--sp-6));
        overflow: visible;
        padding-top: calc(var(--sp-4) - 12px);
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        padding-left: 0;
        padding-right: 0;
    }
}
@media (min-width: 1100px) {
    .feed-sidebar {
        width: auto;
        min-width: 0;
        max-width: none;
        overflow: visible;
        z-index: auto;
    }
}
@media (min-width: 1200px) {
    .feed-sidebar-right {
        width: auto;
        min-width: 0;
        max-width: none;
        overflow: hidden;
    }
}

.feed-main {
    min-width: 0;
    width: 100%;
    max-width: var(--max-w-feed);
    margin: 0 auto;
}

/* Profile page: 2-column layout (no right sidebar) */
.profile-feed-layout {
    grid-template-columns: 1fr;
}
@media (min-width: 640px) {
    .profile-feed-layout {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 850px) {
    .profile-feed-layout {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 1024px) {
    .profile-feed-layout {
        grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
    }
}
@media (min-width: 1200px) {
    .profile-feed-layout {
        grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    }
}
@media (min-width: 1450px) {
    .profile-feed-layout {
        grid-template-columns: 190px minmax(0, 1fr);
    }
}

/* Collapsed sidebar: narrow icon-only column */
@media (min-width: 640px) {
    .feed-sidebar.is-collapsed {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        padding-left: 0;
        padding-right: 0;
        overflow: visible;
        z-index: 2;
    }
    .feed-layout:has(.feed-sidebar.is-collapsed) {
        grid-template-columns: 48px minmax(0, 1fr);
    }
}
@media (min-width: 850px) {
    .feed-layout:has(.feed-sidebar.is-collapsed) {
        grid-template-columns: 48px minmax(0, 1fr) 48px;
    }
}
@media (min-width: 1200px) {
    .feed-layout:has(.feed-sidebar.is-collapsed) {
        grid-template-columns: 48px minmax(0, 1fr) minmax(var(--feed-col-right-min), 192px);
    }
}
@media (min-width: 1400px) {
    .feed-layout:has(.feed-sidebar.is-collapsed) {
        grid-template-columns: 48px minmax(0, 1fr) 192px;
    }
}

/* Collapsed right sidebar: narrow icon-only column (manual toggle at wider viewports) */
@media (min-width: 850px) {
    .feed-sidebar-right.is-collapsed {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        padding-left: 0;
        padding-right: 0;
        overflow: visible;
    }
}
@media (min-width: 1100px) {
    .feed-layout:has(.feed-sidebar-right.is-collapsed) {
        grid-template-columns: minmax(var(--feed-col-md), var(--feed-col-md-max)) minmax(0, 1fr) 48px;
    }
    .feed-layout:has(.feed-sidebar.is-collapsed):has(.feed-sidebar-right.is-collapsed) {
        grid-template-columns: 48px minmax(0, 1fr) 48px;
    }
}
@media (min-width: 1400px) {
    .feed-layout:has(.feed-sidebar-right.is-collapsed) {
        grid-template-columns: var(--feed-col-lg) minmax(0, 1fr) 48px;
    }
    .feed-layout:has(.feed-sidebar.is-collapsed):has(.feed-sidebar-right.is-collapsed) {
        grid-template-columns: 48px minmax(0, 1fr) 48px;
    }
}

/* Reels mode: lock page scroll, full-width edge-to-edge layout */
body.reels-active {
    overflow: hidden;
}
body.reels-active .feed-main,
body[data-page="dashboard"].moments-active .feed-main {
    max-width: none;
}

/* Moments mode is full-width but uses a blank main canvas for upcoming content. */
body[data-page="dashboard"].moments-active #feed-posts {
    display: none;
}

@media (min-width: 900px) {
    body.reels-active .feed-layout,
    body[data-page="dashboard"].moments-active .feed-layout {
        grid-template-columns: 56px 1fr 56px;
        gap: 0;
    }
    body.reels-active .feed-layout:has(.feed-sidebar.is-collapsed),
    body[data-page="dashboard"].moments-active .feed-layout:has(.feed-sidebar.is-collapsed) {
        grid-template-columns: 56px 1fr 56px;
    }
    /* Moments keeps full-width structure but with readable spacing from side rails. */
    body[data-page="dashboard"].moments-active .feed-layout {
        gap: var(--sp-3);
    }
    body[data-page="dashboard"].moments-active .feed-layout:has(.feed-sidebar-right.is-collapsed) .feed-main {
        padding-left: var(--sp-3);
        padding-right: var(--sp-3);
        box-sizing: border-box;
    }
}
@media (min-width: 1024px) {
    body.reels-active .header .container,
    body[data-page="dashboard"].moments-active .header .container {
        max-width: none;
        padding-left: clamp(var(--sp-4), 2.4vw, var(--sp-8));
        padding-right: clamp(var(--sp-4), 2.4vw, var(--sp-8));
    }
    body.reels-active > main.container,
    body[data-page="dashboard"].moments-active > main.container {
        max-width: none;
        padding-left: 0;
        padding-right: 0;
    }
}
@media (min-width: 1350px) {
    body.reels-active .feed-layout,
    body[data-page="dashboard"].moments-active .feed-layout {
        grid-template-columns: minmax(180px, 200px) 1fr 56px;
    }
    body.reels-active .feed-layout:has(.feed-sidebar.is-collapsed),
    body[data-page="dashboard"].moments-active .feed-layout:has(.feed-sidebar.is-collapsed) {
        grid-template-columns: 56px 1fr 56px;
    }
}
@media (min-width: 1450px) {
    body.reels-active .feed-layout,
    body[data-page="dashboard"].moments-active .feed-layout {
        grid-template-columns: minmax(180px, 200px) 1fr minmax(160px, 180px);
    }
    body.reels-active .feed-layout:has(.feed-sidebar.is-collapsed),
    body[data-page="dashboard"].moments-active .feed-layout:has(.feed-sidebar.is-collapsed) {
        grid-template-columns: 56px 1fr minmax(160px, 180px);
    }
    body.reels-active .feed-layout:has(.feed-sidebar-right.is-collapsed),
    body[data-page="dashboard"].moments-active .feed-layout:has(.feed-sidebar-right.is-collapsed) {
        grid-template-columns: minmax(180px, 200px) 1fr 56px;
    }
    body.reels-active .feed-layout:has(.feed-sidebar.is-collapsed):has(.feed-sidebar-right.is-collapsed),
    body[data-page="dashboard"].moments-active .feed-layout:has(.feed-sidebar.is-collapsed):has(.feed-sidebar-right.is-collapsed) {
        grid-template-columns: 56px 1fr 56px;
    }
}

/* On-demand mode intentionally follows the default dashboard breakpoints. */

/* ==========================================================================
   Layer 6: SPA
   ==========================================================================
   Client-side navigation: progress bar, content transitions, active nav.
   ========================================================================== */

/* -- Progress bar -- */
#spa-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: var(--spa-bar-height);
    background: var(--c-primary);
    z-index: var(--z-progress);
    width: 0;
    opacity: 0;
    transition: none;
    pointer-events: none;
}
#spa-progress.active {
    opacity: 1;
    width: 70%;
    transition: width 8s cubic-bezier(0.1, 0.5, 0.3, 1);
}
#spa-progress.done {
    width: 100%;
    transition: width var(--ease-fast), opacity var(--ease);
    opacity: 0;
}

/* -- Content transitions -- */
#main-content {
    transition: opacity 60ms ease;
}
#main-content.spa-fade-out { opacity: 0; }
#main-content.spa-fade-in  { opacity: 1; }
#main-content:focus { outline: none; }

/* -- Active nav link -- */
.primary-nav .nav-link.active,
.secondary-nav .nav-link.active {
    border-color: var(--c-primary);
    color: var(--c-primary);
    background: var(--c-primary-light);
}

/* -- Nav scroll lock (phone only, desktop panel doesn't need it) -- */
body.nav-open {
    overflow: hidden;
}
@media (min-width: 768px) {
    body.nav-open {
        overflow: visible;
    }
}

/* -- Theme toggle (icon-only, used on standalone pages) -- */
.theme-toggle {
    background: transparent;
    border: var(--border-width) solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-text-muted);
    cursor: pointer;
    padding: var(--sp-2);
    line-height: 1;
    font-size: var(--fs-md);
    min-height: var(--tap-min);
    min-width: var(--tap-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color var(--ease), border-color var(--ease);
}
.theme-toggle:hover {
    color: var(--c-primary);
    border-color: var(--c-primary);
}
.theme-toggle-standalone {
    position: fixed;
    top: var(--sp-4);
    right: var(--sp-4);
    z-index: var(--z-sticky);
}

/* -- Theme toggle (nav row style, used inside hamburger panel) -- */
.theme-toggle-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-height: var(--tap-min);
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--fs-md);
    font-weight: 500;
    border-radius: var(--radius);
    color: var(--c-text);
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.theme-toggle-nav:hover {
    background: var(--c-hover);
}
.theme-toggle-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
