/* The album is a quiet paper surface; photographs carry the experience. */
.album-dialog.lightbox-dialog {
  width:min(1120px,calc(100% - 40px));max-width:1120px;max-height:calc(100dvh - 32px);
  padding:0 24px 22px;border:0;border-radius:5px;background:#fffefa;color:#302a40;
  text-align:left;box-shadow:0 24px 75px -25px #28203880;overflow:auto;overscroll-behavior:contain;
  scrollbar-color:#b3a4c7 #fffefa;
}
.album-dialog.lightbox-dialog::backdrop {background:#31274499;backdrop-filter:none}
.album-topbar {display:flex;align-items:center;gap:18px;padding:22px 58px 19px 0;position:sticky;top:0;z-index:3;background:#fffefa}
.album-topbar>div {min-width:0;flex:1}
.album-kicker {display:none}
.album-topbar h2 {font-size:22px;letter-spacing:-.02em;line-height:1.5;margin:0;overflow-wrap:anywhere}
.album-counter {flex:none;font-size:13px;font-variant-numeric:tabular-nums;color:#574475;letter-spacing:.04em;margin-left:auto;padding:8px 10px;background:#ebe2f5;border:0;border-radius:2px;white-space:nowrap}
.album-topbar .dialog-close {right:0;top:17px;position:absolute;color:#57436f;background:#f1eaf8;width:44px;height:44px;border:1px solid #bcabcf;border-radius:3px;box-shadow:none}
.album-topbar .dialog-close:hover {background:#e6dcf2;border-color:#947caf}
.album-stage {position:relative;border-radius:2px;background:#efebf5;border:0;touch-action:pan-y pinch-zoom;isolation:isolate}
.album-canvas {position:relative;display:flex;justify-content:center;align-items:center;height:min(58dvh,570px);min-height:180px;overflow:hidden;border-radius:2px;background:#efebf5}
.album-canvas:has(.album-error:not([hidden])) {min-height:300px}
.album-photo {width:100%;height:100%;object-fit:contain;user-select:none;animation:photo-arrive .25s ease both}
.album-arrow {position:absolute;top:50%;transform:translateY(-50%);z-index:2;display:grid;place-items:center;width:46px;height:46px;border:1px solid #b5a1cd;background:#fffefaed;border-radius:3px;color:#5b4581;box-shadow:none;transition:background .2s,border-color .2s}
.album-arrow svg {width:22px;height:22px;stroke:currentColor;stroke-width:1.6}
.album-prev {left:14px}.album-next {right:14px}
.album-arrow:hover {background:#eee4f9;border-color:#88709f}
.album-arrow:active {background:#e0d4ee}
.album-arrow:focus-visible,.album-thumbnails button:focus-visible {outline:2px solid var(--focus-ring,#645188);outline-offset:3px}
.album-loading,.album-error {position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:25px 58px;text-align:center}
.album-loading {gap:18px;font-size:15px;color:#645372}
.photo-loader {display:flex;gap:8px;align-items:center}
.photo-loader i {width:8px;height:8px;background:#8b75ae;border-radius:2px;animation:photo-dot 1.1s ease-in-out infinite}
.photo-loader i:nth-child(2) {animation-delay:.15s;background:#598f72}
.photo-loader i:nth-child(3) {animation-delay:.3s;background:#b18b3e}
.album-error>span {display:grid;place-items:center;width:48px;height:48px;border:0;border-radius:3px;color:#614982;background:#e0d5ef;font-size:0;margin-bottom:16px}
.album-error>span::after {content:"";width:25px;height:25px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 8a8 8 0 1 1-1 6M4 3v5h5' fill='none' stroke='black' stroke-width='1.7'/%3E%3C/svg%3E") center/contain no-repeat}
.album-error h3 {font-size:22px;line-height:1.5}
.album-error p {font-size:15px;color:#665874;margin:12px 0 22px;line-height:1.8}
.album-error .button {font-size:14px;min-height:48px;max-width:100%;gap:18px;padding:10px 18px;background:#fffefa}
.album-caption-row {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:24px;padding-top:19px}
.album-caption-row>p {max-width:72ch;font-size:16px;color:#473d56;line-height:1.9;overflow-wrap:anywhere;min-width:0}
.album-original {font-size:14px;color:#61497e;white-space:nowrap;min-height:44px;padding:6px 0;display:inline-flex;gap:10px;align-items:center;justify-self:start}
.album-original:hover {text-decoration:underline;text-underline-offset:5px;color:#49366c}
.album-original>span[aria-hidden] {font-size:0;width:16px;height:16px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19 19 5M5 5h14v14' fill='none' stroke='black' stroke-width='1.7'/%3E%3C/svg%3E") center/contain no-repeat}
.album-bottom {display:flex;gap:15px;color:#6b5c7a;font-size:13px;line-height:1.8;margin-top:4px}
.album-swipe-note {display:none}
.album-thumbnails {display:flex;gap:10px;padding:15px 4px 5px;margin-top:15px;border-top:1px solid #d6cade;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#baa9cc #f6f1fa;position:relative}
.album-thumbnails button {flex:0 0 74px;width:74px;height:58px;position:relative;overflow:hidden;border:2px solid transparent;border-radius:3px;background:#e8e0f1;padding:0;transition:border-color .2s,background .2s}
.album-thumbnails img {width:100%;height:100%;object-fit:cover;opacity:.8;transition:opacity .2s}
.album-thumbnails button>span {position:absolute;right:3px;bottom:3px;min-width:21px;border-radius:1px;padding:2px 3px;background:#fffcf7ed;color:#544368;font-size:11px;font-variant-numeric:tabular-nums;font-family:var(--latin);line-height:1.4}
.album-thumbnails button:hover img,.album-thumbnails button[aria-pressed=true] img {opacity:1}
.album-thumbnails button[aria-pressed=true] {border-color:#68528f;background:#e4d9f0}
.album-thumbnails button[aria-pressed=true]>span {background:#68528f;color:#fff}
@keyframes photo-arrive {from{opacity:.45}to{opacity:1}}
@keyframes photo-dot {0%,80%,100%{transform:translateY(0);opacity:.5}40%{transform:translateY(-4px);opacity:1}}
@media(max-width:640px) {
  .album-dialog.lightbox-dialog {width:calc(100% - 20px);max-height:calc(100dvh - 20px);padding:0 14px 18px;border-radius:4px}
  .album-topbar {gap:10px;padding:20px 50px 17px 0}
  .album-topbar h2 {font-size:18px;line-height:1.6}
  .album-counter {font-size:12px;padding:7px 8px;letter-spacing:.02em}
  .album-topbar .dialog-close {top:13px;width:44px;height:44px}
  .album-canvas {height:48dvh;min-height:190px}
  .album-prev {left:8px}.album-next {right:8px}
  .album-arrow {width:44px;height:44px}
  .album-caption-row {grid-template-columns:minmax(0,1fr);gap:2px;padding-top:16px}
  .album-caption-row>p {font-size:15px}
  .album-original {font-size:13px;gap:8px}
  .album-bottom>p {display:none}
  .album-swipe-note {display:block;font-size:13px}
  .album-thumbnails {gap:9px;margin-top:13px}
  .album-thumbnails button {width:65px;flex-basis:65px;height:52px}
  .album-error {padding:24px 51px}
  .album-error h3 {font-size:20px}
  .album-error p {font-size:14px}
  .album-error>span {width:44px;height:44px;margin-bottom:13px}
}
@media(max-width:360px) {
  .album-topbar {gap:7px;padding-right:48px}
  .album-topbar h2 {font-size:17px}
  .album-counter {padding:6px;font-size:11px}
  .album-error {padding-inline:45px}
  .album-error h3 {font-size:19px}
  .album-error .button {font-size:13px;gap:12px;padding-inline:13px}
}
@media(max-height:520px) {
  .album-canvas {height:48dvh;min-height:170px}
  .album-topbar {padding-block:17px}
  .album-topbar .dialog-close {top:10px}
  .album-caption-row {padding-top:13px}
}
@media(prefers-reduced-motion:reduce) {.album-photo,.photo-loader i {animation:none}}
@media print {.album-dialog {display:none!important}}
.preview-unavailable .media-open {z-index:2}
.preview-unavailable .media-zoom {display:none}
.preview-unavailable .media-placeholder-caption {white-space:normal;text-align:center;width:calc(100% - 36px);line-height:1.7;color:#5c4875;opacity:1}
