/* A quiet, mobile-first order list in Miloria's existing boutique palette. */
.storefront .header>.my-orders-link{grid-column:1;grid-row:1;justify-self:start;display:inline-flex;align-items:center;gap:8px;min-height:46px;text-decoration:none;color:var(--deep);font-size:.875rem;font-weight:600;padding:8px 12px;border-radius:16px}
.my-orders-link svg,.history-header svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.storefront .header>.my-orders-link:hover{background:#eee6eb}
.my-orders-page{--paper:#fffdf9;--deep:#52394c;--muted:#6d6469;--line:#e5dcd5;background:#faf7f2;color:#30282d;min-height:100dvh;margin:0}
.my-orders-page ::selection{background:#e8dce5;color:#30282d}
.history-header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;max-width:980px;margin:auto;padding:12px 24px;border-bottom:1px solid var(--line)}
.history-header>a:nth-child(2){display:flex}.history-header img{object-fit:contain;width:110px;height:80px}
.history-back,.history-refresh{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;background:transparent;color:var(--deep);border-radius:14px;min-height:44px;min-width:44px;text-decoration:none;font-size:.875rem}
.history-back{justify-self:start}.history-refresh{justify-self:end;padding:10px;cursor:pointer}
.history-main{max-width:760px;margin:0 auto;padding:40px 24px calc(40px + env(safe-area-inset-bottom,0px))}
.history-heading{margin-bottom:26px}.history-heading h1{font:400 clamp(2.25rem,6vw,3.25rem)/1.1 var(--serif);color:var(--deep);margin:0 0 12px}.history-heading p{margin:0;color:var(--muted);font-size:.95rem;line-height:1.5}
.history-filters{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px}.history-filters[hidden]{display:none}.history-filters button{min-height:44px;padding:10px 17px;border:1px solid transparent;border-radius:24px;background:transparent;color:var(--muted);font-size:.875rem;cursor:pointer}.history-filters button[aria-pressed=true]{background:var(--deep);color:#fff}.history-filters button:hover:not([aria-pressed=true]){background:#eee6eb}
.history-status{min-height:1.5em;font-size:.875rem;color:var(--muted);margin:10px 0 16px}
.history-order{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:20px;margin-bottom:14px}
.history-order-top{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:18px}.history-order-top time{font-size:.8rem;color:var(--muted)}
.history-state{display:inline-flex;font-size:.78rem;font-weight:600;line-height:1.3;padding:7px 11px;border-radius:20px;background:#eee6eb;color:var(--deep)}.history-state[data-state=delivered]{background:#eaf0e5;color:#3b5734}.history-state[data-state=pending_payment],.history-state[data-state=payment_review]{background:#f4ebdb;color:#765526}.history-state[data-state=cancelled],.history-state[data-state=refunded]{background:#f0ece9;color:#65595c}
.history-product{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:15px}.history-photo{height:82px;width:64px;object-fit:contain;border-radius:10px;background:#f4efe9}.history-photo-fallback{display:grid;place-items:center}.history-photo-fallback img{width:44px;height:44px;object-fit:contain}.history-product h2{font:600 1rem/1.4 var(--sans,system-ui,sans-serif);margin:0 0 5px;overflow-wrap:anywhere}.history-product p{font-size:.82rem;color:var(--muted);margin:0;line-height:1.5}
.history-order-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}.history-amount{font-size:1.1rem;font-weight:650;white-space:nowrap;font-variant-numeric:tabular-nums}.history-amount small{display:block;font-size:.73rem;font-weight:400;color:var(--muted);margin-top:3px}
.history-open{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;background:#f0e9ee;color:var(--deep);min-height:46px;padding:10px 16px;border-radius:23px;font-size:.85rem;font-weight:600;cursor:pointer}.history-open svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.history-open:hover{background:#e6dbe3}
.history-empty{padding:38px 12px 44px;text-align:center}.history-empty h2{font:400 1.65rem/1.25 var(--serif);margin:0 0 12px;color:var(--deep)}.history-empty p{max-width:30ch;margin:0 auto 24px;line-height:1.6;color:var(--muted);font-size:.95rem}.history-empty a{display:inline-flex;text-decoration:none}
.history-recover{margin-top:30px;border-top:1px solid var(--line);padding-top:12px}.history-recover summary{padding:14px 0;min-height:44px;font-size:.9rem;font-weight:600;cursor:pointer;color:var(--deep)}.history-recover p{color:var(--muted);font-size:.875rem;line-height:1.6;margin:8px 0 16px}.history-recover form{display:grid;gap:12px}.history-recover label{font-size:.85rem}.history-recover input{width:100%;min-width:0;min-height:48px;font-size:16px;padding:12px;border:1px solid #beafb8;border-radius:12px;background:var(--paper);color:#30282d;caret-color:var(--deep)}.history-recover .button{justify-self:start;min-height:46px}
.history-device-note{font-size:.78rem;line-height:1.6;color:var(--muted);max-width:65ch;margin:24px 0 0}
.my-orders-page :is(button,a,input,summary):focus-visible,.my-orders-link:focus-visible{outline:2px solid var(--deep);outline-offset:4px}.my-orders-page button:disabled{opacity:.55;cursor:wait}.my-orders-page #checkout-dialog{max-height:calc(100dvh - 24px)}
#history-pagination{text-align:center;margin:24px 0}#history-pagination[hidden]{display:none}
@media(max-width:900px){body.storefront .header:has(.my-orders-link){grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px}body.storefront .header:has(.my-orders-link)>.brand{grid-column:2;grid-row:1}body.storefront .header:has(.my-orders-link)>#bag-button{grid-column:3;grid-row:1}body.storefront .header>.my-orders-link{display:flex;flex-direction:column;justify-content:center;gap:4px;padding:7px 3px;font-size:.7rem;line-height:1.2;white-space:nowrap}}
@media(max-width:600px){.history-header{padding:8px 18px}.history-header img{width:96px;height:70px}.history-main{padding:28px 18px calc(28px + env(safe-area-inset-bottom,0px))}.history-order{padding:16px}.history-order-top{margin-bottom:16px}.history-product{grid-template-columns:56px minmax(0,1fr);gap:12px}.history-photo{width:56px;height:74px}.history-filters button{padding-inline:14px}.history-order-bottom{gap:10px}.history-back span{font-size:.8rem}}
@media(prefers-reduced-motion:no-preference){.history-main{animation:history-arrive .4s cubic-bezier(.2,.7,.3,1) both}.history-open,.history-filters button,.history-refresh{transition:background .18s ease,transform .18s ease}.history-open:active,.history-refresh:active{transform:scale(.97)}@keyframes history-arrive{from{transform:translateY(8px)}to{transform:translateY(0)}}}

.history-order:has([data-retry]) .history-product{display:block}.history-order [data-retry]{margin-top:16px}

/* Customer order detail only; checkout and admin keep their presentation. */
#checkout-dialog .receipt-order-detail{color:#4a2f3e}
#checkout-dialog .receipt-order-detail .receipt-brand{margin-bottom:12px}
#checkout-dialog .receipt-order-detail .receipt-emblem{width:48px;height:48px;margin:0 0 14px;background:#f7f2ed;color:#4a2f3e;animation:none}
#checkout-dialog .receipt-order-detail .receipt-emblem>svg{width:26px;height:26px}
#checkout-dialog .receipt-order-detail .receipt-emblem>img{width:28px;height:28px}
#checkout-dialog .receipt-order-detail .receipt-order-date{margin:10px 0 0;font-size:.8rem;line-height:1.5;color:var(--muted)}
#checkout-dialog .receipt-order-detail .receipt-hero{padding-bottom:18px}
#checkout-dialog .receipt-order-detail .receipt-amount{margin-top:16px}
#checkout-dialog .receipt-order-detail .receipt-summary{background:#f7f2ed}
#checkout-dialog .receipt-order-detail .order-product-monogram{background:#f7f2ed;border:1px solid #4a2f3e18}
#checkout-dialog .receipt-order-detail .order-product-monogram img{width:32px;height:32px;object-fit:contain}
#checkout-dialog .receipt-order-detail .order-timeline time{display:block;margin-top:4px;font-size:.7rem;color:var(--muted)}
#checkout-dialog .receipt-order-detail .receipt-primary{padding:18px 0 0;border-top:1px solid var(--line)}
#checkout-dialog .receipt-order-detail #checkout-done{background:#4a2f3e;color:#fff;border-color:#4a2f3e}
#checkout-dialog .receipt-order-detail .receipt-action-status:empty{display:none}
@media(max-width:520px){
 #checkout-dialog:has(.receipt-order-detail){padding:24px 16px;scrollbar-gutter:auto}
 #checkout-dialog .receipt-order-detail .order-timeline{grid-template-columns:minmax(0,1fr);margin-inline:0;gap:16px;text-align:left}
 #checkout-dialog .receipt-order-detail .order-timeline li{grid-template-columns:25px minmax(0,1fr);justify-items:start;align-items:start;font-size:.8rem;gap:12px}
 #checkout-dialog .receipt-order-detail .order-timeline li:not(:last-child)::after{left:11px;right:auto;top:25px;bottom:-16px;width:1px;height:auto;background:var(--line)}
 #checkout-dialog .receipt-order-detail .order-product-placeholder{width:44px;height:56px}
}
@media(max-width:360px){
 #checkout-dialog .receipt-order-detail .purchase-items li{grid-template-columns:44px minmax(0,1fr)}
 #checkout-dialog .receipt-order-detail .purchase-item-amount{grid-column:2;white-space:normal;overflow-wrap:anywhere}
}
