/* Public shop and admin share the same spacing and touch targets. */
:root { --paper:#f7f6ef; --ink:#192f27; --green:#184b39; --mute:#53685c; --line:#dedfd2; --accent:#f0ce7c; background:var(--paper); }
body { background:var(--paper); color:var(--ink); }
.mast { background:#fcfbf6; color:#193e30; border-bottom:1px solid var(--line); }
.mast-inner { height:60px; }
.identity { letter-spacing:.04em; }
.identity .mark { color:#f4dfac; background:#214a38; border-radius:10px 10px 3px 10px; }
.account { color:inherit; border-color:#cdD6ca; background:#ffffff90; max-width:40%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account::before { background:#47835e; }
button { -webkit-tap-highlight-color:transparent; transition:transform .1s ease-out,background-color .12s ease-out; }
button:active:not(:disabled) { transform:scale(.97); }
button:focus-visible, a:focus-visible { outline-color:#b57c22; }
button[aria-busy=true]::after { content:""; display:inline-block; width:.8em; height:.8em; margin-left:.5em; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:market-spin .7s linear infinite; }
@keyframes market-spin { to { transform:rotate(1turn); } }
.market-hero, body:not(.manager-site) .auth-card:has(form)>header { position:relative; isolation:isolate; overflow:hidden; background:linear-gradient(110deg,#193e30 12%,#315341 73%,#586a4e); color:#fff8e5; }
.market-hero { display:flex; align-items:center; padding:24px 30px; border-radius:22px; min-height:166px; }
.hero-copy { z-index:1; }
.hero-kicker { font-size:13px; color:#ecd6a1; font-weight:650; }
.market-hero h1 { font:750 clamp(31px,5vw,46px)/1.19 'Songti SC','Noto Serif CJK SC','SimSun',serif; margin:7px 0; letter-spacing:.03em; }
.market-hero p { margin:0; font-size:14px; color:#e0e8d9; }
.pantry-art { pointer-events:none; position:absolute; right:5%; bottom:2%; width:194px; height:147px; transform-origin:100% 100%; }
.pantry-art::before { content:""; position:absolute; inset:auto -24px -4px -5px; height:21px; border-radius:50%; background:#122d29a8; filter:blur(6px); }
.pantry-art i { position:absolute; display:block; }
.pantry-bottle { left:4%; bottom:6%; width:25%; height:66%; border-radius:38% 38% 12% 12%; background:linear-gradient(95deg,#28493a,#617655 25%,#a3ad83 40%,#5f7456 57%,#315543 92%); transform:rotate(-7deg); }
.pantry-bottle::before { content:""; position:absolute; left:30%; width:40%; height:30%; bottom:95%; border-top:9px solid #c9bb86; border-radius:3px; background:linear-gradient(95deg,#385944,#849574,#385944); }
.pantry-bottle::after { content:""; position:absolute; inset:48% 1% 16%; background:linear-gradient(100deg,#b3aa89,#f2e0b1 40%,#bdae86); border-block:2px solid #697656; }
.pantry-pouch { right:16%; bottom:7%; width:46%; height:84%; background:linear-gradient(104deg,#b88748,#e5b76e 30%,#dba762 70%,#b48543 74%,#c59351 85%); clip-path:polygon(5% 0,95% 0,91% 10%,100% 93%,89% 100%,2% 96%,8% 13%); transform:rotate(8deg); }
.pantry-pouch::before { content:""; position:absolute; left:7%; right:8%; top:5%; height:4%; border-block:1px solid #9e763e; }
.pantry-pouch::after { content:"田"; display:grid; place-items:center; position:absolute; left:20%; top:32%; width:48%; height:39%; color:#294b38; background:#f6e4b8; font:700 25px/1 serif; border-radius:45% 45% 3px 3px; }
.pantry-can { left:30%; bottom:4%; width:29%; height:44%; transform:rotate(-6deg); border-radius:40% 40% 17% 17% / 9% 9% 5% 5%; background:linear-gradient(95deg,#a44d36,#df8a5c 35%,#bd6747 73%,#955239); border-block:3px solid #d6c7a0; }
.pantry-can::after { content:""; position:absolute; inset:32% 0 23%; background:linear-gradient(95deg,#ccbc91,#eee0b9,#ceba92); }
.pantry-fruit { right:1%; bottom:0; width:29%; height:34%; border-radius:55% 45% 47% 50%; background:radial-gradient(ellipse at 36% 24%,#efb553 0,#d98d3b 49%,#a96630 92%); }
.pantry-fruit::before { content:""; position:absolute; top:-8%; left:47%; width:42%; height:16%; background:#778f53; border-radius:90% 0; transform:rotate(-14deg); }
.market-search { margin:12px 0 9px; border-radius:13px; background:#fff; border-color:#d6dccd; }
.market-search:focus-within { border-color:#366949; box-shadow:0 0 0 2px #28644622; }
.market-search input:focus { outline:0; }
.market-links { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:0 0 14px; }
.market-links button { display:flex; align-items:center; text-align:left; gap:9px; padding:8px 13px; background:#ebeedd; color:#344a34; border:1px solid #dce2cc; border-radius:11px; }
.market-links button:first-child { background:#f7ead1; border-color:#ead8b2; color:#634820; }
.market-links i { margin-left:auto; font:20px/1 sans-serif; }
.catalog { display:block; }
.cats { position:static; display:flex; overflow:auto; scrollbar-width:thin; background:none; padding:2px 0 6px; margin-bottom:8px; gap:6px; }
.cats button { flex:none; min-height:44px; text-align:center; padding:5px 14px; color:#435447; background:#fdfcf7; border:1px solid var(--line); border-radius:20px; }
.cats button.on { color:#fff; background:#244d39; border-color:#244d39; box-shadow:none; }
.cats .on::before { display:none; }
.shelf-heading { padding:4px 2px 10px; }
.shelf-heading h2 { font-size:20px; }
.products { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.product { grid-template-columns:76px minmax(0,1fr); gap:3px 12px; background:#fffef9; border-radius:15px; padding:12px; }
.product .art { grid-column:1; grid-row:1 / span 2; width:76px; height:85px; align-self:center; border-radius:10px; }
.product .details, .product .buy-line { grid-column:2; min-width:0; }
.product .details h3 { font-size:16px; }
.product .buy-line { display:flex; justify-content:space-between; align-items:center; gap:5px; }
.product .price { padding:0; color:#744127; font-size:17px; }
.product .details .sub { font-size:13px; }
.product .step { display:flex; align-items:center; justify-content:flex-end; margin:0; gap:2px; }
.product .step button { min-width:44px; width:44px; height:44px; min-height:44px; padding:0; border-radius:14px; background:#ebefe4; color:#204832; }
.product .step [data-act=plus] { background:#23523d; color:white; }
.product .step b { font-size:14px; text-align:center; min-width:12px; }
.product .step [hidden] { display:none; }
.product .step .sold-out:disabled { width:auto; padding:0 7px; background:#eceee6; color:#62695e; }
.bar { background:#1d3b2e; border:1px solid #46604b; border-radius:17px; }
.bar .bag-summary { color:#fff9ec!important; }
.bar button:not(.bag-summary) { background:#f2ce85; color:#3c321f; }
nav { background:#fffcf6; border-color:var(--line); }
.nav-inner .on { background:#e5eddb; color:#254e36; }
.ranking, .profile-card, .profile-actions button, .order, .auth-card, .card { border-color:var(--line); }
.ranking:not(.admin-ranking) { border-top:5px solid #c29b58; }
.rank-fig strong { color:#73522b; }
.order { border-radius:16px; background:#fffef9; }
.order footer .muted { font-variant-numeric:tabular-nums; }
.profile-card { color:#f4f2de; background:linear-gradient(118deg,#234734,#4e6246); }
body:not(.manager-site) .auth-card:has(form) { padding:0; overflow:hidden; width:min(100%,460px); margin:clamp(8px,4vh,54px) auto 0; background:#fffdf8; box-shadow:0 12px 32px #243a2510; }
body:not(.manager-site) .auth-card:has(form)>header { margin:0; padding:26px 22px; min-height:132px; }
body:not(.manager-site) .auth-card>header h1, body:not(.manager-site) .auth-card>header p { position:relative; z-index:1; max-width:64%; }
body:not(.manager-site) .auth-card>header h1 { font-size:26px; line-height:1.2; margin:5px 0 8px; }
body:not(.manager-site) .auth-card>header .sub { color:#e1e8d9; }
.auth-card .pantry-art { transform:scale(.67); right:1%; }
body:not(.manager-site) .auth-card>form { padding:8px 22px 0; }
body:not(.manager-site) .auth-card .auth-links { padding:0 22px 17px; }
.label input { border-radius:10px; }
body:not(.manager-site) .primary { background:#22523b; color:#fffdf5; }
.manager-site .mast { color:#f8fafc; }
.manager-site .account { background:transparent; color:#f8fafc; }
.manager-site .mast .mark { color:#233852; background:#e3e7f0; }
.manager-site .tabs .on { border:1px solid #cdd5e3; }
.manager-site .tabs button { min-height:44px; }
.manager-site .tiles .card, .manager-site .stock-row { border-radius:13px; }
.view-loading { background:#fffdf7; padding:18px; border-radius:15px; border:1px solid var(--line); color:var(--mute); }
.view-loading span { display:block; height:12px; border-radius:6px; background:#eceee4; width:75%; margin:12px 0 0; }
.view-loading span:last-child { width:44%; }
@media(max-width:740px) { .products { grid-template-columns:minmax(0,1fr); } }
@media(max-width:600px) {
  .mast-inner { height:51px; }
  .market-hero { min-height:124px; padding:18px; border-radius:17px; }
  .market-hero .pantry-art { transform:scale(.77); right:4%; }
  .market-hero h1 { font-size:33px; }
  .hero-kicker,.market-hero p { font-size:12px; }
  .market-links { margin-bottom:8px; }
  .product { padding:10px; }
  .product .art { width:73px; height:82px; }
  .nav-inner button { min-height:44px; }
}
@media(max-width:365px){ .product { grid-template-columns:55px minmax(0,1fr); gap:3px 8px; } .product .art{width:55px;} .market-hero .pantry-art{transform:scale(.64);right:2%;} .auth-card .pantry-art{transform:scale(.53);} .product .step button {width:44px;min-width:44px;} }
@media(prefers-reduced-motion:reduce){ *, *::before, *::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; scroll-behavior:auto!important; } }
.bag-lines, .order-progress { list-style:none; padding:0; margin:0; }
.bag-lines li { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); }
.bag-lines li>div:first-child { min-width:0; overflow-wrap:anywhere; }
.bag-lines small { display:block; color:var(--mute); margin-top:3px; }
.bag-controls { display:flex; align-items:center; gap:6px; }
.bag-controls button { min-width:44px; min-height:44px; padding:4px; background:#eaf0e5; }
.bag-total { padding-top:12px; }
.bag-total strong { font-size:23px; }
.order-progress { display:flex; margin:13px 0; gap:4px; }
.order-progress li { flex:1; font-size:12px; color:var(--mute); }
.order-progress li::before { display:block; content:""; height:3px; margin:0 0 5px; border-radius:2px; background:#e6e6db; }
.order-progress li.reached::before { background:#59826b; }
.order-progress li[aria-current] { color:#214e39; font-weight:700; }
#toast:not(:empty) { width:max-content; max-width:calc(100vw - 40px); }
.product .buy-line { flex-wrap:wrap; }
