.browse-site-toolbar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: .4rem; min-height: 56px; padding: .25rem max(.5rem,env(safe-area-inset-right)) .25rem max(.5rem,env(safe-area-inset-left)); background: var(--page); }
.browse-site-toolbar .social-tabs { display: flex; flex-wrap: nowrap; gap: .15rem; margin: 0; min-width: 0; overflow-x: auto; }
.browse-site-toolbar .social-tabs a { min-height: 44px; padding: .45rem .55rem; display: inline-flex; align-items: center; white-space: nowrap; }
.browse-site-actions { display: flex; flex-shrink: 0; gap: .25rem; }
.browse-site-actions button { background: var(--surface); }
.browse-shell .explore-toolbar { top: 64px; z-index: 10; margin: 0; padding: .4rem 0; }
.browse-shell .explore-heading { margin: 0; }
.browse-shell .explore-heading h1, .browse-shell .explore-heading h2 { font: 600 1rem system-ui; }
.browse-shell #content > main > .community-nav, .browse-shell #content > main:not(.profile-page) > .social-tabs { display: none; }
.swipe-shell .browse-site-toolbar { position: fixed; inset: 0 0 auto; padding-top: max(.25rem,env(safe-area-inset-top)); background: color-mix(in srgb,var(--surface) 96%,transparent); }
.browse-shell .swipe-mode > .explore-toolbar { top: calc(64px + env(safe-area-inset-top,0px)); background: none; z-index: 22; }
.browse-shell .swipe-mode .browse-error { top: calc(124px + env(safe-area-inset-top,0px)); }
.browse-shell .swipe-card .stitch-controls { top: calc(124px + env(safe-area-inset-top,0px))!important; }
.back-to-top { position: fixed; right: max(1rem,env(safe-area-inset-right)); bottom: max(1rem,env(safe-area-inset-bottom)); z-index: 15; background: var(--surface); box-shadow: 0 2px 10px #0004; }
.back-to-top[hidden] { display: none; }
.filter-panel .tag-filters { margin-top: 1rem; }
.for-you-tools { display: flex; gap: .5rem; }
.swipe-mode > .for-you-history { display: flex; position: fixed; bottom: max(.25rem,env(safe-area-inset-bottom)); left: max(.5rem,env(safe-area-inset-left)); max-width: calc(100% - 1rem); align-items: center; flex-wrap: wrap; gap: .25rem .6rem; padding: .15rem .4rem; background: var(--surface); color: var(--text); font-size: .75rem; z-index: 24; }
.for-you-history p { display: flex; align-items: center; gap: .3rem; margin: 0; }
.for-you-history p .icon { width: 1rem; height: 1rem; }
.for-you-history summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; text-decoration: underline; }
.for-you-history details > div { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.for-you-history button, .for-you-history a { min-height: 44px; display: inline-flex; align-items: center; font-size: inherit; }
.for-you-page:has(.for-you-history) .swipe-nav { bottom: calc(60px + env(safe-area-inset-bottom,0px)); }
.for-you-history details[open] > div { position: absolute; bottom: 100%; left: 0; padding: .5rem; background: var(--surface); width: max-content; max-width: 100%; }
@media(max-width: 480px) {
    .browse-site-toolbar .social-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); flex: 1; gap: 0; overflow: visible; }
    .browse-site-toolbar .social-tabs a { flex-direction: column; justify-content: center; gap: .15rem; font-size: .75rem; padding: .25rem .1rem; }
    .browse-site-toolbar { gap: .1rem; }
    .browse-site-actions { gap: 0; }
}

.browse-shell #content > .showcase-page > .community-nav { display: none; }

.browse-shell .for-you-page .swipe-card .stitch-controls{top:calc(64px + .4rem + env(safe-area-inset-top,0px))!important;left:calc(60px + env(safe-area-inset-left,0px))!important}

.browse-site-actions .icon-btn{background:transparent;border:0;box-shadow:none}

.browse-shell .view-switch .social-btn[aria-pressed=true] { color:var(--accent); background:var(--surface); box-shadow:inset 0 0 0 1px var(--accent); }
.browse-shell .view-switch .grid-view-btn .icon { stroke-width:2.2; }
.browse-shell .design-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:.75rem; }
.browse-shell .design-grid .design-thumb canvas { height:clamp(112px,24vw,200px); }
@media (min-width:22rem) and (max-width:48rem) {
    .browse-shell .design-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:22rem) {
    .browse-shell .design-grid .design-thumb canvas { height:clamp(160px,55vw,220px); }
}

.swipe-controls-hint { position: fixed; left: 50%; bottom: max(1.5rem,env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; width: max-content; max-width: calc(100% - 2rem); padding: .65rem 1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--surface); color: var(--text); text-align: center; pointer-events: none; }
.swipe-actions .owner-design-open { max-width: 5rem; }
