/* The buying request reads as a note, signed by the person sourcing the product. */
#linyin-trade-friends #ly-dialog.purchase-sheet {
  --sheet-ink: #1e2923;
  --sheet-sub: #526057;
  --sheet-line: #d4d7cd;
  --sheet-paper: #fff;
  --sheet-green: #214e3d;
  --sheet-edge: clamp(20px, 4vw, 36px);
  width: min(584px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  padding: 0;
  background: var(--sheet-paper);
  border: 1px solid #a5aba0;
  border-radius: 5px;
  color: var(--sheet-ink);
  box-shadow: 0 12px 44px #101b151f;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  overscroll-behavior: contain;
}
#linyin-trade-friends #ly-dialog.purchase-sheet::backdrop { background: #17221bb0; }
#linyin-trade-friends .purchase-sheet .ly-dialog-head {
  display: flex;
  min-height: 60px;
  margin: 0 var(--sheet-edge);
  padding: 0;
  gap: 12px;
  border-bottom: 1px solid var(--sheet-line);
}
#linyin-trade-friends .purchase-sheet .ly-card-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--sheet-ink);
}
#linyin-trade-friends .purchase-sheet .ly-card-brand img { width: 24px; height: 24px; border-radius: 4px; }
#linyin-trade-friends #ly-dialog.purchase-sheet #ly-modal-title {
  margin: 0 auto 0 0; padding-inline-start: 12px;
  border-inline-start: 1px solid #bdc4b9;
  font: 400 13px/1.2 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  color: var(--sheet-sub);
}
#linyin-trade-friends #ly-dialog.purchase-sheet .ly-close {
  display: grid; place-items: center; width: 44px; height: 44px; margin-inline-end: -12px;
  padding: 0; border: 0; border-radius: 4px; color: var(--sheet-sub);
  background: transparent; font: 400 24px/1 Arial,sans-serif;
}
#linyin-trade-friends .purchase-sheet .ly-close:hover { color: var(--sheet-ink); }
#linyin-trade-friends .purchase-sheet :is(a,button):focus-visible { outline: 2px solid var(--sheet-green); outline-offset: 2px; }
#linyin-trade-friends .purchase-sheet [data-ly-panel=story] {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center;
  padding: 32px var(--sheet-edge) 24px;
}
#linyin-trade-friends #ly-dialog.purchase-sheet #ly-detail-product {
  grid-column: 1/-1; margin: 0; color: var(--sheet-ink);
  overflow-wrap: anywhere; font: 600 clamp(32px,3.4vw,44px)/1.19 Georgia,"Songti SC","STSong",serif;
}
#linyin-trade-friends .purchase-sheet #ly-detail-product:focus { outline: none; }
#linyin-trade-friends #ly-dialog.purchase-sheet #ly-story-words {
  grid-column: 1/-1; margin: 14px 0 28px; padding: 0 0 28px;
  color: #3a463e; border-bottom: 1px solid var(--sheet-line);
  font-size: 17px; line-height: 1.65; text-align: start; overflow-wrap: anywhere;
}
#linyin-trade-friends .purchase-sheet .ly-detail-byline {
  display: flex; gap: 14px; align-items: center; min-width: 0; margin-inline-end: 16px;
}
#linyin-trade-friends #ly-dialog.purchase-sheet #ly-detail-image {
  width: 64px; height: 76px; max-width: none; max-height: none; margin: 0;
  object-fit: cover; object-position: 50% 40%; flex: none; border-radius: 2px; background: #e5e4db;
}
#linyin-trade-friends .purchase-sheet .ly-detail-byline>div { min-width: 0; }
#linyin-trade-friends .purchase-sheet #ly-detail-name {
  margin: 0 0 4px; font: 600 19px/1.24 Georgia,"Songti SC",serif; overflow-wrap: anywhere; color: var(--sheet-ink);
}
#linyin-trade-friends #ly-dialog.purchase-sheet :is(#ly-story-context,#ly-detail-place) {
  margin: 0; font-size: 13px; line-height: 1.5; color: var(--sheet-sub); overflow-wrap: anywhere;
}
#linyin-trade-friends .purchase-sheet .ly-detail-actions { display: flex; align-items: center; gap: 12px; }
#linyin-trade-friends #ly-dialog.purchase-sheet #ly-story-contact {
  display: inline-flex; justify-content: center; align-items: center; min-height: 44px;
  margin: 0; padding: 0 16px; border: 1px solid var(--sheet-green); border-radius: 4px;
  color: #fffdf5; background: var(--sheet-green); font-size: 14px; font-weight: 600;
  line-height: 1.25; text-decoration: none;
}
#linyin-trade-friends #ly-dialog.purchase-sheet #ly-story-contact:hover { background: #163e30; }
#linyin-trade-friends #ly-dialog.purchase-sheet #ly-story-hello {
  border: 0; padding: 0 4px; border-radius: 2px; min-height: 44px; background: transparent;
  color: var(--sheet-sub); font-weight: 500; text-decoration: underline; text-underline-offset: 4px;
}
/* Member profiles without a purchase request keep the portrait before their introduction. */
#linyin-trade-friends #ly-dialog:not(.purchase-sheet) [data-ly-panel=story]:not([hidden]) {
  display: flex; flex-direction: column;
}
#linyin-trade-friends #ly-dialog:not(.purchase-sheet) .ly-detail-byline { order: -1; }
@media (max-width: 600px) {
  #linyin-trade-friends #ly-dialog.purchase-sheet { --sheet-edge: 20px; }
  #linyin-trade-friends .purchase-sheet [data-ly-panel=story] { grid-template-columns: minmax(0,1fr); padding-top: 24px; padding-bottom: 20px; }
  #linyin-trade-friends .purchase-sheet .ly-dialog-head { min-height: 52px; }
  #linyin-trade-friends #ly-dialog.purchase-sheet #ly-story-words { margin: 12px 0 20px; padding-bottom: 20px; font-size: 16px; }
  #linyin-trade-friends .purchase-sheet .ly-detail-byline { margin: 0; }
  #linyin-trade-friends #ly-dialog.purchase-sheet #ly-detail-image { width: 56px; height: 64px; }
  #linyin-trade-friends .purchase-sheet .ly-detail-actions { margin-top: 20px; }
  #linyin-trade-friends #ly-dialog.purchase-sheet #ly-story-contact { flex: 1; }
}
#linyin-trade-friends:lang(en) .purchase-sheet #ly-detail-product::first-letter { text-transform: uppercase; }
