.home-topbar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(320px, 560px) minmax(180px, 1fr);
    align-items: center;
}

.home-topbar .brand { justify-self: start; }
.home-topbar .compact-account { justify-self: end; margin-left: 0; }
.home-topbar .header-search {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
}

.home-topbar .header-search input {
    width: 100%;
    height: 42px;
    padding: 10px 16px 10px 43px;
    border-radius: 999px !important;
}

.search-leading-icon {
    position: absolute;
    z-index: 2;
    display: block;
    flex: 0 0 auto;
    left: 14px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.7;
    stroke-linecap: round;
    pointer-events: none;
}

.search-leading-icon .search-spark { stroke: var(--accent-2); }
.header-search:focus-within .search-leading-icon { stroke: var(--accent); }
.search-suggestions {
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: min(520px, calc(100vh - 90px));
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(203, 166, 247, .24);
    border-radius: 16px;
    background: #1e1e2e;
    box-shadow: 0 22px 55px rgba(17, 17, 27, .52);
}

.search-suggestions[hidden] { display: none; }
.suggestion-heading { padding: 8px 10px 4px; color: #7f849c; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.suggestion-heading:not(:first-child){margin-top:6px;padding-top:10px;border-top:1px solid rgba(127,132,156,.18)}
.suggestion-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; }
.suggestion-row:hover,.suggestion-row.active { background: var(--surface-hover); }
.suggestion-mark { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: rgba(203,166,247,.1); color: var(--accent); font-size: 11px; font-weight: 800; }
.suggestion-community .suggestion-mark{background:rgba(148,226,213,.11);color:#94e2d5;border:1px solid rgba(148,226,213,.16)}
.suggestion-post .suggestion-mark{background:rgba(203,166,247,.11);color:#cba6f7;border:1px solid rgba(203,166,247,.16)}
.suggestion-copy { min-width: 0; display: flex; flex-direction: column; }
.suggestion-copy strong,.suggestion-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-copy strong { color: var(--text); font-size: 12px; }
.suggestion-copy small { color: var(--muted); font-size: 10px; }
.suggestion-empty { margin: 0; padding: 17px 12px; color: var(--muted); font-size: 12px; text-align: center; }
.suggestion-all{display:flex;justify-content:center;margin-top:7px;padding:9px;border-top:1px solid rgba(127,132,156,.18);color:#94e2d5;font-size:11px;font-weight:750}
.rail-create-button { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0 0 14px; border: 1px solid rgba(203,166,247,.25); border-radius: 999px; background: var(--accent); color: #1e1e2e; font-weight: 800; }
.rail-create-button:hover { filter: brightness(1.05); box-shadow: 0 8px 24px rgba(203,166,247,.2); }
.rail-create-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

@media(max-width:880px){.home .home-topbar{grid-template-columns:auto minmax(220px,1fr) auto}.home .home-topbar .header-search{grid-column:2}.home .home-topbar .compact-account{grid-column:3}}
@media(max-width:680px){.home .home-topbar{grid-template-columns:auto 1fr}.home .home-topbar .compact-account{grid-column:2}}

/* Mobile shell polish: deliberate app-like proportions rather than desktop compression. */
@media(max-width:680px){
    .home .home-topbar{
        grid-template-columns:auto minmax(0,1fr) auto;
        gap:8px;
        min-height:64px;
        padding:9px 12px;
        border-bottom:1px solid rgba(127,132,156,.16);
        background:rgba(11,14,20,.96);
        backdrop-filter:blur(18px) saturate(1.15);
    }
    .home .home-topbar .brand{
        grid-column:1;
        min-width:38px;
        justify-content:center;
        position:relative;
        z-index:3;
    }
    .home .home-topbar .brand-name{display:none}
    .home .home-topbar .brand-mark{font-size:24px;letter-spacing:-.04em}
    .home .home-topbar .header-search{
        display:block;
        grid-column:2;
        min-width:0;
        overflow:visible;
    }
    .home .header-search input{
        height:44px;
        padding:10px 13px 10px 40px;
        border:1px solid rgba(127,132,156,.24);
        background:#161b25;
        color:var(--text);
        font-size:16px;
        box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
    }
    .home .header-search input::placeholder{color:#8b94a4;opacity:1}
    .home .header-search:focus-within input{
        border-color:rgba(203,166,247,.62);
        box-shadow:0 0 0 3px rgba(203,166,247,.10);
        outline:none;
    }
    .home .search-leading-icon{left:13px;width:19px;height:19px}
    .home .home-topbar .compact-account{grid-column:3;gap:6px}
    .home .notification-button,.home .account-chip{
        width:40px;
        height:40px;
        background:#151a23;
        border-color:rgba(127,132,156,.20);
    }
    .home .account-avatar{width:32px;height:32px}
    .home .account-popover-menu{top:66px}
    .home .search-suggestions{
        position:fixed;
        top:64px;
        left:10px;
        right:10px;
        max-height:calc(100vh - 86px);
        border-radius:18px;
    }

    .home .feed-header{
        top:64px;
        padding:0 10px 5px;
        margin-bottom:4px;
        border-bottom:1px solid rgba(127,132,156,.13);
        background:rgba(11,14,20,.95);
        backdrop-filter:blur(18px) saturate(1.12);
    }
    .home .feed-header-row{min-height:48px;align-items:center}
    .home .home-tabs{
        width:100%;
        display:grid;
        grid-template-columns:repeat(4,minmax(max-content,1fr));
        gap:0;
        overflow-x:auto;
        scrollbar-width:none;
    }
    .home .home-tabs::-webkit-scrollbar{display:none}
    .home .home-tabs a{
        position:relative;
        justify-content:center;
        min-height:46px;
        padding:11px 8px 10px;
        border-radius:0;
        background:transparent;
        box-shadow:none;
        color:#9ca5b5;
        font-size:14px;
        font-weight:700;
        letter-spacing:-.01em;
    }
    .home .home-tabs a::after{
        content:"";
        position:absolute;
        left:18%;
        right:18%;
        bottom:1px;
        height:2px;
        border-radius:999px;
        background:transparent;
        transform:scaleX(.55);
        transition:background .16s ease,transform .16s ease;
    }
    .home .home-tabs a.active{
        background:transparent;
        color:#e5ddff;
        box-shadow:none;
    }
    .home .home-tabs a.active::after{
        background:var(--accent);
        transform:scaleX(1);
    }
    .home .feed-context{
        padding:5px 5px 4px;
        color:#7d8798;
        font-size:12px;
        line-height:1.35;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .home .home-feed{gap:0}
    .home .feed-reason-row{
        min-height:34px;
        padding:0 16px;
        border-top:1px solid rgba(127,132,156,.08);
        background:#0e1219;
    }
    .home .feed-reason-row .feed-reason,.home .feed-hide{font-size:12px}
    .home .post-card{
        border-top:0;
        border-bottom:1px solid rgba(127,132,156,.14);
        background:#10151f;
    }
    .home .post-card .post-link h3{letter-spacing:-.018em}
    .home .post-card .actions>a,
    .home .post-card .actions>.account-button,
    .home .post-card .actions form>.account-button{
        border:1px solid rgba(127,132,156,.14);
        border-radius:999px;
        background:#151b25;
        color:#a7b0bf;
    }
    .home .post-card .actions>a:active,
    .home .post-card .actions>.account-button:active,
    .home .post-card .actions form>.account-button:active{
        transform:scale(.97);
        background:#1b2230;
    }

}

@media(max-width:390px){
    .home .home-topbar{gap:6px;padding-inline:9px}
    .home .notification-button{display:none}
    .home .home-topbar .brand{min-width:34px}
    .home .home-tabs a{font-size:13.5px;padding-inline:6px}
}
