/* Shared layout: 480px text column inset 16px, image inset 8px. */
body.text-page {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 8px;
  margin: 0;
  background: #F2F1EE;
  color: #37322f;
  font-family: var(--font-text);
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: -.01em;
  font-optical-sizing: none;
  font-variation-settings: var(--font-text-variation);
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
body.text-page main {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 0 8px 8px;
}
body.text-page nav {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 16px 24px;
  margin-bottom: 56px;
}
body.text-page nav img { display: block; }
body.text-page .text-page-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.text-page a {
  color: #756d63;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}
body.text-page a:hover { color: #514a43; text-decoration: none; }
body.text-page h1,
body.text-page h2 {
  max-width: 480px;
  color: #1b1817;
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: -.01em;
}
body.text-page h1 { margin: 0 0 8px; }
body.text-page h2 { margin: 32px 0 8px; }
body.text-page p { max-width: 480px; margin: 0 0 16px; overflow-wrap: anywhere; }
body.text-page h1 + p { color: #666; }

.text-page-scene {
  position: sticky;
  top: 8px;
  height: calc(100svh - 16px);
  overflow: hidden;
  border-radius: 6px;
  background: #d3cfc8;
}
.text-page-scene img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The scene is mirrored, so its visible left edge is the source's right edge. */
  object-position: right center;
  transform: scaleX(-1);
}
.text-page-scene-night {
  opacity: 0;
  /* One-second crossfades begin at 5s, 10s, 15s, and so on. */
  animation: text-page-room-crossfade 10s ease-in-out 1s infinite;
}
@keyframes text-page-room-crossfade {
  0%, 40%, 100% { opacity: 0; }
  50%, 90% { opacity: 1; }
}
@media (max-width: 700px) {
  body.text-page { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  body.text-page main { padding-right: 8px; }
  .text-page-scene {
    position: relative;
    top: auto;
    height: auto;
    aspect-ratio: 16 / 10;
  }
}
@media (max-width: 600px) {
  body.text-page nav { margin-bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .text-page-scene-night { animation: none; }
}
