/* One counter, four moments. Native scrolling — no scroll interception. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  transform: none;
}
.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.counter-story {
  position: relative;
  background: #ece4d2;
  --table: #ece4d2;
  --wall: #2f3628;
  --ink: #48523b;
  --story-progress: 0;
}
.counter-story[data-room="morning"] {
  --table: #f5eedf;
  --wall: #646c4e;
}
.story-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 5%;
  right: 5%;
  height: 108px;
  display: flex;
  align-items: center;
  gap: 35px;
  border-bottom: 1px solid #e2dbc02c;
  color: #e8dfbf;
}
.little-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 8px;
  letter-spacing: 0.2em;
  flex: 1;
}
.little-brand svg {
  width: 24px;
  height: 37px;
}
.story-header nav {
  display: flex;
  gap: 32px;
  font-size: 11px;
}
.story-header nav a {
  padding: 12px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.story-header nav a:hover {
  border-color: #d4c7a6;
}
.story-header nav span {
  margin-left: 9px;
}
.story-header .light-switch {
  margin-left: 35px;
  padding-left: 26px;
  border-left: 1px solid #b8b58c35;
}
.story-header .switch-dial {
  width: 42px;
  height: 42px;
}
.story-header .switch-dial svg {
  width: 17px;
  height: 24px;
}
.story-header .light-state {
  font-size: 15px;
}
.story-header .light-switch-copy .eyebrow {
  font-size: 7px;
}
/* The non-animated version is deliberately laid out, not a frozen pin. */
.story-stage {
  display: none;
}
.story-frame {
  position: relative;
  height: 100svh;
  min-height: 760px;
  isolation: isolate;
  overflow: hidden;
  background: var(--table);
}
.frame-welcome:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 26%;
  background: var(--wall) url("/assets/wallpaper-30f589a6.svg") repeat;
  background-size: 160px 200px;
  z-index: -1;
}
.welcome-lockup {
  position: absolute;
  width: 44%;
  left: 6%;
  top: 30%;
  color: #4b543b;
}
.welcome-lockup > .eyebrow {
  text-align: center;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: #8f896d;
  margin-bottom: 0;
}
.illustrated-masthead {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.brand-letter {
  fill: currentColor;
}
.masthead-flourish {
  opacity: 0.65;
}
.welcome-line {
  text-align: center;
  font: 14px/1.9 var(--sans);
  margin: 0 auto;
  color: #77745f;
}
.unfold-link {
  display: flex;
  align-items: start;
  justify-content: center;
  font: 21px var(--serif);
  font-style: italic;
  margin: 26px auto 0;
  gap: 14px;
  width: max-content;
  color: #92724f;
}
.unfold-link span {
  padding-top: 10px;
}
.unfold-link svg {
  width: 42px;
  height: 51px;
  transition: transform 0.4s;
}
.unfold-link:hover svg {
  transform: translateY(7px) rotate(8deg);
}
.fallback-art {
  position: absolute;
  right: 2%;
  width: 46%;
  bottom: 8%;
}
.fallback-art img {
  width: 100%;
  height: auto;
}
.story-copy {
  position: absolute;
  top: 26%;
  left: 8%;
  width: 32%;
  max-width: 490px;
}
.story-copy > .eyebrow {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: #8b8166;
  margin-bottom: 27px;
}
.story-copy h2 {
  font-size: clamp(42px, 4.2vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  color: #4e573e;
}
.story-copy h2 em {
  font-size: 1.45em;
  line-height: 1.07;
  display: inline-block;
  margin-top: 5px;
  color: #737e54;
}
.story-copy > p:not(.eyebrow) {
  font: 14px/1.95 var(--sans);
  color: #77735d;
  margin-top: 27px;
}
.hand-note {
  display: block;
  font: 22px/1.3 var(--serif);
  font-style: italic;
  color: #9a7454;
  margin-top: 26px;
  transform: rotate(-4deg);
  transform-origin: left center;
}
.frame-writing .story-copy {
  width: 34%;
}
.frame-writing .story-copy h2 {
  font-size: clamp(41px, 3.5vw, 57px);
}
.frame-writing .story-copy h2 em {
  font-size: 1.25em;
}
.frame-writing .text-link {
  margin-top: 25px;
  font-size: 11px;
}
.family-fallback figcaption {
  text-align: center;
  font: 19px var(--serif);
  font-style: italic;
  margin-top: 14px;
  color: #77775a;
}
/* Motion enhancement only once all prerequisites are present. */
[data-story-motion="true"] .story-stage {
  display: block;
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
}
[data-story-motion="true"] .story-frames {
  position: relative;
  margin-top: -100svh;
  pointer-events: none;
}
[data-story-motion="true"] .story-frame {
  background: transparent;
  min-height: 0;
  height: 100svh;
  overflow: visible;
  pointer-events: none;
}
[data-story-motion="true"] .story-frame a {
  pointer-events: auto;
}
[data-story-motion="true"] .frame-welcome:before,
[data-story-motion="true"] .fallback-art {
  display: none;
}
[data-story-motion="true"] .frame-making .story-copy {
  left: 62%;
  top: 31%;
  width: 32%;
}
[data-story-motion="true"] .frame-life .story-copy {
  left: 7%;
  top: 34%;
  width: 30%;
}
[data-story-motion="true"] .frame-writing .story-copy {
  top: 30%;
  left: 7%;
  width: 32%;
}
.stage-wall {
  filter: var(--room-wall-filter);
  position: absolute;
  inset: 0;
  background: var(--wall) url("/assets/wallpaper-30f589a6.svg") repeat;
  background-size: 160px 200px;
  transition:
    background-color 0.85s ease,
    filter 0.85s ease;
}
.stage-wall:after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 58% 25%, #bfa26919, transparent 70%);
}
.table-surface {
  position: absolute;
  inset: 25% -8% -5%;
  transform: rotate(-2deg);
  background-color: var(--table);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.79' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath d='M0 0h180v180H0z' fill='%235a472e' filter='url(%23noise)' opacity='.06'/%3E%3C/svg%3E");
  border-top: 9px solid #aa906422;
  box-shadow:
    0 -12px 30px #171d0f30,
    inset 0 6px 0 #ffffff36;
  transition:
    background-color 0.85s ease,
    filter 0.85s ease;
}
.stage-lamplight {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(ellipse at 88% 22%, #ffc86235, transparent 60%);
  mix-blend-mode: soft-light;
  transition: opacity 0.85s ease;
}
[data-room="morning"] .stage-lamplight {
  opacity: 0;
}
.scene-object {
  position: absolute;
  left: calc(var(--x, 65) * 1%);
  top: calc(var(--y, 62) * 1%);
  opacity: var(--alpha, 1);
  transform: translate(-50%, -50%) rotate(calc(var(--rotate, 0) * 1deg))
    scale(var(--scale, 1));
  transform-origin: 50% 60%;
  will-change: transform;
  pointer-events: none;
}
.scene-object > img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(8px 20px 16px #4e3f2620);
}
.object-bowl {
  width: 40%;
  max-width: 660px;
  z-index: 4;
}
.object-loaf {
  width: 42%;
  max-width: 670px;
  z-index: 3;
  --alpha: 0;
}
.object-notebook {
  width: 57%;
  max-width: 960px;
  z-index: 5;
  --alpha: 0;
  perspective: 1000px;
}
.notebook-words {
  position: absolute;
  left: 21%;
  top: 38%;
  width: 27%;
  transform: rotate(-7deg);
  text-align: center;
  font: clamp(16px, 2.1vw, 32px)/1.12 var(--serif);
  color: #8a7a5a;
  opacity: var(--writing, 0);
}
.notebook-words em {
  font-size: 1.18em;
}
.notebook-words svg {
  width: 100%;
  height: 40px;
  margin-top: 15px;
}
.notebook-words path {
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--writing, 0));
}
.turning-page {
  position: absolute;
  top: 8.5%;
  left: 48%;
  width: 41%;
  height: 68%;
  background: linear-gradient(95deg, #d0b994, #f8f0dc 17%, #ebe0c6 97%);
  clip-path: polygon(3% 0, 100% 3%, 98% 95%, 0 100%);
  transform-origin: left center;
  transform: rotate(-6deg) rotateY(calc(var(--turn, 0) * -172deg));
  opacity: var(--page-alpha, 0);
  box-shadow: inset 3px 0 8px #6b55382e;
}
.small-plate {
  width: 14%;
  max-width: 240px;
  z-index: 2;
  --alpha: 0;
  filter: drop-shadow(4px 11px 8px #5b4d3020);
}
.small-plate svg {
  display: block;
  width: 100%;
  overflow: visible;
}
.plate-4 {
  color: #8d8a70;
  filter: none;
}
.plate-4 > span {
  position: absolute;
  bottom: -24px;
  width: 160%;
  left: -30%;
  text-align: center;
  font: 18px var(--serif);
  font-style: italic;
  color: #8c7855;
  transform: rotate(-5deg);
}
.counter-dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
}
.stage-progress {
  position: absolute;
  left: 5.5%;
  right: 5.5%;
  bottom: 27px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #8f8669;
  z-index: 7;
}
.progress-index {
  font: 20px var(--serif);
  font-style: italic;
}
.progress-rule {
  width: 65px;
  height: 1px;
  background: #a49c7759;
}
.progress-rule i {
  display: block;
  height: 1px;
  width: calc(var(--story-progress) * 100%);
  background: #7f8157;
}
.progress-label {
  font-size: 9px;
  letter-spacing: 0.08em;
}
.progress-hint {
  margin-left: auto;
  font-size: 7px;
  letter-spacing: 0.16em;
  display: flex;
  gap: 25px;
  align-items: center;
}
.progress-hint > span {
  font: 22px var(--serif);
}
.ink-arriving .brand-letter {
  animation: letter-arrive 1.9s both;
  animation-delay: calc(0.16s + var(--letter) * 0.09s);
}
.ink-arriving .masthead-flourish path {
  stroke-dasharray: 1;
  animation: flourish-arrive 2.6s 0.3s both;
}
@keyframes letter-arrive {
  0% {
    fill-opacity: 0;
    stroke: currentColor;
    stroke-width: 2;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }
  65% {
    fill-opacity: 0.12;
    stroke: currentColor;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
  }
  100% {
    fill-opacity: 1;
    stroke: transparent;
    stroke-dashoffset: 0;
  }
}
@keyframes flourish-arrive {
  from {
    stroke-dashoffset: 1;
    opacity: 0;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}
/* The notebook releases into a personal letter, not another feature block. */
.letter-section {
  position: relative;
  padding: 120px 9% 130px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12%;
  overflow: hidden;
}
.letter-thread {
  position: absolute;
  top: -70px;
  left: 0;
  width: 12%;
  color: #969675;
}
.letter-thread svg {
  width: 100%;
  height: 390px;
}
.letter-thread path {
  stroke-dasharray: 1;
  stroke-dashoffset: var(--letter-line, 1);
}
.letter-copy {
  position: relative;
  padding-left: 8%;
}
.letter-copy > .eyebrow {
  font-size: 8px;
  color: #8c876d;
  margin-bottom: 28px;
}
.letter-copy h2 {
  font-size: clamp(45px, 4.7vw, 70px);
  line-height: 0.97;
  color: #596044;
  letter-spacing: -0.025em;
}
.letter-copy h2 em {
  color: #7c835d;
}
.letter-copy .letter-lede {
  font: 25px/1.35 var(--serif);
  margin-top: 28px;
}
.letter-copy
  > p:not(.eyebrow):not(.letter-lede):not(.signature):not(.letter-last) {
  font-size: 14px;
  line-height: 1.9;
  margin-top: 22px;
  color: #71705c;
  max-width: 440px;
}
.letter-last {
  font: 24px/1.4 var(--serif);
  font-style: italic;
  color: #818265;
  margin-top: 25px;
}
.kitchen-postcard {
  position: relative;
  align-self: center;
  transform: rotate(5deg);
  margin-top: 25px;
  padding: 13px 13px 65px;
  background: #faf1de;
  box-shadow: 0 10px 25px #54492c21;
}
.kitchen-postcard > img:first-child {
  width: 100%;
  aspect-ratio: 0.92;
  object-fit: cover;
  object-position: 75% center;
}
.kitchen-postcard figcaption {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  text-align: center;
  font: 21px/1.1 var(--serif);
  font-style: italic;
  color: #8d7b5f;
}
.kitchen-postcard .postcard-branch {
  position: absolute;
  width: 32%;
  height: auto;
  bottom: -70px;
  right: -30px;
  transform: rotate(31deg);
}
.closing h2 {
  font-size: clamp(48px, 5vw, 74px);
  line-height: 1.05;
}
@media (min-width: 1700px) {
  .welcome-lockup {
    width: 41%;
    left: 9%;
    top: 31%;
  }
  .welcome-line {
    font-size: 15px;
  }
  .object-bowl {
    max-width: 760px;
  }
}
@media (max-width: 1050px) {
  .story-header {
    gap: 25px;
  }
  .little-brand span {
    max-width: 95px;
    line-height: 1.8;
    font-size: 7px;
  }
  .story-header nav {
    gap: 22px;
  }
  .story-header .light-switch {
    margin-left: 0;
    padding-left: 20px;
  }
  .story-header .light-switch-copy {
    display: none;
  }
  .welcome-lockup {
    width: 51%;
    left: 2%;
    top: 33%;
  }
  .welcome-lockup > .eyebrow {
    font-size: 6px;
  }
  .welcome-line {
    font-size: 12px;
  }
  .story-copy h2 {
    font-size: 45px;
  }
  .story-copy > p:not(.eyebrow) {
    font-size: 12px;
  }
  .story-copy .hand-note {
    font-size: 20px;
  }
  .frame-writing .story-copy h2 {
    font-size: 40px;
  }
  .letter-section {
    padding: 100px 6%;
    gap: 8%;
  }
  .letter-copy {
    padding-left: 3%;
  }
  .letter-copy
    > p:not(.eyebrow):not(.letter-lede):not(.signature):not(.letter-last) {
    font-size: 13px;
  }
  .letter-copy .letter-lede {
    font-size: 24px;
  }
}
@media (max-width: 700px) {
  .story-header {
    left: 24px;
    right: 24px;
    height: 82px;
    gap: 16px;
  }
  .little-brand {
    gap: 8px;
  }
  .little-brand span {
    max-width: 105px;
    font-size: 6px;
    letter-spacing: 0.12em;
  }
  .little-brand svg {
    width: 18px;
    height: 30px;
  }
  .story-header nav {
    gap: 15px;
    font-size: 9px;
  }
  .story-header nav a:first-child {
    display: none;
  }
  .story-header nav span {
    margin-left: 3px;
  }
  .story-header .light-switch {
    padding-left: 12px;
  }
  .story-header .switch-dial {
    width: 32px;
    height: 32px;
  }
  .story-header .switch-dial svg {
    width: 14px;
    height: 21px;
  }
  .story-frame {
    min-height: 780px;
    height: 100svh;
  }
  .welcome-lockup {
    left: 3%;
    top: 21%;
    width: 92%;
    z-index: 5;
  }
  .welcome-lockup > .eyebrow {
    font-size: 6px;
    margin-bottom: 3px;
    letter-spacing: 0.14em;
  }
  .illustrated-masthead {
    max-width: 440px;
    margin: 0 auto;
  }
  .welcome-line {
    font-size: 11px;
    line-height: 1.7;
    margin-top: -8px;
  }
  .unfold-link {
    font-size: 18px;
    margin: 14px auto 0;
    gap: 10px;
  }
  .unfold-link svg {
    width: 28px;
    height: 36px;
  }
  .unfold-link span {
    padding-top: 6px;
  }
  .fallback-art {
    width: 79%;
    right: 2%;
    bottom: 1%;
  }
  .frame-welcome .fallback-art {
    width: 67%;
    bottom: 0;
  }
  .story-copy {
    left: 8%;
    top: 14%;
    width: 80%;
  }
  .story-copy > .eyebrow {
    font-size: 7px;
    margin-bottom: 20px;
  }
  .story-copy h2 {
    font-size: 44px;
    line-height: 1.01;
  }
  .story-copy h2 em {
    font-size: 1.3em;
  }
  .story-copy > p:not(.eyebrow) {
    font-size: 12px;
    line-height: 1.8;
    margin-top: 20px;
  }
  .hand-note {
    font-size: 20px;
    margin-top: 20px;
  }
  .frame-writing .story-copy {
    width: 84%;
  }
  .frame-writing .story-copy h2 {
    font-size: 40px;
  }
  .frame-writing .text-link {
    margin-top: 16px;
    font-size: 10px;
    padding: 7px 0;
  }
  [data-story-motion="true"] .story-stage {
    min-height: 640px;
  }
  [data-story-motion="true"] .story-frame {
    min-height: 640px;
  }
  [data-story-motion="true"] .story-frames {
    margin-top: max(-100svh, -1000px);
  }
  [data-story-motion="true"] .frame-making .story-copy,
  [data-story-motion="true"] .frame-life .story-copy,
  [data-story-motion="true"] .frame-writing .story-copy {
    left: 8%;
    top: 23%;
    width: 84%;
  }
  [data-story-motion="true"] .frame-making .story-copy {
    top: 25%;
  }
  [data-story-motion="true"] .frame-making h2 {
    line-height: 0.9;
  }
  [data-story-motion="true"] .frame-making h2 br,
  [data-story-motion="true"] .frame-life h2 br {
    display: none;
  }
  [data-story-motion="true"] .frame-making h2 em,
  [data-story-motion="true"] .frame-life h2 em {
    margin-left: 7px;
  }
  .table-surface {
    inset: 20% -8% -3%;
    border-top-width: 6px;
    transform: rotate(-3deg);
  }
  .stage-wall {
    background-size: 120px 150px;
  }
  .object-bowl {
    width: 78%;
  }
  .object-loaf {
    width: 88%;
  }
  .object-notebook {
    width: 96%;
  }
  .small-plate {
    width: 24%;
  }
  .plate-4 > span {
    font-size: 13px;
    bottom: -19px;
  }
  .notebook-words {
    font-size: 20px;
  }
  .notebook-words svg {
    height: 23px;
    margin-top: 6px;
  }
  .stage-progress {
    left: 24px;
    right: 24px;
    bottom: 19px;
    gap: 10px;
  }
  .progress-index {
    font-size: 18px;
  }
  .progress-rule {
    width: 34px;
  }
  .progress-label {
    font-size: 8px;
  }
  .progress-hint {
    font-size: 0;
    gap: 0;
  }
  .progress-hint > span {
    font-size: 23px;
  }
  .letter-section {
    padding: 80px 27px;
    display: block;
  }
  .letter-thread {
    top: -90px;
    width: 120px;
    left: auto;
    right: -12px;
    opacity: 0.6;
  }
  .letter-copy {
    padding-left: 0;
  }
  .letter-copy > .eyebrow {
    font-size: 7px;
  }
  .letter-copy h2 {
    font-size: 56px;
  }
  .letter-copy .letter-lede {
    font-size: 25px;
  }
  .letter-copy .letter-lede br {
    display: none;
  }
  .letter-copy
    > p:not(.eyebrow):not(.letter-lede):not(.signature):not(.letter-last) {
    font-size: 13px;
  }
  .letter-last {
    font-size: 24px;
  }
  .kitchen-postcard {
    width: 87%;
    max-width: 360px;
    margin: 65px auto 15px;
    padding: 10px 10px 58px;
  }
  .kitchen-postcard figcaption {
    font-size: 19px;
  }
  .closing h2 {
    font-size: 52px;
  }
}
@media (max-width: 360px) {
  .story-header {
    left: 20px;
    right: 20px;
    gap: 9px;
  }
  .little-brand span {
    max-width: 78px;
    font-size: 5px;
  }
  .story-header nav {
    font-size: 8px;
  }
  .welcome-lockup {
    top: 23%;
  }
  .welcome-lockup > .eyebrow {
    font-size: 5px;
  }
  .welcome-line {
    font-size: 10px;
  }
  .story-copy h2 {
    font-size: 38px;
  }
  .frame-writing .story-copy h2 {
    font-size: 36px;
  }
  .story-copy > .eyebrow {
    font-size: 6px;
  }
  .story-copy > p:not(.eyebrow) {
    font-size: 11px;
  }
  .notebook-words {
    font-size: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .letter-thread path {
    stroke-dashoffset: 0;
  }
  .story-stage {
    display: none !important;
  }
  .story-frames {
    margin-top: 0 !important;
  }
  .story-frame {
    min-height: 780px !important;
    background: var(--table) !important;
  }
  .fallback-art {
    display: block !important;
  }
  .frame-welcome:before {
    display: block !important;
  }
}

/* The quieter, illustrated edition: one focal point and room to breathe. */
.counter-story {
  --stage-height: max(650px, 100svh);
}
.stage-wall:after {
  background: var(--wall);
  opacity: 0.68;
  transition:
    background-color 0.85s ease,
    filter 0.85s ease;
}
.table-surface {
  top: calc(25% - var(--story-progress) * 18%);
  border-top: 3px solid #b7a88825;
  box-shadow: 0 -5px 18px #1f281620;
}
.scene-object > img {
  filter: none;
}
.object-bowl {
  width: 33%;
  max-width: 520px;
}
.object-loaf {
  width: 37%;
  max-width: 570px;
}
.object-notebook {
  width: 50%;
  max-width: 850px;
}
.small-plate {
  width: 12%;
  max-width: 185px;
  filter: none;
  opacity: var(--alpha, 0);
}
.plate-4 {
  width: 10%;
}
.plate-4 > span {
  font-size: 16px;
  color: #96876c;
}
.notebook-words {
  left: 18%;
  top: 36%;
  width: 29%;
  transform: rotate(-3deg);
  font-size: clamp(18px, 1.8vw, 28px);
  color: #8c8169;
}
.turning-page {
  top: 11%;
  left: 48%;
  width: 41%;
  height: 71%;
  background: linear-gradient(95deg, #d7cbb8, #f3ead9 12%, #eee5d4);
  box-shadow: none;
}
.family-fallback svg {
  width: 100%;
  height: auto;
}
[data-story-motion="true"] .story-stage {
  height: var(--stage-height);
  min-height: 0;
}
[data-story-motion="true"] .story-frames {
  margin-top: calc(-1 * var(--stage-height));
}
[data-story-motion="true"] .story-frame {
  height: var(--stage-height);
  min-height: 0;
}
[data-story-motion="true"] .frame-making .story-copy {
  left: 62%;
  top: 31%;
  width: 32%;
}
@media (max-width: 700px) {
  .counter-story {
    --stage-height: max(640px, 100svh);
  }
  .table-surface {
    top: calc(20% - var(--story-progress) * 13%);
  }
  .object-bowl {
    width: 71%;
  }
  .object-loaf {
    width: 78%;
  }
  .object-notebook {
    width: 91%;
  }
  .small-plate {
    width: 24%;
  }
  .plate-4 {
    width: 20%;
  }
  .plate-4 > span {
    font-size: 13px;
  }
  .notebook-words {
    font-size: 19px;
  }
  [data-story-motion="true"] .frame-making .story-copy {
    left: 8%;
    top: 25%;
    width: 84%;
  }
}

/* Keep the hand-drawn world: calmer objects did not mean a blank background. */
.stage-wall:after {
  opacity: 0.12;
}
.flour-thread {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.flour-thread path {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.flour-line {
  stroke: #fffdf0;
  stroke-width: 2.3;
  opacity: 0.85;
}
.ink-line {
  stroke: #828b65;
  stroke-width: 1;
  opacity: 0.7;
}
.house-sketch {
  position: absolute;
  left: 7%;
  bottom: 9%;
  width: 14%;
  color: #a49070;
  opacity: var(--house, 0);
}
.house-sketch path {
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--house, 0));
}
.closing:before {
  background: radial-gradient(ellipse at 50% 20%, #2e322780, #1c241bac);
}
@media (max-width: 700px) {
  .house-sketch {
    width: 25%;
    left: 6%;
    bottom: 14%;
  }
}

/* Warm block-printed linen, drawn from Isaac's wallpaper reference. */
.counter-story {
  --wall: #d9c298;
}
.counter-story[data-room="morning"] {
  --wall: #f3e9d4;
}
.stage-wall {
  background-image: url("/assets/floral-wallpaper-2fdb42d2.webp");
  background-size: 840px 840px;
}
.stage-wall:after {
  opacity: 0.16;
}
.frame-welcome:before {
  background: var(--wall) url("/assets/floral-wallpaper-2fdb42d2.webp") repeat;
  background-size: 840px 840px;
}
.story-header {
  color: #554432;
  border-bottom-color: #755d3b35;
  isolation: isolate;
}
.story-header:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -6vw;
  background: linear-gradient(#f0e4cfd9, #f0e4cfb0);
}
.story-header nav a:hover {
  border-color: #7e603c;
}
.story-header .light-switch {
  color: #624c32;
  border-left-color: #755d3b35;
}
.story-header .light-switch-copy .eyebrow {
  color: #69563d;
}
.story-header .switch-dial {
  background: radial-gradient(circle at 35% 25%, #ead8aa, #b09b7090);
  border-color: #9a7e475e;
  box-shadow: inset 0 0 0 3px #dbccab60;
}
.story-header .switch-dial svg {
  color: #70532b;
}
.closing {
  color: #554934;
  background: #e7d8b9 url("/assets/floral-wallpaper-2fdb42d2.webp") repeat;
  background-size: 840px 840px;
}
.closing:before {
  background: #e6d8bd24;
}
.closing-inner {
  background: radial-gradient(
    ellipse at center,
    #f1e7d1 32%,
    #f1e7d1f2 47%,
    #f1e7d1c9 60%,
    transparent 76%
  );
}
.closing-mark {
  color: #91805a;
}
.closing-inner > .eyebrow {
  color: #7e6a48;
}
.closing h2 em {
  color: #82633f;
}
.closing-inner > p:not(.eyebrow) {
  color: #786549;
}
.closing .text-link {
  color: #6c5335;
  border-color: #876e455e;
}
.site-footer {
  color: #5c4931;
  border-top-color: #8f70413d;
  background: #efe4cee6;
  margin: 0;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.site-footer > span:nth-child(2),
.site-footer > span:last-child {
  color: #806b4b;
}

/* Ink on the actual page, not an unrelated doodle or a floating rectangle. */
.book-flower {
  position: absolute;
  left: 23%;
  top: 29%;
  width: 18%;
  height: 37%;
  transform: rotate(-9deg);
  pointer-events: none;
  overflow: visible;
}
.book-flower .ink-path {
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--writing, 1));
}
.book-flower .flower-wash {
  opacity: calc(var(--writing, 1) * 0.72);
}
.turning-leaf {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  overflow: visible;
}
@media (max-width: 700px) {
  .stage-wall,
  .frame-welcome:before,
  .closing {
    background-size: 640px 640px;
  }
  .closing-inner {
    background: radial-gradient(
      ellipse at center,
      #f1e7d1 42%,
      #f1e7d1ed 58%,
      #f1e7d1bb 72%,
      transparent 95%
    );
  }
}
/* A light wash keeps navigation readable without a hard strip in the fabric. */
.story-header {
  border-bottom-color: transparent;
}
.story-header:before {
  inset: 0 -5vw -36px;
  background: linear-gradient(
    #f0e4cfee,
    #f0e4cfce 42%,
    #f0e4cf38 82%,
    transparent
  );
}
@media (max-width: 700px) {
  .story-header:before {
    inset: 0 -24px -22px;
  }
}
@media (max-width: 360px) {
  .story-header:before {
    left: -20px;
    right: -20px;
  }
}

/* The wallpaper is the palette: cream, cocoa, ochre — no unrelated green UI. */
:root {
  --paper: #f1e7d3;
  --ink: #503c2c;
  --cocoa: #503a29;
  --ochre: #ad8148;
  --muted: #837056;
}
.counter-story {
  --table: #dcc59e;
  --wall: #eadab9;
  --ink: #503c2c;
  --room-wall-filter: brightness(0.79) sepia(0.08) saturate(0.9);
  --room-object-filter: brightness(0.9) sepia(0.12) saturate(0.94);
  --room-copy: #654b34;
  --room-accent: #704b29;
}
.counter-story[data-room="morning"] {
  --table: #f8f0e0;
  --wall: #f1e6cf;
  --room-wall-filter: brightness(1) sepia(0) saturate(1);
  --room-object-filter: brightness(1) sepia(0) saturate(1);
  --room-copy: #7d674c;
  --room-accent: #886236;
}
.stage-wall:after {
  display: none;
}
.welcome-lockup {
  color: var(--cocoa);
}
.welcome-lockup > .eyebrow,
.story-copy > .eyebrow,
.letter-copy > .eyebrow {
  color: #856c4b;
}
.welcome-line,
.story-copy > p:not(.eyebrow) {
  color: var(--room-copy);
  transition: color 0.85s ease;
}
.unfold-link,
.hand-note {
  color: var(--room-accent);
  transition: color 0.85s ease;
}
.story-copy h2,
.letter-copy h2 {
  color: #56402e;
}
.story-copy h2 em,
.letter-copy h2 em {
  color: #a47a43;
}
.letter-copy
  > p:not(.eyebrow):not(.letter-lede):not(.signature):not(.letter-last) {
  color: #7a664d;
}
.letter-last {
  color: #92764e;
}
.signature {
  color: #8d7350;
}
.signature > span {
  color: #715431;
}
.letter-thread,
.ink-line {
  color: #ac9370;
  stroke: #9b805a;
}
.house-sketch {
  color: #aa8c62;
}
.stage-progress {
  color: #8b7552;
}
.progress-rule {
  background: #b9a27e;
}
.progress-rule i {
  background: #8b6335;
}
.plate-4,
.plate-4 > span {
  color: #9b7b52;
}
.family-fallback figcaption {
  color: #94764e;
}
.family-plates {
  display: flex;
  align-items: center;
  gap: 4%;
  padding: 0 3%;
}
.family-plates img {
  width: 30.6%;
  height: auto;
  flex-shrink: 0;
}
.family-plates img:nth-child(2) {
  transform: translateY(28px);
}
.family-fallback figcaption {
  margin-top: 40px;
}

/* Solid, intentional bookends. No translucent washes or faded panels. */
.story-header {
  color: #f4e7ca;
  border-bottom: 1px solid #765535;
}
.story-header:before {
  inset: 0 -5vw;
  background: #503a29;
  opacity: 1;
}
.story-header nav a:hover {
  border-color: #d2ac70;
}
.story-header .light-switch {
  color: #f3e1bb;
  border-left-color: #80613d;
}
.story-header .light-switch-copy .eyebrow {
  color: #d2b583;
}
.story-header .switch-dial {
  background: #715332;
  border-color: #a98550;
  box-shadow: inset 0 0 0 3px #63492d;
}
.story-header .switch-dial svg {
  color: #ead2a0;
}
.closing {
  background: #503a29;
  color: #f4e6c9;
}
.closing:before {
  inset: 0 0 auto;
  height: 58px;
  background: #ecdfc6 url("/assets/floral-wallpaper-2fdb42d2.webp") repeat;
  background-size: 840px 840px;
  opacity: 1;
}
.closing-inner {
  background: none;
  padding-top: 125px;
}
.closing-mark {
  color: #cfb17b;
}
.closing-inner > .eyebrow {
  color: #c9aa77;
}
.closing h2 em {
  color: #d7b077;
}
.closing-inner > p:not(.eyebrow) {
  color: #d5c1a0;
}
.closing .text-link {
  color: #f0dab3;
  border-color: #9f7b4e;
}
.site-footer {
  background: #422e21;
  border-color: #705031;
  color: #f0dec0;
}
.site-footer > span:nth-child(2),
.site-footer > span:last-child {
  color: #c8ac83;
}
@media (max-width: 700px) {
  .story-header:before {
    inset: 0 -24px;
  }
  .closing:before {
    height: 42px;
    background-size: 640px 640px;
  }
  .closing-inner {
    background: none;
    padding-top: 95px;
  }
}
@media (max-width: 360px) {
  .story-header:before {
    left: -20px;
    right: -20px;
  }
}

/* Light is applied to the scene's materials, never to translucent UI panels. */
.story-copy h2 em,
.plate-4,
.plate-4 > span {
  color: var(--room-accent);
  transition: color 0.85s ease;
}
.stage-progress {
  color: var(--room-copy);
  transition: color 0.85s ease;
}

.scene-object {
  filter: var(--room-object-filter);
  transition: filter 0.85s ease;
}
.fallback-art img {
  filter: var(--room-object-filter);
  transition: filter 0.85s ease;
}
.frame-welcome:before {
  filter: var(--room-wall-filter);
  transition: filter 0.85s ease;
}
.story-frame {
  transition: background-color 0.85s ease;
}
.story-header .light-switch {
  min-width: 44px;
  min-height: 44px;
}
.story-header .switch-dial {
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.4s;
}
.counter-story[data-room="evening"] .switch-dial {
  background: #ad8146;
  border-color: #e4bd79;
  box-shadow:
    inset 0 0 0 3px #957040,
    0 0 22px #e4b15e50;
}
.counter-story[data-room="evening"] .switch-dial svg {
  color: #fff0be;
}
.counter-story[data-room="morning"] .switch-dial {
  background: #503a29;
  border-color: #9c7a49;
  box-shadow: inset 0 0 0 3px #63492d;
}
.counter-story[data-room="morning"] .switch-dial svg {
  color: #cbb48b;
}
