/* S-002A: Instagram-profile-inspired application shell for /, /gallery, /gallery/159 only. */
body.racks-s002a {
    --racks-line: #dbdbdb;
    --racks-muted: #737373;
    --racks-soft: #f2f2f2;
    --racks-ink: #0f0f0f;
    --racks-accent: #1d4ed8;
    background: #fafafa;
    color: var(--racks-ink);
    font-size: 16px !important;
}

body.racks-s002a #header,
body.racks-s002a #footer {
    display: none !important;
}

body.racks-s002a #body-wrapper {
    padding: 0 !important;
}

body.racks-s002a #body-wrapper > .container {
    width: 100%;
    max-width: none !important;
    padding: 0 !important;
}

body.racks-s002a h1,
body.racks-s002a h2,
body.racks-s002a h3,
body.racks-s002a p {
    text-align: left;
}

.racks-appbar {
    position: sticky;
    z-index: 80;
    top: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    min-height: 58px;
    padding: 0 12px;
    border-bottom: 1px solid var(--racks-line);
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
}

.racks-appbar a {
    color: var(--racks-ink);
    text-decoration: none;
}

.racks-appbar-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 2px solid var(--racks-ink);
    border-radius: 50%;
    font-size: .82rem;
    font-weight: 850;
    letter-spacing: -.05em;
}

.racks-appbar-brand {
    overflow: hidden;
    padding: 0 8px;
    font-size: .96rem;
    font-weight: 800;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.racks-appbar-action {
    display: grid;
    place-items: center;
    justify-self: end;
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.racks-appbar-action svg,
.racks-nav-icon svg,
.racks-tab-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.racks-rail {
    display: none;
}

.racks-app-main {
    width: 100%;
    max-width: 935px;
    min-height: 100vh;
    margin: 0 auto;
    background: #fff;
    padding-bottom: 72px;
}

/* Profile header */
.racks-profile-head {
    padding: 28px 16px 18px;
}

.racks-profile-core {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.racks-profile-avatar {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border: 1px solid #cfd3d7;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 4px #f2f3f4;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -.08em;
}

.racks-profile-identity h1 {
    margin: 0;
    font-size: clamp(1.15rem, 4.4vw, 1.65rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.racks-profile-handle {
    margin-top: 6px;
    font-size: .88rem;
    font-weight: 700;
}

.racks-profile-description {
    margin: 6px 0 0;
    color: #383838;
    font-size: .84rem;
    line-height: 1.35;
}

.racks-profile-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 18px 0 0;
}

.racks-profile-fact {
    min-width: 0;
    text-align: center;
}

.racks-profile-fact strong,
.racks-profile-fact span {
    display: block;
}

.racks-profile-fact strong {
    font-size: .86rem;
    font-weight: 800;
}

.racks-profile-fact span {
    margin-top: 2px;
    color: var(--racks-muted);
    font-size: .69rem;
    line-height: 1.2;
}

.racks-profile-actions {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

.racks-profile-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 12px;
    border-radius: 9px;
    background: #efefef;
    color: var(--racks-ink);
    font-size: .78rem;
    font-weight: 750;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
}

.racks-profile-actions a:first-child {
    background: var(--racks-ink);
    color: #fff;
}

/* Highlights / category circles */
.racks-highlights {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 16px 18px;
    scrollbar-width: none;
}

.racks-highlights::-webkit-scrollbar {
    display: none;
}

.racks-highlight {
    flex: 0 0 74px;
    color: var(--racks-ink);
    text-align: center;
    text-decoration: none;
}

.racks-highlight-image {
    display: block;
    width: 68px;
    height: 68px;
    margin: 0 auto 7px;
    padding: 3px;
    overflow: hidden;
    border: 1px solid #cfd3d7;
    border-radius: 50%;
    background: #fff;
}

.racks-highlight-image img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.racks-highlight-label {
    display: block;
    font-size: .68rem;
    line-height: 1.15;
}

/* Profile-style tabs */
.racks-profile-tabs,
.racks-gallery-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 48px;
    border-top: 1px solid var(--racks-line);
    border-bottom: 1px solid var(--racks-line);
}

.racks-profile-tabs a,
.racks-gallery-tabs a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #8e8e8e;
    font-size: .69rem;
    font-weight: 700;
    text-decoration: none;
}

.racks-profile-tabs a.is-active,
.racks-gallery-tabs a.is-active {
    color: var(--racks-ink);
}

.racks-profile-tabs a.is-active::after,
.racks-gallery-tabs a.is-active::after {
    position: absolute;
    right: 12px;
    bottom: -1px;
    left: 12px;
    height: 2px;
    background: var(--racks-ink);
    content: '';
}

/* Home / gallery grids */
.racks-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    background: #fff;
}

.racks-feed-card {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: #eee;
}

.racks-feed-image,
.racks-feed-image img {
    display: block;
    width: 100%;
    height: 100%;
}

.racks-feed-image img {
    object-fit: cover;
    transition: transform .18s ease;
}

.racks-feed-card:hover .racks-feed-image img {
    transform: scale(1.02);
}

.racks-feed-label {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 34px 9px 8px;
    opacity: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.72));
    color: #fff;
    font-size: .72rem;
    font-weight: 750;
    line-height: 1.15;
    transition: opacity .18s ease;
}

.racks-feed-card:hover .racks-feed-label,
.racks-feed-card:focus-visible .racks-feed-label {
    opacity: 1;
}

/* Gallery profile header */
.racks-gallery-head {
    padding: 24px 16px 14px;
}

.racks-gallery-head h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 850;
    letter-spacing: -.035em;
}

.racks-gallery-head p {
    margin: 5px 0 0;
    color: var(--racks-muted);
    font-size: .82rem;
}

.racks-gallery-filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 16px 16px;
    scrollbar-width: none;
}

.racks-gallery-filter::-webkit-scrollbar {
    display: none;
}

.racks-gallery-filter a {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid var(--racks-line);
    border-radius: 999px;
    background: #fff;
    color: var(--racks-ink);
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
}

.racks-gallery-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
}

.racks-gallery-content > h1,
.racks-gallery-content > h2,
.racks-gallery-content > .meta,
.racks-gallery-content > .headercontact,
.racks-gallery-content > p:not(:has(figure.image-caption)) {
    display: none !important;
}

.racks-gallery-content > a[id] {
    display: block;
    grid-column: 1 / -1;
    height: 0;
    scroll-margin-top: 64px;
}

.racks-gallery-content > p:has(figure.image-caption) {
    display: contents;
}

.racks-gallery-content a:has(figure.image-caption) {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: #eee;
}

.racks-gallery-content figure.image-caption {
    position: relative;
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    background: #eee;
}

.racks-gallery-content figure.image-caption img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform .18s ease;
}

.racks-gallery-content a:hover figure.image-caption img {
    transform: scale(1.02);
}

.racks-gallery-content figure.image-caption figcaption {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Case -> post/carousel */
.racks-post-page {
    width: 100%;
}

.racks-post-topline {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--racks-line);
}

.racks-post-back {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--racks-ink);
    font-size: 1.45rem;
    text-decoration: none;
}

.racks-post-kicker {
    color: var(--racks-muted);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.racks-post-name {
    margin-top: 1px;
    overflow: hidden;
    max-width: 72vw;
    font-size: .82rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.racks-post-card {
    background: #fff;
}

.racks-post-media {
    min-width: 0;
    background: #111;
}

.racks-carousel {
    display: flex;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.racks-carousel::-webkit-scrollbar {
    display: none;
}

.racks-carousel-slide {
    position: relative;
    flex: 0 0 100%;
    aspect-ratio: 1;
    overflow: hidden;
    scroll-snap-align: start;
    background: #111;
}

.racks-carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.racks-carousel-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 34px;
    border-bottom: 1px solid var(--racks-line);
    background: #fff;
}

.racks-carousel-counter {
    min-width: 38px;
    color: var(--racks-muted);
    font-size: .65rem;
    font-weight: 700;
}

.racks-carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.racks-carousel-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #c7c7c7;
    cursor: pointer;
}

.racks-carousel-dot.is-active {
    background: var(--racks-accent);
}

.racks-post-side {
    padding: 16px;
}

.racks-post-author {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 12px;
    border-bottom: 1px solid #efefef;
}

.racks-post-author-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #cfd3d7;
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 900;
}

.racks-post-author strong,
.racks-post-author span {
    display: block;
}

.racks-post-author strong {
    font-size: .78rem;
}

.racks-post-author span {
    margin-top: 1px;
    color: var(--racks-muted);
    font-size: .65rem;
}

.racks-post-side h1 {
    margin: 16px 0 9px;
    font-size: 1.12rem;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.racks-post-caption {
    margin: 0;
    color: #333;
    font-size: .8rem;
    line-height: 1.45;
}

.racks-post-actions {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

.racks-post-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #efefef;
    color: var(--racks-ink);
    font-size: .74rem;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
}

.racks-post-actions a:first-child {
    background: var(--racks-ink);
    color: #fff;
}

/* Mobile bottom navigation */
.racks-bottom-nav {
    position: fixed;
    z-index: 90;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    min-height: 62px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--racks-line);
    background: rgba(255,255,255,.98);
}

.racks-bottom-nav > a,
.racks-bottom-nav > button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 62px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--racks-ink);
    font: inherit;
    text-decoration: none;
    touch-action: manipulation;
}

.racks-bottom-nav > button {
    cursor: pointer;
}

.racks-bottom-nav > [hidden] {
    display: none !important;
}

.racks-bottom-nav-spacer {
    display: block;
    height: calc(62px + env(safe-area-inset-bottom));
}

body.racks-s002a .racks-bottom-nav-spacer,
body.racks-gallery-case .racks-bottom-nav-spacer {
    display: none;
}

.racks-bottom-nav a.is-active .racks-nav-icon,
.racks-bottom-nav button.is-active .racks-nav-icon {
    background: var(--racks-ink);
    color: #fff;
}

.racks-nav-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
}

@media (min-width: 760px) {
    .racks-profile-head {
        padding: 46px 44px 24px;
    }

    .racks-profile-core {
        grid-template-columns: 148px minmax(0, 1fr);
        gap: 34px;
    }

    .racks-profile-avatar {
        width: 140px;
        height: 140px;
        font-size: 2.2rem;
    }

    .racks-profile-description {
        max-width: 560px;
    }

    .racks-profile-facts {
        max-width: 520px;
        margin-left: 182px;
        margin-top: -58px;
    }

    .racks-profile-actions {
        max-width: 520px;
        margin-left: 182px;
    }

    .racks-highlights {
        padding: 20px 44px 28px;
    }

    .racks-highlight {
        flex-basis: 88px;
    }

    .racks-highlight-image {
        width: 78px;
        height: 78px;
    }

    .racks-gallery-head,
    .racks-gallery-filter {
        padding-right: 44px;
        padding-left: 44px;
    }
}

@media (min-width: 1040px) {
    body.racks-s002a #body-wrapper {
        padding-left: 88px !important;
    }

    .racks-appbar,
    .racks-bottom-nav,
    .racks-bottom-nav-spacer {
        display: none;
    }

    .racks-rail {
        position: fixed;
        z-index: 100;
        top: 0;
        bottom: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        width: 88px;
        padding: 24px 12px;
        border-right: 1px solid var(--racks-line);
        background: #fff;
    }

    .racks-rail-brand {
        display: grid;
        place-items: center;
        width: 46px;
        height: 46px;
        margin: 0 auto 32px;
        border: 2px solid var(--racks-ink);
        border-radius: 50%;
        color: var(--racks-ink);
        font-size: .86rem;
        font-weight: 900;
        text-decoration: none;
        letter-spacing: -.05em;
    }

    .racks-rail a:not(.racks-rail-brand) {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        min-height: 52px;
        margin: 3px auto;
        border-radius: 12px;
        color: var(--racks-ink);
        text-decoration: none;
    }

    .racks-rail a.is-active:not(.racks-rail-brand) {
        background: #f1f1f1;
    }

    .racks-rail .racks-nav-icon {
        width: 42px;
        height: 42px;
    }

    .racks-rail-contact {
        margin-top: auto !important;
    }

    .racks-app-main {
        min-height: 100vh;
        padding-bottom: 42px;
        border-right: 1px solid #efefef;
        border-left: 1px solid #efefef;
    }

    .racks-post-page {
        padding: 46px 28px;
    }

    .racks-post-topline {
        max-width: 1080px;
        margin: 0 auto;
        border: 1px solid var(--racks-line);
        border-bottom: 0;
        border-radius: 12px 12px 0 0;
    }

    .racks-post-card {
        display: grid;
        grid-template-columns: minmax(0, 1.55fr) minmax(310px, .65fr);
        max-width: 1080px;
        margin: 0 auto;
        overflow: hidden;
        border: 1px solid var(--racks-line);
        border-radius: 0 0 12px 12px;
    }

    .racks-post-side {
        border-left: 1px solid var(--racks-line);
        padding: 20px;
    }

    .racks-carousel-status {
        border-bottom: 0;
    }
}

@media (hover: none) {
    .racks-feed-label {
        display: none;
    }
}

/* S-002B: /gallery/159 correction — one dominant image, compact controls, no three-column case layout. */
body.racks-s002b {
    --racks-line: #dbdbdb;
    --racks-muted: #737373;
    --racks-ink: #0f0f0f;
    background: #fafafa;
    color: var(--racks-ink);
    font-size: 16px !important;
}

body.racks-s002b #header,
body.racks-s002b #footer {
    display: none !important;
}

body.racks-s002b #body-wrapper,
body.racks-s002b #body-wrapper > .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.racks-case-bar {
    position: sticky;
    z-index: 90;
    top: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    min-height: 56px;
    padding: 0 10px;
    border-bottom: 1px solid var(--racks-line);
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(10px);
}

.racks-case-bar a {
    color: var(--racks-ink);
    text-decoration: none;
}

.racks-case-back,
.racks-case-mail {
    display: grid !important;
    place-items: center;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50%;
    background: transparent !important;
}

.racks-case-back {
    font-size: 1.65rem;
    line-height: 1;
}

.racks-case-mail {
    justify-self: end;
}

.racks-case-mail svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.racks-case-brand {
    overflow: hidden;
    padding: 0 8px;
    font-size: .93rem;
    font-weight: 800;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.racks-case-page {
    width: 100%;
    max-width: 640px;
    min-height: 100vh;
    margin: 0 auto;
    background: #fff;
}

.racks-case-post {
    display: block !important;
    width: 100% !important;
    max-width: 640px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: #fff;
}

.racks-case-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 9px 12px;
}

.racks-case-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid #cfd3d7;
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 900;
}

.racks-case-heading strong,
.racks-case-heading span {
    display: block;
}

.racks-case-heading strong {
    font-size: .78rem;
    line-height: 1.2;
}

.racks-case-heading div > span {
    overflow: hidden;
    max-width: calc(100vw - 86px);
    margin-top: 2px;
    color: var(--racks-muted);
    font-size: .68rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.racks-case-media {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #111;
}

body.racks-s002b .racks-carousel {
    display: flex !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

body.racks-s002b .racks-carousel::-webkit-scrollbar {
    display: none;
}

body.racks-s002b .racks-carousel-slide {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: auto !important;
    min-height: 58vh;
    max-height: 78vh;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    scroll-snap-align: start;
    background: #111;
}

body.racks-s002b .racks-carousel-slide img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 78vh !important;
    margin: 0 auto !important;
    object-fit: contain !important;
}

.racks-case-counter {
    position: absolute;
    z-index: 5;
    right: 10px;
    top: 10px;
    min-width: 46px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,.62);
    color: #fff;
    font-size: .66rem;
    font-weight: 750;
    line-height: 1;
    text-align: center;
}

.racks-case-copy {
    padding: 14px 14px 24px;
}

body.racks-s002b .racks-case-copy h1 {
    margin: 0 0 7px !important;
    font-size: 1rem !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
    text-align: left !important;
}

body.racks-s002b .racks-case-copy p {
    margin: 0 !important;
    color: #333;
    font-size: .8rem !important;
    line-height: 1.45 !important;
    text-align: left !important;
}

.racks-case-actions {
    display: flex !important;
    gap: 8px;
    margin-top: 14px;
}

.racks-case-actions a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-height: 38px;
    padding: 8px 12px !important;
    border-radius: 8px;
    background: #efefef;
    color: var(--racks-ink);
    font-size: .74rem;
    font-weight: 750;
    text-decoration: none;
}

.racks-case-actions .racks-case-primary {
    background: var(--racks-ink);
    color: #fff;
}

@media (min-width: 760px) {
    .racks-case-page {
        margin-top: 24px;
        margin-bottom: 36px;
        border: 1px solid var(--racks-line);
        border-radius: 12px;
        overflow: hidden;
    }

    .racks-case-bar {
        position: static;
        max-width: 640px;
        margin: 24px auto 0;
        border: 1px solid var(--racks-line);
        border-bottom: 0;
        border-radius: 12px 12px 0 0;
    }

    .racks-case-page {
        margin-top: 0;
        border-radius: 0 0 12px 12px;
    }

    body.racks-s002b .racks-carousel-slide {
        min-height: 620px;
        max-height: 720px;
    }

    body.racks-s002b .racks-carousel-slide img {
        max-height: 720px !important;
    }
}

/* S-002C: gallery case navigation, tags, request/share sheets. */
body.racks-s002c .racks-case-share {
    display: grid !important;
    place-items: center;
    justify-self: end;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50%;
    background: transparent !important;
    color: var(--racks-ink);
    cursor: pointer;
}

body.racks-s002c .racks-case-share svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.racks-case-arrow {
    position: absolute;
    z-index: 6;
    top: 50%;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: -19px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    box-shadow: 0 1px 8px rgba(0,0,0,.18);
    color: #111;
    font: 700 28px/1 Arial, sans-serif;
    cursor: pointer;
    transition: opacity .15s ease, transform .15s ease;
}

.racks-case-arrow:hover:not(:disabled) {
    transform: scale(1.04);
}

.racks-case-arrow:disabled {
    opacity: .24;
    cursor: default;
}

.racks-case-arrow-prev { left: 10px; }
.racks-case-arrow-next { right: 10px; }

.racks-case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 10px;
}

.racks-case-tags a {
    color: #2563eb;
    font-size: .76rem;
    line-height: 1.35;
    text-decoration: none;
}

.racks-case-tags a:hover {
    text-decoration: underline;
}

body.racks-s002c .racks-case-actions button,
body.racks-s002c .racks-case-actions a {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

body.racks-sheet-open {
    overflow: hidden;
}

.racks-sheet[hidden] {
    display: none !important;
}

.racks-sheet {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.racks-sheet.is-open {
    opacity: 1;
    pointer-events: auto;
}

.racks-sheet-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0,0,0,.44);
    cursor: default;
}

.racks-sheet-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    max-height: min(76vh, 620px);
    overflow: auto;
    padding: 16px 14px calc(20px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -10px 40px rgba(0,0,0,.18);
    transform: translateY(18px);
    transition: transform .18s ease;
}

.racks-sheet.is-open .racks-sheet-panel {
    transform: translateY(0);
}

.racks-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.racks-sheet-head strong,
.racks-sheet-head span {
    display: block;
}

.racks-sheet-head strong {
    font-size: 1rem;
    line-height: 1.2;
}

.racks-sheet-head span {
    margin-top: 3px;
    color: #737373;
    font-size: .76rem;
}

.racks-sheet-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #efefef;
    color: #111;
    font: 400 24px/1 Arial, sans-serif;
    cursor: pointer;
}

.racks-channel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.racks-channel-grid a,
.racks-channel-grid button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #dbdbdb;
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.racks-channel-grid a:hover,
.racks-channel-grid button:hover {
    background: #f6f6f6;
}

.racks-sheet-note {
    margin: 12px 2px 0;
    color: #737373;
    font-size: .7rem;
    line-height: 1.4;
}

.racks-sheet-status {
    min-height: 18px;
    margin: 8px 2px 0;
    color: #2563eb;
    font-size: .72rem;
    line-height: 1.35;
}

.racks-active-tag {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: .76rem;
    font-weight: 750;
}

.racks-tag-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
}

.racks-tag-card {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eee;
    color: #fff;
    text-decoration: none;
}

.racks-tag-card img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover !important;
}

.racks-tag-card span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 18px 7px 6px;
    background: linear-gradient(transparent, rgba(0,0,0,.62));
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    line-height: 1.2;
}

.racks-tag-empty {
    padding: 28px 16px;
    color: #737373;
    text-align: center;
}

@media (max-width: 759px) {
    .racks-case-arrow {
        width: 34px;
        height: 34px;
        margin-top: -17px;
        font-size: 25px;
    }

    .racks-case-arrow-prev { left: 8px; }
    .racks-case-arrow-next { right: 8px; }
}

@media (min-width: 760px) {
    .racks-sheet {
        align-items: center;
        padding: 24px;
    }

    .racks-sheet-panel {
        max-width: 520px;
        border-radius: 16px;
        padding: 18px;
        transform: translateY(10px) scale(.985);
    }

    .racks-sheet.is-open .racks-sheet-panel {
        transform: translateY(0) scale(1);
    }
}


body.racks-s002c .racks-case-actions button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-height: 38px;
    padding: 8px 12px !important;
    border-radius: 8px;
    background: #efefef;
    color: var(--racks-ink);
    font-size: .74rem;
    font-weight: 750;
    text-decoration: none;
}

body.racks-s002c .racks-case-actions button.racks-case-primary {
    background: var(--racks-ink);
    color: #fff;
}

.racks-sheet-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    color: #9a9a9a;
    font-size: .68rem;
}

.racks-sheet-divider::before,
.racks-sheet-divider::after {
    content: '';
    height: 1px;
    flex: 1;
    background: #e6e6e6;
}

.racks-callback-head strong,
.racks-callback-head span {
    display: block;
}

.racks-callback-head strong {
    font-size: .9rem;
}

.racks-callback-head span {
    margin-top: 3px;
    color: #737373;
    font-size: .7rem;
    line-height: 1.35;
}

.racks-callback-form form {
    margin: 10px 0 0 !important;
}

.racks-callback-form .form-field,
.racks-callback-form .form-group {
    margin: 0 0 9px !important;
}

.racks-callback-form label {
    display: block;
    margin: 0 0 4px;
    color: #333;
    font-size: .7rem;
    font-weight: 700;
}

.racks-callback-form input[type='tel'],
.racks-callback-form input[type='text'],
.racks-callback-form textarea {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 10px 11px !important;
    border: 1px solid #d7d7d7 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #111 !important;
    font-family: inherit !important;
    font-size: .8rem !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    box-shadow: none !important;
}

.racks-callback-form textarea {
    min-height: 82px;
    resize: vertical;
}

.racks-callback-form button[type='submit'],
.racks-callback-form input[type='submit'] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin: 0 !important;
    padding: 9px 14px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: #111 !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: .78rem !important;
    font-weight: 800 !important;
    cursor: pointer;
}

/* S-002D: restore wide desktop case layout without changing mobile. */
@media (min-width: 1040px) {
    body.racks-s002c .racks-case-bar {
        width: calc(100% - 56px);
        max-width: 1080px;
        margin: 28px auto 0;
    }

    body.racks-s002c .racks-case-page {
        width: calc(100% - 56px);
        max-width: 1080px;
        margin: 0 auto 44px;
    }

    body.racks-s002c .racks-case-post {
        display: grid !important;
        grid-template-columns: minmax(0, 1.55fr) minmax(310px, .65fr);
        grid-template-rows: auto 1fr;
        width: 100% !important;
        max-width: 1080px !important;
        margin: 0 !important;
        align-items: stretch;
    }

    body.racks-s002c .racks-case-media {
        grid-column: 1;
        grid-row: 1 / 3;
        min-width: 0;
        border-right: 1px solid var(--racks-line);
    }

    body.racks-s002c .racks-case-heading {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        border-bottom: 1px solid var(--racks-line);
    }

    body.racks-s002c .racks-case-heading div > span {
        max-width: 100%;
    }

    body.racks-s002c .racks-case-copy {
        grid-column: 2;
        grid-row: 2;
        min-width: 0;
        padding: 20px;
    }

    body.racks-s002c .racks-case-actions {
        flex-wrap: wrap;
    }

    body.racks-s002c .racks-carousel-slide {
        min-height: 620px;
        max-height: 720px;
    }

    body.racks-s002c .racks-carousel-slide img {
        max-height: 720px !important;
    }
}

/* S-002E: tag-filter gallery must occupy the full gallery grid width. */
.racks-gallery-content > .racks-tag-grid {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

/* S-002F: restore the standard desktop RACKS side rail on gallery case pages. */
@media (min-width: 1040px) {
    body.racks-gallery-case #body-wrapper {
        width: 100% !important;
        max-width: none !important;
        padding-left: 88px !important;
        box-sizing: border-box !important;
    }

    body.racks-gallery-case #body-wrapper > .container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
}

/* S-002G: desktop case card ends with the media instead of filling viewport height. */
@media (min-width: 1040px) {
    body.racks-s002c .racks-case-page {
        min-height: 0 !important;
        height: auto !important;
    }

    body.racks-s002c .racks-case-post {
        min-height: 0 !important;
        height: auto !important;
        align-self: start;
    }
}


/* S-002H: mobile-only six-item related portfolio grid below a case. */
.racks-case-related {
    display: none;
}

@media (max-width: 759px) {
    body.racks-s002h .racks-case-related {
        display: block;
        width: 100%;
        margin: 36px 0 0;
        padding: 0;
        border-top: 1px solid var(--racks-line);
        background: #fff;
    }

    body.racks-s002h .racks-related-title {
        margin: 0 !important;
        padding: 20px 16px 14px;
        color: var(--racks-ink);
        font-size: 1rem !important;
        font-weight: 800;
        line-height: 1.2;
    }

    body.racks-s002h .racks-related-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2px;
        width: 100%;
    }

    body.racks-s002h .racks-related-item {
        display: block;
        position: relative;
        min-width: 0;
        aspect-ratio: 1 / 1;
        overflow: hidden;
        background: #f2f2f2;
        color: inherit;
        text-decoration: none;
    }

    body.racks-s002h .racks-related-item img {
        display: block;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        object-fit: cover;
    }
}


/* S-002I: persistent mobile navigation on gallery cases + user-triggered fullscreen control. */
@media (max-width: 1039px) {
    body.racks-s002i.racks-gallery-case .racks-case-page {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
        box-sizing: border-box;
    }
}
