/* ═══════════════════════════════════════════════════════════════════
   Socialify — app layer (loaded by blog/templates/app/head.html)
   Phones & tablets (< 1200px): native-style app — rainbow app bar + rainbow tab bar
   (same .bg-steel / .navbar-bottom gradients as the website, equal heights), card
   feed, and the "All of Socialify" sheet.
   Desktop & laptops (>= 1200px): the existing website, with responsive fixes only.
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --sf-bar-h: 58px;
    --sf-safe-top: env(safe-area-inset-top, 0px);
    --sf-safe-bottom: env(safe-area-inset-bottom, 0px);
    --sf-font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --sf-ink: #1c1f2b;
    --sf-ink-soft: #667085;
    --sf-bg: #eef1f7;
    --sf-card: #ffffff;
    --sf-rainbow: linear-gradient(90deg, #2f6bff, #0a8cff, #00b4d0, #12b886, #4fcf3a, #f4b400, #ff7b25, #ff4f6d, #f03e9b, #c44ee6, #7b5cff);
}

/* Never scroll sideways, on any screen */
html, body { overflow-x: clip; max-width: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
@view-transition { navigation: auto; }

/* The app layer is hidden on desktop */
.sf-appbar, .sf-tabbar, .sf-sheet, .sf-sheet-backdrop { display: none; }

.sf-ico {
    width: 24px; height: 24px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ═════════════════════════ Desktop & laptops ═════════════════════════ */
@media (min-width: 1200px) {
    /* The top menu has ~20 links: keep them on one line instead of wrapping under the bar */
    .site-header .navbar-nav { flex-wrap: nowrap; }
    .site-header .navbar-nav .nav-link { white-space: nowrap; }
    .site-header .navbar > .container { max-width: 100%; }
}
/* Top and bottom rainbow bars: same 60px height, icon-over-label items so the ~22 links fit on one row
   (they used 38px icons beside the text, which pushed Post/Edit/Logout/profile off the right edge).
   Only sizes change here — the rainbow backgrounds are the site's own .bg-steel / .navbar-bottom. */
@media (min-width: 1200px) {
    .site-header .navbar.bg-steel { height: 60px; min-height: 60px; padding-top: 0 !important; padding-bottom: 0 !important; }
    .site-header .navbar-brand { font-size: 22px; font-weight: 900; margin-right: 10px !important; }
    .site-header .navbar .nav-link:has(> i), .site-header .dropbtn {
        display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        padding: 4px 6px !important; font-size: 11.5px !important; line-height: 1.1; white-space: nowrap;
        background: none; border: 0; color: #fff; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    }
    .site-header .navbar .nav-link > i, .site-header .dropbtn > i {
        font-size: 22px !important; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .3));
    }
    .site-header .navbar .nav-link:has(> i):hover { background: rgba(255, 255, 255, .16); border-radius: 12px; }
    .site-header #p-link { width: 34px; height: 34px; box-shadow: 0 0 0 2px #fff; }

    .site-header .navbar-bottom { display: block !important; height: 60px; padding: 0 !important; margin-bottom: 0 !important; }
    .site-header .navbar-bottom .navbar-nav { display: flex; flex-direction: row; align-items: center; height: 60px; }
    .site-header .navbar-bottom a:has(> i), .site-header .navbar-bottom .dropbtn {
        display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        padding: 4px 12px !important; font-size: 12px !important; line-height: 1.1; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    }
    .site-header .navbar-bottom a > i { font-size: 22px !important; }
}
@media (min-width: 1200px) and (max-width: 1439.98px) {
    .site-header .navbar .nav-link:has(> i), .site-header .dropbtn { padding: 4px 4px !important; font-size: 10.5px !important; }
    .site-header .navbar .nav-link > i, .site-header .dropbtn > i { font-size: 20px !important; }
}
/* Pages on the text-only menu (blog/socialify.html) */
@media (min-width: 1200px) and (max-width: 1599.98px) {
    .site-header .navbar-nav .nav-link:not(:has(> i)) { padding-left: .42rem !important; padding-right: .42rem !important; font-size: 14px; }
}
/* Desktop: the rainbow bottom bar is fixed and 60px tall, so reserve exactly that much at the end of every page that
   has it. Each page then ends right above the bar, as designed — no content hidden under it and no extra gap.
   (Phones/tablets do the same for their tab bar below; full-screen pages like Group Chat and AI sit between the bars.) */
@media (min-width: 1200px) {
    body:has(.navbar-bottom:not(.sf-tabbar)) { padding-bottom: 60px !important; }
    html:has(.navbar-bottom:not(.sf-tabbar)) { scroll-padding-bottom: 72px; }   /* keyboard focus / #links stop above the bar */
    body:has(.navbar-bottom:not(.sf-tabbar)) .ac-save { bottom: 78px; }           /* Settings' floating Save bar sits above it */
}
/* Media inside posts never overflow their card */
main img, main video, main iframe { max-width: 100%; }

/* ═════════════════════════ Phones & tablets ═════════════════════════ */
@media (max-width: 1199.98px) {

    /* The website's own bars are replaced by the app bars below */
    .site-header { display: none !important; }

    body {
        margin-top: 0 !important;
        padding-top: calc(var(--sf-bar-h) + var(--sf-safe-top));
        padding-bottom: calc(var(--sf-bar-h) + var(--sf-safe-bottom) + 12px);
        background: var(--sf-bg) !important;
        font-family: var(--sf-font);
        color: var(--sf-ink);
    }

    /* ── Top app bar: the site's .bg-steel rainbow, unchanged ── */
    .sf-appbar {
        display: flex; align-items: center; gap: 8px;
        position: fixed; top: 0; left: 0; right: 0; z-index: 1040;
        height: calc(var(--sf-bar-h) + var(--sf-safe-top));
        padding: var(--sf-safe-top) max(10px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
        box-shadow: 0 2px 16px rgba(20, 10, 60, .22);
        font-family: var(--sf-font);
        transition: transform .28s cubic-bezier(.32, .72, 0, 1);
    }
    body.sf-bar-hidden .sf-appbar { transform: translateY(-100%); }
    .sf-brand { display: flex; align-items: center; text-decoration: none !important; }
    .sf-brand-name {
        color: #fff; font-size: 27px; font-weight: 900; letter-spacing: -.6px; line-height: 1;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 0 14px rgba(0, 0, 0, .12);
    }
    .sf-appbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
    .sf-icon-btn {
        display: inline-flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; border-radius: 50%;
        background: rgba(255, 255, 255, .22); color: #fff !important;
        -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
        filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .3));
        transition: transform .12s ease, background .12s ease;
    }
    .sf-icon-btn .sf-ico { width: 21px; height: 21px; stroke-width: 2.3; }
    .sf-icon-btn:active { transform: scale(.9); background: rgba(255, 255, 255, .35); }
    .sf-pill-btn {
        padding: 9px 18px; border-radius: 999px; background: #fff; color: #1c1f2b !important;
        font-weight: 800; font-size: 14px; text-decoration: none !important; box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
        white-space: nowrap; flex: none;   /* "Log in" on one line, never squeezed into two (owner, 2026-11-29) */
    }
    /* small phones (360-390 px wide): a touch smaller name, buttons and gaps, so name, two icons and "Log in" all fit */
    @media (max-width: 400px) {
        .sf-appbar { gap: 6px; padding-left: max(12px, env(safe-area-inset-left)); }
        .sf-brand { gap: 7px; min-width: 0; }
        .sf-brand-name { font-size: 23px; }
        .sf-appbar-actions { gap: 6px; flex: none; }
        .sf-icon-btn { width: 36px; height: 36px; }
        .sf-icon-btn .sf-ico { width: 19px; height: 19px; }
        .sf-pill-btn { padding: 8px 14px; font-size: 13.5px; }
    }
    @media (max-width: 340px) { .sf-brand-name { font-size: 20px; } .sf-pill-btn { padding: 7px 11px; } }

    /* ── Bottom tab bar: the site's .navbar-bottom rainbow, unchanged, same height as the top bar ── */
    .sf-tabbar.navbar-bottom {
        display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr);   /* many tabs: they keep 64px and scroll */
        overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1040;
        width: auto; height: calc(var(--sf-bar-h) + var(--sf-safe-bottom));
        margin: 0; padding: 0 env(safe-area-inset-right) var(--sf-safe-bottom) env(safe-area-inset-left);
        overflow-y: hidden;
        box-shadow: 0 -2px 16px rgba(20, 10, 60, .22);
        font-family: var(--sf-font);
    }
    .sf-tabbar.navbar-bottom .sf-tab {
        float: none; position: relative;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
        padding: 0; border: 0; background: none; cursor: pointer;
        color: #fff !important; font: 800 10.5px/1.1 var(--sf-font); letter-spacing: .2px;
        text-decoration: none !important; text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
        -webkit-user-select: none; user-select: none;
    }
    .sf-tabbar.navbar-bottom::-webkit-scrollbar { display: none; }
    .sf-tabbar.navbar-bottom .sf-tab { scroll-snap-align: start; min-width: 64px; }
    /* Menu always stays the last tab you can see: pinned to the right edge while the other tabs scroll under it */
    .sf-tabbar.navbar-bottom .sf-tab[data-sheet-open] {
        position: sticky; right: 0; z-index: 2;
        background: linear-gradient(115deg, rgba(184, 79, 224, .82), rgba(81, 112, 242, .86));
        -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        box-shadow: -10px 0 16px rgba(40, 20, 90, .28);
    }
    .sf-tab .sf-ico { width: 23px; height: 23px; stroke-width: 2.2; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .4)); position: relative; z-index: 1; }
    .sf-tab > span { position: relative; z-index: 1; opacity: .92; }
    .sf-tab:active .sf-ico, .sf-tab:active .sf-tab-avatar { transform: scale(.86); }
    .sf-tab .sf-ico, .sf-tab-avatar { transition: transform .12s ease; }
    /* Active tab: a frosted pill behind the icon (Material-style indicator) */
    .sf-tab.active::before {
        content: ''; position: absolute; top: 6px; left: 50%; width: 58px; height: 30px; margin-left: -29px;
        border-radius: 999px; background: rgba(255, 255, 255, .3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
    }
    .sf-tab.active > span { opacity: 1; font-weight: 900; }
    .sf-tab-avatar {
        width: 26px; height: 26px; border-radius: 50%; object-fit: cover; position: relative; z-index: 1;
        box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .35); background: #fff;
    }

    /* ── Page content: centred column of cards ── */
    main[role="main"], main.container {
        width: 100% !important; min-width: 0 !important;
        margin-top: 12px !important; max-width: 680px !important;
        padding-left: max(10px, env(safe-area-inset-left)) !important; padding-right: max(10px, env(safe-area-inset-right)) !important;
    }
    main[role="main"] > .row { margin-left: 0; margin-right: 0; }
    /* Bootstrap rows pull 15px outside their parent; on pages without a padded container that overflows the screen */
    .row { margin-left: 0 !important; margin-right: 0 !important; }
    /* Friend cards (friendship.css) are fixed at 500px + a 75px left margin */
    #fb, #fb-top { width: 100% !important; max-width: 100%; margin-left: 0 !important; left: 0 !important; }
    #fb { display: block; height: auto; min-height: 150px; border-radius: 18px !important; overflow: hidden; background: #fff; margin-bottom: 12px; }
    /* Sidebars (search, greetings, radio, calendar…) live in the app's menu on phones */
    main[role="main"] > .row > .col-md-2 { display: none !important; }
    main[role="main"] > .row > .col-md-8 { flex: 0 0 100%; max-width: 100%; padding-left: 0; padding-right: 0; }

    .content-section, main .card {
        border: 0 !important; border-radius: 20px !important; margin-left: 0 !important; margin-right: 0 !important;
        background: var(--sf-card); box-shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 6px 20px rgba(20, 30, 60, .07);
        padding: 14px 14px 12px; margin-bottom: 14px;
    }
    main .card-header { background: transparent; border-bottom: 1px solid #eef0f4; }
    .article-title { color: var(--sf-ink) !important; font-weight: 800; }
    .article-metadata a, .article-content { word-break: break-word; }

    /* Photos and videos in posts: full card width, natural shape (no stretching) */
    main img.my-imgs, main .my-imgs, main video, main .w-100 {
        width: 100% !important; max-width: 100% !important; height: auto !important;
        object-fit: contain !important; margin: 8px 0 0 !important; border-radius: 14px;
    }
    main iframe { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; margin: 8px 0 0 !important; border: 0; border-radius: 14px; }
    /* Full-screen rooms (Meet, Air) fill their frame instead of being a 16:9 video embed */
    main .meet-frame iframe, main .air-room iframe { height: 100% !important; aspect-ratio: auto; margin: 0 !important; border-radius: 0; }
    main .img-fluid { max-width: 100% !important; }
    main .rounded-circle { object-fit: cover; }

    /* Forms feel native: 16px text stops iOS zooming, big touch targets */
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),
    select, textarea { font-size: 16px !important; }
    main .form-control { border-radius: 14px; min-height: 46px; border-color: #dfe3eb; }
    main .btn { border-radius: 14px; min-height: 44px; font-weight: 800; }
    main .alert { border-radius: 14px; border: 0; }

    h1, h2, h3 { overflow-wrap: break-word; }
    .sf-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

    /* ── "All of Socialify" sheet ── */
    .sf-sheet-backdrop {
        display: block; position: fixed; inset: 0; z-index: 1060;
        background: rgba(12, 10, 30, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
        opacity: 0; pointer-events: none; transition: opacity .25s ease;
    }
    .sf-sheet {
        display: flex; flex-direction: column;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1061;
        max-height: 88vh; max-height: 88dvh; max-width: 680px; margin: 0 auto;
        background: #f6f7fb; border-radius: 26px 26px 0 0;
        box-shadow: 0 -12px 40px rgba(12, 10, 30, .25);
        transform: translateY(105%); transition: transform .32s cubic-bezier(.32, .72, 0, 1);
        font-family: var(--sf-font); color: var(--sf-ink);
    }
    body.sf-sheet-open .sf-sheet { transform: none; }
    body.sf-sheet-open .sf-sheet-backdrop { opacity: 1; pointer-events: auto; }
    body.sf-sheet-open { overflow: hidden; }
    .sf-sheet::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 26px 26px 0 0; background: var(--sf-rainbow); }
    .sf-sheet-grabber { width: 44px; height: 5px; border-radius: 3px; background: #c9cdd8; margin: 10px auto 2px; flex: none; }
    .sf-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 18px 6px; flex: none; }
    .sf-sheet-head h2 {
        margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -.5px;
        background: var(--sf-rainbow); -webkit-background-clip: text; background-clip: text; color: transparent;
    }
    .sf-sheet-close {
        width: 36px; height: 36px; border: 0; border-radius: 50%; background: #e7e9f0; color: #444a5a;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .sf-sheet-close .sf-ico { width: 18px; height: 18px; }
    .sf-sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px calc(18px + var(--sf-safe-bottom)); }

    .sf-me {
        display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px;
        background: #fff; box-shadow: 0 1px 2px rgba(20, 30, 60, .06); color: var(--sf-ink) !important; text-decoration: none !important;
    }
    .sf-me img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 5px transparent; background: var(--sf-rainbow); padding: 2px; }
    .sf-me span { display: flex; flex-direction: column; min-width: 0; }
    .sf-me strong { font-size: 17px; font-weight: 900; }
    .sf-me small { color: var(--sf-ink-soft); font-size: 13px; font-weight: 700; }

    .sf-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
    .sf-quick a {
        display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px;
        border-radius: 16px; background: #fff; color: var(--sf-ink) !important; font-weight: 800; font-size: 12.5px;
        text-decoration: none !important; box-shadow: 0 1px 2px rgba(20, 30, 60, .06);
    }
    .sf-quick a span { font-size: 22px; line-height: 1; }

    .sf-sheet-title { margin: 18px 4px 8px; font-size: 13px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; color: #8a90a2; }
    .sf-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; }
    .sf-apps a {
        display: flex; flex-direction: column; align-items: center; gap: 6px;
        color: #2a2f3d !important; font-weight: 800; font-size: 12px; text-align: center; text-decoration: none !important;
    }
    .sf-apps a span {
        display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 18px;
        font-size: 28px; line-height: 1; box-shadow: 0 4px 12px rgba(20, 30, 60, .1), inset 0 -2px 0 rgba(0, 0, 0, .04);
        transition: transform .12s ease;
    }
    .sf-apps a:active span, .sf-quick a:active, .sf-me:active { transform: scale(.93); }
    /* Soft rainbow of tile colours, cycling through the brand hues */
    .sf-apps a:nth-child(8n+1) span { background: linear-gradient(145deg, #ffe1e1, #ffc9c9); }
    .sf-apps a:nth-child(8n+2) span { background: linear-gradient(145deg, #ffecd6, #ffd8a8); }
    .sf-apps a:nth-child(8n+3) span { background: linear-gradient(145deg, #f6f9d0, #e9f09a); }
    .sf-apps a:nth-child(8n+4) span { background: linear-gradient(145deg, #dcf8dc, #b9efb7); }
    .sf-apps a:nth-child(8n+5) span { background: linear-gradient(145deg, #d8f7f6, #aeeeec); }
    .sf-apps a:nth-child(8n+6) span { background: linear-gradient(145deg, #dbeafe, #b6d4fb); }
    .sf-apps a:nth-child(8n+7) span { background: linear-gradient(145deg, #e8ddff, #d0bcfd); }
    .sf-apps a:nth-child(8n+8) span { background: linear-gradient(145deg, #fde0f7, #f9bdee); }

    .sf-list { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(20, 30, 60, .06); }
    .sf-list a, .sf-list button {
        display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: none; text-align: left;
        color: var(--sf-ink) !important; font: 800 15px var(--sf-font); text-decoration: none !important;
    }
    .sf-list a + a, .sf-list a + button, .sf-list button + a { border-top: 1px solid #eef0f4; }
    .sf-list a:active, .sf-list button:active { background: #f2f4f8; }
    .sf-list .sf-ico { width: 20px; height: 20px; color: #5b6275; }
    .sf-list [hidden] { display: none; }
    .sf-list .sf-danger, .sf-list .sf-danger .sf-ico { color: #e5364d !important; }
    .sf-sheet-foot { margin: 16px 0 4px; text-align: center; color: #9aa0b1; font-size: 12px; font-weight: 700; }
    .sf-sheet-foot a { color: #7a8196 !important; }
}

/* ─── Install prompt (phones only, once, not when already installed) ─── */
.app-install {
    position: fixed; left: 12px; right: 12px; z-index: 1070;
    bottom: calc(var(--sf-bar-h) + var(--sf-safe-bottom) + 12px);
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border-radius: 20px; background: #fff; box-shadow: 0 18px 40px rgba(12, 10, 30, .25);
    font-family: var(--sf-font); color: var(--sf-ink); animation: sf-slide-up .25s ease;
}
.app-install img { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; }
.app-install .app-install-text { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; line-height: 1.35; color: #4a5064; }
.app-install .app-install-text strong { display: block; font-size: 15px; font-weight: 900; color: var(--sf-ink); }
.app-install button { border: 0; border-radius: 12px; font: 800 13px var(--sf-font); cursor: pointer; min-height: 40px; }
.app-install .app-install-go { padding: 0 16px; color: #fff; background: linear-gradient(90deg, #ff4d4d, #ff9a00, #1c7fee, #ba0cf8); }
.app-install .app-install-close { width: 36px; background: #eef0f5; color: #555c70; font-size: 18px; }
@keyframes sf-slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (display-mode: standalone) {
    .app-install { display: none !important; }
    .sf-appbar, .sf-tabbar { -webkit-user-select: none; user-select: none; }
}

/* ── Desktop /home three columns (blog/base.html .sf-3col): fluid grid instead of fixed Bootstrap cols,
   so the sidebars never spill off the right edge when the window is resized ── */
/* left and right columns are always the same width, growing with the window (220px on a 1280 laptop, 290px max) */
.sf-3col { --sf-side: clamp(200px, 17vw, 290px); display: grid !important; grid-template-columns: var(--sf-side) minmax(0, 1fr) var(--sf-side);
    gap: clamp(14px, 1.4vw, 24px); margin: 0 !important; align-items: start; }
.sf-3col > [class*="col-"] { max-width: none !important; width: auto !important; flex: none !important; padding: 0 !important; min-width: 0; }
.sf-3col > [class*="col-"] > .content-section { max-width: 100%; overflow-wrap: anywhere; }
.sf-3col .sidebar { width: auto !important; margin-left: 0 !important; }
.sf-3col .calendar-widget { margin-left: 0 !important; max-width: 100%; padding: 12px 10px !important; }
.sf-3col img, .sf-3col video, .sf-3col iframe, .sf-3col select, .sf-3col table, .sf-3col input, .sf-3col textarea, .sf-3col embed, .sf-3col object { max-width: 100% !important; }
.sf-3col video, .sf-3col img { height: auto; }
/* ...but avatars stay perfect circles whatever the photo's shape: square box, photo cropped to fill it */
.sf-3col img.rounded-circle, .sf-3col img.posteds-img, .sf-3col img[data-ini], .sf-3col .imground, .sf-3col .comment-profiles {
    aspect-ratio: 1 / 1; height: auto; object-fit: cover; border-radius: 50%; }
.sf-3col .content-section h2 { font-size: clamp(18px, 1.6vw, 26px); overflow-wrap: anywhere; }
/* below 1200px the app layout takes over (app bars, centred feed, sidebars hidden): one column */
@media (max-width: 1199.98px) {
    .sf-3col { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* ── Desktop /home status box (home.html #configname): avatar and input centred on one line ── */
#configname { display: flex !important; align-items: center; gap: 12px; margin: 12px 0; padding: 12px 14px; border-radius: 18px; background: #fff;
    box-shadow: 0 1px 2px rgba(20, 30, 60, .05), 0 6px 20px rgba(20, 30, 60, .06); }
#configname > img { flex: none; width: 52px !important; height: 52px !important; margin: 0 !important; border-radius: 50%; object-fit: cover; }
#configname > input { flex: 1; min-width: 0; height: 52px; margin: 0 !important; padding: 0 20px !important; border: 0; border-radius: 999px;
    background: #f0f2f6; font: 700 16px var(--sf-font, sans-serif); color: #1c1f2b; cursor: pointer; outline: none; transition: background .15s; }
#configname > input:hover { background: #e7eaf0; }
#configname > br { display: none; }
#configname > .sf-ini { width: 52px; height: 52px; margin: 0 !important; }

/* ── Initials avatar ({% avatar_html %} in blog/templatetags/app_extras.py; app.js swaps in the same for broken photos).
   Fills whatever avatar box it sits in; the letters scale with the box (container units). ── */
.sf-ini { container-type: inline-size; display: grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none;
    background: linear-gradient(135deg, hsl(var(--h, 260) 85% 62%), hsl(calc(var(--h, 260) + 50) 85% 55%)); }
:where(.sf-ini) { width: 100%; height: 100%; aspect-ratio: 1; }   /* zero specificity: any context size below wins */
:where(.sf-ini[style*="--sz"]) { width: var(--sz); height: var(--sz); }   /* the size a template asked for - still loses to any page rule */
.sf-ini b { color: #fff; font-family: var(--sf-font, 'Nunito', system-ui, sans-serif); font-weight: 900; font-size: 38cqi; line-height: 1; letter-spacing: .02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
/* avatars sit inside profile links, and a link's underline runs through its children - it drew a line under the
   initials (composer, top-right corner). The underline has to come off the link itself. */
a:has(> .sf-ini), a:has(> .sf-ini):hover, a:has(> .sf-ini):focus, a .sf-ini, .sf-ini b { text-decoration: none !important; }
.pp-ring .sf-ini { border: 3px solid #fff; }

/* initials circle in each avatar spot (same size and frame the photo would have) */
.ft-me .sf-ini, .pf-compose .sf-ini { width: 44px; height: 44px; }
.ft-ring .sf-ini, .st-ring .sf-ini { border: 3px solid #fff; }
.pc-avatar .sf-ini { border: 2px solid #fff; }
.st-who .sf-ini { width: 38px; height: 38px; box-shadow: 0 0 0 2px #fff; }
.ms-av-big .sf-ini { border: 3px solid #fff; }
.pf-friends .sf-ini { width: 100%; height: auto; aspect-ratio: 1; border-radius: 16px; }
.sf-me .sf-ini { width: 52px; height: 52px; box-shadow: 0 0 0 3px #fff; }
.sf-ini.pc-cav b { font-size: 36cqi; }

/* /home on laptops & desktops only: content sits just under the top bar (10px gap) instead of ~47px.
   Other pages keep their spacing; the marker lives in blog/templates/blog/home.html. */
@media (min-width: 1200px) {
    body:has(.sf-home-page) { margin-top: 0 !important; }
    body:has(.sf-home-page) main[role="main"] { margin-top: 70px !important; }   /* 60px bar + 10px */
}

/* "People you may know" sidebars on the laptop home (blog/my_row.html, blog/base.html): initials fill the 100px circle */
.sf-ini.posteds-img { width: 100px; height: 100px; margin: 12px auto 0; }

/* ── Top & bottom bars: the site's vivid rainbow, one full rainbow across every bar, always flowing ──
   The old .bg-steel / .navbar-bottom background (static/blog/main.css) packs ~1,090 colour stops into a 17000%-wide
   strip, so at times 5-6 random, muddy shades crowd a bar. Here every bar always shows a bright, HealthTeky-style rainbow
   (sapphire, azure, turquoise; emerald, spring green; marigold, tangerine; coral rose, fuchsia; orchid, iris) spread evenly across its width, gliding sideways
   at a calm steady pace. The strip is two identical rainbows (200% wide) moved by exactly one width per cycle, so it
   loops seamlessly. static/app/bars.js sets --sf-rainbow-delay from the clock so the top and bottom bars match and a
   new page carries on where the last one was. */
@keyframes sf-rainbow-flow { from { background-position: 100% 0; } to { background-position: 0% 0; } }
.bg-steel, .navbar-bottom, .sf-appbar, .sf-tabbar, .sfm-head, .sf-rainbow-text {
    background: linear-gradient(90deg, #2f6bff 0.00%, #0a8cff 4.55%, #00b4d0 9.09%, #12b886 13.64%, #4fcf3a 18.18%, #f4b400 22.73%, #ff7b25 27.27%, #ff4f6d 31.82%, #f03e9b 36.36%, #c44ee6 40.91%, #7b5cff 45.45%, #2f6bff 50.00%, #0a8cff 54.55%, #00b4d0 59.09%, #12b886 63.64%, #4fcf3a 68.18%, #f4b400 72.73%, #ff7b25 77.27%, #ff4f6d 81.82%, #f03e9b 86.36%, #c44ee6 90.91%, #7b5cff 95.45%, #2f6bff 100.00%) !important;
    background-size: 200% 100% !important;
    animation: sf-rainbow-flow 30s linear infinite !important;
    animation-delay: var(--sf-rainbow-delay, 0s) !important;
}
@media (prefers-reduced-motion: reduce) {
    .bg-steel, .navbar-bottom, .sf-appbar, .sf-tabbar, .sfm-head, .sf-rainbow-text { animation-duration: 180s !important; }
}
/* a soft shadow keeps white labels and icons readable on the light bands (yellow, cyan) */
.bg-steel, .navbar-bottom, .sf-appbar, .sf-tabbar { text-shadow: 0 1px 2px rgba(0, 0, 0, .38), 0 0 8px rgba(0, 0, 0, .12); }
.sf-appbar svg, .sf-tabbar svg { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .38)); }

/* Desktop top bar: Post · Edit · Logout · your name · your photo float to the right edge. The template marks the main
   menu .mr-auto (Bootstrap 4), but Bootstrap 5 is also loaded and renamed that utility, so it computed to 0 and the
   right-hand group sat straight after "More". */
@media (min-width: 1200px) {
    .site-header nav.fixed-top.bg-steel .navbar-collapse > .navbar-nav:last-child { margin-left: auto !important; }   /* top bar only (the bottom bar is .bg-steel too) */
}

/* ── "More" mega menu (blog/templates/app/mega_menu.html, static/app/mega.js): laptops & desktops ──
   Opens downward from the top bar's More and upward from the bottom bar's More. The old plain dropdown lists are
   switched off at these widths (phones & tablets use the app's "All of Socialify" sheet instead). */
.sfm { display: none; }
@media (min-width: 1200px) {
    /* top bar row: centred from the first paint. The page only sets this in an inline <style> near the end of <body>, so
       while a long page was loading, "More >>" (which sits in a wrapper, unlike the plain links) rode ~10px high */
    .site-header .navbar-nav { flex-direction: row !important; align-items: center !important; }
    .site-header .navbar-nav > .dropdown { display: flex; align-items: center; }
    .site-header .navbar-nav .dropbtn:not(:has(> i)) { line-height: inherit !important; vertical-align: middle; }
    /* also the bottom bars outside .site-header (blog/socialify.html, the logged-out home): their old list is otherwise
       hidden only by static/blog/dropdown.css, which arrives late, so while loading it took space and pushed "More" up */
    .site-header .dropdown-content, .site-header .dropdown-content-dow,
    .navbar-bottom .dropdown-content, .navbar-bottom .dropdown-content-dow { display: none !important; }
    .site-header .dropdown .dropbtn { cursor: pointer; }
    .site-header .dropdown .dropbtn[aria-expanded="true"] { background: rgba(255, 255, 255, .22) !important; border-radius: 12px; }

    .sfm { position: fixed; left: 50%; z-index: 6000; width: min(1180px, calc(100vw - 32px)); border-radius: 26px; overflow: hidden;
        background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
        box-shadow: 0 2px 6px rgba(20, 20, 60, .08), 0 30px 80px rgba(30, 20, 80, .30); font-family: var(--sf-font, 'Nunito', system-ui, sans-serif);
        transform: translateX(-50%); }
    .sfm.open { display: flex; flex-direction: column; }
    .sfm.down { top: 70px; max-height: calc(100vh - 150px); animation: sfm-down .26s cubic-bezier(.2, .8, .2, 1); }
    .sfm.up { bottom: 70px; max-height: calc(100vh - 150px); flex-direction: column-reverse; animation: sfm-up .26s cubic-bezier(.2, .8, .2, 1); }
    @keyframes sfm-down { from { opacity: 0; transform: translate(-50%, -14px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0); } }
    @keyframes sfm-up { from { opacity: 0; transform: translate(-50%, 14px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0); } }

    .sfm-head { flex: none; display: flex; align-items: center; gap: 14px; padding: 18px 22px; color: #fff; }
    .sfm-head > div { display: flex; flex-direction: column; margin-right: auto; }
    .sfm-head b { font-size: 24px; font-weight: 900; letter-spacing: -.4px; }
    .sfm-head small { font-size: 14px; font-weight: 800; opacity: .95; }
    .sfm-cta { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; background: rgba(255, 255, 255, .95);
        color: #3b1f8f !important; text-decoration: none !important; font-weight: 900; font-size: 14.5px; text-shadow: none;
        box-shadow: 0 6px 16px rgba(0, 0, 0, .15); transition: transform .12s; }
    .sfm-cta:hover { transform: translateY(-1px); }
    .sfm-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .25); color: #fff; font-size: 16px; font-weight: 900; cursor: pointer; }
    .sfm-x:hover { background: rgba(255, 255, 255, .4); }

    .sfm-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 18px; padding: 18px 20px 20px; overflow-y: auto; min-height: 0; }
    .sfm-col { --t1: #2f6bff; --t2: #00b4d0; --tint: #eef3ff; min-width: 0; }
    .sfm-c2 { --t1: #12b886; --t2: #4fcf3a; --tint: #eafbf1; }
    .sfm-c3 { --t1: #f4b400; --t2: #ff7b25; --tint: #fff6e6; }
    .sfm-c4 { --t1: #ff4f6d; --t2: #c44ee6; --tint: #fff0f5; }
    .sfm-c5 { --t1: #f03e9b; --t2: #7b5cff; --tint: #f6f0ff; }
    .sfm-pv { font-style: normal; font-size: 10.5px; font-weight: 900; padding: 1px 7px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, #f03e9b, #7b5cff); vertical-align: 2px; }
    .sfm-col h3 { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; font-size: 16px; font-weight: 900; color: #1c1f2b; letter-spacing: .2px; }
    .sfm-col h3 span { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 18px;
        background: linear-gradient(135deg, var(--t1), var(--t2)); box-shadow: 0 6px 14px color-mix(in srgb, var(--t1) 35%, transparent); }
    .sfm-col a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; color: #1c1f2b !important; text-decoration: none !important;
        transition: background .15s, transform .15s; }
    .sfm-col a:hover, .sfm-col a:focus-visible { background: var(--tint); transform: translateX(3px); outline: none; }
    .sfm-col a i { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-size: 20px;
        background: var(--tint); transition: background .15s; }
    .sfm-col a:hover i { background: linear-gradient(135deg, var(--t1), var(--t2)); }
    .sfm-col a span { display: flex; flex-direction: column; min-width: 0; }
    .sfm-col a b { font-size: 15px; font-weight: 900; line-height: 1.2; }
    .sfm-col a small { font-size: 12.5px; font-weight: 700; color: #7a8196; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Rainbow wordmark (e.g. "Socialify" above the search bar on /search/): the bars' flowing rainbow, clipped to the letters.
   A faint drop shadow gives the light bands (sunflower, aqua) definition on a white page. */
.sf-rainbow-text {
    display: inline-block; padding: 0 .04em .06em;
    -webkit-background-clip: text !important; background-clip: text !important;
    color: transparent !important; -webkit-text-fill-color: transparent;
    font-family: var(--sf-font, 'Nunito', system-ui, sans-serif); font-weight: 900; letter-spacing: -.02em; line-height: 1.05;
    filter: drop-shadow(0 2px 4px rgba(40, 20, 90, .14));
}
.sf-search-logo { margin: 24px 0 18px !important; text-align: center; }
.sf-search-logo a { text-decoration: none !important; }
.sf-search-logo .sf-rainbow-text { font-size: clamp(56px, 9vw, 104px); }

/* ── Socialify logo (static/app/brand/logo-tile-128.png, from the logo artwork) left of the wordmark in the top bars ── */
.sf-logo { flex: none; width: 38px; height: 38px; display: block; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .25));
    transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.sf-logo-brand { display: inline-flex !important; align-items: center; gap: 9px; }
.sf-logo-brand:hover .sf-logo, .sf-brand:hover .sf-logo { transform: rotate(-8deg) scale(1.07); }
.sf-brand { gap: 9px; }
@media (max-width: 1199.98px) { .sf-brand .sf-logo { width: 34px; height: 34px; } }

/* ── The legacy "Search.." box (blog/templates/blog/socialify_search_*.html, on /home/, members, profiles) ──
   Its own <style> blocks sit in the page body and fight each other (rounded vs square, margin-top 0 vs 14px), so the
   box visibly re-shaped itself while the page streamed in. This file loads in <head>, before any of that markup, and
   !important keeps the late body rules and inline margins from moving it: one fixed shape from the first paint. */
form.example { display: flex !important; align-items: stretch !important; width: 100% !important; max-width: 100% !important; margin: 0 0 12px !important;
    border-radius: 14px !important; overflow: hidden !important; background: #f4f6fb !important; box-shadow: inset 0 0 0 1.5px #dfe3ee !important; }
form.example::after { content: none !important; display: none !important; }
form.example input[type=text] { flex: 1 1 auto !important; float: none !important; width: auto !important; min-width: 0 !important; height: 46px !important;
    margin: 0 !important; padding: 0 14px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
    color: #1c1f2b !important; font: 700 15px/46px var(--sf-font, 'Nunito', system-ui, sans-serif) !important; outline: none !important; }
form.example input[type=text]::placeholder { color: #8b93a7; }
form.example:focus-within { box-shadow: inset 0 0 0 2px #7b5cff, 0 0 0 4px rgba(123, 92, 255, .12) !important; }
form.example button { flex: 0 0 50px !important; float: none !important; width: 50px !important; height: 46px !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important; color: transparent !important; font-size: 0 !important; cursor: pointer;
    background: center / 20px 20px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"),
        linear-gradient(135deg, #2f6bff, #7b5cff) !important; }
form.example button:hover { filter: brightness(1.08); }
form.example button > i { display: none !important; }

/* ── Desktop bottom rainbow bar: exactly the top bar's height, every label centred on the bar's middle line ──
   Two markups exist: links straight inside div.navbar-bottom (blog/socialify.html, blog/index.html, the logged-out
   root page) and nav.navbar-bottom > .container > .navbar-nav (blog/base.html). Both become one centred flex row. */
@media (min-width: 1200px) {
    .navbar-bottom:not(.sf-tabbar) { display: flex !important; align-items: center !important; height: 60px !important; min-height: 60px !important; max-height: 60px !important;
        padding-top: 0 !important; padding-bottom: 0 !important; box-sizing: border-box; overflow: visible; }
    .navbar-bottom:not(.sf-tabbar) > .container, .navbar-bottom:not(.sf-tabbar) > .container > .navbar-collapse,
    .navbar-bottom:not(.sf-tabbar) .navbar-nav { display: flex !important; align-items: center !important; height: 60px !important; margin-top: 0 !important; margin-bottom: 0 !important; }
    .navbar-bottom:not(.sf-tabbar) > a, .navbar-bottom:not(.sf-tabbar) > .dropdown > .dropbtn, .navbar-bottom:not(.sf-tabbar) > div > a:only-child {
        display: inline-flex !important; align-items: center !important; height: auto; margin-top: 0 !important; margin-bottom: 0 !important;
        padding-top: 0 !important; padding-bottom: 0 !important; line-height: 1.2 !important; }
    .navbar-bottom:not(.sf-tabbar) > .dropdown, .navbar-bottom:not(.sf-tabbar) .navbar-nav > .dropdown { display: flex !important; align-items: center !important; height: 100%; margin: 0 !important; }
    .navbar-bottom:not(.sf-tabbar) .dropbtn { margin-top: 0 !important; margin-bottom: 0 !important; }   /* a late body rule adds button { margin-top: 14px } */
    /* blog/base.html wraps the More button in an extra padded <a class="nav-link">, which pushed it 15px down */
    .navbar-bottom:not(.sf-tabbar) .dropdown > a.nav-link:has(> .dropbtn > i) { display: flex !important; align-items: center !important; height: auto !important; padding: 0 !important; margin: 0 !important; }   /* icon bars only: text bars keep the labels' padding */
    .navbar-bottom:not(.sf-tabbar) .dropdown > a.nav-link:has(> .dropbtn) { display: flex !important; align-items: center !important; height: auto !important; margin: 0 !important; }
}

/* ── Text-style bars (blog/socialify.html, the logged-out root page): "More >>" looks exactly like its neighbours ──
   The icon-bar rules above shrink .dropbtn to 10.5-12px; a text-only More button (no <i> icon) instead inherits the
   same font, size, weight and shadow as the other labels in its bar, with the padding of its .nav-link wrapper. */
@media (min-width: 1200px) {
    .site-header .dropbtn:not(:has(> i)), .navbar-bottom:not(.sf-tabbar) .dropbtn:not(:has(> i)) {
        display: inline-flex !important; align-items: center !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important;
        font: inherit !important; letter-spacing: inherit !important; color: #fff !important; text-shadow: inherit !important; white-space: nowrap; cursor: pointer; }
    .site-header .dropbtn:not(:has(> i)):hover, .navbar-bottom:not(.sf-tabbar) .dropbtn:not(:has(> i)):hover { opacity: .85; }
    /* text bottom bar (div.navbar-bottom: links straight inside it): More's wrapper gets the same 8px side padding and
       1.2 line height as the other labels (it had 0 padding, so it hugged MyNotes, and an 18px line, so it rode ~1px high) */
    /* the exact type of the other bottom-bar labels, set explicitly: inheriting let a late stylesheet shrink it */
    div.navbar-bottom:not(.sf-tabbar) > .dropdown > a.nav-link,
    div.navbar-bottom:not(.sf-tabbar) > .dropdown > a.nav-link > .dropbtn {
        font: 700 16px/1.2 Arial, Helvetica, sans-serif !important; letter-spacing: normal !important; }
    div.navbar-bottom:not(.sf-tabbar) > .dropdown > a.nav-link { padding: 0 8px !important; }
}
/* narrower laptops: every text label in the top bar (More included) shrinks together so the row fits with Post/Settings/Logout/profile */
@media (min-width: 1200px) and (max-width: 1439.98px) {
    .site-header nav.fixed-top .nav-link:not(:has(> i)) { padding-left: 4px !important; padding-right: 4px !important; font-size: 13px !important; }
}
@media (min-width: 1200px) and (max-width: 1279.98px) {
    .site-header nav.fixed-top .nav-link:not(:has(> i)) { padding-left: 3px !important; padding-right: 3px !important; font-size: 12.5px !important; }
}
/* top bar (blog/base.html, /home/): More sits in an extra padded <a class="nav-link"> and gets a stray button { margin-top: 14px }
   from a late body style, so it dropped ~7px below its neighbours; flatten the wrapper and zero the margin, like the bottom bar */
@media (min-width: 1200px) {
    .site-header nav.fixed-top .dropdown > a.nav-link:has(> .dropbtn > i) { display: flex !important; align-items: center !important; height: auto !important;
        padding: 0 !important; margin: 0 !important; }   /* icon bar only; the text bar's More keeps the same padding as its neighbours */
    .site-header nav.fixed-top .dropdown > a.nav-link:has(> .dropbtn) { display: flex !important; align-items: center !important; margin: 0 !important; }
    .site-header nav.fixed-top .dropbtn { margin-top: 0 !important; margin-bottom: 0 !important; }
}

/* ═════════════ Post comments (feed + profiles: blog/home.html, users/iprofile.html, users/public_profile.html) ═════════════
   Messaging-style comment box: round avatar, soft pill input, round send button that lights up once there is text;
   comments as rounded bubbles with a small "Reply" link. The markup carries old inline styles (borders, margins),
   hence the !important. Reply boxes (static/blog/comment.js CommentReplyForm) get the same look. */
[id^="comments_of_post"] { background: transparent !important; padding: 10px 14px 4px !important; scrollbar-width: thin; }
[id^="comments_of_post"] .media { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; }
[id^="comments_of_post"] .media > img, [id^="comments_of_post"] .media > a > img,
[id^="comments_of_post"] .media > [data-ini], [id^="comments_of_post"] .media > a > [data-ini] {
    width: 34px !important; height: 34px !important; min-width: 34px; margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 50% !important; object-fit: cover; }
[id^="comments_of_post"] .media > a { margin: 0 !important; }
[id^="comments_of_post"] .media-body { min-width: 0; flex: 1; }
[id^="comments_of_post"] .media-body > b, [id^="comments_of_post"] #comment_track_count > b,
[id^="comments_of_post"] .media-body > p, [id^="comments_of_post"] #comment_track_count > p { display: block; }
[id^="comments_of_post"] #comment_track_count,
[id^="comments_of_post"] .media-body:not(:has(#comment_track_count)) {
    display: inline-block; max-width: 100%; padding: 8px 12px; border-radius: 18px; background: #f0f2f5; }
[id^="comments_of_post"] .media b { font: 800 13px/1.35 var(--sf-font, sans-serif); color: #1c1f2b; }
[id^="comments_of_post"] .media p { margin: 2px 0 0 !important; font: 500 14px/1.4 var(--sf-font, sans-serif) !important; color: #1c1f2b;
    overflow-wrap: anywhere; }
[id^="comments_of_post"] .mainbtn { margin: 3px 0 0 12px; padding: 0 !important; border: 0 !important; background: none !important;
    box-shadow: none !important; color: #65676b !important; font: 800 12px var(--sf-font, sans-serif) !important; cursor: pointer; }
[id^="comments_of_post"] .mainbtn:hover { text-decoration: underline; color: #1c1f2b !important; }
[id^="comments_of_post"] .media .media { margin-top: 8px !important; }

/* the comment / reply input bar */
[id^="comments_of_post"] + form.input-group,
[id^="comments_of_post"] form.input-group {
    display: flex !important; flex-wrap: nowrap !important; align-items: center; gap: 8px;
    margin: 0 !important; padding: 8px 14px 12px !important; border: 0 !important; background: transparent !important; }
[id^="comments_of_post"] form.input-group { padding: 6px 0 2px !important; }
[id^="comments_of_post"] + form.input-group .input-group-prepend,
[id^="comments_of_post"] form.input-group .input-group-prepend { margin: 0 !important; flex: none; }
[id^="comments_of_post"] + form.input-group .input-group-text:not(.btn),
[id^="comments_of_post"] form.input-group .input-group-text:not(.btn) {
    padding: 0 !important; border: 0 !important; background: none !important; border-radius: 0 !important; }
[id^="comments_of_post"] + form.input-group .input-group-prepend img,
[id^="comments_of_post"] + form.input-group .input-group-prepend [data-ini],
[id^="comments_of_post"] form.input-group .input-group-prepend img {
    width: 36px !important; height: 36px !important; margin: 0 !important; border-radius: 50% !important; object-fit: cover; }
[id^="comments_of_post"] + form.input-group > input.form-control,
[id^="comments_of_post"] form.input-group > input.form-control {
    flex: 1 1 auto; min-width: 0; height: 40px; margin: 0 !important; padding: 0 16px !important;
    border: 1px solid transparent !important; border-radius: 999px !important; background: #f0f2f5 !important;
    font: 500 15px var(--sf-font, sans-serif); color: #1c1f2b; box-shadow: none !important; transition: background .15s, border-color .15s, box-shadow .15s; }
[id^="comments_of_post"] + form.input-group > input.form-control::placeholder,
[id^="comments_of_post"] form.input-group > input.form-control::placeholder { color: #8a8d91; }
[id^="comments_of_post"] + form.input-group > input.form-control:focus,
[id^="comments_of_post"] form.input-group > input.form-control:focus {
    background: #fff !important; border-color: #c9d6ff !important; box-shadow: 0 0 0 3px rgba(47, 107, 255, .12) !important; outline: none; }
[id^="comments_of_post"] + form.input-group .input-group-append,
[id^="comments_of_post"] form.input-group .input-group-append {
    margin: 0 !important; border: 0 !important; flex: none; }
[id^="comments_of_post"] + form.input-group .input-group-append > .btn,
[id^="comments_of_post"] form.input-group .input-group-append > .btn {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 50% !important; background: #2f6bff !important; color: #fff !important; font-size: 15px;
    box-shadow: 0 4px 12px rgba(47, 107, 255, .3); cursor: pointer; transition: transform .12s, opacity .15s, box-shadow .15s; }
[id^="comments_of_post"] + form.input-group .input-group-append > .btn:hover,
[id^="comments_of_post"] form.input-group .input-group-append > .btn:hover { transform: scale(1.06); box-shadow: 0 6px 16px rgba(47, 107, 255, .38); }
[id^="comments_of_post"] + form.input-group .input-group-append > .btn i { margin-left: -2px; }
/* nothing typed yet: the send button waits quietly */
[id^="comments_of_post"] + form.input-group > input.form-control:placeholder-shown ~ .input-group-append > .btn,
[id^="comments_of_post"] form.input-group > input.form-control:placeholder-shown ~ .input-group-append > .btn {
    opacity: .45; box-shadow: none; pointer-events: none; }

/* Like / Dislike / Comment under each post: no underline, also on hover */
.card-footer .card-link, .card-footer .card-link a, .card-footer .card-link:hover, .card-footer .card-link a:hover,
.card-footer .card-link:focus, .card-footer .card-link a:focus { text-decoration: none !important; }

/* Post header: a little room between the author's photo and their name (the old mr-2/ml-2 come out as 0) */
.card-header .mr-2 > img.rounded-circle, .card-header .mr-2 > [data-ini].rounded-circle, .card-header .mr-2 > .sf-ini { margin-right: 12px !important; }   /* photo or initials: same gap */

/* Comment Edit / Delete (static/blog/comment.js, blog/comments.py): small grey links under the bubble, like Reply */
[id^="comments_of_post"] .sf-cmt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin: 3px 0 0 12px; }
[id^="comments_of_post"] .sf-cmt-actions button { padding: 0; border: 0; background: none; color: #65676b; cursor: pointer;
    font: 800 12px var(--sf-font, sans-serif); }
[id^="comments_of_post"] .sf-cmt-actions button:hover { color: #1c1f2b; text-decoration: underline; }
[id^="comments_of_post"] .sf-cmt-actions button.sf-danger { color: #d93025; }
[id^="comments_of_post"] .sf-cmt-confirm { display: inline-flex; align-items: center; gap: 12px; color: #1c1f2b; font: 700 12px var(--sf-font, sans-serif); }
[id^="comments_of_post"] .sf-cmt-actions + [id^="comment"] .mainbtn { margin-top: 2px; }
[id^="comments_of_post"] .sf-cmt-edit { margin: 2px 0 4px; }
[id^="comments_of_post"] .sf-cmt-edit input { width: 100%; height: 38px; padding: 0 14px; border: 1px solid #2f6bff; border-radius: 19px; outline: none;
    background: #fff; color: #1c1f2b; font: 500 14px var(--sf-font, sans-serif); box-shadow: 0 0 0 3px rgba(47, 107, 255, .15); box-sizing: border-box; }
[id^="comments_of_post"] .sf-cmt-edit-row { display: flex; align-items: center; gap: 12px; margin: 5px 0 0 12px; font: 600 12px var(--sf-font, sans-serif); color: #65676b; }
[id^="comments_of_post"] .sf-cmt-edit-row span { flex: 1; }
[id^="comments_of_post"] .sf-cmt-edit-row button { padding: 4px 12px; border: 0; border-radius: 999px; cursor: pointer; font: 800 12px var(--sf-font, sans-serif);
    background: #e4e6eb; color: #1c1f2b; }
[id^="comments_of_post"] .sf-cmt-edit-row button[type="submit"] { background: #2f6bff; color: #fff; }
[id^="comments_of_post"] .sf-cmt-err { margin: 4px 0 0 12px !important; color: #d93025 !important; font-size: 12px !important; }
/* Emoji button in desktop comment boxes - write, reply, edit (static/blog/comment.js, picker: static/app/emoji.js) */
button.sf-emo { flex: none; align-self: center; width: 38px; height: 38px; margin: 0 4px 0 0 !important; padding: 0 !important; border: 0 !important;
    border-radius: 50% !important; background: transparent !important; color: #65676b; cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; box-shadow: none !important; transition: background .15s, color .15s; }
button.sf-emo:hover, button.sf-emo:focus-visible { background: #f0f2f5 !important; color: #f4b400; outline: none; }
button.sf-emo svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
button.sf-emo svg .f { fill: currentColor; stroke: none; }
[id^="comments_of_post"] .sf-cmt-edit-line { display: flex; align-items: center; }
[id^="comments_of_post"] .sf-cmt-edit-line input { flex: 1; width: auto !important; min-width: 0; margin: 0 !important; }
/* ═════════════ Desktop top bar: one evenly spaced row that scales with the screen (blog/templates/app/desktop_bars.html) ═════════════
   Every link (the main menu, More, About and the right-hand group) is spread across the full width with equal gaps, and the
   icons, labels and profile photo scale smoothly with the window, so nothing is cut off at the right edge on any laptop or
   monitor. The links carry inline 38px icon sizes, hence the !important. Placed last so it wins over the older bar rules. */
@media (min-width: 1200px) {
    .site-header nav.fixed-top.bg-steel > .container { max-width: 100% !important; width: 100% !important; padding: 0 clamp(8px, 1vw, 20px) !important;
        display: flex !important; flex-wrap: nowrap !important; align-items: center !important; }
    .site-header nav.fixed-top.bg-steel .sf-logo-brand { flex: 0 0 auto; margin-right: clamp(6px, 1vw, 22px) !important; font-size: clamp(17px, 1.35vw, 26px) !important; }
    .site-header nav.fixed-top.bg-steel .sf-logo-brand .sf-logo { width: clamp(28px, 2vw, 38px) !important; height: clamp(28px, 2vw, 38px) !important; }
    .site-header nav.fixed-top.bg-steel .navbar-collapse { display: flex !important; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap !important;
        justify-content: space-between !important; align-items: center !important; }
    .site-header nav.fixed-top.bg-steel .navbar-collapse > .navbar-nav { display: contents !important; }   /* both groups share one evenly spaced row */
    .site-header nav.fixed-top.bg-steel .navbar-collapse .nav-link,
    .site-header nav.fixed-top.bg-steel .navbar-collapse .dropbtn:has(> i) {
        display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 2px;
        flex: 1 1 0; min-width: min-content; margin: 0 !important; padding: 6px clamp(1px, .25vw, 6px) !important; white-space: nowrap;
        font-size: clamp(9.5px, .72vw, 14px) !important; line-height: 1.1 !important; font-weight: 700; color: #fff !important; }
    .site-header nav.fixed-top.bg-steel .navbar-collapse .nav-link > i,
    .site-header nav.fixed-top.bg-steel .navbar-collapse .dropbtn > i { font-size: clamp(16px, 1.55vw, 30px) !important; line-height: 1 !important; margin: 0 !important;
        width: auto !important; min-width: 0 !important; height: auto !important; padding: 0 !important; text-align: center; }   /* an old .fa rule fixed some icons at 50px wide */
    .site-header nav.fixed-top.bg-steel .navbar-collapse .nav-link:has(> .dropdown) { padding: 0 !important; }
    .site-header nav.fixed-top.bg-steel .navbar-collapse .nav-link:has(> .dropdown) .dropbtn { width: 100%; }   /* More: its button carries the padding */
    .site-header nav.fixed-top.bg-steel .navbar-collapse .dropbtn:has(> i) { background: none !important; border: 0 !important; cursor: pointer; }
    .site-header nav.fixed-top.bg-steel .navbar-collapse > .navbar-nav > .dropdown { flex: 1 1 0; min-width: min-content; display: flex !important; justify-content: center; }   /* More: same slot as the rest */
    .site-header nav.fixed-top.bg-steel .navbar-collapse .td { flex: 0 0 auto; display: flex; align-items: center; }
    .site-header nav.fixed-top.bg-steel #p-link { width: clamp(34px, 2.5vw, 48px) !important; height: clamp(34px, 2.5vw, 48px) !important; }
}

/* "Preview" / "Staff" tag on menu items that only staff can see yet (app/shell.html, app/mega_menu.html) */
.sf-pv { display: block; font-style: normal; font-size: 10px; font-weight: 900; line-height: 1.4; margin-top: 2px; padding: 0 6px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, #f03e9b, #7b5cff); }
