:root {
  --ink: #2b2226;
  --mute: #6d5f65;
  --rose: #a3324f;
  --ground: #fbf6f4;
  --line: #eadfdc;
  --sans: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--ground); line-height: 1.7; }
body.no-scroll { overflow: hidden; }
a { color: var(--rose); }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-header {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px;
  max-width: 1280px; margin: 0 auto; padding: 32px 24px 24px;
}
.site-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; color: var(--ink); text-decoration: none; }
.site-title-ja { font-size: 26px; font-weight: 700; letter-spacing: 0.12em; }
.site-title-en { font-family: var(--serif); font-size: 22px; font-weight: 500; font-style: italic; color: var(--rose); }
.site-x { display: inline-flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.site-x:hover { color: var(--rose); }

main { max-width: 1280px; margin: 0 auto; padding: 8px 24px 96px; }
.message { padding: 96px 0; text-align: center; color: var(--mute); }

/* Album list */
.albums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 40px 28px; }
.albums a { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; }
.album-cover { display: block; margin-bottom: 10px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: var(--line); }
.album-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.albums a:hover .album-cover img { transform: scale(1.04); }
.album-name { font-size: 17px; font-weight: 700; line-height: 1.5; }
.album-count { margin: 0; font-size: 13px; color: var(--mute); }

/* One album */
.album-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 28px; }
.album-head h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); font-weight: 700; line-height: 1.4; }
.back { align-self: flex-start; padding: 8px 0; font-size: 14px; font-weight: 500; text-decoration: none; }
.back:hover { text-decoration: underline; }
.photos { list-style: none; margin: 0; padding: 0; columns: 4 260px; column-gap: 14px; }
.photos li { break-inside: avoid; margin-bottom: 14px; }
.photos button { display: block; width: 100%; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--line); cursor: zoom-in; }
.photos img { display: block; width: 100%; height: auto; min-height: 120px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; background: rgba(20, 14, 17, 0.94); }
.lightbox[hidden] { display: none; }
.lb-img { max-width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; color: #fff; background: rgba(20, 14, 17, 0.55); border: 0; border-radius: 50%; cursor: pointer; }
.lb-btn:hover { background: rgba(163, 50, 79, 0.9); }
.lb-btn:focus-visible { outline-color: #fff; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); margin: 0; padding: 4px 14px; font-size: 13px; color: #fff; background: rgba(20, 14, 17, 0.55); border-radius: 999px; }

@media (max-width: 560px) {
  .site-header { padding: 24px 16px 16px; }
  main { padding: 8px 16px 72px; }
  .albums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .photos { columns: 2; column-gap: 10px; }
  .photos li { margin-bottom: 10px; }
  .lb-btn { width: 44px; height: 44px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .album-cover img { transition: none; }
}
