.share-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 28px));
  overflow: auto;
}

.share-dialog-shell,
.invitation-dialog-shell {
  position: relative;
  padding: 31px 34px 28px;
}

.share-intro {
  max-width: 620px;
  color: var(--ink-muted, #70634f);
  line-height: 1.55;
}

.share-dialog .share-invite-form {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, .8fr) auto;
  gap: 12px;
  align-items: end;
  margin: 24px 0 6px;
  padding: 0;
  position: static;
}

.share-invite-form label {
  display: grid;
  gap: 7px;
}

.share-invite-form label > span {
  color: #62533e;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.share-invite-form input,
.share-invite-form select {
  width: 100%;
}

.share-delivery-note {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: #6d5d42;
  font-size: .86rem;
}

.share-delivery-note a {
  color: #765820;
  font-weight: 700;
}

.share-loading {
  margin: 26px 0 10px;
  color: #796b56;
}

.share-sections {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.share-sections section {
  border-top: 1px solid rgba(106, 83, 43, .2);
  padding-top: 18px;
}

.share-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.share-section-heading h3 {
  margin: 0;
  color: #463925;
  font: 600 1.05rem Georgia, serif;
}

.share-section-heading span {
  color: #88785e;
  font-size: .78rem;
}

.share-list {
  display: grid;
  gap: 8px;
}

.share-row,
.share-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(102, 78, 39, .15);
  border-radius: 8px;
  background: rgba(255, 252, 242, .52);
}

.share-empty {
  color: #81725d;
  font-style: italic;
}

.share-person-mark {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #e5d5ad;
  color: #6f5423;
  font: 700 .8rem Georgia, serif;
  text-transform: uppercase;
}

.share-row-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.share-row-copy strong,
.share-row-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-row-copy strong {
  color: #463925;
  font-size: .92rem;
}

.share-row-copy span {
  color: #7c6d56;
  font-size: .78rem;
}

.share-role {
  color: #725927;
  font-size: .75rem;
  font-weight: 700;
  text-transform: capitalize;
}

.share-role-select {
  max-width: 92px;
  border: 1px solid rgba(102, 78, 39, .25);
  border-radius: 7px;
  padding: .35rem .45rem;
  background: #fffaf0;
  color: #5f4c28;
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
}

.share-remove {
  border: 0;
  background: transparent;
  color: #8a493d;
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
}

.share-transfer {
  border: 1px solid rgba(87, 103, 62, .35);
  border-radius: 999px;
  padding: .32rem .58rem;
  background: rgba(225, 234, 207, .75);
  color: #53633d;
  cursor: pointer;
  font: inherit;
  font-size: .72rem;
  font-weight: 750;
}

.share-remove:hover,
.share-remove:focus-visible,
.share-transfer:hover,
.share-transfer:focus-visible {
  text-decoration: underline;
}

.invitation-dialog {
  width: min(520px, calc(100vw - 28px));
}

.invitation-details {
  margin: 20px 0;
  color: #5f513d;
  line-height: 1.6;
}

.invitation-details strong {
  color: #443622;
}

.tree-readonly #edit-person-button,
.tree-readonly #edit-person-facts,
.tree-readonly #profile-media-upload,
.tree-readonly #media-upload-button,
.tree-readonly [data-open-story-create],
.tree-readonly #add-place-button,
.tree-readonly #add-event-button,
.tree-readonly [data-new-task],
.tree-readonly #add-source-button,
.tree-readonly [data-add-source],
.tree-readonly [data-person-more-action="add-event"],
.tree-readonly [data-person-more-action="add-task"],
.tree-readonly [data-person-more-action="remove"],
.tree-readonly #delete-person-button,
.tree-readonly #delete-place-button,
.tree-readonly #delete-event-button,
.tree-readonly [data-edit-story],
.tree-readonly [data-delete-story],
.tree-readonly .media-detail-actions,
.tree-readonly .profile-media-detail-actions,
.tree-readonly .place-detail-actions,
.tree-readonly .task-actions,
.tree-readonly .source-detail-actions,
.tree-readonly #story-dialog button[type="submit"],
.tree-readonly #media-dialog button[type="submit"],
.tree-readonly #place-dialog button[type="submit"],
.tree-readonly #place-link-dialog button[type="submit"],
.tree-readonly #event-dialog button[type="submit"],
.tree-readonly #task-dialog button[type="submit"],
.tree-readonly #source-dialog button[type="submit"],
.tree-readonly #duplicate-merge-form [data-merge-submit],
.tree-readonly [data-undo-merge],
.tree-readonly .trash-actions {
  display: none !important;
}

@media (max-width: 700px) {
  .share-dialog .share-invite-form {
    grid-template-columns: 1fr;
  }

  .share-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .share-remove {
    margin-left: 46px;
  }
}
