@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-regular-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-variable-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --desk: #f3ede1;
  --ink: #1f2430;
  --muted: #535a68;
  --line: rgba(31, 36, 48, 0.13);
  --accent-text: #6b2d5c;
  --plum: #6b2d5c;
  --plum-hi: #84406f;
  --plum-lo: #4c1f41;
  --btn-bg: #6b2d5c;
  --btn-ink: #fbf7ee;
  --btn-edge: #4c1f41;
  --ghost-bg: rgba(255, 255, 255, 0.55);
  --paper: #fbf7ee;
  --paper-2: #f3ecdc;
  --paper-edge: #d9cfbb;
  --wall: #efe7d7;
  --wall-2: #e9dfcb;
  --desk-top: #e2d5bd;
  --desk-front: #d6c6a8;
  --desk-hi: rgba(255, 255, 255, 0.55);
  --lamp: rgba(255, 246, 225, 0.75);
  --lamp-show: none;
  --green-hi: #4a6e5d;
  --green-mid: #2f4a3e;
  --green-lo: #223a30;
  --green-side: #1b2d25;
  --brass-hi: #e2bf74;
  --brass: #b8893a;
  --brass-lo: #876226;
  --post-hi: #3d4d45;
  --post-lo: #1f2a25;
  --mouth: #0c1511;
  --phone: #1b1f29;
  --phone-edge: #343a47;
  --screen: #fdfbf6;
  --screen-ink: #1f2430;
  --screen-muted: #6a7080;
  --screen-line: #ebe4d6;
  --screen-field: #f4efe4;
  --object-shadow: rgba(66, 48, 18, 0.22);
  --env-glow: rgba(0, 0, 0, 0);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --system: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --desk: #121520;
    --ink: #ece6d8;
    --muted: #b6b0a3;
    --line: rgba(236, 230, 216, 0.12);
    --accent-text: #d79ac4;
    --btn-bg: #d79ac4;
    --btn-ink: #1a0f18;
    --btn-edge: #a8679a;
    --ghost-bg: rgba(255, 255, 255, 0.04);
    --paper-2: #f1e9d6;
    --wall: #171b28;
    --wall-2: #131623;
    --desk-top: #2a2620;
    --desk-front: #1f1c18;
    --desk-hi: rgba(255, 214, 160, 0.16);
    --lamp: rgba(255, 196, 120, 0.3);
    --lamp-show: block;
    --green-hi: #6c9883;
    --green-mid: #2d4a3d;
    --green-lo: #13211a;
    --green-side: #0f1a15;
    --brass-hi: #f0cd84;
    --brass: #b8893a;
    --brass-lo: #6f501f;
    --post-hi: #34413a;
    --post-lo: #141b18;
    --phone: #0b0d13;
    --phone-edge: #2c3240;
    --screen: #1b1f2a;
    --screen-ink: #ece6d8;
    --screen-muted: #9da3b2;
    --screen-line: #2a2f3c;
    --screen-field: #242936;
    --object-shadow: rgba(0, 0, 0, 0.55);
    --env-glow: rgba(255, 226, 170, 0.32);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --desk: #121520;
  --ink: #ece6d8;
  --muted: #b6b0a3;
  --line: rgba(236, 230, 216, 0.12);
  --accent-text: #d79ac4;
  --btn-bg: #d79ac4;
  --btn-ink: #1a0f18;
  --btn-edge: #a8679a;
  --ghost-bg: rgba(255, 255, 255, 0.04);
  --paper-2: #f1e9d6;
  --wall: #171b28;
  --wall-2: #131623;
  --desk-top: #2a2620;
  --desk-front: #1f1c18;
  --desk-hi: rgba(255, 214, 160, 0.16);
  --lamp: rgba(255, 196, 120, 0.3);
  --lamp-show: block;
  --green-hi: #6c9883;
  --green-mid: #2d4a3d;
  --green-lo: #13211a;
  --green-side: #0f1a15;
  --brass-hi: #f0cd84;
  --brass: #b8893a;
  --brass-lo: #6f501f;
  --post-hi: #34413a;
  --post-lo: #141b18;
  --phone: #0b0d13;
  --phone-edge: #2c3240;
  --screen: #1b1f2a;
  --screen-ink: #ece6d8;
  --screen-muted: #9da3b2;
  --screen-line: #2a2f3c;
  --screen-field: #242936;
  --object-shadow: rgba(0, 0, 0, 0.55);
  --env-glow: rgba(255, 226, 170, 0.32);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ---------- envelope (the symbol, and every flying copy) ---------- */

.env-paper {
  fill: var(--paper);
  stroke: var(--paper-edge);
  stroke-width: calc(2 * var(--env-line, 1));
}

.env-fold {
  fill: none;
  stroke: var(--paper-edge);
  stroke-width: calc(1.6 * var(--env-line, 1));
  stroke-linecap: round;
}

.env-flap {
  fill: var(--paper-2);
  stroke: var(--paper-edge);
  stroke-width: calc(1.8 * var(--env-line, 1));
  stroke-linejoin: round;
}

.seal-wax {
  fill: var(--plum);
}

.seal-ring {
  fill: none;
  stroke: rgba(255, 235, 248, 0.28);
  stroke-width: 1.3;
}

.seal-f {
  fill: rgba(255, 238, 250, 0.9);
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
}

/* ---------- top bar ---------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 14px 6px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0.005em;
}

.wordmark-env {
  width: 30px;
  height: 20px;
  overflow: visible;
  filter: drop-shadow(0 1px 1.5px var(--object-shadow));
}

.wordmark-tld {
  color: var(--accent-text);
  font-style: italic;
}

.theme {
  display: inline-flex;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ghost-bg);
  min-inline-size: 0;
}

.theme label {
  position: relative;
  display: block;
  cursor: pointer;
}

.theme label span {
  display: block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.theme input:checked + span {
  background: var(--ink);
  color: var(--desk);
}

.theme input:focus-visible + span {
  outline: 3px solid var(--accent-text);
  outline-offset: 2px;
}

.motion .theme label span {
  transition: background-color 0.2s, color 0.2s;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  gap: 16px;
  padding-block: 14px 8px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.85rem, 12.6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
}

h1 .accent {
  display: inline-block;
  color: var(--accent-text);
  font-style: italic;
  padding-right: 0.06em;
}

.lede {
  margin-top: 10px;
  max-width: 34em;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.btn--cta {
  margin-top: 14px;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 10px 46px 11px 18px;
  position: relative;
  border-radius: 14px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: 0 1px 0 var(--btn-edge), 0 8px 22px -12px var(--plum);
  line-height: 1.25;
}

.btn--cta::after {
  content: "→" / "";
  position: absolute;
  right: 18px;
  top: 50%;
  translate: 0 -50%;
  font-size: 1.15rem;
}

.btn-ask {
  font-size: 0.8rem;
  opacity: 0.86;
}

.btn-mail {
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: 0.005em;
}

.motion .btn--cta {
  transition: transform 0.18s, box-shadow 0.18s;
}

.motion .btn--cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 0 var(--btn-edge), 0 12px 26px -12px var(--plum);
}

.motion .btn--cta::after {
  transition: translate 0.18s;
}

.motion .btn--cta:hover::after {
  translate: 3px -50%;
}

/* ---------- the scene ---------- */

.hero-stage {
  min-width: 0;
}

.scene {
  position: relative;
  aspect-ratio: 4 / 3;
  container-type: inline-size;
  overflow: hidden;
  border-radius: 22px;
  background: var(--wall);
  box-shadow: inset 0 0 0 1px var(--line);
  isolation: isolate;
  user-select: none;
}

.scene-wall {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 20% 0%, transparent 40%, var(--wall-2) 100%),
    repeating-linear-gradient(90deg, transparent 0 5.2cqw, rgba(0, 0, 0, 0.018) 5.2cqw 5.4cqw);
}

.scene-lamp {
  position: absolute;
  inset: 0;
  background: radial-gradient(70cqw 60cqw at 14% -6%, var(--lamp), transparent 70%);
  pointer-events: none;
}

:root[data-theme="dark"] .scene-lamp {
  background:
    radial-gradient(16cqw 8cqw at 50% 16%, rgba(255, 214, 150, 0.3), transparent 70%),
    radial-gradient(62cqw 70cqw at 50% 14%, rgba(255, 196, 120, 0.25), rgba(255, 196, 120, 0.08) 58%, transparent 82%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .scene-lamp {
    background:
      radial-gradient(16cqw 8cqw at 50% 16%, rgba(255, 214, 150, 0.3), transparent 70%),
      radial-gradient(62cqw 70cqw at 50% 14%, rgba(255, 196, 120, 0.25), rgba(255, 196, 120, 0.08) 58%, transparent 82%);
  }
}

.scene-desk {
  position: absolute;
  inset: auto 0 0;
  height: 13cqw;
  background: linear-gradient(var(--desk-top), var(--desk-top) 58%, var(--desk-front) 58.5%);
  box-shadow: inset 0 1px 0 var(--desk-hi);
}

.scene-desk::before {
  content: "";
  position: absolute;
  inset: 0 0 42%;
  background: radial-gradient(60% 120% at 18% 0%, var(--lamp), transparent 70%);
  opacity: 0.7;
}

/* the night lamp: only in dark mode, a small brass pendant over the desk */

.lamp {
  display: var(--lamp-show);
  position: absolute;
  left: 50%;
  top: 0;
  width: 14cqw;
  height: 13cqw;
  translate: -50% 0;
  pointer-events: none;
  z-index: 1;
}

.lamp-arm {
  position: absolute;
  left: 50%;
  top: 0;
  width: 0.45cqw;
  height: 5.4cqw;
  translate: -50% 0;
  background: #0b0c10;
}

.lamp-shade {
  position: absolute;
  left: 1.5cqw;
  right: 1.5cqw;
  top: 5cqw;
  height: 5.2cqw;
  clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%);
  background: linear-gradient(90deg, #4d3a1a, #c99b4e 34%, #8a672e 64%, #33260f);
}

.lamp-bulb {
  position: absolute;
  left: 3.2cqw;
  right: 3.2cqw;
  top: 9.1cqw;
  height: 2.4cqw;
  border-radius: 50%;
  background: radial-gradient(closest-side, #fff6e2, rgba(255, 218, 160, 0.8) 50%, rgba(255, 196, 120, 0));
}

/* phone */

.phone {
  position: absolute;
  left: 9.5cqw;
  bottom: 6cqw;
  width: 29.5cqw;
  height: 61cqw;
  padding: 1.1cqw;
  border-radius: 4.8cqw;
  background: var(--phone);
  box-shadow:
    inset 0 0 0 0.35cqw var(--phone-edge),
    1.6cqw 2.2cqw 3.2cqw -1cqw var(--object-shadow);
  transform-origin: 50% 90%;
  z-index: 2;
}

.phone::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1.9cqw;
  width: 26cqw;
  height: 2.2cqw;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--object-shadow), transparent);
  z-index: -1;
}

.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 3.8cqw;
  background: var(--screen);
  color: var(--screen-ink);
  font-family: var(--system);
  line-height: 1.25;
}

.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1cqw;
  height: 5.6cqw;
  padding: 1.5cqw 2.6cqw 0;
  font-size: 1.75cqw;
  font-weight: 600;
}

.status-off {
  display: none;
  align-items: center;
  gap: 0.6cqw;
  padding: 0.3cqw 1cqw;
  border-radius: 99px;
  background: #e7a43a;
  color: #2a1c05;
  font-size: 1.5cqw;
}

.status-dot {
  width: 0.9cqw;
  height: 0.9cqw;
  border-radius: 50%;
  background: currentColor;
}

.status-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.7cqw;
}

.status-icons svg {
  width: 2.3cqw;
  height: 2.3cqw;
}

.status-batt {
  width: 3.4cqw;
  height: 1.6cqw;
  border-radius: 0.4cqw;
  background: linear-gradient(90deg, currentColor 70%, transparent 70%);
  box-shadow: 0 0 0 0.25cqw currentColor inset;
  opacity: 0.9;
}

.scene.is-offline .status-off {
  display: inline-flex;
}

.scene.is-offline .status-icons svg {
  opacity: 0.25;
}

.app {
  padding: 2.4cqw 2.8cqw 0;
}

.app-kicker {
  font-size: 1.5cqw;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--screen-muted);
}

.app-title {
  margin-top: 0.2cqw;
  font-size: 3.6cqw;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-list {
  margin-top: 2cqw;
  padding: 0;
  list-style: none;
}

.app-list li {
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  padding: 1.55cqw 0;
  border-bottom: 0.2cqw solid var(--screen-line);
  font-size: 2.05cqw;
}

.app-check {
  flex: none;
  width: 2.6cqw;
  height: 2.6cqw;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.3cqw var(--screen-muted);
}

.app-check.is-done {
  background: var(--green-mid);
  box-shadow: none;
  background-image: linear-gradient(45deg, transparent 44%, #fff 44% 56%, transparent 56%);
}

.app-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9cqw;
  margin: 6.4cqw -0.6cqw 0;
  padding: 1.3cqw 1.6cqw;
  border-radius: 99px;
  background: var(--screen-field);
  color: var(--screen-muted);
  font-size: 1.7cqw;
  font-weight: 500;
}

.app-hint svg {
  flex: none;
  width: 2.4cqw;
  height: 2.4cqw;
}

/* outbox: shown while offline, or while letters wait in it */

.outbox {
  position: absolute;
  inset: auto 1.6cqw 1.8cqw;
  display: none;
  padding: 1.5cqw 1.8cqw 1.7cqw;
  border-radius: 2.4cqw;
  background: var(--screen-field);
  box-shadow: inset 0 0 0 0.25cqw var(--screen-line);
  text-align: center;
  z-index: 1;
}

.scene.is-offline .outbox,
.scene.has-waiting .outbox {
  display: block;
}

.scene.is-offline .app-hint,
.scene.has-waiting .app-hint {
  visibility: hidden;
}

.outbox-label {
  font-size: 1.6cqw;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--screen-muted);
}

.outbox-tray {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 9cqw;
  margin: 0.8cqw 0;
  border-radius: 1.4cqw;
  background: linear-gradient(var(--screen-line), transparent);
  box-shadow: inset 0 -0.5cqw 0 var(--screen-line);
}

.tray-env {
  width: 11cqw;
  height: 7.4cqw;
  margin-inline: -2.6cqw;
  overflow: visible;
  filter: drop-shadow(0 0.4cqw 0.5cqw var(--object-shadow));
}

.tray-env:nth-child(2n) {
  rotate: 5deg;
}

.tray-env:nth-child(2n + 1) {
  rotate: -4deg;
}

.outbox-note {
  font-size: 1.65cqw;
  color: var(--screen-muted);
}

/* the feedback sheet */

.sheet {
  position: absolute;
  inset: auto 0 0;
  height: 74%;
  padding: 1.4cqw 2.6cqw 2.6cqw;
  border-radius: 3.2cqw 3.2cqw 0 0;
  background: var(--screen);
  box-shadow: 0 -1.2cqw 3cqw rgba(15, 17, 25, 0.22);
  transform: translateY(104%);
  z-index: 2;
}

.scene.is-open .sheet {
  transform: none;
}

.phone-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 20, 0.3);
  opacity: 0;
  z-index: 1;
}

.scene.is-open .phone-screen::before {
  opacity: 1;
}

.motion .phone-screen::before {
  transition: opacity 0.4s;
}

.sheet-grip {
  display: block;
  width: 6cqw;
  height: 0.7cqw;
  margin: 0 auto 1.6cqw;
  border-radius: 99px;
  background: var(--screen-line);
}

.sheet-title {
  font-size: 2.6cqw;
  font-weight: 700;
}

.sheet-private {
  display: flex;
  align-items: center;
  gap: 0.6cqw;
  margin-top: 0.4cqw;
  font-size: 1.3cqw;
  white-space: nowrap;
  color: var(--screen-muted);
}

.sheet-private svg {
  flex: none;
  width: 1.8cqw;
  height: 1.8cqw;
  color: var(--plum);
}

:root[data-theme="dark"] .sheet-private svg {
  color: #d79ac4;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sheet-private svg {
    color: #d79ac4;
  }
}

.field {
  position: relative;
  height: 11.6cqw;
  margin-top: 1.6cqw;
  padding: 1.5cqw 1.8cqw;
  border-radius: 1.8cqw;
  background: var(--screen-field);
  font-size: 2.2cqw;
  line-height: 1.32;
}

.field-placeholder {
  position: absolute;
  inset: 1.5cqw 1.8cqw auto;
  color: var(--screen-muted);
}

.scene.has-text .field-placeholder {
  visibility: hidden;
}

.scene.is-typing .field-text::after {
  content: "";
  display: inline-block;
  width: 0.25cqw;
  height: 2.6cqw;
  margin-left: 0.2cqw;
  vertical-align: -0.5cqw;
  background: var(--plum);
  animation: caret 0.9s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.attach {
  display: flex;
  align-items: center;
  gap: 1.4cqw;
  height: 8cqw;
  margin-top: 1.6cqw;
}

.shot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6cqw;
  width: 5.4cqw;
  height: 8cqw;
  padding: 1.6cqw 0.8cqw 0;
  border-radius: 0.9cqw;
  background: var(--paper);
  box-shadow: 0 0 0 0.25cqw var(--paper-edge), 0 0.6cqw 1cqw -0.4cqw var(--object-shadow);
  rotate: -5deg;
  visibility: hidden;
}

.shot-bar {
  display: block;
  height: 0.6cqw;
  border-radius: 1px;
  background: #d7cfbf;
}

.shot-bar:first-of-type {
  width: 70%;
  height: 0.9cqw;
  background: #b7ad9a;
}

.shot-clip {
  position: absolute;
  top: -1.2cqw;
  left: 1.6cqw;
  width: 1.5cqw;
  height: 3.6cqw;
  border-radius: 1cqw;
  border: 0.35cqw solid var(--brass);
  border-bottom-color: transparent;
}

.tag {
  padding: 0.7cqw 1.4cqw;
  border-radius: 99px;
  background: var(--screen-field);
  box-shadow: inset 0 0 0 0.22cqw var(--screen-line);
  color: var(--screen-muted);
  font-size: 1.6cqw;
  font-weight: 600;
  white-space: nowrap;
  visibility: hidden;
}

.scene.has-attach .shot,
.scene.has-attach .tag {
  visibility: visible;
}

.send {
  position: absolute;
  left: 2.6cqw;
  right: 2.6cqw;
  bottom: 2.6cqw;
  padding: 1.3cqw;
  border-radius: 1.6cqw;
  background: var(--plum);
  color: #fbf7ee;
  font-size: 2.1cqw;
  font-weight: 650;
  text-align: center;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 12.2cqw;
  translate: -50% 0;
  padding: 0.9cqw 2.2cqw;
  border-radius: 99px;
  background: var(--green-mid);
  color: #f3ede1;
  font-size: 1.8cqw;
  font-weight: 650;
  white-space: nowrap;
  opacity: 0;
  z-index: 3;
}

.scene.is-sent .toast {
  opacity: 1;
}

.scene.is-sent .app-hint {
  visibility: hidden;
}

/* letterbox */

.letterbox {
  position: absolute;
  right: 4cqw;
  bottom: 3.6cqw;
  width: 37cqw;
  height: auto;
  aspect-ratio: 250 / 360;
  overflow: visible;
  z-index: 1;
}

.lb-shadow {
  fill: var(--object-shadow);
  opacity: 0.8;
}

.lb-foot {
  fill: var(--post-lo);
}

.lb-post {
  fill: url(#lb-post);
}

.post-stop-hi {
  stop-color: var(--post-hi);
}

.post-stop-lo {
  stop-color: var(--post-lo);
}

.lb-back {
  fill: var(--green-side);
  transform: translate(8px, 4px);
}

.lb-body {
  fill: url(#lb-body);
}

.lb-stop-hi {
  stop-color: var(--green-hi);
}

.lb-stop-mid {
  stop-color: var(--green-mid);
}

.lb-stop-lo {
  stop-color: var(--green-lo);
}

.lb-rim {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 2;
}

.lb-shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 5;
  stroke-linecap: round;
}

.lb-door {
  fill: rgba(0, 0, 0, 0.06);
  stroke: rgba(0, 0, 0, 0.22);
  stroke-width: 2;
}

.lb-bracket {
  fill: var(--post-lo);
}

.lb-bevel {
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.lb-hinge {
  fill: url(#lb-brass);
  stroke: var(--brass-lo);
  stroke-width: 0.8;
}

.lb-plate {
  fill: url(#lb-brass);
  stroke: var(--brass-lo);
  stroke-width: 1;
}

.br-stop-hi {
  stop-color: var(--brass-hi);
}

.br-stop-lo {
  stop-color: var(--brass);
}

.lb-mouth {
  fill: var(--mouth);
}

.lb-peek {
  fill: var(--paper);
  stroke: var(--paper-edge);
  stroke-width: 0.8;
}

.lb-flapline {
  fill: var(--brass-lo);
  opacity: 0.55;
}

.lb-keyhole {
  fill: var(--mouth);
}

.lb-flag {
  transform-box: view-box;
  transform-origin: 183.5px 130px;
}

.flag-arm {
  fill: var(--plum-lo);
}

.flag-cloth {
  fill: var(--plum);
}

.lb-pivot {
  fill: var(--brass-hi);
  stroke: var(--brass-lo);
  stroke-width: 1.2;
}

/* At rest with motion on, the box starts empty and the flag down. Without motion, the scene is
   the still life: a letter in the slot and the flag up. */
.motion .lb-flag {
  transform: rotate(98deg);
}

.motion .scene.has-mail .lb-flag {
  transform: none;
}

.motion .scene:not(.has-mail) .lb-peek {
  opacity: 0;
}

.badge {
  position: absolute;
  left: 87cqw;
  top: 20.6cqw;
  translate: -50% 0;
  padding: 0.55cqw 1.7cqw 0.7cqw;
  border-radius: 99px;
  background: var(--paper);
  color: var(--plum);
  box-shadow: 0 0 0 0.25cqw var(--paper-edge), 0 0.8cqw 1.4cqw -0.6cqw var(--object-shadow);
  font-size: max(11px, 2.4cqw);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  z-index: 3;
}

.badge:empty {
  display: none;
}

/* a letter in flight */

.flyer {
  position: absolute;
  width: 19cqw;
  height: 12.67cqw;
  translate: -50% -50%;
  overflow: visible;
  pointer-events: none;
  z-index: 4;
  filter: drop-shadow(0 0.8cqw 1cqw var(--object-shadow)) drop-shadow(0 0 1.2cqw var(--env-glow));
}

.flyer .env-flap,
.flyer .env-seal {
  transform-box: fill-box;
}

.flyer .env-flap {
  transform-origin: 50% 0;
}

.flyer .env-seal {
  transform-origin: 50% 50%;
}

/* ---------- the play ---------- */

.play {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-top: 14px;
}

.play h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 2rem;
  line-height: 1;
}

.play-buttons {
  display: flex;
  gap: 8px;
}

.btn--shake,
.btn--net {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.95rem;
}

.btn--shake {
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: 0 1px 0 var(--btn-edge), 0 8px 20px -12px var(--plum);
}

.btn--shake svg,
.btn--net svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--shake[aria-disabled="true"] {
  cursor: progress;
}

.btn--net {
  padding: 0 14px;
  background: var(--ghost-bg);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 0.85rem;
}

.net-back {
  display: none;
}

.play.is-offline .net-go {
  display: none;
}

.play.is-offline .net-back {
  display: inline;
}

.play.is-offline .btn--net {
  background: #e7a43a;
  color: #2a1c05;
  box-shadow: none;
}

.motion .btn--shake,
.motion .btn--net {
  transition: transform 0.15s, background-color 0.2s;
}

.motion .btn--shake:active,
.motion .btn--net:active {
  transform: scale(0.97);
}

.play-note {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- steps ---------- */

.steps {
  padding-block: 44px 8px;
}

.step-list {
  display: grid;
  gap: 22px;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 76px 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: start;
  align-content: start;
}

.step-slot {
  position: relative;
  grid-row: 1 / 3;
  width: 76px;
  height: 52px;
  margin-top: 2px;
  border-radius: 10px;
  background: linear-gradient(transparent 55%, var(--line) 55% 58%, transparent 58%);
}

.step-env {
  position: absolute;
  inset: 2px 2px auto;
  width: 72px;
  height: 48px;
  overflow: visible;
  filter: drop-shadow(0 3px 4px var(--object-shadow)) drop-shadow(0 0 8px var(--env-glow));
}

.step-icon {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 15px;
  height: 15px;
  padding: 2px;
  border-radius: 2px;
  background: var(--paper);
  box-shadow: 0 0 0 1.2px var(--plum);
  color: var(--plum);
}

.step-shot {
  position: absolute;
  top: 5px;
  right: 8px;
  width: 12px;
  height: 17px;
  border-radius: 2px;
  background: linear-gradient(#b7ad9a 0 2px, transparent 2px 4px, #d7cfbf 4px 5.5px, transparent 5.5px 7px, #d7cfbf 7px 8.5px, transparent 8.5px) 2px 4px / 7px 10px no-repeat, var(--paper);
  box-shadow: 0 0 0 1.2px var(--plum);
  rotate: 6deg;
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
}

.motion .step .step-env,
.motion .step .step-icon,
.motion .step .step-shot {
  transition: transform 0.75s cubic-bezier(0.2, 0.9, 0.25, 1.15), opacity 0.45s;
}

.motion .step:not(.is-in) .step-env,
.motion .step:not(.is-in) .step-icon,
.motion .step:not(.is-in) .step-shot {
  transform: translate(-46px, -10px) rotate(-14deg);
  opacity: 0;
}

.motion .step:nth-child(2) .step-env,
.motion .step:nth-child(2) .step-icon,
.motion .step:nth-child(2) .step-shot {
  transition-delay: 0.08s;
}

.motion .step:nth-child(3) .step-env,
.motion .step:nth-child(3) .step-icon,
.motion .step:nth-child(3) .step-shot {
  transition-delay: 0.16s;
}

/* ---------- makers line ---------- */

.makers {
  padding-block: 40px 10px;
}

.makers-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.25;
}

.postmark {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-text);
  box-shadow: inset 0 0 0 4px var(--desk), inset 0 0 0 5.5px var(--accent-text);
  margin-right: 26px;
  opacity: 0.85;
}

.postmark::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 12px;
  width: 34px;
  height: 20px;
  background: repeating-linear-gradient(var(--accent-text) 0 1.5px, transparent 1.5px 6px);
  mask: linear-gradient(90deg, #000 70%, transparent);
  opacity: 0.8;
}

/* ---------- footer ---------- */

.foot {
  padding-block: 36px 34px;
}

.foot-line {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.foot-line a {
  text-underline-offset: 3px;
}

/* ---------- 404 ---------- */

.nf {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding-block: 56px 24px;
  text-align: center;
}

.nf-env {
  --env-line: 0.5;
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 3 / 2;
}

.nf-env svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 10px 14px var(--object-shadow)) drop-shadow(0 0 18px var(--env-glow));
}

.nf-stamp {
  position: absolute;
  left: 50%;
  top: 25%;
  translate: -50% -50%;
  rotate: -11deg;
  padding: 6px 14px 5px;
  border: 3px double var(--plum);
  border-radius: 6px;
  color: var(--plum);
  font-weight: 750;
  font-size: clamp(0.85rem, 4.2vw, 1.15rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(251, 247, 238, 0.72);
  mask: radial-gradient(circle at 30% 40%, #000 60%, rgba(0, 0, 0, 0.82) 61%) ;
}

.motion .nf-stamp {
  animation: stamp 0.5s 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

@keyframes stamp {
  from {
    scale: 1.8;
    opacity: 0;
  }
}

.nf h1 {
  margin-top: 8px;
}

.nf .btn--cta {
  align-items: center;
  margin-top: 4px;
}

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
  .wrap {
    padding-inline: 28px;
  }

  .lede {
    font-size: 1.05rem;
  }

  .step-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }

  .step {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  .step-slot {
    grid-row: auto;
    margin-bottom: 8px;
  }

  .makers-line {
    justify-content: center;
    font-size: 1.6rem;
  }
}

@media (min-width: 980px) {
  .bar {
    padding-block: 26px 10px;
  }

  .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 64px;
    padding-block: 34px 20px;
  }

  h1 {
    font-size: clamp(4rem, 6vw, 5.6rem);
  }

  .lede {
    margin-top: 22px;
    font-size: 1.15rem;
    line-height: 1.55;
  }

  .btn--cta {
    margin-top: 30px;
    padding: 13px 54px 14px 22px;
  }

  .btn-ask {
    font-size: 0.85rem;
  }

  .btn-mail {
    font-size: 1.12rem;
  }

  .scene {
    border-radius: 28px;
  }

  .play {
    margin-top: 18px;
    padding-inline: 4px;
  }

  .play h2 {
    font-size: 2.3rem;
  }

  .steps {
    padding-block: 72px 8px;
  }

  .step h3 {
    font-size: 1.15rem;
  }

  .step p {
    font-size: 1rem;
  }

  .makers {
    padding-block: 64px 20px;
  }
}
