.otto-gallery-page {
    flex: 1;
    padding-bottom: 28px;
}

.otto-gallery-hero,
.otto-gallery-section {
    padding: 28px 18px;
}

.otto-gallery-hero-card,
.otto-gallery-inner {
    width: min(var(--wrap), 100%);
    margin: 0 auto;
}

.otto-gallery-hero-card {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: center;
    gap: 28px;
    padding: clamp(30px, 6vw, 64px);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 16% 18%, rgba(46,224,139,.24), transparent 34%),
        radial-gradient(circle at 92% 22%, rgba(244,193,93,.24), transparent 32%),
        linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.11);
}

.otto-gallery-hero-card::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,.08);
    pointer-events: none;
}

.otto-gallery-hero-card::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -130px;
    width: 340px;
    height: 340px;
    border-radius: 90px;
    rotate: 18deg;
    background: linear-gradient(135deg, rgba(46,224,139,.18), rgba(244,193,93,.08));
    border: 1px solid rgba(255,255,255,.09);
}

.otto-gallery-hero-copy {
    position: relative;
    z-index: 2;
}

.otto-gallery-hero-copy h1 {
    max-width: 760px;
    margin: 16px 0 16px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: .9;
    letter-spacing: -.07em;
}

.otto-gallery-hero-copy p {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.55;
}

.otto-gallery-hero-orb {
    position: relative;
    z-index: 2;
    width: min(260px, 70vw);
    aspect-ratio: 1;
    justify-self: end;
    display: grid;
    place-items: center;
    border-radius: 42px;
    background:
        radial-gradient(circle at 50% 38%, rgba(255,244,216,.22), transparent 38%),
        radial-gradient(circle at 50% 82%, rgba(46,224,139,.28), transparent 42%),
        linear-gradient(145deg, rgba(255,255,255,.13), rgba(0,0,0,.22));
    border: 1px solid rgba(255,255,255,.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 24px 70px rgba(0,0,0,.28);
}

.otto-gallery-hero-orb img {
    width: min(165px, 70%);
    height: auto;
    display: block;
    filter: drop-shadow(0 22px 44px rgba(0,0,0,.38));
}

.otto-gallery-toolbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    border-radius: 24px;
    background: rgba(3, 14, 10, .56);
    border: 1px solid rgba(255,255,255,.10);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 34px rgba(0,0,0,.18);
}

.otto-gallery-toolbar::-webkit-scrollbar {
    display: none;
}

.otto-gallery-pill,
.otto-gallery-load {
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.075);
    color: rgba(255,244,216,.84);
    border-radius: 999px;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease, opacity .18s ease;
}

.otto-gallery-pill {
    flex: 0 0 auto;
    padding: 10px 14px;
}

.otto-gallery-pill:hover,
.otto-gallery-pill:focus-visible,
.otto-gallery-load:hover,
.otto-gallery-load:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(46,224,139,.34);
    outline: none;
}

.otto-gallery-pill.is-active,
.otto-gallery-pill[aria-pressed="true"] {
    background: linear-gradient(135deg, rgba(46,224,139,.95), rgba(244,193,93,.88));
    border-color: rgba(255,255,255,.24);
    color: #062015;
    box-shadow: 0 14px 34px rgba(46,224,139,.16);
}

.otto-gallery-grid {
    columns: 4 220px;
    column-gap: 16px;
    min-height: 120px;
}

.otto-gallery-item {
    display: block;
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
    break-inside: avoid;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.045));
    box-shadow: 0 18px 52px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.09);
    color: inherit;
    cursor: zoom-in;
    text-align: left;
    transform: translateZ(0);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.otto-gallery-item:hover,
.otto-gallery-item:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(46,224,139,.34);
    box-shadow: 0 22px 62px rgba(0,0,0,.34), 0 0 34px rgba(46,224,139,.08);
    outline: none;
}

.otto-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: rgba(0,0,0,.16);
}

.otto-gallery-item-copy {
    display: grid;
    gap: 10px;
    padding: 12px 13px 14px;
}

.otto-gallery-item-copy p {
    margin: 0;
    color: rgba(255,244,216,.84);
    font-size: 14px;
    line-height: 1.42;
}

.otto-gallery-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.otto-gallery-item-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(46,224,139,.12);
    border: 1px solid rgba(46,224,139,.18);
    color: rgba(255,244,216,.68);
    font-size: 11px;
    font-weight: 900;
}

.otto-gallery-empty {
    padding: 26px;
    border-radius: 24px;
    border: 1px dashed rgba(255,255,255,.18);
    background: rgba(255,255,255,.055);
    color: var(--muted);
    text-align: center;
    font-weight: 850;
}

.otto-gallery-sentinel {
    height: 2px;
}

.otto-gallery-actions {
    display: flex;
    justify-content: center;
    padding-top: 18px;
}

.otto-gallery-load {
    min-width: min(100%, 260px);
    padding: 13px 18px;
}

.otto-gallery-load[hidden] {
    display: none;
}

.otto-gallery-load:disabled {
    cursor: wait;
    opacity: .68;
    transform: none;
}

.otto-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 22px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility 0s linear .2s;
}

body.otto-gallery-modal-open {
    overflow: hidden;
}

.otto-gallery-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.otto-gallery-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 6, .78);
    backdrop-filter: blur(18px);
}

.otto-gallery-modal-card {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    max-height: min(86vh, 900px);
    display: grid;
    gap: 12px;
    margin: 0;
    overflow: auto;
    border-radius: 28px;
    padding: 12px;
    background: rgba(7, 22, 16, .96);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 34px 110px rgba(0,0,0,.62);
}

.otto-gallery-modal-card img {
    display: block;
    width: 100%;
    max-height: 74vh;
    object-fit: contain;
    border-radius: 20px;
    background: rgba(0,0,0,.24);
}

.otto-gallery-modal-card p {
    margin: 0;
    padding: 2px 8px 6px;
    color: rgba(255,244,216,.82);
    line-height: 1.5;
}

.otto-gallery-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    background: rgba(5, 15, 11, .76);
    color: var(--cream);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 34px rgba(0,0,0,.34);
}

@media (max-width: 860px) {
    .otto-gallery-hero-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .otto-gallery-hero-orb {
        justify-self: start;
        width: min(180px, 64vw);
        border-radius: 34px;
    }
}

@media (max-width: 760px) {
    .otto-gallery-hero,
    .otto-gallery-section {
        padding-inline: 14px;
    }

    .otto-gallery-hero-card {
        padding: 30px 18px;
        border-radius: 26px;
    }

    .otto-gallery-toolbar {
        margin-bottom: 14px;
        padding: 8px;
        gap: 8px;
        border-radius: 20px;
        background: rgba(3, 14, 10, .46);
        box-shadow: 0 10px 24px rgba(0,0,0,.14);
    }

    .otto-gallery-pill {
        min-height: 36px;
        padding: 8px 11px;
        font-size: 12px;
        white-space: nowrap;
    }

    .otto-gallery-grid {
        columns: 2;
        column-gap: 10px;
    }

    .otto-gallery-item {
        margin-bottom: 12px;
        border-radius: 20px;
    }

    .otto-gallery-item-copy {
        padding: 10px;
    }

    .otto-gallery-item-copy p {
        font-size: 13px;
    }

    .otto-gallery-modal {
        padding: 12px;
    }

    .otto-gallery-modal-card {
        max-height: 90vh;
        border-radius: 24px;
    }
}

@media (min-width: 560px) and (max-width: 860px) {
    .otto-gallery-grid {
        columns: 3;
        column-gap: 12px;
    }
}

@media (max-width: 420px) {
    .otto-gallery-section {
        padding-inline: 10px;
    }

    .otto-gallery-toolbar {
        margin-inline: 0;
        margin-bottom: 12px;
        padding: 7px;
        border-radius: 18px;
    }

    .otto-gallery-grid {
        columns: 2;
        column-gap: 9px;
    }

    .otto-gallery-item {
        margin-bottom: 9px;
        border-radius: 16px;
    }

    .otto-gallery-item-copy {
        padding: 8px;
        gap: 7px;
    }

    .otto-gallery-item-copy p {
        font-size: 12px;
        line-height: 1.35;
    }

    .otto-gallery-item-tags {
        gap: 4px;
    }

    .otto-gallery-item-tags span {
        min-height: 20px;
        padding: 4px 6px;
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .otto-gallery-grid {
        column-gap: 8px;
    }

    .otto-gallery-item {
        margin-bottom: 8px;
        border-radius: 15px;
    }
}
