#home-screen .hs-presets {
    --ps-tint-start:     #4a4f56;
    --ps-tint-film:      #2b6f8f;
    --ps-tint-ai_static: #6b4aa8;
    --ps-tint-ai_motion: #2f8a68;
}

#home-screen .hs-header.hs-header-tabs {
    padding-bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

#home-screen .hs-tabs {
    display: flex;
    align-items: flex-end;
    gap: 26px;
}

#home-screen .hs-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: -1px;
    padding: 4px 0 14px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--ui-text-dim);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.14s, border-color 0.14s;
}

#home-screen .hs-tab:hover  { color: var(--ui-text); }
#home-screen .hs-tab.active { color: #fff; border-bottom-color: var(--ui-accent); }
#home-screen .hs-tab:focus-visible { outline: 1px solid var(--ui-border-focus); outline-offset: 2px; }

#home-screen .hs-tab-count {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
    padding: 1px 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ui-text-dim);
}
#home-screen .hs-tab.active .hs-tab-count {
    background: var(--ui-accent-glow);
    color: var(--ui-accent-hover);
}

#home-screen .hs-presets {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
}

#home-screen .ps-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 24px 4px;
}

#home-screen .ps-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px 5px 12px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ui-text-dim);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.14s, border-color 0.14s, color 0.14s;
}
#home-screen .ps-chip:hover  { color: var(--ui-text); background: rgba(255, 255, 255, 0.07); }
#home-screen .ps-chip.active { color: #fff; background: var(--ui-accent-glow); border-color: var(--ui-accent); }
#home-screen .ps-chip:focus-visible { outline: 1px solid var(--ui-border-focus); outline-offset: 2px; }
#home-screen .ps-chip-count { font-size: 10px; opacity: 0.7; letter-spacing: 0; }

#home-screen .ps-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    grid-auto-rows: max-content;
    gap: 14px;
    padding: 12px 24px 28px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
#home-screen .ps-grid::-webkit-scrollbar { width: 8px; }
#home-screen .ps-grid::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }

#home-screen .ps-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--ui-radius);
    color: var(--ui-text);
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.14s, border-color 0.14s, transform 0.12s, box-shadow 0.14s;
}
#home-screen .ps-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
    box-shadow: var(--ui-shadow-sm);
}
#home-screen .ps-card:active { transform: translateY(0); }
#home-screen .ps-card:focus-visible { outline: 1px solid var(--ui-border-focus); outline-offset: 2px; }

#home-screen .ps-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(174 62% 40%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
    isolation: isolate;
}
#home-screen .ps-thumb::before {
    content: '';
    position: absolute;
    inset: -12%;
    z-index: 0;
    background:
        radial-gradient(ellipse 62% 78% at var(--ps-x1, 20%) var(--ps-y1, 60%), hsl(146 72% 56% / 0.95), transparent 62%),
        radial-gradient(ellipse 56% 70% at var(--ps-x2, 85%) var(--ps-y2, 20%), hsl(216 92% 64% / 0.85), transparent 60%),
        radial-gradient(ellipse 80% 64% at var(--ps-x3, 55%) var(--ps-y3, 100%), hsl(176 84% 62% / 0.95), transparent 64%),
        radial-gradient(circle at var(--ps-rx, 110%) var(--ps-ry, 115%),
            transparent 46%, hsl(205 90% 66% / 0.55) 47%, hsl(160 75% 58% / 0.45) 53%, transparent 66%),
        linear-gradient(var(--ps-a, 135deg), hsl(172 70% 46%), hsl(188 62% 48%) 55%, hsl(168 58% 44%));
    filter: blur(10px) saturate(1.15) hue-rotate(var(--ps-hue, 0deg));
    transform: translateZ(0);
}
#home-screen .ps-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.32;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 160px 160px;
}
#home-screen .ps-card:hover .ps-thumb::before { filter: blur(9px) saturate(1.25) hue-rotate(var(--ps-hue, 0deg)); }
#home-screen .ps-cat-start     { --ps-tint: var(--ps-tint-start); }
#home-screen .ps-cat-film      { --ps-tint: var(--ps-tint-film); }
#home-screen .ps-cat-ai_static { --ps-tint: var(--ps-tint-ai_static); }
#home-screen .ps-cat-ai_motion { --ps-tint: var(--ps-tint-ai_motion); }

#home-screen .ps-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
#home-screen .ps-thumb.has-img::before, #home-screen .ps-thumb.has-img::after { display: none; }
#home-screen .ps-thumb-cat, #home-screen .ps-nodes { z-index: 2; }

#home-screen .ps-thumb-cat {
    position: absolute;
    left: 10px;
    top: 9px;
    padding: 2px 7px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--ui-bg-deep) 55%, transparent);
    color: rgba(255, 255, 255, 0.85);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

#home-screen .ps-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 11px 12px 12px;
    flex: 1;
}
#home-screen .ps-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.1px;
}
#home-screen .ps-desc {
    font-size: 11px;
    line-height: 1.45;
    color: var(--ui-text-dim);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
#home-screen .ps-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 10px;
    color: var(--ui-text-muted);
}
#home-screen .ps-for {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
#home-screen .ps-nodes {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: inline-flex;
    gap: 3px;
}
#home-screen .ps-node-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: var(--ui-radius-xs);
    background: color-mix(in srgb, var(--ui-bg-deep) 60%, transparent);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
#home-screen .ps-node-ic svg { display: block; }
#home-screen .hs-presets.is-filtered .ps-thumb-cat { display: none; }

#home-screen .ps-ask {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--ui-bg-deep) 55%, transparent);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: hs-fade-in 0.15s ease-out;
}
#home-screen .ps-ask-box {
    width: min(460px, 92%);
    background: var(--ui-bg);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow);
    color: var(--ui-text);
    animation: hs-pop-in 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
#home-screen .ps-ask-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px 6px 20px;
}
#home-screen .ps-ask-x { padding: 0 !important; }
#home-screen .ps-ask-body { padding: 14px 20px 18px; }

@media (min-width: 721px) and (max-width: 900px) {
    #home-screen .hs-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    #home-screen .hs-tabs::-webkit-scrollbar { display: none; }
    #home-screen .hs-tab { flex: none; }
}

@media (max-width: 720px) {
    #home-screen .hs-header.hs-header-tabs {
        padding: 0;
        display: block;
    }
    #home-screen .hs-tabs {
        gap: 16px;
        padding: 0 12px;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        white-space: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
    #home-screen .hs-tabs::-webkit-scrollbar { display: none; }
    #home-screen .hs-tab { flex: none; font-size: 13px; padding: 4px 0 10px; }
    #home-screen .hs-tab-count { font-size: 11px; }
    #home-screen .ps-filters { padding: 10px 14px 0; }
    #home-screen .ps-grid { padding: 10px 14px 20px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
