@charset "UTF-8";

/* Full-frame viewing is separate from the existing, cropped mosaic. */
.family-photo-open {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: transparent;
    cursor: zoom-in;
}
.family-photo-open[hidden],
.yaan-family-album-hint[hidden] { display: none; }
.family-photo-open-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 50%;
    background: rgba(15,38,25,.72);
    transition: background .2s ease;
}
.family-photo-open svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.5; }
.family-photo-open:hover .family-photo-open-icon { background: #244c35; }
.family-photo-open:focus-visible { outline: 3px solid #e6f2be; outline-offset: -5px; }
.yaan-family-gallery-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-top: 10px; }
.yaan-family-gallery-meta .yaan-family-credit { margin: 0 0 0 auto; }
.yaan-family-album-hint { margin: 0; color: #53604d; font: 400 12px/1.7 var(--sans); }

html.panda-album-open { overflow: hidden; scrollbar-gutter: stable; }
.panda-album {
    --album-paper: #f9fbf5;
    --album-muted: #cbd8cf;
    box-sizing: border-box;
    width: min(1180px, calc(100% - 40px));
    height: min(900px, calc(100% - 40px));
    height: min(900px, calc(100dvh - 40px));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 20px 24px;
    border: 1px solid rgba(220,233,222,.2);
    border-radius: 6px;
    overflow: hidden;
    color: var(--album-paper);
    background: #10251b;
    box-shadow: 0 24px 80px rgba(0,0,0,.28);
    overscroll-behavior: contain;
}
.panda-album[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 18px; }
.panda-album::backdrop { background: rgba(8,18,12,.9); }
.panda-album-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panda-album-header > div { min-width: 0; }
.panda-album-header p { margin: 0 0 3px; color: var(--album-muted); font: 500 11px/1.6 var(--script); letter-spacing: .18em; }
.panda-album-header h2 { margin: 0; color: inherit; font: 500 22px/1.5 var(--serif); letter-spacing: .08em; }
.panda-album-control {
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(220,233,222,.4);
    border-radius: 50%;
    color: var(--album-paper);
    background: transparent;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.panda-album-control svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.panda-album-control:hover { border-color: #dce9de; background: #284b36; }
.panda-album-control:active { background: #365f46; }
.panda-album-control:focus-visible,
.panda-album-feedback button:focus-visible { outline: 2px solid #e6f2be; outline-offset: 4px; }
.panda-album-stage { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 16px; min-height: 0; touch-action: pan-y pinch-zoom; }
.panda-album-frame { position: relative; min-width: 0; min-height: 0; height: 100%; }
.panda-album-image { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.panda-album-image:not([src]),
.panda-album.is-loading .panda-album-image { visibility: hidden; }
.panda-album-feedback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; text-align: center; pointer-events: none; }
.panda-album-feedback p { max-width: 360px; margin: 0; font: 400 15px/1.8 var(--sans); color: var(--album-muted); }
.panda-album-feedback button { min-height: 44px; padding: 8px 16px; border: 1px solid #a8beae; border-radius: 3px; color: var(--album-paper); background: #284b36; font: 400 14px/1.5 var(--sans); cursor: pointer; pointer-events: auto; }
.panda-album-feedback [hidden] { display: none; }
.panda-album-footer { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 16px; padding-top: 14px; border-top: 1px solid rgba(220,233,222,.2); }
.panda-album-footer p { margin: 0; }
.panda-album-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.panda-album-caption strong { color: var(--album-paper); font: 500 19px/1.6 var(--serif); letter-spacing: .06em; }
.panda-album-caption span { color: var(--album-muted); font: 500 11px/1.6 var(--script); letter-spacing: .1em; }
.panda-album-count { color: var(--album-muted); font: 400 14px/1.6 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.panda-album-credit { justify-self: end; color: var(--album-muted); font: 400 12px/1.7 var(--sans); white-space: nowrap; }

@media (max-width: 640px) {
    html.panda-album-open { scrollbar-gutter: auto; }
    .family-photo-open-icon { top: 9px; right: 9px; width: 30px; height: 30px; }
    .yaan-family-album-hint { font-size: 11px; }
    .panda-album {
        width: 100vw;
        height: 100%;
        height: 100dvh;
        margin: 0;
        padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
        border: 0;
        border-radius: 0;
    }
    .panda-album[open] { gap: 14px; }
    .panda-album-header h2 { font-size: 19px; letter-spacing: .04em; }
    .panda-album-header p { font-size: 10px; letter-spacing: .13em; }
    .panda-album-stage { grid-template-columns: 44px minmax(0,1fr) 44px; grid-template-rows: minmax(0,1fr) 44px; gap: 12px; }
    .panda-album-frame { grid-column: 1 / -1; grid-row: 1; }
    .panda-album-prev { grid-column: 1; grid-row: 2; }
    .panda-album-next { grid-column: 3; grid-row: 2; }
    .panda-album-footer { grid-template-columns: minmax(0,1fr) auto; gap: 6px 12px; padding-top: 12px; }
    .panda-album-caption { display: block; }
    .panda-album-caption strong { display: block; font-size: 18px; }
    .panda-album-caption span { display: block; font-size: 10px; }
    .panda-album-count { align-self: start; padding-top: 4px; }
    .panda-album-credit { grid-column: 1 / -1; justify-self: start; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .family-photo-open-icon,
    .panda-album-control { transition: none; }
}
