/* Keelung harbour archive (harbor400.keelung.ing): HUD over the pixel 3D harbour office, and the replica documents. */

:root {
  --room: #e9dfcc;
  --room-2: #dccfb5;
  --ink: #2a2118;
  --muted: #6d5f4c;
  --wood: #8a5a33;
  --wood-2: #6e4426;
  --wood-3: #a7713f;
  --wood-line: rgb(40 22 8 / 0.35);
  --brass: #c9a24f;
  --brass-2: #8f6d27;
  --paper: #f6efdf;
  --paper-2: #eadfc4;
  --paper-ink: #2b2620;
  --red: #b0372b;
  --bp: #1f4f7a;
  --bp-line: #d8ecff;
  --dial: #f2dfa6;
  --dial-ink: #3b2a12;
  --glow: rgb(255 196 92 / 0);
  --focus: #1d6fb8;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.4) inset,
    0 10px 24px rgb(40 22 8 / 0.25);
  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU",
    serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas,
    "Noto Sans Mono CJK TC", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --room: #1a1612;
    --room-2: #231d17;
    --ink: #efe4cf;
    --muted: #b5a68c;
    --wood: #5b3a20;
    --wood-2: #3f2714;
    --wood-3: #74492a;
    --wood-line: rgb(0 0 0 / 0.45);
    --paper: #e9dcc0;
    --paper-2: #d8c8a6;
    --focus: #7fb8ee;
    --shadow: 0 1px 0 rgb(255 255 255 / 0.06) inset,
      0 12px 30px rgb(0 0 0 / 0.55);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --room: #1a1612;
  --room-2: #231d17;
  --ink: #efe4cf;
  --muted: #b5a68c;
  --wood: #5b3a20;
  --wood-2: #3f2714;
  --wood-3: #74492a;
  --wood-line: rgb(0 0 0 / 0.45);
  --paper: #e9dcc0;
  --paper-2: #d8c8a6;
  --focus: #7fb8ee;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.06) inset, 0 12px 30px rgb(0 0 0 / 0.55);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(
      ellipse at 70% -10%,
      rgb(255 220 150 / 0.35),
      transparent 60%
    ),
    linear-gradient(var(--room), var(--room-2));
  color: var(--ink);
  font:
    16px/1.6 system-ui,
    -apple-system,
    "PingFang TC",
    "Noto Sans TC",
    "Microsoft JhengHei",
    sans-serif;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.noscript {
  margin: 16px;
  padding: 12px 16px;
  background: var(--paper);
  color: var(--paper-ink);
}

/* 3D room: the canvas fills the window and is drawn at low resolution, then scaled up without smoothing. */

html,
body {
  height: 100%;
  overflow: hidden;
  background: #120d09;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: manipulation;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
      ellipse at 50% 45%,
      transparent 55%,
      rgb(10 6 2 / 0.55)
    ),
    linear-gradient(transparent 70%, rgb(10 6 2 / 0.35));
}

.static {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(
      0deg,
      rgb(255 255 255 / 0.08) 0 2px,
      transparent 2px 4px
    ),
    radial-gradient(circle, rgb(255 240 200 / 0.25), transparent 70%);
  mix-blend-mode: screen;
}

.static.on {
  animation: static 0.32s steps(4) 1;
}

@keyframes static {
  0% {
    opacity: 0.9;
    transform: translateY(0);
  }
  50% {
    opacity: 0.6;
    transform: translateY(3px);
  }
  100% {
    opacity: 0;
  }
}

/* HUD frames share the look of an RPG dialogue window. */

.frame {
  background: rgb(18 22 40 / 0.86);
  color: #f3ead6;
  border: 2px solid #e9d9a6;
  border-radius: 6px;
  box-shadow:
    0 0 0 2px #1a1308,
    0 0 0 4px #8f6d27,
    0 10px 30px rgb(0 0 0 / 0.45);
}

.hud-title {
  position: fixed;
  top: 14px;
  left: 16px;
  max-width: min(520px, calc(100% - 32px));
  padding: 10px 14px;
}

.hud-title .eyebrow {
  color: #d8c48c;
}

.hud-title h1,
.hud-title .h1 {
  font-size: clamp(20px, 2.6vw, 28px);
}

.hud-title h1 span,
.hud-title .h1 span {
  border-color: #ff8a73;
  color: #ff8a73;
}

.hud-title .hint {
  margin: 4px 0 0;
  color: #cfc3a6;
  font-size: 13px;
}

.links {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.links a,
.theme-toggle {
  padding: 6px 12px;
  border: 1px solid #e9d9a6;
  border-radius: 999px;
  background: rgb(18 22 40 / 0.8);
  color: #f3ead6;
  font-size: 13px;
  text-decoration: none;
}

/* Dialogue window: nameplate, broadcast caption and the controls. */

.dialog {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  translate: -50% 0;
  width: min(1000px, calc(100% - 32px));
  padding: 26px 18px 12px;
}

.nameplate {
  position: absolute;
  top: -16px;
  left: 18px;
  padding: 2px 12px;
  border: 2px solid #e9d9a6;
  border-radius: 4px;
  background: #6e1f17;
  color: #fff3d6;
  font: 700 14px/1.5 var(--serif);
  letter-spacing: 0.08em;
}

.caption {
  min-height: 3.4em;
  margin: 0 0 10px;
  font: 17px/1.7 var(--serif);
}

.caption .more {
  display: inline-block;
  margin-left: 6px;
  color: #e9d9a6;
  animation: blink 1s steps(2) infinite;
}

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

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid #e9d9a6;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.06);
  color: #f3ead6;
  font-size: 14px;
}

.btn:hover {
  background: rgb(233 217 166 / 0.18);
}

.btn[aria-pressed="true"] {
  background: #e9d9a6;
  color: #1a1308;
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.lamp {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5a1d14;
}

.btn[aria-pressed="true"] .lamp {
  background: #ff5a3c;
  box-shadow: 0 0 8px #ff5a3c;
}

#power[aria-pressed="false"] {
  animation: beckon 2.4s ease-in-out infinite;
}

@keyframes beckon {
  50% {
    box-shadow: 0 0 0 4px rgb(233 217 166 / 0.35);
  }
}

.dial {
  position: relative;
  flex: 1 1 260px;
  min-width: 180px;
  height: 42px;
  overflow: hidden;
  border-radius: 4px;
  background: linear-gradient(#f2dfa6, #e2c784);
  box-shadow: 0 0 0 2px #1a1308 inset;
  touch-action: pan-y;
  cursor: ew-resize;
}

.dial.on {
  background: radial-gradient(ellipse at 50% 60%, #fff0bf, #f2dfa6 70%);
  box-shadow:
    0 0 0 2px #1a1308 inset,
    0 0 16px rgb(255 196 92 / 0.6);
}

.scale {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.tick {
  position: absolute;
  top: 4px;
  width: 1px;
  height: 9px;
  background: #3b2a12;
}

.tick.era {
  top: 2px;
  width: 2px;
  height: 14px;
}

.tick-label {
  position: absolute;
  top: 16px;
  translate: -50% 0;
  color: #3b2a12;
  font: 700 12px/1 var(--mono);
  white-space: nowrap;
}

.era-label {
  position: absolute;
  bottom: 2px;
  color: #7a1f14;
  font: 700 10px/1 var(--serif);
  white-space: nowrap;
}

.needle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  translate: -50% 0;
  background: #c0261a;
}

/* Document and list panels. */

.panel {
  position: fixed;
  top: 84px;
  bottom: 190px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow: auto;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.35s;
}

.panel[hidden] {
  display: flex;
  visibility: hidden;
  opacity: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 700 15px var(--serif);
  letter-spacing: 0.08em;
}

.close {
  min-width: 36px;
  min-height: 32px;
  border: 1px solid #e9d9a6;
  border-radius: 4px;
  background: transparent;
  color: #f3ead6;
}

#docPanel {
  right: 16px;
  width: min(460px, calc(100% - 32px));
}

#docPanel[hidden] {
  transform: translateX(30px);
}

/* The title bar folds the document away (a bottom sheet on phones). */
.sheet-toggle {
  display: flex;
  flex: 1;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}

.sheet-toggle #docTitle {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sheet-toggle .chev {
  color: #e9d9a6;
  transition: rotate 0.25s;
}

#docPanel.folded {
  bottom: auto;
}

#docPanel.folded .chev {
  rotate: 180deg;
}

#docPanel.folded .panel-body {
  display: none;
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-head .close {
  margin-left: 8px;
}

#listPanel {
  left: 16px;
  width: min(320px, calc(100% - 32px));
}

#listPanel[hidden] {
  transform: translateX(-30px);
}

.era-group h3 {
  margin: 8px 0 6px;
  color: #e9d9a6;
  font: 700 14px var(--serif);
}

.era-group h3 span {
  margin-left: 8px;
  color: #b9ac8c;
  font: 12px var(--mono);
}

.era-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.era-group button {
  display: flex;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #f3ead6;
  text-align: left;
  font-size: 14px;
}

.era-group button b {
  min-width: 5.5em;
  color: #e9d9a6;
  font: 700 13px var(--mono);
}

.era-group button:hover,
.era-group button[aria-current="true"] {
  background: rgb(233 217 166 / 0.18);
}

.foot {
  margin: 8px 0 0;
  color: #b9ac8c;
  font-size: 12px;
}

.foot a {
  color: #e9d9a6;
}

.tip {
  position: fixed;
  z-index: 3;
  padding: 4px 10px;
  pointer-events: none;
  font-size: 13px;
  white-space: nowrap;
}

.nogl .vignette,
.nogl #scene {
  display: none;
}

.nogl body,
body.nogl {
  background: #2a1d12;
}

.side {
  min-height: 0;
}

.doc {
  flex: 0 0 auto;
}

.docbar button {
  background: rgb(255 255 255 / 0.06);
  color: #f3ead6;
  border-color: #e9d9a6;
}

@media (max-width: 760px) {
  .hud-title .hint {
    display: none;
  }

  .links a {
    display: none;
  }

  .dialog {
    width: calc(100% - 16px);
    padding: 28px 10px 8px;
  }

  .dial {
    order: -1;
    flex-basis: 100%;
  }

  .row {
    gap: 6px;
  }

  .btn {
    padding: 4px 9px;
    font-size: 13px;
  }

  .hud-title {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 130px);
    padding: 8px 10px;
  }

  .hud-title .eyebrow {
    display: none;
  }

  .hud-title h1,
  .hud-title .h1 {
    font-size: 18px;
  }

  .links {
    top: 10px;
    right: 8px;
  }

  .caption {
    font-size: 15px;
    min-height: 5.1em;
  }

  .row .label-long {
    display: none;
  }

  .panel {
    top: 70px;
    bottom: 230px;
  }

  #docPanel,
  #listPanel {
    left: 8px;
    right: 8px;
    width: auto;
  }

  /* Bottom sheet: sits on the dialogue window and leaves the room above it. */
  #docPanel {
    top: auto;
    bottom: calc(
      max(14px, env(safe-area-inset-bottom)) + var(--dialog-h, 200px) + 8px
    );
    max-height: 38svh;
  }

  #docPanel.folded {
    bottom: calc(
      max(14px, env(safe-area-inset-bottom)) + var(--dialog-h, 200px) + 8px
    );
  }

  #docPanel[hidden] {
    transform: translateY(30px);
  }

  #docPanel .close {
    display: none;
  }

  #docPanel .side {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .static.on,
  #power[aria-pressed="false"],
  .caption .more {
    animation: none;
  }
}

/* Document tray */

.tray {
  display: grid;
  gap: 10px;
}

.doc {
  perspective: 1600px;
}

.flip {
  display: grid;
  transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.2, 1);
  transform-style: preserve-3d;
}

.flip.turned {
  transform: rotateY(180deg);
}

.side {
  grid-area: 1 / 1;
  min-height: 360px;
  backface-visibility: hidden;
  border-radius: 4px;
  box-shadow:
    0 2px 0 rgb(0 0 0 / 0.08),
    0 14px 30px rgb(40 22 8 / 0.3);
}

.back {
  transform: rotateY(180deg);
  padding: 22px 24px;
  background: var(--paper);
  color: var(--paper-ink);
  overflow: auto;
}

.doc.enter .front {
  animation: pull 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes pull {
  from {
    opacity: 0;
    transform: translateX(-36px) rotate(-1.5deg);
  }
}

.docbar {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.docbar button {
  min-width: 44px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--wood-line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--paper-ink);
}

.docbar #turn {
  min-width: 180px;
}

/* Back side: the event and its sources */

.back .when {
  margin: 0;
  color: var(--red);
  font: 700 13px var(--mono);
  letter-spacing: 0.1em;
}

.back h3 {
  margin: 4px 0 10px;
  font: 700 24px/1.3 var(--serif);
}

.back p {
  margin: 0 0 12px;
}

.back h4 {
  margin: 16px 0 6px;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.back ol {
  margin: 0;
  padding-left: 1.4em;
  font-size: 14px;
}

.back li {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.caveat {
  padding: 8px 12px;
  border-left: 4px solid #c58a1b;
  background: rgb(197 138 27 / 0.12);
  font-size: 14px;
}

/* Shared faux-document parts */

.front {
  position: relative;
  display: grid;
  overflow: hidden;
  color: var(--paper-ink);
}

.replica {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  padding: 1px 6px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  color: rgb(176 55 43 / 0.75);
  font: 700 11px var(--mono);
  letter-spacing: 0.1em;
  rotate: -4deg;
}

.paper {
  min-width: 0;
  padding: 30px 32px 40px;
  background: radial-gradient(
      ellipse at 20% 10%,
      rgb(255 255 255 / 0.45),
      transparent 50%
    ),
    radial-gradient(
      ellipse at 90% 100%,
      rgb(150 110 50 / 0.18),
      transparent 60%
    ),
    var(--paper);
  font-family: var(--serif);
}

.paper .head {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
}

.paper p {
  margin: 0 0 8px;
  font-size: 17px;
  white-space: pre-wrap;
}

.paper .sign {
  margin-top: 22px;
  text-align: right;
  font-style: italic;
}

/* letter */
.k-letter {
  border-top: 10px solid var(--paper-2);
  background-image: repeating-linear-gradient(
      transparent 0 31px,
      rgb(120 90 40 / 0.18) 31px 32px
    ),
    radial-gradient(ellipse at 90% 100%, rgb(150 110 50 / 0.2), transparent 60%);
  background-color: var(--paper);
}

/* index card */
.k-card {
  border-top: 6px solid var(--red);
  background-image: repeating-linear-gradient(
    transparent 0 33px,
    rgb(60 110 170 / 0.25) 33px 34px
  );
  background-position: 0 58px;
  background-color: #fbf7ec;
  font-family: var(--mono);
}

.k-card p {
  font-size: 16px;
  line-height: 34px;
  margin: 0;
}

.stamp {
  position: absolute;
  right: 26px;
  top: 22px;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 3px double var(--red);
  border-radius: 50%;
  color: var(--red);
  font: 700 16px var(--serif);
  rotate: 12deg;
  opacity: 0.8;
}

/* vertical notice */
.k-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.k-notice .head {
  padding-bottom: 8px;
  border-bottom: 2px solid var(--paper-ink);
}

.vert {
  display: flex;
  flex-direction: row-reverse;
  gap: 18px;
  justify-content: center;
  min-height: 230px;
}

.vert p {
  margin: 0;
  writing-mode: vertical-rl;
  font-size: 22px;
  letter-spacing: 0.18em;
}

.seal {
  position: absolute;
  left: 28px;
  bottom: 30px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: var(--red);
  color: #fbe9dc;
  font: 700 15px/1.1 var(--serif);
  text-align: center;
  rotate: -6deg;
  opacity: 0.85;
}

/* ledger and manifest */
.k-ledger table,
.k-manifest table {
  width: 100%;
  border-collapse: collapse;
}

.k-ledger td,
.k-ledger th {
  padding: 8px 6px;
  border-bottom: 1px solid rgb(120 90 40 / 0.4);
  border-right: 1px solid rgb(176 55 43 / 0.35);
  text-align: left;
  font-size: 16px;
}

.k-ledger th {
  border-bottom: 2px solid var(--red);
}

.k-manifest {
  background: repeating-linear-gradient(#f4f8ef 0 34px, #d9ecd2 34px 68px);
  font-family: var(--mono);
}

.k-manifest td,
.k-manifest th {
  padding: 8px 6px;
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}

.k-manifest .head {
  letter-spacing: 0.2em;
}

/* blueprint */
.k-blueprint {
  padding: 22px 24px 40px;
  background:
    linear-gradient(rgb(216 236 255 / 0.12) 1px, transparent 1px) 0 0 / 24px
      24px,
    linear-gradient(90deg, rgb(216 236 255 / 0.12) 1px, transparent 1px) 0 0 /
      24px 24px,
    var(--bp);
  color: var(--bp-line);
  font-family: var(--mono);
}

.k-blueprint .head {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.06em;
}

.k-blueprint svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 230px;
}

.k-blueprint .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.k-blueprint .replica {
  color: var(--bp-line);
}

/* telegram */
.k-telegram {
  background: #efe3b5;
  font-family: var(--mono);
}

.k-telegram .head {
  padding-bottom: 6px;
  border-bottom: 3px double #7a5d1a;
  letter-spacing: 0.3em;
}

.strip {
  display: inline-block;
  margin: 6px 0;
  padding: 4px 10px;
  background: #fffdf3;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
  font-size: 17px;
  letter-spacing: 0.08em;
}

/* ticket */
.k-ticket {
  display: grid;
  place-items: center;
  background: var(--room-2);
}

.ticket {
  position: relative;
  width: min(88%, 420px);
  padding: 22px 26px 22px 36px;
  background: linear-gradient(90deg, #f2c9a0, #f8e2c8);
  border-radius: 6px;
  font-family: var(--mono);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 12px, #000 13px);
  mask: radial-gradient(circle at 0 50%, transparent 12px, #000 13px);
}

.ticket::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  right: 92px;
  border-left: 2px dashed rgb(80 40 10 / 0.4);
}

.ticket .head {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.3em;
}

.ticket .route {
  font: 700 24px/1.3 var(--serif);
}

.ticket .no {
  position: absolute;
  right: 12px;
  top: 50%;
  translate: 0 -50%;
  width: 72px;
  font-size: 12px;
  text-align: center;
  writing-mode: vertical-rl;
}

/* newspaper */
.k-newspaper {
  background: #ece6d6;
}

.k-newspaper .mast {
  margin: 0 0 4px;
  padding-bottom: 4px;
  border-bottom: 4px double var(--paper-ink);
  font: 900 30px/1.1 var(--serif);
  text-align: center;
  letter-spacing: 0.3em;
}

.k-newspaper .headline {
  margin: 14px 0 12px;
  font: 900 30px/1.25 var(--serif);
}

.k-newspaper .cols {
  columns: 2;
  column-rule: 1px solid rgb(0 0 0 / 0.25);
  column-gap: 20px;
}

.k-newspaper .cols p {
  font-size: 15px;
}

.filler {
  display: block;
  height: 8px;
  margin: 8px 0;
  background: repeating-linear-gradient(
    90deg,
    rgb(0 0 0 / 0.18) 0 90%,
    transparent 90% 100%
  );
}

/* stone rubbing */
.k-rubbing {
  display: grid;
  place-items: center;
  gap: 10px;
  background: radial-gradient(circle at 30% 40%, #33302c, #141210 70%), #1a1816;
  color: #e9e3d6;
  text-align: center;
}

.k-rubbing .carve {
  font: 700 54px/1.1 var(--serif);
  letter-spacing: 0.15em;
  text-shadow:
    0 0 2px #000,
    0 0 8px rgb(255 255 255 / 0.15);
}

.k-rubbing .replica {
  color: #e9a094;
}

/* postcard */
.k-postcard {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  background: #f8f3e6;
}

.k-postcard svg {
  width: 100%;
  height: auto;
  border: 6px solid #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
}

.k-postcard .addr {
  position: relative;
  border-left: 1px solid rgb(0 0 0 / 0.3);
  padding-left: 16px;
}

.k-postcard .addr p {
  border-bottom: 1px solid rgb(0 0 0 / 0.25);
  padding-bottom: 4px;
  font-size: 15px;
}

.k-postcard .pstamp {
  width: 64px;
  height: 76px;
  margin: 0 0 14px auto;
  border: 3px dotted #b9a98a;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font: 700 14px var(--mono);
}

/* Letter text sits on the ruled lines. */
.paper.k-letter {
  padding-top: 37px;
}

.k-letter .head,
.k-letter p {
  margin: 0;
  line-height: 32px;
}

.k-letter .head {
  margin-bottom: 32px;
}

.k-letter .sign {
  margin-top: 32px;
}

.eyebrow {
  margin: 0;
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.14em;
}

h1,
.h1 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

h1 span,
.h1 span {
  margin-left: 0.5em;
  padding: 0 0.35em;
  border: 2px solid;
  border-radius: 4px;
  font-size: 0.55em;
  vertical-align: 0.3em;
}

/* 404: the office on a rainy night. Its h1 is the caption, so the HUD title is a .h1 paragraph. */

.not-found .caption {
  min-height: 0;
  margin: 0 0 10px;
  font: 17px/1.7 var(--serif);
  letter-spacing: normal;
}

.not-found .dialog a.btn {
  text-decoration: none;
}
