.website-media-section {
    width: min(92%, 75rem);
    margin: clamp(2rem, 5vw, 4.5rem) auto;
}
.website-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    align-items: start;
    gap: 1.25rem;
}
.website-media-section > h2 {
    margin: 0 0 1.5rem;
    text-align: center;
    font-size: clamp(2rem, 5vw, 3rem);
}
.website-media-card {
    overflow: hidden;
    border: 1px solid var(--holiday-border, #ddd3c8);
    border-radius: .55rem;
    background: var(--holiday-surface, #fffaf3);
    color: var(--holiday-text, #40302d);
}
.website-media-card > div { padding: 1rem; }
.website-media-card h2 { font-size: 1.25rem; margin: .25rem 0; }
.website-media-card img,
.website-media-card video,
.website-editor img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #292320;
}
.website-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.website-editor,
.website-editor-form {
    display: grid;
    gap: 1rem;
}
.website-editor-form { max-width: 42rem; }
details > .website-editor-form { margin-top: 1rem; }
.website-editor-form label { display: grid; gap: .3rem; }
.website-editor-form :is(input, select, textarea) {
    width: 100%;
    padding: .65rem;
    border: 1px solid #b8b2aa;
    border-radius: .35rem;
    background: white;
    color: inherit;
    font: inherit;
}
.website-editor-form button { justify-self: start; }
.website-editor summary { cursor: pointer; }

.website-media-gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: clamp(2rem, 7vw, 6rem) clamp(1rem, 5vw, 4rem);
}
.website-media-gallery > .website-media-card {
    grid-column: span 2;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.website-media-gallery > .website-media-card:nth-child(4n + 2),
.website-media-gallery > .website-media-card:nth-child(4n + 3) {
    grid-column: span 3;
}
.website-media-gallery > .website-media-card > div { padding: .7rem 0 0; }
.website-media-gallery > .website-media-card p { margin: 0; }
.website-media-gallery > p { grid-column: 1 / -1; }

.website-photo-frame {
    position: relative;
    overflow: hidden;
    margin: 0;
    aspect-ratio: var(--ratio, 3 / 4);
    border: var(--frame-border, 0) solid currentColor;
    border-radius: var(--radius, 0);
    background: #e9dfd5;
}
.website-photo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: var(--fit, cover);
    opacity: var(--photo-opacity, 1);
    background: transparent;
}
.website-photo-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--tint, #000);
    opacity: var(--tint-opacity, 0);
    pointer-events: none;
}
.website-editor-form:has(.website-photo-editor) { max-width: none; }
.website-photo-editor {
    display: grid;
    grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.website-photo-options {
    display: grid;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid #ded4cb;
    border-radius: .5rem;
}
.website-photo-options input[type="checkbox"] { width: auto; }
.website-photo-options label:has(input[type="checkbox"]) { display: block; }
.website-photo-preview {
    position: sticky;
    top: 5rem;
    width: min(100%, 22rem);
    margin-inline: auto;
}
.website-photo-preview [hidden],
.website-photo-editor[hidden] { display: none; }
.website-upload {
    padding: 1rem;
    border: 1px dashed #897368;
    border-radius: .5rem;
}
.website-upload[data-dragging] { background: #f5e9dc; }
@media (max-width: 42rem) {
    .website-media-gallery, .website-photo-editor { grid-template-columns: minmax(0, 1fr); }
    .website-media-gallery > .website-media-card:nth-child(n) { grid-column: 1; }
    .website-photo-preview { position: static; }
}

.website-media-gallery h2 a { color: inherit; }

.gallery-category-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: 80vh;
    padding: clamp(2rem, 8vw, 7rem) 1.25rem;
    background: #2c211e;
    color: #fff;
    text-align: center;
}
.gallery-category-hero img,
.gallery-category-hero::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.gallery-category-hero img { object-fit: cover; }
.gallery-category-hero::after {
    content: '';
    background: linear-gradient(transparent, rgb(0 0 0 / .56)), rgb(0 0 0 / .32);
}
.gallery-category-hero h1 {
    font-size: clamp(2.5rem, 7vw, 6rem);
    margin: .5rem 0;
}
.gallery-category-hero a { color: inherit; }
.gallery-category-jump {
    display: inline-block;
    margin-top: 1rem;
    border: 1px solid currentColor;
    padding: .7rem 1.15rem;
    text-decoration: none;
}
.gallery-category-photos {
    columns: 4 15rem;
    column-gap: .65rem;
    padding: .65rem;
    scroll-margin-top: 5rem;
}
.gallery-category-photos .website-media-card {
    break-inside: avoid;
    margin-bottom: .65rem;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.gallery-category-photos .website-media-card > div { padding: .55rem .25rem .85rem; }
.gallery-category-photos .website-media-card p { margin: 0; }

.gallery-category-photos .gallery-photo-natural { aspect-ratio: auto; }
.gallery-category-photos .gallery-photo-natural img { height: auto; aspect-ratio: auto; }

.gallery-admin {
    --editor-line: #dfd5cb;
    --editor-accent: #683f3d;
    font-family: "Instrument Sans", system-ui, sans-serif;
    gap: 1.35rem;
}
.gallery-admin h2, .gallery-admin h3 { font-family: Georgia, serif; }
.gallery-admin > details,
.gallery-admin > form {
    border-radius: .85rem;
    border-color: var(--editor-line);
    box-shadow: none;
}
.gallery-admin > details > summary {
    color: var(--editor-accent);
    font-weight: 650;
}
.gallery-form-fields { display: grid; gap: .85rem; }
.gallery-admin .gallery-form-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}
.gallery-admin .website-upload { background: #faf6f1; }
.gallery-admin .website-photo-preview {
    background: #f7f2eb;
    border-radius: .75rem;
    padding: 1rem;
    width: min(100%, 32rem);
}
.gallery-admin .website-photo-preview [data-preview-empty] {
    padding: 2rem 1rem;
    text-align: center;
    color: #65564e;
}
.gallery-admin input[type="range"] { accent-color: var(--editor-accent); padding: 0; }
.gallery-admin input[type="color"] { height: 2.5rem; }
.gallery-admin-tile {
    min-width: 0;
    overflow: hidden;
    border-radius: .75rem;
    border: 1px solid var(--editor-line);
    background: #fff;
}
.gallery-admin-cover { position: relative; }
.gallery-admin-cover img { object-fit: cover; background: #eee5dd; }
.gallery-admin-tile-body { display: grid; gap: .35rem; padding: .9rem; }
.gallery-admin-tile-body a,
.gallery-admin > p a { color: var(--editor-accent); }
.gallery-admin-tile-body p,
.gallery-order-form p { margin: 0; font-size: .9rem; color: #62544b; }
.gallery-move {
    display: flex;
    gap: .25rem;
    position: absolute;
    inset: .5rem .5rem auto auto;
}
.gallery-move[hidden], .gallery-order-form[hidden] { display: none; }
.gallery-move button {
    min-width: 2rem;
    min-height: 2rem;
    border: 1px solid var(--editor-line);
    border-radius: .35rem;
    background: #fffaf4;
    color: #392923;
    cursor: pointer;
}
.gallery-move button:disabled { opacity: .65; cursor: default; }
.gallery-order-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem 1rem;
}
.gallery-order-form button:disabled { opacity: .55; }
.website-media-gallery .website-media-card h2 a {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    text-decoration: none;
}
@media (max-width: 42rem) {
    .gallery-admin .gallery-form-fields { grid-template-columns: minmax(0, 1fr); }
}

.gallery-photo-group { display: grid; gap: .85rem; }

.gallery-photo-actions a { color: inherit; }
.gallery-photo-page { max-width: 55rem; }
.gallery-photo-page h1 { margin: .6rem 0 1rem; }
.gallery-photo-page > .website-media-card { margin-top: 1.25rem; }
.gallery-photo-page .website-photo-frame { aspect-ratio: auto; }
.gallery-photo-page .website-photo-frame img { height: auto; aspect-ratio: auto; }

.gallery-admin > .gallery-admin-public {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}
.gallery-admin-public a {
    border: 1px solid currentColor;
    padding: .65rem 1rem;
    background: #fff;
    font-family: Georgia, serif;
    text-decoration: none;
}
.gallery-admin-public a:hover { background: #f4eee7; }

.website-media-gallery > .website-media-card > .gallery-card-image,
.gallery-category-photos .website-media-card > .gallery-card-image,
.website-media-card > .gallery-card-image { position: relative; padding: 0; }
