*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

:root {
  --paper: #f8f6f0;
  --paper-dim: #eee9df;
  --ink: #222;
  --muted: #666;
  --quiet: #999;
  --line: rgba(69, 57, 45, 0.1);
  --line-strong: rgba(69, 57, 45, 0.18);
  --accent: #6f7850;
  --card: rgba(255, 255, 255, 0.78);
  --card-solid: #fffdfa;
  --photo-edge: rgba(80, 70, 58, 0.1);
  --shadow: rgba(70, 58, 44, 0.13);
}

html {
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Trebuchet MS", Helvetica, sans-serif;
  line-height: 1.68;
  text-rendering: geometricPrecision;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
a {
  font: inherit;
}

.life-nav {
  --life-nav-progress: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  width: 100%;
  min-height: 4.5rem;
  margin: 0;
  padding-inline: max(1rem, calc((100% - 1420px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(34, 34, 34, 0.72);
  border-bottom: 1px solid rgba(69, 57, 45, calc(var(--life-nav-progress) * 0.1));
  background: rgba(248, 246, 240, calc(0.16 + var(--life-nav-progress) * 0.18));
  backdrop-filter: blur(calc(var(--life-nav-progress) * 12px));
  -webkit-backdrop-filter: blur(calc(var(--life-nav-progress) * 12px));
  transition: color 180ms ease, border-color 180ms ease;
}

.life-nav.is-scrolled {
  color: rgba(34, 34, 34, 0.72);
  border-bottom-color: var(--line);
}

.life-nav a,
.life-nav span {
  color: inherit;
  font-size: 0.78rem;
  text-decoration: none;
}

.life-nav span {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.life-nav a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.34em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.life-nav a:hover,
.life-nav a:focus-visible {
  color: inherit;
  text-decoration-color: currentColor;
  outline: none;
}

.life-cover {
  position: relative;
  width: min(1180px, calc(100% - 2rem));
  min-height: auto;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(1.4rem, 4vw, 3.5rem);
  align-items: end;
  overflow: visible;
  isolation: isolate;
  padding: clamp(6.4rem, 12vw, 9rem) 0 clamp(2rem, 5vw, 4rem);
  border-bottom: 0;
  background: transparent;
}

.life-cover__image {
  position: relative;
  z-index: 1;
  order: 2;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.68);
  border-radius: 30px;
  background: var(--paper-dim);
  box-shadow: 0 28px 70px rgba(75, 61, 48, 0.15);
  filter: saturate(0.98) contrast(1.01);
}

.life-cover::before {
  content: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(20, 20, 18, 0.7), rgba(20, 20, 18, 0.28) 46%, rgba(20, 20, 18, 0.03)),
    linear-gradient(to top, rgba(20, 20, 18, 0.42), rgba(20, 20, 18, 0.04) 58%);
}

.life-cover__text {
  position: relative;
  z-index: 2;
  order: 1;
  width: 100%;
  margin: 0;
  padding: 0 0 0.8rem;
  color: var(--ink);
}

.life-cover__meta {
  width: fit-content;
  margin-bottom: 1.2rem;
  padding: 0.36rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 10px 26px rgba(75, 61, 48, 0.05);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.life-cover h1 {
  max-width: 24rem;
  color: var(--ink);
  font-family: "Trebuchet MS", Helvetica, sans-serif;
  font-size: clamp(3.4rem, 7vw, 6.2rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
}

.life-cover__text > p:not(.life-cover__meta) {
  max-width: 24rem;
  margin-top: 1.15rem;
  color: var(--muted);
  font-size: 1rem;
}

.life-cover__latest {
  max-width: 24rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.7rem;
  padding-top: 0;
  border-top: 0;
}

.life-cover__latest dt {
  color: var(--quiet);
  font-size: 0.72rem;
}

.life-cover__latest dd {
  margin-top: 0.16rem;
  color: var(--ink);
  font-size: 0.92rem;
}

.life-main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 0 7rem;
}

.life-main--empty {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding-top: 6rem;
}

.life-empty {
  width: min(34rem, 100%);
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.54);
}

.life-empty p {
  margin-bottom: 0.9rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.life-empty h1 {
  color: var(--ink);
  font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 1.05;
}

.life-empty span {
  display: block;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.life-timeline {
  padding-top: 0;
}

.life-period {
  margin-bottom: clamp(2.6rem, 6vw, 5rem);
}

.life-period__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.life-period__label {
  color: var(--ink);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-weight: 700;
  line-height: 1;
}

.life-period__hint {
  color: var(--accent);
  font-size: 0.78rem;
}

.life-period__track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: clamp(10.4rem, 11.2vw, 13rem);
  grid-auto-flow: dense;
  gap: clamp(0.42rem, 0.85vw, 0.72rem);
  align-items: stretch;
  padding: 0.15rem 0 0.35rem;
}

.life-entry {
  scroll-snap-align: start;
  min-width: 0;
  padding: 0.36rem;
  height: 100%;
  border: 1px solid rgba(87, 73, 57, 0.08);
  border-radius: 22px;
  background: var(--card);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.life-entry:hover {
  transform: translateY(-3px);
  box-shadow: none;
}

.life-entry--mode-1,
.life-entry--mode-2 {
  grid-column: span 2;
  grid-row: span 1;
}

.life-entry__media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(5.25rem, 29%, 6.35rem);
  align-items: stretch;
  gap: 0;
  height: 100%;
}

.life-entry__cover {
  position: relative;
  width: 100%;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 17px 0 0 17px;
  background: var(--paper-dim);
  cursor: zoom-in;
}

.life-entry__cover img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), filter 220ms ease;
}

.life-entry:hover .life-entry__cover img,
.life-entry__cover:focus-visible img {
  filter: saturate(1.04);
  transform: scale(1.02);
}

.life-entry__cover:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.life-entry__caption {
  position: absolute;
  display: block;
  left: 0.55rem;
  bottom: 0.5rem;
  max-width: calc(100% - 1.1rem);
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  color: rgba(35, 31, 27, 0.74);
  background: rgba(233, 226, 214, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.66rem;
  line-height: 1.28;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-entry__tag {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: stretch;
  gap: 0.72rem;
  padding: 0.68rem 0.52rem 0.62rem;
  border-radius: 0 17px 17px 0;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(43, 32, 27, 0.82);
  box-shadow: none;
  text-transform: uppercase;
  pointer-events: none;
}

.life-entry__tag::before {
  content: "";
  position: absolute;
  left: -0.26rem;
  top: 0.52rem;
  bottom: 0.52rem;
  width: 0.18rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(248, 246, 240, 0.95) 36%, transparent 40%) 0 0 / 100% 0.58rem;
}

.life-entry__tag-place {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.life-entry__tag-date {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  opacity: 0.84;
}

.life-entry__tag-number {
  align-self: end;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.life-entry--mode-2 .life-entry__media {
  grid-template-columns: 1fr;
  height: 100%;
}

.life-entry--mode-2 .life-entry__cover {
  border-radius: 17px;
}

.life-entry--mode-2 .life-entry__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(35, 29, 24, 0.42), rgba(35, 29, 24, 0.08) 54%, rgba(35, 29, 24, 0.34));
  pointer-events: none;
}

.life-entry--mode-2 .life-entry__caption {
  z-index: 3;
  left: 0.58rem;
  bottom: 0.52rem;
  max-width: min(72%, 18rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-entry__stub {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: 0.78rem 0.82rem 0.7rem;
  color: rgba(255, 255, 255, 0.94);
  text-align: left;
  text-transform: uppercase;
  pointer-events: none;
}

.life-entry__stub-kicker {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.life-entry__stub-place {
  margin-top: 0.22rem;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.03em;
}

.life-entry__stub-number {
  align-self: end;
  justify-self: end;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.life-entry--mode-3 {
  position: relative;
  grid-column: span 2;
  grid-row: span 2;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(87, 73, 57, 0.07);
  border-radius: 22px;
  box-shadow: none;
}

.life-entry__paper-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  padding-top: 0.64rem;
  padding-right: 1.05rem;
  margin-bottom: 0.78rem;
  color: rgba(34, 34, 34, 0.92);
  text-transform: uppercase;
}

.life-entry__paper-kicker,
.life-entry__paper-subplace,
.life-entry__paper-date,
.life-entry__paper-number {
  display: block;
  color: var(--quiet);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.08em;
}

.life-entry__paper-place {
  display: block;
  margin-top: 0.38rem;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.life-entry__paper-subplace {
  display: none;
}

.life-entry__paper-date {
  align-self: end;
  white-space: nowrap;
}

.life-entry__paper-number {
  position: absolute;
  top: 0.88rem;
  right: 1.02rem;
  white-space: nowrap;
}

.life-entry__paper-photo {
  position: relative;
  width: 100%;
  display: block;
  padding: 0;
  overflow: hidden;
  height: calc(100% - 4.44rem);
  border: 0;
  border-radius: 16px;
  background: var(--paper-dim);
  cursor: zoom-in;
}

.life-entry__paper-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), filter 220ms ease;
}

.life-entry--mode-3:hover .life-entry__paper-photo img,
.life-entry__paper-photo:focus-visible img {
  filter: saturate(1.04);
  transform: scale(1.02);
}

.life-entry__paper-photo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.life-entry--mode-3 .life-entry__caption {
  left: 0.48rem;
  bottom: 0.46rem;
  max-width: calc(100% - 0.96rem);
  padding: 0.28rem 0.56rem;
  color: rgba(35, 31, 27, 0.78);
  background: rgba(229, 224, 213, 0.82);
  font-size: 0.64rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-entry--mode-4 {
  position: relative;
  grid-column: span 2;
  grid-row: span 2;
  width: 100%;
  height: 100%;
  padding: 0.46rem;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(87, 73, 57, 0.07);
  border-radius: 22px;
  box-shadow: none;
}

.life-entry__portrait-photo {
  position: relative;
  width: 100%;
  height: calc(100% - 3.46rem);
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: var(--paper-dim);
  cursor: zoom-in;
}

.life-entry__portrait-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), filter 220ms ease;
}

.life-entry--mode-4:hover .life-entry__portrait-photo img,
.life-entry__portrait-photo:focus-visible img {
  filter: saturate(1.03);
  transform: scale(1.018);
}

.life-entry__portrait-photo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.life-entry__portrait-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.72rem;
  margin-top: 0.78rem;
  color: var(--quiet);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.life-entry__portrait-meta span:last-child {
  min-width: 6.8rem;
  text-align: right;
}

.life-entry__portrait-caption {
  margin-top: 0.34rem;
  color: rgba(34, 34, 34, 0.74);
  font-size: 0.72rem;
  line-height: 1.35;
}

.life-entry__portrait-number {
  position: absolute;
  right: 0.78rem;
  bottom: 0.72rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.36);
  pointer-events: none;
}

.life-entry--mode-5 {
  grid-column: span 1;
  grid-row: span 2;
  padding: 0.38rem;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(87, 73, 57, 0.07);
  border-radius: 22px;
  box-shadow: none;
}

.life-entry__strip-photo {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 17px;
  background: var(--paper-dim);
  cursor: zoom-in;
}

.life-entry__strip-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), filter 220ms ease;
}

.life-entry--mode-5:hover .life-entry__strip-photo img,
.life-entry__strip-photo:focus-visible img {
  filter: saturate(1.04);
  transform: scale(1.02);
}

.life-entry__strip-photo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.life-entry__strip-caption {
  position: absolute;
  top: 0.68rem;
  right: 0.6rem;
  max-height: calc(100% - 5.8rem);
  padding: 0.58rem 0.34rem;
  border-radius: 999px;
  color: rgba(35, 31, 27, 0.78);
  background: rgba(233, 226, 214, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.life-entry__strip-number {
  position: absolute;
  top: 0.62rem;
  left: 0.66rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.34);
  text-transform: uppercase;
  pointer-events: none;
}

.life-entry__strip-meta {
  position: absolute;
  left: 0.62rem;
  right: 0.62rem;
  bottom: 0.58rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.6rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.05;
  text-align: left;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.32);
  text-transform: uppercase;
  pointer-events: none;
}

.life-entry__description {
  display: none;
}

.life-entry__description p + p {
  margin-top: 0.7rem;
}

.photo-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.photo-card {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: zoom-in;
}

.photo-card__image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 14px;
  background: var(--paper-dim);
  box-shadow: none;
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.photo-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), filter 220ms ease;
}

.photo-card:hover .photo-card__image,
.photo-card:focus-visible .photo-card__image {
  box-shadow: 0 12px 24px rgba(75, 61, 48, 0.12);
  transform: translateY(-2px);
}

.photo-card:hover .photo-card__image img,
.photo-card:focus-visible .photo-card__image img {
  filter: saturate(1.02);
  transform: scale(1.018);
}

.photo-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.photo-card--wide,
.photo-card--large {
  grid-column: span 2;
}

.photo-card--wide .photo-card__image {
  aspect-ratio: 16 / 10;
}

.photo-card--portrait .photo-card__image {
  aspect-ratio: 3 / 4;
}

.photo-card--large .photo-card__image {
  aspect-ratio: 4 / 3;
}

.life-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(42, 36, 30, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease, background 260ms ease, backdrop-filter 260ms ease;
}

.life-lightbox.is-open {
  background: rgba(42, 36, 30, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 1;
  pointer-events: auto;
}

.life-lightbox.is-closing {
  background: rgba(42, 36, 30, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition-delay: 0ms;
}

.life-lightbox__stage {
  position: absolute;
  inset: 0;
}

.life-lightbox__figure {
  position: fixed;
  z-index: 2;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(248, 245, 236, 0.78);
  outline: 7px solid rgba(249, 246, 239, 0.72);
  outline-offset: -1px;
  transition:
    left 520ms cubic-bezier(0.22, 1, 0.36, 1),
    top 520ms cubic-bezier(0.22, 1, 0.36, 1),
    width 520ms cubic-bezier(0.22, 1, 0.36, 1),
    height 520ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 520ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.life-lightbox.is-animating .life-lightbox__figure {
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.life-lightbox__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: transparent;
}

.life-lightbox__notes {
  position: fixed;
  z-index: 3;
  top: 50%;
  right: clamp(1.4rem, 5vw, 5rem);
  width: min(23rem, 29vw);
  padding: 1.36rem 1.2rem 1.12rem;
  border: 1px solid rgba(96, 82, 64, 0.14);
  border-radius: 18px;
  color: var(--ink);
  background:
    linear-gradient(rgba(113, 98, 75, 0.045) 1px, transparent 1px) 0 4.05rem / 100% 1.52rem,
    radial-gradient(circle at 1.1rem 1rem, rgba(91, 111, 83, 0.1), transparent 1.8rem),
    rgba(250, 247, 239, 0.9);
  box-shadow:
    0 18px 54px rgba(49, 41, 32, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  opacity: 0;
  transform: translateY(calc(-50% + 12px)) rotate(0.7deg);
  transition: opacity 360ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.life-lightbox__notes::before {
  content: "";
  position: absolute;
  top: -0.62rem;
  left: 1.15rem;
  width: 5.4rem;
  height: 1.22rem;
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent 32%, rgba(255, 255, 255, 0.22)),
    rgba(214, 205, 184, 0.72);
  box-shadow: 0 5px 14px rgba(49, 41, 32, 0.08);
  transform: rotate(-3.5deg);
}

.life-lightbox__notes::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  bottom: -0.35rem;
  width: 4.9rem;
  height: 0.72rem;
  border-radius: 999px;
  background: rgba(109, 122, 88, 0.18);
  filter: blur(8px);
}

.life-lightbox__notes.is-visible {
  opacity: 1;
  transform: translateY(-50%) rotate(-0.4deg);
  pointer-events: auto;
}

.life-lightbox__kicker {
  margin: 0 0 0.74rem;
  color: rgba(86, 102, 75, 0.76);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.life-lightbox__title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 2.4vw, 2.55rem);
  line-height: 1.02;
}

.life-lightbox__stamp {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.95rem;
  padding: 0.54rem 0;
  border-block: 1px dashed rgba(96, 82, 64, 0.2);
  color: var(--quiet);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.life-lightbox__number {
  padding: 0.28rem 0.48rem;
  border: 1px solid rgba(96, 82, 64, 0.18);
  border-radius: 999px;
  color: rgba(70, 60, 49, 0.76);
  background: rgba(255, 255, 255, 0.38);
  transform: rotate(1.4deg);
}

.life-lightbox__bubble-note {
  position: relative;
  width: fit-content;
  max-width: min(18.7rem, 86%);
  margin: 0.46rem 0 0 0.46rem;
  padding: 0.42rem 0.86rem 0.4rem;
  border: 1px solid rgba(96, 82, 64, 0.12);
  border-radius: 999px 999px 999px 12px;
  color: rgba(49, 44, 37, 0.78);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), transparent 46%),
    rgba(231, 224, 207, 0.86);
  box-shadow:
    0 9px 20px rgba(49, 41, 32, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(7px) rotate(-1.3deg) scale(0.98);
  transition:
    opacity 220ms ease,
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 52ms;
}

.life-lightbox__bubble-note::before {
  content: "";
  position: absolute;
  left: -1.72rem;
  top: 0.76rem;
  width: 1.56rem;
  height: 0.58rem;
  border-left: 1px solid rgba(74, 67, 55, 0.34);
  border-bottom: 1px solid rgba(74, 67, 55, 0.34);
  border-radius: 0 0 0 12px;
  transform: rotate(-5deg);
  transform-origin: right center;
}

.life-lightbox__bubble-note::after {
  content: "";
  position: absolute;
  left: -1.92rem;
  top: 0.51rem;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 999px;
  background: rgba(74, 67, 55, 0.3);
  box-shadow: 0 0 0 2px rgba(250, 247, 239, 0.72);
}

.life-lightbox__caption {
  position: relative;
  margin: 1.18rem 0 0;
  min-height: 7.2rem;
  padding: 2rem 1rem 0.92rem;
  border: 1px solid rgba(96, 82, 64, 0.1);
  border-radius: 14px 14px 14px 7px;
  color: rgba(42, 38, 32, 0.76);
  background:
    linear-gradient(rgba(113, 98, 75, 0.11) 1px, transparent 1px) 0 2.86rem / 100% 1.62rem,
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), transparent 48%),
    rgba(244, 238, 222, 0.82);
  box-shadow:
    0 10px 24px rgba(49, 41, 32, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
  font-size: 0.92rem;
  line-height: 1.62;
  opacity: 0;
  transform: translateY(9px) rotate(0.5deg) scale(0.985);
  transition:
    opacity 240ms ease,
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 80ms;
}

.life-lightbox__caption::before {
  content: "note";
  position: absolute;
  top: 0.72rem;
  left: 0.92rem;
  color: rgba(86, 102, 75, 0.72);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.life-lightbox__caption::after {
  content: "";
  position: absolute;
  top: 0.88rem;
  right: 0.88rem;
  width: 2.7rem;
  height: 0.62rem;
  border-radius: 999px;
  background: rgba(207, 194, 165, 0.34);
  transform: rotate(2.4deg);
}

.life-lightbox__notes.is-visible .life-lightbox__bubble-note,
.life-lightbox__notes.is-visible .life-lightbox__caption {
  opacity: 1;
  transform: translateY(0) rotate(0deg) scale(1);
}

.life-lightbox.is-closing .life-lightbox__bubble-note,
.life-lightbox.is-closing .life-lightbox__caption {
  transition-delay: 0ms;
}

.life-lightbox__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 2.6rem;
  height: 2.6rem;
  z-index: 4;
  border: 1px solid rgba(96, 82, 64, 0.16);
  border-radius: 999px;
  color: rgba(42, 38, 32, 0.76);
  background: rgba(248, 245, 236, 0.72);
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.life-lightbox__close:hover,
.life-lightbox__close:focus-visible {
  background: rgba(248, 245, 236, 0.92);
  outline: none;
  transform: translateY(-1px);
}

html.life-lightbox-open,
html.life-lightbox-open body {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1020px) {
  .life-cover {
    grid-template-columns: 1fr;
    padding-top: 6rem;
  }

  .life-cover__image {
    order: 1;
  }

  .life-cover__text {
    order: 2;
    padding: 0;
  }

  .life-period__track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: clamp(10.8rem, 20vw, 13.2rem);
    gap: clamp(0.48rem, 1.2vw, 0.82rem);
  }

  .life-entry__media {
    grid-template-columns: minmax(0, 1fr) clamp(5.7rem, 28%, 7.1rem);
  }
}

@media (max-width: 680px) {
  body {
    background: var(--paper);
  }

  .life-nav {
    width: 100%;
    min-height: 3.8rem;
    padding-inline: 0.8rem;
  }

  .life-nav span {
    letter-spacing: 0.06em;
  }

  .life-cover {
    width: min(100% - 1.3rem, 1180px);
    gap: 1.25rem;
    padding: 5.4rem 0 1.7rem;
  }

  .life-cover__image {
    border-width: 7px;
    border-radius: 24px;
  }

  .life-cover h1 {
    font-size: clamp(3.1rem, 16vw, 4.4rem);
  }

  .life-cover__latest {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-top: 1.45rem;
  }

  .life-main {
    width: 100%;
    padding: 1.5rem 0 5rem;
    overflow: hidden;
  }

  .life-period {
    margin-bottom: 3.4rem;
  }

  .life-period__head {
    width: calc(100% - 1.6rem);
    margin-inline: auto;
  }

  .life-period__label {
    font-size: 1.85rem;
  }

  .life-period__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(18rem, 84vw);
    grid-template-columns: none;
    grid-auto-rows: 12.7rem;
    gap: 0.8rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    padding-inline: 0.8rem;
    scroll-padding-inline: 0.8rem;
    scrollbar-width: thin;
  }

  .life-lightbox__notes {
    top: auto;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    width: auto;
    padding: 0.95rem;
    border-radius: 18px;
    transform: translateY(12px);
  }

  .life-lightbox__notes.is-visible {
    transform: translateY(0);
  }

  .life-lightbox__title {
    font-size: 1.35rem;
  }

  .life-lightbox__stamp {
    margin-top: 0.75rem;
    padding-block: 0.48rem;
    font-size: 0.58rem;
  }

  .life-lightbox__bubble-note {
    max-width: 100%;
    margin: 0.72rem 0 0;
    font-size: 0.72rem;
    transform: translateY(7px) rotate(-1deg) scale(0.98);
  }

  .life-lightbox__bubble-note::before,
  .life-lightbox__bubble-note::after {
    display: none;
  }

  .life-lightbox__caption {
    margin-top: 0.75rem;
    padding: 0.7rem 0.82rem;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .life-period__track > .life-entry,
  .life-period__track > .life-entry:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    margin-top: 0;
  }

  .life-entry {
    border-radius: 24px;
    padding: 0.46rem;
    height: 12.7rem;
  }

  .life-entry__media {
    height: 100%;
  }

  .life-entry__cover {
    border-radius: 18px 0 0 18px;
  }

  .life-entry__caption {
    left: 0.6rem;
    bottom: 0.58rem;
    max-width: calc(100% - 1.2rem);
    padding: 0.3rem 0.62rem;
    font-size: 0.68rem;
  }

  .life-entry__tag {
    min-height: 100%;
    padding: 0.62rem 0.48rem;
    border-radius: 0 18px 18px 0;
    gap: 0.8rem;
  }

  .life-entry__tag-place {
    font-size: 0.82rem;
  }

  .life-entry__tag-date {
    font-size: 0.56rem;
  }

  .life-entry__tag-number {
    font-size: 0.58rem;
  }

  .life-entry--mode-2 .life-entry__cover {
    border-radius: 18px;
  }

  .life-entry--mode-2 .life-entry__caption {
    max-width: min(74%, 17rem);
  }

  .life-entry__stub {
    padding: 0.78rem 0.85rem 0.7rem;
  }

  .life-entry__stub-kicker,
  .life-entry__stub-number {
    font-size: 0.55rem;
  }

  .life-entry__stub-place {
    font-size: 1.12rem;
  }

  .life-entry--mode-3 {
    width: auto;
    height: 21.4rem;
    padding: 0.9rem;
  }

  .life-entry__paper-head {
    padding-top: 0.48rem;
    padding-right: 0.85rem;
    margin-bottom: 0.78rem;
  }

  .life-entry__paper-place {
    font-size: 1.22rem;
  }

  .life-entry__paper-kicker,
  .life-entry__paper-subplace,
  .life-entry__paper-date,
  .life-entry__paper-number {
    font-size: 0.58rem;
  }

  .life-entry__paper-number {
    top: 0.82rem;
    right: 1rem;
  }

  .life-entry__paper-photo {
    height: 13.86rem;
  }

  .life-entry--mode-3 .life-entry__caption {
    font-size: 0.66rem;
  }

  .life-entry--mode-4 {
    width: auto;
    height: 21.4rem;
    padding: 0.78rem;
  }

  .life-entry__portrait-photo {
    height: calc(100% - 3.8rem);
    border-radius: 18px;
  }

  .life-entry__portrait-meta {
    margin-top: 0.6rem;
    font-size: 0.56rem;
  }

  .life-entry__portrait-caption {
    margin-top: 0.36rem;
    font-size: 0.72rem;
  }

  .life-entry__portrait-number {
    right: 0.78rem;
    bottom: 0.72rem;
    font-size: 0.54rem;
  }

  .life-entry--mode-5 {
    width: auto;
    height: 21.4rem;
    padding: 0.68rem;
  }

  .life-entry__strip-photo {
    border-radius: 19px;
  }

  .life-entry__strip-caption {
    top: 0.76rem;
    right: 0.7rem;
    max-height: calc(100% - 5.8rem);
    padding: 0.58rem 0.34rem;
    font-size: 0.62rem;
  }

  .life-entry__strip-number {
    top: 0.72rem;
    left: 0.74rem;
    font-size: 0.5rem;
  }

  .life-entry__strip-meta {
    left: 0.68rem;
    right: 0.68rem;
    bottom: 0.64rem;
    font-size: 0.54rem;
  }

  .photo-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .photo-card--wide,
  .photo-card--large {
    grid-column: span 2;
  }

}
