html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}
/* One near bank for reading, composing and readback. The camera approaches the
   existing scene; the sheet keeps a shallow perspective above the same stone. */
.scene {
  transform-origin: 70% 68%;
  transition: transform 760ms cubic-bezier(0.35, 0, 0.25, 1);
}
.bank-near .scene {
  transform: scale(1.12);
  transition-duration: 980ms;
}
#desk.at-bank[data-mode] {
  background: transparent;
  padding: 22px 28px 32px;
  isolation: isolate;
}
#desk.at-bank::backdrop {
  background: transparent;
  backdrop-filter: none;
}
#desk.at-bank .writing-place {
  display: none;
}
#desk.at-bank .desk-head {
  width: min(640px, 100%);
  margin: 0;
}
#desk.at-bank[data-mode] #return {
  color: #282c22;
  background: none;
  text-shadow: 0 1px 2px #f4eedf;
  padding: 6px 12px;
  min-height: 44px;
}
#desk.at-bank[data-mode][data-stage] .held-paper {
  width: min(640px, 100%);
  min-height: 0;
  margin: max(28px, calc(39svh - 68px)) 0 0;
  transform: var(--bank-pose, none);
  transform-origin: 0 0;
}
#desk.at-bank[data-mode][data-stage] .sheet-content {
  min-height: 300px;
  padding: 28px 44px 22px;
}
#desk.at-bank[data-mode] :is(#read-words, .continuous-words, #draft-preview) {
  font:
    400 27px/1.5 Lora,
    serif;
  margin: 8px 0 24px;
  padding: 0;
  min-height: 112px;
  text-align: left;
}
#desk.at-bank[data-mode]
  :is(#read-words, .continuous-words, #draft-preview).dense {
  font-size: 22px;
}
#desk.at-bank .signature {
  font-size: 13px;
  color: #4a473c;
  margin: 8px 0 12px;
}
#desk.at-bank .reader-margin {
  margin: 12px 0 0;
}
#desk.at-bank .reader-margin :is(.quiet, .copy-help) {
  color: #302e27;
  text-shadow: none;
  font:
    400 14px/1.4 Source,
    sans-serif;
}
#desk.at-bank .quiet {
  min-height: 44px;
}
#desk.at-bank .reader-afterword {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#desk.at-bank .reader-afterword .copy-help {
  font-size: 12px;
  margin: 0;
  text-align: left;
}
#desk.at-bank .reader-afterword button {
  font-size: 13px;
  padding: 0;
}
#desk.at-bank .desk-foot {
  width: min(640px, 100%);
  margin: 0;
  padding: 0;
}
#desk.at-bank[data-mode] .sheet-content textarea {
  border: 0;
  resize: none;
  min-height: 125px;
  height: 125px;
  margin: 12px 0;
  padding: 5px 0;
  font:
    400 24px/1.5 Lora,
    serif;
}
#desk.at-bank textarea::placeholder {
  color: #69604e;
  opacity: 1;
}
#desk.at-bank[data-mode] .sheet-content textarea:focus-visible {
  border: 0;
  outline: none;
  box-shadow: 0 1px 0 #626e50;
}
#desk.at-bank #draft-help {
  font:
    400 13px/1.5 Source,
    sans-serif;
  padding: 0;
  margin: 8px 0;
  color: #484537;
}
#desk.at-bank #compose {
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
#desk.at-bank .paper-choices {
  display: flex;
  gap: 8px;
}
#desk.at-bank .paper-choices legend {
  display: none;
}
#desk.at-bank .paper-choices label {
  width: 45px;
  min-height: 48px;
}
#desk.at-bank .paper-choices .sample {
  min-height: 44px;
  padding: 6px 2px;
  font-size: 11px;
  transform: none;
}
#desk.at-bank #compose #review {
  position: static;
  margin: 0;
  padding: 0 0 0 12px;
  font:
    400 14px/1.4 Source,
    sans-serif;
}
#desk.at-bank #feedback {
  margin: 8px 0 0;
  font-size: 14px;
  color: #383b2e;
}
#desk.at-bank #feedback:empty {
  display: none;
}
#desk.at-bank #feedback.error {
  background: #f0e6d9;
  color: #652c1f;
  padding: 10px;
}
#desk.at-bank #sharing {
  margin-top: 12px;
  padding-top: 8px;
  border: 0;
}
#desk.at-bank #sharing .consent {
  font-size: 14px;
}
#desk.at-bank .paper-closeup::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.28;
}
#desk.at-bank [data-paper="lichen"] .paper-closeup::after {
  background: #dce2cf;
}
#desk.at-bank [data-paper="mist"] .paper-closeup::after {
  background: #dce7e7;
}
#desk.at-bank .bend-copy {
  transform: none !important;
  margin: 0 !important;
}
@media (max-width: 700px) {
  .bank-near .scene {
    transform: scale(1.1);
  }
  #desk.at-bank[data-mode] {
    padding: 12px 12px 30px;
  }
  #desk.at-bank[data-mode][data-stage] .held-paper {
    margin-top: max(32px, calc(43svh - 58px));
  }
  #desk.at-bank[data-mode][data-stage] .sheet-content {
    padding: 26px 26px 18px;
  }
  #desk.at-bank[data-mode] :is(#read-words, .continuous-words, #draft-preview) {
    font-size: 24px;
    min-height: 100px;
  }
  #desk.at-bank[data-mode]
    :is(#read-words, .continuous-words, #draft-preview).dense {
    font-size: 20px;
  }
  #desk.at-bank[data-mode] .sheet-content textarea {
    font-size: 21px;
    min-height: 125px;
    height: 125px;
  }
  #desk.at-bank #compose {
    gap: 5px;
  }
  #desk.at-bank .paper-choices {
    gap: 4px;
  }
  #desk.at-bank .paper-choices label {
    width: 40px;
  }
  #desk.at-bank #compose #review {
    font-size: 13px;
    padding-left: 4px;
  }
}
@media (max-height: 650px) {
  #desk.at-bank[data-mode][data-stage] .held-paper {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene {
    transition: none;
  }
}
body[data-still="true"] .scene {
  transition: none;
}

#desk.at-bank[data-mode][data-stage] .bank-copy {
  margin: 0;
  min-height: 0;
}
#desk.at-bank .desk-head {
  width: min(640px, 100%);
}

.bank-footer {
  flex-wrap: wrap;
}
.bank-footer #room-status:not(:empty) {
  order: -1;
  flex-basis: 100%;
  text-align: center;
  background: none;
  padding: 0;
  margin: 0 0 3px;
}

/* A quiet colophon and aligned actions leave the thought as the focal point. */
#desk.at-bank .signature {
  min-height: 64px;
  align-items: center;
  margin: 0 0 12px;
  padding: 0;
}
.paper-imprint {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  color: #394437;
  font:
    400 15px/1.2 Lora,
    serif;
  gap: 2px;
}
.imprint-mark {
  display: block;
  width: 66px;
  height: 48px;
  background: currentColor;
  mask: url("/assets/arbor-mark.png") center / contain no-repeat;
}
#desk.at-bank #read-tools {
  margin-top: 4px;
}
#desk.at-bank #read-tools .quiet,
#desk.at-bank #sharing .quiet {
  font:
    400 14px/1.5 Lora,
    serif;
  color: #3c3b30;
  padding: 0;
  min-height: 44px;
}
#desk.at-bank .read-actions {
  gap: 16px;
}
#desk.at-bank .paper-turn {
  position: static;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  touch-action: pan-y pinch-zoom;
}
#desk.at-bank .paper-turn svg {
  width: 18px;
  height: 18px;
}
#desk.at-bank .reader-afterword {
  margin-top: 8px;
  gap: 16px;
  align-items: center;
}
#desk.at-bank #write-here {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
#desk.at-bank #write-here svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
#desk.at-bank .desk-head {
  gap: 16px;
  align-items: center;
}
#desk.at-bank #return,
#desk.at-bank #rest-here {
  color: #30382b;
  font:
    400 14px/1.5 Lora,
    serif;
  text-shadow: 0 1px 3px #f4eedf;
  padding: 6px 0;
}
#desk.at-bank #rest-here {
  margin-left: auto;
}
#desk.at-bank #safety-open {
  position: static;
  flex-shrink: 0;
  margin: 0 -12px 0 auto;
  background: none;
  width: 44px;
  padding: 12px;
  color: #575442;
}
#desk.at-bank #safety-open span {
  display: none;
}
#desk.at-bank #safety-open svg {
  width: 16px;
  height: 16px;
}
#desk.at-bank .offered-paper {
  pointer-events: none;
  z-index: 0;
}
.resting .header,
.resting .intro,
.resting .bank-footer {
  visibility: hidden;
  pointer-events: none;
}
.resting-invitation {
  position: fixed;
  inset: auto 0 0;
  padding: 36px 20px 24px;
  text-align: center;
  color: #fff8e9;
  background: linear-gradient(transparent, #1e241975);
  z-index: 6;
}
.resting-invitation p {
  margin: 0 0 6px;
  font:
    400 18px/1.5 Lora,
    serif;
}
.resting-invitation .quiet {
  color: inherit;
  font-size: 13px;
  min-height: 44px;
  text-shadow: 0 1px 3px #1e2419;
}
@media (max-width: 700px) {
  #desk.at-bank #return,
  #desk.at-bank #rest-here {
    font-size: 13px;
    gap: 7px;
  }
  #desk.at-bank #read-tools .quiet,
  #desk.at-bank #sharing .quiet {
    font-size: 14px;
  }
  #desk.at-bank .signature {
    margin-bottom: 8px;
  }
  .imprint-mark {
    width: 60px;
    height: 44px;
  }
  .paper-imprint {
    font-size: 14px;
  }
}

/* Paper choices are ink labels and pigment samples, not miniature UI cards. */
#desk.at-bank .paper-choices label {
  width: 50px;
  min-height: 52px;
}
#desk.at-bank .paper-choices .sample {
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
  min-height: 48px;
  background: none;
  filter: none;
  transform: none;
  font-size: 12px;
}
#desk.at-bank .paper-choices .sample::before {
  position: static;
  width: 12px;
  height: 12px;
  border: 1px solid #77735e;
  border-radius: 50%;
  background: #e9dfc6;
  opacity: 1;
  mix-blend-mode: normal;
}
#desk.at-bank .paper-choices .sample.lichen::before {
  background: #aeb79e;
}
#desk.at-bank .paper-choices .sample.mist::before {
  background: #b7c2c1;
}
#desk.at-bank .paper-choices .sample span {
  padding: 0;
}
#desk.at-bank .paper-choices input:checked + .sample::before {
  outline: 1px solid #424c36;
  outline-offset: 3px;
}
#desk.at-bank .paper-choices input:checked + .sample span::after {
  display: none;
}
#desk.at-bank .paper-choices input:focus-visible + .sample {
  outline: 2px solid #424c36;
  outline-offset: 2px;
}
#desk.at-bank #compose #review {
  font:
    400 14px/1.5 Lora,
    serif;
}
#desk.at-bank::before {
  height: 90px;
  background: linear-gradient(#eee8dfec, #eee8df00);
}
@media (max-width: 350px) {
  #desk.at-bank #compose {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #desk.at-bank #compose #review {
    grid-row: 2;
    grid-column: 1;
    justify-self: end;
  }
  #desk.at-bank .read-actions {
    gap: 8px;
    flex-wrap: wrap;
  }
}

/* The material is shared by the stone and the lifted sheet. Its real alpha edge
   replaces the fabricated contour; scene pixels remain the loading fallback. */
.lift-material-ready .scene-integrated .paper-face {
  isolation: isolate;
}
.lift-material-ready .scene-integrated .paper-face::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("/assets/hotori/quiet-bank-legible-sheet.webp") center / 100%
    100% no-repeat;
  opacity: 1;
  mix-blend-mode: normal;
}
.lift-material-ready #desk.shared-paper .scene-sheet-material {
  mask: none;
  overflow: hidden;
}
.lift-material-ready .scene-sheet-material > img {
  display: none;
}
.lift-material-ready .paper-closeup img.paper-detail {
  transform: none;
  filter: none;
  object-fit: fill;
}
.lift-material-ready .paper-scene-light {
  display: none;
}
.lift-material-ready #desk.at-bank .paper-closeup::after {
  mask: url("/assets/hotori/quiet-bank-legible-sheet.webp") center / 100% 100%
    no-repeat;
  opacity: 0.17;
}
#desk.at-bank[data-mode][data-stage] .held-paper {
  width: min(600px, 100%);
}
#desk.at-bank[data-mode][data-stage] .sheet-content {
  padding: 72px 70px 48px;
  min-height: 290px;
}
#desk.at-bank .signature {
  margin-bottom: 0;
}
#desk.at-bank .desk-foot {
  width: min(520px, calc(100% - 48px));
  margin: 8px 0 0;
  background: none;
  position: relative;
  z-index: 2;
  color: #fff7e7;
  text-shadow:
    0 1px 3px #162013,
    0 2px 8px #162013;
}
#desk.at-bank .desk-foot #read-tools {
  margin-top: 0;
}
#desk.at-bank .desk-foot #read-tools .quiet,
#desk.at-bank .desk-foot #safety-open,
#desk.at-bank .desk-foot #compose #review {
  color: #fff7e7;
  text-shadow: inherit;
}
#desk.at-bank .desk-foot .reader-afterword {
  margin-top: 2px;
}
#desk.at-bank .desk-foot .paper-choices .sample {
  color: #fff7e7;
}
#desk.at-bank .desk-foot .paper-choices input:checked + .sample::before,
#desk.at-bank .desk-foot .paper-choices input:focus-visible + .sample {
  outline-color: #fff7e7;
}
#desk.at-bank .held-paper {
  filter: drop-shadow(2px 3px 1px #40311f3b)
    drop-shadow(8px 18px 12px #2e301b3d);
}
#desk.at-bank .bend-copy {
  filter: none;
}
#desk.at-bank.paper-in-flight .desk-foot {
  visibility: hidden;
}
@media (max-width: 700px) {
  #desk.at-bank[data-mode][data-stage] .sheet-content {
    padding: 58px 44px 50px;
    min-height: 270px;
  }
  #desk.at-bank .desk-foot {
    width: calc(100% - 40px);
  }
  #desk.at-bank[data-mode][data-stage] .held-paper {
    margin-top: max(30px, calc(40svh - 58px));
  }
}
@media (max-height: 650px) {
  #desk.at-bank[data-mode][data-stage] .held-paper {
    margin-top: 24px;
  }
}

#desk.at-bank.shared-paper::before {
  display: block;
  inset: 0;
  height: auto;
  background: linear-gradient(transparent 56%, #18201748);
}
.lift-material-ready .paper-cast-shadow::before {
  mask-image: url("/assets/hotori/quiet-bank-legible-sheet.webp");
}

/* Download acknowledgement must not resize the sheet beneath the reader. */
#desk.at-bank #feedback[data-origin="download"]:not(.error) {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* The composing sheet needs more vertical room than a short received note. */
#desk.at-bank[data-mode="write"][data-stage] .held-paper {
  margin-top: max(24px, calc(39svh - 136px));
}
@media (max-width: 700px) {
  #desk.at-bank[data-mode="write"][data-stage] .held-paper {
    margin-top: max(24px, calc(40svh - 78px));
  }
}
@media (max-height: 650px) {
  #desk.at-bank[data-mode="write"][data-stage] .held-paper {
    margin-top: 24px;
  }
}
@media (min-width: 701px) {
  #desk.at-bank[data-mode="read"][data-stage] .held-paper {
    margin-top: max(24px, calc(39svh - 92px));
  }
}

/* The paper carries the person's words. Controls rest in the stream's shade,
   outside its transformed surface, with no separate panel or card. */
#desk.at-bank .desk-foot {
  display: block;
  width: min(520px, calc(100% - 36px));
  margin: 24px 0 0;
  padding: 8px 0 12px;
  color: #fff7e7;
  text-shadow: 0 1px 4px #152014;
}
#desk.at-bank .desk-foot::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: -36px -56px -40px;
  background: radial-gradient(
    ellipse,
    #172319e8 0%,
    #172319b8 48%,
    #17231900 73%
  );
}
#desk.at-bank #read-tools {
  display: block;
  margin: 0;
}
#desk.at-bank #read-tools .read-actions,
#desk.at-bank #read-tools .reader-afterword {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
#desk.at-bank #read-tools .reader-afterword {
  margin-top: 6px;
}
#desk.at-bank .desk-foot .quiet,
#desk.at-bank .desk-foot :is(#read-tools, #sharing) .quiet,
#desk.at-bank .desk-foot #compose #review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 4px;
  color: #fff7e7;
  background: none;
  border: 0;
  text-shadow: inherit;
  font:
    400 16px/1.4 Source,
    sans-serif;
}
#desk.at-bank .desk-foot #read-tools #safety-open {
  position: static;
  width: auto;
  height: auto;
  font-size: 14px;
}
#desk.at-bank .desk-foot #safety-open span {
  display: inline;
}
#desk.at-bank .desk-foot #safety-open svg {
  display: none;
}
#desk.at-bank .desk-foot svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}
#desk.at-bank .desk-foot .quiet:hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 5px;
}
#desk.at-bank .desk-foot .quiet:focus-visible {
  outline: 2px solid #fff7e7;
  outline-offset: 3px;
}
#desk.at-bank .desk-foot .quiet:disabled {
  opacity: 0.55;
}
#desk.at-bank .desk-foot #feedback {
  color: #fff7e7;
  font:
    400 14px/1.5 Source,
    sans-serif;
  text-align: left;
}
#desk.at-bank[data-mode] .desk-foot #feedback.error {
  background: none;
  color: #fff7e7;
  padding: 0;
  font-weight: 600;
}
#desk.at-bank .desk-foot #write-tools {
  margin-top: 0;
}
#desk.at-bank .desk-foot .consent {
  color: #fff7e7;
}
#desk.at-bank .desk-foot #publish-context {
  color: #fff7e7;
}
#desk.at-bank[data-mode][data-stage] .sheet-content {
  padding: 62px 62px 42px;
}
#desk.at-bank :is(#read-words, #draft-preview, #draft) {
  color: #282b24;
}
#desk.at-bank[data-mode="read"][data-stage] .held-paper {
  margin-top: max(24px, calc(31svh - 84px));
}
#desk.at-bank[data-mode="read"] {
  padding-bottom: 24px;
}
#safety {
  border-radius: 3px;
}
#safety h3 {
  margin: 0 0 16px;
}
#safety .quiet {
  color: #30392e;
  min-height: 44px;
  padding: 8px 12px;
  font:
    400 16px/1.4 Source,
    sans-serif;
}
#safety #hide-note {
  display: block;
  padding-left: 0;
}
#safety #report {
  padding-left: 0;
}
#safety #report-feedback:empty {
  display: none;
}
#safety #report-feedback {
  font-weight: 600;
}
#safety .quiet:focus-visible {
  outline: 2px solid #3b503c;
  outline-offset: 2px;
}
/* Match the sunlit left bank without laying silhouettes over the writing.
   Only the material is lit: the ink keeps a predictable dark value. */
.lift-material-ready #desk.at-bank .paper-closeup::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    #fff4d82e 0%,
    transparent 38%,
    transparent 68%,
    #5d49371c 100%
  );
  mask: url("/assets/hotori/quiet-bank-legible-sheet.webp") center / 100% 100%
    no-repeat;
}
.lift-material-ready .scene-integrated .paper-face::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    #fff4d82e 0%,
    transparent 38%,
    transparent 68%,
    #5d49371c 100%
  );
  mask: url("/assets/hotori/quiet-bank-legible-sheet.webp") center / 100% 100%
    no-repeat;
}
#desk.at-bank .held-paper {
  filter: drop-shadow(1px 2px 1px #4b392a30)
    drop-shadow(10px 18px 14px #30261730);
}
#desk.at-bank .bend-copy {
  filter: none;
}
/* The scene never takes on a modal scrim. The shade belongs beneath the paper. */
#desk.at-bank.shared-paper::before {
  background: none;
}
@media (min-width: 701px) {
  #desk.at-bank[data-mode="read"][data-stage] .sheet-content {
    padding-top: 56px;
    padding-bottom: 38px;
  }
  #desk.at-bank[data-mode="read"] :is(#read-words, .continuous-words) {
    min-height: 80px;
  }
}
@media (max-width: 700px) {
  #desk.at-bank[data-mode][data-stage] .sheet-content {
    padding: 48px 36px 38px;
  }
  #desk.at-bank[data-mode="read"][data-stage] .held-paper {
    margin-top: max(24px, calc(34svh - 64px));
  }
  #desk.at-bank :is(#read-tools, .reader-margin) {
    column-gap: 16px;
    row-gap: 6px;
    margin-top: 18px;
  }
  #desk.at-bank :is(#read-tools, .reader-margin) .quiet {
    font-size: 15px;
    gap: 8px;
  }
  #desk.at-bank :is(#read-tools, .reader-margin) #safety-open {
    font-size: 14px;
  }
  #desk.at-bank[data-mode="read"] #read-words {
    min-height: 90px;
    margin-bottom: 16px;
  }
}
@media (max-width: 350px) {
  #desk.at-bank[data-mode][data-stage] .sheet-content {
    padding: 44px 30px 34px;
  }
  #desk.at-bank :is(#read-tools, .reader-margin) {
    column-gap: 12px;
  }
}
@media (max-height: 650px) {
  #desk.at-bank[data-mode][data-stage] .held-paper {
    margin-top: 24px;
  }
}

/* A longer sheet also enlarges its uneven top edge. Reserve a safe ink area
   instead of letting the first line reach the transparent paper perimeter. */
#desk.at-bank[data-mode][data-stage] .sheet-content:has(.dense:not([hidden])) {
  padding-top: 84px;
}

@media (max-width: 400px) {
  #desk.at-bank #read-tools .read-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }
  #desk.at-bank .desk-foot #read-tools .read-actions .quiet {
    justify-content: flex-start;
    text-align: left;
    min-width: 0;
  }
  #desk.at-bank .desk-foot #read-tools .read-actions .quiet:last-child {
    justify-content: flex-end;
    text-align: right;
  }
}

/* Peeling a sheet from the near edge of the stack: the camera stays still,
   so the contact point cannot drift beneath the moving paper. */
.bank-near .scene {
  transform: none;
}
#desk.at-bank.shared-paper[data-mode][data-stage] #held-paper {
  width: min(480px, 100%);
  align-self: flex-start;
  margin-top: var(--contact-top, 120px);
  margin-left: calc(var(--contact-left, 28px) - 28px);
  filter: drop-shadow(1px 3px 2px #30251833);
}
#desk.at-bank.shared-paper .desk-foot {
  width: min(460px, calc(100% - 24px));
  align-self: flex-start;
  margin-left: max(0px, calc(var(--contact-center, 50%) - 258px));
  margin-top: 12px;
}
#desk.at-bank.shared-paper[data-mode][data-stage] .sheet-content {
  padding: 50px 44px 32px;
}
#desk.at-bank.shared-paper[data-mode="read"]
  :is(#read-words, .continuous-words) {
  font-size: 24px;
  min-height: 90px;
}
#desk.at-bank.shared-paper[data-mode="read"]
  :is(#read-words, .continuous-words).dense {
  font-size: 21px;
}
#desk.at-bank.shared-paper[data-mode][data-stage]
  .sheet-content:has(.dense:not([hidden])) {
  padding-top: 60px;
}
@media (max-width: 700px) {
  #desk.at-bank.shared-paper[data-mode][data-stage] #held-paper {
    margin-left: calc(var(--contact-left, 12px) - 12px);
  }
  #desk.at-bank.shared-paper .desk-foot {
    align-self: center;
    margin-left: 0;
  }
  #desk.at-bank.shared-paper[data-mode][data-stage] .sheet-content {
    padding: 48px 34px 32px;
  }
  #desk.at-bank.shared-paper[data-mode="read"]
    :is(#read-words, .continuous-words) {
    font-size: 23px;
  }
}

#desk.measuring-paper:not([open]) {
  display: flex;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
  align-items: center;
}

#desk.paper-in-flight .bend-copy .signature {
  visibility: visible;
}
/* Keep the scene still when focus or a long page scrolls the document. */
.scene {
  position: fixed;
  width: 100%;
  height: 100svh;
}

/* A supported, gently bowed sheet. The quiet ink shares the material's curve;
   generous dry margins stay clear of the irregular fibres at every width. */
#desk.paper-held #held-paper > .sheet-content,
#desk.paper-held #held-paper > .scene-sheet-material {
  visibility: visible;
  opacity: 0;
}
#desk.paper-held .bend-copy .sheet-content,
#desk.paper-held .bend-copy .signature {
  visibility: visible;
  opacity: 1;
}
#desk.paper-held .paper-band {
  will-change: auto;
}
#desk.paper-held #held-paper:has(#read-words:focus-visible) {
  outline: 2px solid #394437;
  outline-offset: 6px;
}
#desk.at-bank.shared-paper[data-mode][data-stage] .sheet-content {
  padding: 60px 58px 42px;
}
#desk.at-bank.shared-paper[data-mode][data-stage]
  .sheet-content:has(.dense:not([hidden])) {
  padding-top: 70px;
}
#desk.at-bank.shared-paper[data-mode="read"]
  :is(#read-words, .continuous-words) {
  color: #39382c;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-shadow: none;
}
:is(#read-words, .continuous-words, #top-words) {
  mix-blend-mode: multiply;
  filter: url("#paper-ink");
}
.paper-imprint {
  color: #30392b;
  filter: none;
  mix-blend-mode: multiply;
  transform: none;
  font-weight: 600;
}
#desk.at-bank .desk-foot::before {
  inset: -14px -32px -24px;
  background: radial-gradient(
    ellipse,
    #142015ed 0%,
    #142015d9 55%,
    #14201500 76%
  );
}
#desk.at-bank .desk-foot .quiet,
#desk.at-bank .desk-foot :is(#read-tools, #sharing) .quiet {
  color: #fffbed;
  font-weight: 500;
  text-shadow: 0 1px 2px #101a10;
}
#desk.at-bank .desk-foot #safety-open svg {
  display: block;
  width: 19px;
  height: 19px;
}
@media (max-width: 700px) {
  #desk.at-bank.shared-paper[data-mode][data-stage] .sheet-content {
    padding: 56px clamp(38px, 11vw, 54px) 38px;
  }
  #desk.at-bank.shared-paper[data-mode="read"]
    :is(#read-words, .continuous-words) {
    font-size: clamp(20px, 5.6vw, 23px);
  }
  #desk.at-bank.shared-paper[data-mode="read"]
    :is(#read-words, .continuous-words).dense {
    font-size: clamp(18px, 5vw, 21px);
  }
  #desk.at-bank .desk-foot #read-tools .reader-afterword {
    gap: 8px;
  }
}

/* Outgoing browse/write copies retain the curved visual without doubling ink. */
.bowed-copy > .sheet-content,
.bowed-copy > .scene-sheet-material {
  opacity: 0;
}
.bowed-copy .bend-copy .sheet-content {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 700px) {
  #desk.at-bank .desk-foot :is(#read-tools, #sharing) .quiet {
    font-size: 15px;
    gap: 7px;
    padding-inline: 0;
  }
}

/* The resting sheet belongs to the photograph. Only its ink is overlaid. */
.lift-material-ready .scene-integrated #top-paper::before,
.lift-material-ready .scene-integrated #top-paper::after {
  display: none;
}
.lift-material-ready .scene-integrated #top-paper {
  isolation: auto;
}

/* Two invitations at the near bank; practical messages have their own row. */
.intro {
  max-width: 320px;
}
.intro h1 {
  font-size: clamp(26px, 2.7vw, 36px);
  line-height: 1.25;
  margin-bottom: 16px;
}
.intro p {
  font:
    400 17px/1.5 Source,
    sans-serif;
  color: #36362b;
}
.header #about-open {
  max-width: 175px;
  min-height: 44px;
  padding: 8px 0;
  font:
    400 15px/1.4 Source,
    sans-serif;
  text-align: right;
  color: #302e27;
  text-decoration: underline;
  text-decoration-color: #302e2766;
  text-underline-offset: 5px;
}
.bank-footer {
  top: calc(var(--stack-front, 68svh) + 54px);
  bottom: auto;
  left: clamp(232px, var(--stack-center, 50%), calc(100% - 232px));
  right: auto;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding-bottom: 24px;
}
.bank-footer::before {
  inset: -20px -32px -8px;
  background: radial-gradient(
    ellipse at 50% 30%,
    #152016eb 0%,
    #152016b8 48%,
    #15201600 75%
  );
}
.bank-footer .browse {
  display: none;
}
.bank-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.bank-footer .bank-actions .quiet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 0;
  color: #fffbed;
  font:
    500 16px/1.4 Source,
    sans-serif;
}
.bank-actions svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.7;
}
.bank-footer .quiet:focus-visible,
.bank-footer summary:focus-visible {
  outline-color: #fffbed;
}
.bank-updates {
  text-align: center;
}
.bank-updates:not(:has(> :not([hidden]))) {
  display: none;
}
.bank-updates .quiet,
.bank-updates summary {
  font-size: 15px;
}
.bank-updates summary {
  cursor: pointer;
  padding: 10px;
}
#own-thought p {
  background: none;
  font-size: 15px;
  line-height: 1.5;
}
.bank-notice {
  display: grid;
  grid-template-columns: 1fr 44px;
  align-items: start;
  gap: 8px;
  padding: 4px 4px 4px 16px;
  background: #eee6d5;
  color: #302e27;
  border-radius: 2px;
  text-align: left;
  box-shadow: 0 5px 16px #16201426;
}
.bank-footer .bank-notice #room-status:not(:empty) {
  order: initial;
  margin: 0;
  padding: 10px 0;
  background: none;
  text-align: left;
  font:
    400 15px/1.5 Source,
    sans-serif;
}
#notice-dismiss {
  min-height: 44px;
  color: #302e27;
  background: none;
  border: 0;
}
#notice-dismiss:focus-visible {
  outline-color: #42523d;
  outline-offset: -3px;
}

::selection {
  background: #56654a;
  color: #fffbed;
}
@media (max-width: 700px) {
  .intro {
    top: 108px;
    left: 24px;
    max-width: 225px;
  }
  .intro h1 {
    font-size: 27px;
    margin-bottom: 12px;
  }
  .intro p {
    font-size: 16px;
  }
  .header #about-open {
    max-width: 128px;
    font-size: 14px;
  }
  .bank-footer {
    left: 50%;
    width: calc(100% - 32px);
    top: calc(var(--stack-front, 68svh) + 48px);
  }
  .bank-actions {
    gap: 16px;
  }
  .bank-footer .bank-actions .quiet {
    font-size: 15px;
    gap: 8px;
  }
}
@media (max-width: 350px) {
  .header {
    padding-inline: 18px;
  }
  .header #about-open {
    max-width: 115px;
  }
  .intro {
    left: 20px;
    top: 100px;
    max-width: 190px;
  }
  .intro h1 {
    font-size: 25px;
  }
  .intro p {
    font-size: 15px;
  }
  .bank-footer .bank-actions .quiet {
    flex-direction: column;
    gap: 5px;
  }
}

.intro {
  isolation: isolate;
}
.intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: -26px -34px;
  background: radial-gradient(
    ellipse,
    #efe5d3e0 25%,
    #efe5d3b3 52%,
    #efe5d300 76%
  );
}
.intro p {
  width: auto;
  max-width: none;
}
@media (max-width: 700px) {
  .intro p {
    max-width: 195px;
  }
}
/* The optional welcome owns the foreground while open. Do not leave faded,
   low-contrast controls or lettering underneath its reading light. */

/* Optional ownership details need an opaque reading surface over the water. */
.bank-updates #own-thought[open] {
  padding: 4px 16px 12px;
  background: #eee6d5;
  color: #302e27;
  text-align: left;
}
.bank-updates #own-thought[open] p {
  padding: 2px 0 8px;
}
.bank-footer #own-thought[open] .quiet {
  color: #302e27;
  text-shadow: none;
  padding: 10px 0;
}
.bank-footer #own-thought[open] :focus-visible {
  outline-color: #42523d;
}
.bank-actions:has(#read-open[hidden]) {
  grid-template-columns: 1fr;
}
#space-title,
#space-invitation {
  white-space: pre-line;
}

/* Small, individually grounded controls leave the canopy visible. */
#desk.at-bank .desk-head {
  position: relative;
  width: min(480px, 100%);
}
#desk.at-bank .desk-head::before {
  content: none;
}
.header #about-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #8d897a55;
  border-radius: 24px;
  color: #30352a;
  background: #eee7d8;
  box-shadow: 0 2px 5px #202a1b18;
  font:
    500 14px/1.4 Source,
    sans-serif;
  text-shadow: none;
  text-decoration: none;
}
.header #about-open svg,
#desk.at-bank[data-mode] :is(#return, #rest-here) svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.header #about-open:hover {
  background: #f7f0e4;
}
.header #about-open:focus-visible,
#desk.at-bank[data-mode] :is(#return, #rest-here):focus-visible {
  outline: 2px solid #30352a;
  outline-offset: 3px;
}
#desk.at-bank .signature,
.resting-signature {
  font:
    500 15px/1.4 Source,
    sans-serif;
  color: #34392e;
}
.paper-imprint {
  font-size: 17px;
}
.resting-invitation {
  background: linear-gradient(transparent, #172019f5 32%);
}
.resting-invitation .quiet {
  font-size: 15px;
  text-shadow: none;
}
@media (max-width: 700px) {
  #desk.at-bank .desk-head {
    gap: 8px;
  }
  #desk.at-bank .signature,
  .resting-signature {
    font-size: 14px;
  }
  .paper-imprint {
    font-size: 16px;
  }
}

/* A separate cast shadow avoids rasterizing the entire sheet, including small
   ink, into a low-resolution filtered layer. Lighting lives in the material. */
#desk.at-bank.shared-paper[data-mode][data-stage] #held-paper {
  filter: none;
}

/* Draft metadata has its own two-line margin; it must not compete with the
   stamp for a single row on a narrow sheet. */
#desk.at-bank[data-mode="write"] .signature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "source mark" "count mark";
  gap: 2px 16px;
}
#desk[data-mode="write"] #source {
  grid-area: source;
  align-self: end;
}
#desk[data-mode="write"] #count {
  grid-area: count;
  align-self: start;
  white-space: nowrap;
}
#desk[data-mode="write"] .paper-imprint {
  grid-area: mark;
}

/* A contained welcome: the visitor keeps their place in the landscape. */
dialog#about {
  inset: 0;
  margin: auto;
  width: min(440px, calc(100% - 40px));
  max-width: none;
  max-height: calc(100svh - 48px);
  box-sizing: border-box;
  padding: 32px 36px 34px;
  border: 1px solid #d6cfbc;
  border-radius: 18px;
  background:
    linear-gradient(#eee7d8de, #eee7d8de),
    url("/assets/hotori/quiet-bank-legible-sheet.webp") center / 240% 220%,
    #eee7d8;
  color: #30352a;
  box-shadow: 0 16px 64px #16201445;
  overflow-y: auto;
  scrollbar-gutter: auto;
  font:
    400 16px/1.6 Source,
    sans-serif;
}
dialog#about::backdrop {
  background: #14201655;
}
dialog#about #about-close {
  position: static;
  float: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin: 0 -12px 0 0;
  border: 0;
  border-radius: 50%;
  color: #30352a;
  background: #eee7d8;
}
dialog#about #about-close:hover {
  background: #d9d2c1;
}
dialog#about svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
dialog#about .welcome-mark {
  display: block;
  width: 64px;
  height: 47px;
  object-fit: contain;
  /* The asset's transparent left/top margins are not its visible ink edge. */
  margin: 0 0 0 -8px;
  transform: translateY(3px);
}
dialog#about h2 {
  clear: none;
  padding: 0;
  margin: 0 0 14px;
  font:
    500 40px/1.1 Caveat,
    cursive;
}
dialog#about > p {
  display: block;
  margin: 0 0 20px;
}
dialog#about :is(.welcome-copy, .welcome-permission) {
  font:
    400 17px/1.6 Source,
    sans-serif;
}
dialog#about .welcome-permission {
  margin-bottom: 4px;
}
dialog#about summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 0;
  box-sizing: border-box;
  list-style: none;
  font:
    500 15px/1.4 Source,
    sans-serif;
}
dialog#about summary::-webkit-details-marker {
  display: none;
}
dialog#about summary svg {
  flex: 0 0 20px;
}
dialog#about details[open] > summary svg {
  transform: rotate(90deg);
}
dialog#about details p {
  font:
    400 15px/1.6 Source,
    sans-serif;
  margin: 0 0 16px;
}
dialog#about .preview-details {
  margin: 24px 0 0;
  border-top: 1px solid #b8b2a1;
}
dialog#about :focus-visible {
  outline: 2px solid #42523d;
  outline-offset: 3px;
}
@media (max-width: 480px) {
  dialog#about {
    width: calc(100% - 32px);
    padding: 28px 24px;
  }
  dialog#about h2 {
    font-size: 37px;
  }
  dialog#about .welcome-copy,
  dialog#about .welcome-permission {
    font-size: 17px;
  }
}

dialog#about #simulation-controls label {
  display: grid;
  gap: 8px;
}
dialog#about select {
  width: 100%;
  padding: 8px;
  color: #30352a;
  background: #f7f0e4;
}

dialog#about .welcome-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  margin: 0 0 24px;
  background: transparent;
}
dialog#about:has(#preview-notes:not([hidden])) .welcome-top {
  background: #eee7d8;
  box-shadow: 0 -28px 0 #eee7d8;
}

/* Paper tabs attach to the viewport edge. The grain and dry ink echo the
   thought without placing another rounded interface surface in the garden. */
#desk.at-bank .desk-head {
  height: 66px;
  align-items: flex-start;
}
#desk.at-bank[data-mode] :is(#return, #rest-here) {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  width: 76px;
  height: 88px;
  min-height: 44px;
  padding: 18px 8px 15px;
  margin-top: -22px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #30352a;
  text-shadow: none;
  text-decoration: none;
  font:
    500 14px/1.25 Source,
    sans-serif;
}
#desk.at-bank[data-mode] :is(#return, #rest-here)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(#eee7d8aa, #eee7d8aa),
    url("/assets/hotori/quiet-bank-legible-sheet.webp") center / 300% 150%,
    #eee7d8;
  clip-path: polygon(
    0 0,
    100% 0,
    100% 95%,
    86% 96%,
    70% 95%,
    54% 98%,
    38% 96%,
    22% 97%,
    0 95%
  );
  pointer-events: none;
}
#desk.at-bank[data-mode] :is(#return, #rest-here):hover::before {
  background-color: #fff8e8;
}
#desk.at-bank[data-mode] :is(#return, #rest-here):focus-visible {
  outline: 2px solid #30352a;
  outline-offset: -5px;
}
#desk.at-bank[data-mode] :is(#return, #rest-here) svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}
dialog#about #about-close {
  background: transparent;
  border-radius: 10px;
}
dialog#about > p:last-of-type {
  margin-bottom: 4px;
}
@media (max-width: 700px) {
  #desk.at-bank .desk-head {
    height: 64px;
  }
  #desk.at-bank[data-mode] :is(#return, #rest-here) {
    margin-top: -12px;
    width: 70px;
    height: 76px;
    padding-top: 10px;
    padding-bottom: 12px;
    gap: 5px;
  }
}

#desk.at-bank[data-mode] :is(#return, #rest-here):hover span {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* The words get the sheet; practical guidance stays in the shade below it. */
#desk.at-bank[data-mode="write"] .sheet-content textarea {
  min-height: 180px;
  max-height: none;
  overflow-y: hidden;
  font-size: 22px;
  line-height: 1.55;
}
#desk.at-bank #compose .writing-guidance {
  grid-column: 1 / -1;
}
#desk.at-bank
  .desk-foot
  :is(#draft-help, #draft-privacy, #sharing-privacy, #keep-help) {
  color: #fff7e7;
  font:
    400 15px/1.5 Source,
    sans-serif;
  text-align: left;
  margin: 0 0 12px;
}
#desk.at-bank .desk-foot #draft-privacy {
  margin-top: 8px;
}
#desk.at-bank .desk-foot #keep-help {
  margin: 0 4px 8px;
  font-size: 14px;
}
#desk.at-bank .desk-foot #sharing-privacy {
  margin-bottom: 16px;
}
@media (max-width: 700px) {
  #desk.at-bank[data-mode="write"] .sheet-content textarea {
    font-size: 20px;
    min-height: 186px;
  }
}

/* Long sheets belong to the bank even when the reader scrolls. The dark
   continuation is the water's shade, keeping the afterword legible below it. */
html:has(body.desk-open) {
  background: #17231d;
}
body.desk-open .scene {
  transform: translateY(var(--bank-scroll, 0px));
  transition: none;
  mask-image: linear-gradient(#000 0 78%, transparent 100%);
}
#desk .paper-cast-shadow {
  position: absolute;
}
#desk {
  overflow-anchor: none;
}
body.desk-open #empty {
  display: none;
}
body.empty-bank .bank-footer {
  top: min(calc(var(--stack-front, 64svh) + 28px), calc(100svh - 150px));
}

/* A readable glimpse, printed in the same shallow plane as the resting sheet. */
.scene-integrated #top-words,
.lift-opening .resting-opening {
  position: absolute;
  left: 62px;
  top: 28px;
  width: 460px;
  margin: 0;
  padding: 0;
  display: block;
  font:
    500 48px/1.24 Lora,
    serif;
  color: #24251e;
  text-align: left;
  white-space: pre-line;
  overflow-wrap: anywhere;
  filter: none;
  mix-blend-mode: multiply;
  -webkit-line-clamp: unset;
  overflow: visible;
  height: auto;
  padding-bottom: 8px;
}
.scene-integrated .resting-signature,
.lift-opening .resting-signature {
  position: absolute;
  left: 474px;
  top: 153px;
  width: 76px;
  height: 62px;
  margin: 0;
}
.resting-signature .imprint-mark {
  width: 76px;
  height: 62px;
}
.lift-opening {
  position: absolute;
  inset: 0 auto auto 0;
  width: 600px;
  height: 240px;
  transform-origin: 0 0;
  pointer-events: none;
  z-index: 4;
}

/* One set of light ink controls in the shade of the near bank. The paper
   stays the only paper object; browsing leads without a separate card/button. */
#desk.at-bank
  .desk-foot
  #read-tools
  :is(#another, #keep, #write-here, #safety-open) {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff9e9;
  text-shadow: 0 1px 3px #101b17;
  padding: 10px 6px;
  min-height: 46px;
  font-weight: 500;
  gap: 9px;
  justify-content: center;
}
#desk.at-bank .desk-foot #read-tools #another {
  font-weight: 600;
}
#desk.at-bank .desk-foot #read-tools .quiet:focus-visible {
  outline: 2px solid #fff9e9;
  outline-offset: 3px;
}
#desk.at-bank .desk-foot #read-tools .quiet:hover:not(:disabled) {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 6px;
}
#desk.at-bank .desk-foot #read-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  column-gap: 24px;
  row-gap: 4px;
}
#desk.at-bank .desk-foot #read-tools :is(.read-actions, .reader-afterword) {
  display: contents;
}
#desk.at-bank
  .desk-foot
  #read-tools
  :is(#another, #keep, #write-here, #safety-open) {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  justify-content: initial;
  text-align: left;
  padding: 10px 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}
#desk.at-bank
  .desk-foot
  #read-tools
  :is(#another, #keep, #write-here, #safety-open)
  svg {
  display: block;
  width: 21px;
  height: 21px;
  margin: 0;
}
#desk.at-bank .desk-foot #keep-help {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#desk.at-bank .desk-foot::before {
  inset: -20px -36px -24px;
  background: radial-gradient(
    ellipse,
    #142015f5 0%,
    #142015e8 55%,
    #14201500 78%
  );
}
#desk.paper-exchanging #another svg {
  transform: rotate(-8deg);
}
@media (max-width: 400px) {
  #desk.at-bank #read-tools :is(.read-actions, .reader-afterword) {
    gap: 4px;
  }
  #desk.at-bank
    .desk-foot
    #read-tools
    :is(#another, #keep, #write-here, #safety-open) {
    padding-inline: 2px;
    gap: 6px;
    font-size: 14px;
  }
}

/* Browsing is still reading: keep the navigation anchored while a sheet turns. */
#desk.at-bank.paper-exchanging :is(.desk-head, .desk-foot) {
  visibility: visible;
  opacity: 1;
}

#desk.at-bank.deck-tucking #held-paper {
  z-index: 3;
}
#desk .deck-occluder {
  position: fixed;
  z-index: 4;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  max-width: none;
}
#desk.at-bank.paper-exchanging :is(.desk-head, .desk-foot) {
  z-index: 5;
}
@media (max-width: 400px) {
  #desk.at-bank .desk-foot #read-tools {
    column-gap: 12px;
  }
  #desk.at-bank
    .desk-foot
    #read-tools
    :is(#another, #keep, #write-here, #safety-open) {
    padding-inline: 0;
    font-size: 14px;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 6px;
  }
}

/* The projected sheet ends at 94% of its layout height. Recover that empty
   layout space so the practical actions sit beside the paper's visible edge. */
#desk.at-bank.shared-paper[data-mode="write"] .desk-foot {
  margin-top: calc(12px - var(--paper-flow-correction, 0px));
}
#desk.at-bank .desk-foot #sharing {
  margin-top: 0;
  padding-top: 0;
}

/* A quiet stopping point after reading, without pinning controls over ink. */
#desk.at-bank .desk-foot #read-tools #rest-after {
  display: none;
}
@media (max-width: 700px) {
  #desk.at-bank .desk-foot #read-tools #rest-after {
    display: inline-flex;
    grid-column: 1 / -1;
    justify-self: center;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-top: 12px;
    padding: 8px 16px;
    background: none;
    border: 0;
    border-radius: 0;
    color: #fff9e9;
    text-shadow: 0 1px 3px #101b17;
    font-size: 15px;
    font-weight: 500;
  }
  #desk.at-bank .desk-foot #read-tools #rest-after svg {
    width: 22px;
    height: 22px;
  }
}

/* Two sheets share one quiet handoff. The current HTML is the only accessible
   thought; the outgoing visual copy passes behind it before reaching the deck. */
#desk.at-bank.paper-handoff #held-paper {
  z-index: 3;
}
#desk.at-bank.paper-handoff .exchange-departing {
  position: absolute !important;
  transform-origin: 0 0;
  z-index: 4;
  margin: 0;
  pointer-events: none;
}
/* While the bank returns to the next opening line, keep the exit targets
   still. Once reading resumes the tabs scroll normally and cannot cover ink. */
#desk.at-bank.paper-exchanging .desk-head {
  position: sticky;
  top: 0;
  z-index: 8;
}

#desk.at-bank #rest-after.motion-rest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 0;
  background: none;
  color: #fff9e9;
  text-shadow: 0 1px 3px #101b17;
  font:
    500 15px Source,
    sans-serif;
}
#desk.at-bank #rest-after.motion-rest svg {
  width: 22px;
  height: 22px;
}

/* A quiet, explicit exit belongs to the garden header rather than the paper. */
.header .garden-return {
  margin-left: auto;
  margin-right: clamp(16px, 3vw, 36px);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #302e27;
  font:
    400 16px/1.3 Source,
    sans-serif;
  text-underline-offset: 5px;
}
.header .garden-return:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}
@media (max-width: 420px) {
  .header .garden-return {
    font-size: 14px;
    margin-right: 16px;
  }
}
