/* Keep practical actions in dark ink on a softly lit part of the near stone.
   The wash has no panel edge and uses the same light as the place title. */
.bank-footer::before,
body.empty-bank .bank-footer::before,
#desk.at-bank .desk-foot::before,
#desk.at-bank[data-mode="read"] .desk-foot::before {
  background: radial-gradient(
    ellipse closest-side,
    #e8e3d9f5 0%,
    #e8e3d9ed 48%,
    #e8e3d980 78%,
    #e8e3d900 100%
  );
  mix-blend-mode: normal;
  inset: -28px -50px;
  height: auto;
}
.bank-footer :is(#read-open, #write, #sit-here, #empty, .bank-updates),
.bank-footer .bank-updates :is(.quiet, summary),
#desk.at-bank
  .desk-foot
  #read-tools
  :is(#another, #write-here, #safety-open, #sit-from-reading) {
  color: #303b34;
  text-shadow: none;
}
.bank-footer :is(#read-open, #write, #sit-here):focus-visible,
#desk.at-bank .desk-foot #read-tools .quiet:focus-visible {
  outline-color: #303b34;
  box-shadow: none;
}
/* The wash belongs to the projected controls. Before the scene has an anchor,
   drawing it at the footer's fallback position flashes light at the page edge. */
body:not(.scene-integrated):not(.scene-failed) .bank-footer::before {
  content: none;
}
/* The complete bank fits beside a quiet reading margin on shallow laptops.
   Use the source aspect ratio so Haru and the paper share unchanged geometry. */
@media (min-width: 901px) and (max-height: 720px) and (min-aspect-ratio: 9/5) {
  :root {
    background-color: #e8e3d9;
  }
  body {
    background: transparent;
  }
  .scene {
    inset: 0 0 auto auto;
    width: calc(100svh * 1.5);
    height: 100svh;
    min-height: 0;
    object-fit: contain;
    mask-image:
      linear-gradient(90deg, transparent, #000 16%),
      linear-gradient(#000 85%, transparent);
    mask-composite: intersect;
  }
  .intro.hotori-intro {
    left: 5.5vw;
    top: 24svh;
    transform: none;
    max-width: min(270px, 26vw);
  }
  .intro.hotori-intro::before {
    content: none;
  }
  .bank-footer,
  body.empty-bank .bank-footer {
    left: 5.5vw;
    top: max(330px, 55svh);
    width: min(290px, 29vw);
    transform: none;
  }
  .bank-footer::before {
    content: none;
  }
  .bank-footer
    :is(#read-open, #write, #sit-here, .quiet, summary, #empty, .bank-updates) {
    color: #303b34;
    text-shadow: none;
  }
  .bank-footer :is(#read-open, #write, #sit-here):focus-visible {
    outline-color: #303b34;
    box-shadow: none;
  }
  body.desk-open .scene {
    mask-image:
      linear-gradient(90deg, transparent, #000 16%),
      linear-gradient(#000 85%, transparent);
    mask-composite: intersect;
  }
  #desk.at-bank.shared-paper[data-mode="read"] .desk-foot {
    margin-top: 0;
    margin-left: max(0px, calc(var(--contact-center, 50%) - 208px));
  }

  #desk.at-bank
    .desk-foot
    #read-tools
    :is(
      #another,
      #keep,
      #write-here,
      #safety-open,
      #rest-after,
      #sit-from-reading
    ),
  #desk.at-bank
    .desk-foot
    :is(#draft-help, #draft-privacy, #sharing-privacy, #keep-help) {
    color: #303b34;
    text-shadow: none;
  }
  #desk.at-bank .desk-foot #read-tools .quiet:focus-visible {
    outline-color: #303b34;
  }
  html:has(body.desk-open) {
    background: #e8e3d9;
  }
}

@media (min-width: 901px) and (max-height: 720px) and (min-aspect-ratio: 9/5) {
  #desk.at-bank[data-mode][data-stage="review"] {
    --review-start: 94px;
    --review-left: 5.5vw;
    --review-width: min(560px, 44vw);
    background: #e8e3d9;
  }
  #desk[data-stage="review"] .review-place {
    left: auto;
    right: 0;
    width: calc(100svh * 1.5);
    mask-image:
      linear-gradient(90deg, transparent, #000 20%),
      linear-gradient(#000 85%, transparent);
    mask-composite: intersect;
  }
  #desk.review-scene-ready[data-stage="review"] #edit {
    color: #303b34;
    text-shadow: none;
  }
}
