/* Life in frames · public album */
.al-page {
    --al-base: #f7f0e4;
    --al-card: #fff9ed;
    --al-ink: #282722;
    --al-muted: #675c51;
    --al-line: #dcd0ba;
    --al-accent: #a13d30;
    --al-film: #211f1b;
    --al-serif: 'Source Han Serif CN Web', Georgia, serif;
    color: var(--al-ink);
    background: var(--al-base);
}
[data-theme="dark"] .al-page {
    --al-base: #221f1a;
    --al-card: #2e2821;
    --al-ink: #f5e9d7;
    --al-muted: #c5b29d;
    --al-line: #51453b;
    --al-accent: #e9947e;
    --al-film: #171512;
}
.al-shell {
    width: min(1180px, 100%);
    margin: auto;
    padding: clamp(28px, 6vw, 82px) clamp(18px, 4vw, 44px) clamp(46px, 7vw, 94px);
}
.al-hero {
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    gap: clamp(24px, 5vw, 68px);
    align-items: center;
    margin-bottom: clamp(42px, 7vw, 98px);
}
.al-compact-heading { margin-bottom: clamp(24px, 4vw, 45px); }
.al-kicker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    color: var(--al-accent);
    font: 700 10px/1.55 system-ui, sans-serif;
    letter-spacing: .16em;
}
.al-kicker > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent);
}
.al-kicker > i { width: 14px; height: 1px; background: currentColor; }
.al-intro h1, .al-compact-heading h1 {
    margin: 13px 0 18px;
    color: var(--al-ink);
    font: 750 clamp(40px, 5.5vw, 78px)/1.25 var(--al-serif);
    letter-spacing: -.06em;
    white-space: nowrap;
}
.al-intro h1 span, .al-compact-heading h1 span { color: var(--al-accent); }
.al-intro-text { margin: 0 0 23px; color: var(--al-muted); font-size: clamp(14px, 1.5vw, 16px); }
.al-page .al-jump {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    width: fit-content;
    padding: 8px 0;
    border-bottom: 1px solid var(--al-line);
    color: var(--al-ink);
    font-weight: 650;
    white-space: nowrap;
}
.al-jump span { color: var(--al-accent); font-size: 16px; }
.al-page .al-jump:hover { border-color: var(--al-accent); color: var(--al-accent); }
.al-cover {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border-radius: 12px;
    background: var(--al-film);
    color: #f9edda;
    box-shadow: 0 20px 50px #37251d2b;
}
.al-film-edge {
    display: flex;
    justify-content: space-between;
    padding: 1px 4px;
    color: #dcc5a6;
    font: 650 9px/1.5 system-ui, sans-serif;
    letter-spacing: .15em;
}
.al-cover-image, .al-card-image { display: block; overflow: hidden; position: relative; isolation: isolate; }
.al-cover-image { aspect-ratio: 8 / 5; border-radius: 5px; background: #a78973; }
.al-cover-image img, .al-cover-art svg, .al-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.al-cover-image img, .al-card-image img { transition: transform .4s ease; }
.al-cover-image:hover img, .al-card-image:hover img { transform: scale(1.045); }
.al-art-label {
    position: absolute;
    bottom: 8%;
    left: 8%;
    color: #fff3d5;
    font: 600 clamp(14px, 2.3vw, 21px)/1.2 var(--al-serif);
    letter-spacing: .14em;
}
.al-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #fff3db62;
    border-radius: 50%;
    background: #23201cc4;
    color: #fff8e8;
}
.al-cover-caption {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
    align-items: end;
    padding: 1px 4px 3px;
}
.al-caption-index { display: block; color: #dfaa8c; font-size: 10px; }
.al-cover-caption h2, .al-cover-caption-title {
    display: block;
    margin: 2px 0 0;
    color: #f9edda;
    font: 620 clamp(17px, 2.4vw, 24px)/1.4 var(--al-serif);
    overflow-wrap: anywhere;
}
.al-cover-caption time, .al-cover-edition { color: #dcc5a6; font: 600 11px/1.5 system-ui, sans-serif; white-space: nowrap; }
.al-cover-caption .al-note { grid-column: 1 / -1; margin: 3px 0 0; color: #dfcdb3; }
.al-collection { scroll-margin-top: 95px; }
.al-collection-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--al-line);
}
.al-collection-head h2 {
    margin: 5px 0 0;
    color: var(--al-ink);
    font: 700 clamp(24px, 3.4vw, 38px)/1.4 var(--al-serif);
}
.al-years { display: flex; flex-wrap: wrap; gap: 6px; }
.al-years a, .al-pagination a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 4px 13px;
    border: 1px solid var(--al-line);
    border-radius: 999px;
    color: var(--al-muted);
    font-size: 12px;
}
.al-years a:hover, .al-pagination a:hover { border-color: var(--al-accent); color: var(--al-accent); }
.al-years a[aria-current="page"] { background: var(--al-ink); border-color: var(--al-ink); color: var(--al-base); }
.al-month { margin-top: 30px; }
.al-month-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.al-month-head h3 {
    margin: 0;
    color: var(--al-accent);
    font: 650 15px/1.5 system-ui, sans-serif;
    letter-spacing: .11em;
    font-variant-numeric: tabular-nums;
}
.al-month-head span { flex: 1; height: 1px; background: var(--al-line); }
.al-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 22px); }
.al-card {
    min-width: 0;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--al-line);
    border-radius: 11px;
    background: var(--al-card);
    box-shadow: 0 6px 16px #422c1510;
}
.al-card-image { aspect-ratio: 4 / 3; border-radius: 6px; background: var(--al-line); }
.al-card figcaption { padding: 11px 8px 7px; }
.al-card time { color: var(--al-muted); font: 600 11px/1.5 system-ui, sans-serif; letter-spacing: .06em; }
.al-card h4 {
    margin: 3px 0 0;
    color: var(--al-ink);
    font: 650 clamp(15px, 2vw, 19px)/1.5 var(--al-serif);
    overflow-wrap: anywhere;
}
.al-note {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--al-muted);
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.al-empty {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    align-items: center;
    padding: clamp(16px, 3vw, 25px);
    margin-top: 17px;
    border: 1px dashed var(--al-line);
    border-radius: 12px;
}
.al-empty-mark { color: var(--al-accent); font-size: 27px; }
.al-empty h3 { margin: 0 0 4px; color: var(--al-ink); font: 600 19px/1.4 var(--al-serif); }
.al-empty p, .al-only-cover { margin: 0; color: var(--al-muted); font-size: 13px; }
.al-empty .al-jump { margin-left: auto; }
.al-only-cover { padding: 16px 0; }
.al-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 29px; color: var(--al-muted); }
.al-page :is(a, button):focus-visible { outline: 2px solid var(--al-accent); outline-offset: 3px; }

/* A full image is only requested when the reader opens it. */
.al-lightbox {
    width: min(960px, 94vw);
    max-width: none;
    max-height: 94vh;
    padding: 0;
    border: 1px solid #5b4b3c;
    border-radius: 14px;
    background: #211e1a;
    color: #fff1db;
}
.al-lightbox::backdrop { background: #15110ee0; backdrop-filter: blur(6px); }
.al-viewer { padding: clamp(12px, 2.6vw, 25px); }
.al-viewer-bar, .al-view-stage { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.al-viewer-bar { margin-bottom: 9px; }
.al-viewer-bar .al-kicker { color: #e8a789; }
.al-view-control {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #6f5d49;
    border-radius: 50%;
    background: #30281e;
    color: #fff1db;
    font-size: 18px;
}
.al-view-control:disabled { opacity: .35; cursor: default; }
.al-view-stage img { flex: 1 1 0; min-width: 0; width: 100%; height: min(64vh, 630px); object-fit: contain; }
.al-view-caption { padding-top: 10px; overflow-wrap: anywhere; }
.al-view-caption time { color: #dfc2a7; font-size: 12px; }
.al-view-caption h2 { margin: 2px 0; color: #fff1db; font: 650 22px/1.45 var(--al-serif); }
.al-view-caption p { margin: 5px 0; color: #e9d5bb; white-space: pre-wrap; }
.al-view-caption a { color: #f0a991; font-size: 12px; }
body.al-view-open { overflow: hidden; }

@media (max-width: 760px) {
    .al-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 34px; }
    .al-intro h1 { margin: 9px 0; }
    .al-intro-text { margin-bottom: 6px; }
    .al-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 405px) {
    .al-cover { padding: 9px; gap: 7px; }
    .al-cover-caption time, .al-cover-edition { font-size: 10px; }
    .al-card { padding: 5px; }
    .al-card figcaption { padding: 6px 4px; }
    .al-card h4 { font-size: 14px; }
    .al-card .al-note { -webkit-line-clamp: 2; }
    .al-view-control { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    .al-cover-image img, .al-card-image img { transition: none; }
}

/* Upload and photo management use the admin palette. */
.oa-album-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.oa-album-total { color: var(--oa-muted); font-size: 12px; }
.oa-album-upload {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(16px, 3vw, 30px);
}
.oa-album-upload::before, .oa-album-upload::after { display: none; }
.oa-album-upload .oa-album-drop {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 230px;
    margin: 0;
    border: 1px dashed var(--oa-accent);
    border-radius: 12px;
    background: var(--oa-wash);
    color: var(--oa-ink);
    overflow: hidden;
}
.oa-album-drop:focus-within, .oa-album-drop.is-over { outline: 2px solid var(--oa-accent); outline-offset: 2px; }
.oa-album-drop input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.oa-album-drop-empty { display: grid; justify-items: center; gap: 5px; padding: 14px; text-align: center; }
.oa-album-drop-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    border: 1px solid var(--oa-line);
    border-radius: 50%;
    background: var(--oa-paper);
    color: var(--oa-accent);
    font-size: 23px;
}
.oa-album-drop small, .oa-album-fields small, .oa-album-actions span, .oa-album-file-status { color: var(--oa-muted); }
.oa-album-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.oa-album-drop-change { display: none; position: absolute; bottom: 10px; right: 10px; padding: 3px 9px; border-radius: 7px; background: var(--oa-paper); }
.oa-album-drop.has-preview .oa-album-drop-empty { visibility: hidden; }
.oa-album-drop.has-preview .oa-album-drop-change { display: block; }
.oa-album-fields { display: grid; gap: 9px; min-width: 0; }
.oa-album-fields label { display: block; margin: 0; min-width: 0; }
.oa-album-fields .form-control { margin-top: 4px; }
.oa-album-date { width: min(100%, 195px); }
.oa-album-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.oa-album-actions span, .oa-album-file-status { font-size: 12px; overflow-wrap: anywhere; }
.oa-album-file-status { margin: 0; }
.oa-album-file-status:empty { display: none; }
.oa-album-file-status.is-error { color: var(--oa-error); }
.oa-album-list { display: grid; gap: 13px; }
.oa-album-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto auto;
    grid-template-areas: "thumb summary edit delete";
    align-items: start;
    gap: 9px 12px;
    padding: 12px;
    border: 1px solid var(--oa-line);
    border-radius: 10px;
}
.oa-album-thumb { grid-area: thumb; }
.oa-album-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.oa-album-summary { grid-area: summary; overflow-wrap: anywhere; }
.oa-album-summary time, .oa-album-summary p { color: var(--oa-muted); font-size: 12px; }
.oa-album-summary h3 { margin: 1px 0; font-size: 16px; }
.oa-album-summary p { margin: 3px 0 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.oa-album-edit { grid-area: edit; }
.oa-album-edit > summary { list-style: none; }
.oa-album-edit > summary::-webkit-details-marker { display: none; }
.oa-album-edit[open] { grid-column: 2 / -1; grid-row: 2; padding-top: 8px; border-top: 1px solid var(--oa-line); }
.oa-album-edit form { margin-top: 8px; }
.oa-album-edit form button { justify-self: start; }
.oa-album-delete { grid-area: delete; margin: 0; }
@media (max-width: 690px) {
    .oa-album-upload { grid-template-columns: minmax(0, 1fr); }
    .oa-album-upload .oa-album-drop { min-height: 174px; }
    .oa-album-item { grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-areas: "thumb summary summary" ". edit delete"; }
    .oa-album-edit[open] { grid-row: 3; grid-column: 1 / -1; }
}
