/* 半年 — the next chapter of the original photographic book. */
:root {
  --album-width: 1120px;
  --album-gutter: clamp(22px, 5vw, 72px);
  --album-shadow: 0 2px 4px #23211c0a, 0 18px 30px -18px #23211c45;
}
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { overflow-x: clip; }
button, a, summary { touch-action: manipulation; }
a { color: inherit; }
button { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: #9e3b2e16; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 6px; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 100; padding: 12px 20px; background: var(--paper); }
.skip-link:focus { top: 12px; }
.album { width: 100%; }
.album [lang="ja"] { font-family: var(--font-ja); }
.album [lang="ko"] { font-family: var(--font-ko); word-break: keep-all; }
.album p { margin-top: 0; }
.album h1, .album h2, .album p { text-wrap: pretty; }
.album h1, .album h2 { font-weight: 400; text-wrap: balance; }
.album-width { width: min(var(--album-width), calc(100% - var(--album-gutter) * 2)); margin-inline: auto; }
.eyebrow { font: 11px/1.6 var(--font-num); letter-spacing: .2em; color: var(--muted); }
.album-cover { padding: 62px 0 48px; text-align: center; }
.cover-eyebrow { margin-bottom: 22px; }
.album-cover h1 { max-width: calc(100% - 44px); margin: 0 auto; font-family: var(--font-num); font-weight: 300; font-size: clamp(38px, 5.5vw, 68px); line-height: 1.12; letter-spacing: -.025em; }
.album-cover .cover-date { margin: 18px 0 0; font: 14px/1.6 var(--font-num); letter-spacing: .15em; color: var(--muted); }
.cover-composition { position: relative; width: min(1110px, 100%); margin: 38px auto 0; padding: 30px 0 65px; }
.photo-print { margin: 0; padding: 9px 9px 0; background: var(--print); box-shadow: var(--album-shadow); }
.photo-link { display: block; position: relative; text-decoration: none; cursor: zoom-in; }
.photo-link img { display: block; width: 100%; height: auto; background: #e7e3d9; }
.photo-link::after { content: "+"; position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; display: grid; place-items: center; font: 19px/1 Georgia, serif; color: #fff; background: #23211c66; opacity: 0; transition: opacity .2s; }
.photo-link:hover::after, .photo-link:focus-visible::after { opacity: 1; }
.photo-print figcaption { min-height: 34px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 3px 9px; font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.photo-print figcaption span:last-child { font-family: var(--font-num); font-size: 10px; }
.cover-main { position: relative; z-index: 2; width: 59%; margin: 0 auto; transform: rotate(-2deg); }
.cover-left { position: absolute; z-index: 1; width: 20%; left: 1.5%; top: 13px; transform: rotate(-10deg); }
.cover-right { position: absolute; z-index: 3; width: 19%; right: 2%; top: 73px; transform: rotate(9deg); }
.cover-left figcaption, .cover-right figcaption { justify-content: center; }
.cover-scroll { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; margin-top: 2px; text-decoration: none; color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.cover-scroll svg { width: 12px; height: 28px; }
.album-section { padding-block: 68px 82px; border-top: 1px solid var(--line); }
.together-sequence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.sequence-photo:nth-child(1) { transform: rotate(-2deg); }
.sequence-photo:nth-child(2) { transform: translateY(24px) rotate(1deg); }
.sequence-photo:nth-child(3) { transform: rotate(3deg); }
.celebration { padding-top: 67px; padding-bottom: 90px; position: relative; }
.cake-layout { position: relative; padding-bottom: 60px; }
.cake-note { position: absolute; left: 0; top: 32%; width: 25%; margin: 0; color: var(--muted); font-size: clamp(12px, 1.25vw, 14px); line-height: 2.2; letter-spacing: .02em; }
.cake-main { width: 44%; margin-inline: auto; transform: rotate(-2deg); padding: 12px 12px 0; }
.cake-main figcaption { min-height: 48px; justify-content: center; font: italic 15px/1.6 var(--font-num); letter-spacing: .02em; }
.cake-aside { position: absolute; right: 0; bottom: 0; width: 22%; }
.cake-detail { transform: rotate(7deg); margin: 0; }
.afterglow-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 82px; align-items: center; padding: 8px 30px 0; }
.flower-photo { transform: rotate(-3deg); }
.mirror-photo { width: 85%; margin-left: auto; transform: rotate(4deg); }
.afterglow-side { position: relative; }
.album-footer { display: flex; align-items: center; padding: 38px 0 43px; border-top: 1px solid var(--line); }
.previous-chapter { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; text-decoration: none; min-height: 44px; }
.previous-chapter:hover { color: var(--seal); }
.previous-chapter svg { width: 22px; height: 12px; }
.photo-viewer { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; padding: 0; margin: 0; border: 0; color: var(--print); background: #23211c; overscroll-behavior: contain; }
.photo-viewer::backdrop { background: #23211c; }
.photo-viewer[open] { display: flex; flex-direction: column; }
.viewer-top { min-height: 76px; padding: max(env(safe-area-inset-top), 16px) 25px 12px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.viewer-heading { font: 12px/1.5 var(--font-num); letter-spacing: .15em; margin: 0; }
.viewer-close { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 44px; min-height: 44px; padding: 4px 6px; border: 0; background: none; color: var(--print); cursor: pointer; font: 12px/1.4 var(--font-ja); }
.viewer-close svg { width: 20px; height: 20px; }
.viewer-stage { display: flex; align-items: center; justify-content: center; flex: 1; min-height: 0; padding: 8px 80px; position: relative; touch-action: pan-y pinch-zoom; }
.viewer-figure { margin: 0; display: contents; }
.viewer-image { width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 176px); object-fit: contain; box-shadow: 0 15px 40px #0004; }
.viewer-bottom { min-height: 92px; padding: 18px 24px max(env(safe-area-inset-bottom), 22px); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.viewer-caption { margin: 0; font: 13px/1.6 var(--font-ja); color: var(--print); }
.viewer-count { font: 10px/1.5 var(--font-num); letter-spacing: .15em; color: #c4bfb2; margin: 0; }
.viewer-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 56px; display: grid; place-items: center; color: var(--print); border: 1px solid #f6f3ec3b; background: #23211c80; cursor: pointer; }
.viewer-arrow svg { width: 20px; height: 20px; }
.viewer-prev { left: 20px; }
.viewer-next { right: 20px; }
.photo-viewer :focus-visible { outline-color: var(--print); }
.viewer-status { display: none; color: var(--print); font: 13px/1.8 var(--font-ja); text-align: center; }
.photo-viewer.has-error .viewer-status { display: block; }
.photo-viewer.has-error .viewer-image { display: none; }
.album-enter { animation: album-enter .9s var(--ease) both; }
@keyframes album-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) {
  .afterglow-grid { gap: 45px; padding-inline: 12px; }
}
@media (max-width: 600px) {
  .album-cover { padding: 38px 0 28px; }
  .cover-eyebrow { font-size: 9px; margin-bottom: 17px; }
  .album-cover h1 { font-size: clamp(30px, 8.6vw, 44px); }
  .cover-composition { margin-top: 25px; padding-top: 75px; padding-bottom: 75px; }
  .cover-main { width: 77%; }
  .cover-left { width: 28%; left: 4%; top: 7px; transform: rotate(-12deg); }
  .cover-right { width: 25%; top: auto; bottom: 4px; right: 4%; transform: rotate(10deg); }
  .photo-print { padding: 6px 6px 0; }
  .photo-print figcaption { min-height: 28px; padding: 6px 2px 8px; font-size: 8px; }
  .photo-print figcaption span:last-child { font-size: 8px; }
  .cover-left figcaption, .cover-right figcaption { min-height: 23px; font-size: 8px; }
  .cover-scroll { margin-top: 14px; font-size: 10px; }
  .album-section { padding-block: 40px 48px; }
  .together-sequence { grid-template-columns: 1fr 1fr; gap: 20px 15px; padding-inline: 2px; }
  .sequence-photo:first-child { grid-column: 1 / -1; width: 86%; margin: 0 auto; }
  .sequence-photo:nth-child(2) { transform: rotate(-3deg); }
  .sequence-photo:nth-child(3) { transform: translateY(10px) rotate(3deg); }
  .cake-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px 18px; padding-bottom: 0; }
  .cake-note { position: static; grid-column: 1; grid-row: 2; align-self: center; width: auto; font-size: 12px; }
  .cake-main { grid-column: 1 / -1; grid-row: 1; width: 79%; max-width: 330px; margin: 0 auto; padding: 9px 9px 0; }
  .cake-main figcaption { font-size: 12px; min-height: 38px; }
  .cake-aside { position: static; grid-column: 2; grid-row: 2; width: 96%; margin: 0 4% 0 auto; }
  .cake-detail { width: 100%; margin: 0; transform: rotate(6deg); }
  .afterglow-grid { grid-template-columns: 1fr; gap: 58px; padding: 8px 12px 0; }
  .flower-photo { width: 94%; }
  .mirror-photo { width: 64%; max-width: 280px; margin-right: 10px; }
  .album-footer { padding-block: 28px 30px; }
  .previous-chapter { font-size: 10px; gap: 6px; }
  .previous-chapter svg { width: 17px; }
  .viewer-top { padding-inline: 16px; }
  .viewer-stage { padding-inline: 10px; }
  .viewer-arrow { top: auto; bottom: -68px; transform: none; width: 44px; height: 44px; z-index: 1; }
  .viewer-prev { left: 14px; }
  .viewer-next { right: 14px; }
  .viewer-bottom { padding-inline: 65px; }
  .viewer-caption { font-size: 11px; }
  .viewer-image { max-height: calc(100dvh - 180px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .album-enter { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
