:root {
    color-scheme: light;
    --paper: #f8f9f6;
    --ink: #263b34;
    --muted: #7c857e;
    --line: #e4e8e0;
    --green: #355846;
    --soft: #e8eee4;
    --sidebar-width: 250px;
    --gallery-columns: 5;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font:
        14px/1.55 system-ui,
        -apple-system,
        sans-serif;
}
a {
    color: inherit;
    text-decoration: none;
}
button,
input,
textarea {
    font: inherit;
}
button,
a,
input,
textarea {
    -webkit-tap-highlight-color: transparent;
}
button {
    cursor: pointer;
}
button:disabled {
    cursor: default;
    opacity: 0.45;
}
:focus-visible {
    outline: 3px solid #93b99c;
    outline-offset: 4px;
}
.muted {
    color: var(--muted);
}
.page-loading {
    cursor: progress;
}
.navigation-message {
    position: fixed;
    inset: 12px 20px auto auto;
    z-index: 5;
    max-width: min(420px, calc(100vw - 40px));
    padding: 12px 18px;
    border: 1px solid #d9b9b2;
    border-radius: 10px;
    background: #fff5f2;
    color: #a73d31;
}
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    padding: 35px 22px 20px;
    background: #f0f3ed;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}
.sidebar-resize {
    position: absolute;
    inset: 0 -4px 0 auto;
    width: 8px;
    z-index: 2;
    cursor: col-resize;
    touch-action: none;
}
.sidebar-resize:hover,
.sidebar-resize:focus-visible,
.sidebar-resizing .sidebar-resize {
    background: #93b99c80;
}
.sidebar-resizing {
    user-select: none;
    cursor: col-resize;
}
.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 21px;
    font-weight: 750;
    letter-spacing: -0.8px;
    margin-bottom: 45px;
}
.brand-dot {
    color: #b39665;
    margin-left: -8px;
}
.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--green);
    color: white;
    font-size: 25px;
    font-weight: 400;
}
.nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.7px;
    color: #90988f;
    margin: 12px 12px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 8px;
    color: #6a776b;
    margin: 3px 0;
}
.nav-item > span:first-child {
    font-size: 21px;
    line-height: 1;
}
.sidebar > nav[aria-label='Bibliothek'] .nav-item > span:first-child {
    flex: 0 0 24px;
    min-width: 0;
    text-align: center;
}
.nav-item small {
    margin-left: auto;
    color: #879382;
    font-size: 11px;
}
.nav-item:hover,
.nav-item.active {
    background: #e0e8dc;
    color: #34503d;
}
.nav-item.active {
    font-weight: 650;
}
.quiet {
    border: 0;
    background: none;
    color: var(--muted);
    padding: 10px;
    font-size: 12px;
}
.main {
    margin-left: var(--sidebar-width);
    padding: 0 48px;
}
.topbar {
    height: 86px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}
.topbar .muted {
    margin-left: 13px;
}
.intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 35px 0 24px;
}
h1 {
    font:
        400 clamp(32px, 3.5vw, 51px)/1.12 Georgia,
        serif;
    letter-spacing: -1.7px;
    margin: 0 0 13px;
    overflow-wrap: anywhere;
}
.intro p.muted {
    margin: 0;
    font-size: 12px;
}
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    grid-auto-rows: 1fr;
    gap: 20px;
    margin: 24px 0;
}
.job-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.job-card h2 {
    font-size: 18px;
}
.job-card progress {
    width: 100%;
    accent-color: var(--green);
}
.job-estimate {
    margin: 18px 0;
    padding: 12px 14px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.job-estimate dt,
.job-estimate .muted {
    font-size: 12px;
}
.job-estimate dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
}
.job-estimate [data-job-eta] {
    font-size: 16px;
    font-weight: 600;
    color: var(--green);
    font-variant-numeric: tabular-nums;
}
.job-command {
    margin: 16px 0;
    padding: 10px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    font: 11px/1.6 monospace;
    user-select: all;
}
.job-message {
    min-height: 3em;
    overflow-wrap: anywhere;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 15px 0 3px;
}
.chip {
    display: inline-block;
    padding: 5px 13px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: transparent;
    color: #6c7c61;
    font-size: 11px;
}
.chip:hover,
.chip.selected {
    background: var(--soft);
    border-color: #b2c1a9;
}
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 27px 0 15px;
}
h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.2px;
}
.gallery-view {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    font-size: 12px;
}
.gallery-view select {
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 4px 8px;
}
.section-heading .muted {
    font-size: 10px;
}
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.gallery-filters select {
    max-width: 100%;
}
.photos-section > .section-heading {
    flex-wrap: wrap;
}
.photos-section {
    margin-top: 31px;
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(var(--gallery-columns), minmax(0, 1fr));
    gap: 13px;
}
.photo-tile {
    position: relative;
}
.photo-card {
    display: block;
    width: 100%;
    position: relative;
    border: 0;
    padding: 0;
    aspect-ratio: 1.15;
    border-radius: 9px;
    overflow: hidden;
    background: #e7ebe2;
    text-align: left;
}
.photo-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.photo-card[data-preview-state='ready']:not([data-priority='1']) > img {
    opacity: 0.5;
}
[data-preview-state='loading'] > img,
[data-preview-state='error'] > img {
    opacity: 0;
}
[data-preview-state='loading']::after {
    content: '';
    position: absolute;
    top: calc(50% - 12px);
    left: calc(50% - 12px);
    width: 24px;
    height: 24px;
    border: 3px solid #91a68b66;
    border-top-color: #739565;
    border-radius: 50%;
    pointer-events: none;
    animation: preview-loading 0.8s linear infinite;
}
[data-preview-state='error']::after {
    content: 'vorschau nicht verfügbar';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    color: #83967a;
    font-size: 12px;
    pointer-events: none;
}
@keyframes preview-loading {
    to {
        transform: rotate(360deg);
    }
}
.photo-card:hover img {
    transform: scale(1.035);
}
.photo-caption {
    position: absolute;
    inset: auto 0 0;
    padding: 35px 12px 12px;
    background: linear-gradient(transparent, #14231b99);
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}
.photo-card:hover .photo-caption,
.photo-card:focus-visible .photo-caption {
    opacity: 1;
}
.photo-caption strong {
    display: block;
    font-size: 11px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}
.photo-caption small {
    font-size: 9px;
    color: #fffb;
}
.photo-actions {
    position: absolute;
    right: 6px;
    top: 6px;
    display: flex;
    gap: 4px;
}
.photo-actions button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #15201baa;
    color: white;
    font-size: 23px;
}
.photo-actions button[aria-pressed='true'] {
    background: #38654b;
}
.photo-actions button[data-priority='-1'][aria-pressed='true'] {
    background: #943e3e;
}
.reset {
    display: inline-block;
    font-size: 11px;
    margin: 0 0 16px;
    color: #6c7c61;
}
.photo-loader {
    min-height: 40px;
    margin: 25px 0;
    text-align: center;
}
.photo-loader [hidden] {
    display: none;
}
.empty {
    text-align: center;
    padding: 80px 20px;
    border: 1px dashed #cdd7c7;
    border-radius: 12px;
    color: var(--muted);
}
.empty > span {
    font-size: 40px;
    color: #8a9e7c;
}
.empty h2 {
    margin: 15px 0 7px;
    color: var(--ink);
    font:
        27px Georgia,
        serif;
}
.empty p {
    max-width: 380px;
    margin: auto;
    font-size: 12px;
}
dialog {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transition:
        opacity 160ms ease,
        transform 160ms ease,
        display 160ms allow-discrete,
        overlay 160ms allow-discrete;
    padding: 0;
    border: 0;
    border-radius: 15px;
    width: 94vw;
    max-height: 92dvh;
    color: var(--ink);
    background: var(--paper);
}
dialog[open] {
    opacity: 1;
    transform: none;
}
dialog::backdrop {
    opacity: 0;
    transition:
        opacity 160ms ease,
        display 160ms allow-discrete,
        overlay 160ms allow-discrete;
    background: #11231ad9;
    backdrop-filter: blur(8px);
}
dialog[open]::backdrop {
    opacity: 1;
}
@starting-style {
    dialog[open] {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    dialog[open]::backdrop {
        opacity: 0;
    }
}
.viewer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
}
.viewer-stage {
    background: #17221c;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    height: 92dvh;
}
.viewer-stage img {
    width: 100%;
    height: 100%;
    min-width: 0;
    object-fit: contain;
}
.viewer-stage button {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: #15201b99;
    font-size: 25px;
    z-index: 1;
}
#slideshow-stop {
    top: 13px;
    right: 13px;
    width: auto;
    height: auto;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
}
.viewer-close {
    top: 13px;
    left: 13px;
}
.viewer-previous {
    left: 13px;
    top: 50%;
}
.viewer-next {
    right: 13px;
    top: 50%;
}
.viewer-info {
    padding: 30px 25px;
    max-height: 92dvh;
    overflow-y: auto;
    overflow-wrap: anywhere;
}
.viewer-info h2 {
    font:
        25px/1.2 Georgia,
        serif;
}
.viewer-info p {
    font-size: 12px;
}
.viewer-info .chip {
    margin: 10px 0;
}
label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 7px;
}
textarea,
.login-card input:not([type='hidden']) {
    width: 100%;
    border: 1px solid #cdd5c7;
    background: white;
    padding: 12px;
    border-radius: 7px;
    color: var(--ink);
}
.viewer-info form {
    margin-top: 22px;
}
.viewer-info form small {
    display: block;
    font-size: 10px;
    margin: 5px 0 12px;
}
.primary {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 7px;
    color: white;
    background: var(--green);
    padding: 12px 20px;
    font-size: 12px;
}
.primary:hover {
    background: #264b35;
}
.download {
    display: block;
    margin-top: 25px;
    font-size: 12px;
    text-align: center;
}
.login-page {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 25px;
    background:
        radial-gradient(ellipse at 20% 10%, #dce6d1, transparent 60%),
        radial-gradient(ellipse at 90% 90%, #e9e2cd, transparent 60%), var(--paper);
}
.login-card {
    max-width: 445px;
    width: 100%;
    background: #fffd;
    border: 1px solid #fff;
    border-radius: 22px;
    padding: 42px;
    box-shadow: 0 20px 90px #2c432b0a;
}
.login-card .brand-icon {
    margin-bottom: 30px;
}
.login-card h1 {
    font-size: 43px;
    margin-bottom: 28px;
}
.login-card .primary {
    margin-top: 13px;
    text-align: left;
}
.login-card input + label {
    margin-top: 14px;
}
.login-card .primary span {
    float: right;
}
.error {
    color: #a73d31;
    font-size: 12px;
}
@media (max-width: 1100px) {
    :root {
        --sidebar-width: 210px;
    }
    .sidebar {
        padding: 28px 15px 18px;
    }
    .brand {
        font-size: 18px;
    }
    .main {
        padding: 0 28px;
    }
}
@media (max-width: 760px) {
    .gallery-view {
        display: none;
    }
    .gallery-sorting {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .gallery-sorting select {
        max-width: 210px;
    }
    .sidebar-resize {
        display: none;
    }
    .sidebar {
        position: relative;
        width: 100%;
        padding: 16px 20px 10px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .brand {
        margin-bottom: 12px;
    }
    .sidebar > .nav-label {
        display: none;
    }
    .sidebar > nav[aria-label='Bibliothek'] {
        flex-wrap: wrap;
    }
    .sidebar > nav {
        display: flex;
        gap: 10px;
    }
    .nav-item {
        font-size: 12px;
        padding: 8px 12px;
    }
    .nav-item small {
        margin-left: 9px;
    }
    .logout-form {
        position: absolute;
        top: 19px;
        right: 14px;
    }
    .main {
        margin-left: 0;
        padding: 0 20px 40px;
    }
    .topbar {
        height: 57px;
    }
    .intro {
        padding-top: 26px;
    }
    h1 {
        font-size: 40px;
    }
    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }
    .photo-caption {
        opacity: 1;
        padding-bottom: 8px;
    }
    .viewer-layout {
        grid-template-columns: 1fr;
    }
    .viewer-info {
        padding: 24px;
        max-height: none;
    }
    .login-card {
        padding: 30px;
    }
}
@media (prefers-reduced-motion: reduce) {
    *:not(dialog) {
        transition: none !important;
    }
}

.person-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 24px 0;
}
.person-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    min-width: 0;
}
.person-card > img {
    width: 112px;
    height: 112px;
    border-radius: 10px;
    object-fit: cover;
}
.person-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
    max-width: 100%;
}
.person-form label,
.person-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.person-form input,
.person-form select,
.person-filter select {
    max-width: 100%;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}
.viewer-persons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}
.viewer-persons img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 6px;
}

#viewer.slideshow {
    transition: none;
    transform: none;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    background: black;
}
#viewer.slideshow .viewer-layout {
    display: block;
}
#viewer.slideshow .viewer-stage {
    height: 100dvh;
    background: black;
}
#viewer.slideshow .viewer-info,
#viewer.slideshow .viewer-close,
#viewer.slideshow .viewer-previous,
#viewer.slideshow .viewer-next {
    display: none;
}
