/* Album layouts: masonry (default), uniform grid, and a full-screen photo wall. */
.layout-switch{display:flex;align-items:center;gap:2px;padding:2px;border:1px solid #e2cdbb;border-radius:9px;background:#fffaf2}
.layout-button{width:28px;height:26px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:#a1846f;cursor:pointer}
.layout-button .icon{width:14px;height:14px}
.layout-button:hover{background:#f4e4d4;color:#7c5a46}
.layout-button.active{background:#edd9c6;color:#7a4f39}
.layout-button:focus-visible{outline:2px solid #b98a68;outline-offset:1px}

/* Uniform grid: equal cells, cropped cover-like thumbnails. */
.photo-grid.grid{columns:unset;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.photo-grid.grid .photo-card{margin:0;border-radius:10px}
.photo-grid.grid .photo-open img{height:100%;aspect-ratio:1/1;object-fit:cover;max-height:none}
.photo-grid.grid .photo-card:first-child{grid-column:span 2;grid-row:span 2}
.photo-grid.grid .photo-card:first-child .photo-open img{aspect-ratio:auto;height:100%}
@media(max-width:1170px){.photo-grid.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.photo-grid.grid .photo-card:first-child{grid-column:span 1;grid-row:span 1}}
/* Albums view shows the wall of cover cards a little larger and airier. */
.album-grid{grid-template-columns:repeat(auto-fill,minmax(215px,1fr))}
.album-cover{height:150px}

/* Full-screen photo wall playback. */
.photowall{width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;background:#1b1620;color:#fff;overflow:hidden}
.photowall::backdrop{background:#12101a}
.photowall-stage{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 40%,#2a2231,#141019 72%)}
#photowall-img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block}
.photowall-close{position:absolute;top:18px;right:18px;z-index:3;background:#ffffff1f;border-color:#ffffff33;color:#fff}
.photowall-close:hover{background:#ffffff33}
.photowall-arrow{position:absolute;top:calc(50% - 22px);z-index:3;width:44px;height:44px;background:#ffffff1a;border-color:#ffffff2e;color:#fff;opacity:.75}
.photowall-arrow:hover{opacity:1;background:#ffffff30}
.photowall-arrow.prev{left:18px;transform:rotate(180deg)}
.photowall-arrow.next{right:18px}
.photowall-bar{position:absolute;left:0;right:0;bottom:0;height:3px;background:#ffffff1c}
.photowall-bar span{display:block;height:100%;width:0;background:#e7c39a;transition:width .4s ease}
.photowall-info{position:absolute;left:0;right:0;bottom:0;padding:26px 26px 22px;display:flex;align-items:flex-end;justify-content:space-between;gap:18px;background:linear-gradient(transparent,#12101ad9 55%)}
.photowall-info strong{display:block;font-size:16px;font-weight:500;margin-bottom:4px}
.photowall-info p{margin:0;font-size:11px;color:#c9bcc9;line-height:1.7}
.photowall-play{width:46px;height:46px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;border:1px solid #ffffff36;background:#ffffff1f;color:#fff;cursor:pointer}
.photowall-play:hover{background:#ffffff33}
.photowall-play svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.photowall-play[aria-label="暂停播放"] svg{fill:none;stroke-width:3}
.photowall.is-paused #photowall-img{filter:brightness(.72)}
@media(max-width:760px){
  .photo-grid.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .photo-grid.grid .photo-card:first-child{grid-column:span 2}
  .album-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .album-cover{height:118px}
  .layout-button{width:32px;height:30px}
  .photowall-info{padding:18px 16px 16px}
  .photowall-info strong{font-size:13px}
  .photowall-close{top:12px;right:12px}
  .photowall-arrow{width:38px;height:38px;top:auto;bottom:100px}
  .photowall-arrow.prev{left:10px}
  .photowall-arrow.next{right:10px}
}
@media(prefers-reduced-motion:reduce){.photowall-bar span{transition:none}}
