/* v5 shop: /shop/, /shop/thanks/, /shop/order/, the library inside /forum/purchases, and the worker-rendered
   /shop/seller page. On top of /assets/common.css; no inline styles anywhere (CSP). Works from 320 px up. */

.shop{max-width:760px}
.shop h1{font-size:clamp(24px,5vw,32px)}
.shop h2{font-size:22px}
.shop h3{font-size:18px;margin:0}
.shop h4{font-size:15px;margin:8px 0 4px;color:var(--cream)}
.shop .page-head{margin-bottom:8px}

/* edition tabs and currency switch */
.shop-editions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:10px}
.shop-edition{display:grid;gap:4px;text-align:left;font:16px/1.4 var(--body);color:var(--text);background:var(--well);
  border:2px solid var(--stone-3);padding:12px 14px;cursor:pointer;min-height:64px}
.shop-edition:hover{border-color:var(--muted)}
.shop-edition[aria-checked="true"]{border-color:var(--honey);box-shadow:0 0 0 2px rgba(242,193,78,.25)}
.shop-edition:focus-visible{outline:2px solid var(--honey);outline-offset:2px}
.shop-edition-name{font-family:var(--pixel);color:var(--cream)}
.shop-edition-price{font:20px/1.2 var(--pixel);color:var(--honey)}
/* v5.3: an edition the viewer already owns: a link to 我的购买, not a choice */
.shop-edition-owned{text-decoration:none;border-style:dashed;cursor:pointer}
.shop-edition-owned .shop-edition-name{color:var(--muted)}
.shop-edition-tag{font-size:14px;color:var(--ok)}
.shop-owned-all .btn{max-width:420px}
.shop-curs{display:flex;flex-wrap:wrap;gap:8px}
.shop-curs [aria-checked="true"]{color:var(--cream);filter:brightness(1.3)}
.shop-contents summary{cursor:pointer;font-family:var(--pixel);color:var(--cream)}
.shop-contents p{margin:6px 0}
.shop-methods{margin:0}
.shop-seller{color:var(--muted)}

/* the form */
.shop-form{max-width:none}
.shop-boxes{border:0;margin:0;padding:0;display:grid;gap:12px;min-width:0}
.shop .check.shop-box{align-items:flex-start;line-height:1.55}
.shop .check.shop-box input{flex:none;margin:3px 0 0}
.shop-box-note{display:block;margin-top:4px;font-size:13px;color:var(--muted)}
.shop-total{font:20px/1.3 var(--pixel);color:var(--honey);margin:0}
.shop-hint{margin:0}
.shop-form .btn{width:100%;max-width:420px}

/* library */
.shop-orders{display:grid;gap:16px}
.shop-order{display:grid;gap:8px}
.shop-order-head{display:grid;gap:4px}
.shop-order-head p{margin:0}
.shop-order-actions{margin:0}
.shop-files{display:grid;gap:4px}
.shop-file-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.shop-file{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;justify-content:space-between;border-top:1px solid var(--stone-3);padding-top:8px}
.shop-file-main{display:grid;gap:2px;min-width:0;flex:1 1 220px}
.shop-file-main .muted{overflow-wrap:anywhere}
.shop-sha code{font:12px/1.4 var(--mono);overflow-wrap:anywhere}
.shop-phone p{margin:0 0 6px}
.shop-phone-list{margin:0;padding-left:20px;display:grid;gap:6px}
.shop-share-out{display:grid;gap:6px}
.shop-share-out p{margin:0}
.shop-share-url{width:100%;font:13px/1.4 var(--mono)}
.shop-lib{display:grid;gap:16px}
.shop-lib-forms{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}
.shop-lib-forms .form{max-width:none}
.shop-empty{margin:0}
/* v5.3: 首页 › 我的购买 on /shop/order/ (the forum's .crumbs, which this page does not load) */
.shop .crumbs ol{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-wrap:wrap;gap:2px 8px;font-size:14px;color:var(--muted)}
.shop .crumbs li + li::before{content:"›";margin-right:8px;color:var(--ink-2)}
.shop .crumbs a{color:var(--muted);display:inline-block;padding-block:4px}
.shop .crumbs a:hover{color:var(--honey)}
.shop .crumbs [aria-current]{color:var(--text)}
.shop-login{margin:0}
.shop-ok{color:var(--ok)}
.shop-direct a{color:var(--honey)}

/* 电子收据 */
.shop-receipt{border:2px solid var(--stone-3);background:var(--stone-2);padding:12px 16px}
.shop-receipt-list{display:grid;grid-template-columns:max-content 1fr;gap:6px 14px;margin:8px 0}
.shop-receipt-list dt{color:var(--muted)}
.shop-receipt-list dd{margin:0;min-width:0;overflow-wrap:anywhere}
@media (max-width:520px){.shop-receipt-list{grid-template-columns:1fr}.shop-receipt-list dd{margin-bottom:6px}}
@media print{
  body.shop-printing *{visibility:hidden}
  body.shop-printing .shop-print-target,body.shop-printing .shop-print-target *{visibility:visible}
  body.shop-printing .shop-print-target{position:absolute;left:0;top:0;width:100%;color:#000;background:#fff;border:0}
  body.shop-printing .shop-print-target a{color:#000}
  body.shop-printing .shop-print-target dt{color:#333}
  .shop-no-print{display:none!important}
}

/* /shop/seller (worker-rendered, no script) */
.seller-page main.seller{max-width:760px;margin-inline:auto;padding:40px var(--gut) 72px}
.seller-table{border-collapse:collapse;width:100%;margin:12px 0}
.seller-table th,.seller-table td{text-align:left;vertical-align:top;padding:8px 10px;border-bottom:1px solid var(--stone-3);overflow-wrap:anywhere}
.seller-table th{color:var(--muted);font-weight:normal;width:34%}
@media (max-width:520px){.seller-table th,.seller-table td{display:block;width:auto;border:0;padding:2px 0}.seller-table td{padding-bottom:10px;border-bottom:1px solid var(--stone-3)}}
.seller-update,.seller-closed{color:var(--muted)}

/* homepage pieces live in /assets/home/site.css's companion /assets/shop/home.css */
