/* Guaranteed deals use the existing surfaces and controls; no global restyling. */
.escrow-heading, .escrow-feed-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.escrow-invitations { margin-bottom: 26px; }
.escrow-invitations h2, .escrow-feed-heading h2 { font-size: 18px; }
#escrowInvitationCount { color: var(--muted); font-size: 13px; font-weight: 400; }
#escrowInvitationHeading.has-new::after, .escrow-new-dot { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: var(--text); }
.escrow-feed-heading { margin-bottom: 12px; }
.escrow-feed-content { display: grid; gap: 18px; }
.escrow-feed-heading select { padding: 8px 12px; }
#escrowInvitations, #escrowFeed { display: grid; gap: 10px; }
.escrow-row { width: 100%; padding: 16px 18px; display: flex; align-items: center; gap: 12px; text-align: left; color: var(--text); background: var(--panel); border: 0; border-radius: var(--radius-sm); }
.escrow-row:hover { background: var(--panel-2); }
.escrow-row > .avatar { flex: 0 0 42px; width: 42px; height: 42px; overflow: hidden; }
.escrow-row-copy { flex: 1; min-width: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.escrow-row-copy strong { font-size: 14px; }
.escrow-row-copy small, .escrow-row-copy > span, .escrow-row-amount small { font-size: 11px; color: var(--muted); }
.escrow-row-amount { flex: 0 0 auto; max-width: 38%; display: grid; text-align: right; gap: 5px; }
.escrow-row-amount b { font-size: 13px; overflow-wrap: anywhere; }
.escrow-modal { width: min(640px, 100%); }
.escrow-detail { padding: 22px; display: grid; gap: 18px; min-width: 0; }
.escrow-detail h2 { margin: 0; font-size: 21px; overflow-wrap: anywhere; }
.escrow-detail label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; min-width: 0; }
.escrow-detail input:not([type="checkbox"]), .escrow-detail textarea, .escrow-detail select { width: 100%; min-width: 0; box-sizing: border-box; }
.escrow-detail textarea { resize: vertical; }
.escrow-detail small { color: var(--muted); line-height: 1.5; }
.escrow-participants { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); align-items: start; width: min(350px, 100%); justify-self: center; gap: 16px; }
.escrow-participant { min-width: 0; display: grid; justify-items: center; gap: 8px; text-align: center; }
.escrow-participant > small, .escrow-person-button > small { display: block; overflow-wrap: anywhere; }
.escrow-person-button { display: grid; justify-items: center; gap: 8px; position: relative; color: var(--text); background: none; border: 0; padding: 0; width: 100%; }
.escrow-participant .avatar { width: 68px; height: 68px; flex: 0 0 68px; overflow: hidden; }
.escrow-participant .avatar img, .escrow-row > .avatar img { width: 100%; height: 100%; object-fit: cover; }
.escrow-pick-avatar { border: 1px dashed var(--border); }
.escrow-pick-avatar img { max-width: 22px; max-height: 22px; }
.escrow-participant-bridge { margin-top: 24px; opacity: .5; }
.escrow-participant-bridge img { width: 20px; height: 20px; }
.escrow-state-icon { position: absolute; top: 47px; left: calc(50% + 29px); width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.escrow-state-icon.waiting { color: var(--warning); }
.escrow-state-icon.done { color: #50b77d; }
.escrow-state-icon.rejected { color: #dc7373; }
.escrow-id { text-align: center; }
.escrow-description { white-space: pre-wrap; color: var(--text); line-height: 1.65; overflow-wrap: anywhere; }
.escrow-contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.escrow-contacts > div { display: grid; gap: 5px; overflow-wrap: anywhere; font-size: 13px; }
.escrow-finance { padding: 15px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md, 12px); display: grid; gap: 10px; }
.escrow-finance > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.escrow-finance strong { text-align: right; }
.escrow-finance > small { font-size: 10px; }
.escrow-status { display: grid; gap: 6px; font-size: 13px; }
.escrow-status span { color: var(--muted); }
.escrow-warning { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.escrow-detail .escrow-ack { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.escrow-ack input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--text); }
.escrow-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.escrow-timeline { border-top: 1px solid var(--border); padding-top: 14px; font-size: 12px; }
.escrow-timeline summary { cursor: pointer; color: var(--muted); }
.escrow-timeline > div { display: grid; gap: 4px; margin-top: 14px; }
.escrow-timeline p { margin: 0; overflow-wrap: anywhere; }
.escrow-form-error { color: #dc7373; margin: 0; font-size: 12px; }
.escrow-peer-picker { background: var(--panel); padding: 12px; border-radius: 12px; }
#escrowPeerResults { max-height: 240px; overflow-y: auto; }
#escrowPeerResults button { display: flex; gap: 12px; align-items: center; padding: 10px 0; border: 0; background: none; color: var(--text); text-align: left; width: 100%; }
#escrowPeerResults small { display: block; }
.account-page { grid-template-areas: "profile balance" "twofa telegram" "marketplace marketplace" "rules rules"; }
.account-page.twofa-enabled { grid-template-areas: "profile balance" "telegram telegram" "marketplace marketplace" "rules rules"; }
.account-page.twofa-enabled.telegram-dismissed { grid-template-areas: "profile balance" "marketplace marketplace" "rules rules"; }
.profile-marketplace { grid-area: marketplace; min-width: 0; }
.profile-marketplace-heading h2 { font-size: 18px; margin: 8px 0 14px; }
.profile-marketplace .deals-tabs { display: flex; flex-wrap: wrap; }
.profile-marketplace .deals-tabs > button { flex: 0 1 auto; }
.profile-card { position: relative; }
.profile-card > .notification-bell { position: absolute; top: 12px; right: 12px; z-index: 2; }
.profile-card .profile-name-row { padding-right: 22px; }
.profile-telegram-notice { grid-area: telegram; min-width: 0; position: relative; }
.profile-telegram-notice .telegram-profile-banner { height: 100%; box-sizing: border-box; }
.profile-telegram-notice > .close-btn { position: absolute; right: 6px; top: 4px; }
.twofa-enabled .profile-telegram-notice .telegram-profile-banner { padding-right: 38px; }
.notification-toolbar { flex-wrap: wrap; gap: 10px; }
@media (max-width: 900px) {
  .account-page, .account-page.twofa-enabled, .account-page.twofa-enabled.telegram-dismissed { grid-template-columns: 1fr; grid-template-areas: "profile" "balance" "twofa" "telegram" "marketplace" "rules"; }
  .account-page.twofa-enabled { grid-template-areas: "profile" "balance" "telegram" "marketplace" "rules"; }
  .account-page.twofa-enabled.telegram-dismissed { grid-template-areas: "profile" "balance" "marketplace" "rules"; }
}
@media (max-width: 767px) {
  .profile-marketplace .deals-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .profile-marketplace .deals-tabs > button { flex: 0 0 auto; width: auto; padding-inline: 12px; white-space: nowrap; }
}
@media (max-width: 480px) {
  .escrow-detail { padding: 16px; gap: 16px; }
  .escrow-contacts { grid-template-columns: 1fr; }
  .escrow-participants { gap: 8px; }
  .escrow-row { gap: 9px; }
  .escrow-row > .avatar { flex-basis: 36px; width: 36px; height: 36px; }
  .escrow-row-amount b { font-size: 11px; }
  .escrow-actions .primary-btn { width: 100%; }
}
