/* Dorm to Dorm — trade screens (checkout, orders, messages, jury). Lane web-trade.
   Every selector is prefixed .tr- so nothing collides with app.css. Tokens come from /shared/tokens.css. */

.tr-wrap{max-width:var(--max);margin:0 auto;padding:24px max(var(--gut),env(safe-area-inset-right)) 56px max(var(--gut),env(safe-area-inset-left))}
@media (max-width:520px){.tr-wrap{padding-top:16px}}
.tr-h1{margin:4px 0 12px;font-size:clamp(26px,3.6vw,38px);line-height:1.1;font-weight:800;letter-spacing:-.03em;overflow-wrap:anywhere;text-wrap:balance}
:lang(zh-CN) .tr-h1{letter-spacing:0;line-height:1.25}
.tr-h2{margin:0 0 6px;font-size:19px;line-height:1.25;font-weight:750;letter-spacing:-.01em}
.tr-h3{margin:0 0 8px;font-size:15px;font-weight:700}
.tr-mono{font-family:var(--font-mono);font-variant-numeric:tabular-nums}
.tr-faint{color:var(--muted)}
.tr-hint{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.45}
.tr-hint a,.tr-link{color:var(--fg);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.tr-vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.tr-back{display:inline-flex;align-items:center;gap:6px;min-height:36px;color:var(--muted);font-size:14px;text-decoration:none}
.tr-back::before{content:"";width:7px;height:7px;border-left:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(45deg);margin-left:2px}
.tr-back:hover{color:var(--fg)}
.tr-loading{padding:48px 0;color:var(--muted);text-align:center}
/* empty states match the core .empty-box (left-aligned, quiet) so both halves of the app read as one product */
.tr-empty{padding:36px 0;max-width:52ch;color:var(--muted)}
.tr-empty p{margin:0 0 14px}

/* ---------- buttons, fields ---------- */
.tr-btn{font:inherit;font-size:14px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:var(--r);cursor:pointer;text-decoration:none;text-align:center;line-height:1.2;-webkit-tap-highlight-color:transparent;transition:background-color .15s,border-color .15s,color .15s}
.tr-btn:disabled{opacity:.5;cursor:default}
.tr-btn[aria-busy="true"]{cursor:progress}
.tr-ink,a.tr-ink,a.tr-ink:visited{background:var(--fg);color:var(--bg)}
.tr-ink:hover:not(:disabled){background:var(--muted)}
.tr-ghost{background:transparent;color:var(--fg);border-color:var(--rule)}
.tr-ghost:hover:not(:disabled){border-color:var(--fg)}
.tr-danger{background:transparent;color:var(--seal);color:color-mix(in srgb,var(--seal) 82%,var(--fg));border-color:var(--seal)} /* mixed toward ink: ≥4.5:1 on panels in both themes */
.tr-danger:hover:not(:disabled){background:var(--seal-tint)}
.tr-sm{min-height:34px;padding:0 10px;font-size:13px}
.tr-lg{min-height:52px;padding:0 22px;font-size:16px}
.tr-full{width:100%}
.tr-btn:focus-visible,.tr-chip:focus-visible,.tr-tab:focus-visible,.tr-opt:has(input:focus-visible),.tr-oc:focus-visible,.tr-conv:focus-visible,.tr-more>summary:focus-visible,.tr-icon:focus-visible,.tr-rate-i:has(input:focus-visible),.tr-pick-add:focus-within{outline:2px solid var(--fg);outline-offset:2px}
.tr-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:14px}
.tr-form{display:grid;gap:12px;margin-top:12px}
.tr-form>.tr-btn{justify-self:start}
.tr-field{display:grid;gap:5px;font-size:13px;font-weight:600}
.tr-field>span em{font-style:normal;font-weight:400;color:var(--muted)}
.tr-field input,.tr-field select,.tr-field textarea{font:inherit;font-size:16px;font-weight:400;width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);color:var(--fg)}
.tr-field textarea{resize:vertical;line-height:1.45}
.tr-field input:focus,.tr-field select:focus,.tr-field textarea:focus{outline:none;border-color:var(--fg);box-shadow:0 0 0 1px var(--fg)}
.tr-field [aria-invalid="true"]{border-color:var(--seal)}
.tr-field small{font-weight:400}
.tr-ferr{margin:0;color:var(--seal);font-size:13px;font-weight:600}
.tr-f2{display:grid;gap:12px;grid-template-columns:1fr}
@media (min-width:560px){.tr-f2{grid-template-columns:1fr 1fr}}
.tr-fset{border:0;margin:0;padding:0;min-width:0}
.tr-fset>legend{padding:0}

/* ---------- atoms ---------- */
.tr-tile{position:relative;display:block;flex:none;width:56px;aspect-ratio:4/5;overflow:hidden;border-radius:var(--r);background:var(--fc);container-type:inline-size}
.tr-tile b{position:absolute;right:-12%;bottom:-24%;font-family:var(--font-glyph);font-weight:900;font-size:96cqw;line-height:1;color:var(--gc)}
.tr-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.tr-tile-md{width:64px}
.tr-tile-lg{width:88px}
.tr-av{display:inline-grid;place-items:center;flex:none;width:var(--s);height:var(--s);border-radius:50%;color:var(--fg);font-weight:750;font-size:calc(var(--s)*.44);line-height:1}
.tr-seal{display:inline-grid;place-items:center;writing-mode:vertical-rl;width:16px;height:28px;background:var(--seal-solid,var(--seal));color:var(--seal-fg);font-family:var(--font-glyph);font-weight:900;font-size:9.5px;border-radius:2px;vertical-align:middle;letter-spacing:0;line-height:1}
.tr-seal-sq{writing-mode:horizontal-tb;width:30px;height:30px;font-size:11px;flex:none}
.tr-pill{display:inline-block;padding:2px 7px;border:1px solid currentColor;border-radius:2px;font-family:var(--font-mono);font-size:11.5px;font-weight:600;line-height:1.4;white-space:nowrap;color:var(--muted)}
.tr-st-awaiting_payment,.tr-st-refund_requested,.tr-st-refund_declined,.tr-st-disputed{color:var(--warn)}
.tr-st-payment_submitted,.tr-st-refund_due{color:var(--info)}
.tr-st-paid,.tr-st-handed_over,.tr-st-shipped,.tr-st-delivered{color:var(--fg)}
.tr-st-accepted,.tr-st-completed{color:var(--ok)}
.tr-st-cancelled,.tr-st-refunded{color:var(--faint)}
.tr-st-hold{color:var(--warn)}
.tr-ql{margin:0 0 6px;font-size:13px;font-weight:650;color:var(--muted)}
.tr-card{margin-top:14px;padding:14px 16px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface)}
.tr-card>p:last-child{margin-bottom:0}
.tr-note{padding:12px 14px;border-left:3px solid var(--info);background:var(--info-tint);border-radius:0 var(--r) var(--r) 0}
.tr-note.tr-warn{border-left-color:var(--warn);background:var(--warn-tint)}
.tr-note p{margin:0 0 8px}.tr-note p:last-child{margin:0}
.tr-note a:not(.tr-btn){color:inherit;font-weight:650}
.tr-kv{margin:0;display:grid;gap:0}
.tr-kv>div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-top:1px solid var(--rule);font-size:14px}
.tr-kv>div:first-child{border-top:0}
.tr-kv dt{color:var(--muted)}
.tr-kv dd{margin:0;text-align:right;overflow-wrap:anywhere}
.tr-photos{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 0;padding:0;list-style:none}
.tr-photos img{display:block;width:64px;height:64px;object-fit:cover;border-radius:var(--r);border:1px solid var(--rule)}
.tr-quote{margin-top:10px;padding:10px 12px;border-left:2px solid var(--fg);background:var(--surface-2)}
.tr-quote p{margin:0 0 4px;overflow-wrap:anywhere;white-space:pre-wrap}
.tr-more{margin-top:14px;border-top:1px solid var(--rule);padding-top:10px}
.tr-more>summary{cursor:pointer;font-weight:650;font-size:14px;min-height:36px;display:flex;align-items:center;gap:8px;list-style:none}
.tr-more>summary::-webkit-details-marker{display:none}
.tr-more>summary::before{content:"";width:6px;height:6px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
.tr-more[open]>summary::before{transform:rotate(45deg)}
.tr-more-quiet>summary{color:var(--muted);font-weight:500}
.tr-auto{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin:10px 0 0;font-size:14px;color:var(--muted)}
.tr-cd{font-family:var(--font-mono);font-variant-numeric:tabular-nums;font-weight:600;color:var(--fg);font-size:15px}
.tr-cd.is-low{color:var(--seal)}
.tr-bar{height:6px;background:var(--tint);border-radius:1px;overflow:hidden;margin:6px 0}
.tr-bar span{display:block;height:100%;background:var(--fg)}
.tr-flag{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:700;color:var(--seal);white-space:nowrap}
.tr-flag::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--seal)}
.tr-count{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--seal-solid,var(--seal));color:var(--seal-fg);font-size:11px;font-weight:700}
.tr-spin{width:18px;height:18px;border:2px solid var(--rule);border-top-color:var(--fg);border-radius:50%;animation:tr-spin .8s linear infinite}
@keyframes tr-spin{to{transform:rotate(360deg)}}

/* photo picker */
.tr-pick{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.tr-pick-list{display:contents;list-style:none}
.tr-pick-item{position:relative;display:grid;place-items:center;width:64px;height:64px;border:1px solid var(--rule);border-radius:var(--r);overflow:hidden;background:var(--tint)}
.tr-pick-item img{width:100%;height:100%;object-fit:cover}
.tr-pick-rm{position:absolute;top:2px;right:2px;width:24px;height:24px;border:0;border-radius:50%;background:var(--overlay);color:#fff;font-size:16px;line-height:1;cursor:pointer}
.tr-pick-add{position:relative;font-weight:600}
.tr-file{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;font-size:0}

/* ---------- summary row ---------- */
.tr-sumrow{display:flex;gap:12px;align-items:center;color:inherit;text-decoration:none}
.tr-sum-txt{display:grid;gap:3px;min-width:0}
.tr-sum-title{margin:0;font-weight:700;overflow-wrap:anywhere;line-height:1.3}
.tr-sum-meta{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px}
.tr-sum-price{margin:0;font-family:var(--font-mono);font-weight:600;font-size:17px}

/* ---------- checkout ---------- */
.tr-co-grid,.tr-ord-grid{display:grid;gap:20px;grid-template-columns:minmax(0,1fr)}
@media (min-width:900px){
  .tr-co-grid{grid-template-columns:minmax(0,1fr) 340px;gap:40px}
  .tr-ord-grid{grid-template-columns:minmax(0,1fr) 320px;gap:32px}
  .tr-co-side,.tr-ord-side{position:sticky;top:84px;align-self:start}
}
.tr-co-main{display:grid;gap:22px;align-content:start}
.tr-co-main>.tr-sumrow{padding-bottom:18px;border-bottom:1px solid var(--rule)}
.tr-opts{display:grid;gap:8px;margin-top:10px}
.tr-opt{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:start;padding:14px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);cursor:pointer}
.tr-opt:has(input:checked){border-color:var(--fg);box-shadow:inset 0 0 0 1px var(--fg)}
.tr-opt.is-off{cursor:not-allowed;background:transparent;color:var(--muted)}
.tr-opt input{margin:3px 0 0;width:18px;height:18px;accent-color:var(--fg)}
.tr-opt-body{display:grid;gap:3px}
.tr-opt-t{font-weight:700}
.tr-opt-d{font-size:13px;color:var(--muted)}
.tr-opt-meta{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:13px;margin-top:4px}
.tr-opt-price{font-size:13px;white-space:nowrap;color:var(--muted)}
.tr-opt-price:not(:empty){padding-top:2px}
/* phones: the side note ("Same school only", "+¥8", "Recommended") drops under the text so descriptions get the full width */
@media (max-width:480px){.tr-opt{grid-template-columns:auto minmax(0,1fr);row-gap:4px}.tr-opt-price{grid-column:2;padding-top:0!important;white-space:normal}}
.tr-offer-exp{flex-basis:100%;font-size:12px}
.tr-opt-risk{color:var(--warn)}
/* pay screen: copy buttons are thumb-sized (amount, code, account all copy in one tap) */
.tr-pay [data-copy]{min-height:44px;min-width:72px}
.tr-amt-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.tr-amt-row .tr-btn{font-family:var(--font-ui);font-weight:600;font-size:13px;line-height:1.2;letter-spacing:0}
.tr-totals{display:grid;gap:14px;padding-top:16px;border-top:1px solid var(--fg)}
.tr-totals dl{margin:0;display:grid;gap:6px}
.tr-totals dl>div{display:flex;justify-content:space-between;font-size:15px}
.tr-totals dt{color:var(--muted)}.tr-totals dd{margin:0}
.tr-totals .tr-tot{padding-top:8px;border-top:1px solid var(--rule);font-weight:700}
.tr-totals .tr-tot dt{color:var(--fg)}
.tr-totals .tr-tot dd{font-size:24px}
@media (min-width:560px){.tr-totals{grid-template-columns:1fr auto;align-items:end}}
.tr-escrow{padding:18px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface-2)}
.tr-esc-list{margin:0;padding:0;list-style:none;counter-reset:e;display:grid;gap:10px}
.tr-esc-list li{counter-increment:e;display:grid;grid-template-columns:22px 1fr;gap:8px;font-size:14px;line-height:1.45}
.tr-esc-list li::before{content:counter(e);font-family:var(--font-mono);font-size:12px;font-weight:600;color:var(--muted);padding-top:2px}

/* ---------- order page ---------- */
.tr-ord-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.tr-ord-sub{margin:0;display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;font-size:13px}
.tr-panel{padding:18px;border:1px solid var(--fg);border-radius:var(--r);background:var(--surface)}
.tr-panel.tr-warn{border-color:var(--warn);box-shadow:inset 3px 0 0 var(--warn)}
.tr-panel.tr-info{border-color:var(--info);box-shadow:inset 3px 0 0 var(--info)}
.tr-panel.tr-ok{border-color:var(--ok);box-shadow:inset 3px 0 0 var(--ok)}
.tr-panel.tr-go{box-shadow:inset 3px 0 0 var(--fg)}
.tr-pbody{margin:0;max-width:62ch;color:var(--muted);line-height:1.5}
.tr-h2:focus{outline:none}
.tr-checking{display:flex;gap:6px;margin:16px 0 6px}
.tr-checking span{width:8px;height:8px;border-radius:50%;background:var(--info);animation:tr-pulse 1.2s infinite ease-in-out}
.tr-checking span:nth-child(2){animation-delay:.15s}.tr-checking span:nth-child(3){animation-delay:.3s}
@keyframes tr-pulse{0%,80%,100%{opacity:.25}40%{opacity:1}}
.tr-panel .tr-kv{margin-top:12px}
.tr-acct{margin:6px 0;display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:17px;font-weight:600;overflow-wrap:anywhere}
.tr-addr{margin-top:14px;padding:12px 14px;border:1px dashed var(--fg);border-radius:var(--r)}
.tr-addr-l{margin:0 0 4px;overflow-wrap:anywhere}
.tr-addr .tr-btn{margin-top:6px}
.tr-track-n{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 4px;font-weight:650}
.tr-track-n .tr-mono{font-size:16px;letter-spacing:.02em}
.tr-party{display:grid;gap:14px;margin-top:0}
.tr-who{display:flex;gap:10px;align-items:center;padding-top:12px;border-top:1px solid var(--rule)}
.tr-who p{margin:0;font-size:14px}
.tr-who-n{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-weight:650}
.tr-hist>summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;margin:0;min-height:28px;align-items:center}
.tr-hist>summary::-webkit-details-marker{display:none}
.tr-hist-l{margin:8px 0 0;padding:0;list-style:none;display:grid;gap:8px}
.tr-hist-l li{display:grid;grid-template-columns:auto 1fr;gap:10px;font-size:13px;padding-top:8px;border-top:1px solid var(--rule)}
.tr-hist-l time{color:var(--muted);font-size:11.5px;white-space:nowrap;padding-top:1px}
.tr-side-rules{margin-top:14px}

/* stars */
.tr-stars{display:inline-flex;gap:3px;margin:2px 0 6px}
.tr-stars svg,.tr-rate-i svg{width:20px;height:20px;fill:none;stroke:var(--fg);stroke-width:1.3;stroke-linejoin:round}
.tr-stars svg.on{fill:var(--fg)}
.tr-rate{border:0;margin:0;padding:0}
.tr-rate-row{display:flex;gap:2px;margin-top:8px}
.tr-rate-i{position:relative;display:grid;place-items:center;width:44px;height:44px;cursor:pointer;border-radius:var(--r)}
.tr-rate-i input{position:absolute;opacity:0;inset:0;cursor:pointer;margin:0}
.tr-rate-i svg{width:28px;height:28px}
.tr-rate-row:has(input[value="1"]:checked) .tr-rate-i:nth-child(-n+1) svg,
.tr-rate-row:has(input[value="2"]:checked) .tr-rate-i:nth-child(-n+2) svg,
.tr-rate-row:has(input[value="3"]:checked) .tr-rate-i:nth-child(-n+3) svg,
.tr-rate-row:has(input[value="4"]:checked) .tr-rate-i:nth-child(-n+4) svg,
.tr-rate-row:has(input[value="5"]:checked) .tr-rate-i:nth-child(-n+5) svg{fill:var(--fg)}
@media (hover:hover){
  .tr-rate-row:hover .tr-rate-i svg{fill:none}
  .tr-rate-row .tr-rate-i:hover svg,.tr-rate-row .tr-rate-i:has(~ .tr-rate-i:hover) svg{fill:var(--fg)}
}

/* ---------- pay screen ---------- */
.tr-pay{padding:18px;border:2px solid var(--fg);border-radius:var(--r);background:var(--surface)}
.tr-pay-grid{display:grid;gap:18px;margin-top:10px}
@media (min-width:640px){.tr-pay-grid{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}}
.tr-huge{margin:0;font-size:clamp(40px,11vw,60px);font-weight:600;line-height:1;letter-spacing:-.03em}
.tr-pay-code{padding:14px;background:var(--bg);border:1px solid var(--rule);border-radius:var(--r)}
.tr-code{margin:0 0 10px;white-space:nowrap;font-size:clamp(26px,8.4vw,40px);font-weight:600;line-height:1.05;letter-spacing:.04em;overflow-wrap:anywhere;user-select:all;-webkit-user-select:all}
.tr-pay-to{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-between;align-items:flex-start;margin-top:18px;padding-top:16px;border-top:1px solid var(--rule)}
.tr-pay-to>div{min-width:0;flex:1 1 220px}
.tr-qr{margin:0;display:grid;gap:4px;justify-items:center}
.tr-qr img{width:160px;height:160px;object-fit:contain;background:#fff;padding:6px;border:1px solid var(--rule);border-radius:var(--r)}
.tr-paysteps{margin:18px 0 0;padding:0;list-style:none;counter-reset:p;display:grid;gap:8px}
.tr-paysteps li{counter-increment:p;display:grid;grid-template-columns:28px 1fr;gap:6px;align-items:baseline;font-size:14.5px;line-height:1.45}
.tr-paysteps li::before{content:counter(p);display:grid;place-items:center;width:22px;height:22px;border:1.5px solid var(--fg);border-radius:50%;font-family:var(--font-mono);font-size:11.5px;font-weight:600;transform:translateY(1px)}
.tr-safety{display:flex;gap:12px;align-items:flex-start;margin:18px 0 0;padding:12px 14px;background:var(--seal-tint);border-radius:var(--r);font-size:14px;line-height:1.45}
.tr-paidform{margin-top:20px;padding-top:18px;border-top:1px solid var(--rule)}

/* ---------- orders list ---------- */
.tr-tabs{display:flex;gap:0;border-bottom:1px solid var(--rule);margin-bottom:12px}
.tr-tab{font:inherit;font-size:15px;font-weight:650;background:none;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;padding:10px 14px;min-height:44px;color:var(--muted);cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.tr-tab[aria-selected="true"]{color:var(--fg);border-bottom-color:var(--fg)}
.tr-seg{display:flex;gap:6px;margin-bottom:14px}
.tr-chip{font:inherit;font-size:13px;padding:6px 12px;min-height:34px;border:1px solid var(--rule);border-radius:var(--r);background:transparent;color:var(--fg);cursor:pointer}
.tr-chip[aria-pressed="true"]{background:var(--fg);color:var(--bg);border-color:var(--fg)}
.tr-olist{margin:0;padding:0;list-style:none;border-top:1px solid var(--rule)}
.tr-oc{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 4px 12px 10px;border-bottom:1px solid var(--rule);color:inherit;text-decoration:none}
.tr-oc:hover{background:var(--surface-2)}
.tr-oc.is-act{box-shadow:inset 3px 0 0 var(--seal);padding-left:10px}
.tr-oc-b{display:grid;gap:4px;min-width:0}
.tr-oc-t{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-oc-m{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:12.5px}
.tr-oc-w{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-oc-r{display:grid;gap:6px;justify-items:end;text-align:right}
.tr-oc-amt{font-weight:600;font-size:15px}
.tr-oc-d{font-size:11.5px}
@media (min-width:900px){.tr-orders{max-width:820px}}

/* ---------- messages ---------- */
.tr-msg{display:grid;grid-template-columns:minmax(0,1fr);max-width:var(--max);margin:0 auto;height:calc(100dvh - var(--tr-chrome,128px));min-height:420px;border-left:1px solid var(--rule);border-right:1px solid var(--rule);background:var(--surface)}
@media (min-width:860px){.tr-msg{grid-template-columns:340px minmax(0,1fr);--tr-chrome:72px;width:calc(100% - 2 * var(--gut));max-width:calc(var(--max) - 2 * var(--gut))}}
.tr-inbox{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--rule)}
.tr-inbox-h{display:flex;align-items:baseline;justify-content:space-between;padding:14px 16px 10px;border-bottom:1px solid var(--rule)}
.tr-inbox-h .tr-h1{margin:0;font-size:22px}
.tr-convs{flex:1;overflow-y:auto;margin:0;padding:0;list-style:none;overscroll-behavior:contain}
.tr-conv{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;padding:12px 16px;border-bottom:1px solid var(--rule);color:inherit;text-decoration:none}
.tr-conv:hover{background:var(--surface-2)}
.tr-conv[aria-current="page"]{background:var(--tint)}
.tr-conv-b{display:grid;gap:2px;min-width:0}
.tr-conv-n{display:flex;align-items:center;gap:6px;min-width:0;font-weight:700;font-size:14.5px}
.tr-conv-n>span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-conv-s{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-conv-p{font-size:13.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-conv.is-unread .tr-conv-p{color:var(--fg);font-weight:600}
.tr-conv-r{display:grid;gap:6px;justify-items:end}
.tr-conv-t{font-family:var(--font-mono);font-size:11px;color:var(--muted);white-space:nowrap}
.tr-conv-r .tr-tile{width:36px}
.tr-thread{display:flex;flex-direction:column;min-height:0;min-width:0;background:var(--bg)}
.tr-thread-empty{display:grid;place-items:center;text-align:center;color:var(--muted);padding:24px}
.tr-thread-empty b{display:block;font-family:var(--font-glyph);font-size:96px;line-height:1;color:var(--rule);font-weight:900;margin-bottom:12px}
@media (max-width:859.98px){
  .tr-msg[data-thread] .tr-inbox{display:none}
  .tr-msg:not([data-thread]) .tr-thread{display:none}
  /* --tr-h comes from visualViewport (keyboard open = shorter); min-height stays small so the composer never drops below the fold */
  .tr-msg{border:0;height:var(--tr-h,calc(100dvh - var(--tr-chrome,128px)));min-height:220px}
  /* an open chat gets the whole phone screen (like WeChat / Xianyu): the header's back arrow leaves, the tab bar steps aside */
  body:has(.tr-msg[data-thread]) .tabbar{display:none}
  body:has(.tr-msg[data-thread]){padding-bottom:0}
}
/* phones: an open chat fills exactly the visible viewport (no page scroll) - messages.js sets body.tr-thread-open */
@media (max-width:760px){
  body.tr-thread-open .foot{display:none}
  body.tr-thread-open{overflow:hidden;overscroll-behavior:none}
}
.tr-th-h{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--rule);background:var(--surface);min-height:56px}
.tr-th-back{display:inline-grid;place-items:center;width:40px;height:40px;margin-left:-6px;color:var(--fg);border-radius:var(--r)}
.tr-th-back::before{content:"";width:9px;height:9px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-left:4px}
@media (min-width:860px){.tr-th-back{display:none}}
.tr-th-who{display:flex;align-items:center;gap:10px;min-width:0;flex:1;color:inherit;text-decoration:none}
.tr-th-who>span:last-child{display:grid;min-width:0}
.tr-th-n{display:flex;align-items:center;gap:6px;font-weight:700;white-space:nowrap;overflow:hidden}
.tr-th-s{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-menu{position:relative}
.tr-icon{display:inline-grid;place-items:center;width:40px;height:40px;border:0;border-radius:var(--r);background:transparent;color:var(--fg);cursor:pointer}
.tr-icon:hover{background:var(--tint)}
.tr-icon svg{width:20px;height:20px}
.tr-menu-pop{position:absolute;right:0;top:44px;z-index:20;min-width:220px;padding:6px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);box-shadow:0 8px 24px var(--shadow)}
.tr-menu-pop a,.tr-menu-pop button{display:flex;width:100%;align-items:center;min-height:40px;padding:0 10px;border:0;border-radius:var(--r);background:none;font:inherit;font-size:14px;color:var(--fg);text-decoration:none;text-align:left;cursor:pointer}
.tr-menu-pop a:hover,.tr-menu-pop button:hover,.tr-menu-pop a:focus-visible,.tr-menu-pop button:focus-visible{background:var(--tint);outline:none}
.tr-menu-pop .is-danger{color:var(--seal)}
.tr-strip{display:flex;gap:8px;align-items:center;padding:6px 12px;font-size:12px;line-height:1.35;color:var(--muted);background:var(--surface-2);border-bottom:1px solid var(--rule)}
.tr-strip .tr-seal{width:13px;height:22px;font-size:8px}
.tr-strip a{color:inherit;text-decoration:underline;text-underline-offset:2px;white-space:nowrap}
.tr-strip .tr-short{display:none}
@media (max-width:480px){.tr-strip .tr-long{display:none}.tr-strip .tr-short{display:inline}}
.tr-ctx{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--rule);background:var(--surface);color:inherit;text-decoration:none;font-size:13.5px}
.tr-ctx .tr-tile{width:32px}
.tr-ctx-t{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.tr-ctx .tr-btn{flex:none}
.tr-scroll{flex:1;overflow-y:auto;padding:12px 12px 4px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.tr-older{display:flex;justify-content:center;margin-bottom:8px}
.tr-day{display:flex;justify-content:center;margin:14px 0 8px}
.tr-day span{font-family:var(--font-mono);font-size:11px;color:var(--muted);padding:2px 8px;background:var(--bg)}
.tr-grp{display:flex;gap:8px;align-items:flex-end;margin:6px 0}
.tr-grp.is-me{flex-direction:row-reverse}
.tr-grp .tr-av{margin-bottom:2px}
.tr-grp-b{display:flex;flex-direction:column;gap:3px;min-width:0;max-width:min(78%,560px);align-items:flex-start}
.tr-grp.is-me .tr-grp-b{align-items:flex-end}
.tr-m{position:relative;display:flex;flex-direction:column;gap:4px;max-width:100%}
.tr-grp.is-me .tr-m{align-items:flex-end}
.tr-bub{padding:8px 12px;border-radius:12px 12px 12px 3px;background:var(--surface);border:1px solid var(--rule);font-size:15px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}
.tr-grp.is-me .tr-bub{background:var(--fg);color:var(--bg);border-color:var(--fg);border-radius:12px 12px 3px 12px}
.tr-m.is-pending .tr-bub{opacity:.6}
.tr-m.is-failed .tr-bub{border-color:var(--seal);box-shadow:0 0 0 1px var(--seal)}
.tr-m-meta{display:flex;gap:8px;align-items:center;font-size:11px;color:var(--muted);padding:0 4px}
.tr-m-meta time{font-family:var(--font-mono)}
.tr-m-meta button{font:inherit;font-size:11.5px;color:var(--muted);background:none;border:0;padding:4px 2px;min-height:24px;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.tr-m-meta button:hover{color:var(--fg)}
.tr-m-meta .tr-retry{color:var(--seal);color:color-mix(in srgb,var(--seal) 82%,var(--fg));font-weight:650}
.tr-tr{padding:6px 10px;border-left:2px solid var(--rule);font-size:14px;color:var(--fg);white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}
.tr-img{display:block;padding:0;border:1px solid var(--rule);border-radius:10px;overflow:hidden;background:var(--tint);cursor:zoom-in;max-width:240px}
.tr-img img{display:block;width:100%;height:auto;max-height:320px;object-fit:cover}
.tr-lcard{display:flex;gap:10px;align-items:center;width:min(280px,100%);padding:8px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);color:var(--fg);text-decoration:none}
.tr-lcard:hover{border-color:var(--fg)}
.tr-lcard .tr-tile{width:44px}
.tr-lcard-b{display:grid;gap:2px;min-width:0;font-size:13.5px}
.tr-lcard-b strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.3;overflow-wrap:anywhere}
.tr-sys{display:flex;justify-content:center;margin:10px 0}
.tr-sys a,.tr-sys>div{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;justify-content:center;max-width:min(92%,460px);padding:7px 12px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface-2);font-size:12.5px;color:var(--muted);text-decoration:none;text-align:center}
.tr-sys a:hover{border-color:var(--fg);color:var(--fg)}
.tr-sys strong{color:var(--fg);font-weight:650}
.tr-warncard{display:flex;gap:8px;align-items:flex-start;max-width:min(100%,360px);padding:8px 10px;border:1px solid var(--seal);border-radius:var(--r);background:var(--seal-tint);color:var(--fg);font-size:12.5px;line-height:1.4}
.tr-warncard::before{content:"!";flex:none;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:var(--seal-solid,var(--seal));color:var(--seal-fg);font-weight:800;font-size:12px}
.tr-warncard a:not(.tr-btn){color:inherit;font-weight:650}
.tr-compose{display:flex;gap:8px;align-items:flex-end;padding:8px 10px calc(8px + env(safe-area-inset-bottom));border-top:1px solid var(--rule);background:var(--surface)}
.tr-compose textarea{flex:1;min-width:0;font:inherit;font-size:16px;line-height:1.4;min-height:44px;max-height:160px;padding:10px 12px;border:1px solid var(--rule);border-radius:var(--r);background:var(--bg);color:var(--fg);resize:none}
.tr-compose textarea:focus{outline:none;border-color:var(--fg)}
.tr-attach{position:relative;display:inline-grid;place-items:center;width:44px;height:44px;flex:none;border:1px solid var(--rule);border-radius:var(--r);color:var(--fg);cursor:pointer}
.tr-attach:hover{border-color:var(--fg)}
.tr-attach svg{width:20px;height:20px}
.tr-compose .tr-btn{flex:none}
.tr-blocked{padding:14px 16px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--rule);background:var(--surface-2);font-size:14px;color:var(--muted);display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
.tr-lightbox{padding:0;border:0;background:transparent;max-width:100vw;max-height:100vh;width:100vw;height:100vh}
.tr-lightbox::backdrop{background:rgba(0,0,0,.88)}
.tr-lightbox[open]{display:grid;place-items:center}
.tr-lightbox img{max-width:96vw;max-height:88vh;object-fit:contain}
.tr-lightbox button{position:fixed;top:calc(12px + env(safe-area-inset-top));right:12px;width:44px;height:44px;border:1px solid rgba(255,255,255,.4);border-radius:50%;background:rgba(0,0,0,.5);color:#fff;font-size:22px;cursor:pointer}

/* ---------- jury ---------- */
.tr-jury{max-width:880px}
.tr-jintro{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start;padding:0;margin-bottom:20px;border:0;background:none}
.tr-jintro b{font-family:var(--font-glyph);font-weight:900;font-size:30px;line-height:1;color:var(--seal)}
.tr-jintro p{margin:0 0 6px;font-size:14px;line-height:1.5;max-width:64ch;color:var(--muted)}
.tr-jintro p:last-child{margin:0}
.tr-jcase{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 4px;border-bottom:1px solid var(--rule);color:inherit;text-decoration:none}
.tr-jcase:hover{background:var(--surface-2)}
.tr-jgrid{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}
@media (min-width:760px){.tr-jgrid{grid-template-columns:1fr 1fr}}
.tr-side{padding:16px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface)}
.tr-side h2{display:flex;align-items:center;gap:8px}
.tr-side h2 i{font-style:normal;font-family:var(--font-mono);font-size:11px;font-weight:600;padding:2px 6px;border:1px solid currentColor;border-radius:2px}
.tr-side.is-buyer h2 i{color:var(--info)}.tr-side.is-seller h2 i{color:var(--warn)}
.tr-side p{white-space:pre-wrap;overflow-wrap:anywhere}
.tr-vote{margin-top:18px;padding:18px;border:2px solid var(--fg);border-radius:var(--r);background:var(--surface)}
.tr-vote-opts{display:grid;gap:8px;grid-template-columns:minmax(0,1fr)}
@media (min-width:560px){.tr-vote-opts{grid-template-columns:1fr 1fr}}
.tr-tally{display:grid;gap:8px;margin-top:10px}
.tr-tally-row{display:grid;grid-template-columns:minmax(90px,auto) 1fr auto;gap:10px;align-items:center;font-size:14px}
.tr-tally-row .tr-bar{margin:0;height:10px}
.tr-verdict{margin-top:18px;padding:16px;border:1px solid var(--fg);border-radius:var(--r);display:flex;gap:14px;align-items:center}
.tr-verdict .tr-seal{width:26px;height:46px;font-size:13px;flex:none}
.tr-verdict p{margin:0;font-weight:650}
.tr-tl{margin:0;padding:0;list-style:none;display:grid;gap:6px}
.tr-tl li{display:grid;grid-template-columns:auto 1fr;gap:10px;font-size:13.5px}
.tr-tl time{font-family:var(--font-mono);font-size:12px;color:var(--muted)}

@media (prefers-reduced-motion:reduce){
  .tr-spin,.tr-checking span{animation:none}
  .tr-btn,.tr-more>summary::before{transition:none}
}
.tr-compose>.tr-btn,.tr-compose>.tr-attach{align-self:flex-end}

/* polish: full-width primary actions on phones */
@media (max-width:520px){.tr-form>.tr-btn,.tr-vote>.tr-btn{width:100%}}

/* ---- v1.2: special price, cash, mood reviews ---- */
.tr-seal-sm{width:22px;height:22px;font-size:8.5px;border-radius:2px}
.tr-offer-bar{display:flex;justify-content:flex-end;padding:6px 12px;border-bottom:1px solid var(--rule);background:var(--surface)}
.tr-offer-btn{display:inline-flex;align-items:center;gap:8px;min-height:36px}
.tr-ofc{position:relative;width:min(300px,100%);padding:14px 14px 12px;border:1px solid var(--seal);border-radius:var(--r);background:var(--surface);color:var(--fg);overflow:hidden}
.tr-ofc::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--seal)}
.tr-ofc-seal{position:absolute;top:10px;right:10px;display:inline-grid;place-items:center;padding:3px 5px;border:1.5px solid var(--seal);color:var(--seal);font-family:var(--font-glyph);font-weight:900;font-size:11px;border-radius:3px;transform:rotate(6deg);line-height:1.1}
.tr-ofc-h{margin:0 64px 2px 0;font-size:13px;font-weight:600}
.tr-ofc-item{margin:0 0 6px;font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tr-ofc-p{margin:0;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.tr-ofc-now{font-size:26px;font-weight:700;color:var(--seal);line-height:1.1}
.tr-ofc-p s{font-size:12.5px;color:var(--muted)}
.tr-ofc-exp{margin:2px 0 0;font-size:11.5px;color:var(--muted)}
.tr-ofc-a{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}
.tr-ofc-a .tr-btn{min-height:40px}
.tr-ofc-st{font-size:12.5px;color:var(--muted)}
.tr-ofc.is-dead{border-color:var(--rule)}
.tr-ofc.is-dead::before{background:var(--rule)}
.tr-ofc.is-dead .tr-ofc-seal{border-color:var(--faint);color:var(--faint)}
.tr-ofc.is-dead .tr-ofc-now{color:var(--muted);text-decoration:line-through;text-decoration-thickness:1px}
.tr-yuan{display:flex;align-items:center;gap:6px;font-family:var(--font-mono);font-size:18px}
.tr-yuan input{flex:1;min-width:0;font-size:18px}
.tr-offer-now{color:var(--seal)}
.tr-offer-tag{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:4px 0 0;font-size:12.5px}
.tr-cash-pill{color:var(--fg);border-color:var(--fg);background:var(--warn-tint)}
.tr-cash-amt{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0}
.tr-opt-cash:has(input:checked){border-color:var(--warn)}
.tr-moods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}
.tr-mood{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;min-height:96px;padding:12px 4px 10px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);cursor:pointer;transition:border-color .15s var(--ease),transform .15s var(--ease)}
.tr-mood input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.tr-mood .mood-face{transition:transform .2s var(--ease)}
.tr-mood-l{font-size:14px;font-weight:600}
.tr-mood:hover{border-color:var(--muted)}
.tr-mood:has(input:checked){border-color:var(--fg);border-width:2px;padding:11px 3px 9px;background:var(--tint)}
.tr-mood:has(input:checked) .mood-face{transform:scale(1.1)}
.tr-mood:has(input:focus-visible){outline:2px solid var(--fg);outline-offset:2px}
.tr-mood-show{display:flex;align-items:center;gap:10px;margin:6px 0}
.tr-mood-show strong{font-size:16px}
@media (prefers-reduced-motion:reduce){.tr-mood,.tr-mood .mood-face{transition:none}.tr-mood:has(input:checked) .mood-face{transform:none}}
.tr-st-awaiting_meetup{color:var(--warn)}
.tr-err{margin:6px 0 0;font-size:12.5px;color:var(--seal)}

/* ---------- v1.3: per-product chats (inbox rows + thread header) ---------- */
.tr-inbox-h{flex-wrap:wrap;gap:8px 12px;align-items:center}
.tr-inbox-f{margin:0;gap:4px}
.tr-inbox-f .tr-chip{min-height:32px;padding:4px 10px;font-size:12.5px}
.tr-conv-item{align-items:start}
.tr-conv-item>.tr-tile{width:52px;margin-top:2px}
.tr-conv-item.is-closed>.tr-tile{opacity:.7}
.tr-conv-pr{display:flex;align-items:center;gap:6px;font-size:13px;min-width:0}
.tr-conv-pr .tr-mono{font-weight:650}
.tr-conv-who{display:flex;align-items:center;gap:6px;min-width:0;font-size:12.5px;color:var(--muted)}
.tr-conv-who>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-conv-who .tr-av{font-size:10px}
.tr-conv-item .tr-conv-r{align-self:start;padding-top:2px}
.tr-pill-sold,.tr-pill-removed{color:var(--muted)}
.tr-pill-reserved{color:var(--seal)}
.tr-th-item{display:flex;align-items:center;gap:10px;min-width:0;flex:1;color:inherit;text-decoration:none;border-radius:var(--r)}
.tr-th-item:focus-visible,.tr-th-who:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
.tr-th-item .tr-tile{width:36px}
.tr-th-item>span:last-child{display:grid;gap:2px;min-width:0}
.tr-th-title{display:block;overflow:hidden;text-overflow:ellipsis}
.tr-th-item:hover .tr-th-title{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.tr-th-pr{display:flex;align-items:center;gap:6px;font-size:13px}
.tr-th-pr .tr-mono{font-weight:650}
.tr-th-person{display:flex;align-items:center;gap:8px;padding:6px 12px;border-bottom:1px solid var(--rule);background:var(--surface);min-height:48px}
.tr-th-person .tr-th-who{gap:8px}
.tr-th-person .tr-th-n{font-size:13.5px}
.tr-th-person .tr-btn{flex:none}
.tr-th-person .tr-offer-btn{gap:6px}
.tr-th-person .tr-short{display:none}
@media (max-width:420px){.tr-th-person .tr-offer-btn .tr-long{display:none}.tr-th-person .tr-offer-btn .tr-short{display:inline}}
.tr-hint-box{margin:0 0 20px}

/* ---------- v1.4: Xianyu order tabs, status header, timeline, seller progress ---------- */
/* status filter row (全部 / 待付款 / 待发货 …): one line that scrolls sideways on phones */
.tr-stabs{display:flex;gap:6px;margin:0 calc(-1 * var(--gut)) 14px;padding:2px var(--gut) 4px;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scroll-padding-inline:var(--gut)}
.tr-stabs::-webkit-scrollbar{display:none}
@media (min-width:700px){.tr-stabs{margin-left:0;margin-right:0;padding-left:0;padding-right:0;flex-wrap:wrap;overflow:visible}}
.tr-st{flex:none;scroll-snap-align:start;display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:13.5px;font-weight:600;min-height:36px;padding:0 12px;border:1px solid var(--rule);border-radius:var(--r);background:transparent;color:var(--muted);cursor:pointer;white-space:nowrap;transition:border-color .15s,color .15s}
.tr-st:hover{border-color:var(--muted);color:var(--fg)}
.tr-st[aria-pressed="true"]{background:var(--fg);border-color:var(--fg);color:var(--bg)}
.tr-st:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
.tr-st .tr-count{min-width:17px;height:17px;font-size:10.5px}
/* order cards: the reader's headline first, then the item, then the newest progress line */
.tr-oc{align-items:start}
.tr-oc>.tr-tile{margin-top:2px}
.tr-oc-h{font-weight:750;font-size:14.5px;line-height:1.3;color:var(--fg);overflow-wrap:anywhere}
.tr-oc .tr-oc-t{font-weight:500;font-size:14px}
/* last event: one tidy line, the event shortens and the time never breaks ("Marked as delivered · 20 Nov, 00:34") */
.tr-oc-f{color:var(--faint)}
.tr-oc-r{padding-top:2px}

/* status header (Xianyu 订单状态): the big line the whole page hangs off */
.tr-sh{margin:6px 0 4px;padding:16px 0 0;border-top:3px solid var(--fg)}
.tr-sh-warn{border-top-color:var(--warn)}
.tr-sh-info{border-top-color:var(--info)}
.tr-sh-ok{border-top-color:var(--ok)}
.tr-sh-off{border-top-color:var(--faint)}
.tr-sh-meta{margin:0 0 10px;display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;font-size:13px}
.tr-sh-t{margin:0;font-size:clamp(28px,6.4vw,46px);line-height:1.08;font-weight:800;letter-spacing:-.035em;overflow-wrap:anywhere;text-wrap:balance;max-width:22ch}
:lang(zh-CN) .tr-sh-t,.tr-sh-t:lang(zh-CN){letter-spacing:0;line-height:1.2}
html[lang^="zh"] .tr-sh-t{letter-spacing:0;line-height:1.2;max-width:16em}
.tr-sh-off .tr-sh-t{color:var(--muted)}
.tr-sh-sub{margin:8px 0 0;max-width:60ch;font-size:15.5px;line-height:1.45;color:var(--muted)}
.tr-sh-cd{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px;margin:12px 0 0;font-size:14px;color:var(--muted)}
.tr-sh-cd .tr-cd{font-size:22px;font-weight:600;letter-spacing:-.01em}
.tr-sh-item{display:flex;align-items:center;gap:10px;margin-top:14px;padding:10px 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);color:inherit;text-decoration:none;font-size:14px}
.tr-sh-item .tr-tile{width:36px}
.tr-sh-it{flex:1;min-width:0;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-sh-item:hover .tr-sh-it{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.tr-sh-item:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
@media (min-width:900px){.tr-sh-item{display:none}}
/* small phones: a tighter status header so the next action shows above the fold */
@media (max-width:400px){.tr-sh{padding-top:12px}.tr-sh-t{font-size:clamp(23px,7.4vw,28px)}.tr-sh-sub{font-size:14.5px;margin-top:6px}.tr-sh-cd{margin-top:8px}.tr-sh-cd .tr-cd{font-size:19px}.tr-sh-item{margin-top:10px;padding:8px 0}.tr-sh-item .tr-tile{width:36px}}

/* vertical timeline, newest first: current entry in ink with a filled dot, older ones quiet with hollow dots */
.tr-tlv{margin:4px 0 0;padding:0;list-style:none}
.tr-tlv-i{position:relative;display:grid;grid-template-columns:20px minmax(0,1fr);gap:8px;padding-bottom:14px}
.tr-tlv-i:last-child{padding-bottom:0}
.tr-tlv-i::before{content:"";position:absolute;left:9px;top:14px;bottom:-2px;width:1px;background:var(--rule)}
.tr-tlv-i:last-child::before{display:none}
.tr-tlv-dot{position:relative;justify-self:center;margin-top:5px;width:9px;height:9px;border-radius:50%;border:1.5px solid var(--faint);background:var(--surface)}
.tr-tlv-i.is-now .tr-tlv-dot{width:11px;height:11px;margin-top:4px;border-color:var(--fg);background:var(--fg);box-shadow:0 0 0 3px var(--surface),0 0 0 4px var(--rule)}
.tr-tlv-b{min-width:0;display:grid;gap:3px}
.tr-tlv-t{margin:0;font-size:14px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
.tr-tlv-i.is-now .tr-tlv-t{color:var(--fg);font-weight:650;font-size:15px}
.tr-tlv-n{margin:2px 0 0;padding:1px 0 1px 9px;border-left:2px solid var(--rule);font-size:13.5px;line-height:1.45;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}
.tr-tlv-i.is-now .tr-tlv-n{border-left-color:var(--fg);color:var(--fg)}
.tr-tlv-trk{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:4px 0 0;font-size:13.5px}
.tr-tlv-trk .tr-mono{font-weight:600;letter-spacing:.02em}
.tr-tlv-trk .tr-btn{min-height:30px}
.tr-tlv-at{font-size:11.5px;color:var(--muted)}
.tr-tlc{margin-top:14px}

/* seller progress updates (开始备货 / 可以见面了 / 运输中 / 派送中 / 发布进度) */
.tr-prog .tr-h3{margin-bottom:2px}
.tr-prog-hint{margin-top:0}
.tr-prog .tr-form{margin-top:10px}
.tr-prog-acts{display:flex;flex-wrap:wrap;gap:8px}
.tr-prog-acts .tr-btn:disabled{opacity:1;color:var(--ok);border-color:var(--ok);background:var(--ok-tint)}
.tr-ck{flex:none}
@media (max-width:520px){.tr-prog-acts .tr-btn{flex:1 1 auto}}
.tr-late{margin-bottom:14px}
.tr-mood-at{font-size:11.5px;margin-left:auto}
.tr-rv-c{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
@media (prefers-reduced-motion:reduce){.tr-st{transition:none}}

/* ---------- v1.5 appeals (CONTRACT §16): suspended-account screen on /login + order/jury appeal cards ---------- */
.tr-ban-kv{margin:0 0 16px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface)}
.tr-ban-kv>div{display:grid;grid-template-columns:minmax(84px,30%) 1fr;gap:12px;padding:11px 14px;border-top:1px solid var(--rule);font-size:15px}
.tr-ban-kv>div:first-child{border-top:0}
.tr-ban-kv dt{color:var(--muted);font-size:13.5px;font-weight:600}
.tr-ban-kv dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}
.tr-ban-none{color:var(--muted)}
.tr-ban-mono{font-family:var(--font-mono);font-variant-numeric:tabular-nums}
.tr-ban-st{margin:0 0 18px;padding:14px 16px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);box-shadow:inset 3px 0 0 var(--fg)}
.tr-ban-st.tr-info{border-color:var(--info);box-shadow:inset 3px 0 0 var(--info)}
.tr-ban-st.tr-warn{border-color:var(--warn);box-shadow:inset 3px 0 0 var(--warn)}
.tr-ban-st.tr-ok{border-color:var(--ok);box-shadow:inset 3px 0 0 var(--ok)}
.tr-ban-st p{margin:6px 0 0;font-size:15px;line-height:1.55}
.tr-ban-st p:empty{display:none}
.tr-ban-h{margin:0;font-size:17px;line-height:1.3;font-weight:750;letter-spacing:-.01em}
.tr-ban-q{padding:9px 12px;border-left:2px solid var(--fg);background:var(--surface-2);overflow-wrap:anywhere;white-space:pre-wrap}
.tr-ban-q>span{display:block;margin-bottom:2px;color:var(--muted);font-size:12.5px;font-weight:650}
.tr-ban-form{padding-top:6px;border-top:1px solid var(--rule)}
.tr-ban-hint{margin:0;color:var(--muted);font-size:13.5px;line-height:1.5}
.tr-ban-count{text-align:right;font-family:var(--font-mono)}
.tr-ban .alt{margin-top:22px}
.tr-ban .alt a{color:var(--fg);text-underline-offset:3px}

/* order page: appeal card (shared by both sides) */
.tr-appeal{margin-top:14px;padding:16px 18px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface)}
.tr-appeal.tr-go{border-color:var(--fg);box-shadow:inset 3px 0 0 var(--fg)}
.tr-appeal.tr-warn{border-color:var(--warn);box-shadow:inset 3px 0 0 var(--warn)}
.tr-appeal.tr-info{border-color:var(--info);box-shadow:inset 3px 0 0 var(--info)}
.tr-appeal.tr-ok{border-color:var(--ok);box-shadow:inset 3px 0 0 var(--ok)}
.tr-appeal .tr-h2{margin-bottom:4px}
.tr-appeal-body{margin:0;color:var(--muted);font-size:14.5px;line-height:1.55}
.tr-appeal-by{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin:12px 0 0;padding:8px 12px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface-2);font-size:14px}
.tr-appeal-by .tr-cd{font-size:15px;font-weight:600}
.tr-appeal-by.is-held{border-color:var(--warn);background:var(--warn-tint)}
.tr-appeal .tr-quote{margin-top:12px}
.tr-appeal-out{display:flex;gap:10px;align-items:flex-start;margin-top:12px}
.tr-appeal-out .tr-pill{margin-top:2px}
.tr-appeal-note{margin:0}
@media (max-width:520px){.tr-appeal{padding:14px}.tr-ban-kv>div{grid-template-columns:1fr;gap:2px}}

/* jury case page: appeal line */
.tr-jappeal{margin:12px 0 0;padding:10px 14px;border:1px solid var(--rule);border-left:3px solid var(--info);border-radius:0 var(--r) var(--r) 0;background:var(--info-tint);font-size:14.5px;line-height:1.5}
.tr-jappeal p{margin:0}
.tr-jappeal p+p{margin-top:4px}
.tr-jappeal .tr-mono{font-weight:600}

/* ---------- v1.6 (CONTRACT §17): quantity, photo/video evidence, nudges, avatars ---------- */
.tr-av-img{overflow:hidden;background:var(--tint)}
.tr-av-img img{display:block;width:100%;height:100%;object-fit:cover}

/* checkout quantity stepper (库存) */
.tr-left{margin:4px 0 0;font-size:12.5px;font-weight:600;color:var(--muted)}
.tr-qty-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 12px}
.tr-qty-row .tr-h2{margin:0}
.tr-qty-row .tr-hint{grid-column:1/-1;margin:0}
.tr-qty{display:inline-flex;align-items:stretch;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface)}
.tr-qty-b{font:inherit;font-size:20px;line-height:1;width:44px;min-height:44px;border:0;background:transparent;color:var(--fg);cursor:pointer}
.tr-qty-b:disabled{color:var(--faint);cursor:default}
.tr-qty-b:hover:not(:disabled){background:var(--tint)}
.tr-qty-b:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}
.tr-qty input{width:56px;min-height:44px;border:0;border-left:1px solid var(--rule);border-right:1px solid var(--rule);border-radius:0;background:transparent;color:var(--fg);text-align:center;font-size:17px;font-weight:600;-moz-appearance:textfield;appearance:textfield}
.tr-qty input::-webkit-outer-spin-button,.tr-qty input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.tr-qty input:focus{outline:2px solid var(--fg);outline-offset:-2px}
.tr-oc-q{font-size:13px;font-weight:600;color:var(--muted);white-space:nowrap}
.tr-oc-unit{font-size:11.5px}

/* videos: real players, never tiny thumbnails */
.tr-vids{display:grid;gap:8px;margin-top:8px;max-width:420px}
.tr-vid{position:relative;margin:0;border:1px solid var(--rule);border-radius:var(--r);overflow:hidden;background:#000}
.tr-vid video{display:block;width:100%;max-height:420px;background:#000}
.tr-vid.is-compact video{max-height:300px}
.tr-vid figcaption{margin:0;padding:6px 10px;background:var(--surface-2)}
.tr-vid.is-proc{background:var(--tint)}
.tr-vid-ph{position:relative;display:grid;place-items:center;aspect-ratio:16/9;background:var(--tint) center/cover no-repeat}
.tr-vid-ph[style]::before{content:"";position:absolute;inset:0;background:var(--overlay)}
.tr-vid-proc{position:relative;display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border-radius:var(--r);background:var(--surface);color:var(--fg);font-size:13.5px;font-weight:650;border:1px solid var(--rule)}
.tr-vid-dur{position:absolute;right:8px;bottom:8px;padding:2px 6px;border-radius:2px;background:var(--overlay);color:#fff;font-size:11.5px}

/* picker: uploading tile with real progress, video tiles */
.tr-pick-item.is-busy{width:auto;min-width:120px;padding:0 10px;place-items:stretch}
.tr-pick-prog{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:2px 8px;align-self:center;font-size:12px}
.tr-pick-prog .tr-spin{width:14px;height:14px;grid-row:span 2}
.tr-pick-prog b{font-weight:650}
.tr-pick-prog i{font-style:normal;color:var(--muted);font-size:11px}
.tr-pick-bar{grid-column:1/-1;display:block;height:3px;margin-top:4px;background:var(--rule);border-radius:1px;overflow:hidden}
.tr-pick-bar>span{display:block;height:100%;width:0;background:var(--fg);transition:width .2s linear}
.tr-pick-item.is-vid{background:#1c1c1a;color:#fff}
.tr-pick-item.is-vid img{position:absolute;inset:0;opacity:.75}
.tr-pick-play{position:relative;display:grid;place-items:center}
.tr-pick-meta{position:absolute;left:3px;bottom:3px;padding:0 4px;border-radius:2px;background:rgba(0,0,0,.55);color:#fff;font-size:10px;line-height:15px}
.tr-pick-add svg{flex:none}
.tr-pick-lim{margin-top:2px}
@media (hover:hover) and (pointer:fine){.tr-pick-rec{display:none}}
.tr-pick-add[hidden]{display:none}

/* order: evidence card (上传开箱视频) */
.tr-ev{position:relative}
.tr-ev .tr-h3{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin:0 0 2px;padding-right:36px}
.tr-ev-t{font-weight:700}
.tr-ev-t2{font-weight:500;font-size:13px;color:var(--muted)}
.tr-ev-ic{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:var(--r);border:1px solid var(--rule);color:var(--fg);flex:none}
.tr-ev.is-hot{border-color:var(--fg)}
.tr-ev.is-hot>.tr-ev-ic{position:absolute;top:12px;right:12px}
.tr-ev-body{margin:0 0 10px;max-width:60ch}
.tr-ev-d>summary{display:flex;align-items:center;gap:10px;min-height:36px;cursor:pointer;list-style:none;font-size:14px}
.tr-ev-d>summary::-webkit-details-marker{display:none}
.tr-ev-d>summary::after{content:"";margin-left:auto;width:6px;height:6px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(45deg);transition:transform .15s}
.tr-ev-d[open]>summary::after{transform:rotate(-135deg)}
.tr-ev-d>summary:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
.tr-ev-d[open]>.tr-ev-body{margin-top:8px}
.tr-tlv-media .tr-photos{margin-top:4px}
.tr-tlv-media .tr-vids{margin-top:4px;max-width:360px}

/* order: nudges (催发货 / 催收货 / 催退款) */
.tr-nudge{display:grid;gap:10px;padding:12px 16px}
.tr-nudge-r{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px}
.tr-nudge-r .tr-hint{margin:0;flex:1 1 220px}
.tr-nudge-b{gap:10px}
.tr-nudge-zh{display:inline-grid;place-items:center;height:22px;padding:0 6px;border-radius:2px;background:var(--seal-solid,var(--seal));color:var(--seal-fg);font-family:var(--font-glyph);font-weight:900;font-size:12px;letter-spacing:.04em}
.tr-nudge-b:disabled .tr-nudge-zh{background:var(--faint)}
.tr-nudge-sent{display:inline-flex;align-items:center;gap:6px;color:var(--ok);font-weight:600}
.tr-nudge-sent .tr-ck{flex:none}
@media (max-width:520px){.tr-nudge-b{width:100%}}

/* chat: video messages */
.tr-mvid{width:min(280px,72vw)}
.tr-mvid .tr-vid{border-radius:10px}
.tr-mvid.is-up{position:relative;border:1px solid var(--rule);border-radius:10px;overflow:hidden;background:#000}

.tr-mvid-up{position:absolute;left:8px;right:8px;bottom:8px;display:grid;gap:4px;padding:6px 8px;border-radius:var(--r);background:var(--surface);color:var(--fg);font-size:12px}
.tr-mvid-up .tr-pick-bar{margin:0}

/* jury: evidence added to the order later */
.tr-jev-l{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.tr-jev-i{padding-top:10px;border-top:1px solid var(--rule)}
.tr-jev-i:first-child{padding-top:0;border-top:0}
.tr-jev-i p{margin:0 0 4px;white-space:pre-wrap;overflow-wrap:anywhere}
.tr-jev-who{font-style:normal;font-family:var(--font-mono);font-size:11px;font-weight:600;padding:1px 5px;margin-right:6px;border:1px solid currentColor;border-radius:2px}
@media (prefers-reduced-motion:reduce){.tr-pick-bar>span,.tr-ev-d>summary::after{transition:none}}
.tr-mvid-ph{display:grid;place-items:center;aspect-ratio:16/9;color:rgba(255,255,255,.7);background:#1c1c1a}

/* Order numbers: 12 digits in mono, grouped in fours (CONTRACT §18). Inline spans so copying yields the bare number. */
.tr-no{white-space:nowrap;font-family:var(--font-mono);font-size:.92em;letter-spacing:.02em;font-variant-numeric:tabular-nums}
.tr-no>span:not(.tr-no-l){margin-right:.42em}
.tr-no>span:not(.tr-no-l):last-child{margin-right:0}
.tr-no>.tr-no-l{font-family:inherit;color:var(--muted)}
/* chat system card: order number + latest status on one quiet line */
.tr-sys strong{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;justify-content:center}
.tr-sys-st{font-weight:600}
.tr-sys-st::before{content:"/";margin-right:8px;color:var(--faint);font-weight:400}
.tr-sum-unit{font-size:13px;font-weight:500;margin-left:4px}
/* order cards on phones: the "Your move" flag moves under the headline so the text column keeps its width */
.tr-oc-flag-m{display:none}
@media (max-width:520px){.tr-oc-flag-m{display:inline-flex}.tr-oc-flag{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}
.tr-oc{position:relative}
@media (max-width:520px){.tr-oc-d{display:none}.tr-oc{gap:10px}}
.tr-fset>.tr-f2+.tr-field{margin-top:12px}.tr-fset>legend+.tr-f2{margin-top:2px}
/* jury list rows: vote state + countdown on one line under the pill */
.tr-jcase{align-items:start}
.tr-jcase>.tr-tile{margin-top:2px}
.tr-jc-w{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;font-size:12.5px}
.tr-jc-cd .tr-cd{font-size:13px}
/* bigger touch target for the small "Translate / Retry" text buttons without moving the layout */
.tr-m-meta button{position:relative}.tr-m-meta button::after{content:"";position:absolute;inset:-10px -6px}

/* ===== v1.8 chat (§19 + round-4 item 6): compact phone header, slim safety line, attachment panel, new bubbles ===== */
.tr-thread{position:relative}
/* header: tile + (title / price · status · person) */
.tr-th-main{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.tr-th-tl{display:block;flex:none;border-radius:var(--r)}
.tr-th-tl .tr-tile{width:36px}
.tr-th-tx{display:grid;gap:2px;min-width:0}
.tr-th-main .tr-th-item{display:block;min-width:0;flex:initial;color:inherit;text-decoration:none}
.tr-th-main .tr-th-item>.tr-th-title{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} /* beats .tr-th-item>span:last-child (grid kills the ellipsis) */
.tr-th-pr{min-width:0;white-space:nowrap}
.tr-th-pp{display:none}
.tr-th-acts{display:none}
.tr-th-ofr{display:inline-grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);cursor:pointer}
.tr-th-ofr:hover{border-color:var(--fg)}
.tr-th-ofr:focus-visible,.tr-th-pp:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
@media (max-width:640px){
  .tr-th-h.has-item{gap:6px;padding:5px 6px 5px 4px;min-height:50px}
  .tr-th-h.has-item .tr-th-back{width:34px;height:40px;margin-left:0}
  .tr-th-h.has-item .tr-th-main{gap:8px}
  .tr-th-h.has-item .tr-th-tl .tr-tile{width:32px}
  .tr-th-h.has-item .tr-th-title{font-size:14px;line-height:1.3}
  .tr-th-h.has-item .tr-th-pr{display:flex;align-items:center;gap:5px;font-size:12px;line-height:1.3;overflow:hidden}
  .tr-th-h.has-item .tr-th-pr .tr-pill{font-size:10.5px;padding:0 4px;line-height:1.45}
  .tr-th-pp{display:inline-flex;align-items:center;gap:4px;min-width:0;color:var(--muted);text-decoration:none;font-size:12px}
  .tr-th-pp::before{content:"·";margin-right:1px;color:var(--faint)}
  .tr-th-ppn{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg);font-weight:600}
  .tr-th-pp .tr-seal{width:auto;height:14px;padding:0 2px;writing-mode:horizontal-tb;font-size:8.5px;flex:none}
  .tr-th-pp:hover .tr-th-ppn{text-decoration:underline;text-underline-offset:2px}
  .tr-th-acts{display:flex;align-items:center;gap:6px;flex:none}
  .tr-th-acts .tr-btn{min-height:34px;padding:0 12px}
  .tr-th-h.has-item .tr-menu .tr-icon{width:36px}
  .tr-th-person{display:none}
  /* one slim safety line */
  .tr-strip{gap:6px;padding:3px 12px;font-size:11.5px;line-height:1.4;white-space:nowrap}
  .tr-strip .tr-seal{width:auto;height:15px;padding:0 3px;writing-mode:horizontal-tb;font-size:8.5px;flex:none}
  .tr-strip-t{min-width:0;overflow:hidden;text-overflow:ellipsis}
  .tr-strip .tr-long{display:none}.tr-strip .tr-short{display:inline}
}

/* composer + button */
.tr-attach{background:var(--surface);padding:0;font:inherit}
.tr-attach svg{transition:transform .18s var(--ease)}
.tr-attach[aria-expanded="true"]{border-color:var(--fg);background:var(--fg);color:var(--bg)}
.tr-attach[aria-expanded="true"] svg{transform:rotate(45deg)}
.tr-attach:focus-visible{outline:2px solid var(--fg);outline-offset:2px}

/* attachment panel: popover above the composer on desktop, bottom sheet on phones */
.tr-ap[hidden]{display:none}
.tr-ap-scrim{display:none}
.tr-ap-card{position:absolute;z-index:30;left:10px;bottom:calc(64px + env(safe-area-inset-bottom));width:min(372px,calc(100% - 20px));max-height:min(480px,calc(100% - 90px));overflow:auto;padding:4px 14px 14px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);box-shadow:0 12px 32px var(--shadow);overscroll-behavior:contain}
.tr-ap-grab{display:none}
.tr-ap-h{display:flex;align-items:center;gap:4px;min-height:48px;margin:0 -6px 2px;border-bottom:1px solid var(--rule)}
.tr-ap-t{flex:1;margin:0 6px;font-size:15px;font-weight:750;letter-spacing:-.01em}
.tr-ap-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px;padding:14px 0 6px}
.tr-ap-tile{display:flex;flex-direction:column;align-items:center;gap:7px;padding:4px 0;border:0;background:none;color:var(--fg);font:inherit;font-size:13px;font-weight:600;cursor:pointer;-webkit-tap-highlight-color:transparent}
.tr-ap-ic{display:grid;place-items:center;width:58px;height:58px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface-2);transition:border-color .15s,background-color .15s,transform .15s var(--ease)}
.tr-ap-ic svg{width:27px;height:27px}
.tr-ap-tile:hover .tr-ap-ic{border-color:var(--fg)}
.tr-ap-tile:active .tr-ap-ic{transform:scale(.96);background:var(--tint)}
.tr-ap-card:focus{outline:none}
.tr-ap-tile:focus-visible{outline:none}
.tr-ap-tile:focus-visible .tr-ap-ic{outline:2px solid var(--fg);outline-offset:2px}
.tr-ap-l{line-height:1.2;text-align:center}
.tr-ap-note{display:flex;align-items:center;gap:8px;margin:8px 0 0;padding-top:10px;border-top:1px solid var(--rule);font-size:12px;line-height:1.4;color:var(--muted)}
.tr-ap-note .tr-seal{width:auto;height:16px;padding:0 3px;font-size:8.5px}
.tr-ap-body{padding-top:8px}
.tr-ap-hint{margin:0 0 10px;font-size:13px;line-height:1.45;color:var(--muted)}
.tr-ap-sub{margin:14px 0 4px;font-family:var(--font-mono);font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.tr-ap-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--rule)}
.tr-ap-list li{border-bottom:1px solid var(--rule)}
.tr-ap-row{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:8px 2px;border:0;background:none;color:var(--fg);font:inherit;text-align:left;cursor:pointer}
.tr-ap-row:hover{background:var(--tint)}
.tr-ap-row:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}
.tr-ap-err{margin:6px 0 0;padding:8px 10px;border:1px solid var(--seal);border-radius:var(--r);background:var(--seal-tint);color:var(--fg);font-size:13px;line-height:1.4}
.tr-ap-row[disabled]{cursor:progress;opacity:.75}
.tr-ap-geo{padding:10px 12px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface-2)}
.tr-ap-ri{display:grid;place-items:center;flex:none;width:36px;height:36px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface)}
.tr-ap-ri svg{width:19px;height:19px}
.tr-ap-geo .tr-ap-ri{color:var(--seal);border-color:currentColor}
.tr-ap-rb{display:grid;gap:1px;min-width:0;flex:1}
.tr-ap-rb strong{font-size:14px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-ap-rb span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-ap-li .tr-tile{width:34px}
.tr-ap-chev{flex:none;color:var(--faint)}
.tr-ap-chev svg{width:16px;height:16px;display:block}
.tr-ap-empty{margin:8px 0;font-size:13px;color:var(--muted)}
.tr-linkbtn{padding:0;border:0;background:none;font:inherit;color:var(--fg);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
@media (max-width:640px){
  .tr-ap-scrim{display:block;position:fixed;inset:0;z-index:60;background:var(--overlay);animation:tr-fade .18s ease-out}
  .tr-ap-card{position:fixed;z-index:61;left:0;right:0;bottom:0;width:auto;max-height:min(78dvh,560px);padding:0 16px calc(16px + env(safe-area-inset-bottom));border:0;border-top:1px solid var(--rule);border-radius:var(--r) var(--r) 0 0;box-shadow:0 -10px 30px var(--shadow);animation:tr-sheet .22s var(--ease)}
  .tr-ap-grab{display:block;width:36px;height:4px;margin:8px auto 2px;border-radius:2px;background:var(--rule)}
  .tr-ap-h{margin:0 -8px 2px}
  .tr-ap-grid{gap:18px 8px;padding:18px 0 8px}
  .tr-ap-ic{width:62px;height:62px}
}
@media (max-width:340px){.tr-ap-ic{width:54px;height:54px}.tr-ap-ic svg{width:24px;height:24px}.tr-ap-tile{font-size:12.5px}}
@keyframes tr-sheet{from{transform:translateY(100%)}to{transform:none}}
@keyframes tr-fade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.tr-ap-card,.tr-ap-scrim{animation:none}.tr-attach svg,.tr-ap-ic{transition:none}}

/* bubbles: attachments */
.tr-att,.tr-att-p{display:flex;flex-direction:column;gap:4px;max-width:100%}
.tr-grp.is-me .tr-att,.tr-grp.is-me .tr-att-p{align-items:flex-end}
.tr-ig{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;width:min(264px,68vw);border-radius:10px;overflow:hidden;border:1px solid var(--rule);background:var(--rule)}
.tr-ig[data-n="2"],.tr-ig[data-n="4"]{grid-template-columns:repeat(2,minmax(0,1fr));width:min(232px,64vw)}
.tr-ig-c{display:block;padding:0;border:0;aspect-ratio:1;background:var(--tint);cursor:zoom-in;overflow:hidden}
.tr-ig-c img{display:block;width:100%;height:100%;object-fit:cover}
.tr-ig-c:focus-visible,.tr-img:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}
.tr-att-p{position:relative}
.tr-att-p .tr-img,.tr-att-p .tr-ig{opacity:.72}
.tr-att-up{display:grid;gap:3px;width:min(264px,68vw);padding:6px 8px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);font-size:11.5px;color:var(--muted)}
.tr-att-up .tr-pick-bar{margin:0}
/* file bubble */
.tr-fb{display:flex;align-items:center;gap:10px;width:min(296px,74vw);padding:10px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);color:var(--fg)}
.tr-fb-ic{position:relative;display:grid;place-items:center;flex:none;width:40px;height:46px;color:var(--ft,var(--muted))}
.tr-fb-ic svg{width:40px;height:46px;stroke-width:1.3}
.tr-fb-ic b{position:absolute;left:50%;bottom:7px;transform:translateX(-50%);padding:0 2px;font-family:var(--font-mono);font-size:8.5px;font-weight:700;letter-spacing:.02em;line-height:1.3;color:var(--surface);background:var(--ft,var(--muted));border-radius:1px}
.tr-fb[data-t="pdf"]{--ft:var(--seal)}
.tr-fb[data-t="xls"]{--ft:var(--ok)}
.tr-fb[data-t="doc"]{--ft:var(--info)}
.tr-fb[data-t="ppt"]{--ft:var(--warn)}
.tr-fb-ic svg path:nth-child(3){display:none}
.tr-fb-b{display:grid;gap:2px;min-width:0;flex:1}
/* long names wrap to two lines (a student needs to tell "Week 7 notes" from "Week 8 notes"); the icon badge keeps the type */
.tr-fb-n{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-width:0;font-size:13.5px;font-weight:650;line-height:1.3;overflow-wrap:anywhere}
.tr-fb-m{font-size:11px;color:var(--muted)}
.tr-fb-dl{display:inline-flex;flex-direction:column;align-items:center;gap:1px;flex:none;min-width:44px;min-height:44px;justify-content:center;padding:2px 4px;border-left:1px solid var(--rule);color:var(--fg);font-size:11px;font-weight:600;text-decoration:none}
.tr-fb-dl svg{width:18px;height:18px}
.tr-fb-dl:hover{text-decoration:underline;text-underline-offset:2px}
.tr-fb-dl:focus-visible{outline:2px solid var(--fg);outline-offset:2px;border-radius:var(--r)}
/* location card */
.tr-loc{display:grid;width:min(272px,72vw);border:1px solid var(--rule);border-radius:var(--r);overflow:hidden;background:var(--surface);color:var(--fg)}
.tr-loc-map{position:relative;height:78px;background-color:var(--surface-2);background-image:linear-gradient(var(--rule) 1px,transparent 1px),linear-gradient(90deg,var(--rule) 1px,transparent 1px),linear-gradient(28deg,transparent 46%,var(--tint) 46%,var(--tint) 56%,transparent 56%);background-size:22px 22px,22px 22px,100% 100%;border-bottom:1px solid var(--rule)}
.tr-loc-pin{position:absolute;left:50%;top:50%;transform:translate(-50%,-62%);color:var(--seal)}
.tr-loc-pin svg{width:30px;height:30px;fill:var(--surface);stroke-width:1.9}
.tr-loc-b{display:grid;gap:2px;padding:9px 11px}
.tr-loc-k{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.tr-loc-b strong{font-size:14px;font-weight:700;line-height:1.3;overflow-wrap:anywhere}
.tr-loc-c{font-size:11px;color:var(--muted)}
.tr-loc-a{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px;padding:0 11px;border-top:1px solid var(--rule);color:var(--fg);font-size:13px;font-weight:600;text-decoration:none}
.tr-loc-a svg{width:15px;height:15px;display:block}
.tr-loc-a:hover{background:var(--tint)}
.tr-loc-a:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}
/* listing card */
.tr-lcard{width:min(288px,74vw)}
.tr-lcard-b{flex:1}
.tr-lcard-k{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.tr-lcard-p{display:flex;align-items:center;gap:6px}
.tr-lcard-p .tr-pill{font-size:10.5px;padding:0 4px}
.tr-lcard-go{flex:none;color:var(--faint)}
.tr-lcard-go svg{width:16px;height:16px;display:block}
.tr-lcard:focus-visible{outline:2px solid var(--fg);outline-offset:2px}

/* ===================================================================== v1.9 §20 calm redesign (trade lane) */
/* ---- order page: one instruction, a thin step bar, the action in a sticky dock ---- */
.tr-only-dt{display:none!important}
.tr-ord .tr-ord-grid{margin-top:4px}
.tr-ord .tr-sh{margin-top:2px}
.tr-ord .tr-sh-t{font-size:clamp(25px,5.6vw,38px);max-width:24ch}
html[lang^="zh"] .tr-ord .tr-sh-t{max-width:18em}
.tr-ord .tr-sh-cd{gap:6px 8px;margin-top:10px;font-size:14px;color:var(--fg)}
.tr-ord .tr-sh-cd .tr-cd{font-size:inherit;font-weight:600;letter-spacing:0}
.tr-ord .tr-sh-cd>span:first-child{font-weight:600}
.tr-ord .tr-sh-sub{font-size:14.5px;margin-top:8px}
.tr-sbar{display:grid;gap:6px;margin:12px 0 0}
.tr-sbar-l{margin:0;font-size:11.5px;letter-spacing:.03em;color:var(--muted)}
.tr-sbar-s{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:3px}
.tr-sbar-s i{display:block;height:3px;border-radius:1px;background:var(--rule)}
.tr-sbar-s i.is-done{background:var(--fg)}
.tr-sbar-s i.is-now{background:color-mix(in srgb,var(--fg) 38%,var(--rule))}
.tr-sh-item+.tr-sbar{margin-top:12px}
/* the action card loses its frame and heading: the h1 says what to do */
.tr-ord .tr-panel{margin-top:18px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.tr-ord .tr-panel>.tr-pbody:first-of-type{margin-top:0}
.tr-ord .tr-panel .tr-pbody{max-width:62ch;color:var(--fg)}
.tr-ord .tr-pay{margin-top:18px}
.tr-ord .tr-ord-main>.tr-card,.tr-ord .tr-ord-main>details,.tr-ord .tr-ord-main>section{margin-top:16px}
/* forms reached through "More" stay out of sight until asked for */
.tr-ord .tr-xa:not([open]){display:none}
.tr-ord .tr-xa[open]{margin-top:16px}
/* details, full history, evidence: labelled rows */
.tr-dt{padding:0}
.tr-dt>summary,.tr-tlmore>summary{display:flex;align-items:center;gap:10px;min-height:48px;padding:0 14px;cursor:pointer;list-style:none;font-weight:600;font-size:14px}
.tr-dt>summary::-webkit-details-marker,.tr-tlmore>summary::-webkit-details-marker,.tr-meet>summary::-webkit-details-marker{display:none}
.tr-dt>summary .tr-mono{margin-left:auto;font-weight:500}
.tr-dt>summary::after,.tr-tlmore>summary::after,.tr-meet>summary::after{content:"";flex:none;width:6px;height:6px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(45deg);margin:0 2px 3px 8px}
.tr-dt[open]>summary::after,.tr-tlmore[open]>summary::after,.tr-meet[open]>summary::after{transform:rotate(-135deg);margin-bottom:-3px}
.tr-dt>.tr-kv{margin:0;padding:4px 14px 14px;border-top:1px solid var(--rule)}
.tr-dt>summary:focus-visible,.tr-tlmore>summary:focus-visible,.tr-meet>summary:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}
.tr-tlmore{margin-top:10px;border-top:1px solid var(--rule)}
.tr-tlmore>summary{padding:0;color:var(--muted);font-weight:500;justify-content:flex-start}
.tr-tlmore>summary::after{margin-left:6px}
.tr-tlmore[open]>.tr-tlv{margin-top:8px}
.tr-ord .tr-ev-d{padding:0 14px}
.tr-ord .tr-ev-d>summary{min-height:48px}
.tr-ord .tr-ev-d .tr-ev-ic{width:26px;height:26px}
.tr-ev-s{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-width:0}
.tr-ord .tr-ev-d[open]{padding-bottom:14px}
.tr-ord .tr-ev-d.is-hot{border-color:var(--fg)}
/* counterpart + trust line */
.tr-ord-side .tr-party{display:grid;gap:12px;margin-top:22px;padding:14px 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.tr-ord-side .tr-who{border-top:0;padding-top:0}
.tr-who-trust{margin:3px 0 0!important;font-size:12px;line-height:1.45;color:var(--muted)}
.tr-who-trust .trust-new{margin-left:4px}
/* meet safely */
.tr-meet{margin-top:16px;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.tr-meet>summary{display:flex;align-items:center;gap:10px;min-height:48px;cursor:pointer;list-style:none;font-weight:650;font-size:14.5px}
.tr-meet-ic{display:inline-grid;place-items:center;color:var(--fg)}
.tr-meet-t{flex:1}
.tr-meet-l{margin:0 0 10px;padding:0 0 0 18px;font-size:14px;line-height:1.55}
.tr-meet-l li+li{margin-top:2px}
.tr-meet-sp{margin:0 0 12px;font-size:13.5px;line-height:1.55}
/* the dock: primary + one ghost + "⋯ More" */
.tr-dock{display:flex;gap:8px;align-items:center}
/* a focused / invalid field on the order + pay screens never hides behind the sticky dock (phones) or the tab bar */
.tr-ord :is(input,textarea,select):not([type=hidden]),.tr-pay :is(input,textarea,select):not([type=hidden]){scroll-margin-top:72px;scroll-margin-bottom:calc(96px + var(--tabbar-h,0px) + env(safe-area-inset-bottom,0px))}
.tr-dock .tr-btn{min-height:44px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-dock-p{flex:1 1 auto;min-width:0}
.tr-dock-s{flex:0 1 auto;min-width:0}
.tr-dock.no-primary .tr-dock-s{flex:1 1 auto}
.tr-dock-m{flex:none;width:44px;padding:0!important}
.tr-dock-ml{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media (max-width:959.98px){
  body:has(.tr-ord .tr-dock){padding-bottom:calc(var(--tabbar-h,0px) + 64px + env(safe-area-inset-bottom,0px))}
  .tr-ord{padding-bottom:24px}
  .tr-dock{position:fixed;left:0;right:0;z-index:19;bottom:calc(var(--tabbar-h,0px) + env(safe-area-inset-bottom,0px));min-height:64px;
    padding:10px max(16px,env(safe-area-inset-right,0px)) 10px max(16px,env(safe-area-inset-left,0px));background:var(--bg);border-top:1px solid var(--rule)}
}
@media (min-width:761px) and (max-width:959.98px){ .tr-dock{bottom:env(safe-area-inset-bottom,0px)} .tr-dock>*{max-width:360px} }
/* the "More" sheet (a native <dialog>: Esc closes, focus returns) */
dialog.tr-sheet{position:fixed;inset:auto 0 0 0;width:100%;max-width:none;max-height:80vh;margin:0;padding:6px 0 calc(8px + env(safe-area-inset-bottom,0px));overflow:auto;border:0;border-top:1px solid var(--rule);border-radius:var(--r) var(--r) 0 0;background:var(--surface);color:var(--fg)}
dialog.tr-sheet::backdrop{background:rgba(20,16,12,.45)}
.tr-sheet-h{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 6px 6px 16px}
.tr-sheet-h .tr-h3{margin:0}
.tr-sheet-l{margin:0;padding:0;list-style:none}
.tr-sheet .tr-sheet-row{display:flex;justify-content:flex-start;width:100%;min-height:52px;padding:0 16px;border:0;border-top:1px solid var(--rule);border-radius:0;background:transparent;color:var(--fg);font-weight:500;font-size:15px;text-align:left}
.tr-sheet .tr-sheet-row:hover{background:var(--surface-2)}
.tr-sheet .tr-sheet-row:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}
/* desktop: two columns from 960px, sticky right panel */
@media (min-width:900px) and (max-width:959.98px){ .tr-ord .tr-ord-grid{grid-template-columns:minmax(0,1fr)} .tr-ord .tr-ord-side{position:static} .tr-ord .tr-sh-item{display:flex} }
@media (min-width:960px){
  .tr-only-ph{display:none!important}
  .tr-only-dt{display:block!important}
  .tr-sumrow.tr-only-dt{display:flex!important}
  .tr-ord .tr-ord-grid{grid-template-columns:minmax(0,720px) 320px;gap:48px;justify-content:space-between}
  .tr-ord .tr-ord-side{position:sticky;top:84px;align-self:start;max-height:calc(100vh - 100px);overflow:auto;padding:2px}
  .tr-ord .tr-sh-item{display:none}
  .tr-ord-side .tr-party{margin-top:0;padding-top:0;border-top:0}
  .tr-ord-side .tr-party .tr-sumrow+.tr-who{border-top:1px solid var(--rule);padding-top:12px}
  .tr-sum-price{font-size:18px}
  .tr-dock{flex-direction:column;align-items:stretch;margin-top:16px}
  .tr-dock .tr-btn{width:100%}
  .tr-dock-m{width:100%!important;padding:0 16px!important;color:var(--muted)}
  .tr-dock-ml{position:static;width:auto;height:auto;clip-path:none}
  dialog.tr-sheet{inset:0;margin:auto;width:min(420px,calc(100% - 32px));max-height:min(560px,80vh);border:1px solid var(--rule);border-radius:var(--r);padding-bottom:8px}
}
/* ---- order list: three lines ---- */
.tr-oc{grid-template-columns:auto minmax(0,1fr);padding:12px 4px}
.tr-oc.is-act{box-shadow:none;padding-left:4px}
.tr-oc-b{gap:3px}
.tr-oc-h{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.tr-oc-ht{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tr-todo{flex:none;display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:650;color:var(--seal)}
.tr-todo i{display:block;width:7px;height:7px;border-radius:50%;background:var(--seal)}
.tr-oc .tr-oc-t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-oc-3{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0;font-size:12.5px;color:var(--muted)}
.tr-oc-3 .tr-oc-w{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tr-oc-3 .tr-oc-amt{flex:none;color:var(--fg);font-size:14.5px}
/* ---- chat: one scam-pattern card per flag (§20.8) ---- */
.tr-warncard{gap:8px;padding:8px 10px;border:1px solid var(--fg);border-left:3px solid var(--seal);background:var(--surface);color:var(--fg);max-width:min(100%,380px)}
.tr-warncard::before{content:none;display:none}
.tr-warncard+.tr-warncard{margin-top:4px}
.tr-warncard p{margin:0}
.tr-wc-b{min-width:0}
.tr-wc-l{margin:4px 0 0;padding:0 0 0 14px;color:var(--muted)}
.tr-wc-l li{margin:2px 0 0}
.tr-wc-ic{flex:none;display:inline-grid;color:var(--seal);margin-top:1px}
.tr-wc-ic svg{width:16px;height:16px}
.tr-warncard .tr-wc-rep{display:inline-flex;align-items:center;min-height:32px;padding:0 2px;margin:2px 0 -6px;border:0;background:none;color:var(--seal);font:inherit;font-weight:650;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.tr-warncard .tr-wc-rep:focus-visible{outline:2px solid var(--fg);outline-offset:1px}
/* ---- jury list: one label per case ---- */
.tr-jcase{grid-template-columns:auto minmax(0,1fr)}
.tr-jc-l{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:650;color:var(--muted)}
.tr-jc-l.is-wait{color:var(--fg)}
.tr-jc-l.is-wait i{display:block;width:7px;height:7px;border-radius:50%;background:var(--fg)}
.tr-jc-l.is-urgent{color:var(--seal)}
.tr-jc-l.is-urgent i{background:var(--seal)}
.tr-jcase .tr-oc-t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-jc-m{display:flex;justify-content:space-between;align-items:baseline;gap:12px;min-width:0;font-size:12px;color:var(--muted)}
.tr-jc-m>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tr-jc-m .tr-oc-amt{flex:none;color:var(--fg);font-size:14.5px}
/* ---- jury case: buyer | seller, sticky vote panel (desktop) / sticky vote bar (phone) ---- */
.tr-jc-kicker{margin:6px 0 2px;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.tr-jcv .tr-jgrid{margin-top:16px}
.tr-jcv .tr-jtl{margin-top:16px}
.tr-jtl>.tr-tl{margin:0;padding:8px 14px 14px;border-top:1px solid var(--rule)}
.tr-jc-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.tr-jcv .tr-vote{margin-top:18px}
.tr-vote-go{margin-top:12px}
.tr-jbar{display:none}
@media (max-width:959.98px){
  .tr-vote-go{display:none}
  .tr-jbar{position:fixed;left:0;right:0;z-index:19;bottom:calc(var(--tabbar-h,0px) + env(safe-area-inset-bottom,0px));display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;
    padding:10px max(16px,env(safe-area-inset-right,0px)) 10px max(16px,env(safe-area-inset-left,0px));background:var(--bg);border-top:1px solid var(--rule)}
  .tr-jbar-t{font-size:13px;display:flex;flex-direction:column;gap:1px;min-width:0}
  .tr-jbar-t .tr-cd{font-size:15px;font-weight:600}
  .tr-jbar .tr-btn{flex:0 1 auto;min-width:150px}
  body:has(.tr-jbar){padding-bottom:calc(var(--tabbar-h,0px) + 64px + env(safe-area-inset-bottom,0px))}
}
@media (min-width:761px) and (max-width:959.98px){ .tr-jbar{bottom:env(safe-area-inset-bottom,0px)} }
@media (min-width:960px){
  .tr-jcv{max-width:1120px}
  .tr-jc-grid{grid-template-columns:minmax(0,1fr) 340px;gap:40px;align-items:start}
  .tr-jc-side{position:sticky;top:84px;max-height:calc(100vh - 100px);overflow:auto;padding:2px}
  .tr-jc-side .tr-vote,.tr-jc-side>.tr-card{margin-top:44px}
  .tr-jc-side .tr-vote-opts{grid-template-columns:minmax(0,1fr)}
  .tr-jcv .tr-jgrid{grid-template-columns:1fr 1fr}
  .tr-vote-go{width:100%}
}
.tr-jc-m .tr-cd{font-size:inherit;font-weight:500}
/* three-line rows: a square-ish 56px tile keeps each row as tall as its text */
.tr-oc>.tr-tile,.tr-jcase>.tr-tile{width:56px;aspect-ratio:1}
.tr-ord [id],.tr-jcv [id]{scroll-margin-top:84px}
@media (max-width:959.98px){.tr-ord [id]{scroll-margin-bottom:84px}}
/* ---- §21.2 handover code 交易码: buyer card + seller sheet ---- */
.tr-hc{margin:16px 0 4px;padding:14px 0 12px;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.tr-hc-l{margin:0 0 6px;font-size:13px;font-weight:650;color:var(--fg)}
.tr-hc-l .tr-faint{font-weight:500;margin-left:4px}
.tr-hc-code{display:flex;gap:clamp(8px,3vw,14px);margin:0 0 10px;font-size:clamp(40px,13vw,56px);font-weight:600;line-height:1;letter-spacing:0;user-select:none;-webkit-user-select:none}
.tr-hc-code>span[aria-hidden]{display:inline-grid;place-items:center;min-width:1.05ch;padding:6px 0 8px;border-bottom:2px solid var(--fg)}
.tr-hc-h{display:flex;gap:8px;align-items:flex-start;margin:0;font-size:13.5px;line-height:1.45;color:var(--muted);max-width:52ch}
.tr-hc-h svg{flex:none;width:16px;height:16px;margin-top:2px;color:var(--fg)}
.tr-hcs-b{margin:0 0 14px;font-size:14px;line-height:1.5}
.tr-hcs-f input.tr-hcs-in{font-family:var(--font-mono);font-size:28px;font-weight:600;letter-spacing:.5em;text-align:center;padding:8px 0 8px .5em;min-height:56px;max-width:220px}
.tr-hcs-f input.tr-hcs-in:disabled{opacity:.55}
.tr-hcs-err{margin-top:8px}
.tr-hcs-fb{margin:12px 0 0;font-size:13px;line-height:1.45}
/* ---- §21.1 masked real name in the counterpart block ---- */
.tr-who-rn{margin:4px 0 0!important;font-size:12.5px!important;color:var(--fg)}
.tr-who-rnh{margin:1px 0 0!important;font-size:12px!important;line-height:1.4;color:var(--muted)}
/* ---- §21.3 decline a jury seat: a quiet text button on the status line ---- */
.tr-jdecl{margin-left:auto;display:inline-flex;align-items:center;min-height:44px;padding:0 2px;border:0;background:none;color:var(--muted);font:inherit;font-size:13px;font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.tr-jdecl:hover{color:var(--fg)}
.tr-jdecl:focus-visible{outline:2px solid var(--fg);outline-offset:2px;border-radius:2px}
.tr-jdecl:disabled{opacity:.5;cursor:default}
.tr-ord-side .tr-hc{margin:16px 0 0;padding-top:0;border-top:0}
.tr-ord-side .tr-hc-code{font-size:48px}
/* §21.8 calmer pay screen: no frame around the whole thing (the pay code keeps the only box) */
.tr-ord .tr-pay{padding:18px 0 0;border:0;border-top:1px solid var(--rule);border-radius:0;background:none}
.tr-ord .tr-pay>.tr-h2{margin-top:0}
/* checkout: "How your money is protected" is a labelled row on phones, open beside the form on desktop */
.tr-esc-d{padding:0 16px}
.tr-esc-d>summary{display:flex;align-items:center;gap:10px;min-height:48px;cursor:pointer;list-style:none}
.tr-esc-d>summary::-webkit-details-marker{display:none}
.tr-esc-d>summary .tr-h3{margin:0;flex:1;font-size:15px}
.tr-esc-d>summary::after{content:"";flex:none;width:6px;height:6px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(45deg);margin:0 2px 3px 8px}
.tr-esc-d[open]>summary::after{transform:rotate(-135deg);margin-bottom:-3px}
.tr-esc-d>summary:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}
.tr-esc-d[open]{padding-bottom:16px}
/* inbox: three lines (title · who · last message), time + price on the right; a closed item's state is quiet, not a red badge */
.tr-conv-who .tr-conv-wt{min-width:0;flex:0 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-conv-who .tr-pill{flex:none;color:var(--muted);border-color:var(--rule);background:none;font-size:11px}
.tr-conv-amt{font-size:13px;font-weight:650;color:var(--fg);white-space:nowrap}
/* nudge: one quiet row, not a box around a box */
.tr-ord .tr-card.tr-nudge{padding:0;border:0;background:none;box-shadow:none}
@media (min-width:1280px){.tr-msg{grid-template-columns:380px minmax(0,1fr)}}
/* §21.8: toasts sit above the sticky order dock / jury vote bar on phones and tablets instead of covering the buttons */
@media (max-width:959.98px){
  body:has(.tr-ord .tr-dock) .toasts,body:has(.tr-jbar) .toasts{bottom:calc(var(--tabbar-h,0px) + 76px + env(safe-area-inset-bottom,0px))}
}

/* ---- §22.4 buyer offers 出价 in chat: ink rule (the seller's special price keeps the red seal) ---- */
.tr-prc{border-color:var(--rule)}
.tr-prc::before{background:var(--fg)}
.tr-prc .tr-ofc-seal{border-color:var(--fg);color:var(--fg)}
.tr-prc .tr-ofc-now{color:var(--fg);font-size:22px}
.tr-prc-st{margin:6px 0 0;font-size:13px;color:var(--muted)}
.tr-prc-st.is-ok{color:var(--fg);font-weight:600}
.tr-prc .tr-ofc-a{display:flex;flex-wrap:wrap;gap:8px}
.tr-prc .tr-ofc-a .tr-btn{min-height:44px}
.tr-prc.is-dead .tr-ofc-now{text-decoration:line-through;text-decoration-thickness:1px;color:var(--muted)}
.tr-prc[data-st="used"] .tr-ofc-now{text-decoration:none}
.tr-ro{justify-content:center;text-align:center;margin:0}

/* ---- §22.4 desktop orders split (>=1100 px): list left (sticky, own scroll) + the selected order right ---- */
.tr-split{display:grid;grid-template-columns:400px minmax(0,1fr);gap:0;width:calc(100% - 2 * var(--gut));max-width:1400px;margin:0 auto}
.tr-split-l{position:sticky;top:var(--bar-h,64px);align-self:start;height:calc(100vh - var(--bar-h,64px));display:flex;flex-direction:column;border-right:1px solid var(--rule);min-width:0}
.tr-split-l>.tr-host{display:flex;flex-direction:column;min-height:0;flex:1 1 auto}
.tr-orders.is-split{display:flex;flex-direction:column;min-height:0;flex:1 1 auto;max-width:none;width:100%;margin:0;padding:24px 20px 0 0}
.tr-orders.is-split .tr-h1{margin-top:0}
.tr-orders.is-split .tr-stabs{flex-wrap:wrap}
.tr-olist-sc{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;margin-right:-20px;padding-right:20px;padding-bottom:24px}
.tr-oc.is-sel{background:var(--surface-2);box-shadow:inset 3px 0 0 var(--fg)}
.tr-oc.is-sel .tr-oc-ht{font-weight:700}
.tr-split-r{min-width:0}
.tr-split-r .tr-wrap{max-width:none;margin:0;padding-left:40px;padding-right:0}
.tr-split-r .tr-back{display:none}
.tr-split-r .tr-ord .tr-ord-grid{grid-template-columns:minmax(0,1fr) 280px;gap:32px}
.tr-split-empty{display:grid;justify-items:center;align-content:center;gap:6px;min-height:calc(100vh - var(--bar-h,64px) - 80px);padding:40px;text-align:center}
.tr-split-ic svg{width:32px;height:32px;color:var(--muted)}
.tr-split-h{margin:6px 0 0;font-size:18px;font-weight:600}

/* ---- §20.0 checkout: "Place order" + the total sit in a sticky phone bar above the tab bar (same look as .tr-dock) ---- */
.tr-co-dock{display:contents}
.tr-co-dt{display:none}
@media (max-width:760px){
  body:has(.tr-co .tr-co-dock){padding-bottom:calc(var(--tabbar-h,0px) + 64px + env(safe-area-inset-bottom,0px))}
  .tr-co .tr-co-main{padding-bottom:24px}
  .tr-co :is(input,textarea,select):not([type=hidden]){scroll-margin-top:72px;scroll-margin-bottom:calc(96px + var(--tabbar-h,0px) + env(safe-area-inset-bottom,0px))}
  .tr-co-dock{display:flex;align-items:center;gap:12px;position:fixed;left:0;right:0;z-index:19;bottom:calc(var(--tabbar-h,0px) + env(safe-area-inset-bottom,0px));min-height:64px;box-sizing:border-box;
    padding:10px max(16px,env(safe-area-inset-right,0px)) 10px max(16px,env(safe-area-inset-left,0px));background:var(--bg);border-top:1px solid var(--rule)}
  .tr-co-dt{display:grid;flex:none;min-width:0;line-height:1.15}
  .tr-co-dt>span{font-size:12px;color:var(--muted)}
  .tr-co-dt>b{font-size:18px;font-weight:700;color:var(--fg);white-space:nowrap}
  .tr-co-dock .tr-btn{flex:1 1 auto;min-width:0;min-height:44px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* ===== v2.2 dispute room 纠纷处理 (§23.2): chat-like record, docked composer; phone fills the screen, desktop two columns ===== */
.dz{position:relative;display:grid;grid-template-columns:minmax(0,1fr);max-width:var(--max);margin:0 auto}
.dz-main{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--bg)}
.dz-h{gap:8px}
.dz-t{margin:0;font-size:15px;font-weight:700;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}
.dz-chip{margin:2px 0 0;font-size:12px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dz-chip .tr-pill{font-size:11px}
.dz-chip .tr-cd,.dz-sum .tr-cd{font-family:var(--font-mono);font-size:inherit}
.dz-case{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--rule);background:var(--surface-2);font-size:13.5px;line-height:1.4}
.dz-case p{margin:0;min-width:0}
.dz-case .tr-seal{flex:none;width:auto;height:18px;padding:0 3px;writing-mode:horizontal-tb;font-size:9px}
.dz-case-k{color:var(--muted)}
.dz-case-r{color:var(--fg)}
.dz-log{padding:12px 12px 8px}
.dz-empty{margin:24px 0;text-align:center;color:var(--muted);font-size:14px}
.dz-who{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin:0 2px 2px;font-size:12px;line-height:1.3;color:var(--muted)}
.dz-who strong{color:var(--fg);font-weight:650}
.tr-grp.is-me .dz-who{justify-content:flex-end}
.dz-kind{padding:0 5px;border:1px solid var(--rule);border-radius:var(--r);font-family:var(--font-mono);font-size:10.5px;letter-spacing:.02em;color:var(--muted)}
.dz-new{padding:0 5px;border-radius:var(--r);background:var(--seal-tint);color:var(--seal);font-family:var(--font-mono);font-size:10.5px;font-weight:700}
.dz-grp{margin:10px 0}
.dz-grp .tr-grp-b{max-width:min(86%,560px)}
.dz-grp.is-claim .tr-bub,.dz-grp.is-response .tr-bub{border-left:3px solid var(--warn)}
.dz-grp.is-me.is-claim .tr-bub,.dz-grp.is-me.is-response .tr-bub{border-left-width:1px;border-right:3px solid var(--warn)}
.dz-removed{margin:0;padding:8px 12px;border:1px dashed var(--rule);border-radius:12px;font-size:13.5px;font-style:italic;color:var(--muted)}
.dz-staff{display:grid;gap:6px;justify-items:center;max-width:min(92%,520px);margin:14px auto;padding:10px 14px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface-2);text-align:center}
.dz-staff .dz-who{justify-content:center;margin:0}
.dz-staff .dz-who time{font-family:var(--font-mono)}
.dz-staff .tr-seal{width:auto;height:16px;padding:0 3px;writing-mode:horizontal-tb;font-size:8.5px}
.dz-staff-b{margin:0;font-size:14.5px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--fg)}
.dz-staff .tr-att{align-items:center}
.dz-howd{margin:0 0 6px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);font-size:13px}
.dz-howd>summary{display:flex;align-items:center;min-height:44px;padding:0 12px;cursor:pointer;font-weight:650;list-style:none}
.dz-howd>summary::-webkit-details-marker{display:none}
.dz-howd>summary::after{content:"";margin-left:auto;width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px)}
.dz-howd[open]>summary::after{transform:rotate(-135deg)}
.dz-howd .dz-how{padding:0 14px 12px 30px}
.dz-how{margin:0;padding-left:18px;display:grid;gap:6px;font-size:13.5px;line-height:1.5;color:var(--fg)}
.dz-how li::marker{font-family:var(--font-mono);color:var(--muted)}
.dz-dock{position:relative;background:var(--surface);border-top:1px solid var(--rule)}
.dz-rule{margin:0;padding:6px 12px;font-size:12px;line-height:1.4;color:var(--muted);background:var(--surface-2);border-bottom:1px solid var(--rule)}
.dz-rule .tr-short{display:none}
@media (max-width:480px){.dz-rule .tr-long{display:none}.dz-rule .tr-short{display:inline}}
.dz-err{margin:8px 10px 0;padding:8px 10px;border:1px solid var(--seal);border-radius:var(--r);background:var(--seal-tint);color:var(--fg);font-size:13px;line-height:1.4}
.dz-err[hidden],.dz-tray[hidden]{display:none}
.dz-tray{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:8px 10px 0;list-style:none}
.dz-tray-i{position:relative;display:grid;place-items:center;width:58px;height:58px;border:1px solid var(--rule);border-radius:var(--r);overflow:hidden;background:var(--tint)}
.dz-tray-i img{width:100%;height:100%;object-fit:cover}
.dz-tray-ic{display:grid;place-items:center;color:var(--muted)}
.dz-tray-p{position:absolute;inset:auto 3px 3px;display:grid;gap:2px;padding:2px 3px;border-radius:2px;background:var(--surface);font-size:10px}
.dz-tray-p .tr-pick-bar{margin:0}
.dz-tray-i .tr-pick-rm{position:absolute;top:2px;right:2px}
.dz-tray-i.is-busy .tr-pick-rm{display:none}
.dz-compose{border-top:0}
.dz-ro{margin:0}
.dz-side{display:none}
.dz-sum{display:grid;gap:8px}
.dz-sum p{margin:0}
.dz-sum-amt{font-size:26px;font-weight:600;letter-spacing:-.01em}
.dz-sum .tr-kv{margin:4px 0}
.dz-sum .tr-btn{justify-self:start}
.dz-howc .tr-h3{margin:0 0 10px}
/* phones: like an open chat, the room is exactly the visible viewport (no footer, no tab bar, no page scroll) */
@media (max-width:859.98px){
  .dz{height:var(--dz-h,calc(100dvh - var(--dz-top,56px)));min-height:260px}
  .dz-main{height:100%}
  body.tr-dz-open .foot,body.tr-dz-open .tabbar{display:none}
  body.tr-dz-open{overflow:hidden;overscroll-behavior:none;padding-bottom:0}
}
@media (min-width:860px){
  .dz{grid-template-columns:minmax(0,1fr) 320px;gap:20px;align-items:start;width:calc(100% - 2 * var(--gut));padding:16px 0}
  .dz-main{height:max(520px,calc(100dvh - var(--dz-top,72px) - 32px));border:1px solid var(--rule);border-radius:var(--r);overflow:hidden}
  .dz-case-ph,.dz-howd{display:none}
  .dz-side{display:grid;gap:12px;position:sticky;top:16px}
  .dz-side .tr-card{margin:0}
}
/* order page card */
.dz-card{display:grid;gap:10px}
.dz-card-h{display:flex;align-items:center;gap:8px}
.dz-card-h .tr-h3{margin:0;flex:1}
.dz-card-ic{display:grid;place-items:center;width:32px;height:32px;border:1px solid var(--rule);border-radius:var(--r);color:var(--seal)}
.dz-card-l{padding:4px 8px;border:1px solid var(--rule);border-radius:var(--r);background:var(--bg)}
.dz-card-l .dz-grp{margin:8px 0}
.dz-card-l .tr-bub{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}
.dz-card-a{display:flex;flex-wrap:wrap;gap:8px}
@media (max-width:520px){.dz-card-a .tr-btn{flex:1 1 auto}}
/* jury case page: the record above the vote */
.dz-jrec .dz-log{max-height:none;overflow:visible;padding:4px 0 0}
.dz-jrec .tr-h3{margin:0}
.dz-jrec .tr-hint{margin:4px 0 0}
.dz-rsn{margin:0 2px;font-size:12.5px;color:var(--muted)}
.dz-rsn strong{color:var(--fg);font-weight:650}
.dz-mini{display:flex;align-items:center;gap:8px;margin:2px 0 0;font-size:12px;color:var(--muted)}
.tr-grp.is-me .dz-mini{flex-direction:row-reverse}
.dz-mini-t{display:flex;gap:3px}
.dz-mini-i{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--rule);border-radius:var(--r);overflow:hidden;background:var(--tint);color:var(--muted)}
.dz-mini-i img{width:100%;height:100%;object-fit:cover}
.dz-mini-i svg{width:18px;height:18px}
