body:has(.market),body:has(.receipt){background:#f7f8f6;color:#172c23}
body:has(.market) header,body:has(.receipt) header{justify-content:center}
.shell:has(.market){max-width:1000px;padding:18px clamp(14px,4vw,40px) 40px}
.market{color:#15291e}.market h1,.receipt h1{font-size:clamp(1.8rem,5vw,2.8rem);letter-spacing:-.045em}
.welcome{max-width:440px;margin:auto;overflow:hidden;background:white;border-radius:22px;box-shadow:0 8px 42px #19392a15}
.cover{width:100%;height:165px;object-fit:cover;display:block;background:#d8e7dc}
.welcome-card{position:relative;margin-top:-16px;border-radius:20px;background:#fff;text-align:center;padding:0 24px 26px}
.portrait{width:84px;height:84px;object-fit:cover;border-radius:50%;border:4px solid white;margin-top:-41px;background:#e5efda}
.welcome h1{margin:14px 0 8px}.welcome p{margin:0}.promises{list-style:none;text-align:left;padding:0;margin:24px 0}.promises li{display:flex;align-items:center;gap:10px;margin:14px 0;font-size:.95rem}.promises li::before{content:'✓';background:#317755;color:white;text-align:center;line-height:26px;width:26px;border-radius:50%;flex-shrink:0}
.market button,.market .button,.receipt .button,.receipt button{background:#176441;color:white}.main-action{width:100%;justify-content:center;margin:8px 0 14px}.welcome-card>a:last-child{display:inline-block;padding:8px}
.seller,.contribution{background:#e6f1e9;border-radius:14px;padding:12px 16px}.seller{display:flex;align-items:center;gap:12px;margin-bottom:20px}.seller img,.dash-portrait{width:48px;height:48px;border-radius:50%;object-fit:cover}.seller div{display:grid}.seller a,.cart-link{margin-left:auto;background:white;border:1px solid #a5bcac;border-radius:30px;padding:10px 16px;text-decoration:none;font-weight:650}
.shop-tools,.cart-row,.steppers{display:flex;align-items:center;gap:8px}.shop-tools h1{margin:0}.product-search{margin-top:18px}.goods{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,170px),1fr));gap:14px}.good{display:flex;flex-direction:column;align-items:flex-start;background:#fff;border:1px solid #dde4de;border-radius:15px;padding:9px;min-width:0}.packshot{position:relative;width:100%;background:#f3f3f0;border-radius:10px;overflow:hidden}.packshot img{width:100%;aspect-ratio:1;object-fit:contain;display:block}.packshot span{position:absolute;top:7px;left:7px;padding:5px 9px;border-radius:12px;background:#ffe0e8;color:#812442;font-size:.9rem;font-weight:750;line-height:1.15}.packshot small{display:block;font-size:.7rem;color:inherit}.good h2{font-size:1rem;line-height:1.2;margin:10px 0 8px}.good>b{margin-top:auto}.good button{width:100%;justify-content:center;font-size:.88rem;margin-top:9px;padding:9px 5px}.interactive .fallback{display:none}.cart-row{background:white;border-bottom:1px solid #dbe4dd;padding:12px 8px}.cart-row img{width:56px;height:66px;object-fit:contain}.cart-row>b{margin-left:auto;white-space:nowrap}.steppers{flex-wrap:wrap}.steppers button{min-width:36px;background:#f4f6f3;color:#214c39;padding:6px 9px}.receipt{text-align:center;max-width:540px;margin:auto;background:white;padding:26px;border-radius:18px}.receipt ul{text-align:left}.ok-mark{display:inline-grid;place-items:center;border-radius:50%;width:64px;height:64px;background:#e1f0dc;color:#24724a;font-size:2.2rem}.dash-cover{width:100%;height:112px;object-fit:cover;border-radius:16px;margin-bottom:16px}.dashboard-head{display:flex;align-items:center;gap:12px}.dashboard-head h1{margin:0 0 12px}.dash-grid{display:grid;gap:18px}.dash-grid section{min-width:0}.dash-grid h2{margin-top:0}.dash-grid ol{padding-left:20px}.dash-grid li{padding:6px 0}
@media(min-width:800px){.dash-grid{grid-template-columns:1fr 1fr}.shell:has(.dash-grid){max-width:1100px}}
@media(max-width:500px){.goods{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.welcome .cover{height:150px}.shell:has(.market){padding:12px 12px 32px}.cart-link{font-size:.84rem}.good{padding:6px}.cart-row img{width:40px}}

.category-picker{position:relative;flex:none}
.market .category-toggle{display:grid;place-items:center;width:44px;height:44px;padding:0;background:white;border:1px solid #acc3b3;border-radius:12px;color:#194e34;font-size:21px}
#category-list{position:absolute;z-index:2;top:calc(100% + 5px);left:0;min-width:min(220px,80vw);max-width:80vw;max-height:50vh;overflow:auto;padding:5px;background:white;border:1px solid #c4d4c9;border-radius:12px;box-shadow:0 8px 24px #173c2426}
.market #category-list button{display:block;width:100%;min-height:44px;background:white;color:#163f2a;text-align:left;border:0;border-radius:8px;padding:8px 12px;overflow-wrap:anywhere}
.market #category-list button[aria-pressed=true]{background:#e6f1e9;font-weight:700}
.market .shop-tools h1{flex:1;min-width:0;overflow-wrap:anywhere;font-size:clamp(1.25rem,4vw,2.2rem)}
.market .cart-link{white-space:nowrap}

.public-note,.shop-info,.receipt p{overflow-wrap:anywhere}
.public-note{white-space:pre-line}
.welcome-card .public-note{margin:12px 0}
.shop-info{text-align:left}

#category-list{display:block}
#category-list .menu-section{border:none;border-radius:0;margin:0;padding:0}
#category-list .menu-section+.menu-section{border-top:1px solid #dce7df}
#category-list summary{padding:0 10px;color:#194e34}
#category-list a,#category-list [data-category]{padding-inline:24px}
#category-list a{display:flex;align-items:center;min-height:44px;color:#163f2a;text-decoration:none;border-radius:8px;overflow-wrap:anywhere}
#category-list a:hover,#category-list a:focus-visible{background:#e6f1e9}
.info-page{margin-inline:auto;overflow-wrap:anywhere}

.earnings-card { margin-bottom: 10px; }
.earnings-card > strong { display: block; line-height: 1.15; margin: 6px 0 10px; }
.earnings-card .sales-caption { color: #e0ebe4; font-size: .92rem; }
.earnings-card .sales-caption b { margin-inline-start: .3em; }
.group-goal { background: #e8efdf; border-radius: 16px; padding: 16px 20px; }
.group-goal h2 { margin: 0 0 6px; font-size: 1rem; }
.goal-values { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
.goal-percent { white-space: nowrap; }
.group-goal progress { display: block; width: 100%; height: 9px; border: 0; border-radius: 10px; margin-top: 10px; overflow: hidden; background: #c9d6c0; accent-color: #23764d; }
.group-goal progress::-webkit-progress-bar { background: #c9d6c0; }
.group-goal progress::-webkit-progress-value { background: #23764d; border-radius: 10px; }
.group-goal progress::-moz-progress-bar { background: #23764d; }
.campaign-date { color: var(--muted); font-size: .88rem; margin: 10px 0 16px; }
.seller-results table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.seller-results th, .seller-results td { padding: .6em .25em; border-bottom: 1px solid var(--line); text-align: right; }
.seller-results th:first-child { text-align: left; overflow-wrap: anywhere; }
.seller-results td { white-space: nowrap; }

.apparel-good .packshot img{background:#f8f8f5}
.apparel-good>[data-apparel-price]{font-size:1.08rem}
body:has(.apparel-dialog[open]){overflow:hidden}
.apparel-dialog{width:min(440px,100%);max-width:100%;max-height:90dvh;margin:auto;padding:0;border:0;border-radius:20px;color:#172c23;background:#fff;overflow:hidden}
.apparel-dialog[open]{display:flex;flex-direction:column}
.apparel-dialog::backdrop{background:#10261ed1}
.apparel-heading,.apparel-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;flex:none}
.apparel-heading{border-bottom:1px solid #dde4de}
.apparel-heading h3{margin:0;font-size:1rem;line-height:1.25}
.apparel-heading button{width:44px;height:44px;min-width:44px;margin:0;background:#eef3ef;color:#163c2a;font-size:1.5rem;border-radius:50%}
.apparel-body{padding:12px 16px;overflow-y:auto;overscroll-behavior:contain}
.apparel-body .packshot{background:#f8f8f5}
.apparel-body .garment-frame{max-width:min(38dvh,200px)}
.apparel-config{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:10px;margin-top:12px}
.apparel-config label{margin:0;min-width:0;font-size:.88rem}
.apparel-config select,.apparel-config input{min-height:44px;font-size:16px;padding:6px 8px}
.apparel-config .wide{grid-column:1/-1}
.design-logo{max-width:100px;max-height:70px;object-fit:contain}
.card-motif{margin:0 0 .4rem;color:#365445;font-size:.9rem;line-height:1.3}
.apparel-footer{border-top:1px solid #dde4de;background:#fff}
.apparel-footer b{white-space:nowrap}.apparel-footer button{width:auto;flex:1;min-height:44px;margin:0}
@media(max-width:500px){.apparel-dialog{margin:auto auto 0;border-radius:18px 18px 0 0}.apparel-footer{padding-bottom:max(10px,env(safe-area-inset-bottom))}}
.packshot .garment-frame{position:relative;width:100%;aspect-ratio:1;margin:auto}
.apparel-good .packshot{display:grid;place-items:center}
.packshot .garment-frame img[data-garment-photo]{display:block;position:static;width:100%;height:100%;object-fit:contain;max-width:none;max-height:none}
.packshot .garment-frame img[data-garment-art]{position:absolute;transform:translateX(-50%);background:transparent;aspect-ratio:auto;object-fit:contain;height:auto;max-width:none;max-height:none}
.packshot .garment-frame img[hidden]{display:none}

.receipt-actions{display:flex;align-items:center;justify-content:center;gap:1rem;flex-wrap:wrap}.receipt .receipt-return{display:flex;align-items:center;justify-content:center;gap:.55em;width:100%;min-height:48px;margin:0 0 18px;font-weight:750}
.receipt-actions button{background:white;color:#176441;border:1px solid #8baa98}

.apparel-good .packshot [data-apparel-profit]{top:auto;bottom:5px;left:5px;padding:3px 6px;border-radius:6px;font-size:.73rem}
.apparel-good .packshot [data-apparel-profit] small{display:inline;font-size:inherit;margin-left:.25em}
.garment-caption{width:100%;margin:6px 0 0;color:#174331;font-size:1rem;font-weight:750;line-height:1.25;overflow-wrap:anywhere}
.garment-caption:empty{display:none}
.apparel-good>h2{font-size:.88rem;font-weight:550;margin:5px 0 8px}

.goods-heading {
  grid-column: 1 / -1;
  margin: 24px 0 0;
  padding: 10px 14px;
  background: #deebe2;
  border-inline-start: 5px solid #176442;
  color: #173e2c;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.goods-heading:first-child { margin-top: 0; }

.motif-gallery { grid-column: 1 / -1; min-width: 0; padding-bottom: 4px; }
.motif-toolbar { display: flex; align-items: center; gap: 6px; }
.motif-toolbar strong { margin-right: auto; font-size: 1.05rem; }
.market .motif-toolbar button { background: transparent; color: #214d38; width: 38px; min-height: 44px; padding: 0; margin: 0; border: 0; font-size: 1.8rem; line-height: 1; }
.market .motif-toolbar button:disabled { color: #a4b1a7; }
.motif-grid { display: flex; overflow-x: auto; gap: 8px; padding: 3px 2px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #c4cfc7 transparent; }
.market .motif-grid button { position: relative; flex: 0 0 112px; height: 88px; margin: 0; padding: 14px; background: #fff; border: 1px solid #d7ded8; border-radius: 10px; scroll-snap-align: start; }
.market .motif-grid button[aria-pressed="true"] { background: #eef5eb; border-color: #216542; box-shadow: inset 0 0 0 1px #216542; }
.motif-grid button[aria-pressed="true"]::after { content: '✓'; position: absolute; top: 3px; right: 4px; background: #216542; color: white; border-radius: 50%; width: 14px; font: bold 10px/14px sans-serif; }
.market .motif-grid button { color: #173e2c; }
.motif-grid img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Product help stays in dialogs so the catalogue remains easy to scan. */
body:has(.product-dialog[open]){overflow:hidden}
.product-dialog{width:min(520px,calc(100% - 24px));max-width:100%;max-height:88dvh;margin:auto;padding:0;border:0;border-radius:18px;color:#172c23;background:#fff;overflow:hidden;text-align:left}
.product-dialog[open]{display:flex;flex-direction:column}
.product-dialog::backdrop{background:#10261ecc}
.product-dialog-body{padding:16px 20px;overflow:auto;overscroll-behavior:contain;line-height:1.55}
.product-dialog-body p:first-child{margin-top:0}
.product-detail-photo{display:block;width:100%;max-height:220px;object-fit:contain;margin:0 auto 16px}
.card-motifs{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:12px}.card-motifs img{width:100%;height:auto}
.market .product-info-link{display:inline-flex;width:auto;min-height:44px;margin:0;padding:8px 0;background:transparent;color:#176441;text-align:left;text-decoration:underline;text-underline-offset:3px;font-size:.95rem;border:0}
.product-help{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.size-guide{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.size-guide caption{text-align:left;font-weight:700;margin-bottom:8px}
.size-guide th,.size-guide td{padding:8px;border-bottom:1px solid #dce5df;text-align:right}.size-guide th:first-child{text-align:left}
.market .shop-delivery{font-size:.95rem;line-height:1.45;margin:-8px 0 20px;color:#365445}
.market .good>button[data-add],.market .good>button[data-apparel-open]{min-height:46px;font-size:.95rem;padding:10px}
.market .good>h2{font-size:1rem;line-height:1.35;font-weight:650}
.market button:focus-visible,.market a:focus-visible{outline:3px solid #176441;outline-offset:3px}
.market .product-dialog .apparel-heading button{width:44px;min-width:44px;height:44px;margin:0;padding:0;background:#eef3ef;color:#163c2a;font-size:1.5rem}
.market .product-dialog h3{font-size:1.05rem}
@media(max-width:380px){.goods{grid-template-columns:1fr}.good{padding:12px}.good>.packshot{max-height:260px}.good>.packshot img{max-height:260px}.seller{padding:12px}.seller a{padding:10px}.apparel-config{grid-template-columns:1fr 1fr}}

.good .pack-contents{margin:0 0 .5rem;color:#365445;line-height:1.35;font-size:.9rem}
.motif-selection{margin:.25rem 0 0;color:#365445;font-size:.95rem}

.fit-choices{display:flex;gap:.45rem;margin:0;padding:0;border:0}
.fit-choices button{width:auto;padding:.45rem 1rem}
.fit-choices button[aria-pressed=false]{background:white;color:inherit;border:1px solid currentColor}
