/* Sealed app surfaces: /app, /p/:link, /deal/:id, /deploy. Built on site.css (tokens, buttons, fields). */

.app-body { background: var(--paper); }
.appbar { position: sticky; top: 0; z-index: 50; height: 68px; background: rgb(255 255 255 / 0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.appbar__in { width: min(1240px, 100% - var(--gutter) * 2); height: 100%; margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.appbar__end { justify-self: end; display: flex; align-items: center; gap: 10px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.tabs button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font-size: 15px; font-weight: 600; color: var(--mute); transition: background-color 200ms ease, color 200ms ease; }
.tabs button[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgb(11 18 54 / 0.08), 0 4px 10px -6px rgb(11 18 54 / 0.2); }
.tabs__n { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--blue-50); color: var(--blue); font-size: 12.5px; font-weight: 700; line-height: 22px; text-align: center; }
.tabs__n:empty { display: none; }
@media (hover: hover) and (pointer: fine) { .tabs button[aria-selected="false"]:hover { color: var(--ink); } }
.wallet { gap: 8px; }
.wallet__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px rgb(255 255 255 / 0.3); }

.app { width: min(1240px, 100% - var(--gutter) * 2); margin: 0 auto; padding: 28px 0 80px; }
.banner { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 14px 18px; border-radius: 16px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; color: var(--ink); }
.banner .ico { flex: none; font-size: 20px; color: var(--blue); }
.banner b { font-weight: 650; }
.panel { border-radius: 24px; background: var(--white); box-shadow: var(--shadow-card); }
.app-h1 { font-size: clamp(30px, 3vw, 40px); font-weight: 850; letter-spacing: -0.03em; line-height: 1.05; }
.app-sub { margin-top: 8px; color: var(--mute); }
.view[hidden] { display: none; }

/* new link: form + what the buyer sees */
.maker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 24px; align-items: start; }
.maker__form { display: grid; gap: 20px; padding: clamp(24px, 3vw, 36px); }
.maker__form textarea { width: 100%; min-height: 86px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--white); font: inherit; font-size: 16px; color: var(--ink); resize: vertical; transition: border-color 200ms ease, box-shadow 200ms ease; }
.maker__form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgb(42 38 232 / 0.14); }
.field__hint { font-size: 13.5px; color: var(--mute); }
.field__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.addr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.addr input { font-family: var(--sans); font-variant-numeric: tabular-nums; font-size: 15px !important; }
.maker__form .pics { gap: 8px; }
.maker__go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.err { font-size: 14.5px; font-weight: 600; color: var(--pink); }
.maker__preview { position: sticky; top: 92px; display: grid; gap: 14px; }
.maker__label { font-size: 14px; font-weight: 600; color: var(--mute); padding-left: 4px; }
.maker__facts { display: grid; gap: 10px; padding: 18px 20px; border-radius: 20px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-size: 14.5px; color: var(--mute); }
.maker__facts li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.maker__facts .ico { font-size: 18px; color: var(--blue); margin-top: 2px; }

/* the link card, shared by the preview and the pay page */
.lcard { overflow: hidden; border-radius: 26px; background: var(--white); box-shadow: var(--shadow-pop); }
.lcard__media { position: relative; display: grid; place-items: center; height: 220px; background: var(--blue); overflow: hidden; }
.lcard__media img { position: relative; z-index: 1; width: 52%; height: 78%; object-fit: contain; filter: drop-shadow(0 18px 22px rgb(10 8 90 / 0.35)); }
.lcard__media::before, .lcard__media::after { content: ''; position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1.5px solid rgb(255 255 255 / 0.14); transform: translate(-50%, -50%); }
.lcard__media::before { width: 220px; height: 220px; }
.lcard__media::after { width: 360px; height: 360px; border-color: rgb(255 255 255 / 0.08); }
.lcard__seal { position: absolute; z-index: 2; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgb(255 255 255 / 0.16); color: #fff; font-size: 13px; font-weight: 600; }
.lcard__body { display: grid; gap: 10px; padding: 22px 24px 24px; }
.lcard__seller { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--mute); }
.lcard__seller b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.lcard__avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800; background: var(--av, var(--ink)); }
.lcard__title { font-size: 26px; font-weight: 850; letter-spacing: -0.03em; line-height: 1.1; overflow-wrap: anywhere; }
.lcard__note { font-size: 15.5px; color: var(--mute); white-space: pre-line; overflow-wrap: anywhere; }
.lcard__note:empty { display: none; }
.lcard__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-top: 6px; }
.lcard__price { display: flex; align-items: baseline; gap: 8px; }
.lcard__price b { font-size: 40px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.lcard__price span { font-size: 16px; font-weight: 700; color: var(--mute); }
.lcard__win { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--mute); }
.lcard__btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 58px; margin-top: 8px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 17px; font-weight: 700; }

/* share panel after a link is made */
.share { display: grid; grid-template-columns: minmax(0, 1fr) 176px; gap: 28px; align-items: center; margin-top: 24px; padding: clamp(24px, 3vw, 36px); }
.share__url { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 18px; }
.share__url input { height: 54px; width: 100%; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--paper); font-size: 15px; font-weight: 550; color: var(--ink); text-overflow: ellipsis; }
.share__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.share__qr { display: grid; place-items: center; width: 176px; height: 176px; padding: 12px; border-radius: 20px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.share__qr svg { width: 100%; height: 100%; }
.share__done { display: flex; align-items: center; gap: 12px; }
.share__done .ok { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 22px; }
.btn--soft { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
@media (hover: hover) and (pointer: fine) { .btn--soft:hover { background: var(--blue-50); color: var(--blue); } }

/* lists */
.list { display: grid; gap: 10px; margin-top: 20px; }
.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 20px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; transition: box-shadow 200ms ease, transform 160ms var(--ease-out); }
a.row:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { a.row:hover { box-shadow: inset 0 0 0 1px var(--blue-200), var(--shadow-card); } }
.row__pic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--paper); }
.row__pic img { width: 74%; height: 74%; object-fit: contain; }
.row__main { min-width: 0; }
.row__title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; font-size: 14px; color: var(--mute); }
.row__amt { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row__amt span { font-size: 13.5px; font-weight: 650; color: var(--mute); }
.row__acts { display: flex; gap: 6px; }
.iconbtn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 18px; text-decoration: none; transition: background-color 150ms ease, color 150ms ease, transform 140ms var(--ease-out); }
.iconbtn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .iconbtn:hover { background: var(--blue-50); color: var(--blue); } .iconbtn--danger:hover { background: var(--pink-50); color: var(--pink); } }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip--sealed { background: var(--pink-50); color: var(--pink); }
.chip--disputed { background: var(--sun-50); color: #8A5A00; }
.chip--released { background: var(--lime-50); color: #3E5200; }
.chip--refunded, .chip--resolved { background: var(--blue-50); color: var(--blue); }
.chip--link { background: var(--paper); color: var(--mute); }

.empty { display: grid; justify-items: center; gap: 10px; padding: 56px 24px; border-radius: 24px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.empty img { width: 108px; height: 108px; object-fit: contain; margin-bottom: 6px; }
.empty h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.empty p { max-width: 44ch; color: var(--mute); }
.empty .btn { margin-top: 10px; }
.skel { height: 92px; border-radius: 20px; background: linear-gradient(90deg, var(--white) 0%, #EEF0F6 50%, var(--white) 100%); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 90; display: grid; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; box-shadow: var(--shadow-pop); opacity: 0; transform: translateY(12px) scale(0.98); transition: opacity 220ms ease, transform 320ms var(--ease-out); }
.toast.is-in { opacity: 1; transform: none; }
.toast .ico { font-size: 18px; color: var(--lime); }

/* the buyer's page */
.paypage { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; width: min(1080px, 100% - var(--gutter) * 2); margin: 0 auto; padding: 40px 0 80px; }
.paypage__side { display: grid; gap: 22px; padding-top: 12px; }
.paypage__h { font-size: clamp(32px, 3.6vw, 48px); font-weight: 850; letter-spacing: -0.035em; line-height: 1.02; }
.guards { display: grid; gap: 14px; }
.guards li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.guards img { width: 44px; height: 44px; object-fit: contain; }
.guards b { display: block; font-size: 16.5px; font-weight: 700; }
.guards span { display: block; font-size: 15px; color: var(--mute); }
.paybox { display: grid; gap: 10px; }
.paybox .btn { width: 100%; height: 60px; font-size: 17px; }
.paynote { font-size: 14px; color: var(--mute); text-align: center; }
.paynote a { color: var(--blue); }
.progress { display: grid; gap: 8px; padding: 16px 18px; border-radius: 18px; background: var(--paper); }
.progress li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--mute); }
.progress li .dotx { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--white); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 12px; }
.progress li.is-on { color: var(--ink); font-weight: 650; }
.progress li.is-on .dotx { background: var(--blue); box-shadow: none; color: #fff; }
.progress li.is-done .dotx { background: var(--lime); box-shadow: none; color: var(--ink); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgb(255 255 255 / 0.35); border-top-color: #fff; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* the deal page */
.dealpage { width: min(980px, 100% - var(--gutter) * 2); margin: 0 auto; padding: 40px 0 80px; display: grid; gap: 20px; }
.dealhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: clamp(22px, 3vw, 32px); }
.dealhead__amt { font-size: clamp(40px, 5vw, 60px); font-weight: 900; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.dealhead__amt span { font-size: 18px; font-weight: 700; color: var(--mute); letter-spacing: 0; }
.dealhead__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 14.5px; color: var(--mute); }
.parties { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 22px; }
.party { display: grid; gap: 4px; padding: 16px; border-radius: 18px; background: var(--paper); }
.party span { font-size: 13.5px; color: var(--mute); }
.party a { font-weight: 650; text-decoration: none; font-variant-numeric: tabular-nums; }
.party.is-me { box-shadow: inset 0 0 0 2px var(--blue); background: var(--blue-50); }
.parties__lock { width: 54px; height: 66px; object-fit: contain; }
.timeline { display: grid; gap: 0; padding: 22px 24px; }
.timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; padding: 10px 0; color: var(--mute); }
.timeline li::before { content: ''; position: absolute; left: 13px; top: 34px; bottom: -10px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--white); box-shadow: inset 0 0 0 2px var(--line-strong); font-size: 14px; }
.timeline li.is-done { color: var(--ink); }
.timeline li.is-done .tdot { background: var(--ink); color: #fff; box-shadow: none; }
.timeline li.is-now .tdot { background: var(--blue); color: #fff; box-shadow: 0 0 0 5px var(--blue-50); }
.timeline b { font-weight: 650; }
.actions { display: grid; gap: 14px; padding: 22px 24px; }
.actions__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.split { display: grid; gap: 10px; }
.split input[type="range"] { width: 100%; accent-color: var(--blue); }
.split__out { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.count { font-variant-numeric: tabular-nums; }

/* deal: the seller's warning, the dispute evidence */
.dwarn { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px 22px; background: #FFF4E5; box-shadow: inset 0 0 0 1px #F5C77E; }
.dwarn > .ico { width: 24px; height: 24px; color: #B45309; margin-top: 2px; }
.dwarn b { font-weight: 750; }
.dwarn p { margin-top: 4px; color: #6B4A12; }
.dwarn--soft { background: var(--blue-50); box-shadow: inset 0 0 0 1px #CFCEFB; }
.dwarn--soft > .ico { color: var(--blue); }
.dwarn--soft p { color: var(--ink); }
.dproof { display: grid; gap: 12px; padding: 22px 24px; }
.dproof h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 750; }
.dproof h2 .ico { width: 22px; height: 22px; color: var(--blue); }

/* arbiter */
.adminpage { width: min(980px, 100% - var(--gutter) * 2); margin: 0 auto; padding: 40px 0 80px; display: grid; gap: 20px; }
.adminpage__head { display: grid; gap: 6px; }
.adminpage__head a { color: inherit; }
#admin { display: grid; gap: 20px; }
.astats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.astat { display: grid; align-content: start; gap: 8px; padding: 18px 20px; }
.astat--wide { grid-column: span 2; }
.astat--fees { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.astat--fees > div:first-child { display: grid; gap: 8px; }
.astat > span { font-size: 13.5px; font-weight: 650; color: var(--mute); }
.astat p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-variant-numeric: tabular-nums; }
.astat b { font-size: 30px; font-weight: 850; letter-spacing: -0.03em; line-height: 1.1; }
.astat p span { font-size: 14px; font-weight: 700; color: var(--mute); }
.astat p i { font-style: normal; color: var(--line-strong); }
.aflow { display: grid; gap: 12px; padding: 22px 24px; }
.aflow > *, #admin > *, .astats > * { min-width: 0; }
.aflow h2 { font-size: 20px; font-weight: 750; }

/* deploy */
.deploy { width: min(720px, 100% - var(--gutter) * 2); margin: 0 auto; padding: 48px 0 80px; display: grid; gap: 18px; }
.code { padding: 14px 16px; border-radius: 14px; background: var(--ink); color: #DCDDFB; font-size: 14px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

@media (max-width: 1040px) {
  .appbar__in { grid-template-columns: auto 1fr auto; }
  .appbar .chain { display: none; }
  .tabs { justify-self: center; }
  .maker { grid-template-columns: 1fr; }
  .maker__preview { position: static; }
  .appbar__gap { display: none; }
  .paypage { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .appbar { height: auto; }
  .appbar__in { grid-template-columns: 1fr auto; padding: 10px 0; row-gap: 10px; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .tabs button { flex: 1; justify-content: center; padding: 0 8px; font-size: 14px; }
  .app { padding-top: 18px; }
  .maker__form { padding: 20px 16px; }
  .field__row { grid-template-columns: 1fr; }
  .lcard__media { height: 190px; }
  .share { grid-template-columns: 1fr; }
  .share__qr { justify-self: center; }
  .row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; padding: 12px; }
  .row__pic { width: 52px; height: 52px; border-radius: 14px; }
  .row__acts { grid-column: 1 / -1; justify-content: flex-end; }
  .dealhead { grid-template-columns: 1fr; }
  .parties { grid-template-columns: 1fr; }
  .parties__lock { justify-self: center; }
  .astats { grid-template-columns: 1fr 1fr; }
  .astat b { font-size: 24px; }
  .aflow { padding: 18px 14px; }
}

/* the deal page: every block of a deal sits on one rhythm */
#deal { display: grid; gap: 14px; }
#deal > * { margin: 0; }
.deploy > * { min-width: 0; }
#d-who { overflow-wrap: anywhere; }
@media (max-width: 440px) {
  .appbar__end .btn--soft { display: none; }
}
