.staples-section {
  --staple-cover: var(--deep-teal);
  --staple-paper: var(--paper);
  --staple-edge: var(--border);
  --staple-pin: var(--persimmon);
  --staple-display: var(--display);
}

#workspace-view .staples-section > .section-top,
.staple-view-toolbar {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem .75rem;
  padding: .75rem 0;
  color: var(--ink);
  background: var(--paper);
  border-block-end: 1px solid var(--staple-edge);
}

.staples-section > .section-top h2,
.staple-view-library {
  color: inherit;
  font: 500 clamp(1.75rem, 4.75vw, 2.5rem)/1.08 var(--staple-display);
  letter-spacing: -.035em;
}

.staples-section > .section-top .button.secondary,
.staple-view-toolbar .button.secondary {
  min-block-size: 44px;
  margin: 0;
  padding: .5rem .75rem;
  color: var(--teal);
  background: transparent;
  border: 1px solid var(--control-edge);
  border-radius: .625rem;
}

.staples-section > .section-top .button.secondary:hover,
.staple-view-toolbar .button.secondary:hover { background: var(--reading); }

.staples-section > .section-top .button.secondary:focus-visible,
.staple-view-toolbar .button.secondary:focus-visible {
  outline-color: var(--teal);
}

#memory-detail:has(> .staple-photo-booth) {
  max-inline-size: 54rem;
  margin: 1rem auto 2rem;
  padding: 0;
}

.staple-view-toolbar {
  margin: 0;
  border-radius: 1rem 1rem 0 0;
}

.staple-photo-booth {
  padding: clamp(.625rem, 2.5vw, 1rem) 0;
  background: var(--staple-paper);
  border: 0;
  border-radius: 0 0 1rem 1rem;
}

.staple-photo-booth .staple-photo-mount {
  inline-size: 100%;
  margin: 0;
  border: 0;
  border-radius: .75rem;
  background: var(--cream);
}

.staple-photo-booth .private-memory-photo {
  max-block-size: min(54vh, 38rem);
  max-block-size: min(54svh, 38rem);
}

.staple-photo-booth .staple-photo-mark {
  background: var(--staple-paper);
  border: 0;
  border-radius: .375rem;
}

.staple-photo-booth .staple-photo-mark:not(.staple-photo-settles) { display: none; }

.staple-photo-booth .staple-view-caption {
  margin: 0;
  padding: 0 .25rem .25rem;
  border: 0;
}

.staple-photo-booth .staple-photo-mount:not([hidden]) + .staple-view-caption { padding-block-start: .875rem; }

.staple-photo-booth .staple-view-caption h3 {
  max-inline-size: 28ch;
  margin: 0 0 .5rem;
  color: var(--ink);
  font: 500 clamp(1.65rem, 5.6vw, 2.75rem)/1.08 var(--staple-display);
  letter-spacing: -.035em;
}

.staple-caption-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .375rem .875rem;
  margin-block-start: .5rem;
}

.staple-caption-date,
.staple-access-summary,
.staple-recorded-place {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
}

.staple-caption-date,
.staple-access-summary {
  margin: 0;
  font-size: .875rem;
  line-height: 1.4;
}

.staple-access-summary { min-inline-size: 0; }
.staple-access-summary[data-staple-audience="shared"] { flex: 1 1 11rem; }

.staple-caption-mark {
  flex: 0 0 auto;
  width: 1.625rem;
  aspect-ratio: 5 / 3;
  margin-inline-start: auto;
  background: var(--staple-cover);
  mask: url("/brand/symbol.svg") center / contain no-repeat;
}

.staple-recorded-place::before,
.staple-caption-date::before,
.staple-access-summary[data-staple-audience="private"]::before {
  content: "";
  inline-size: 1em;
  block-size: 1em;
  flex: 0 0 auto;
  align-self: center;
  background: currentColor;
  mask: var(--staple-icon) center / contain no-repeat;
}

.staple-recorded-place {
  --staple-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Cpath d='M20 10c0 5-8 11-8 11S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3C/svg%3E");
}

.staple-recorded-place::before { background: var(--staple-pin); }

.staple-caption-date {
  --staple-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4m8-4v4'/%3E%3C/svg%3E");
}

.staple-access-summary[data-staple-audience="private"] {
  --staple-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='10' width='14' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 1 1 8 0v3m-4 5v2'/%3E%3C/svg%3E");
}

#memory-detail:has(> .staple-photo-booth) > .memory-note { margin: 1rem .25rem; }
.staple-photo-mount.shared-photo-mount { border-radius: .75rem; }
