:root {
    color-scheme: light dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f5f7;
    color: #20242b;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: radial-gradient(ellipse at top left, #e4e9f2, transparent 55%), #f4f5f7;
}

.welcome {
    width: min(100%, 46rem);
    padding: clamp(2rem, 7vw, 5rem);
    border: 1px solid rgb(32 36 43 / 9%);
    border-radius: 1.5rem;
    background: rgb(255 255 255 / 85%);
    box-shadow: 0 1.5rem 5rem rgb(25 33 48 / 9%);
}

.eyebrow {
    margin: 0 0 1rem;
    color: #536b9a;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(2.5rem, 8vw, 5rem);
    letter-spacing: -0.06em;
    line-height: 0.98;
}

.intro {
    max-width: 36rem;
    margin: 1.5rem 0 0;
    color: #59616f;
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    line-height: 1.6;
}

.status {
    margin: 2rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgb(32 36 43 / 12%);
    color: #737c8a;
    font-size: 0.9rem;
}

.auth-card h1,
.dashboard-title {
    max-width: none;
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1.05;
}

form {
    display: grid;
    gap: 0.75rem;
    margin-top: 2rem;
}

label {
    margin-top: 0.5rem;
    font-size: 0.92rem;
    font-weight: 650;
}

input:not([type="checkbox"]) {
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #c8ced8;
    border-radius: 0.65rem;
    background: #fff;
    color: #20242b;
    font: inherit;
}

button {
    min-height: 3rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 0.65rem;
    background: #344f82;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

button:focus-visible,
input:focus-visible {
    outline: 3px solid #83a8fa;
    outline-offset: 2px;
}

.form-error {
    margin: 1.5rem 0 0;
    padding: 0.8rem 1rem;
    border: 1px solid #c45656;
    border-radius: 0.65rem;
    color: #9c2929;
}

.login-page {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    padding: clamp(1rem, 4vw, 3rem);
    background:
        radial-gradient(ellipse at 16% 8%, rgb(210 196 165 / 13%), transparent 36rem),
        radial-gradient(ellipse at 90% 92%, rgb(210 196 165 / 7%), transparent 30rem),
        #0c0d0f;
    color: #f2f2f0;
}

.login-card {
    width: min(100%, 29rem);
    padding: clamp(1.6rem, 6vw, 3rem);
    border: 1px solid rgb(210 196 165 / 65%);
    border-radius: 1rem;
    background: rgb(13 14 16 / 88%);
    box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 38%);
    backdrop-filter: blur(22px);
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #f2f2f0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.login-brand svg {
    width: 1.7rem;
    height: 1.7rem;
    fill: none;
    stroke: #d2c4a5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.login-eyebrow {
    margin: 2.6rem 0 0.65rem;
    color: #d2c4a5;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.login-card h1 {
    max-width: none;
    font-size: clamp(2.3rem, 8vw, 3.25rem);
    letter-spacing: -0.055em;
    line-height: 1;
    margin-top:2.3rem;
}

.login-intro {
    margin: 0.85rem 0 0;
    color: #a9aaac;
    font-size: 0.95rem;
    line-height: 1.55;
}

.login-form {
    display: grid;
    gap: 1.2rem;
    margin-top: 2rem;
}

.login-field {
    display: grid;
    gap: 0.55rem;
}

.login-field label {
    margin: 0;
    color: #d5d5d2;
    font-size: 0.82rem;
    font-weight: 600;
}

.login-field input:not([type="checkbox"]) {
    min-height: 3.2rem;
    border-color: rgb(255 255 255 / 14%);
    border-radius: 0.55rem;
    background: #17181a;
    color: #f2f2f0;
}

.login-field input:not([type="checkbox"]):focus-visible {
    border-color: #d2c4a5;
    outline: 2px solid rgb(210 196 165 / 45%);
    outline-offset: 2px;
}

.login-form button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.2rem;
    margin: 0.3rem 0 0;
    padding: 0.75rem 1rem;
    border: 1px solid #d2c4a5;
    border-radius: 0.55rem;
    background: #d2c4a5;
    color: #171716;
    transition: background-color 150ms ease, transform 150ms ease;
}

.login-form button:hover {
    transform: translateY(-1px);
    background: #e0d4bb;
}

.login-form button svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.login-form button:focus-visible {
    outline: 2px solid #d2c4a5;
    outline-offset: 3px;
}

.login-error {
    margin: 1.2rem 0 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgb(226 116 116 / 48%);
    border-radius: 0.55rem;
    background: rgb(125 34 34 / 16%);
    color: #f0b7b7;
    font-size: 0.85rem;
}

.login-notice {
    margin: 1.5rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgb(255 255 255 / 9%);
    color: #85878a;
    font-size: 0.75rem;
    line-height: 1.5;
}

.logout-form {
    display: flex;
    justify-content: flex-start;
}

.secondary-button {
    background: #59616f;
}

.admin-nav,
.page-heading,
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-nav {
    justify-content: flex-start;
    margin-top: 2rem;
}

.admin-nav a,
.back-link,
.action-cell a {
    color: #344f82;
    font-weight: 650;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

.management-page {
    width: min(100%, 70rem);
}

.media-upload-page > h2,
.upload-panel h2,
.upload-queue h2 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.upload-panel,
.upload-queue {
    margin-top: 1.75rem;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid rgb(32 36 43 / 12%);
    border-radius: 1rem;
    background: rgb(255 255 255 / 42%);
}

.upload-panel .management-form {
    margin-top: 1rem;
}

.upload-panel select[multiple] {
    min-height: 9rem;
    padding: 0.5rem;
    border: 1px solid #c8ced8;
    border-radius: 0.65rem;
    background: #fff;
    color: #20242b;
    font: inherit;
}

.media-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.media-tag-form {
    display: grid;
    gap: 0.4rem;
    margin: 0.75rem 0 0;
}

.media-tag-form textarea {
    width: 100%;
    min-height: 4rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #c8ced8;
    border-radius: 0.65rem;
    background: #fff;
    color: #20242b;
    font: inherit;
    resize: vertical;
}

.media-tag-form button {
    justify-self: start;
}

.media-tag-status {
    color: #536b9a;
    font-size: 0.85rem;
}

.search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 0.75rem 1rem;
}

.search-form label {
    margin-top: 0;
}

.search-form select {
    width: 100%;
    min-height: 3rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #c8ced8;
    border-radius: 0.65rem;
    background: #fff;
    color: #20242b;
    font: inherit;
}

.search-form button {
    grid-column: 1 / -1;
    justify-self: start;
}

.search-result-count {
    margin: 1.5rem 0;
    color: #59616f;
}

.search-result-link {
    display: grid;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.search-result-link:hover strong,
.search-result-link:focus-visible strong {
    text-decoration: underline;
}

.upload-queue > .help-text {
    max-width: 52rem;
}

.queue-list {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.queue-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgb(32 36 43 / 12%);
    border-radius: 0.75rem;
}

.queue-item-details {
    display: grid;
    min-width: 0;
    gap: 0.35rem;
}

.queue-item-details strong {
    overflow-wrap: anywhere;
}

.queue-item-details span,
.queue-item-details p {
    margin: 0;
    color: #59616f;
    font-size: 0.9rem;
}

.queue-item-details progress {
    width: min(100%, 24rem);
    height: 0.55rem;
    accent-color: #344f82;
}

.queue-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.queue-empty {
    padding: 1rem 0;
    color: #737c8a;
}

.queue-error {
    color: #9c2929 !important;
}

.gallery-page {
    width: min(100%, 82rem);
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.album-card {
    display: grid;
    min-height: 9rem;
    align-content: center;
    gap: 0.5rem;
    padding: 1.25rem;
    border: 1px solid rgb(32 36 43 / 12%);
    border-radius: 1rem;
    background: rgb(255 255 255 / 45%);
    color: inherit;
    text-decoration: none;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.album-card:hover,
.album-card:focus-visible {
    transform: translateY(-2px);
    border-color: #8298c4;
    background: #fff;
}

.album-card-icon {
    color: #536b9a;
    font-size: 1.5rem;
}

.album-card-name {
    overflow-wrap: anywhere;
    font-size: 1.15rem;
    font-weight: 700;
}

.album-card-count {
    color: #737c8a;
    font-size: 0.9rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.media-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgb(32 36 43 / 12%);
    border-radius: 0.9rem;
    background: rgb(255 255 255 / 50%);
}

.media-preview-link,
.media-preview {
    display: block;
}

.media-preview,
.media-preview img,
.media-video,
.media-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
}

.media-preview img {
    display: block;
    object-fit: cover;
    background: #e8ebf0;
}

.media-video {
    display: block;
    background: #111;
}

.media-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #e8ebf0, #d9dfe9);
    color: #59616f;
    font-weight: 700;
}

.media-card-info {
    display: grid;
    gap: 0.4rem;
    padding: 0.9rem 1rem 1rem;
}

.media-card-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-card-info > span {
    color: #737c8a;
    font-size: 0.88rem;
}

.media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-top: 0.35rem;
}

.media-actions a {
    color: #344f82;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

.gallery-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-pagination a {
    color: #344f82;
    font-weight: 650;
    text-underline-offset: 0.2em;
}

.metadata-counts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    gap: 0.75rem;
    margin: 2rem 0;
}

.metadata-counts div {
    padding: 1rem;
    border: 1px solid rgb(32 36 43 / 12%);
    border-radius: 0.75rem;
    background: rgb(255 255 255 / 45%);
}

.metadata-counts dt {
    color: #59616f;
    font-size: 0.9rem;
}

.metadata-counts dd {
    margin: 0.35rem 0 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.management-page .back-link {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.page-heading {
    margin-bottom: 1.5rem;
}

.button-link {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border-radius: 0.65rem;
    background: #344f82;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.notice,
.empty-state {
    padding: 1rem;
    border-radius: 0.65rem;
    background: rgb(82 128 95 / 12%);
}

.table-wrap {
    overflow-x: auto;
}

.osm-page table {
    min-width: 46rem;
}

.osm-page td {
    padding: 0.75rem 0.55rem;
    border-top: 1px solid rgb(32 36 43 / 10%);
    vertical-align: top;
}

.osm-page th {
    padding: 0.65rem 0.55rem;
}

.osm-page td:first-child {
    width: 2.5rem;
}

.osm-attribution {
    font-size: 0.88rem;
}

.osm-attribution a {
    color: inherit;
}

.tag-chip {
    display: inline-block;
    margin: 0.1rem 0.2rem 0.1rem 0;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgb(52 79 130 / 12%);
    font-size: 0.8rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.map-body {
    display: block;
    padding: 0;
    background: #eef1f5;
}

.map-page {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2.5rem);
}

.map-header {
    margin-bottom: 1.25rem;
}

.map-header .back-link {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.map-header .eyebrow {
    margin-bottom: 0.5rem;
}

.map-header .intro {
    margin-top: 0.7rem;
}

.map-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin: 1rem 0;
    padding: 0.8rem 1rem;
    border: 1px solid rgb(32 36 43 / 12%);
    border-radius: 0.85rem;
    background: rgb(255 255 255 / 78%);
}

.map-toolbar label {
    margin: 0;
}

.map-toolbar select {
    min-height: 2.65rem;
    max-width: min(100%, 24rem);
    padding: 0.45rem 0.65rem;
    border: 1px solid #c8ced8;
    border-radius: 0.55rem;
    background: #fff;
    color: #20242b;
    font: inherit;
}

.map-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.map-playback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
}

.map-playback button {
    min-height: 2.65rem;
    margin: 0;
    padding: 0.5rem 0.8rem;
}

.map-playback .secondary-button {
    min-height: 2.65rem;
}

.map-status {
    min-height: 1.5rem;
    margin: 0.5rem 0;
    color: #59616f;
}

.map-error:not([hidden]) {
    margin: 0.5rem 0;
    padding: 0.65rem 0.85rem;
    border-radius: 0.55rem;
    background: rgb(180 62 62 / 12%);
    color: #8f3030;
    font-size: 0.9rem;
}

.map-canvas {
    width: 100%;
    height: min(74vh, 58rem);
    min-height: 28rem;
    overflow: hidden;
    border: 1px solid rgb(32 36 43 / 14%);
    border-radius: 1rem;
    background: #e7ebef;
    box-shadow: 0 1rem 3rem rgb(25 33 48 / 12%);
}

.map-privacy-note {
    margin: 0.7rem 0 0;
    color: #687180;
    font-size: 0.83rem;
}

.map-photo-marker-shell,
.map-cluster-shell {
    border: 0;
    background: transparent;
}

.map-gl-marker {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    cursor: pointer;
}

.map-gl-cluster-marker {
    position: relative;
    display: block;
    width: 72px;
    height: 54px;
    cursor: pointer;
}

.map-photo-marker,
.map-cluster-thumbnails {
    position: relative;
    display: flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #344f82;
    box-shadow: 0 2px 8px rgb(0 0 0 / 35%);
}

.map-photo-marker img,
.map-cluster-thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-photo-marker > span {
    position: absolute;
    right: -1px;
    bottom: -1px;
    min-width: 1.2rem;
    padding: 0.08rem 0.2rem;
    border-radius: 1rem;
    background: #263e6d;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    text-align: center;
}

.map-cluster-thumbnails {
    position: absolute;
    top: 3px;
    left: 2px;
    width: 48px;
    height: 48px;
    justify-content: flex-start;
    border-radius: 1.2rem;
}

.map-cluster-thumbnails img {
    width: 24px;
    flex: 0 0 24px;
    border-right: 1px solid #fff;
}

.map-cluster-count {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    min-width: 1.7rem;
    height: 1.7rem;
    place-items: center;
    padding: 0 0.25rem;
    border: 2px solid #fff;
    border-radius: 1rem;
    background: #344f82;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
}

.map-photo-popup {
    display: grid;
    gap: 0.35rem;
    max-width: 14rem;
}

.map-cluster-popup {
    display: grid;
    gap: 0.6rem;
    min-width: 14rem;
}

.map-cluster-popup-list {
    display: grid;
    gap: 0.45rem;
    max-height: 18rem;
    overflow-y: auto;
}

.map-cluster-popup-list a {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    color: #263e6d;
    font-size: 0.83rem;
    text-decoration: none;
}

.map-cluster-popup-list img {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 0.35rem;
}

.map-photo-popup a {
    display: grid;
    gap: 0.35rem;
    color: #263e6d;
    font-weight: 700;
    text-decoration: none;
}

.map-photo-popup img {
    width: 100%;
    max-height: 9rem;
    object-fit: cover;
    border-radius: 0.4rem;
}

.map-photo-popup time {
    color: #59616f;
    font-size: 0.8rem;
}

@media (max-width: 680px) {
    .map-toolbar {
        align-items: stretch;
    }

    .map-toolbar > label,
    .map-toolbar > select,
    .map-playback {
        width: 100%;
    }

    .map-playback {
        margin-left: 0;
    }

    .map-playback select {
        width: auto;
        margin-left: auto;
    }

    .map-canvas {
        min-height: 55vh;
        height: 68vh;
        border-radius: 0.65rem;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid rgb(32 36 43 / 12%);
    vertical-align: top;
}

th {
    color: #59616f;
    font-size: 0.85rem;
}

.badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.15rem 0.45rem;
    border-radius: 99px;
    background: #e6ebf4;
    color: #344f82;
    font-size: 0.72rem;
}

.action-cell {
    text-align: right;
    white-space: nowrap;
}

.action-cell form {
    display: inline;
    margin: 0 0 0 0.5rem;
}

.text-button {
    min-height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #344f82;
    font: inherit;
    font-weight: 650;
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

.danger-button {
    color: #a43e3e;
}

.management-form {
    gap: 0.75rem;
}

.management-form input:not([type="checkbox"]),
.management-form select,
.management-form textarea {
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #c8ced8;
    border-radius: 0.65rem;
    background: #fff;
    color: #20242b;
    font: inherit;
}

.management-form select[multiple] {
    min-height: 7rem;
}

.management-form input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
    accent-color: #344f82;
}

.management-form input:focus-visible,
.management-form select:focus-visible,
.management-form textarea:focus-visible {
    outline: 3px solid #83a8fa;
    outline-offset: 2px;
}

.permission-section {
    min-width: 0;
    margin: 1rem 0 0;
    padding: 1rem;
    border: 1px solid rgb(32 36 43 / 14%);
    border-radius: 0.85rem;
}

.permission-section legend {
    padding: 0 0.35rem;
    font-weight: 700;
}

.choice-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 0.55rem 1rem;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    font-weight: 450;
}

.help-text {
    margin: 0.25rem 0 0.75rem;
    color: #737c8a;
    font-size: 0.9rem;
}

.album-permission-group {
    padding: 0.75rem 0;
    border-top: 1px solid rgb(32 36 43 / 10%);
}

.album-permission-group h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.form-actions {
    justify-content: flex-start;
    margin-top: 0.75rem;
}

.form-actions button {
    min-width: 9rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
    :root {
        background: #12151b;
        color: #f1f3f7;
    }

    body {
        background: radial-gradient(ellipse at top left, #252d3c, transparent 55%), #12151b;
    }

    .welcome {
        border-color: rgb(255 255 255 / 10%);
        background: rgb(28 33 42 / 88%);
        box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 24%);
    }

    .map-body {
        background: #12151b;
    }

    .map-toolbar {
        border-color: rgb(255 255 255 / 12%);
        background: rgb(28 33 42 / 92%);
    }

    .map-toolbar select {
        border-color: #4b5362;
        background: #171b23;
        color: #f1f3f7;
    }

    .map-status,
    .map-privacy-note {
        color: #b6bfcd;
    }

    .map-error:not([hidden]) {
        color: #ffb7b7;
    }

    .map-canvas {
        border-color: rgb(255 255 255 / 15%);
    }

    .map-photo-popup a {
        color: #a6bcf2;
    }

    .map-cluster-popup-list a {
        color: #a6bcf2;
    }

    .map-photo-popup time {
        color: #b6bfcd;
    }

    .eyebrow {
        color: #a6bcf2;
    }

    .intro,
    .status {
        color: #b6bfcd;
    }

    .status {
        border-color: rgb(255 255 255 / 12%);
    }

    input:not([type="checkbox"]) {
        border-color: #4b5362;
        background: #171b23;
        color: #f1f3f7;
    }

    .form-error {
        color: #ffaaaa;
    }

    .management-form input:not([type="checkbox"]),
    .management-form select,
    .management-form textarea {
        border-color: #4b5362;
        background: #171b23;
        color: #f1f3f7;
    }

    .admin-nav a,
    .back-link,
    .action-cell a,
    .text-button {
        color: #a6bcf2;
    }

    .danger-button {
        color: #ffaaaa;
    }

    th,
    td {
        border-color: rgb(255 255 255 / 12%);
    }

    th,
    .help-text {
        color: #b6bfcd;
    }

    .badge {
        background: #30394a;
        color: #c4d2f6;
    }

    .permission-section {
        border-color: rgb(255 255 255 / 14%);
    }

    .upload-panel,
    .upload-queue,
    .queue-item,
    .album-card,
    .media-card,
    .metadata-counts div {
        border-color: rgb(255 255 255 / 13%);
        background: rgb(20 24 31 / 45%);
    }

    .album-card:hover,
    .album-card:focus-visible {
        background: #252d3c;
    }

    .upload-panel select[multiple] {
        border-color: #4b5362;
        background: #171b23;
        color: #f1f3f7;
    }

    .search-form select {
        border-color: #4b5362;
        background: #171b23;
        color: #f1f3f7;
    }

    .queue-item-details span,
    .queue-item-details p {
        color: #b6bfcd;
    }

    .queue-error {
        color: #ffaaaa !important;
    }

    .album-card-count,
    .media-card-info > span,
    .metadata-counts dt {
        color: #b6bfcd;
    }

    .media-preview img,
    .media-placeholder {
        background: #30394a;
    }

    .media-placeholder {
        color: #c4d2f6;
    }

    .media-actions a {
        color: #a6bcf2;
    }

    .gallery-pagination a {
        color: #a6bcf2;
    }

    .album-permission-group {
        border-color: rgb(255 255 255 / 10%);
    }
}

@media (max-width: 620px) {
    body {
        padding: 1rem;
    }

    .welcome {
        padding: 1.25rem;
        border-radius: 1rem;
    }

    .search-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .search-form button {
        grid-column: auto;
        justify-self: stretch;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .queue-item {
        flex-direction: column;
    }

    .queue-actions {
        justify-content: flex-start;
    }

    th,
    td {
        padding: 0.7rem 0.45rem;
    }
}

/* Accueil photographique inspiré des murs de photos masonry. */
.photo-wall-body {
    display: block;
    min-height: 100vh;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #0c0d0f;
    color: #f2f2f0;
}

.photo-wall-app {
    min-height: 100vh;
    width: 100%;
    touch-action: manipulation;
}

.photo-wall-card {
    --photo-wall-period-color: #d2c4a5;
    position: fixed;
    z-index: 30;
    top: 1rem;
    left: 1rem;
    width: min(22rem, calc(100vw - 2rem));
    padding: 1rem 1.1rem 0.9rem;
    border: 1px solid var(--photo-wall-period-color);
    border-radius: 0.8rem;
    background: rgb(13 14 16 / 60%);
    box-shadow: 0 1rem 3rem rgb(0 0 0 / 32%);
    backdrop-filter: blur(22px);
}

.photo-wall-brand {
    display: block;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: 0.035em;
    text-decoration: none;
}

.photo-wall-current-period {
    min-height: 1.2rem;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgb(255 255 255 / 10%);
    color: var(--photo-wall-period-color);
    font-size: 0.77rem;
    font-weight: 650;
    letter-spacing: 0.045em;
    text-transform: none;
    transition: opacity 140ms ease, color 140ms ease;
}

.photo-wall-current-period.is-menu-label {
    color: #fff;
}

.photo-wall-current-period.is-fading {
    opacity: 0;
}

.photo-wall-card-heading {
    max-height: 3rem;
    overflow: hidden;
    opacity: 1;
    transition: max-height 180ms ease, padding 180ms ease, opacity 120ms ease, border-color 180ms ease;
}

.photo-wall-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.15rem;
    padding-top: 0.8rem;
    transition: padding 180ms ease;
}

.photo-wall-nav a,
.photo-wall-logout button {
    display: grid;
    width: 2rem;
    height: 2rem;
    min-height: 0;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    background: transparent;
    color: #a7a8aa;
    cursor: pointer;
    margin: 0;
    text-decoration: none;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.photo-wall-logout {
    display: block;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    margin: 0;
    padding: 0;
}

.photo-wall-nav svg,
.photo-wall-logout svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.65;
}

.photo-wall-home-mark,
.photo-wall-up-mark {
    transform-origin: center;
    transition: opacity 140ms ease, transform 140ms ease;
}

.photo-wall-up-mark {
    opacity: 0;
    transform: translateY(3px);
}

.photo-wall-home-link.is-scroll-top .photo-wall-home-mark {
    opacity: 0;
    transform: translateY(-3px);
}

.photo-wall-home-link.is-scroll-top .photo-wall-up-mark {
    opacity: 1;
    transform: translateY(0);
}

.photo-wall-nav a:hover,
.photo-wall-nav a:focus-visible,
.photo-wall-nav a.is-current,
.photo-wall-logout button:hover,
.photo-wall-logout button:focus-visible {
    border-color: rgb(255 255 255 / 12%);
    background: rgb(255 255 255 / 9%);
    color: #fff;
}

.photo-wall-card.is-compact {
    padding: 0.55rem 0.75rem;
}

.photo-wall-card.is-compact .photo-wall-card-heading {
    max-height: 0;
    padding: 0;
    opacity: 0;
}

.photo-wall-card.is-compact .photo-wall-nav {
    padding-top: 0;
}

.photo-wall-card.is-compact .photo-wall-nav a,
.photo-wall-card.is-compact .photo-wall-logout,
.photo-wall-card.is-compact .photo-wall-logout button {
    width: 1.65rem;
    height: 1.65rem;
}

.photo-wall-card.is-compact .photo-wall-logout {
    flex-basis: 1.65rem;
}

.photo-wall-card.is-compact .photo-wall-nav svg,
.photo-wall-card.is-compact .photo-wall-logout svg {
    width: 0.95rem;
    height: 0.95rem;
}

.photo-wall-card.is-compact .photo-wall-current-period {
    min-height: 0;
    margin-top: 0.3rem;
    padding-top: 0.3rem;
}

.photo-wall-main {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 4px;
}

.photo-masonry {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 4px;
}

.photo-masonry-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    row-gap: 4px;
}

.photo-masonry-column > .photo-wall-tile {
    margin: 0;
}

@media (min-width: 1900px) {
    .photo-masonry {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1300px) {
    .photo-masonry {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .photo-masonry {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.photo-wall-tile {
    display: block;
    width: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 0;
    color: inherit;
    text-decoration: none;
    vertical-align: top;
}

.photo-wall-frame {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: #1b1c1f;
}

.photo-wall-frame img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    background-color: #242528;
    background-position: center;
    background-size: cover;
    object-fit: cover;
    transition: filter 220ms ease, transform 260ms ease;
}

.photo-wall-tile:hover img,
.photo-wall-tile:focus-visible img {
    filter: brightness(0.9);
    transform: scale(1.08);
}

.photo-wall-caption {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 0.2rem;
    padding: 2.25rem 0.7rem 0.65rem;
    background: linear-gradient(transparent, rgb(0 0 0 / 72%));
    opacity: 0;
    transition: opacity 180ms ease;
}

.photo-wall-caption strong,
.photo-wall-caption time {
    overflow: hidden;
    color: white;
    font-size: 0.72rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-wall-caption time {
    color: rgb(255 255 255 / 70%);
    font-size: 0.65rem;
}

.photo-wall-tile:hover .photo-wall-caption,
.photo-wall-tile:focus-visible .photo-wall-caption {
    opacity: 1;
}

.photo-wall-file-type {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background: linear-gradient(140deg, #242529, #101113);
    color: #d2c4a5;
    font-size: 1.7rem;
    font-weight: 700;
}

.photo-wall-loader,
.photo-wall-empty {
    padding: 2rem 1rem;
    color: #a7a8aa;
    text-align: center;
}

.photo-wall-sentinel {
    height: 1px;
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: #f2f2f0;
}

.photo-lightbox::backdrop {
    background: rgb(0 0 0 / 94%);
}

.photo-lightbox-layout {
    position: relative;
    z-index: 1;
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    grid-template-rows: minmax(0, 1fr) 104px;
}

.photo-lightbox-backdrop {
    position: fixed;
    z-index: 0;
    inset: -3rem;
    width: calc(100vw + 6rem);
    height: calc(100dvh + 6rem);
    background-color: #090a0c;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(2.5rem) brightness(0.65);
    transform: scale(1.02);
}

.photo-lightbox-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    grid-column: 1;
    grid-row: 1;
    overflow: hidden;
    background: transparent;
}

.photo-lightbox-toolbar {
    position: absolute;
    z-index: 2;
    inset: 1rem 1rem auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #a9aaac;
    font-size: 0.8rem;
}

.photo-lightbox button {
    min-height: 0;
    margin: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
}

#photo-lightbox-close,
.photo-lightbox-step {
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 15%);
    border-radius: 50%;
    background: rgb(0 0 0 / 48%);
    color: #fff;
    transition: background-color 150ms ease;
}

.photo-lightbox-step[hidden] {
    display: none;
}

.photo-lightbox button svg {
    display: block;
    width: 1.3rem;
    height: 1.3rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

#photo-lightbox-close:hover,
.photo-lightbox-step:hover {
    background: rgb(255 255 255 / 17%);
}

.photo-lightbox-figure {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.photo-lightbox-figure img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: saturate(1.2);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

.photo-lightbox-stage,
.photo-lightbox-stage button,
.photo-lightbox-strip,
.photo-lightbox-thumb {
    user-select: none;
    -webkit-user-select: none;
}

.photo-lightbox-step {
    position: absolute;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
}

.photo-lightbox-previous {
    left: 0.8rem;
}

.photo-lightbox-next {
    right: 0.8rem;
}

.photo-lightbox-info {
    display: flex;
    min-width: 0;
    grid-column: 2;
    grid-row: 1 / 3;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.5rem;
    border-left: 1px solid rgb(255 255 255 / 9%);
    background: rgb(7 8 10 / 20%);
    backdrop-filter: blur(1rem);
}

.photo-lightbox-info h2 {
    max-width: none;
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.4;
}

.photo-lightbox-info > p {
    overflow-wrap: anywhere;
    margin: 0 0 1.25rem;
    color: #c2c3c5;
    font-size: 0.83rem;
}

.photo-lightbox-info dl {
    display: grid;
    grid-template-columns: minmax(5.5rem, 0.8fr) minmax(0, 1.2fr);
    gap: 0.75rem 0.8rem;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid rgb(255 255 255 / 9%);
    font-size: 0.76rem;
}

.photo-lightbox-info dt {
    color: #8f9195;
    font-weight: 500;
}

.photo-lightbox-info dd {
    min-width: 0;
    margin: 0;
    color: #e2e2e0;
    overflow-wrap: anywhere;
}

.photo-lightbox-osm {
    position: relative;
    order: -1;
    margin: 0 0 1.25rem;
}

.photo-lightbox-osm h3 {
    max-width: none;
    margin: 0 3rem 1rem 0;
    color: inherit;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.4;
}

.photo-lightbox-mini-map {
    display: block;
    width: 100%;
    height: 9rem;
    overflow: hidden;
    border-radius: 0.45rem;
    background: #202326;
}

.photo-lightbox-mini-map .leaflet-tile-pane {
    filter: saturate(0.8) brightness(0.86);
}

.photo-lightbox-mini-map .leaflet-control-zoom a {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.9rem;
    line-height: 1.35rem;
}

.photo-lightbox-mini-map .leaflet-control-zoom {
    margin: 0.35rem;
}

.photo-lightbox-mini-map .mapboxgl-ctrl-top-right {
    top: 0.35rem;
    right: 0.35rem;
}

.photo-lightbox-mini-map .mapboxgl-ctrl-group button {
    width: 1.55rem;
    height: 1.55rem;
}

.photo-lightbox-gl-marker {
    display: block;
    width: 0.9rem;
    height: 0.9rem;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #db5b51;
    box-shadow: 0 1px 6px rgb(0 0 0 / 65%);
}

.photo-lightbox-mini-map .leaflet-control-attribution,
.map-body.site-theme .leaflet-control-attribution {
    background: rgb(7 8 10 / 82%);
    color: #d8d8d5;
    font-size: 0.58rem;
}

.photo-lightbox-mini-map .leaflet-control-attribution a,
.map-body.site-theme .leaflet-control-attribution a,
.photo-lightbox-mini-map .mapboxgl-ctrl-attrib a,
.map-body.site-theme .mapboxgl-ctrl-attrib a {
    color: #e0d4bb;
}

.photo-lightbox-mini-map .mapboxgl-ctrl-attrib,
.map-body.site-theme .mapboxgl-ctrl-attrib {
    background: rgb(7 8 10 / 82%);
    color: #d8d8d5;
    font-size: 0.58rem;
}

.photo-lightbox-osm-attribution {
    position: absolute;
    right: 0.35rem;
    bottom: 0.35rem;
    z-index: 500;
    padding: 0.15rem 0.3rem;
    border-radius: 0.2rem;
    background: rgb(0 0 0 / 72%);
    color: #f2f2f0;
    font-size: 0.58rem;
    line-height: 1.2;
    text-decoration: none;
    visibility: hidden;
}

.photo-lightbox-osm-attribution:hover,
.photo-lightbox-osm-attribution:focus-visible {
    text-decoration: underline;
}

.photo-lightbox-open-map {
    position: absolute;
    top: 0.15rem;
    right: 0;
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 50%;
    background: rgb(0 0 0 / 55%);
    color: #f2f2f0;
    text-decoration: none;
    transition: background-color 150ms ease, color 150ms ease;
}

.photo-lightbox-open-map:hover,
.photo-lightbox-open-map:focus-visible {
    background: rgb(255 255 255 / 15%);
    color: #fff;
}

.photo-lightbox-open-map svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.photo-lightbox-strip {
    display: flex;
    min-width: 0;
    grid-column: 1;
    grid-row: 2;
    align-items: center;
    gap: 0.55rem;
    overflow-x: auto;
    padding: 0.65rem 1rem;
    border-top: 1px solid rgb(255 255 255 / 8%);
    background: rgb(5 6 7 / 20%);
    backdrop-filter: blur(1rem);
    scrollbar-width: none;
}

html.lightbox-open,
body.lightbox-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.photo-lightbox-strip::-webkit-scrollbar {
    display: none;
}

.photo-lightbox-thumb {
    width: 4.35rem;
    height: 4.35rem;
    flex: 0 0 4.35rem;
    overflow: hidden;
    padding: 2px;
    border: 2px solid transparent;
    border-radius: 0.35rem;
    background: transparent;
    opacity: 0.68;
}

.photo-lightbox-thumb[aria-current="true"] {
    border-color: #d2c4a5;
    opacity: 1;
}

.photo-lightbox-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 760px) {
    .photo-wall-card {
        top: 0.65rem;
        left: 50%;
        width: min(22rem, calc(100vw - 1.3rem));
        padding: 0.75rem 0.85rem 0.65rem;
        transform: translateX(-50%);
    }

    .photo-wall-current-period {
        margin-top: 0.45rem;
        padding-top: 0.45rem;
    }

    .photo-wall-card.is-compact {
        padding: 0.5rem 0.65rem;
    }

    .photo-masonry {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-wall-main {
        padding-top: var(--photo-wall-mobile-top-offset, 8.5rem);
    }

    .photo-wall-caption {
        opacity: 1;
        padding: 1.6rem 0.45rem 0.45rem;
    }

    .photo-wall-caption strong {
        font-size: 0.65rem;
    }

    .photo-lightbox-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) 5rem minmax(10rem, 30vh);
    }

    .photo-lightbox-stage {
        grid-column: 1;
        grid-row: 1;
    }

    .photo-lightbox-strip {
        grid-column: 1;
        grid-row: 2;
        padding-block: 0.35rem;
    }

    .photo-lightbox-thumb {
        width: 3.8rem;
        height: 3.8rem;
        flex-basis: 3.8rem;
    }

    .photo-lightbox-info {
        grid-column: 1;
        grid-row: 3;
        padding: 1rem;
        border-top: 1px solid rgb(255 255 255 / 9%);
        border-left: 0;
    }

    .photo-lightbox-info .photo-lightbox-osm {
        margin-bottom: 1rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .photo-wall-frame img {
        transition: none;
    }
}

/* Thème partagé des pages, dans la continuité de la galerie et de la connexion. */
body.site-theme {
    color-scheme: dark;
    background:
        radial-gradient(ellipse at 16% 8%, rgb(210 196 165 / 10%), transparent 36rem),
        radial-gradient(ellipse at 90% 92%, rgb(210 196 165 / 5%), transparent 30rem),
        #0c0d0f;
    color: #f2f2f0;
}

.site-theme .welcome {
    border-color: rgb(255 255 255 / 10%);
    background: rgb(13 14 16 / 86%);
    box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 32%);
    backdrop-filter: blur(18px);
}

.site-theme h1,
.site-theme h2,
.site-theme h3,
.site-theme legend,
.site-theme strong {
    color: #f2f2f0;
}

.site-theme .eyebrow,
.site-theme .album-card-icon {
    color: #d2c4a5;
}

.site-theme .intro,
.site-theme .status,
.site-theme .help-text,
.site-theme .search-result-count,
.site-theme .queue-item-details span,
.site-theme .queue-item-details p,
.site-theme .album-card-count,
.site-theme .media-card-info > span,
.site-theme .map-status,
.site-theme .map-privacy-note {
    color: #a9aaac;
}

.site-theme .status {
    border-color: rgb(255 255 255 / 12%);
}

.site-theme a,
.site-theme .text-button {
    color: #d2c4a5;
}

.site-theme a:hover,
.site-theme .text-button:hover {
    color: #e0d4bb;
}

.site-theme button:not(.secondary-button):not(.danger-button):not(.text-button),
.site-theme .button-link {
    border: 1px solid #d2c4a5;
    background: #d2c4a5;
    color: #171716;
}

.site-theme button:not(.secondary-button):not(.danger-button):not(.text-button):hover,
.site-theme .button-link:hover {
    background: #e0d4bb;
    color: #171716;
}

.site-theme .secondary-button {
    border: 1px solid rgb(255 255 255 / 16%);
    background: #303235;
    color: #f2f2f0;
}

.site-theme .danger-button {
    color: #f0a5a5;
}

.site-theme input:not([type="checkbox"]),
.site-theme select,
.site-theme textarea,
.site-theme .upload-panel select[multiple] {
    border-color: rgb(255 255 255 / 16%);
    background: #17181a;
    color: #f2f2f0;
}

.site-theme input::placeholder,
.site-theme textarea::placeholder {
    color: #85878a;
}

.site-theme input:focus-visible,
.site-theme select:focus-visible,
.site-theme textarea:focus-visible,
.site-theme button:focus-visible,
.site-theme a:focus-visible {
    outline: 2px solid #d2c4a5;
    outline-offset: 3px;
}

.site-theme input[type="checkbox"] {
    accent-color: #d2c4a5;
}

.site-theme .form-error,
.site-theme .queue-error {
    border-color: rgb(226 116 116 / 48%);
    color: #f0b7b7;
}

.site-theme .notice,
.site-theme .empty-state {
    border: 1px solid rgb(210 196 165 / 18%);
    background: rgb(210 196 165 / 7%);
    color: #d8d7d2;
}

.site-theme .upload-panel,
.site-theme .upload-queue,
.site-theme .queue-item,
.site-theme .album-card,
.site-theme .media-card,
.site-theme .metadata-counts div {
    border-color: rgb(255 255 255 / 12%);
    background: rgb(20 21 23 / 78%);
}

.site-theme .album-card:hover,
.site-theme .album-card:focus-visible {
    border-color: rgb(210 196 165 / 65%);
    background: #1c1d1f;
}

.site-theme .media-preview img,
.site-theme .media-placeholder {
    background: #202123;
}

.site-theme .media-placeholder {
    color: #d2c4a5;
}

.site-theme .permission-section {
    border-color: rgb(255 255 255 / 15%);
}

.site-theme .album-permission-group,
.site-theme th,
.site-theme td,
.site-theme .action-cell {
    border-color: rgb(255 255 255 / 12%);
}

.site-theme th {
    color: #d2c4a5;
}

.site-theme .badge,
.site-theme .tag-chip {
    background: rgb(210 196 165 / 12%);
    color: #e0d4bb;
}

body.map-body.site-theme {
    display: block;
    padding: 0;
    background: #0c0d0f;
}

.map-body.site-theme .map-page {
    color: #f2f2f0;
}

.map-body.site-theme .map-toolbar {
    border-color: rgb(255 255 255 / 12%);
    background: rgb(13 14 16 / 90%);
    box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 20%);
}

.map-body.site-theme .map-toolbar select {
    border-color: rgb(255 255 255 / 16%);
    background: #17181a;
    color: #f2f2f0;
}

.map-body.site-theme .map-canvas {
    border-color: rgb(255 255 255 / 14%);
    background: #17181a;
    box-shadow: 0 1rem 3rem rgb(0 0 0 / 30%);
}

.map-body.site-theme .map-error:not([hidden]) {
    background: rgb(125 34 34 / 20%);
    color: #f0b7b7;
}

.map-body.site-theme .map-photo-popup a,
.map-body.site-theme .map-cluster-popup-list a {
    color: #d2c4a5;
}

.map-body.site-theme .map-photo-popup time {
    color: #a9aaac;
}

/* Carte immersive : les commandes restent regroupées sur les bords du globe. */
body.map-body.site-theme {
    width: 100%;
    min-width: 320px;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    padding: 0;
    background: #101113;
}

.map-body.site-theme .map-page.map-fullscreen {
    position: relative;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 46%, #202326 0, #111214 70%);
}

.map-body.site-theme .map-globe-canvas {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.map-edge-button {
    display: grid;
    width: 58px;
    height: 58px;
    min-height: 0;
    place-items: center;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 17%);
    border-radius: 17px;
    background: rgb(34 35 37 / 92%);
    color: #e7e4df;
    box-shadow: 0 8px 24px rgb(0 0 0 / 28%), inset 0 1px rgb(255 255 255 / 5%);
    cursor: pointer;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

#photo-map-app .map-edge-button {
    border-color: rgb(255 255 255 / 17%);
    background: rgb(34 35 37 / 92%);
    color: #e7e4df;
}

.map-edge-button:hover,
.map-edge-button:focus-visible {
    border-color: rgb(210 196 165 / 55%);
    background: rgb(47 47 46 / 96%);
    color: #f4ead3;
}

#photo-map-app .map-edge-button:hover,
#photo-map-app .map-edge-button:focus-visible {
    border-color: rgb(210 196 165 / 55%);
    background: rgb(47 47 46 / 96%);
    color: #f4ead3;
}

.map-edge-button:active {
    transform: scale(0.96);
}

.map-edge-button:focus-visible,
.map-panel-close:focus-visible {
    outline: 2px solid #d2c4a5;
    outline-offset: 3px;
}

.map-edge-button svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.map-home-button,
.map-edge-actions,
.map-zoom-stack,
.map-controls-panel,
.map-feedback,
.map-privacy-note,
.map-panel-scrim {
    position: absolute;
    z-index: 10;
}

.map-home-button {
    top: 20px;
    left: 20px;
    text-decoration: none;
}

.map-home-button svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.map-edge-actions {
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-edge-actions .is-active {
    border-color: rgb(210 196 165 / 75%);
    background: rgb(210 196 165 / 18%);
    color: #e8d7b0;
}

#photo-map-app .map-edge-actions .is-active {
    border-color: rgb(210 196 165 / 75%);
    background: rgb(210 196 165 / 18%);
    color: #e8d7b0;
}

.map-zoom-stack {
    bottom: 20px;
    left: 20px;
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 17%);
    border-radius: 17px;
    background: rgb(34 35 37 / 92%);
    box-shadow: 0 8px 24px rgb(0 0 0 / 28%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.map-zoom-stack .map-edge-button {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
}

#photo-map-app .map-zoom-stack .map-edge-button {
    border: 0;
    background: transparent;
    box-shadow: none;
}

#photo-map-app .map-zoom-stack .map-edge-button:hover,
#photo-map-app .map-zoom-stack .map-edge-button:focus-visible {
    background: rgb(255 255 255 / 7%);
}

.map-zoom-stack .map-edge-button + .map-edge-button {
    border-top: 1px solid rgb(255 255 255 / 12%);
}

.map-zoom-stack svg {
    width: 23px;
    height: 23px;
}

.map-controls-panel {
    z-index: 31;
    top: 20px;
    right: 20px;
    width: min(370px, calc(100vw - 40px));
    max-height: calc(100dvh - 40px);
    overflow: auto;
    padding: 1.2rem;
    border: 1px solid rgb(210 196 165 / 32%);
    border-radius: 21px;
    background: rgb(15 16 18 / 96%);
    color: #f2f2f0;
    box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 48%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.map-controls-panel[hidden],
.map-panel-scrim[hidden] {
    display: none;
}

.map-controls-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.map-controls-heading .eyebrow {
    margin: 0 0 0.3rem;
    color: #d2c4a5;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.map-controls-heading h2 {
    margin: 0;
    color: #f2f2f0;
    font-size: 1.2rem;
    font-weight: 500;
}

.map-panel-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: 12px;
    background: rgb(255 255 255 / 5%);
    color: #e7e4df;
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
}

#photo-map-app .map-panel-close {
    border: 1px solid rgb(255 255 255 / 13%);
    background: rgb(255 255 255 / 5%);
    color: #e7e4df;
}

.map-controls-panel .map-toolbar {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.map-controls-panel .map-toolbar label {
    color: #d2c4a5;
    font-size: 0.82rem;
}

.map-controls-panel .map-toolbar select {
    width: 100%;
    max-width: none;
    min-height: 2.8rem;
    border-color: rgb(255 255 255 / 14%);
    border-radius: 11px;
    background: #1a1b1e;
    color: #f2f2f0;
}

.map-controls-panel .map-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.4rem;
    color: #f2f2f0;
}

.map-controls-panel .map-check input {
    accent-color: #d2c4a5;
}

.map-controls-panel .map-playback {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0.35rem 0 0;
}

.map-controls-panel .map-playback button {
    min-height: 2.7rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgb(210 196 165 / 25%);
    border-radius: 10px;
    background: rgb(210 196 165 / 11%);
    color: #e8d7b0;
    font-size: 0.82rem;
}

#photo-map-app .map-controls-panel .map-playback button:not(.secondary-button):not(.danger-button):not(.text-button) {
    border: 1px solid rgb(210 196 165 / 25%);
    background: rgb(210 196 165 / 11%);
    color: #e8d7b0;
}

.map-controls-panel .map-playback .secondary-button {
    border-color: rgb(255 255 255 / 13%);
    background: rgb(255 255 255 / 5%);
    color: #e4e4e1;
}

.map-controls-panel .map-playback button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.map-controls-panel .map-playback label {
    align-self: center;
    grid-column: 1 / 2;
    margin-top: 0.45rem;
}

.map-controls-panel .map-playback select {
    grid-column: 2 / 4;
    margin-top: 0.35rem;
}

.map-panel-scrim {
    z-index: 30;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgb(0 0 0 / 28%);
    cursor: default;
}

#photo-map-app .map-panel-scrim {
    border: 0;
    background: rgb(0 0 0 / 28%);
}

.map-feedback {
    right: 20px;
    bottom: 62px;
    z-index: 9;
    max-width: min(28rem, calc(100vw - 110px));
    pointer-events: none;
}

.map-body.site-theme .map-feedback .map-status {
    display: inline-block;
    min-height: 0;
    margin: 0;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 999px;
    background: rgb(20 21 23 / 72%);
    color: #e2dfd8;
    font-size: 0.74rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.map-body.site-theme .map-feedback .map-error:not([hidden]) {
    margin: 0;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgb(190 83 83 / 28%);
    border-radius: 12px;
    background: rgb(35 15 16 / 88%);
    color: #f0c6c4;
    font-size: 0.8rem;
}

.map-body.site-theme .map-privacy-note {
    right: 50%;
    bottom: 14px;
    z-index: 8;
    max-width: min(30rem, calc(100vw - 110px));
    margin: 0;
    color: rgb(230 230 225 / 60%);
    font-size: 0.67rem;
    text-align: right;
    text-shadow: 0 1px 5px #000;
    transform: translateX(50%);
    pointer-events: none;
}

.map-globe-canvas .mapboxgl-ctrl-attrib,
.map-globe-canvas .leaflet-control-attribution {
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 8px 0 0 0;
    background: rgb(15 16 18 / 72%) !important;
    color: rgb(235 235 230 / 70%) !important;
    backdrop-filter: blur(8px);
}

.map-globe-canvas .mapboxgl-ctrl-attrib a,
.map-globe-canvas .leaflet-control-attribution a {
    color: #d2c4a5 !important;
}

@media (max-width: 600px) {
    .map-home-button {
        top: 12px;
        left: 12px;
    }

    .map-edge-actions {
        top: 12px;
        right: 12px;
        gap: 8px;
    }

    .map-edge-button {
        width: 50px;
        height: 50px;
        border-radius: 15px;
    }

    .map-zoom-stack {
        bottom: 12px;
        left: 12px;
        border-radius: 15px;
    }

    .map-zoom-stack .map-edge-button {
        width: 50px;
        height: 50px;
    }

    .map-controls-panel {
        top: 12px;
        right: 12px;
        width: min(360px, calc(100vw - 24px));
        max-height: calc(100dvh - 24px);
        padding: 1rem;
        border-radius: 18px;
    }

    .map-feedback {
        right: 12px;
        bottom: 58px;
        max-width: calc(100vw - 82px);
    }

    .map-body.site-theme .map-privacy-note {
        right: 50%;
        bottom: 12px;
        max-width: calc(100vw - 82px);
    }
}

@media (max-width: 620px) {
    body.site-theme:not(.map-body) {
        padding: 1rem;
    }
}

/* Mur de voyage animé réservé à l'écran de connexion. */
.login-page {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(1rem, 5vw, 5rem);
    background: #0c0d0f;
}

.login-photo-backdrop {
    position: fixed;
    z-index: -1;
    inset: -12vh -4vw;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.45rem, 1vw, 1rem);
    overflow: hidden;
    opacity: 0.86;
    transform: rotate(-4deg) scale(1.12);
    transform-origin: center;
    pointer-events: none;
}

.login-photo-column {
    --login-photo-gap: clamp(0.45rem, 1vw, 1rem);
    --login-photo-seam-offset: clamp(0.225rem, 0.5vw, 0.5rem);
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-self: center;
    gap: var(--login-photo-gap);
    animation: login-photo-drift 240s linear infinite;
    will-change: transform;
}

.login-photo-column-2 {
    animation-duration: 285s;
    animation-delay: -23s;
    animation-direction: reverse;
}

.login-photo-column-3 {
    animation-duration: 330s;
    animation-delay: -19s;
}

.login-photo-column-4 {
    animation-duration: 375s;
    animation-delay: -37s;
    animation-direction: reverse;
}

.login-photo-stack {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: clamp(0.45rem, 1vw, 1rem);
}

.login-photo-stack img {
    display: block;
    width: 100%;
    height: clamp(12rem, 26vh, 22rem);
    flex: 0 0 auto;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 0.35rem;
    background: #17181a;
    object-fit: cover;
    filter: saturate(0.9);
}

.login-photo-shade {
    position: fixed;
    z-index: 0;
    inset: 0;
    background:
        linear-gradient(90deg, rgb(8 9 10 / 88%) 0%, rgb(8 9 10 / 70%) 35%, rgb(8 9 10 / 28%) 75%, rgb(8 9 10 / 42%) 100%),
        linear-gradient(0deg, rgb(8 9 10 / 34%), transparent 45%, rgb(8 9 10 / 20%));
    pointer-events: none;
}

.login-card {
    position: relative;
    z-index: 1;
    margin-inline: auto;
    background: rgb(13 14 16 / 0%);
    box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 42%);
    backdrop-filter: blur(22px);
}

@keyframes login-photo-drift {
    from { transform: translateY(0); }
    to { transform: translateY(calc(-50% - var(--login-photo-seam-offset))); }
}

@media (max-width: 680px) {
    .login-page {
        place-items: center;
        padding: 1rem;
    }

    .login-photo-backdrop {
        inset: -8vh -18vw;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
        opacity: 0.75;
        transform: rotate(-5deg) scale(1.18);
    }

    .login-photo-column {
        --login-photo-gap: 0.45rem;
        --login-photo-seam-offset: 0.225rem;
    }

    .login-photo-column-4 {
        display: none;
    }

    .login-photo-stack,
    .login-photo-column {
        gap: 0.45rem;
    }

    .login-photo-stack img {
        height: clamp(10rem, 24vh, 16rem);
    }

    .login-photo-shade {
        background:
            linear-gradient(90deg, rgb(8 9 10 / 65%), rgb(8 9 10 / 48%)),
            linear-gradient(0deg, rgb(8 9 10 / 45%), rgb(8 9 10 / 38%));
    }

    .login-card {
        margin-inline: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-photo-column {
        animation: none;
    }
}
