/* Sampiya unified UI polish — 2026-08-13 */
:root {
    --ui-bg: #080306;
    --ui-bg-soft: #10060d;
    --ui-surface: rgba(28, 12, 23, .78);
    --ui-surface-solid: #190c15;
    --ui-surface-raised: #21101c;
    --ui-border: rgba(255, 255, 255, .09);
    --ui-border-strong: rgba(255, 255, 255, .16);
    --ui-rose-border: rgba(255, 82, 137, .38);
    --ui-text: #fff8fb;
    --ui-muted: #b9a5b0;
    --ui-dim: #806d78;
    --ui-radius-sm: 12px;
    --ui-radius: 18px;
    --ui-radius-lg: 26px;
    --ui-shadow: 0 24px 70px rgba(0, 0, 0, .38);
    --ui-shadow-soft: 0 12px 36px rgba(0, 0, 0, .26);
    --shell: calc(100% - clamp(1.5rem, 2.5vw, 3rem));
}

html {
    scroll-padding-top: 92px;
}

body {
    background:
        radial-gradient(circle at 8% 9%, rgba(255, 63, 124, .055), transparent 28rem),
        radial-gradient(circle at 92% 34%, rgba(122, 68, 255, .04), transparent 34rem),
        var(--ui-bg);
    color: var(--ui-text);
    text-rendering: optimizeLegibility;
}

main {
    min-height: 68vh;
}

::selection {
    background: rgba(255, 63, 124, .86);
    color: #fff;
}

:where(a, button, input):focus-visible {
    outline: 2px solid #ff9fbd;
    outline-offset: 3px;
}

button,
.button,
.type-pills a,
.journal-tags a {
    -webkit-tap-highlight-color: transparent;
}

/* Header and search */
.site-header {
    isolation: isolate;
}

.nav-shell {
    min-height: 80px;
    transition: min-height .25s ease;
}

.site-header.scrolled .nav-shell {
    min-height: 70px;
}

.site-header.scrolled::before,
.site-header.menu-open::before {
    background: rgba(10, 4, 9, .88);
    border-bottom-color: rgba(255, 255, 255, .075);
    box-shadow: 0 14px 45px rgba(0, 0, 0, .32);
    backdrop-filter: blur(24px) saturate(145%);
}

.desktop-nav {
    gap: .15rem;
    padding: .28rem;
    border: 1px solid rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .026);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}

.desktop-nav a {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    padding: .6rem .78rem;
}

.desktop-nav a::after {
    right: 32%;
    bottom: .18rem;
    left: 32%;
    height: 2px;
}

.desktop-nav a.active {
    background: linear-gradient(135deg, rgba(255, 63, 124, .17), rgba(255, 255, 255, .035));
}

.icon-button,
.menu-button {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, .045);
    box-shadow: inset 0 1px rgba(255, 255, 255, .06);
}

.my-love {
    min-height: 42px;
    padding-inline: 1.05rem;
    background: linear-gradient(135deg, rgba(255, 63, 124, .14), rgba(217, 24, 91, .07));
}

.search-drawer {
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 63, 124, .13), transparent 30rem),
        rgba(5, 1, 4, .94);
}

.search-form {
    padding: clamp(1rem, 3vw, 2.2rem);
}

.search-form > div {
    border-color: var(--ui-border-strong);
    background: rgba(20, 8, 17, .82);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .46), inset 0 1px rgba(255, 255, 255, .04);
}

.search-form input::placeholder,
.catalog-search input::placeholder {
    color: #76616d;
}

/* Hero */
.hero {
    min-height: clamp(700px, 92svh, 880px);
    max-height: 920px;
    border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.hero__image {
    background-position: center;
    filter: saturate(.94) contrast(1.04) brightness(.94);
}

.hero__veil {
    background:
        linear-gradient(90deg, rgba(6, 2, 5, .98) 0%, rgba(6, 2, 5, .82) 36%, rgba(6, 2, 5, .2) 68%, rgba(6, 2, 5, .08)),
        linear-gradient(0deg, var(--ui-bg) 0%, rgba(8, 3, 6, .64) 16%, transparent 48%, rgba(5, 1, 4, .22));
}

.hero__content {
    padding-top: clamp(9rem, 17vh, 12rem);
    padding-bottom: clamp(6.5rem, 11vh, 8.5rem);
}

.hero__content > * {
    max-width: 680px;
}

.hero h1 {
    max-width: 10ch;
    font-size: clamp(4rem, 7vw, 7.2rem);
    line-height: .9;
    text-wrap: balance;
}

.hero__tagline {
    max-width: 34rem;
    color: #ffd1df;
}

.hero__meta span {
    padding: .28rem .55rem;
    border-color: rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(7, 2, 6, .36);
    backdrop-filter: blur(8px);
}

.hero__synopsis {
    color: #d7c7cf;
    font-size: .92rem;
}

.button {
    min-height: 50px;
    padding-inline: 1.35rem;
    box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

.button--light {
    background: linear-gradient(135deg, #fff, #ffe7ef);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
}

.button--glass {
    background: rgba(18, 7, 15, .55);
}

.hero-controls {
    bottom: 2.4rem;
}

.hero-controls > button,
.hero-dots {
    background: rgba(8, 3, 7, .6);
    box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .22);
    backdrop-filter: blur(16px);
}

/* Homepage sections and cards */
.home-content {
    background:
        linear-gradient(180deg, rgba(22, 8, 17, .38), transparent 18rem),
        var(--ui-bg);
}

.love-note {
    margin-top: 1.2rem;
    margin-bottom: 3.3rem;
    padding: 1.2rem 1.35rem;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: linear-gradient(120deg, rgba(255, 255, 255, .04), rgba(255, 63, 124, .035));
    box-shadow: var(--ui-shadow-soft);
}

.love-note > span {
    box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 0 32px rgba(255, 63, 124, .11);
}

.media-row {
    margin-bottom: clamp(3rem, 5vw, 4.6rem);
}

.section-heading {
    margin-bottom: .95rem;
}

.section-heading h2 {
    color: #fff9fc;
    line-height: 1.04;
}

.section-heading small {
    margin-bottom: .42rem;
}

.section-heading > a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .7rem;
    border-radius: 999px;
}

.section-heading > a:hover {
    background: rgba(255, 255, 255, .045);
}

.card-row {
    grid-auto-columns: clamp(170px, 13vw, 220px);
    gap: clamp(.7rem, 1vw, 1rem);
    padding: .65rem .2rem 1.75rem;
    scroll-snap-type: x proximity;
}

.card-row .media-card {
    scroll-snap-align: start;
}

.media-card__art {
    border-color: var(--ui-border);
    border-radius: 16px;
    background: var(--ui-surface-solid);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .26);
}

.media-card__cover {
    border-radius: inherit;
}

.media-card__wash {
    background: linear-gradient(180deg, transparent 42%, rgba(5, 1, 4, .78));
}

.media-card__type {
    top: .65rem;
    left: .65rem;
    border-color: rgba(255, 255, 255, .17);
    background: rgba(8, 3, 7, .7);
}

.favorite-button {
    width: 38px;
    height: 38px;
    background: rgba(8, 3, 7, .72);
}

.media-card__body {
    min-height: 73px;
    padding: .72rem .25rem .2rem;
}

.media-card__body h3 {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.5em;
    margin-bottom: .32rem;
    font-size: .84rem;
    line-height: 1.25;
    text-overflow: initial;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.media-card__body p {
    overflow: hidden;
    color: #8d7984;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.romance-banner {
    min-height: 360px;
    border-color: rgba(255, 105, 154, .2);
    background:
        radial-gradient(circle at 82% 48%, rgba(255, 77, 135, .22), transparent 23rem),
        radial-gradient(circle at 5% 110%, rgba(123, 66, 255, .11), transparent 22rem),
        linear-gradient(118deg, #25101e, #10060d 70%);
    box-shadow: 0 30px 85px rgba(0, 0, 0, .36), inset 0 1px rgba(255, 255, 255, .04);
}

/* Catalog */
.catalog-hero {
    position: relative;
    overflow: hidden;
    min-height: 390px;
    display: flex;
    align-items: end;
    padding: 9.5rem 0 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, .055);
    background:
        radial-gradient(circle at 74% 38%, rgba(255, 63, 124, .16), transparent 25rem),
        radial-gradient(circle at 88% 15%, rgba(121, 67, 255, .08), transparent 24rem),
        linear-gradient(180deg, #160812, var(--ui-bg));
}

.catalog-hero::after {
    position: absolute;
    right: 6%;
    bottom: -12rem;
    width: 28rem;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 50%;
    box-shadow: 0 0 0 4rem rgba(255, 255, 255, .015), 0 0 0 8rem rgba(255, 255, 255, .009);
    content: "";
    pointer-events: none;
}

.catalog-hero h1 {
    max-width: 12ch;
    text-wrap: balance;
}

.catalog-hero p {
    color: var(--ui-muted);
    line-height: 1.7;
}

.catalog {
    padding-top: 1.5rem;
}

.catalog-tools {
    position: sticky;
    z-index: 35;
    top: 78px;
    margin-bottom: 1.25rem;
    padding: .7rem;
    border: 1px solid var(--ui-border);
    border-radius: 18px;
    background: rgba(14, 6, 12, .88);
    box-shadow: var(--ui-shadow-soft);
    backdrop-filter: blur(22px) saturate(135%);
}

.type-pills a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding-inline: .85rem;
}

.catalog-search {
    min-height: 46px;
    border-color: var(--ui-border-strong);
    background: rgba(4, 1, 3, .42);
}

.catalog-search button {
    min-width: 82px;
    background: linear-gradient(135deg, var(--rose), var(--rose-2));
    box-shadow: 0 8px 22px rgba(217, 24, 91, .2);
}

.catalog-results {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: .55rem .2rem;
    color: var(--ui-dim);
    font-size: .7rem;
}

.catalog-results b {
    color: #fff;
}

.catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 1.45rem .9rem;
}

.pagination nav span[aria-current="page"] span,
.pagination nav a {
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
}

.empty-love,
.saved-love {
    border: 1px solid var(--ui-border);
    background: linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(255, 63, 124, .025));
    box-shadow: var(--ui-shadow-soft);
}

.empty-love {
    border-radius: var(--ui-radius-lg);
}

/* Details and episodes */
.detail-hero {
    min-height: min(860px, 100svh);
    border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.detail-hero__image {
    filter: saturate(.9) contrast(1.03) brightness(.92);
    transform: scale(1.012);
}

.detail-hero__veil {
    background:
        linear-gradient(90deg, rgba(6, 2, 5, .98), rgba(6, 2, 5, .76) 42%, rgba(6, 2, 5, .1) 75%),
        linear-gradient(0deg, var(--ui-bg), rgba(8, 3, 7, .35) 48%, transparent);
}

.detail-hero__content {
    padding-bottom: clamp(4.5rem, 8vh, 6rem);
}

.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: .55rem;
    max-width: 700px;
    margin-bottom: 1rem;
    color: #9a8691;
    font-size: .68rem;
}

.detail-breadcrumb a:hover {
    color: #fff;
}

.detail-breadcrumb b {
    overflow: hidden;
    color: #c7b4be;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-type {
    min-height: 30px;
    align-items: center;
    padding-inline: .7rem;
    backdrop-filter: blur(10px);
}

.detail-hero h1 {
    max-width: 11ch;
    text-wrap: balance;
}

.detail-body {
    padding-top: 3.3rem;
}

.episode-list {
    gap: .75rem;
}

.episode-card {
    min-height: 132px;
    padding: .65rem;
    border-color: var(--ui-border);
    border-radius: 18px;
    background: linear-gradient(105deg, rgba(31, 14, 25, .86), rgba(14, 6, 12, .78));
    box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
}

.episode-card:hover {
    border-color: var(--ui-rose-border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}

.episode-card__image {
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 13px;
}

.related-row {
    padding-top: 2rem;
    border-top: 1px solid var(--ui-border);
}

/* Player */
.watch-page {
    background:
        radial-gradient(circle at 50% 0, rgba(255, 63, 124, .06), transparent 30rem),
        #060205;
}

.watch-page .site-header::before {
    background: rgba(5, 2, 4, .92);
}

.watch-shell {
    max-width: none;
    padding-top: 6.3rem;
}

.watch-heading {
    padding-inline: .2rem;
}

.watch-heading > a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: .45rem .65rem;
    border-radius: 999px;
}

.watch-heading > a:hover {
    background: rgba(255, 255, 255, .05);
}

.watch-theater {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(310px, 22vw, 390px);
    gap: clamp(.75rem, 1vw, 1.1rem);
    align-items: stretch;
}

.watch-theater__main {
    min-width: 0;
    display: flex;
    align-items: flex-start;
}

.video-stage {
    width: 100%;
    max-height: calc(100svh - 11rem);
    border-color: rgba(255, 255, 255, .14);
    border-radius: 18px;
    box-shadow: 0 35px 100px rgba(0, 0, 0, .62), 0 0 0 1px rgba(255, 255, 255, .025);
}

.watch-rail {
    min-width: 0;
    max-height: calc(100svh - 11rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 63, 124, .09), transparent 16rem),
        linear-gradient(160deg, rgba(29, 13, 24, .94), rgba(10, 4, 8, .96));
    box-shadow: 0 25px 70px rgba(0, 0, 0, .34);
}

.watch-rail__heading {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--ui-border);
}

.watch-rail__heading small {
    display: block;
    margin-bottom: .15rem;
    color: var(--rose);
    font-size: .5rem;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.watch-rail__heading h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 1.45rem;
    font-weight: 500;
    line-height: 1;
}

.watch-rail__heading > span {
    flex: 0 0 auto;
    padding: .32rem .52rem;
    border: 1px solid var(--ui-border);
    border-radius: 999px;
    color: var(--ui-muted);
    font-size: .58rem;
}

.watch-rail__list {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: .45rem;
    scrollbar-color: rgba(255, 93, 145, .45) transparent;
    scrollbar-width: thin;
}

.watch-rail-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) 16px;
    align-items: center;
    gap: .75rem;
    padding: .48rem;
    border: 1px solid transparent;
    border-radius: 13px;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.watch-rail-card + .watch-rail-card {
    margin-top: .18rem;
}

.watch-rail-card:hover {
    border-color: rgba(255, 82, 137, .24);
    background: rgba(255, 255, 255, .045);
    transform: translateX(-2px);
}

.watch-rail-card__art {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    background: #130810;
}

.watch-rail-card__art::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 42%, rgba(6, 2, 5, .16));
    content: "";
}

.watch-rail-card__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease, filter .25s ease;
}

.watch-rail-card__art i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .38);
    color: #170810;
    font-size: .58rem;
    font-style: normal;
    opacity: 0;
    transform: translate(-50%, -42%) scale(.86);
    transition: opacity .2s ease, transform .2s ease;
}

.watch-rail-card:hover .watch-rail-card__art img {
    filter: brightness(.68);
    transform: scale(1.045);
}

.watch-rail-card:hover .watch-rail-card__art i {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.watch-rail-card__copy {
    min-width: 0;
    display: block;
}

.watch-rail-card__copy small,
.watch-rail-card__copy strong,
.watch-rail-card__copy > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.watch-rail-card__copy small {
    margin-bottom: .16rem;
    color: var(--rose);
    font-size: .49rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.watch-rail-card__copy strong {
    color: #fff8fb;
    font-size: .74rem;
    line-height: 1.35;
}

.watch-rail-card__copy > span {
    margin-top: .22rem;
    color: var(--ui-dim);
    font-size: .55rem;
}

.watch-rail-card > b {
    color: rgba(255, 255, 255, .28);
    font-size: 1.15rem;
    font-weight: 400;
}

.watch-rail__browse {
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .65rem;
    border-top: 1px solid var(--ui-border);
    color: var(--ui-muted);
    font-size: .63rem;
    font-weight: 750;
}

.watch-rail__browse span {
    color: var(--rose);
}

.watch-rail__browse:hover {
    background: rgba(255, 63, 124, .07);
    color: #fff;
}

.watch-meta {
    margin-top: .75rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, .025);
}

.watch-meta h2 {
    font-size: 1.45rem;
}

.watch-meta p {
    line-height: 1.65;
}

.watch-meta button {
    min-height: 44px;
}

.watch-suggestions {
    margin-top: 2.8rem;
    border-top-color: var(--ui-border);
}

@media (max-width: 1100px) {
    .watch-theater {
        grid-template-columns: 1fr;
    }

    .watch-rail {
        max-height: none;
    }

    .watch-rail__list {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(265px, 34vw);
        gap: .4rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
    }

    .watch-rail-card {
        scroll-snap-align: start;
    }
}

/* Journal */
.journal-hero {
    min-height: 430px;
    display: flex;
    align-items: end;
    border-bottom: 1px solid var(--ui-border);
    background:
        radial-gradient(circle at 75% 35%, rgba(255, 63, 124, .15), transparent 24rem),
        radial-gradient(circle at 87% 20%, rgba(126, 74, 255, .07), transparent 23rem),
        linear-gradient(180deg, #160812, var(--ui-bg));
}

.journal-hero h1 {
    max-width: 13ch;
    text-wrap: balance;
}

.journal-tags {
    border-color: var(--ui-border);
    background: rgba(18, 7, 15, .88);
    box-shadow: var(--ui-shadow-soft);
    backdrop-filter: blur(20px);
}

.journal-card {
    overflow: hidden;
    border-color: var(--ui-border);
    background: linear-gradient(145deg, rgba(31, 14, 25, .84), rgba(16, 7, 13, .9));
    box-shadow: var(--ui-shadow-soft);
}

.journal-card__image img {
    transition: transform .45s ease, filter .3s ease;
}

.journal-card:hover {
    border-color: var(--ui-rose-border);
    box-shadow: var(--ui-shadow);
}

.journal-card:hover .journal-card__image img {
    filter: brightness(.84);
    transform: scale(1.035);
}

.journal-read {
    width: max-content;
    padding: .4rem .65rem;
    border-radius: 999px;
}

.journal-read:hover {
    background: rgba(255, 63, 124, .1);
}

.journal-article__hero {
    border-bottom: 1px solid var(--ui-border);
}

.journal-article__heading h1 {
    text-wrap: balance;
}

.journal-article__layout aside {
    padding: 1rem;
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, .025);
}

.journal-prose {
    min-width: 0;
}

.journal-prose p {
    color: #d2c2ca;
}

.journal-cta {
    border-color: rgba(255, 77, 135, .2);
    box-shadow: var(--ui-shadow-soft);
}

/* Love story */
.story-page {
    isolation: isolate;
}

.story-hero {
    border-bottom: 1px solid var(--ui-border);
}

.story-hero__content h1 {
    text-wrap: balance;
}

.story-photo img {
    border-radius: 22px;
    box-shadow: var(--ui-shadow);
}

.story-copy {
    color: #d4c4cc;
}

.story-vow,
.letter-card {
    border-color: rgba(255, 93, 145, .2);
    box-shadow: var(--ui-shadow);
}

.letter-card {
    background:
        radial-gradient(circle at 90% 8%, rgba(255, 63, 124, .09), transparent 18rem),
        linear-gradient(145deg, rgba(34, 15, 28, .96), rgba(14, 6, 12, .98));
}

.story-ending {
    border-top-color: var(--ui-border);
}

/* Footer */
.site-footer {
    margin-top: 1rem;
    padding-top: 5rem;
    border-top-color: rgba(255, 255, 255, .075);
    background:
        radial-gradient(circle at 18% 0, rgba(255, 63, 124, .095), transparent 28rem),
        linear-gradient(180deg, #0b0409, #060204);
}

.footer-grid {
    gap: clamp(2.5rem, 6vw, 6rem);
}

.footer-grid strong {
    letter-spacing: .12em;
}

.footer-grid a {
    width: max-content;
    max-width: 100%;
    transition: color .2s ease, transform .2s ease;
}

.footer-grid a:hover {
    transform: translateX(3px);
}

.footer-bottom {
    min-height: 64px;
    align-items: center;
}

@media (min-width: 1500px) {
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    }
}

@media (min-width: 1101px) and (max-width: 1499.98px) {
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    }
}

@media (max-width: 1100px) {
    .catalog-tools {
        top: 72px;
    }

    .catalog-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    :root {
        --shell: calc(100% - 1.25rem);
        --ui-radius-lg: 20px;
    }

    html {
        scroll-padding-top: calc(70px + env(safe-area-inset-top));
    }

    .nav-shell,
    .site-header.scrolled .nav-shell {
        min-height: 64px;
    }

    .mobile-menu {
        top: calc(64px + env(safe-area-inset-top));
        max-height: calc(100svh - 78px - env(safe-area-inset-top));
        overflow-y: auto;
        border-color: var(--ui-border-strong);
        background: rgba(14, 6, 12, .96);
    }

    .mobile-menu a {
        min-height: 48px;
    }

    .search-form {
        margin-top: 16vh;
        padding: .4rem;
    }

    .hero {
        min-height: max(700px, 100svh);
        max-height: none;
    }

    .hero__image {
        background-position: var(--hero-mobile-position, 78% 30%);
        filter: saturate(.96) contrast(1.035) brightness(.92);
        transform: none;
    }

    .hero__veil {
        background:
            linear-gradient(0deg, var(--ui-bg) 0%, rgba(9, 3, 7, .98) 23%, rgba(9, 3, 7, .84) 43%, rgba(9, 3, 7, .28) 64%, rgba(9, 3, 7, .03) 84%),
            linear-gradient(90deg, rgba(7, 2, 6, .22), transparent 72%);
    }

    .hero__content {
        width: var(--shell);
        padding: 7.6rem 0 6.8rem;
    }

    .hero h1 {
        max-width: 9.5ch;
        font-size: clamp(3.1rem, 15vw, 4.65rem);
    }

    .hero__synopsis {
        font-size: .8rem;
        line-height: 1.58;
    }

    .hero__actions .button {
        min-height: 48px;
    }

    .hero-controls {
        bottom: 1.05rem;
    }

    .love-note {
        margin: 1rem 0 2.5rem;
        padding: 1rem;
        border-radius: 16px;
    }

    .section-heading {
        align-items: end;
    }

    .section-heading small {
        max-width: 70vw;
    }

    .card-row {
        grid-auto-columns: min(43vw, 180px);
        gap: .62rem;
        padding-bottom: 1.3rem;
        scroll-snap-type: x mandatory;
    }

    .media-card__art {
        border-radius: 13px;
    }

    .media-card__body {
        min-height: 68px;
        padding-top: .58rem;
    }

    .media-card__body h3 {
        font-size: .78rem;
    }

    .favorite-button {
        width: 38px;
        height: 38px;
    }

    .romance-banner {
        min-height: 340px;
        border-radius: 20px;
    }

    .catalog-hero {
        min-height: 330px;
        padding: 7.7rem 0 2.6rem;
    }

    .catalog-hero::after {
        display: none;
    }

    .catalog-tools {
        top: calc(64px + env(safe-area-inset-top));
        gap: .6rem;
        margin-inline: -.15rem;
        padding: .5rem;
        border-radius: 15px;
    }

    .type-pills {
        width: calc(100% + 1rem);
        margin-left: -.5rem;
        padding-inline: .5rem;
    }

    .catalog-results {
        margin-bottom: .7rem;
        padding-inline: .1rem;
    }

    .catalog-grid,
    .catalog-grid--related,
    .catalog-grid--watch {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.15rem .58rem;
    }

    .detail-hero {
        min-height: max(680px, 100svh);
    }

    .detail-hero__content {
        padding: 7.4rem 0 3.5rem;
    }

    .detail-breadcrumb {
        margin-bottom: .75rem;
        font-size: .62rem;
    }

    .detail-breadcrumb b {
        max-width: 34vw;
    }

    .detail-hero h1 {
        font-size: clamp(3rem, 14.5vw, 4.55rem);
    }

    .detail-body {
        padding-top: 2.2rem;
    }

    .episode-card {
        min-height: 96px;
        grid-template-columns: 116px 1fr;
        padding: .5rem;
        border-radius: 14px;
    }

    .watch-shell {
        padding: calc(4.7rem + env(safe-area-inset-top)) .625rem calc(2rem + env(safe-area-inset-bottom));
    }

    .watch-theater {
        gap: .85rem;
    }

    .video-stage {
        border-radius: 0;
        box-shadow: 0 22px 60px rgba(0, 0, 0, .55);
    }

    .watch-rail {
        width: calc(100% - .05rem);
        border-radius: 16px;
    }

    .watch-rail__heading {
        min-height: 68px;
        padding: .8rem;
    }

    .watch-rail__list {
        grid-auto-columns: min(82vw, 330px);
        padding: .4rem;
    }

    .watch-rail-card {
        grid-template-columns: 96px minmax(0, 1fr) 12px;
        gap: .65rem;
    }

    .watch-rail-card__art i {
        opacity: .86;
        transform: translate(-50%, -50%) scale(.86);
    }

    .watch-meta {
        margin-top: .6rem;
        padding: 1rem;
        border-radius: 14px;
    }

    .journal-hero {
        min-height: 350px;
    }

    .journal-tags {
        top: calc(64px + env(safe-area-inset-top));
    }

    .journal-card {
        border-radius: 17px;
    }

    .journal-article__layout aside {
        padding: .8rem;
    }

    .story-photo img {
        border-radius: 16px;
    }

    .letter-card {
        border-radius: 20px;
    }

    .site-footer {
        padding-top: 3.5rem;
    }

    .footer-grid {
        gap: 2rem;
    }

    .footer-grid a {
        width: auto;
    }

    .footer-bottom {
        min-height: 0;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

@media (max-width: 370px) {
    .hero__actions {
        grid-template-columns: 1fr;
    }

    .card-row {
        grid-auto-columns: 48vw;
    }

    .catalog-results span:last-child {
        display: none;
    }
}

@media (hover: hover) and (pointer: fine) {
    .media-card:hover .media-card__art {
        transform: translateY(-7px) scale(1.012);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
