/* Read-back has its own near-bank composition. The scenic plate contains no
   paper or interface: the same accessible draft stays on a responsive sheet. */
.review-place {
  display: none;
}
#desk.at-bank[data-mode][data-stage="review"] {
  --review-width: min(560px, calc(100% - 40px));
  --review-left: 5vw;
  --review-start: max(300px, 25.5vw);
  padding: 0 0 48px;
  background: #e0d2bc;
  color: #202119;
  text-shadow: none;
}
#desk[data-stage="review"] .review-place {
  display: block;
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  pointer-events: none;
  z-index: -1;
  mask-image: linear-gradient(#000 92%, transparent);
}
/* Broad illumination belongs to the scenery, not a rectangle around buttons.
   The lower stone has a bounded pale light floor; the top-left foliage has
   garden shade so Edit is readable without a separate badge. */
#desk[data-stage="review"] .review-place::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent 42%, #f5ecda40 64%, #f5ecda60 100%),
    radial-gradient(
      ellipse 150px 100px at 55px 38px,
      #132016d9 0%,
      #132016b3 38%,
      #13201600 100%
    );
}
.review-place img {
  display: block;
  width: 100%;
  height: auto;
}
#desk.at-bank[data-mode][data-stage="review"] .desk-head {
  position: absolute;
  top: 20px;
  left: 24px;
  margin: 0;
  width: auto;
  padding: 0;
  height: auto;
  background: none;
}
#desk[data-stage="review"] #edit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* The plain ivory fallback must also be readable before/without the scene. */
  color: #202119;
  text-shadow: none;
  font:
    400 17px/1.4 Source,
    sans-serif;
  min-height: 44px;
  padding: 8px;
}
#desk.review-scene-ready[data-stage="review"] #edit {
  color: #fffdf4;
  text-shadow: 0 1px 4px #142119;
}
#desk[data-stage="review"] #edit svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
#desk.at-bank.shared-paper[data-mode][data-stage="review"] #held-paper {
  width: var(--review-width);
  min-height: 0;
  margin: var(--review-start) 0 0 var(--review-left);
  transform: none;
  filter: none;
}
#desk[data-stage="review"]
  :is(.scene-sheet-material, .paper-cast-shadow, .paper-bend) {
  display: none;
}
#desk.at-bank.shared-paper[data-mode][data-stage="review"] .sheet-material {
  display: block;
  visibility: visible;
  opacity: 1;
  /* Nine-slice the actual paper edge: long private drafts must grow without
     stretching its deckle into vertical fringe. The centre remains textured. */
  background: none;
  border: 24px solid transparent;
  border-image: url("/assets/hotori/review-ivory-sheet.webp") 64 fill / 24px / 0
    stretch;
  box-sizing: border-box;
  clip-path: none;
  mask: none;
  transform: none;
  filter: drop-shadow(0 3px 2px #40321e55) drop-shadow(0 9px 8px #40321e22);
}
#desk.at-bank.shared-paper[data-mode][data-stage="review"] .sheet-content,
#desk.at-bank.shared-paper[data-mode][data-stage="review"]
  .sheet-content:has(.dense:not([hidden])) {
  padding: var(--review-safe-top, 48px) 52px var(--review-safe-bottom, 30px);
  min-height: 260px;
  visibility: visible;
  opacity: 1;
  transform: none;
}
#desk.at-bank[data-mode][data-stage="review"] #draft-preview,
#desk.at-bank[data-mode][data-stage="review"] #draft-preview.dense {
  font:
    400 22px/1.5 Lora,
    serif;
  color: #292820;
  text-align: left;
  margin: 0;
  min-height: 0;
  padding: 0;
  overflow-wrap: anywhere;
  text-shadow: none;
  filter: none;
}
#desk.at-bank[data-stage="review"] .signature {
  margin: 20px 0 0;
  min-height: 0;
  justify-content: flex-end;
}
#desk.at-bank[data-stage="review"] .paper-imprint {
  font-size: 10px;
  gap: 0;
  opacity: 0.78;
}
#desk.at-bank[data-stage="review"] .imprint-mark {
  width: 30px;
  height: 25px;
}
#desk.at-bank[data-mode][data-stage="review"] .desk-foot {
  width: var(--review-width);
  margin: 8px 0 0 var(--review-left);
  padding: 0 16px;
  box-sizing: border-box;
  background: none;
  text-shadow: none;
  color: #202119;
}
#desk.at-bank[data-stage="review"] .desk-foot::before,
#desk.at-bank[data-stage="review"] #share-choice::before {
  content: none;
}
#desk.at-bank[data-stage="review"] #sharing {
  margin: 0;
  padding: 0;
}
#desk.at-bank[data-stage="review"] #share-choice {
  position: static;
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  color: inherit;
}
#desk.at-bank[data-stage="review"] .desk-foot #sharing-privacy {
  font:
    400 16px/1.4 Source,
    sans-serif;
  color: #202119;
  text-shadow: none;
  text-align: center;
  margin: 0 0 10px;
}
#sharing-privacy > span {
  display: block;
}
#desk.at-bank[data-stage="review"] #sharing-availability {
  margin: 0 0 12px;
  color: #303b34;
  text-align: center;
  font:
    400 16px/1.4 Source,
    sans-serif;
}
#desk.at-bank[data-stage="review"] #share-choice #leave:disabled {
  color: #686052;
  opacity: 1;
}
#desk.at-bank[data-stage="review"] #share-choice #sharing-info {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  margin: -10px -6px -10px 0;
  color: #202119;
  border: 0;
  background: none;
}
#desk.at-bank[data-stage="review"] #share-choice .read-actions {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
}
#desk.at-bank[data-stage="review"] #share-choice :is(#keep-private, #leave) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 2px;
  font:
    400 17px/1.4 Source,
    sans-serif;
  color: #202119;
  text-shadow: none;
  border: 0;
  border-radius: 0;
  background: none;
}
#desk.at-bank[data-stage="review"] #sharing svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#desk.at-bank[data-stage="review"] #sharing button:hover span {
  text-decoration: underline;
  text-underline-offset: 4px;
}
#desk.at-bank[data-stage="review"] #sharing :focus-visible {
  outline: 2px solid #202119;
  outline-offset: 3px;
}
#desk.at-bank[data-stage="review"] #share-choice #feedback:not(:empty) {
  color: #202119;
  font:
    400 16px/1.5 Source,
    sans-serif;
  margin: 12px 0 0;
  padding: 14px 16px;
  background: #f7f1e6f5;
  border-radius: 8px;
  text-shadow: none;
}
#sharing-details {
  width: min(390px, calc(100% - 40px));
  box-sizing: border-box;
  border: 0;
  border-radius: 18px;
  padding: 28px;
  background: #f5f0e5;
  color: #292c23;
  box-shadow: 0 12px 44px #17201733;
}
#sharing-details::backdrop {
  background: #17201755;
}
#sharing-details h2 {
  font:
    400 24px/1.3 Lora,
    serif;
  margin: 22px 0 18px;
}
#sharing-details p {
  font:
    400 17px/1.5 Source,
    sans-serif;
  margin: 0 0 16px;
}
#sharing-details #publish-context {
  font-size: 14px;
  color: #52564b;
  margin-bottom: 0;
}
#sharing-close {
  display: flex;
  margin: -16px -16px 0 auto;
  width: 44px;
  height: 44px;
  padding: 10px;
  align-items: center;
  justify-content: center;
}
#sharing-close svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.7;
}
@media (max-width: 900px) and (max-aspect-ratio: 6/5) {
  #desk.at-bank[data-mode][data-stage="review"] {
    --review-width: calc(100% - 24px);
    --review-left: 12px;
    --review-start: 94vw;
    min-height: 100svh;
    padding-bottom: max(40px, env(safe-area-inset-bottom));
  }
  #desk.at-bank.shared-paper[data-mode][data-stage="review"] .sheet-content,
  #desk.at-bank.shared-paper[data-mode][data-stage="review"]
    .sheet-content:has(.dense:not([hidden])) {
    padding: var(--review-safe-top, 48px) 38px var(--review-safe-bottom, 30px);
    min-height: 230px;
  }
  #desk.at-bank[data-mode][data-stage="review"] #draft-preview,
  #desk.at-bank[data-mode][data-stage="review"] #draft-preview.dense {
    font-size: 20px;
    line-height: 1.45;
  }
  #desk.at-bank[data-stage="review"] .desk-head {
    top: 16px;
    left: 14px;
  }
  #desk.at-bank[data-stage="review"] #share-choice :is(#keep-private, #leave) {
    font-size: 16px;
  }
}
@media (min-width: 601px) and (max-width: 900px) and (max-aspect-ratio: 6/5) {
  #desk.at-bank[data-mode][data-stage="review"] {
    --review-width: min(600px, calc(100% - 64px));
    --review-left: calc((100% - var(--review-width)) / 2);
  }
}
@media (prefers-reduced-motion: no-preference) {
  #desk[data-stage="review"] .review-place {
    animation: review-arrive 360ms ease-out;
  }
  @keyframes review-arrive {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}
/* The wider plate's near bank begins lower. Keep the page on that stone and
   the small decisions together, rather than stretching them to its edges. */
#desk.at-bank[data-stage="review"] #share-choice .read-actions {
  max-width: 360px;
  margin-inline: auto;
}
@media (min-width: 901px), (min-aspect-ratio: 6/5) {
  #desk.at-bank[data-mode][data-stage="review"] {
    --review-start: max(220px, 34vw);
  }
  #desk.at-bank.shared-paper[data-mode][data-stage="review"] .sheet-content,
  #desk.at-bank.shared-paper[data-mode][data-stage="review"]
    .sheet-content:has(.dense:not([hidden])) {
    padding: var(--review-safe-top, 48px) 52px var(--review-safe-bottom, 30px);
    min-height: 220px;
  }
  #desk.at-bank[data-mode][data-stage="review"] #draft-preview,
  #desk.at-bank[data-mode][data-stage="review"] #draft-preview.dense {
    font-size: 20px;
    line-height: 1.45;
  }
  #desk.at-bank[data-stage="review"] .signature {
    margin-top: 12px;
  }
}

/* Information is secondary to the two equally weighted choices. */
#desk.at-bank[data-stage="review"] #sharing-info svg {
  width: 21px;
  height: 21px;
}

@media (max-width: 360px) {
  #desk.at-bank[data-mode][data-stage="review"] .desk-foot {
    padding-inline: 8px;
  }
  #desk.at-bank[data-stage="review"] #share-choice .read-actions {
    column-gap: 8px;
  }
}
