body.layout-browse {
    --browse-safe-b: env(safe-area-inset-bottom, 0px);
    --browse-context-h: clamp(3.75rem, 9vh, 4.5rem);
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
}

html:has(body.layout-browse) {
    overflow: hidden;
    height: 100%;
}

body.layout-browse .topbar {
    flex: 0 0 auto;
}

body.layout-browse .site-footer {
    display: none;
}

body.layout-browse .main,
body.layout-browse .browse-main {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    height: auto;
    padding: 0;
    max-width: none;
    width: 100%;
    overflow: hidden;
}

body.layout-browse .topbar__row {
    min-height: 58px;
    padding: 0.25rem 0;
}

body.layout-browse .topbar__brand img {
    width: 46px;
    height: 46px;
}

.browse-view {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding: clamp(0.55rem, 1.6vh, 0.9rem) 0 max(1rem, calc(0.65rem + var(--browse-safe-b)));
    gap: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.browse-swiper-stack {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.browse-back {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.42rem 0.85rem 0.42rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 12, 18, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.18s;
    flex-shrink: 0;
}

.browse-back svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin-left: -0.05rem;
    transition: transform 0.18s;
}

.browse-back:hover {
    color: var(--accent);
    border-color: rgba(200, 245, 66, 0.45);
    background: rgba(18, 20, 10, 0.92);
    transform: translateY(-1px);
}

.browse-back:hover svg {
    transform: translateX(-2px);
}

.browse-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.browse-stage {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 clamp(0.15rem, 1vw, 0.35rem);
}

.browse-stage-col {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    width: 100%;
}

.browse-context-bar {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--browse-context-h);
    padding: 0 clamp(0.65rem, 2.5vw, 1.15rem);
    margin-bottom: 0.15rem;
}

.browse-context-bar::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(520px, 78%);
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(200, 245, 66, 0.28) 20%,
        rgba(200, 245, 66, 0.28) 80%,
        transparent
    );
    pointer-events: none;
}

.browse-context-bar .browse-back {
    position: absolute;
    left: clamp(0.65rem, 2.5vw, 1.15rem);
    top: 50%;
    transform: translateY(-50%);
}

.browse-context-bar .browse-back:hover {
    transform: translateY(calc(-50% - 1px));
}

.browse-context-title {
    text-align: center;
    padding: 0.45rem 1.15rem 0.5rem;
    border-radius: 14px;
    border: 1px solid rgba(200, 245, 66, 0.28);
    background: linear-gradient(
        165deg,
        rgba(200, 245, 66, 0.12) 0%,
        rgba(10, 10, 14, 0.72) 55%,
        rgba(6, 6, 10, 0.85) 100%
    );
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    max-width: min(20rem, calc(100vw - 8.5rem));
}

.browse-context-title[hidden] {
    display: none !important;
}

.browse-context-kicker {
    display: block;
    margin: 0 0 0.12rem;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(168, 168, 179, 0.95);
}

.browse-category {
    margin: 0;
    padding: 0;
    font-size: clamp(0.95rem, 2.35vh, 1.12rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #f4f4f6;
    text-wrap: balance;
}

.browse-category::before {
    content: "";
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.4rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(200, 245, 66, 0.65);
    vertical-align: 0.05em;
}

.browse-arrow {
    position: absolute;
    top: calc((100% + var(--browse-context-h)) / 2);
    transform: translateY(-50%);
    z-index: 4;
    background: rgba(5, 5, 8, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(200, 245, 66, 0.15);
    border-radius: 14px;
    color: var(--accent);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 200;
    line-height: 1;
    cursor: pointer;
    padding: 0.3rem 0.55rem;
    min-width: 2.5rem;
    opacity: 0.95;
    transition: opacity 0.15s, transform 0.15s, background 0.15s;
    font-family: var(--font);
}

.browse-arrow[data-browse-prev] {
    left: clamp(0.25rem, 2vw, 1rem);
}

.browse-arrow[data-browse-next] {
    right: clamp(0.25rem, 2vw, 1rem);
}

.browse-arrow:hover:not(:disabled) {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
    background: rgba(200, 245, 66, 0.14);
}

.browse-arrow:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.browse-media {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    min-height: 0;
    max-width: 100%;
    margin: 0 auto;
    padding: 0.1rem clamp(1.55rem, 3.2vw, 2.35rem) 0;
    box-sizing: border-box;
}

.browse-photo-shell {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
}

.browse-photo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    border-radius: 10px;
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.55));
}

.browse-photo[hidden],
.browse-placeholder[hidden] {
    display: none !important;
}

.browse-placeholder {
    text-align: center;
    padding: 1.25rem 1rem;
    max-width: min(22rem, 100%);
    border: 2px dashed rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    text-wrap: balance;
}

.browse-placeholder-text {
    margin: 0 0 0.85rem;
    font-weight: 600;
    line-height: 1.45;
    text-wrap: balance;
}

.browse-br-mobile {
    display: none;
}

@media (max-width: 420px) {
    .browse-br-mobile {
        display: inline;
    }
}

.browse-rating {
    flex: 0 0 auto;
    width: min(540px, 100%);
    max-width: 100%;
    margin: 0 auto;
    padding: 0 clamp(0.5rem, 3vw, 1rem) 0;
    box-sizing: border-box;
}

.browse-rating[hidden] {
    display: none !important;
}

.emoji-rail {
    position: relative;
    height: clamp(1.95rem, 4.2vh, 2.35rem);
    margin: 0;
    touch-action: none;
}

.emoji-rail-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 8px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.emoji-rail-thumb {
    position: absolute;
    top: 50%;
    left: 44.44%;
    transform: translate(-50%, -50%);
    font-size: clamp(1.5rem, 4vh, 1.85rem);
    line-height: 1;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
    transition: font-size 0.12s ease;
}

.emoji-rail-thumb.is-heart {
    font-size: clamp(2rem, 5.5vh, 2.75rem);
}

.emoji-rail-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
}

.browse-score-readout {
    margin: 0.05rem 0 0.15rem;
    text-align: center;
    font-size: clamp(0.92rem, 2vh, 1.08rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.browse-rating-hint {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: clamp(0.65rem, 1.6vh, 0.72rem);
    color: var(--muted);
    margin: 0 0 0.25rem;
    line-height: 1.35;
}

.browse-rating-hint span {
    flex: 1 1 0;
    min-width: 0;
    text-wrap: balance;
}

.browse-rating-hint span:last-child {
    text-align: right;
}

.browse-hint-long {
    display: inline;
}

.browse-hint-short {
    display: none;
}

.browse-status {
    text-align: center;
    font-size: clamp(0.7rem, 1.6vh, 0.8rem);
    color: var(--muted);
    min-height: 0.95rem;
    margin: 0 0 0.25rem;
    text-wrap: balance;
    line-height: 1.35;
    padding: 0 0.25rem;
}

.browse-ok {
    display: block;
    width: 100%;
    padding: 0.48rem 1rem;
    font-size: clamp(0.82rem, 1.85vh, 0.9rem);
    text-wrap: balance;
}

.browse-staff {
    flex: 0 0 auto;
    max-height: 14vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.browse-staff[hidden] {
    display: none !important;
}

@media (max-width: 480px) {
    .browse-context-bar {
        min-height: 3.35rem;
        margin-bottom: 0.1rem;
    }

    .browse-context-title {
        padding: 0.35rem 0.75rem 0.4rem;
        max-width: calc(100vw - 7.5rem);
    }

    .browse-context-kicker {
        font-size: 0.58rem;
        letter-spacing: 0.12em;
    }

    .browse-hint-long {
        display: none;
    }

    .browse-hint-short {
        display: inline;
    }

    .browse-media {
        padding: 0.05rem 2.1rem 0;
    }

    .browse-arrow {
        font-size: 1.75rem;
        min-width: 2rem;
        padding: 0.25rem 0.35rem;
    }
}

@media (min-width: 1200px) {
    .browse-media {
        padding: 0.15rem clamp(2rem, 4.5vw, 3rem) 0;
    }

    .browse-rating {
        width: min(640px, 92vw);
    }
}
