:root {
    --bg: #070b12;
    --bg-alt: #0d1320;
    --surface: rgba(13, 19, 32, 0.78);
    --surface-strong: #11182a;
    --surface-soft: rgba(255, 255, 255, 0.04);
    --surface-border: rgba(255, 255, 255, 0.09);
    --text: #edf2f7;
    --muted: #97a4b6;
    --muted-2: #728095;
    --accent: #f1b96d;
    --accent-2: #79c0ff;
    --accent-3: #9f7cff;
    --danger: #ff6b74;
    --success: #48d597;
    --warning: #f0c36d;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.22);
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 38px;
    --container: 1240px;
    --container-wide: 1360px;
    --border: 1px solid var(--surface-border);
    --transition: 220ms ease;
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(60% 60% at 10% 10%, rgba(121, 192, 255, 0.16), transparent 58%),
        radial-gradient(40% 40% at 90% 20%, rgba(241, 185, 109, 0.16), transparent 54%),
        radial-gradient(40% 40% at 20% 90%, rgba(159, 124, 255, 0.13), transparent 62%),
        linear-gradient(180deg, #06090f 0%, #0b111c 46%, #081018 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: -1;
    filter: blur(70px);
    opacity: 0.7;
}

body::before {
    width: 360px;
    height: 360px;
    top: -100px;
    left: -80px;
    background: rgba(121, 192, 255, 0.18);
}

body::after {
    width: 420px;
    height: 420px;
    right: -120px;
    top: 220px;
    background: rgba(241, 185, 109, 0.14);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

::selection {
    background: rgba(241, 185, 109, 0.35);
    color: var(--text);
}

.site-body {
    min-height: 100vh;
}

.site-body--auth {
    display: flex;
    flex-direction: column;
}

.site-body--auth main.auth-shell {
    flex: 1;
    width: min(var(--container-wide), calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-body--auth .auth-card {
    width: min(100%, 480px);
}

.site-body--auth .auth-card__footer {
    justify-content: center;
}

.site-body--auth .site-footer {
    display: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    backdrop-filter: blur(22px);
    background: rgba(7, 11, 18, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__inner {
    width: min(var(--container-wide), calc(100% - 2rem));
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand__mark {
    display: inline-grid;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(241, 185, 109, 0.14), rgba(241, 185, 109, 0.06));
    border: 1px solid rgba(241, 185, 109, 0.22);
    box-shadow: var(--shadow-soft);
}

.brand__mark img {
    width: 1.7rem;
    height: 1.7rem;
    display: block;
}

.brand__text {
    font-size: 0.98rem;
}

.brand__text-accent {
    color: var(--accent);
}

.site-header__search {
    flex: 1 1 280px;
    min-width: 280px;
    max-width: 760px;
}

.site-header__actions {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.site-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0.82rem 1rem;
    border-radius: 999px;
    transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.site-menu-toggle:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.site-menu-toggle__icon {
    width: 1rem;
    display: grid;
    gap: 0.24rem;
}

.site-menu-toggle__icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.site-menu-toggle__label {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.site-nav a,
.admin-nav a {
    padding: 0.72rem 1rem;
    border-radius: 999px;
    color: var(--muted);
    transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}

.site-nav a:hover,
.admin-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.site-search {
    position: relative;
    min-width: 280px;
}

.site-search input {
    width: 100%;
    border: var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0.9rem 1.1rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.site-search input::placeholder {
    color: var(--muted-2);
}

.site-search input:focus {
    border-color: rgba(121, 192, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(121, 192, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.site-menu {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition), visibility 0s linear var(--transition);
}

.site-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity var(--transition);
}

.site-menu__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 4, 10, 0.62);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity var(--transition);
}

.site-menu.is-open .site-menu__backdrop {
    opacity: 1;
}

.site-menu__panel {
    position: relative;
    z-index: 1;
    width: min(100vw, 34rem);
    height: 100dvh;
    overflow: auto;
    padding: 1.35rem 1.25rem 1.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(8, 12, 19, 0.88), rgba(5, 8, 13, 0.84));
    box-shadow: -34px 0 80px rgba(0, 0, 0, 0.55);
    transform: translateX(100%);
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.site-menu.is-open .site-menu__panel {
    transform: translateX(0);
}

.site-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-menu__header .eyebrow {
    margin: 0;
}

.site-menu__close {
    width: 2.7rem;
    height: 2.7rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1;
    transition: transform var(--transition), background var(--transition);
}

.site-menu__close:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.09);
}

.site-menu__nav,
.site-menu__categories {
    display: grid;
    gap: 0;
}

.site-menu__link,
.site-menu__category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0.1rem;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.site-menu__link {
    font-weight: 600;
}

.site-menu__link:hover,
.site-menu__category:hover {
    transform: translateX(-1px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.16);
}

.site-menu__category-name {
    font-weight: 600;
}

.site-menu__category-count {
    color: var(--muted);
    font-size: 0.92rem;
    white-space: nowrap;
}

.site-menu__empty {
    margin: 0;
    color: var(--muted);
}

.site-menu__footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-menu__link--footer {
    color: var(--accent);
    border-bottom-color: rgba(241, 185, 109, 0.22);
}

.site-menu__link--footer:hover {
    color: var(--text);
    border-color: rgba(241, 185, 109, 0.4);
}

.site-menu-toggle {
    width: 3rem;
    height: 3rem;
    padding: 0;
    justify-content: center;
}

.site-menu-toggle__label {
    display: none;
}

body.is-menu-open {
    overflow: hidden;
}

.site-search__results {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    right: 0;
    padding: 0.9rem;
    border-radius: 22px;
    background: rgba(10, 15, 24, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
    display: none;
    max-height: min(70vh, 680px);
    overflow: auto;
}

.site-search__results.is-open {
    display: block;
}

.site-search__results .search-results__empty {
    padding: 1rem;
    color: var(--muted);
}

.search-results__group + .search-results__group {
    margin-top: 1rem;
}

.search-results__group h4 {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.search-result-list {
    display: grid;
    gap: 0.75rem;
}

.search-result-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0.8rem;
    align-items: center;
    padding: 0.8rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.search-result-item__thumb {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    object-fit: cover;
}

.search-result-item__title {
    font-weight: 650;
    margin: 0;
    line-height: 1.3;
}

.search-result-item__meta {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.site-footer {
    margin-top: 4rem;
    padding: 0 0 2rem;
}

.site-footer__inner {
    width: min(var(--container-wide), calc(100% - 2rem));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.site-footer__text {
    display: inline-block;
    color: rgba(241, 185, 109, 0.5);
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.site-footer__meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-footer__meta a,
.text-link {
    color: var(--accent-2);
}

.text-link--accent {
    color: var(--accent);
}

.text-link:hover {
    text-decoration: underline;
}

main {
    width: min(var(--container-wide), calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 2rem;
}

.hero,
.category-hero,
.photo-hero,
.upload-hero,
.auth-shell {
    width: 100%;
    margin-top: 1rem;
}

.hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
    min-height: calc(100vh - 140px);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(135deg, rgba(8, 12, 20, 0.88), rgba(8, 12, 20, 0.7)),
        url('../images/hero-scene.svg') center/cover no-repeat;
    box-shadow: var(--shadow);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(241, 185, 109, 0.16), transparent 32%),
        radial-gradient(circle at bottom right, rgba(121, 192, 255, 0.12), transparent 35%);
    pointer-events: none;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero__content {
    max-width: 680px;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.78rem;
    font-weight: 650;
}

.hero__eyebrow {
    color: var(--text);
}

.hero__accent {
    color: var(--accent);
}

.hero h1,
.category-hero h1,
.photo-hero h1,
.upload-hero h1,
.auth-card h2,
.feature-card h3,
.admin-card h3,
.admin-photo-card h3 {
    margin: 0;
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 6rem);
    max-width: 11ch;
}

.hero__lead,
.photo-hero__panel .hero__lead,
.upload-hero .hero__lead,
.auth-card .lead {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--muted);
    max-width: 62ch;
}

.hero__actions,
.photo-actions,
.upload-actions,
.admin-card__actions,
.admin-photo-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.hero__stats {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.hero__stats article,
.stat-card,
.trustbar__item {
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: var(--border);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-soft);
}

.hero__stats strong,
.stat-card strong {
    display: block;
    font-size: 1.35rem;
    margin-bottom: 0.28rem;
}

.hero__stats span,
.stat-card span,
.trustbar__item {
    color: var(--muted);
}

.site-home {
    background:
        linear-gradient(180deg, #070b12 0%, #0b1118 100%);
}

.site-home::before,
.site-home::after {
    display: none;
}

.site-home .site-header {
    background: rgba(7, 11, 18, 0.82);
}

.site-home .site-header__inner {
    grid-template-columns: auto 1fr;
}

.site-home .site-nav {
    justify-content: flex-end;
}

.site-home .site-search {
    display: none;
}

.site-home main {
    padding-top: 1rem;
}

.site-home {
    overflow-x: hidden;
}

.site-home .hero {
    display: flex;
    align-items: center;
    min-height: clamp(620px, 86vh, 940px);
    padding: clamp(1.6rem, 4vw, 3rem);
    padding-left: 25vw;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
    border: 0;
    background:
        linear-gradient(90deg, rgba(7, 11, 18, 0.98) 0%, rgba(7, 11, 18, 0.95) 28%, rgba(7, 11, 18, 0.7) 52%, rgba(7, 11, 18, 0.24) 76%, rgba(7, 11, 18, 0.08) 100%),
        url('../images/home-hero-macro.png') center center / cover no-repeat;
    box-shadow: none;
}

.site-home .hero::before {
    display: block;
    background:
        linear-gradient(90deg, rgba(7, 11, 18, 0.08) 0%, rgba(7, 11, 18, 0.16) 18%, rgba(7, 11, 18, 0.02) 55%, rgba(7, 11, 18, 0.04) 100%);
}

.site-home .hero__content {
    max-width: 760px;
}

.site-home .hero__note,
.site-home .trustbar,
.site-home .section--split {
    display: none;
}

.site-home .hero__visual {
    display: none;
}

.site-home .hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.6rem);
    max-width: 12ch;
}

.site-home .hero__lead {
    max-width: 52ch;
    font-size: 1rem;
    line-height: 1.75;
}

.site-home .hero__stats {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    align-items: stretch;
}

.site-home .hero__stats article {
    min-width: 110px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.site-home .hero__stats article + article {
    position: relative;
    padding-left: 1.25rem;
}

.site-home .hero__stats article + article::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15rem;
    bottom: 0.15rem;
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.site-home .hero__stats strong {
    margin-bottom: 0.15rem;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.site-home .hero__stats span {
    display: block;
    color: var(--muted-2);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.site-home .section {
    margin-top: 2.5rem;
}

.site-home .section__head {
    margin-bottom: 1rem;
    align-items: center;
}

.site-home .section__head h2 {
    font-size: clamp(1.45rem, 2vw, 2rem);
}

.site-home .photo-grid--masonry {
    column-gap: 0.9rem;
}

.site-home .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.site-home .category-grid .photo-card {
    margin: 0;
}

.site-home .category-grid .photo-card__link {
    display: flex;
    flex-direction: column;
    aspect-ratio: 4 / 5;
}

.site-home .category-grid .category-card__media {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 26px 26px 0 0;
}

.site-home .category-grid .photo-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-home .category-grid .category-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem 1.05rem 1.1rem;
    background: rgba(8, 12, 20, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-home .category-grid .category-card__body h3,
.site-home .category-grid .category-card__body p {
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-home .category-grid .photo-card__category {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 650;
}

.site-home .category-grid .category-card__body h3 {
    -webkit-line-clamp: 2;
}

.site-home .category-grid .category-card__body p {
    -webkit-line-clamp: 2;
}

.site-home .photo-card__link,
.site-home .empty-state {
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
}

.site-home .photo-card__link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.category-card .photo-card__image {
    filter: grayscale(1) contrast(1.05) saturate(0.12);
    transition: transform 450ms ease, filter 320ms ease;
}

.category-card:hover .photo-card__image {
    transform: scale(1.03);
    filter: grayscale(0) contrast(1) saturate(1);
}

.hero__visual {
    position: relative;
    min-height: 560px;
    display: grid;
    place-items: center;
}

.hero__frame {
    width: min(100%, 540px);
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 42%),
        rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow);
    transform: rotate(4deg);
}

.hero__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.96;
}

.hero__note {
    position: absolute;
    max-width: 260px;
    padding: 1rem 1.1rem;
    border-radius: 22px;
    background: rgba(12, 18, 28, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-soft);
}

.hero__note--top {
    top: 2%;
    right: 5%;
}

.hero__note--bottom {
    left: 0;
    bottom: 8%;
}

.hero__note-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--accent-2);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.hero__note strong {
    font-size: 1rem;
    line-height: 1.5;
}

.trustbar {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 0.8rem 0 2rem;
}

.trustbar__item {
    border-radius: 999px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.section {
    margin-top: 3rem;
}

.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.section__head h1,
.section__head h2 {
    margin: 0;
    font-size: clamp(1.6rem, 2vw, 2.45rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section--welcome .welcome-copy {
    width: 100%;
    margin: 0;
    padding-inline: 80px;
    display: grid;
    gap: 1rem;
    text-align: left;
}

.section--welcome .welcome-copy p:not(.welcome-copy__intro):not(.welcome-copy__author) {
    margin: 0;
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: justify;
    text-justify: inter-word;
}

.section--welcome .welcome-copy__more {
    display: grid;
    gap: 1rem;
}

.section--welcome .welcome-copy__more[hidden] {
    display: none;
}

.section--welcome .welcome-copy__accent {
    color: var(--accent);
}

.section--welcome .welcome-copy__intro {
    margin: 0;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.8;
}

.section--welcome .welcome-copy__author {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: right;
    color: var(--text);
}

.section--welcome .welcome-copy__toggle {
    justify-self: start;
    margin-top: 0.5rem;
}

.section--welcome .section__head {
    justify-content: center;
    text-align: center;
}

.section--welcome .section__head > div {
    width: min(100%, 78ch);
}

.site-home .section--welcome {
    margin-top: calc(4rem + 50px);
}

.site-home #categories {
    margin-top: calc(2.5rem + 100px);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.category-card,
.admin-card,
.feature-card,
.auth-card,
.stat-card,
.empty-state {
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.category-card {
    break-inside: avoid;
    margin: 0 0 1rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.category-card__count {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    background: rgba(241, 185, 109, 0.12);
    color: var(--accent);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.photo-grid {
    width: 100%;
}

.photo-grid--masonry {
    column-count: 3;
    column-gap: 1rem;
}

.photo-card {
    break-inside: avoid;
    margin: 0 0 1rem;
}

.photo-card__link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.photo-card__link:hover {
    transform: translateY(-4px);
    border-color: rgba(241, 185, 109, 0.24);
    box-shadow: var(--shadow);
}

.photo-card__image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 450ms ease;
}

.photo-card__link:hover .photo-card__image {
    transform: scale(1.03);
}

.photo-card__overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 1rem;
    background: linear-gradient(180deg, transparent 0%, rgba(5, 8, 13, 0.78) 52%, rgba(5, 8, 13, 0.96) 100%);
}

.photo-card__overlay h3 {
    margin: 0.5rem 0 0.35rem;
    font-size: 1.15rem;
}

.photo-card__overlay p {
    margin: 0 0 0.5rem;
    color: rgba(237, 242, 247, 0.85);
    line-height: 1.55;
}

.photo-card__meta,
.admin-card__meta,
.photo-meta span,
.hero__stats span,
.stat-card span {
    font-size: 0.85rem;
    color: var(--muted);
}

.section--split,
.upload-layout,
.photo-hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.feature-card {
    padding: 1.35rem;
}

.feature-card--accent {
    background:
        radial-gradient(circle at top right, rgba(241, 185, 109, 0.16), transparent 40%),
        radial-gradient(circle at bottom left, rgba(121, 192, 255, 0.14), transparent 48%),
        rgba(255, 255, 255, 0.045);
}

.feature-card p:last-child {
    color: var(--muted);
    line-height: 1.8;
}

.empty-state {
    padding: 1.6rem;
}

.empty-state--wide {
    grid-column: 1 / -1;
    column-span: all;
}

.empty-state h3,
.empty-state h2 {
    margin: 0 0 0.45rem;
}

.empty-state p {
    margin: 0 0 1rem;
    color: var(--muted);
    line-height: 1.7;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(241, 185, 109, 1), rgba(241, 161, 103, 1));
    color: #091018;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 26px rgba(241, 185, 109, 0.22);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition), background var(--transition);
}

.button:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 16px 36px rgba(241, 185, 109, 0.28);
}

.button--ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.button--ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.button--danger {
    background: linear-gradient(145deg, rgba(255, 107, 116, 1), rgba(255, 132, 103, 1));
    color: #0e1218;
    box-shadow: 0 12px 26px rgba(255, 107, 116, 0.18);
}

.button--block {
    width: 100%;
}

.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.flash {
    margin: 1rem 0;
    padding: 0.95rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-soft);
}

.flash-success {
    border-color: rgba(72, 213, 151, 0.22);
    background: rgba(72, 213, 151, 0.12);
}

.flash-error {
    border-color: rgba(255, 107, 116, 0.22);
    background: rgba(255, 107, 116, 0.12);
}

.flash-warning {
    border-color: rgba(240, 195, 109, 0.24);
    background: rgba(240, 195, 109, 0.12);
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1rem;
    min-height: calc(100vh - 2rem);
}

.admin-sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
    padding: 1rem;
    border-radius: 30px;
    background:
        radial-gradient(circle at top, rgba(121, 192, 255, 0.13), transparent 35%),
        rgba(7, 11, 18, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-soft);
}

.brand--sidebar {
    margin-bottom: 1rem;
}

.admin-nav {
    display: grid;
    gap: 0.4rem;
}

.admin-nav a {
    display: block;
    background: rgba(255, 255, 255, 0.03);
}

.admin-main {
    min-width: 0;
    padding: 1rem 0 2rem;
}

.admin-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0 1rem;
}

.admin-topbar h1 {
    margin: 0.25rem 0 0;
    font-size: clamp(2rem, 3.4vw, 3.2rem);
    line-height: 1.06;
}

.admin-topbar .lead {
    max-width: 62ch;
    margin-top: 0.75rem;
}

.stats-grid,
.action-grid,
.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.stat-card {
    padding: 1.2rem;
}

.stat-card strong {
    font-size: 2.2rem;
}

.action-grid .feature-card {
    min-height: 100%;
}

.admin-card {
    overflow: hidden;
}

.admin-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.admin-card__media img,
.admin-photo-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-card__body,
.admin-photo-card__body {
    padding: 1rem;
}

.admin-card__body h3,
.admin-photo-card__body h3 {
    margin: 0.5rem 0 0.4rem;
    font-size: 1.2rem;
}

.admin-card__body p,
.admin-photo-card__body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.admin-card__meta {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.admin-card__actions,
.admin-photo-card__actions {
    margin-top: 1rem;
}

.admin-photo-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-photo-card.is-active {
    border-color: rgba(241, 185, 109, 0.32);
}

.admin-photo-card__thumb {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.editor-form,
.upload-form,
.auth-card {
    padding: 1.3rem;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, rgba(121, 192, 255, 0.08), transparent 35%),
        rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: var(--shadow-soft);
}

.editor-form--inline {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.editor-form label,
.upload-form label,
.auth-form label {
    display: grid;
    gap: 0.45rem;
    color: var(--muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

input[type="text"],
input[type="password"],
input[type="search"],
select,
textarea {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0.95rem 1rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    border-color: rgba(121, 192, 255, 0.62);
    box-shadow: 0 0 0 4px rgba(121, 192, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

textarea {
    resize: vertical;
    min-height: 110px;
}

.checkbox-field {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.55rem;
}

.checkbox-field input {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    accent-color: var(--accent);
}

.upload-page {
    min-height: 100vh;
}

.upload-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
}

.upload-hero__meta {
    min-width: 280px;
    display: grid;
    gap: 0.8rem;
}

.upload-hero__meta div {
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.upload-hero__meta span,
.photo-meta span {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.upload-hero__meta strong,
.photo-meta strong {
    font-size: 1rem;
}

.upload-layout {
    align-items: start;
    margin-top: 1rem;
}

.upload-zone {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    min-height: 250px;
    padding: 1.5rem;
    border-radius: 32px;
    border: 1px dashed rgba(121, 192, 255, 0.35);
    background:
        radial-gradient(circle at top, rgba(121, 192, 255, 0.14), transparent 34%),
        rgba(255, 255, 255, 0.03);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.upload-zone:hover,
.upload-zone.is-dragover {
    transform: translateY(-2px);
    border-color: rgba(241, 185, 109, 0.42);
    background:
        radial-gradient(circle at top, rgba(241, 185, 109, 0.14), transparent 34%),
        rgba(255, 255, 255, 0.05);
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-zone__icon {
    display: grid;
    place-items: center;
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 24px;
    margin-bottom: 0.8rem;
    background: linear-gradient(145deg, rgba(241, 185, 109, 0.96), rgba(121, 192, 255, 0.9));
    color: #071018;
    font-size: 2rem;
    font-weight: 700;
}

.upload-zone h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2vw, 2rem);
}

.upload-zone p {
    margin: 0.5rem 0 0;
    color: var(--muted);
}

.upload-progress {
    width: 100%;
    height: 10px;
    margin-top: 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.upload-progress__bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(241, 185, 109, 1), rgba(121, 192, 255, 1));
    transition: width 180ms ease;
}

.upload-feedback {
    margin-top: 1rem;
    color: var(--muted);
    min-height: 1.5rem;
}

.upload-sidebar {
    display: grid;
    gap: 1rem;
}

.auth-shell {
    width: 100%;
    margin-top: 0;
}

.auth-shell__visual {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 1.5rem;
    align-content: space-between;
    padding: 2rem;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top left, rgba(241, 185, 109, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(121, 192, 255, 0.16), transparent 34%),
        linear-gradient(160deg, rgba(14, 20, 33, 0.92), rgba(7, 11, 18, 0.84));
    box-shadow: var(--shadow);
}

.auth-shell__visual::before {
    content: "";
    position: absolute;
    inset: auto -20% -15% auto;
    width: 60%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(121, 192, 255, 0.22), transparent 62%);
    filter: blur(50px);
}

.auth-shell__brand,
.auth-shell__quote {
    position: relative;
    z-index: 1;
}

.auth-shell__brand p {
    max-width: 34ch;
    color: var(--muted);
    line-height: 1.8;
    margin: 1rem 0 0;
}

.auth-shell__quote h1 {
    max-width: 13ch;
    margin-top: 0.5rem;
    font-size: clamp(2.4rem, 4.4vw, 4.6rem);
    line-height: 1.05;
}

.auth-card {
    display: grid;
    align-content: start;
    gap: 0.9rem;
}

.auth-card h2 {
    font-size: clamp(1.8rem, 2.4vw, 2.5rem);
}

.auth-form {
    display: grid;
    gap: 1rem;
    margin-top: 0.5rem;
}

.auth-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.4rem;
}

.photo-hero {
    align-items: stretch;
}

.photo-hero__viewer {
    min-height: 640px;
    border-radius: 36px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 7, 12, 0.86);
    box-shadow: var(--shadow);
    display: grid;
    place-items: center;
    padding: 1rem;
}

.photo-hero__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.photo-hero__panel {
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-soft);
    padding: 1.4rem;
}

.photo-nav {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.photo-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.photo-meta div {
    padding: 0.9rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.photo-story {
    display: grid;
    gap: 0.55rem;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-soft);
}

.photo-story__label {
    margin: 0;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.photo-story__text {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.load-more-wrap {
    display: grid;
    justify-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-sentinel {
    width: 100%;
    height: 1px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
}

.lightbox.is-open {
    display: block;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 12, 0.78);
    backdrop-filter: blur(20px);
}

.lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(calc(100vw - 1.5rem), var(--lightbox-dialog-width, 1480px));
    height: calc(100vh - 1.5rem);
    height: calc(100dvh - 1.5rem);
    margin: 0.75rem auto;
    border-radius: 30px;
    background: rgba(8, 12, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: block;
}

.lightbox__layout {
    position: relative;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    background: rgba(5, 8, 13, 0.96);
}

.lightbox.is-detail-open .lightbox__layout {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
}

.lightbox__figure {
    position: relative;
    height: 100%;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    background: #05070c;
    display: grid;
    place-items: center;
}

.lightbox__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background: #05070c;
    display: block;
}

.lightbox__info-toggle {
    position: absolute;
    z-index: 3;
    right: 1rem;
    bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.78rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(241, 185, 109, 0.36);
    background: rgba(8, 12, 20, 0.68);
    color: var(--text);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

.lightbox__info-toggle:hover,
.lightbox__info-toggle:focus-visible {
    transform: translateY(-1px);
    background: rgba(241, 185, 109, 0.16);
    border-color: rgba(241, 185, 109, 0.6);
}

.lightbox__info-toggle[aria-expanded="true"] {
    background: rgba(241, 185, 109, 0.22);
    border-color: rgba(241, 185, 109, 0.72);
    color: var(--text);
}

.lightbox__info-toggle-label {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.lightbox__info-toggle-icon {
    font-size: 0.95rem;
    line-height: 1;
    transition: transform var(--transition);
}

.lightbox__info-toggle[aria-expanded="true"] .lightbox__info-toggle-icon {
    transform: rotate(180deg);
}

.lightbox__info-panel {
    min-width: 0;
    min-height: 0;
    padding: 1.2rem;
    background: rgba(8, 12, 20, 0.92);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.03);
    display: none;
    align-content: start;
    gap: 0.85rem;
    overflow: auto;
}

.lightbox__info-panel.is-open {
    display: grid;
}

.lightbox__category {
    margin: 0;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.lightbox__title {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.2;
}

.lightbox__info-panel .photo-actions {
    margin-top: 0.15rem;
}

.lightbox__meta {
    margin-top: 0.1rem;
}

.lightbox__story {
    margin-top: 0.15rem;
}

.lightbox__info-meta {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.lightbox__info-meta div {
    display: grid;
    gap: 0.18rem;
}

.lightbox__info-meta dt {
    font-size: 0.72rem;
    color: rgba(237, 242, 247, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.lightbox__info-meta dd {
    margin: 0;
    color: var(--text);
    font-weight: 600;
    line-height: 1.55;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    backdrop-filter: blur(14px);
    border-radius: 999px;
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    transition: transform var(--transition), background var(--transition);
}

.lightbox__close:hover,
.lightbox__nav:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
}

.lightbox__close {
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
}

.lightbox__nav--prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
}

.lightbox__nav--next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
}

@media (max-width: 1180px) {
    .site-header__search {
        order: 3;
        flex-basis: 100%;
        min-width: 0;
        max-width: none;
    }

    .site-header__actions {
        order: 2;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .site-search {
        min-width: 0;
        width: 100%;
    }

    .hero,
    .auth-shell,
    .photo-hero,
    .upload-layout,
    .section--split {
        grid-template-columns: 1fr;
    }

    .site-home .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        min-height: auto;
    }

    .site-home .hero {
        min-height: auto;
    }

    .hero__visual {
        min-height: 500px;
    }

    .photo-grid--masonry {
        column-count: 2;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: relative;
        top: 0;
    }

    .lightbox.is-detail-open .lightbox__layout {
        grid-template-columns: minmax(0, 1fr) minmax(18rem, 20rem);
    }
}

@media (max-width: 780px) {
    main,
    .site-header__inner,
    .site-footer__inner {
        width: min(calc(100% - 1.2rem), var(--container-wide));
    }

    .site-home .hero {
        padding: 1.25rem;
        border-radius: 0;
    }

    .hero h1 {
        max-width: 100%;
    }

    .hero__stats,
    .form-grid,
    .photo-meta {
        grid-template-columns: 1fr;
    }

    .site-home .category-grid {
        grid-template-columns: 1fr;
    }

    .photo-grid--masonry {
        column-count: 1;
    }

    .section__head,
    .admin-topbar,
    .upload-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .site-footer__inner,
    .auth-card__footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-header__inner {
        gap: 0.85rem;
    }

    .site-menu__panel {
        width: 100vw;
    }

    .lightbox__dialog {
        width: min(calc(100vw - 0.75rem), var(--lightbox-dialog-width, 100vw));
        height: calc(100vh - 0.75rem);
        height: calc(100dvh - 0.75rem);
        margin: 0.375rem auto;
    }

    .lightbox.is-detail-open .lightbox__layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .lightbox__info-panel {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        max-height: 42dvh;
        padding: 1rem;
    }

    .lightbox__info-toggle {
        right: 0.75rem;
        bottom: 0.75rem;
        padding: 0.7rem 0.92rem;
    }

    .lightbox__nav--prev,
    .lightbox__nav--next {
        top: auto;
        bottom: 0.75rem;
        transform: none;
    }

    .lightbox__nav--prev {
        left: 0.75rem;
    }

    .lightbox__nav--next {
        right: 0.75rem;
    }
}

@media (max-width: 520px) {
    .hero__actions,
    .upload-actions,
    .admin-card__actions,
    .admin-photo-card__actions,
    .photo-actions,
    .photo-nav {
        flex-direction: column;
    }

    .button,
    .button--ghost,
    .button--danger {
        width: 100%;
    }

    .hero__note {
        max-width: 220px;
    }

    .site-nav {
        gap: 0.35rem;
    }

    .site-nav a,
    .admin-nav a {
        padding-inline: 0.82rem;
    }

    .lightbox__title {
        font-size: 1.25rem;
    }
}
