@font-face {
  font-family: B;
  src: url(assets/fonts/display.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: S;
  src: url(assets/fonts/serif.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: S;
  src: url(assets/fonts/italic.woff2) format("woff2");
  font-display: swap;
  font-style: italic;
}
:root {
  --pine: #10392e;
  --ink: #142e24;
  --cream: #fff0ce;
  --gold: #f4c766;
  --cran: #a02436;
  --line: #e7c78657;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--pine);
  color: var(--cream);
  font:
    16px/1.45 system-ui,
    sans-serif;
}
h1,
h2,
p,
figure {
  margin: 0;
}
button,
a {
  color: inherit;
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #ffba35;
  outline-offset: 3px;
}
header,
footer,
.dialog-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
header {
  padding: 9px 6%;
  background: #f9edcf;
  color: var(--pine);
  border-bottom: 3px double #b19b6e;
}
header nav {
  display: flex;
  gap: 22px;
  font-size: 13px;
  font-weight: 700;
}
nav a,
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.brand {
  font:
    italic 32px S,
    serif;
  gap: 10px;
  letter-spacing: -0.035em;
}
.brand b {
  display: flex;
  align-items: center;
  justify-content: center;
  font: 19px B;
  border: 2px solid;
  border-radius: 6px;
  padding: 0 4px;
  letter-spacing: -0.04em;
}
.brand b span {
  font-size: 13px;
  align-self: flex-end;
}
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 3vw;
  padding: clamp(38px, 5vw, 80px) 6% 32px;
  background:
    radial-gradient(ellipse at 80% 30%, #38634b, transparent 65%),
    repeating-linear-gradient(90deg, transparent 0 30px, #8197770a 31px 32px),
    #0d352b;
}
.eyebrow,
.schedule > span {
  font: 16px B;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow i {
  width: 28px;
  border-top: 1px solid;
}
.tally {
  width: 8px;
  height: 8px;
  border-radius: 100%;
  background: #ff6760;
  box-shadow: 0 0 10px #f96d5c;
}
.intro h1 {
  font: clamp(67px, 7.65vw, 135px) / 0.81 S;
  letter-spacing: -0.055em;
  margin: 24px 0;
}
.intro h1 em {
  color: var(--gold);
  text-shadow: 2px 3px #80332e;
}
.intro h1 span {
  color: #fd916f;
}
.lead {
  max-width: 33ch;
  color: #f2e3c4;
  font: clamp(19px, 1.55vw, 25px) / 1.24 S;
}
.controls {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.warm,
.ink {
  border: 1px solid #ebcc8b;
  border-radius: 7px;
  min-height: 47px;
  padding: 9px 20px;
  color: var(--ink);
  background: #f5ca76;
  box-shadow: 0 3px 0 #986739;
  font: 19px B;
  letter-spacing: 0.02em;
}
.warm span {
  margin-right: 5px;
}
.quiet,
.credit,
#dial-link,
#rerun {
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  min-height: 44px;
  font-size: 14px;
}
.quiet[aria-pressed="true"] {
  color: var(--gold);
}
.receiver {
  min-width: 0;
}
.cabinet {
  aspect-ratio: 1.5;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 12px 35px #04191180;
}
.cabinet > img {
  width: 100%;
  height: 100%;
  display: block;
}
.glass {
  position: absolute;
  left: 21.8%;
  top: 25.3%;
  width: 45.9%;
  height: 51%;
  overflow: hidden;
  border-radius: 17% / 15%;
  pointer-events: none;
}
.glass > span {
  position: absolute;
  z-index: 2;
  left: 9%;
  top: 12%;
  font: bold clamp(10px, 1.4vw, 24px) monospace;
  color: #e7ffba;
  text-shadow: 1px 2px #17421d;
}
.glass:after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(transparent 0 3px, #05211720 3px 4px);
}
.dial {
  position: absolute;
  background: transparent;
  right: 17%;
  top: 25%;
  width: 10%;
  height: 16%;
  min-width: 32px;
  border: 0;
  border-radius: 100%;
}
.dial:hover {
  box-shadow: 0 0 0 2px var(--gold);
}
figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #e4d7b6;
  font-size: 12px;
  padding: 0 4px;
}
figcaption strong {
  font-weight: 500;
}
.yule:not([hidden]) {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  background: #141c19;
}
.tape-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-image: url(private/mantel-strip.webp?cut=sofa-3);
  background-size: 400% 400%;
}
.tape-deck:not([hidden]) {
  box-sizing: border-box;
  width: min(96%, 540px);
  margin: 10px auto;
  padding: 8px 16px 7px;
  border: 3px ridge #ab8862;
  border-radius: 5px;
  color: #fff0c6;
  background: linear-gradient(105deg, #3e312d, #674139 60%, #46302c);
  box-shadow: 0 4px 0 #201f1b;
}
.tape-label,
.tape-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tape-label label {
  font: italic 22px S;
}
.tape-label output {
  font: 15px monospace;
  letter-spacing: 0.12em;
  background: #181b18;
  color: #ffcf76;
  padding: 3px 6px;
}
.tape-deck input {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  margin: 0;
  cursor: ew-resize;
  outline-offset: 0;
  accent-color: #f6d18e;
  background: repeating-linear-gradient(
      to right,
      #c6a67d 0 1px,
      transparent 1px 6.66%
    )
    center bottom 5px / calc(100% - 20px) 4px no-repeat;
}
.tape-deck input::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 4px;
  background: #201e1a;
  box-shadow: 0 1px #c6a57e;
}
.tape-deck input::-moz-range-track {
  height: 7px;
  border-radius: 4px;
  background: #201e1a;
}
.tape-deck input::-webkit-slider-thumb {
  appearance: none;
  width: 26px;
  height: 28px;
  margin-top: -11px;
  border: 2px outset #dbc397;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #bc996a 0 2px, #f6d8a2 2px 4px);
}
.tape-deck input::-moz-range-thumb {
  width: 24px;
  height: 27px;
  border: 2px outset #dbc397;
  border-radius: 3px;
  background: #d6b384;
}
.tape-legend {
  font: 12px B;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #f3dcb2;
}
.stage[data-channel="mantel"] .flip::after {
  background-image: url("assets/ink-play.svg");
}
.glass.bump {
  animation: tune 0.3s steps(3);
}
@keyframes tune {
  0%,
  70% {
    background: #e5dfb1;
    filter: brightness(2);
  }
  35% {
    background: #0b2923;
  }
}
.schedule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #ead6a7;
  color: var(--ink);
  padding: 8px 6%;
  border-block: 3px double #976a40;
}
.schedule > span {
  color: #9c2436;
}
.schedule a,
.schedule button {
  font: 16px B;
  min-height: 36px;
  align-content: center;
}
.schedule button {
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ad {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 6vw;
  padding: 65px 7%;
  background: #9e2a39;
  color: #fff0cd;
}
.ad-art img {
  display: block;
  width: 100%;
  border: 7px solid #f1dba5;
  box-shadow: 6px 8px #61202a;
  transform: rotate(-2deg);
}
.ad-copy h2 {
  font: clamp(50px, 5.5vw, 91px) / 0.86 S;
  letter-spacing: -0.045em;
}
.ad-copy h2 {
  margin: 18px 0;
}
.ad-copy h2 em {
  color: #f5c96c;
}
.ad-copy > p:not(.eyebrow) {
  max-width: 34ch;
}
.ink {
  margin-top: 18px;
  background: #173c30;
  color: #fff0cd;
  box-shadow: 0 3px #61212a;
}
.ink span {
  margin-left: 6px;
}
.warm small {
  font: 13px system-ui;
  margin-left: 6px;
}
.credit {
  display: block;
  margin: 12px auto 0;
  color: #ecdbb1;
}
footer {
  border-top: 1px solid var(--line);
  padding: 10px 6%;
  font-size: 12px;
}
dialog {
  padding: 0;
  border: 1px solid #c8a361;
  border-radius: 10px;
  width: min(920px, 95vw);
  max-height: 96dvh;
  background: #112e25;
  color: var(--cream);
}
dialog::backdrop {
  background: #071a13e6;
}
.dialog-bar {
  padding: 8px 13px;
  font: 18px B;
}
.close {
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  min-height: 40px;
  border-radius: 5px;
  padding: 5px 13px;
}
video {
  background: #071812;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 70dvh;
  display: block;
}
#rerun {
  margin-left: 10px;
}
.status:not(:empty) {
  padding: 8px 15px;
}
dl > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px dashed #a58f73;
  padding: 10px 0;
}
dd {
  margin: 0;
}
.stamp {
  display: inline-block;
  transform: rotate(-9deg);
  color: #99313b;
  border: 3px double;
  padding: 3px 10px;
  text-transform: uppercase;
  font: 26px B;
}
@media (max-width: 720px) {
  header {
    padding: 3px 16px;
  }
  .brand {
    font-size: 27px;
  }
  header nav {
    gap: 12px;
    font-size: 12px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 24px 5% 4px;
    gap: 18px;
  }
  .intro h1 {
    font-size: clamp(59px, 12.5vw, 86px);
    line-height: 0.88;
    margin: 14px 0;
  }
  .intro h1 br {
    display: none;
  }
  .intro h1 br:after {
    content: " ";
  }
  .intro h1 em:before,
  .intro h1 em:after {
    content: " ";
  }
  .lead {
    font-size: 20px;
    max-width: 35ch;
  }
  .controls {
    margin-top: 14px;
  }
  .eyebrow {
    font-size: 13px;
  }
  .receiver {
    width: 100%;
  }
  .cabinet {
    border-radius: 9px;
  }
  .schedule {
    padding: 7px 5%;
    gap: 4px 13px;
  }
  .schedule > span {
    font-size: 12px;
  }
  .schedule a,
  .schedule button {
    font-size: 14px;
    min-height: 32px;
  }
  .ad {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 7%;
  }
  .ad-copy h2 br {
    display: none;
  }
  .ad-copy h2 em:before,
  .ad-copy h2 em:after {
    content: " ";
  }
  .ad-copy h2 {
    font-size: 56px;
  }
  .filmbar {
    font-size: 12px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  dialog video {
    max-height: calc(96dvh - 100px);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.view-photo {
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  display: block;
  cursor: zoom-in;
}
#whole {
  display: inline-block;
  margin: 0 10px;
}
#whole[hidden] {
  display: none;
}
.glass:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(transparent 40%, #fdf6db36 50%, transparent 53%);
  transform: translateY(-115%);
  animation: sweep 11s linear infinite;
}
@keyframes sweep {
  0%,
  76% {
    transform: translateY(-115%);
  }
  98%,
  100% {
    transform: translateY(115%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .glass:before {
    animation: none;
  }
}
header {
  background: #32181d;
  color: #fff1cf;
  padding-inline: clamp(15px, 5vw, 80px);
  border-bottom: 1px solid #c59f69;
}
header nav {
  align-items: center;
}
header .quiet {
  font-size: inherit;
  color: inherit;
}
.stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  padding: 24px 14px 25px;
  background: radial-gradient(ellipse at center, #80252c 0, #3c1019 78%);
}
.stage:before,
.stage:after {
  position: absolute;
  content: "";
  top: 0;
  bottom: 0;
  width: 19%;
  z-index: -1;
  background: repeating-linear-gradient(
    94deg,
    #340812 0%,
    #9d2733 12%,
    #5c1122 24%,
    #260811 35%
  );
  box-shadow: 0 0 22px #260b13;
  clip-path: polygon(0 0, 100% 0, 85% 28%, 30% 66%, 47% 100%, 0 100%);
}
.stage:before {
  left: 0;
}
.stage:after {
  right: 0;
  transform: scaleX(-1);
}
.mast {
  position: relative;
  z-index: 1;
}
.mast p {
  font: 14px B;
  letter-spacing: 0.24em;
  color: #ffe3a2;
}
.mast h1 {
  font: clamp(64px, 8vw, 130px) / 0.96 S;
  letter-spacing: -0.065em;
  color: #fff0cf;
  text-shadow:
    1px 3px 0 #931c30,
    2px 5px 0 #421420;
}
.mast em {
  color: #ffdf80;
}
.stage .receiver {
  width: min(760px, 86vw);
  margin: 16px auto 4px;
}
.cabinet {
  border: 3px ridge #d4a961;
  border-radius: 44% 44% 8px 8px / 6% 6% 8px 8px;
}
.slide {
  position: absolute;
  inset: 0;
  background: center 40% / cover url(private/family.webp);
  filter: sepia(0.12) saturate(0.88);
}
.glass {
  background: #1c251a;
}
.flip {
  position: absolute;
  left: 22%;
  top: 25%;
  width: 46%;
  height: 51%;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 16%;
}
.flip:after {
  content: "";
  position: absolute;
  bottom: 7%;
  right: 8%;
  border: 1px solid #fffc;
  border-radius: 50%;
  color: white;
  background: #ffe5b5e8 url("assets/ink-out-arrow.svg") center / 15px no-repeat;
  width: 24px;
  height: 24px;
  line-height: 23px;
}
.stage-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.stage-actions a {
  font: italic 21px S;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.stage .warm {
  background: #ffe4a4;
  color: #461522;
  border-color: #ceae6c;
}
.switchboard {
  margin: 18px 0 0;
  max-width: 30rem;
}
#call {
  min-height: 46px;
  padding: 8px 23px;
  border: 3px double #ad763c;
  border-radius: 28px;
  background: #f8d998;
  color: #45212b;
  box-shadow: 1px 3px #5b2027;
  font: 22px B;
}
#call[aria-expanded="true"] {
  color: #fff0ce;
  background: #73232b;
  border-color: #d6a870;
}
.jacks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 12px 0 0;
  padding: 9px clamp(8px, 2vw, 22px) 12px;
  border: 4px ridge #a97c43;
  border-radius: 8px;
  background:
    radial-gradient(
      circle at 7px 7px,
      #6a5034 2px,
      #d0b57f 3px,
      transparent 4px
    ),
    radial-gradient(
      circle at calc(100% - 7px) 7px,
      #6a5034 2px,
      #d0b57f 3px,
      transparent 4px
    ),
    repeating-linear-gradient(95deg, transparent 0 2px, #fff1c608 3px 4px),
    linear-gradient(#263e34, #163329 60%, #17291e);
  box-shadow:
    3px 5px 0 #672329,
    inset 0 1px 7px #111b15;
}
.jacks button {
  position: relative;
  background: none;
  border: 0;
  padding: 15px 1px 0;
  color: #fff0c7;
  font: clamp(16px, 2vw, 22px) / 1.1 B;
}
.jacks button:focus-visible {
  outline: 2px dashed #ffedb4;
  outline-offset: -1px;
}
.jacks button small {
  display: block;
  margin: 7px 0 5px;
  font: 11px/1 monospace;
  letter-spacing: 0.12em;
  color: #f4d7a2;
}
.jacks i {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #151a14 0 28%,
    #34291c 32%,
    #725432 38%,
    #edca84 40%,
    #ad7c46 49%,
    #6e492a 53%,
    #e0bb75 59%,
    #927146 64%,
    #382f23 70%
  );
  box-shadow: 1px 2px 2px #091b13;
}
.jacks i::before {
  content: "";
  position: absolute;
  top: -11px;
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5b5a39;
  box-shadow: 0 0 0 1px #ad9261;
}
.jacks [aria-pressed="true"] i::before {
  background: #ffdb72;
  box-shadow:
    0 0 0 1px #9e843f,
    0 0 8px 2px #ffd86e;
}
.jacks [aria-pressed="true"] i::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 17px;
  height: 19px;
  border: 2px solid #4d241b;
  border-radius: 42%;
  background: repeating-linear-gradient(50deg, #801d21 0 3px, #cf5850 4px 6px);
  box-shadow: 2px 2px 1px #271a15;
}
.jacks [aria-pressed="true"]::before {
  content: "";
  position: absolute;
  top: -18px;
  left: calc(50% + 2px);
  width: 25px;
  height: 53px;
  border-right: 6px solid #b33c32;
  border-bottom: 6px solid #933128;
  border-bottom-right-radius: 80%;
  transform: rotate(-9deg);
  pointer-events: none;
}
#operator:not(:empty) {
  margin: 15px 0 0;
  border-left: 2px solid #eac386;
  padding-left: 12px;
  font: italic clamp(21px, 2.2vw, 28px) / 1.12 S;
}
.dispatch:has(#desk-photo:not([hidden])) {
  display: grid;
  grid-template-columns: clamp(77px, 26%, 134px) minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  margin-top: 18px;
}
.dispatch:has(#desk-photo:not([hidden])) #operator {
  margin: 0;
  padding: 0;
  border: 0;
}
#desk-photo:not([hidden]) {
  display: block;
  width: 100%;
  position: relative;
  margin: 2px 0 6px;
  padding: 4px 4px 10px;
  border: 0;
  background: #f9ead0;
  box-shadow: 2px 3px 4px #5219218c;
  cursor: zoom-in;
}
#desk-photo img {
  display: block;
  width: 100%;
  height: auto;
}
#desk-photo span {
  position: absolute;
  bottom: 6px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  background: #193c32;
  color: white;
  font: 17px system-ui;
}
.dispatch:has(#desk-photo[aria-pressed="true"]:not([hidden])) {
  grid-template-columns: minmax(0, 1fr);
}
#desk-photo[aria-pressed="true"] {
  width: min(88%, 290px);
  margin: 8px auto 18px;
  cursor: zoom-out;
}
#file-tip:not([hidden]) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  color: #fff2c9;
  font: 19px B;
  text-decoration: underline;
  text-underline-offset: 0.19em;
}
.ad .ink {
  font-size: 15px;
  background: none;
  border: 0;
  box-shadow: none;
  text-decoration: underline;
  padding: 0;
}
.ad-art.ringing {
  animation: phone-ring 0.17s ease-in-out alternate 6;
}
@keyframes phone-ring {
  from {
    transform: rotate(-2deg);
  }
  to {
    transform: rotate(2deg);
  }
}
@media (max-width: 720px) {
  .stage {
    padding: 25px 10px 22px;
  }
  .stage .receiver {
    width: 100%;
    margin: 20px auto 7px;
  }
  .stage:before,
  .stage:after {
    width: 12%;
  }
  .mast p {
    font-size: 11px;
  }
  .mast h1 {
    font-size: clamp(54px, 14.8vw, 98px);
  }
  .stage-actions {
    gap: 17px;
  }
  .stage-actions a {
    font-size: 18px;
  }
  .mast {
    padding: 0 9px;
  }
  .cabinet {
    border-radius: 20px 20px 6px 6px;
  }
  .stage figcaption {
    font-size: 11px;
  }
  .stage figcaption button {
    font-size: 12px;
  }
}
.letter-desk {
  padding: clamp(24px, 5vw, 76px) 5%;
  background: repeating-linear-gradient(
    88deg,
    #143c30 0 3px,
    #183e31 4px 8px,
    #16382d 9px 11px
  );
  color: #32392a;
}
.letter {
  max-width: 1120px;
  margin: auto;
  padding: clamp(17px, 3vw, 44px);
  background:
    radial-gradient(ellipse at top left, #fffaf0, transparent 62%), #f5e9cd;
  border: 1px solid #d2c4a8;
  box-shadow:
    4px 5px #dbcfb2,
    7px 8px #213b2c,
    12px 13px 25px #09271980;
}
.letter-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #7c3735;
  text-transform: uppercase;
  font: 15px B;
  letter-spacing: 0.13em;
  border-block: 3px double #a38b69;
  padding: 6px 1px;
}
.spread {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(18px, 4vw, 62px);
  padding: 30px 0;
}
.mount {
  transform: rotate(-2deg);
}
.print {
  position: relative;
  padding: 7px 7px 3px;
  background: #fffdf4;
  box-shadow: 1px 4px 9px #3c271f33;
}
.print .view-photo {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}
.print img {
  display: block;
  width: 100%;
  height: auto;
}
.print figcaption {
  display: block;
  text-align: center;
  color: #4d503d;
  font: italic 21px S;
  padding: 7px 2px;
}
.mount:before,
.enclosed-prints .print:nth-child(2):before {
  content: "";
  position: absolute;
  width: 22%;
  height: 18px;
  left: 39%;
  top: -10px;
  z-index: 1;
  pointer-events: none;
  transform: rotate(-4deg);
  background: #d7ba807d;
  clip-path: polygon(2% 8%, 99% 0, 96% 92%, 0 100%);
}
.letter-note {
  position: relative;
}
.postage {
  float: right;
  width: clamp(60px, 8vw, 108px);
  height: auto;
  transform: rotate(7deg);
  border: 4px dotted #faf1d9;
  margin: 0 2px 4px 10px;
  box-shadow: 0 1px 3px #49301840;
}
.letter-note h2 {
  font: clamp(34px, 4vw, 64px) / 0.95 S;
  letter-spacing: -0.045em;
  color: #214738;
}
.letter-note h2 em {
  color: #993a3b;
}
.letter-note p {
  font: clamp(20px, 1.8vw, 27px) / 1.17 S;
  margin-top: 14px;
}
.letter-note .signature {
  font-style: italic;
  color: #8c3034;
}
.enclosures {
  border-top: 1px solid #ad9a75;
  padding: 16px 0 5px;
}
.enclosures h3 {
  font: italic 30px S;
  text-align: center;
  margin: 0 0 22px;
}
.enclosed-prints {
  display: grid;
  grid-template-columns: 0.8fr 1.25fr 0.8fr;
  align-items: center;
  gap: 4%;
  max-width: 800px;
  margin: auto;
}
.enclosed-prints .print:first-child {
  transform: rotate(-3deg);
}
.enclosed-prints .print:last-child {
  transform: rotate(3deg);
}
#portrait {
  width: min(95vw, 800px);
  max-height: 96dvh;
  background: #fbf1d9;
  color: #2a3b2f;
  border: 1px solid #bda67c;
}
#portrait[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  height: min(92dvh, 880px);
  box-sizing: border-box;
}
#portrait .dialog-bar {
  border-bottom: 1px solid #bdae90;
}
#portrait .close {
  border-color: #bdae90;
}
.album-print {
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  padding: 8px 12px;
  display: grid;
  place-items: center;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}
.album-print:has(#photo-back[hidden]) { overflow: clip; }
.album-print:has(#photo-back[hidden]) > img { grid-area: 1 / 1; }
.album-print img {
  pointer-events: none;
}
#portrait .album-print img {
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#portrait [hidden] {
  display: none !important;
}
.album-tools {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.album-tools button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #a28e6d;
  border-radius: 3px;
  background: #fff9e9;
  color: inherit;
  font: 17px B;
}
.photo-count {
  text-align: center;
  font: 14px B;
  letter-spacing: 0.06em;
  margin: 4px 0 8px;
}
#photo-back {
  box-sizing: border-box;
  max-height: 100%;
  overflow: auto;
  width: min(96%, 475px);
  margin: auto;
  padding: clamp(15px, 4vw, 40px);
  box-shadow: 2px 4px 9px #38271524;
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, #cebea03c 28px 29px),
    #fffaf0;
  transform: rotate(-1deg);
  border: 1px solid #d4c8af;
}
#photo-back small {
  font: 13px B;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #8a3a39;
}
#photo-back p {
  font: italic clamp(21px, 3vw, 35px) / 1.14 S;
  margin: 15px 0;
}
#photo-back span {
  font: italic 19px S;
  color: #823431;
}
@media (max-width: 720px) {
  .letter-desk {
    padding: 22px 3.8% 28px;
  }
  .letter-top {
    font-size: 12px;
  }
  .spread {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px 0;
  }
  .letter-note h2 {
    font-size: 44px;
  }
  .postage {
    width: 78px;
  }
  .enclosed-prints {
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }
  .enclosed-prints .print:nth-child(2) {
    grid-column: 1/-1;
    grid-row: 2;
    justify-self: center;
    width: 78%;
    margin-top: 8px;
  }
  .print figcaption {
    font-size: 17px;
  }
  .enclosed-prints .print {
    padding: 4px;
  }

}
@media (orientation: landscape) and (max-height: 510px) {

  #photo-back {
    padding: 10px 18px;
  }
  #photo-back p {
    margin: 5px 0;
  }
}
.enclosures h3 {
  margin-bottom: 4px;
}
.album-hint {
  font: 16px/1.2 S;
  text-align: center;
  margin: 0 0 20px;
  color: #51523d;
}
.interview img,
.ad-art img {
  height: auto;
}
.album-print {
  background: radial-gradient(ellipse at 52% 32%, #f7efda, #dfd3b6);
  box-shadow: inset 0 1px 5px #58482720;
}
.album-tools {
  margin-top: 6px;
}
#photo-back {
  padding: clamp(14px, 3.3vw, 34px);
  border-right: 3px solid #dfd1b8;
}
#photo-back:before {
  content: "";
  display: block;
  float: right;
  width: clamp(42px, 8vw, 75px);
  aspect-ratio: 1.5;
  margin: 0 0 6px 10px;
  background: center/contain no-repeat url("assets/greenhouse-post.webp");
  transform: rotate(5deg);
  opacity: 0.85;
}
#photo-back[data-postmark="wagon"]::before { background-image: url("assets/connor-christmas-wagon.svg"); }
#photo-back[data-postmark="cable"]::before { background-image: url("assets/charlie-coil.svg"); }
#photo-back p {
  clear: both;
}

.parcel-book {
  margin: 12px auto 24px;
  width: min(100%, 740px);
  border: 1px solid #7e332e;
  border-radius: 3px;
  color: #463627;
  box-shadow: 2px 4px 0 #806b4a40;
}
.parcel-book summary {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 12px 18px;
  min-height: 76px;
  color: #fff0c7;
  background:
    repeating-linear-gradient(105deg, transparent 0 4px, #ffd49b08 5px 6px),
    #892e38;
}
.parcel-book summary::-webkit-details-marker {
  display: none;
}
.parcel-book summary small {
  display: block;
  font: 12px/1.3 B;
  letter-spacing: 0.12em;
  color: #fcd39a;
}
.parcel-book summary strong {
  display: block;
  font: italic clamp(28px, 4vw, 46px) / 1.04 S;
}
.parcel-open {
  font: 18px B;
  border-bottom: 1px solid;
}
.parcel-bow {
  display: block;
  position: relative;
  margin: auto;
  width: 42px;
  height: 39px;
  transform: rotate(-6deg);
  border: 1px solid #f1c084;
  border-radius: 1px;
  background:
    linear-gradient(90deg, transparent 39%, #e6c080 40% 57%, transparent 58%),
    linear-gradient(0deg, transparent 59%, #edcb8b 60% 71%, transparent 72%),
    #a63339;
  box-shadow: 2px 3px 0 #59272d;
}
.parcel-bow::before,
.parcel-bow::after {
  content: "";
  position: absolute;
  bottom: 100%;
  height: 13px;
  width: 17px;
  border: 3px solid #f1c887;
  border-radius: 60% 60% 5% 65%;
  left: 3px;
  transform: rotate(16deg);
  transform-origin: bottom right;
}
.parcel-bow::after {
  left: 17px;
  transform: scaleX(-1) rotate(16deg);
  transform-origin: center;
}
.parcel-book[open] .parcel-bow {
  transform: rotate(4deg);
}
.parcel-pages {
  padding: clamp(9px, 2vw, 16px);
  background: #e7d9b5;
}
.parcel-window {
  min-width: 0;
  overflow-x: auto;
  display: flex;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  border: 1px solid #aa926b;
}
.parcel-window::-webkit-scrollbar {
  display: none;
}
.parcel-window figure {
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(9px, 2vw, 25px);
  padding: clamp(10px, 2.5vw, 26px);
  margin: 0;
  background: linear-gradient(
    90deg,
    #eadfc3 0,
    #f7edce 46%,
    #d6c8aa 50%,
    #fff6df 53%,
    #f9efcf 100%
  );
}
.parcel-window figure img {
  width: 100%;
  height: clamp(170px, 32vw, 350px);
  object-fit: contain;
  filter: drop-shadow(1px 2px 1px #68563b65);
}
.parcel-window figcaption {
  display: block;
  color: #493b2a;
  padding: 0 4px;
  text-align: left;
}
.parcel-window figcaption > * {
  display: block;
}
.parcel-window small {
  font: 13px B;
  letter-spacing: 0.15em;
  color: #873030;
}
.parcel-window strong {
  margin: 9px 0;
  font: italic clamp(28px, 4.6vw, 62px) / 0.94 S;
  color: #27503e;
}
.parcel-window em {
  font: clamp(16px, 2vw, 24px) / 1.14 S;
}
.parcel-controls,
.parcel-controls > div {
  display: flex;
  align-items: center;
  gap: 4px;
}
.parcel-controls {
  justify-content: space-between;
  padding-top: 6px;
}
.parcel-controls button {
  min-height: 44px;
  min-width: 44px;
  background: transparent;
  border: 0;
  font: 20px B;
  color: #274e3d;
}
.parcel-controls button[aria-disabled="true"] {
  opacity: 0.32;
}
.parcel-controls .parcel-play {
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.parcel-play small {
  font-size: 13px;
}
#parcel-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#parcel-number {
  font: 15px B;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .parcel-book summary {
    grid-template-columns: 34px 1fr auto;
    padding: 13px 10px;
    gap: 9px;
  }
  .parcel-bow {
    zoom: 0.73;
  }
  .parcel-book summary strong {
    font-size: 27px;
  }
  .parcel-controls button {
    font-size: 16px;
  }
  .parcel-open {
    font-size: 16px;
  }
  .parcel-window figure {
    grid-template-columns: 1.1fr 1fr;
  }
}

.lampworks {
  color: #f8ebc3;
  background: #182e30;
  padding: clamp(19px, 4vw, 62px) max(12px, 5vw);
  border-block: 4px double #ad9166;
}
.light-organ {
  max-width: 900px;
  margin: auto;
  border-radius: 12px;
  border: 4px ridge #bd9768;
  overflow: hidden;
  box-shadow:
    0 6px 0 #0f2224,
    0 10px 22px #071c1e;
  background: #553830;
}
.lamp-scene {
  --scene-height: clamp(150px, 23vw, 286px);
  height: var(--scene-height);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.lamp-art {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max(100%, calc(3 * var(--scene-height)));
  aspect-ratio: 3;
}
.lamp-art .window-glow {
  position: absolute;
  width: 9%;
  aspect-ratio: 1.32;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(
    ellipse,
    #ffffb5 0 5%,
    #ffb53fba 17%,
    #f78c2d45 37%,
    transparent 68%
  );
  transition: opacity 0.2s ease-out;
}
.window-glow[data-lit],
#lights[data-scene="bill"] .window-glow {
  opacity: 0.9;
}
#lights[data-scene="paid"] .window-glow {
  opacity: 0;
}
.lamp-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.76);
  transition: filter 0.8s;
}
.lamp-titleplate {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%) rotate(-3deg);
  background: #f7dfac;
  color: #8c2928;
  padding: 4px 20px 10px;
  text-align: center;
  border: 4px double #9c4939;
  box-shadow: 2px 3px #392825;
  white-space: nowrap;
}
.lamp-titleplate small,
.current-bill small {
  display: block;
  font: 13px B;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.lamp-titleplate h2 {
  font: 600 clamp(40px, 7vw, 86px) / 0.92 S;
  margin: 1px 0 0;
  letter-spacing: -0.045em;
  word-spacing: 0.06em;
}
.lamp-titleplate em {
  font-weight: 400;
}
.lamp-meter {
  position: absolute;
  right: 8px;
  bottom: 7px;
  background: #272e29;
  border: 2px ridge #bb9f65;
  color: #e9d59e;
  font: 13px B;
  padding: 4px 7px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.lamp-meter output {
  color: white;
  background: #141417;
  font: bold 14px monospace;
  letter-spacing: 0.13em;
}
.lamp-meter > span {
  width: 7px;
  height: 7px;
  background: #d5ba5e;
  border-radius: 50%;
}
.lamp-console {
  padding: 0 clamp(9px, 2vw, 24px) 8px;
  background:
    repeating-linear-gradient(0deg, #6a373611 0 1px, transparent 1px 4px),
    linear-gradient(#693331, #482b28);
  border-top: 5px ridge #c1a270;
}
.lamp-keys {
  display: flex;
  max-width: 540px;
  margin: 0 auto;
}
.lamp-keys button {
  position: relative;
  isolation: isolate;
  flex: 1;
  min-width: 0;
  height: 84px;
  padding: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  touch-action: manipulation;
  border: none;
  background: transparent;
  color: #e9cca1;
  font: 15px B;
}
.lamp-keys button::before {
  content: "";
  height: 15px;
  width: 14px;
  border-radius: 0 0 3px 3px;
  background: repeating-linear-gradient(155deg, #6d6550 0 2px, #c7b17a 3px 4px);
  border-inline: 1px solid #393930;
}
.lamp-keys i {
  position: relative;
  display: block;
  width: 24px;
  height: 37px;
  margin-top: -1px;
  border-radius: 21% 21% 51% 51% / 22% 22% 76% 76%;
  background:
    radial-gradient(ellipse at 32% 27%, #fff9d9 0%, transparent 22%),
    var(--lamp);
  box-shadow:
    inset -5px -3px 6px #311c2b70,
    0 3px 3px #271b19;
  transform-origin: center top;
}
.lamp-keys b {
  margin-top: 4px;
  font-weight: 500;
  line-height: 19px;
  min-width: 26px;
}
.lamp-keys button[data-cue] b {
  background: #ffedbe;
  border-radius: 8px;
  color: #562522;
}
.lamp-keys button[data-cue] b::before {
  content: "▸ ";
}
.lamp-keys button[data-struck] i {
  box-shadow:
    0 0 20px var(--lamp),
    inset 0 0 10px #fff3b4;
  filter: brightness(1.4);
}
.lamp-keys button:focus-visible,
.lamp-reader button:focus-visible,
.current-bill button:focus-visible {
  outline: 3px solid #f6d071;
  outline-offset: -3px;
}
.lamp-reader,
.current-bill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.lamp-reader {
  border-top: 1px solid #aa8160;
  padding: 5px 0 0;
}
.lamp-reader span {
  font: italic clamp(17px, 2.1vw, 24px) / 1.1 S;
}
.lamp-reader button,
.current-bill button {
  font: 17px B;
  color: #49291d;
  background: #f3d796;
  border: 2px outset #d8b884;
  border-radius: 4px;
  min-height: 42px;
  padding: 3px 11px;
  flex: none;
}
.current-bill {
  position: relative;
  background: #f4e8c9;
  color: #48251b;
  margin: 8px 0 3px;
  padding: 12px;
  border-bottom: 3px dashed #80614d;
}
.current-bill[hidden] {
  display: none;
}
.current-bill strong {
  display: block;
  font: italic clamp(23px, 3.6vw, 37px) / 1.12 S;
  color: #8a282a;
}
.current-bill span {
  font: 15px B;
}
.current-bill small {
  font-size: 11px;
}
#lights[data-scene="bill"] .lamp-scene img {
  filter: saturate(1.17) brightness(1.1);
}
#lights[data-scene="paid"] .lamp-scene img {
  filter: saturate(0.46) brightness(0.35) hue-rotate(8deg);
}
#lights[data-scene="paid"] .lamp-keys i {
  position: relative;
  filter: saturate(0.4) brightness(0.67);
}
#lights[data-scene="paid"] .lamp-titleplate {
  background: #eadbb9;
  color: #3a4e50;
}
@media (prefers-reduced-motion: no-preference) {
  .lamp-keys button[data-struck] i {
    animation: bell-rock 0.31s ease-out;
  }
  .current-bill:not([hidden]) {
    animation: bill-feed 0.35s ease-out;
  }
  @keyframes bell-rock {
    25% {
      transform: rotate(9deg);
    }
    70% {
      transform: rotate(-5deg);
    }
  }
  @keyframes bill-feed {
    from {
      clip-path: inset(0 0 98%);
    }
    to {
      clip-path: inset(0);
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .lamp-scene img {
    transition: none;
  }
}
.lamp-scene::after {
  content: "";
  width: 18px;
  height: 21px;
  border-radius: 50%;
  box-shadow: -4px 2px 0 #fff4cf;
  transform: rotate(-16deg);
  position: absolute;
  right: 11%;
  top: 8%;
  color: #fff5cf;
  text-shadow: 0 0 10px #fff1a3;
  font: 38px/1 S;
  opacity: 0;
}
#lights[data-scene="paid"] .lamp-scene::after {
  opacity: 1;
}

.lamp-keys i::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 14px;
  left: 9px;
  top: 7px;
  border: 1px solid #fff3ae99;
  border-top: 0;
  border-radius: 0 0 50% 50%;
}
.lamp-keys button[data-struck] i::after {
  border-color: #fffbd4;
  box-shadow: 0 2px 4px #ffdb7b;
}
@media (prefers-reduced-motion: reduce) {
  .lamp-art .window-glow {
    transition: none;
  }
}

#electric-edition {
  color: #7b272a;
  text-transform: uppercase;
  text-underline-offset: 3px;
  padding-block: 4px;
}

#charlie-note:not([hidden]), #choose-print {
  background: transparent; color: inherit; border: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
  min-height: 44px; padding: 3px 7px; font: 600 13px/1.2 system-ui;
}
#charlie-note { grid-column: 1/-1; justify-self: start; }
#portrait .close { min-height: 44px; flex-shrink: 0; white-space: nowrap; }
.print-footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 12px; }
.print-footer .photo-count { margin: 0; }
#portrait[open].choosing-print { display: flex; flex-direction: column; overflow: hidden; }
#portrait.choosing-print .dialog-bar, #portrait.choosing-print .print-footer { flex: none; }
#portrait.choosing-print .print-index { flex: 1; min-height: 0; }
.print-index {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(min(112px,100%),1fr)); align-content: start;
  gap: 16px 10px; padding: 16px; background: #e9dcc1; overflow: auto; overscroll-behavior: contain;
}
.print-index button {
  min-width: 0; padding: 5px; border: 1px solid #cab994; background: #fff8e9;
  box-shadow: 1px 2px 4px #42271826; color: #48302c; cursor: pointer;
  font: italic 15px/1.2 Georgia, serif; text-align: left;
}
.print-index button[aria-current] { border: 2px solid #873f40; padding: 4px; }
.print-index img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center 35%; margin-bottom: 5px; }

/* A turned phone has room beside the print for its caption and controls. */
@media screen and (min-width: 311px) and (max-height: 510px) and (orientation: landscape) {
  #portrait[open]:has(.print-index[hidden]) {
    grid-template-columns: minmax(0, 1fr) clamp(152px, 25vw, 210px);
    grid-template-rows: minmax(0, 1fr) auto auto;
    grid-template-areas: "print caption" "print tools" "print footer";
  }
  #portrait:has(.print-index[hidden]) .dialog-bar {
    grid-area: caption; flex-direction: column-reverse; justify-content: space-between;
    align-items: start; padding: 8px 12px; border: 0;
  }
  #portrait:has(.print-index[hidden]) .close { align-self: end; }
  #portrait:has(.print-index[hidden]) #photo-title {
    font: italic 24px/1.05 S, Georgia, serif; overflow-wrap: anywhere;
  }
  #portrait .album-print { grid-area: print; padding: 6px; }
  #portrait:has(.print-index[hidden]) .album-tools {
    grid-area: tools; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "back back" "prev next"; gap: 5px; margin: 5px 10px;
  }
  #photo-flip { grid-area: back; }
  #photo-prev { grid-area: prev; }
  #photo-next { grid-area: next; }
  #portrait:has(.print-index[hidden]) .print-footer { grid-area: footer; gap: 0; padding: 4px; }
}

/* On the note side the same photograph sits beside its handwritten message. */
@media screen {
  #portrait .album-print:has(#photo-back:not([hidden])) {
    grid-template: minmax(60px, 1fr) auto / minmax(0, 1fr);
    gap: 12px;
    padding: clamp(10px, 2vw, 24px);
    overflow: auto;
  }
  #portrait .album-print:has(#photo-back:not([hidden])) > img {
    box-sizing: border-box;
    height: auto;
    width: auto;
    max-width: 92%;
    border: 5px solid #fff9e9;
    box-shadow: 1px 3px 7px #48301f40;
    transform: rotate(1.5deg);
  }
  #portrait #photo-back {
    user-select: text;
    margin: 0;
    width: min(100%, 475px);
  }
}
@media screen and (min-width: 730px), screen and (orientation: landscape) and (min-width: 545px) {
  #portrait .album-print:has(#photo-back:not([hidden])) {
    grid-template: minmax(0, 1fr) / minmax(0, 4fr) minmax(0, 5fr);
    padding-inline: clamp(10px, 2vw, 32px);
  }
}
@media screen and (orientation: landscape) and (max-height: 510px) {
  #portrait #photo-back { padding: 10px 12px; }
  #portrait #photo-back p { font-size: 20px; }
}

@media screen and (min-width: 545px) and (max-width: 725px) and (orientation: landscape) and (max-height: 390px) {
  #portrait .album-print:has(#photo-back:not([hidden])) {
    grid-template-columns: clamp(64px, 14vw, 100px) minmax(0, 1fr); gap: 6px;
    padding-inline: 6px;
  }
  #portrait #photo-back { transform: none; }
  #portrait #photo-back .note-actions button { margin-top: 0; }
}
.note-actions { display: flex; flex-wrap: wrap; gap: 0 16px; }
#note-link-status { display: block; font: 13px/1.4 system-ui; }
/* On a short phone the portrait becomes a real photograph tucked inside
   the letter. The message and signature share a single scrolling surface. */
@media screen and (max-width: 480px) and (max-height: 720px) and (orientation: portrait) {
  #portrait .album-print:has(#photo-back:not([hidden])) {
    display: block; padding: 12px 10px; overflow-y: auto; overscroll-behavior: contain;
  }
  #portrait .album-print:has(#photo-back:not([hidden])) > img {
    float: right; position: relative; z-index: 1;
    width: clamp(62px, 26%, 106px); height: auto; max-height: 126px;
    margin: 10px 9px 4px 9px; border-width: 3px;
    transform: rotate(3deg);
  }
  #portrait #photo-back {
    width: 100%; min-height: 100%; max-height: none; overflow: visible;
    transform: none; padding: 17px 12px 9px;
  }
  #portrait #photo-back::before { display: none; }
  #portrait #photo-back p { clear: none; font-size: clamp(20px, 5.8vw, 24px); line-height: 1.16; }
  #portrait #photo-back .note-actions { clear: both; }
}
#photo-flip .compact-flip { display: none; }
/* Safari Page Zoom can give an SE less than 220 CSS pixels of room.
   Keep the paper legible and let the toolbar fit in one line. */
@media screen and (max-width: 310px) {
  #portrait[open] {
    width: calc(100% - 6px); max-width: none; height: calc(100dvh - 8px);
    max-height: none; grid-template-columns: minmax(0, 1fr);
  }
  #portrait .dialog-bar { padding: 2px 5px 2px 9px; gap: 5px; }
  #portrait #photo-title { min-width: 0; font: 17px/1.05 B, system-ui; overflow-wrap: anywhere; }
  #portrait .close { min-width: 40px; min-height: 40px; padding: 0 5px; font-size: 20px; }
  #portrait .close span, #photo-flip span:first-child, #photo-flip .ink-turn,
  #portrait .collection-label { display: none; }
  #photo-flip .compact-flip { display: inline; }
  #portrait .album-tools { display: grid; grid-template-columns: 1fr 1.4fr 1fr; margin: 0; padding: 3px 5px; gap: 4px; }
  #portrait .album-tools button { min-width: 0; min-height: 40px; padding: 0 3px; }
  #portrait .print-footer { gap: 6px; flex-wrap: nowrap; padding: 0 3px; }
  #portrait .photo-count { font-size: 13px; }
  #portrait #choose-print { min-height: 36px; font-size: 12px; }
  #portrait .album-print:has(#photo-back:not([hidden])) { padding: 5px; }
  #portrait .album-print:has(#photo-back:not([hidden])) > img { width: 30%; margin: 6px 5px 2px; }
  #portrait #photo-back { padding: 10px 7px; }
  #portrait #photo-back p { font-size: 18px; }
}
/* Magnified landscape Safari has about 200 CSS pixels of height. */
@media screen and (min-width: 311px) and (max-width: 544px) and (max-height: 330px) and (orientation: landscape) {
  #portrait[open]:has(.print-index[hidden]) {
    width: calc(100% - 6px); height: calc(100dvh - 6px); max-height: none;
    grid-template-columns: minmax(0,1fr) 143px;
  }
  #portrait:has(.print-index[hidden]) .dialog-bar { padding: 2px 6px; gap: 3px; justify-content: start; }
  #portrait:has(.print-index[hidden]) #photo-title { font-size: 16px; line-height: 1; }
  #portrait:has(.print-index[hidden]) .album-tools {
    grid-template: "prev back next" auto / 1fr 1fr 1fr; margin: 0 3px; gap: 2px;
  }
  #portrait .album-tools button { min-width: 0; padding-inline: 1px; }
  #portrait .close span, #photo-flip span:first-child, #photo-flip .ink-turn, #portrait .collection-label { display: none; }
  #photo-flip .compact-flip { display: inline; }
  #portrait:has(.print-index[hidden]) .print-footer { padding: 0 3px; gap: 3px; }
  #portrait .photo-count { font-size: 11px; }
  #portrait #choose-print { padding-inline: 1px; font-size: 12px; }
  #portrait .album-print:has(#photo-back:not([hidden])) { display: block; overflow-y: auto; padding: 6px; }
  #portrait .album-print:has(#photo-back:not([hidden])) > img { float: right; width: 31%; height: auto; margin: 7px; }
  #portrait #photo-back { min-height: 100%; max-height: none; box-sizing: border-box; width: 100%; overflow: visible; transform: none; }
  #portrait #photo-back p { font-size: 17px; }
}
#photo-back .note-actions button {
  display: block; min-height: 44px; margin-top: 10px; padding: 0;
  background: transparent; border: none; color: #634238; cursor: pointer;
  font: 600 13px/1.3 system-ui; text-decoration: underline; text-underline-offset: 3px;
}
#print-keepsake:disabled { opacity: .5; }
@media print {
  body.printing-keepsake { background: white; color: #302b27; overflow: visible; margin: 0; }
  body.printing-keepsake > :not(#portrait) { display: none !important; }
  .printing-keepsake #portrait[open] {
    position: static; display: block; margin: 0 auto; padding: 5mm;
    width: min(100%, 148mm); height: auto; max-height: none;
    overflow: visible; background: white; color: #302b27;
    border: 1px solid #a39075; box-shadow: none; break-inside: avoid;
  }
  .printing-keepsake #portrait::backdrop { background: transparent; }
  .printing-keepsake #portrait :is(.close,.print-footer,.album-tools,.note-actions,#note-link-status,.print-index) { display: none; }
  .printing-keepsake #portrait .dialog-bar {
    position: static; display: block; color: #583039; padding: 0 0 3mm;
    background: white; font: italic 15pt Georgia,serif;
  }
  .printing-keepsake #portrait .album-print { display: block; background: white; box-shadow: none; padding: 4mm 0 0; }
  .printing-keepsake #portrait .album-print img {
    display: block; width: auto; height: auto; max-width: 100%; max-height: 50vh; margin: 0 auto;
  }
  .printing-keepsake #portrait #photo-back {
    display: block; transform: none; margin: 4mm 0 0; padding: 3mm 0 0;
    width: 100%; border: 0; border-top: 1px solid #a39075; box-shadow: none; background: white;
  }
  .printing-keepsake #photo-back::before { display: none; }
  .printing-keepsake #photo-back p { margin: 2mm 0; font: italic 13pt/1.25 Georgia,serif; }
  .printing-keepsake #photo-back span { font: italic 11pt Georgia,serif; }
}

/* Dark album cloth around the picture, warm paper only when the print turns over. */
@media screen {
  html:has(#portrait[open]) { overflow: hidden; }
  #portrait {
    --album-cloth: #1a2424; --album-cream: #fff0d9;
    color: var(--album-cream); background: var(--album-cloth);
    border: 1px solid #8b806d; border-radius: 15px;
    box-shadow: 0 24px 80px #0a100ec7; overscroll-behavior: contain;
  }
  #portrait::backdrop { background: #0c1313df; }
  #portrait .dialog-bar { background: var(--album-cloth); border: 0; gap: 10px; }
  #photo-title { font: italic clamp(21px, 2.4vw, 32px)/1.1 S, Georgia, serif; }
  #portrait .close, #portrait .album-tools button {
    color: var(--album-cream); background: transparent; border: 1px solid #817b6d; border-radius: 22px;
  }
  #portrait .close { min-width: 44px; padding-inline: 12px; font: 16px system-ui; }
  #portrait .album-print { background: #121b1c; box-shadow: inset 0 0 55px #0409093b; }
  #portrait .album-print:has(#photo-back[hidden]) { touch-action: pinch-zoom; }
  #portrait #photo-back { color: #332b26; }
  #portrait .album-tools { gap: 8px; }
  #portrait .album-tools button { padding-inline: 12px; font: 15px/1.1 system-ui; }
  #portrait #photo-flip { background: #ffebca; border-color: #ffebca; color: #272923; }
  #portrait .photo-count { color: #e0d6c4; font: 13px/1.25 system-ui; letter-spacing: .01em; }
  #portrait button:focus-visible { outline: 2px solid #ffcb7a; outline-offset: 2px; }
}
@media screen and (min-height: 511px) and (min-width: 730px) {
  #portrait[open] { width: min(1120px, 94vw); height: min(92dvh, 980px); }
  #portrait[open]:has(.print-index[hidden]) {
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    grid-template-rows: auto minmax(0,1fr) auto;
  }
  #portrait .dialog-bar { grid-column: 1/-1; padding: 11px 18px; }
  #portrait .album-print { grid-column: 1/-1; padding: 12px; }
  #portrait:has(.print-index[hidden]) .print-footer { display: contents; }
  #portrait:has(.print-index[hidden]) .photo-count { grid-area: 3/1; justify-self: start; margin-left: 18px; align-self: center; }
  #portrait:has(.print-index[hidden]) #choose-print { grid-area: 3/3; justify-self: end; margin-right: 16px; align-self: center; }
  #portrait .album-tools { grid-area: 3/2; margin: 10px 0; }
}
@media screen and (min-width: 311px) and (max-width: 729px) and (orientation: portrait),
       screen and (min-width: 311px) and (orientation: landscape) and (max-height: 510px) {
  #portrait[open] {
    width: 100%; max-width: none; height: 100dvh; max-height: none; margin: auto;
    border: 0; border-radius: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
}
@media screen and (min-width: 311px) and (max-width: 729px) and (orientation: portrait) {
  #portrait .album-print:has(#photo-back[hidden]) { padding: 2px 0; }
  #portrait .dialog-bar { padding: 8px 12px; }
  #portrait .album-tools { margin: 10px 0 0; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  body:not(:has(#quiet[aria-pressed="true"])) #portrait[open] { animation: print-arrive .22s ease-out; }
  @keyframes print-arrive { from { opacity: .3; transform: translateY(8px); } }
}
@media screen and (min-width: 311px) and (max-width: 729px) and (min-height: 721px) and (orientation: portrait) {
  #portrait .album-print:has(#photo-back:not([hidden])) {
    grid-template-rows: minmax(100px, 31dvh) auto; align-content: safe center; gap: 0;
  }
  #portrait .album-print:has(#photo-back:not([hidden])) > img {
    z-index: 1; align-self: end; margin-bottom: -5px;
  }
  #portrait #photo-back { padding-top: 24px; }
}
