.desktop-album-icon {top:259px;}
.album-icon-art {width:46px;height:46px;display:block;flex-shrink:0;border-radius:12px;box-shadow:0 3px 8px #0002;}
.dock-button > .album-icon-art {width:28px;height:28px;border-radius:7px;}
.window-caption > .album-icon-art {width:20px;height:20px;border-radius:5px;box-shadow:none;}
.album-window {
  --window-default-width:min(max(1120px,67vw),calc(100vw - 112px));
  --window-default-height:min(max(780px,76dvh),calc(100dvh - 64px));
  width:var(--window-default-width);height:var(--window-default-height);
  left:max(85px,calc((100vw - var(--window-default-width)) / 2 + 38px));
  top:max(32px,calc((100dvh - var(--window-default-height)) / 2));
}
.album-content {position:relative;flex:1;min-height:0;overflow:auto;background:#fff;margin:0 8px;border-radius:8px;}
.album-toolbar {display:flex;align-items:center;justify-content:space-between;padding:22px 24px 14px;}
.album-toolbar h2 {font-size:22px;margin:0 0 5px;}
.album-toolbar p {font-size:12px;color:#92979c;margin:0;}
.album-toolbar button {padding:8px 13px;border:1px solid #e1e5ea;border-radius:6px;font-size:12px;background:#fff;}
.album-toolbar button:hover {background:#f2f5fa;}
.album-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:18px;padding:10px 24px 24px;}
.album-card {min-width:0;text-align:left;padding:0;border:1px solid #e8ebef;border-radius:8px;overflow:hidden;background:#f7f8fa;}
.album-card:hover {border-color:var(--accent);box-shadow:0 3px 12px #0001;}
.album-card img {display:block;width:100%;height:130px;object-fit:cover;}
.album-card span {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:10px 12px;font-size:12px;}
.album-window .window-status {height:auto;min-height:30px;gap:12px;padding:7px 12px;}
#album-status {min-width:0;overflow-wrap:anywhere;}
@media(max-width:760px) {
 .desktop-album-icon {top:260px;}
 .album-window,.album-window.is-maximized {left:58px!important;top:8px!important;width:calc(100vw - 66px)!important;height:calc(100dvh - 16px)!important;min-width:0;min-height:0;}
 .album-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:10px 12px 16px;}
 .album-card img {height:95px;}
 .album-toolbar {padding:18px 12px 12px;}
 .album-toolbar h2 {font-size:20px;}
 .album-window .window-status > span:last-child {display:none;}
}

.album-empty {grid-column:1/-1;text-align:center;padding:60px 12px;color:#93989d;}

#album-folders {grid-template-columns:repeat(auto-fill,minmax(120px,150px));gap:20px;}
.album-folder {display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:0;border:0;border-radius:14px;background:transparent;min-width:0;text-align:left;color:var(--sys-text,#30363d);}
.album-folder-cover {position:relative;display:grid;place-items:center;width:100%;aspect-ratio:1;overflow:hidden;border-radius:14px;background:var(--sys-raised,#eef1f5);box-shadow:inset 0 0 0 1px #8882;transition:box-shadow .18s;}
.album-folder-cover img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.album-folder-cover svg {width:48px;height:48px;color:var(--sys-muted,#92979c);stroke-width:1.3;}
.album-folder:hover .album-folder-cover {box-shadow:0 0 0 2px var(--accent);}
.album-folder:focus-visible {outline:2px solid var(--accent);outline-offset:5px;}
.album-folder strong {margin-top:3px;font-size:14px;line-height:1.4;overflow-wrap:anywhere;}
.album-folder small {font-size:12px;color:var(--sys-muted,#92979c);}
@media(max-width:760px) {#album-folders {grid-template-columns:repeat(2,minmax(0,150px));gap:16px 12px;}}
.album-folder-heading { display:flex; align-items:center; gap:16px; padding:0 24px 10px; }
.album-folder-heading button { padding:7px 10px; border:1px solid var(--line); border-radius:6px; }
.album-folder-heading h3 { margin:0; font-size:16px; overflow-wrap:anywhere; }
html[data-system-theme="dark"] .album-folder {color:var(--sys-text);}
@media(max-width:760px) { .album-folder-heading { padding-inline:12px; } }

.album-card {position:relative;}
.album-card .album-image-state {position:absolute;inset:0 0 auto;height:130px;display:grid;place-items:center;padding:12px;white-space:normal;text-align:center;color:var(--sys-muted,#76808c);background:var(--sys-raised,#f7f8fa);}
.album-card[data-load-state="error"] .album-image-state {color:var(--accent);}
#album-retry {margin-left:auto;color:var(--accent);background:var(--sys-base,#fff);}
.album-folder-heading {flex-wrap:wrap;}
@media(max-width:760px) {.album-card .album-image-state {height:95px;}}

/* Three keepsake photos briefly unfold before the album window appears. */
.album-launch {position:fixed;pointer-events:none;isolation:isolate;}
.album-launch-photo {position:absolute;inset:0;display:block;padding:6px 6px 18px;border-radius:9px;background:#faf9f6;box-shadow:0 14px 32px #10252038,0 2px 5px #0002;will-change:transform,opacity;}
.album-launch-picture {position:relative;display:block;width:100%;height:100%;overflow:hidden;border-radius:4px;background:linear-gradient(145deg,#b9dbc2,#6fa8b6 58%,#526f9a);}
.album-launch-photo:nth-child(1) .album-launch-picture {background:linear-gradient(145deg,#f2d2bb,#d9949f 58%,#8e82b8);}
.album-launch-photo:nth-child(2) .album-launch-picture {background:linear-gradient(145deg,#dae9c1,#98cbb6 58%,#7592b9);}
.album-launch-picture::before {content:"";position:absolute;width:22%;aspect-ratio:1;right:16%;top:16%;border-radius:50%;background:#fff9;}
.album-launch-picture::after {content:"";position:absolute;inset:40% -12% -25%;border-radius:45% 60% 0 0;transform:rotate(-20deg);background:linear-gradient(145deg,#ffffff70,#ffffff10);}
.album-launch-picture canvas {position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:cover;}
#album.album-is-starting,#album.album-is-closing {will-change:transform,opacity;transition:none;}
html[data-system-theme="dark"] .album-launch-photo {background:#e5e6e5;box-shadow:0 18px 38px #0006,0 2px 5px #0003;}
@media(prefers-reduced-motion:reduce) {.album-launch {display:none;}}
