.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.search-trigger {
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
  color: var(--quiet);
  font-size: 14px;
}
.search-trigger:hover { background: var(--hover); color: var(--text); }
dialog[data-variant="search"], dialog[data-variant^="escrow"] {
  padding: 0;
  border: 1px solid #ffffff12;
  overflow: auto;
  max-height: calc(100dvh - 24px);
}
dialog[data-variant="search"] { width: min(720px, calc(100% - 24px)); border-radius: 16px; background: #242429; color: #f2eff1; }
dialog[data-variant="search"]::backdrop { background: rgb(8 11 16 / 74%); }
dialog[data-variant="search"] > .dialog-body, dialog[data-variant^="escrow"] > .dialog-body { display: block; }
.search-palette { display: flex; flex-direction: column; }
.search-palette-field { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px 18px; border-bottom: 1px solid #39383d; }
.search-palette-field input { width: 100%; min-width: 0; min-height: 42px; padding: 8px 0; appearance: none; border: 0; background: transparent; color: inherit; font-size: 23px; }
.search-palette-field input::placeholder { color: #aba9b1; }
.search-palette-field input:focus-visible { outline: 0; }
.search-palette-field:focus-within { box-shadow: inset 0 0 0 1px #88808f65; }
.search-palette-close { display: grid; place-items: center; padding: 8px; border-radius: 9px; }
.search-palette-close:hover, .search-result:hover, .search-palette footer button:hover, .search-list-head button:hover { background: #ffffff12; }
.search-palette-options { display: grid; grid-template-columns: minmax(120px, .6fr) minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-bottom: 1px solid #39383d; }
.search-palette-options label { display: grid; gap: 5px; font-size: 14px; color: #c2bec7; }
.search-palette-options :is(input, select) { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #514d58; border-radius: 9px; background: #19191f; color: #f0eef1; }
.search-palette-results { max-height: min(46dvh,460px); overflow: auto; overscroll-behavior: contain; padding: 10px 15px; }
.search-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 7px; font-size: 14px; color: #bab6c1; }
.search-list-head button { border-radius: 6px; color: inherit; padding: 3px 7px; font-size: 12px; }
.search-result { display: grid; grid-template-columns: 23px minmax(0,1fr) auto; align-items: center; gap: 13px; width: 100%; padding: 8px 12px; border-radius: 8px; text-align: left; }
.search-result strong, .search-result small { display: block; overflow-wrap: anywhere; }
.search-result strong { font-size: 17px; line-height: 1.25; }
.search-result small { color: #b6b2be; font-size: 13px; line-height: 1.35; margin-top: 3px; }
.search-palette footer { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 6px 10px; border-top: 1px solid #39383d; }
.search-palette footer button { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; font-size: 14px; color: #ccc8d1; }
.search-palette footer .search-find { background: #34343d; color: #f1eef2; }
.search-empty { padding: 10px 8px; color: #c0bcc9; font-size: 14px; }

dialog[data-variant^="escrow"] {
  --deal-border: #ffffff23;
  width: min(1020px,calc(100% - 24px));
  border-radius: 24px;
  background: linear-gradient(145deg,#41414f,#1c1b21 90%);
  color: #f3f0f3;
}
dialog[data-variant="escrow-create"] { width: min(820px,calc(100% - 24px)); }
dialog[data-variant="escrow-detail"] { width: min(842px,calc(100% - 24px)); background: linear-gradient(140deg,#2b4d77,#1a2330 58%,#17181d); }
.escrow-sheet { padding: 28px 36px; }
.escrow-head { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.escrow-head > div { flex: 1; min-width: 0; }
.escrow-head h2 { margin: 0; font-size: clamp(21px,4vw,31px); line-height: 1.12; overflow-wrap: anywhere; }
.escrow-head p { color: #c1bdc9; font-size: 14px; margin-top: 4px; }
.escrow-head .escrow-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #ffffff22; background: #0004; }
.escrow-icon:hover { background: #0008; }
.escrow-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 22px; }
.escrow-filters, .escrow-type { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.escrow-filters { padding: 4px; border-radius: 12px; background: #181a20; }
.escrow-button { min-height: 40px; padding: 8px 17px; border-radius: 99px; background: #313139; color: #f3f0f3; font-size: 14px; font-weight: 600; line-height: 1.25; }
.escrow-button:hover { background: #454551; }
.escrow-button[aria-pressed="true"], .escrow-primary { background: linear-gradient(#fafbfc,#b9beca); color: #191b21; }
.escrow-button[aria-pressed="true"]:hover, .escrow-primary:hover { background: #fff; }
.escrow-list { display: grid; gap: 18px; }
.escrow-table-head, .escrow-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(130px,22%) minmax(125px,16%); align-items: center; gap: 12px; padding: 12px 14px; }
.escrow-table-head { padding-block: 3px 18px; color: #c2bfcc; font-size: 14px; }
.escrow-table-head span:last-child, .escrow-status { justify-self: end; }
.escrow-row { width: 100%; min-height: 66px; border-radius: 14px; background: #232226; text-align: left; }
.escrow-row:hover { background: #2d2b31; }
.escrow-subject { display: flex; gap: 12px; align-items: center; min-width: 0; }
.escrow-subject > :last-child { min-width: 0; }
.escrow-subject strong, .escrow-subject small, .escrow-amount strong, .escrow-amount small { display: block; overflow-wrap: anywhere; }
.escrow-subject strong { line-height: 1.25; }
.escrow-row small { color: #c6c2ca; font-size: 13px; }
.escrow-amount strong { font-variant-numeric: tabular-nums; font-weight: 500; }
.escrow-initial { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 14px; background: #473336; color: #f3c8c6; font-weight: 650; }
.escrow-initial--violet { background: #38324e; color: #d6cdf8; }
.escrow-initial--mint { background: #253f44; color: #bde2df; }
.escrow-initial--gold { background: #493e2a; color: #e3d5ae; }
.escrow-status { padding: 4px 9px; border-radius: 99px; font-size: 13px; font-weight: 600; background: #3b3940; color: #e2dfe6; white-space: nowrap; }
.escrow-status--waiting { background: #3a334e; color: #ded2fa; }
.escrow-status--delivery, .escrow-status--payment, .escrow-status--payout { background: #443927; color: #f2d399; }
.escrow-status--completed { background: #254336; color: #b2dfcd; }
.escrow-form { display: grid; gap: 15px; }
.escrow-form label { display: grid; gap: 5px; min-width: 0; color: #cbc6d0; font-size: 14px; }
.escrow-form :is(input:not([type="checkbox"]), select, textarea) { width: 100%; min-width: 0; min-height: 44px; padding: 10px 13px; border: 1px solid #545a68; border-radius: 9px; background: #12171e; color: #f2eef3; }
.escrow-form input::placeholder, .escrow-form textarea::placeholder { color: #a19fa9; }
.escrow-form textarea { resize: vertical; }
.escrow-form-row { display: grid; gap: 12px; }
.escrow-two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.escrow-three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.escrow-select { display: block; position: relative; }
.escrow-select select { appearance: none; padding-right: 30px; }
.escrow-select .icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.escrow-estimate { display: block; min-height: 17px; color: #c4bfcc; font-size: 12px; }
.escrow-form .escrow-checkbox { display: flex; gap: 8px; align-items: center; }
.escrow-footer, .escrow-detail-actions > div { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.escrow-footer { margin-top: 8px; }
.escrow-detail h3 { margin: 0; font-size: clamp(22px,5vw,36px); line-height: 1.15; }
.escrow-explainer { color: #d7d4df; margin-top: 8px; font-size: 15px; }
.escrow-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; list-style: none; padding: 0; margin: 22px 0 26px; }
.escrow-steps li { display: flex; align-items: center; gap: 7px; position: relative; padding: 0 0 12px; color: #c8c5d2; font-size: 14px; }
.escrow-steps li::after { content: ''; position: absolute; inset: auto 0 0; height: 4px; border-radius: 6px; background: #88849365; }
.escrow-steps .is-current::after { background: repeating-linear-gradient(128deg,#b6cdf7 0 2px,#4b648b 2px 4px); }
.escrow-steps .is-done::after { background: #91b7c4; }
.escrow-summary { padding: 14px 20px; background: #1b191e; border-radius: 17px; border: 1px solid var(--deal-border); }
.escrow-summary-top { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--deal-border); }
.escrow-summary-top > div { display: grid; align-content: center; gap: 2px; overflow-wrap: anywhere; }
.escrow-summary-top small { font-size: 13px; color: #c7c1cc; }
.escrow-summary-top > :first-child strong { font-size: clamp(19px,4vw,27px); }
.escrow-summary dl { display: grid; grid-template-columns: minmax(100px, .42fr) minmax(0,1fr); gap: 7px 10px; margin: 10px 0 3px; }
.escrow-summary dt { font-size: 14px; color: #c1bdc7; }
.escrow-summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.escrow-topic, .escrow-terms { margin-top: 8px; overflow-wrap: anywhere; }
.escrow-terms summary { cursor: pointer; }
.escrow-detail-actions { justify-content: space-between; margin-top: 20px; }
[data-theme="light"] dialog[data-variant="search"] { background: #f9f8fb; color: #27242c; }
[data-theme="light"] :is(.search-palette-field,.search-palette-options,.search-palette footer) { border-color:#dedbe4; }
[data-theme="light"] :is(.search-result small,.search-list-head,.search-empty,.search-palette footer button,.search-palette-options label) { color:#5e5966; }
[data-theme="light"] .search-palette footer .search-find { color:#f9f8fb; }
@media (max-width: 620px) {
  .search-palette-field { padding-inline: 12px; }
  .search-palette-field input { font-size: 18px; }
  .search-result { padding-inline: 5px; gap: 8px; }
  .escrow-sheet { padding: 18px 14px; }
  .escrow-table-head { display: none; }
  .escrow-list { gap: 9px; }
  .escrow-row { padding: 10px; grid-template-columns: minmax(0,1fr) auto; gap: 8px 6px; }
  .escrow-subject { grid-column: 1/-1; }
  .escrow-amount { padding-left: 3px; }
  .escrow-form .escrow-three { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .escrow-three > :first-child { grid-column: 1/-1; }
  .escrow-steps { gap: 6px; }
  .escrow-steps li { font-size: 11px; gap: 4px; flex-wrap: wrap; align-content: flex-start; }
  .escrow-summary { padding: 12px; }
  .escrow-summary-top { grid-template-columns:minmax(0,1fr) minmax(0,.7fr); }
  .escrow-button { padding-inline: 11px; }
}
@media (max-width: 360px) {
  .escrow-two { grid-template-columns: minmax(0,1fr); }
  .escrow-status { font-size: 11px; }
}
