/* The open centre belongs to the water. Reading is an invitation at arm's
   reach, not a headline or a compulsory first step. */
html {
  scrollbar-gutter: auto;
  overflow-y: auto;
}
/* Scene offsets track scroll geometry, not a camera animation. A delayed reset
   on closing the desk would register the ink to an in-between scene position. */
.scene {
  position: absolute;
  height: 100svh;
  transition: none;
  /* Opening the dialog locks document scrolling. Keep the photographed bank
     the same size when a narrow-page scrollbar appears or disappears. */
  width: 100vw;
}
/* A wide, shallow window may scroll, but must not crop away the companion.
   Keep the desktop plate's full height; its ink projection uses this same box. */
@media (min-aspect-ratio: 3/2) {
  .scene {
    min-height: calc(100vw * 2 / 3);
  }
}
/* Near-square tablet windows need a taller bank to retain Haru's head and
   the near stone together. The normal page scroll reveals its lower edge. */
@media (min-width: 601px) and (max-width: 900px) and (max-aspect-ratio: 6/5) {
  .scene {
    min-height: 120vw;
  }
}
#desk,
#desk.shared-paper {
  scrollbar-gutter: auto;
  scrollbar-width: thin;
  scrollbar-color: #8f9a89 transparent;
}
/* The paragraph receives programmatic reading focus, not an extra card frame.
   Interactive controls retain their visible keyboard focus outlines. */
#desk.paper-held #held-paper:has(#read-words:focus-visible),
#desk #draft-preview:focus-visible {
  outline: none;
}
.intro.sr-only {
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.intro.sr-only::before {
  content: none;
}
.header {
  justify-content: flex-start;
  gap: 24px;
  padding: 20px 4vw;
  color: #302e27;
  isolation: isolate;
  background: none;
}
/* One shared light ground protects the garden exits over changing foliage. */
.header::before {
  content: "";
  position: absolute;
  inset: 0 0 -10px;
  z-index: -1;
  background: linear-gradient(#eee9dff0 0%, #eee9dfe0 60%, #eee9df00 100%);
  pointer-events: none;
}
.header #about-open {
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #302e27;
  text-shadow: none;
  padding: 8px;
}
.header #about-open:hover {
  background: none;
}
.header .brand {
  color: #302e27;
  text-shadow: none;
}
.header .brand img {
  filter: brightness(0);
}
.header #about-open svg {
  fill: none;
  stroke: currentColor;
}
.scene-integrated .resting-signature,
.lift-opening .resting-signature {
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: 144px;
  height: 116px;
  transform: translate(-50%, -50%);
  opacity: 0.85;
}
.resting-signature .imprint-mark {
  width: 100%;
  height: 100%;
}
.scene-integrated #top-words {
  visibility: hidden;
}
.bank-footer {
  width: min(290px, calc(100% - 40px));
  left: clamp(165px, var(--stack-center), calc(100% - 165px));
  top: calc(var(--stack-front) + 28px);
  gap: 8px;
}
.bank-footer::before {
  content: "";
  inset: -38px -130px auto;
  height: max(150px, calc(100svh - var(--stack-front) + 10px));
  /* Attenuate the photographed stone instead of painting an opaque green
     centre. The continuous falloff keeps grain visible beneath the labels. */
  background: radial-gradient(
    ellipse 52% 58% at 50% 38%,
    #201c16ad 0%,
    #201c1694 40%,
    #201c1659 65%,
    #201c1624 82%,
    #201c1600 100%
  );
  background-size: 100% 320px;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
}
.bank-footer #empty {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  transform: none;
  background: none;
  color: #fff9ed;
  text-shadow: 0 1px 3px #17231d;
  font:
    500 16px/1.5 Source,
    sans-serif;
}
.bank-footer #empty p {
  margin: 0 0 8px;
  padding: 0;
  background: none;
}
.scene-integrated .stack:has(#top-note:focus-visible)::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 4px solid #242b22;
  box-shadow: 0 0 0 4px #fff9ed;
  pointer-events: none;
}
.bank-actions {
  gap: 24px;
}
/* One invitation system across viewport sizes; only placement responds.
   Keep text and icon weight equal, with a shared patch of garden shade. */
.bank-footer :is(#read-open, #write, #sit-here) {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  color: #fff9ed;
  text-shadow: 0 1px 3px #17231d;
  font:
    500 17px/1.4 Source,
    sans-serif;
  border: 0;
  border-radius: 0;
  background: none;
  text-decoration: none;
}
.bank-footer :is(#read-open, #write, #sit-here) svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bank-footer :is(#read-open, #write, #sit-here):hover {
  color: #fff9ed;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.bank-footer :is(#read-open, #write, #sit-here):focus-visible {
  outline: 2px solid #fff9ed;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #17231d;
}
.bank-updates {
  color: #fff9ed;
  text-shadow: 0 1px 3px #17231d;
}
.bank-footer .bank-updates .quiet {
  color: #fff9ed;
}
.bank-updates #own-thought[open] {
  text-shadow: none;
}
/* Two immediate reading choices. Writing and personal safety are deliberately
   a separate, quieter row, with equally usable targets. */
#desk.at-bank .desk-foot #read-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#desk.at-bank .desk-foot #read-tools :is(.read-actions, .reader-afterword) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
#desk.at-bank
  .desk-foot
  #read-tools
  :is(#another, #keep, #write-here, #safety-open) {
  display: inline-flex;
  grid-template-columns: none;
  width: auto;
  min-height: 44px;
  padding: 10px 6px;
  gap: 9px;
  font-size: 16px;
}
#desk.at-bank .desk-foot #read-tools .reader-afterword {
  margin-top: 12px;
}
#desk.at-bank .desk-foot #read-tools :is(#write-here, #safety-open) {
  font-size: 14px;
  font-weight: 400;
}
#desk.at-bank .desk-foot #read-tools #rest-after {
  align-self: center;
}
.resting-invitation {
  padding: 20px;
  background: linear-gradient(transparent, #17231dc9);
}
dialog#about .welcome-origin {
  font-size: 14px;
  color: #505346;
  margin-top: 24px;
}
@media (max-width: 900px) {
  .bank-footer {
    left: clamp(165px, var(--stack-center), calc(100% - 165px));
  }
}
@media (max-width: 600px) {
  .header {
    padding: 20px;
    gap: 14px;
  }
  .brand {
    font-size: 31px;
  }
  .header #about-open {
    padding: 8px 4px;
    font-size: 14px;
  }
  .bank-footer {
    width: min(270px, calc(100% - 32px));
    left: 50%;
    top: calc(var(--stack-front) + 24px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene {
    transition: none;
  }
}

/* Exits belong to the same left-hand reach as the paper, not hanging ribbons. */
#desk.at-bank .desk-head {
  align-self: flex-start;
  width: auto;
  height: 48px;
  margin: 0;
  gap: 28px;
  align-items: center;
  justify-content: flex-start;
}
#desk.at-bank[data-mode] :is(#return, #rest-here) {
  flex-direction: row;
  justify-content: flex-start;
  width: auto;
  height: 44px;
  margin: 0;
  padding: 8px 12px;
  gap: 8px;
  color: #242b22;
  text-shadow: 0 1px 4px #fff9ed;
}
#desk.at-bank[data-mode] :is(#return, #rest-here)::before {
  content: none;
}
#desk.at-bank.shared-paper[data-mode="read"] .desk-foot {
  width: min(360px, calc(100% - 40px));
}
#desk.at-bank[data-mode="read"] .desk-foot::before {
  inset: -14px -26px -12px;
  background: radial-gradient(
    ellipse,
    #17231dd6 0%,
    #17231dc9 52%,
    #17231d00 78%
  );
}
#desk.at-bank .desk-foot #read-tools .reader-afterword {
  margin-top: 0;
}
@media (max-width: 900px) {
  #desk.at-bank .desk-head {
    align-self: stretch;
    width: auto;
    margin: -14px -12px 0;
    padding: 14px 12px 8px;
    height: 66px;
    background: linear-gradient(#17231dbb, transparent);
  }
  #desk.at-bank[data-mode] :is(#return, #rest-here) {
    color: #fff9ed;
    text-shadow: 0 1px 3px #17231d;
  }
  #desk.at-bank[data-mode] :is(#return, #rest-here):focus-visible {
    outline-color: #fff9ed;
  }
}

/* Ownership appears only after contributing. Keep its disclosure legible over
   the darker moss without turning the primary invitations into a toolbar. */
.bank-updates #own-thought:not([open]) summary {
  color: #fff9ed;
  text-shadow:
    0 1px 3px #17231d,
    0 0 6px #17231d;
  min-height: 44px;
  padding: 10px 8px;
}
.bank-updates #own-thought[open] summary {
  color: #242b22;
  text-shadow: none;
}
@media (max-width: 600px) {
  body.empty-bank .bank-footer::before {
    height: 150px;
  }
  .bank-footer #empty {
    color: #fff9ed;
    text-shadow: 0 1px 3px #17231d;
  }
}
@media (min-width: 701px) and (max-width: 900px) {
  #desk.at-bank .desk-head {
    margin: -22px -28px 0;
    padding: 22px 28px 10px;
    height: 76px;
  }
}
@media (max-width: 700px) {
  #desk.at-bank .desk-head {
    margin: -12px -12px 0;
    padding: 12px 12px 8px;
    height: 64px;
  }
}

/* Permission to remain lives beside the reachable paper, never over the water. */
#desk.at-bank .desk-foot #read-tools #rest-after {
  display: inline-flex;
  align-self: auto;
  margin: 0;
  padding: 10px 6px;
  min-height: 44px;
  font-size: 16px;
  gap: 9px;
}
#desk.at-bank .desk-foot #read-tools .reader-afterword {
  gap: 8px;
}
#desk.at-bank .desk-foot #read-tools :is(#keep, #write-here, #safety-open) {
  font-size: 14px;
  font-weight: 400;
  gap: 6px;
  padding-inline: 3px;
}
#desk.at-bank #sharing .read-actions {
  justify-content: space-between;
  gap: 16px;
}
#desk.at-bank #sharing #keep-private {
  gap: 8px;
}
@media (max-width: 600px) {
  .bank-footer {
    gap: 0;
  }
  body.empty-bank .bank-footer {
    top: calc(var(--stack-front) + 20px);
  }
  body.empty-bank .bank-footer::before {
    height: 160px;
  }
}
@media (max-width: 380px) {
  #desk.at-bank .desk-foot #read-tools .reader-afterword {
    gap: 6px;
  }
  #desk.at-bank .desk-foot #read-tools :is(#keep, #write-here, #safety-open) {
    font-size: 13px;
    white-space: nowrap;
  }
  #desk.at-bank .desk-foot #read-tools .reader-afterword svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
}
/* In an empty bank the two available choices share one row, so the message
   need not cover the blank paper on short phones. */
body.empty-bank .bank-footer {
  top: calc(var(--stack-front) + 12px);
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0 8px;
  padding-bottom: 12px;
}
body.empty-bank .bank-footer #empty,
body.empty-bank .bank-updates,
body.empty-bank .bank-notice {
  grid-column: 1 / -1;
}
body.empty-bank .bank-footer .sit-invitation {
  padding-inline: 2px;
}
body.empty-bank .bank-footer::before {
  height: 110px;
}

/* The photographed surface receives the lifted sheet at contact, not one frame
   after its animation disappears. The stamp uses the same landing plane. */
body.desk-open.paper-landing #top-paper {
  visibility: visible;
}
#desk.at-bank .desk-foot #read-tools #keep {
  font-size: 16px;
  font-weight: 500;
  padding: 10px 6px;
  gap: 9px;
}
#desk.at-bank .desk-foot #read-tools .reader-afterword {
  justify-content: space-between;
  margin-top: 0;
}

/* The sheet rises; its controls stay beside the stone rather than on the stack. */
#desk.at-bank.shared-paper[data-mode="read"] .desk-foot {
  margin-top: calc(8px + var(--held-clearance, 0px));
}

/* One natural ivory surface. Writing begins without material settings or a counter. */
#desk.at-bank #compose {
  grid-template-columns: 1fr;
}
#desk.at-bank #compose #review {
  grid-column: 1;
  justify-self: end;
}

/* A pause is optional and always has a visible way back, including an empty bank. */
.resting-invitation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.resting-invitation #leave-rest {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.resting-invitation #leave-rest svg {
  width: 20px;
  height: 20px;
}

/* Ownership and completion content extend the bank, never slide its controls
   over a fixed photograph. The page below the near bank stays in water shade. */
:root {
  background-color: #17231d;
}
html {
  overflow-x: clip;
}
.scene {
  mask-image: linear-gradient(#000 0 88%, transparent 100%);
}
.bank-footer {
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-anchor: none;
}
.bank-notice {
  scroll-margin-block: 20px;
  text-shadow: none;
}

/* Reading has no task to complete. The nearby sheet and one invitation to sit
   lead; browsing, writing and optional actions remain within easy reach. */
#desk.at-bank.shared-paper[data-mode="read"] #held-paper {
  width: min(440px, 100%);
}
#desk.at-bank .desk-foot #read-tools {
  gap: 12px;
}
#desk.at-bank .desk-foot #read-tools .reading-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
  color: #fff9ed;
  font:
    500 17px/1.4 Source,
    sans-serif;
  text-shadow: 0 1px 3px #17231d;
}
#desk.at-bank .desk-foot #read-tools .reading-pause svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.7;
}
#desk.at-bank .desk-foot #read-tools .reader-afterword {
  justify-content: space-between;
  gap: 12px;
}
#desk.at-bank .desk-foot #read-tools :is(#another, #write-here, #safety-open) {
  font-size: 14px;
  font-weight: 400;
  gap: 6px;
  padding: 10px 3px;
}
#safety .thought-copy {
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid #6c725a40;
}
#safety #keep {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  min-height: 44px;
  width: auto;
}
#safety #keep-help,
#safety #copy-feedback {
  font-size: 14px;
  line-height: 1.5;
  margin: 4px 0 0;
}
#copy-feedback:empty {
  display: none;
}

#safety #report-details {
  margin: 8px 0 12px;
}
#safety #report-details summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 0;
}
#safety #report-details summary:focus-visible {
  outline: 2px solid #3b503c;
  outline-offset: 2px;
}
#safety #report-details p {
  font-size: 14px;
  line-height: 1.5;
}
/* Feather all the way to each edge; a clipped ellipse reads like a toolbar. */
#desk.at-bank[data-mode="read"] .desk-foot::before {
  inset: -30px -46px -28px;
  background: radial-gradient(
    ellipse closest-side,
    #17231de6 0%,
    #17231dd6 48%,
    #17231d00 100%
  );
}

/* Functional ink sits in the stone's shade; neither invitation needs a frame. */
#desk.at-bank .desk-foot #read-tools .quiet {
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-decoration: none;
}
#desk.at-bank .desk-foot #read-tools .quiet:hover span {
  text-decoration: underline;
  text-underline-offset: 5px;
}
#desk.at-bank .desk-foot #read-tools .quiet:focus-visible {
  outline: 2px solid #fff9ed;
  outline-offset: 3px;
}
#desk.at-bank .desk-foot #read-tools .reading-pause {
  align-self: center;
  justify-content: center;
  padding-inline: 12px;
  font-weight: 500;
}
#desk.at-bank .desk-foot #read-tools svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  flex-shrink: 0;
}

/* A nearby margin for secondary actions. Explicit viewport positioning keeps
   expanded reports inside a small screen without a centred settings dialog. */
#safety {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 284px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  padding: 14px 20px 18px;
  border: 1px solid #d6cfbc;
  border-radius: 12px;
  background: #f2ecdf;
  box-shadow: 0 8px 28px #17231d30;
  color: #30352a;
}
#safety .options-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
#safety .options-heading h3 {
  margin: 0;
  font:
    400 16px/1.5 Lora,
    serif;
}
#safety .options-heading button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-right: -10px;
}
#safety svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#safety .thought-copy {
  padding: 0;
  margin: 0;
  border: 0;
}
#safety :is(#keep, #hide-note, #report-details summary) {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 0;
  border: 0;
  background: none;
  text-align: left;
  font:
    400 16px/1.4 Source,
    sans-serif;
  list-style: none;
}
#safety summary::-webkit-details-marker {
  display: none;
}
#safety #report-details {
  margin: 0;
}
#safety #report-details[open] {
  padding-bottom: 4px;
}
#safety #report-details p {
  margin: 8px 0 12px;
}
#safety #copy-feedback:not(:empty) {
  margin: 0 0 12px;
}
#safety :is(button, summary):hover {
  color: #18291c;
}
#safety :is(button, summary):hover span {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* The sunlight is broad, not a silhouette across the words. All lighting stays
   in the material layer so the accessible ink and its bend remain registered. */
.lift-material-ready #desk.at-bank .paper-closeup::before {
  background:
    linear-gradient(172deg, transparent 72%, #625c4915 91%, #8a8e7124 100%),
    linear-gradient(125deg, #fff1d521 0%, transparent 44%, #6559460c 100%);
}
.lift-material-ready #desk.at-bank .paper-closeup::after {
  background: #f2ecdf;
  mix-blend-mode: normal;
  opacity: 0.09;
}

/* One balanced group, with shared spacing and icon weight. The invitation to
   remain gets breathing room, not a filled task button. */
#desk.at-bank .desk-foot #read-tools {
  align-items: center;
  gap: 8px;
}
#desk.at-bank .desk-foot #read-tools .reader-afterword {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(360px, 100%);
  margin-top: 0;
  gap: 10px;
}
#desk.at-bank .desk-foot #read-tools :is(#another, #write-here, #safety-open) {
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  color: #fff9ed;
  gap: 8px;
  min-height: 48px;
}
.paper-garden-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    128deg,
    #5b5034 0%,
    #756348 34%,
    #53614d 78%,
    #384f40 100%
  );
  mask: url("/assets/hotori/quiet-bank-legible-sheet.webp") center / 100% 100%
    no-repeat;
  mix-blend-mode: multiply;
}
@media (max-width: 360px) {
  #desk.at-bank .desk-foot #read-tools .reader-afterword {
    gap: 4px;
  }
  #desk.at-bank
    .desk-foot
    #read-tools
    :is(#another, #write-here, #safety-open) {
    font-size: 15px;
    gap: 5px;
  }
}
@media (min-width: 701px) {
  #desk.at-bank.shared-paper[data-mode="read"] .desk-foot {
    margin-left: max(0px, calc(var(--contact-center, 50%) - 208px));
  }
}

/* A small invitation, not a consent form. Two equally legible endings; detail
   is available without competing with the person's words. */

/* A small trailing mark keeps the invitation first; native details retains
   its keyboard and expanded-state semantics. */
:is(#desk, #about, .bank-updates) summary.quiet-disclosure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  list-style: none;
}
:is(#desk, #about, .bank-updates) summary.quiet-disclosure::marker {
  content: "";
}
:is(#desk, #about, .bank-updates)
  summary.quiet-disclosure::-webkit-details-marker {
  display: none;
}
:is(#desk, #about, .bank-updates) summary.quiet-disclosure .disclosure-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  transform: none;
}
:is(#desk, #about, .bank-updates) details[open] > summary .disclosure-expand {
  visibility: hidden;
}

@media (max-width: 420px) {
  .header {
    gap: 12px;
  }
  .header .garden-return {
    white-space: nowrap;
    margin-right: 0;
  }
  .header .brand {
    font-size: 25px;
    gap: 6px;
  }
  .header .brand img {
    width: 22px;
    height: 28px;
  }
  .header #about-open {
    gap: 6px;
    padding-inline: 4px;
  }
}

@media (max-width: 420px) {
  .bank-actions {
    gap: 16px;
  }
  .bank-footer .bank-actions :is(#read-open, #write) {
    padding-inline: 0;
    gap: 8px;
    white-space: nowrap;
  }
}
@media (max-width: 350px) and (max-height: 650px) {
  .bank-footer {
    top: calc(var(--stack-front) + 4px);
  }
}

/* The place name belongs to the near bank, separate from Arbor's header.
   This anchor follows the same photographed plane as the paper on resize. */
@font-face {
  font-family: "Hotori Yomogi";
  src: url("/assets/hotori/fonts/yomogi-hotori.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.intro.hotori-intro {
  top: calc(var(--stack-top, 60svh) - 22px);
  left: clamp(28px, 5.5vw, 84px);
  max-width: 265px;
  transform: translateY(-100%);
  color: #28291f;
  pointer-events: none;
}
/* A warm reading wash softens the stone grain without hiding its texture.
   The full fade fits inside the layer, so no clipped panel edge is visible. */
.intro.hotori-intro::before {
  content: "";
  inset: -34px -46px -32px -42px;
  background: radial-gradient(
    ellipse 50% 50% at 50% 50%,
    #efe5d3d1 0%,
    #efe5d3bd 36%,
    #efe5d37a 60%,
    #efe5d329 80%,
    #efe5d300 100%
  );
}
.hotori-intro h1 {
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin: 0 0 5px;
}
.hotori-kana {
  display: block;
  font:
    400 19px/1.4 "Hotori Yomogi",
    serif;
  letter-spacing: 0.16em;
}
.hotori-rule {
  display: block;
  width: 25px;
  height: 1px;
  background: currentColor;
  opacity: 0.65;
  margin: 10px 0;
}
.hotori-intro #space-invitation {
  white-space: normal;
  max-width: none;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 600px) {
  .intro.hotori-intro {
    left: 38px;
    max-width: 230px;
    top: calc(var(--stack-top, 64svh) - 16px);
  }
  .intro.hotori-intro::before {
    inset: -28px -30px -26px -34px;
  }
  .hotori-intro h1 {
    font-size: 34px;
  }
  .hotori-kana {
    font-size: 17px;
  }
  .hotori-rule {
    margin: 8px 0;
  }
  .hotori-intro #space-invitation {
    font-size: 13px;
  }
}
@media (min-aspect-ratio: 6/5) and (max-height: 540px) {
  .intro.hotori-intro {
    left: 25px;
    top: calc(var(--stack-top, 60svh) - 8px);
  }
  .hotori-intro h1 {
    font-size: 29px;
  }
  .hotori-kana {
    font-size: 15px;
  }
  .hotori-rule {
    margin: 5px 0;
  }
  .hotori-intro #space-invitation {
    font-size: 12px;
  }
}
/* Short landscape windows keep the place label on the stone and the header
   above Haru. Normal scrolling still reaches the sitting invitation. */
@media (min-aspect-ratio: 6/5) and (max-height: 540px) {
  .header {
    padding-block: 6px;
  }
  .intro.hotori-intro {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    column-gap: 10px;
    max-width: 230px;
  }
  .hotori-intro h1 {
    margin: 0;
  }
  .hotori-rule {
    display: none;
  }
  .hotori-intro #space-invitation {
    grid-column: 1 / -1;
    margin-top: 6px;
  }
}
/* Keep the entire falloff inside its painted bounds, including an empty bank.
   A fixed-size background clipped by a shorter box made a visible dark stripe. */
.bank-footer::before,
body.empty-bank .bank-footer::before {
  inset-block-start: -48px;
  height: 200px;
  background-image: radial-gradient(
    ellipse 50% 50% at 50% 50%,
    #201c16ad 0%,
    #201c1694 40%,
    #201c1659 65%,
    #201c1624 82%,
    #201c1600 100%
  );
  background-size: 100% 100%;
}

/* Without the scene there is no photographed plane to register to. Let the
   invitation, paper and choices flow in reading order instead of overlapping. */
body.scene-failed {
  background: #e8e3d9;
  min-height: 100svh;
}
.scene-failed #main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 120px 24px 32px;
}
.scene-failed .intro.hotori-intro {
  position: static;
  transform: none;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}
.scene-failed .intro.hotori-intro::before {
  content: none;
}
.scene-failed .bank {
  height: auto;
  min-height: 0;
  padding: 0;
  width: 100%;
}
.scene-failed .stack {
  position: relative;
  inset: auto;
  transform: none;
  width: min(360px, 100%);
  height: auto;
  aspect-ratio: 3 / 2;
  --rest-pose: rotate(-2deg);
}
.scene-failed .under-paper {
  display: none;
}
.scene-failed :is(#top-words, #top-source, .lift-label) {
  visibility: hidden;
}
.scene-failed .resting-signature,
.scene-failed .paper-mark {
  left: 50%;
  top: 50%;
  width: 100px;
  height: 90px;
  transform: translate(-50%, -50%);
}
.scene-failed .bank-footer,
.scene-failed.empty-bank .bank-footer {
  position: relative;
  inset: auto;
  transform: none;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 0;
}
.scene-failed .bank-footer::before {
  content: none;
}
.scene-failed
  .bank-footer
  :is(#read-open, #write, #sit-here, .quiet, summary, #empty, .bank-updates) {
  color: #303b34;
  text-shadow: none;
}
.scene-failed .bank-footer :focus-visible {
  outline-color: #303b34;
  box-shadow: none;
}

.scene-failed .paper-mark {
  opacity: 0.65;
  object-fit: contain;
}
.scene-failed #connection-alert {
  background: none;
  color: #303b34;
  padding: 0;
}
