/* Order progression belongs to the isolated local marketplace. */
#dialog:has(.market-order-detail){width:min(1080px,calc(100vw - 40px));max-width:1080px;max-height:calc(100dvh - 40px);padding:28px;border:1px solid #e2e7e4;border-radius:20px;background:#fff;box-shadow:0 24px 80px #233d2926}
#dialog:has(.market-order-detail)::backdrop{background:#26312f42;backdrop-filter:blur(7px)}
#dialog:has(.market-order-detail)>.dialog-head{margin-bottom:10px;align-items:center}
#dialog:has(.market-order-detail)>.dialog-head h2{font-size:24px;letter-spacing:-.035em}
.market-order-detail{color:#242b29;min-width:0;margin:0;padding:0}
.market-order-topline{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:26px;font-size:12px;color:#68746c}
.market-order-demo{padding:5px 9px;background:#f0f4f1;border:1px solid #e5eae7;border-radius:20px;font-size:10px;white-space:nowrap;color:#5c6d63}
.market-order-roles{display:flex;align-items:center;gap:5px;margin:0 0 24px;border-bottom:1px solid #e5e9e6;padding-bottom:12px}
.market-order-roles button{min-height:44px;padding:10px 17px;border:1px solid transparent;border-radius:9px;background:transparent;color:#596b62;font:inherit;font-size:12px;cursor:pointer}
.market-order-roles button[aria-pressed=true]{background:#eaf3ed;border-color:#d8e6de;color:#00676a;font-weight:600}
.market-order-roles button:hover{background:#f1f6f2}
.market-order-roles>span{margin-left:auto;font-size:10px;color:#68746c}
.market-seller-controls{margin:0 0 24px;padding:18px;border:1px solid #d9e7df;border-radius:12px;background:#f3f8f4;min-width:0}
.market-seller-eyebrow{display:block;font-size:10px;font-weight:500;color:#006b6e;margin:0 0 8px}
.market-seller-controls>strong{display:block;font-size:15px;line-height:1.45;letter-spacing:-.02em;color:#242b29}
.market-seller-controls>p:not(.market-error){font-size:12px;line-height:1.7;color:#53665a;margin:8px 0 0}
.market-seller-controls .market-seller-next{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;width:100%;margin-top:16px;padding:12px 14px;border-radius:9px;background:#00787b;border-color:#00787b;font-size:12px;line-height:1.6;white-space:normal;text-align:left}
.market-seller-controls .market-seller-next:hover{background:#00686a;border-color:#00686a}
.market-seller-controls .market-seller-next:disabled{opacity:.65;cursor:wait}
.market-seller-controls .market-seller-next svg{width:17px;height:17px;flex:none}
.market-seller-controls .market-error{margin:12px 0 0;font-size:12px;line-height:1.6;color:#a41e3e}
.market-chat-context .market-seller-controls{padding:16px;margin-bottom:20px}
.market-chat-context .market-seller-controls>strong{font-size:14px}
.market-chat-context .market-seller-controls>p:not(.market-error){font-size:11px}
.market-chat-context .market-seller-controls .market-seller-next{font-size:11px;padding:11px 12px}
.market-order-detail>.market-seller-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:24px}
.market-order-detail>.market-seller-controls>.market-seller-next{grid-column:2;grid-row:1 / span 3;align-self:center;margin:0;width:auto;max-width:280px;min-height:48px}
.market-order-detail>.market-seller-controls>.market-error{grid-column:1 / -1}
.market-thread-status[data-status=accepted]{background:#eaf3ed;color:#315f4b}
.market-progress{position:relative;padding:8px 0 26px;margin-bottom:4px}
.market-progress-track{position:absolute;left:6.25%;right:6.25%;top:26px;height:4px;background:#e4e9e6;border-radius:3px;overflow:hidden}
.market-progress-track>span{display:block;width:var(--order-progress);height:100%;background:#00868a;border-radius:3px;animation:market-order-advance .7s ease-out both}
.market-progress ol{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:0;list-style:none;margin:0;padding:0}
.market-progress li{position:relative;display:flex;align-items:center;flex-direction:column;text-align:center;gap:10px;min-width:0;padding:0 7px}
.market-progress-dot{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;flex:none;width:38px;height:38px;box-sizing:border-box;background:#fff;border:2px solid #dfe5e1;border-radius:50%;color:#7c8981;font-size:13px;font-weight:600;box-shadow:0 0 0 5px #fff}
.market-progress-dot svg{width:20px;height:20px}
.market-progress .is-done .market-progress-dot{border-color:#00868a;background:#00868a;color:#fff}
.market-progress .is-current .market-progress-dot{border-color:#00787b;background:#00787b;color:#fff;box-shadow:0 0 0 5px #e3f2ec;animation:market-order-pulse 2.2s ease-in-out infinite}
.market-progress-label{display:block;max-width:130px;min-height:32px;font-size:11px;line-height:1.5;color:#77817a;font-weight:400;overflow-wrap:anywhere}
.market-progress .is-done .market-progress-label{color:#315b4f}.market-progress .is-current .market-progress-label{color:#006c70;font-weight:600}
.market-progress-state{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.market-progress .is-current .market-progress-state{position:static;clip-path:none;width:auto;height:auto;overflow:visible;font-size:9px;line-height:1.4;color:#00787b;margin-top:-5px}
.market-order-record{display:flex;justify-content:space-between;align-items:center;gap:16px;border:1px solid #e5e9e6;border-bottom:0;border-radius:14px 14px 0 0;padding:18px 20px;background:#fcfdfb}
.market-order-record>div{display:flex;align-items:baseline;gap:9px 12px;flex-wrap:wrap;min-width:0}
.market-order-record-label{font-size:11px;color:#68746c}
.market-order-record strong{font-size:13px;letter-spacing:.015em;overflow-wrap:anywhere}.market-order-record time{font-size:10px;color:#68746c}
.market-order-state{flex:none;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:1.5;padding:6px 10px;border-radius:20px;background:#eaf2ed;color:#3b6251}
.market-order-state[data-status=awaiting_confirmation]{background:#fbf0d9;color:#7b5b22}.market-order-state[data-status=refunded]{background:#ecefed;color:#677169}
.market-order-notice{display:flex;align-items:flex-start;gap:12px;background:#f3f7f4;border:1px solid #e1e8e3;border-radius:0 0 14px 14px;padding:18px 20px;margin-bottom:25px}
.market-order-notice>svg{width:21px;height:21px;flex:none;color:#00787b;margin-top:1px}
.market-order-notice h3{font-size:15px;line-height:1.5;letter-spacing:-.015em;margin:0 0 5px;font-weight:600}
.market-order-notice p{font-size:12px;line-height:1.75;color:#5c6a62;margin:0}
.market-order-notice small{display:block;font-size:10px;line-height:1.7;margin-top:8px;color:#736545}
.market-order-notice[data-status=awaiting_confirmation]{background:#fcf8ee;border-color:#ece3cd}.market-order-notice[data-status=awaiting_confirmation]>svg{color:#8d6e2b}
.market-order-notice[data-status=refunded]{background:#f4f5f4;border-color:#e5e9e6}
.market-order-body{display:grid;grid-template-columns:minmax(0,1fr) 235px;gap:24px;padding-bottom:22px;border-bottom:1px solid #e5e9e6}
.market-order-item{display:flex;align-items:center;gap:18px;min-width:0}
.market-order-item>img{display:block;flex:none;width:100px;height:100px;padding:6px;object-fit:contain;background:#f6f7f5;border:1px solid #edf0ed;border-radius:12px}
.market-order-item>div{min-width:0}.market-order-item h3{margin:0 0 7px;font-size:16px;line-height:1.5;letter-spacing:-.025em;overflow-wrap:anywhere}
.market-order-item p{font-size:12px;line-height:1.6;color:#5c6a62;margin:0 0 7px}.market-order-item>div>span{font-size:10px;line-height:1.6;color:#68746c}
.market-order-amounts{margin:0;padding-left:24px;border-left:1px solid #e5e9e6;align-self:center}
.market-order-amounts>div{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:11px;line-height:1.6;margin:8px 0}
.market-order-amounts dt{color:#68746c}.market-order-amounts dd{margin:0;white-space:nowrap}.market-order-amounts>div:last-child{margin-top:12px}.market-order-amounts>div:last-child dd{font-size:24px;letter-spacing:-.035em;font-weight:600}.market-order-amounts small{font-size:10px;font-weight:400;letter-spacing:0;color:#68746c}
.market-order-seller{display:flex;align-items:center;gap:11px;padding:20px 0}.market-order-seller>.market-avatar{width:40px;height:40px;font-size:13px}.market-order-seller>div{min-width:0}.market-order-seller>div>span{display:block;font-size:10px;color:#68746c;margin-bottom:3px}.market-order-seller strong{display:block;font-size:13px;font-weight:500;overflow-wrap:anywhere}
.market-order-chat{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;margin-left:auto;padding:10px 14px;border:1px solid #dfe8e2;border-radius:10px;background:#f2f7f3;color:#006d70;font:inherit;font-size:12px;cursor:pointer}
.market-order-chat svg{width:19px;height:19px}.market-order-chat:hover{background:#e6f1e9;border-color:#bbd5c7}
.market-confirm-reception{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:19px 20px;border:1px solid #d9e8df;border-radius:12px;background:#f4f9f5;margin:0 0 8px}
.market-confirm-reception p{font-size:13px;color:#42614f;line-height:1.6;margin:0}.market-confirm-reception .btn{min-height:48px;font-size:12px;background:#00787b;border-color:#00787b;gap:14px}.market-confirm-reception .btn svg{width:17px;height:17px}


.market-order-footer{display:flex;justify-content:space-between;gap:16px;border-top:1px solid #e5e9e6;padding-top:12px;margin-top:24px}.market-order-footer .market-text-button{font-size:11px;min-height:44px;color:#68746c}.market-order-footer .market-text-button:first-child{color:#00787b}
.market-order-detail :is(button,a):focus-visible{outline:2px solid #00787b;outline-offset:3px}
.market-order-detail .market-order-review{margin-top:6px;border:1px solid #dfe9e3;border-radius:12px;background:#f6faf7;padding:20px}.market-order-detail .market-order-review p{font-size:12px}.market-order-detail .market-order-review strong{font-size:15px}
.market-thread-status[data-status=awaiting_confirmation]{background:#fbf0d9;color:#7b5b22}
.market-thread-status[data-status=pending],.market-thread-status[data-status=verifying],.market-thread-status[data-status=waiting_seller],.market-thread-status[data-status=delivering]{background:#edf3ef;color:#4f6c5c}
@keyframes market-order-advance{from{width:var(--order-from)}to{width:var(--order-progress)}}
@keyframes market-order-pulse{0%,100%{box-shadow:0 0 0 5px #e3f2ec}50%{box-shadow:0 0 0 8px #d4eae255}}
@media(max-width:900px){.market-progress-label{font-size:10px}.market-order-record{align-items:flex-start}.market-order-record time{flex-basis:100%}}
@media(max-width:700px){
 .market-order-roles{flex-wrap:wrap;gap:5px;margin-bottom:20px}.market-order-roles>span{width:100%;margin:5px 0 0;font-size:10px}.market-order-roles button{flex:1}
 .market-order-detail>.market-seller-controls{display:block}.market-order-detail>.market-seller-controls>.market-seller-next{width:100%;max-width:none;margin-top:16px}
 .market-chat-context .market-seller-controls>strong{font-size:16px}.market-chat-context .market-seller-controls>p:not(.market-error){font-size:12px}.market-chat-context .market-seller-controls .market-seller-next{font-size:13px;min-height:48px}
 #dialog:has(.market-order-detail){width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:20px;border-radius:16px}#dialog:has(.market-order-detail)>.dialog-head h2{font-size:21px}.market-order-topline{font-size:11px;margin-bottom:20px}.market-order-demo{font-size:9px}
 .market-progress{padding-bottom:18px}.market-progress-track{display:none}.market-progress ol{grid-template-columns:repeat(4,minmax(0,1fr));gap:22px 0}.market-progress li{padding-inline:3px;gap:8px}.market-progress li::before{content:'';position:absolute;top:17px;left:-50%;width:100%;height:3px;background:#e4e9e6}.market-progress li:nth-child(4n+1)::before{display:none}.market-progress .is-done::before,.market-progress .is-current::before{background:#00868a}.market-progress-dot{width:36px;height:36px;font-size:12px}.market-progress-label{font-size:10px;line-height:1.5;min-height:30px;max-width:110px}.market-progress .is-current .market-progress-state{font-size:8px}
 .market-order-record{padding:15px;gap:12px;flex-direction:column}.market-order-record strong{font-size:12px}.market-order-record time{font-size:10px;flex-basis:auto}.market-order-state{font-size:10px;padding:5px 9px}.market-order-notice{padding:15px;gap:10px;margin-bottom:20px}.market-order-notice h3{font-size:14px}.market-order-notice p{font-size:12px}.market-order-notice>svg{width:19px;height:19px}
 .market-order-body{grid-template-columns:1fr;gap:18px;padding-bottom:18px}.market-order-item{gap:13px}.market-order-item>img{width:76px;height:82px}.market-order-item h3{font-size:14px}.market-order-item p{font-size:11px}.market-order-amounts{padding:14px 0 0;border-left:0;border-top:1px solid #e5e9e6}.market-order-amounts>div{font-size:12px}.market-order-amounts>div:last-child dd{font-size:25px}
 .market-order-seller{gap:9px;flex-wrap:wrap}.market-order-seller>.market-avatar{width:36px;height:36px}.market-order-chat{font-size:11px;padding:10px 11px}.market-confirm-reception{flex-direction:column;align-items:stretch;gap:14px;padding:17px}.market-confirm-reception .btn{justify-content:center}.market-confirm-reception p{font-size:12px}.market-order-footer{margin-top:18px}
}
@media(max-width:380px){#dialog:has(.market-order-detail){padding:16px}.market-order-topline{flex-wrap:wrap;gap:8px}.market-progress ol{gap:20px 0}.market-progress-label{font-size:9px}.market-order-item>img{width:62px;height:72px}.market-order-item h3{font-size:13px}.market-order-chat{width:100%;margin-top:6px}.market-order-footer{gap:8px}.market-order-footer .market-text-button{font-size:10px}}
@media(prefers-reduced-motion:reduce){.market-progress-track>span,.market-progress .is-current .market-progress-dot{animation:none}}
