/* One physical book: hard cover, cloth spine, page block and curved hinged leaves. */
.album-scene {
  --page-width: clamp(205px, 18.3vw, 264px);
  --page-height: calc(var(--page-width) * 1.416666667);
  perspective: 1500px;
  height: 570px;
  isolation: isolate;
}
.album-position {
  position: absolute;
  width: var(--page-width);
  height: var(--page-height);
  left: 50%;
  top: 44%;
  transform: translate(0%, -50%);
  transform-style: preserve-3d;
}
.album-book {
  width: 100%;
  height: 100%;
  position: relative;
  transform-origin: 0% 100%;
  transform: rotateX(8deg) rotateY(-16deg) rotateZ(-22deg);
  transform-style: preserve-3d;
}
.album-light {
  position: absolute;
  width: 95%;
  height: 80%;
  top: 2%;
  left: 3%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(226, 245, 239, 0.4), transparent 70%);
  pointer-events: none;
}
.album-shadow {
  position: absolute;
  width: 49%;
  height: 30px;
  border-radius: 50%;
  top: calc(44% + var(--page-height) * 0.53);
  left: 26%;
  background: radial-gradient(ellipse, rgba(49, 82, 82, 0.19), transparent 70%);
  filter: blur(12px);
  transform: rotate(-4deg);
  pointer-events: none;
}
.album-book * {
  box-sizing: border-box;
}
.album-back-board {
  position: absolute;
  inset: -3px;
  border-radius: 2px 5px 5px 2px;
  background: #e2f5ef;
  border: 1px solid #b7d8ce;
  transform: translateZ(-3px);
  box-shadow: 0 2px 5px rgba(49, 82, 82, 0.08);
}
.album-back-board::after {
  content: '时世逝';
  position: absolute;
  inset: 45% 0 auto;
  text-align: center;
  color: #526267;
  font:
    9px Inter,
    sans-serif;
  letter-spacing: 0.2em;
  transform: rotateY(180deg);
}
.album-spine {
  position: absolute;
  left: -10px;
  top: -2px;
  width: 22px;
  height: calc(100% + 4px);
  background: linear-gradient(90deg, #b7d8ce, #e2f5ef 25%, #e2f5ef 70%, #b7d8ce);
  transform: translateZ(8px) rotateY(-90deg);
  border-radius: 3px;
  backface-visibility: hidden;
}
.album-spine span {
  display: block;
  padding-top: 26px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: #526267;
  font-size: 7px;
  letter-spacing: 0.15em;
  margin: auto;
}
.album-foreedge {
  position: absolute;
  right: -8px;
  top: 2px;
  width: 18px;
  height: calc(100% - 4px);
  transform: translateZ(8px) rotateY(90deg);
  background: repeating-linear-gradient(
    90deg,
    #f8fbfb 0px,
    #f8fbfb 2px,
    #dfeae6 2px,
    #dfeae6 2.6px
  );
  backface-visibility: hidden;
}
.album-bottom-edge {
  position: absolute;
  left: 1px;
  bottom: -7px;
  width: calc(100% - 2px);
  height: 18px;
  transform: translateZ(8px) rotateX(-90deg);
  background: repeating-linear-gradient(0deg, #f8fbfb 0px, #f8fbfb 2px, #dfeae6 2px, #dfeae6 2.6px);
  backface-visibility: hidden;
}
.album-base-page {
  position: absolute;
  inset: 0;
  background: #f8fbfb;
  transform: translateZ(2px);
  overflow: hidden;
}
.album-right-texture {
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  max-width: none;
  height: 100%;
}
.album-cover {
  position: absolute;
  inset: -3px;
  transform-style: preserve-3d;
  transform-origin: 0% 50%;
  transform: translateZ(21px) rotateY(0deg);
}
.album-cover-front,
.album-cover-inner {
  position: absolute;
  inset: 0;
  border-radius: 2px 5px 5px 2px;
  backface-visibility: hidden;
  overflow: hidden;
  border: 1px solid #b7d8ce;
  background: #e2f5ef;
}
.album-cover-front {
  transform: translateZ(0.5px);
  box-shadow:
    inset 6px 0 8px rgba(49, 82, 82, 0.08),
    0 3px 4px rgba(49, 82, 82, 0.07);
}
.album-cover-front img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-cover-front::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 12px;
  background: linear-gradient(
    90deg,
    rgba(49, 82, 82, 0.12),
    rgba(255, 255, 255, 0.25) 35%,
    transparent
  );
}
.album-cloth {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath filter='url(%23n)' opacity='.04' d='M0 0h100v100H0z'/%3E%3C/svg%3E");
  pointer-events: none;
}
.album-cover-inner {
  transform: rotateY(180deg);
  background: linear-gradient(90deg, #e2f5ef, #eef5f4);
  box-shadow: inset -8px 0 16px rgba(49, 82, 82, 0.07);
}
.album-bookplate {
  position: absolute;
  inset: 22% 15%;
  padding: 22px 14px;
  border: 1px solid #b7d8ce;
  text-align: center;
  color: #526267;
}
.album-bookplate > span {
  display: block;
  font-size: 6px;
  letter-spacing: 0.1em;
  margin-bottom: 22px;
}
.album-bookplate strong {
  font: 400 19px/1.9 var(--journal-serif);
  letter-spacing: 0.06em;
}
.album-bookplate i {
  display: block;
  font-size: 13px;
  margin-top: 24px;
  font-style: normal;
}
.album-ribbon {
  position: absolute;
  right: 13%;
  top: 0;
  width: 10px;
  height: 20%;
  background: rgba(239, 158, 143, 0.65);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 93%, 0 100%);
}
.album-leaves {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.album-leaf {
  position: absolute;
  inset: 0;
  transform-origin: 0% 50%;
  transform-style: preserve-3d;
}
.album-strip {
  position: absolute;
  width: calc(var(--page-width) / 8);
  height: 100%;
  top: 0;
  left: calc(var(--page-width) / 8);
  transform-origin: 0% 50%;
  transform-style: preserve-3d;
}
.album-leaf > .album-strip {
  left: 0;
}
.album-strip-face {
  position: absolute;
  width: calc(100% + 1px);
  height: 100%;
  inset: 0 auto auto 0;
  background-color: #f8fbfb;
  background-size: calc(var(--page-width) * 2) var(--page-height);
  background-repeat: no-repeat;
  backface-visibility: hidden;
}
.album-strip-front {
  transform: translateZ(0.13px);
}
.album-strip-back {
  transform: rotateY(180deg) translateZ(0.13px);
}
.album-strip-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(
    90deg,
    rgba(49, 82, 82, 0.18),
    rgba(49, 82, 82, 0.02) 65%,
    rgba(255, 255, 255, 0.07)
  );
}
.album-strip-front.is-endpaper {
  background-image: linear-gradient(90deg, #f8fbfb, #eef5f4);
  background-size: var(--page-width) 100%;
}
.album-caption {
  position: absolute;
  bottom: 57px;
  left: 0;
  right: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-inline: 18px;
  color: var(--ui-muted);
}
.album-caption .handwritten {
  font-size: 16px;
  transform: rotate(-3deg);
}
.album-status {
  font-size: 9px;
  letter-spacing: 0.05em;
}
.album-controls {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.album-controls button {
  min-width: 35px;
  padding: 7px 11px;
  font-size: 10px;
  color: var(--ui-ink);
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  background: var(--ui-card-surface);
  transition:
    background 0.2s,
    border-color 0.2s;
}
.album-controls button:hover:not(:disabled) {
  background: var(--ui-hover-surface);
  border-color: var(--ui-control-line);
}
.album-controls button:disabled {
  color: var(--ui-muted);
  opacity: 0.5;
  cursor: default;
}
.album-control-divider {
  width: 1px;
  height: 12px;
  background: var(--ui-line);
  margin-inline: 3px;
}
@media (max-width: 1050px) {
  .album-scene {
    --page-width: clamp(170px, 21vw, 230px);
    height: 490px;
  }
  .album-caption {
    padding-inline: 0;
  }
  .album-caption .handwritten {
    font-size: 14px;
  }
}
@media (max-width: 760px) {
  .album-scene {
    --page-width: min(40vw, 210px);
    width: 100%;
    height: 430px;
  }
  .album-caption {
    bottom: 57px;
  }
  .album-caption .handwritten {
    font-size: 13px;
  }
  .album-status {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .album-controls button {
    transition: none;
  }
}

/* A narrow book-gutter shadow sits above the printed page art. */
.album-base-page::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 12px;
  background: linear-gradient(90deg, rgba(49, 82, 82, 0.11), transparent);
  pointer-events: none;
}
.album-leaf > .album-strip > .album-strip-back::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 65%, rgba(49, 82, 82, 0.09));
  pointer-events: none;
}

.album-flat-page {
  position: absolute;
  inset: 0;
  background-color: #f8fbfb;
  background-size: calc(var(--page-width) * 2) var(--page-height);
  background-repeat: no-repeat;
  backface-visibility: hidden;
}
.album-flat-front {
  transform: translateZ(0.7px);
  background-position: calc(var(--page-width) * -1) 0px;
}
.album-flat-front.is-endpaper {
  background-image: linear-gradient(90deg, #f8fbfb, #eef5f4);
  background-size: 100% 100%;
}
.album-flat-back {
  transform: rotateY(180deg) translateZ(0.7px);
  background-position: 0px 0px;
}
.album-flat-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(49, 82, 82, 0.1), transparent 5%);
}
.album-flat-back::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 95%, rgba(49, 82, 82, 0.1));
}

/* The closed book balances on its bottom-left corner throughout both rotations. */
.album-contact-shadow {
  position: absolute;
  left: calc(50% - 19px);
  top: calc(44% + var(--page-height) * 0.5 - 1px);
  width: 38px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(49, 82, 82, 0.3), transparent 72%);
  filter: blur(2px);
  pointer-events: none;
}
/* The photographic jacket carries its own dark forest binding. */
.album-back-board {
  background: #182e29;
  border-color: #18252a;
}
.album-back-board::after {
  color: #e2f5ef;
}
.album-spine {
  background: linear-gradient(90deg, #182e29, #18252a 50%, #182e29);
}
.album-spine span {
  color: #e2f5ef;
}
.album-cover-front {
  border-color: #182e29;
}

/* Album artwork has its own paper and botanical identity, independent of the website UI. */
.botanical-album .album-back-board,
.botanical-album .album-cover-front,
.botanical-album .album-cover-inner {
  background-color: #f7f5ef;
  border-color: #d4d1c6;
}
.botanical-album .album-cover-inner {
  background-image: var(--opening-art);
  background-size: 200% 100%;
  background-position: left top;
}
.botanical-album .album-bookplate,
.botanical-album .album-cover-inner::before,
.botanical-album .album-cover-inner::after,
.botanical-album .album-back-board::after,
.botanical-album .album-cloth {
  display: none;
}
.botanical-album .album-back-board {
  background-image: var(--back-art);
  background-size: 100% 100%;
}
.botanical-album .is-endpaper {
  background-image: var(--opening-art);
  background-size: calc(var(--page-width) * 2) var(--page-height);
  background-position: calc(var(--page-width) * -1) 0;
}
.botanical-album .album-spine {
  background: linear-gradient(90deg, #d8d3c8, #f7f5ef 30%, #f7f5ef 70%, #d8d3c8);
}
.botanical-album .album-spine span {
  color: #5e6258;
}

.botanical-album .album-ribbon {
  display: none;
}

.botanical-album .album-foreedge {
  background: repeating-linear-gradient(
    90deg,
    #f7f5ef 0px,
    #f7f5ef 2px,
    #d8d4c9 2px,
    #d8d4c9 2.6px
  );
}
.botanical-album .album-bottom-edge {
  background: repeating-linear-gradient(0deg, #f7f5ef 0px, #f7f5ef 2px, #d8d4c9 2px, #d8d4c9 2.6px);
}
.botanical-album .album-base-page,
.botanical-album .album-flat-page {
  background-color: #f7f5ef;
}

.album-controls [data-album-action='toggle'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-width: 52px;
  padding-left: 0;
  padding-right: 0;
}
.album-controls [data-album-action='toggle'] svg {
  display: block;
  flex: none;
}
.album-caption {
  justify-content: flex-end;
}

.album-controls [data-album-action='insert-blank'],
.album-controls [data-album-action='delete-blank'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  padding: 7px 0;
}
/* Continuous printed spine, without a contrasting cloth strip or invented lettering. */
.botanical-album .album-spine {
  background-image:
    linear-gradient(90deg, #00000024, transparent 35%, #ffffff14 65%, #00000020), var(--cover-art);
  background-size:
    100% 100%,
    auto 100%;
  background-position:
    center,
    left center;
  border-radius: 2px;
}
.botanical-album .album-spine span {
  display: none;
}
.botanical-album .album-cover-front {
  border-color: #5d625e33;
}

/* Touch targets remain usable without changing the visual book artwork. */
@media (max-width: 700px), (pointer: coarse) and (max-width: 1100px) {
  .album-controls {
    gap: 3px;
  }
  .album-controls button,
  .album-controls [data-album-action='toggle'],
  .album-controls [data-album-action='insert-blank'],
  .album-controls [data-album-action='delete-blank'] {
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    touch-action: manipulation;
  }
}

/* Shared language controls and screen-reader utilities for both entry points. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.language-picker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}
.language-picker select {
  min-height: 44px;
  max-width: 160px;
  font: inherit;
  color: #31484a;
  background: #fff;
  border: 1px solid #879c93;
  border-radius: 8px;
  padding: 8px;
}
.language-picker :focus-visible {
  outline: 3px solid #285e51;
  outline-offset: 3px;
}
@media (max-width: 700px) {
  .home-b .header-row {
    flex-wrap: wrap;
  }
  .home-b .header-row .language-picker {
    flex-basis: 100%;
    justify-content: flex-end;
  }
}
@media (forced-colors: active) {
  .album-controls button,
  .book-writing-hit,
  .book-writing-input {
    border: 1px solid ButtonText;
  }
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 60;
  transform: translateY(-180%);
  padding: 12px 18px;
  color: #18252a;
  background: #fff;
}
.skip-link:focus {
  transform: none;
}
