/* sumishop.eu storefront, direction "Soft label": white ground, porcelain photo tiles, one rounded sans and three small
   pastels that each have one job. Tokens and what moved where: eshop/app/out/DESIGN.md.
   The server sends CSP style-src 'self', so there are no inline styles anywhere. */
:root {
  --bg: #ffffff;
  --tile: #f0efed;        /* photo tiles: close to the sellers' studio backdrops, so letterbox bands disappear */
  --soft: #f7f5f2;        /* quiet surfaces: panels, chips, steppers */
  --ink: #3a302c;
  --ink-2: #6e645e;       /* 5.8:1 on white, 5.0:1 on --tile */
  --line: #ebe7e2;        /* hairlines */
  --line-2: #d6cfc8;      /* stitched (dashed) lines */
  --edge: #958c85;        /* field borders, 3.3:1 on white */
  --butter: #ffe9a6;      /* preorder */
  --butter-soft: #fff7de;
  --mint: #d5eedb;        /* size match */
  --mint-soft: #edf8ef;
  --blush: #ffdcd5;       /* test price, alerts */
  --blush-soft: #fff1ee;
  --cheek: #ffa99c;
  --err: #b0382d;
  --r-tile: 22px;
  --r-panel: 20px;
  --r-field: 14px;
  --pill: 999px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --shadow: 0 1px 2px rgba(58, 48, 44, .06), 0 12px 28px -16px rgba(58, 48, 44, .28);
  --font: "M PLUS Rounded 1c", ui-rounded, "Hiragino Maru Gothic ProN", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gut: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; scrollbar-color: var(--line-2) transparent; } /* keep focused controls clear of the sticky header */
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--font); font-variant-numeric: tabular-nums; caret-color: var(--ink); }
::selection { background: var(--butter); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.sr:focus-visible { z-index: 70; top: 8px; left: 8px; width: auto; height: auto; clip: auto; padding: 10px 16px; border-radius: var(--pill); background: var(--ink); color: #fff; }
.sprite { position: absolute; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
h1, h2 { margin: 0; font-weight: 500; line-height: 1.3; text-wrap: balance; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
p { margin: 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }
.mute { color: var(--ink-2); }
.small { font-size: 13px; }
.grow { flex: 1; }
.note { font-size: 13px; color: var(--ink-2); }
.note.ico { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; } /* an info line led by its small icon */
.note.ico .ic { width: 18px; height: 18px; margin-top: 1px; }
.assure { display: grid; gap: 8px; } /* a few such lines next to the main action */
.ic { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.face { width: 56px; height: 56px; color: var(--ink); }

/* preview ribbon + header */
.ribbon { padding: 5px var(--gut); background: var(--blush-soft); color: var(--ink-2); font-size: 12px; line-height: 1.5; text-align: center; }
.ribbon b { color: var(--ink); font-weight: 700; }
header.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; min-height: 60px; }
.brand { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
.wordmark { width: auto; height: 26px; fill: var(--ink); }
.wordmark .dot { fill: var(--cheek); }
.babybtn { margin-right: 8px; }
.cartbtn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--soft); }
.cartbtn .n { position: absolute; top: -3px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--butter);
  box-shadow: 0 0 0 2px var(--bg); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.cartbtn .n[data-zero] { display: none; }
main { min-height: 60vh; padding: 16px 0 64px; }
main:focus { outline: none; }

/* buttons, chips, tags */
.btn { --b: var(--ink); --bh: #2b2320; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border: 0;
  border-radius: var(--pill); background: var(--b); color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn.soft { --b: var(--soft); --bh: var(--tile); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost { --b: transparent; --bh: var(--soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn.wa { --b: #1f6b4a; --bh: #185a3d; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--tile); color: var(--ink-2); cursor: not-allowed; }
.iconbtn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink);
  cursor: pointer; transition: transform 140ms var(--ease-out), background-color 140ms ease; }
.iconbtn:active { transform: scale(0.94); }
.chip { flex: none; min-width: 44px; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--pill); background: var(--soft); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px; font-weight: 500; cursor: pointer; transition: background-color 140ms ease, color 140ms ease, transform 140ms var(--ease-out); }
.chip:active:not(:disabled) { transform: scale(0.95); }
.chip[aria-pressed="true"] { background: var(--ink); box-shadow: none; color: #fff; font-weight: 700; }
.chip:disabled { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); text-decoration: line-through; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--bh); }
  .chip:hover:not(:disabled):not([aria-pressed="true"]), .iconbtn:hover { background: var(--tile); }
  .card:hover .ph, .cat:hover:not([aria-current="true"]) .dot { transform: translateY(-2px); }
  .card:hover .ph img { transform: scale(1.02); } /* stays inside the 6px mat: the photo is still whole */
  .line .rm:hover { background: var(--soft); }
}
.chip.ico { display: inline-flex; align-items: center; gap: 6px; padding-left: 12px; } /* a chip led by a small icon; its text never pushes the row wider */
.chip.ico .ic { width: 18px; height: 18px; }
.chip.ico span { overflow: hidden; max-width: 11em; text-overflow: ellipsis; white-space: nowrap; }
.textlink { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 8px; border: 0; border-radius: var(--pill); background: none;
  color: var(--ink); font-size: 13px; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--pill); background: var(--soft); font-size: 12px; font-weight: 500;
  line-height: 1; white-space: nowrap; }
.tag.pre { background: var(--butter); }
.tag.pre::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: .6; }
.test { display: inline-block; padding: 4px 6px; border-radius: 6px; background: var(--blush); font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .02em;
  vertical-align: middle; white-space: nowrap; }
.code { font-size: 12px; color: var(--ink-2); }
.price { font-size: 16px; font-weight: 700; }
.price .test { margin-left: 8px; }

/* folds: every paragraph that used to sit on the page lives behind one of these */
.folds { border-bottom: 1px solid var(--line); }
.fold { border-top: 1px solid var(--line); }
.fold > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; font-weight: 500; list-style: none; cursor: pointer; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary .aside { margin-left: auto; color: var(--ink-2); font-size: 13px; font-weight: 400; text-align: right; white-space: nowrap; }
.fold > summary .chev { width: 20px; height: 20px; margin-left: auto; color: var(--ink-2); transition: transform 200ms var(--ease-out); }
.fold > summary .aside + .chev { margin-left: 0; }
.fold[open] > summary .chev { transform: rotate(180deg); }
.fold-body { display: grid; gap: 12px; padding: 2px 0 20px; animation: reveal 220ms var(--ease-out); }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } }
.fold.pill { border: 0; }
.fold.pill > summary { display: inline-flex; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: var(--pill); background: var(--butter-soft); font-size: 14px; }
.fold.pill > summary .aside { margin-left: 0; }
.fold.pill > summary .chev { width: 18px; height: 18px; margin-left: 0; color: var(--ink); }
.fold.pill > .fold-body { padding: 12px 0 4px; }

/* the three steps: one thread, three small beads */
.steps { display: flex; max-width: 440px; margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; flex: 1; display: grid; align-content: start; justify-items: center; gap: 6px; padding: 0 4px; color: var(--ink-2); font-size: 12px; line-height: 1.35;
  text-align: center; }
.steps li + li::before { content: ""; position: absolute; top: 20px; left: -50%; width: 100%; border-top: 1.5px dashed var(--line-2); }
.steps .dot, .perks .dot { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--butter-soft); color: var(--ink); }
.steps li:nth-child(2) .dot, .perks li:nth-child(2) .dot { background: var(--mint-soft); }
.steps li:nth-child(3) .dot, .perks li:nth-child(3) .dot { background: var(--blush-soft); }
.steps .dot .ic, .perks .dot .ic { width: 20px; height: 20px; }
.steps li.now { color: var(--ink); font-weight: 700; }
.steps li.now .dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); }

/* home */
/* the banner is the headline: square file on phones, wide above, full column width and always whole (no object-fit, no fixed height).
   The font size only matters when the image is missing and the alt text shows */
.hero { margin-bottom: 16px; font-size: 15px; font-weight: 400; }
.hero picture { display: block; }
.hero img { width: 100%; height: auto; border-radius: var(--r-tile); background: var(--blush-soft); }
/* categories: the first way to browse. The same beads as the steps and the perks, in one row that runs to the screen edge and scrolls sideways on phones.
   The first bead sits on the page gutter (a tile is 6px wider than its bead on each side) */
.cats { position: relative; display: flex; gap: 6px; margin: 0 calc(-1 * var(--gut)) 14px; padding: 4px calc(var(--gut) - 6px); overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; display: grid; align-content: start; justify-items: center; gap: 6px; width: 68px; padding-bottom: 2px; border-radius: 14px; color: var(--ink-2); font-size: 12px; line-height: 1.3;
  text-align: center; text-decoration: none; }
.cat .dot { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--butter-soft); color: var(--ink);
  transition: transform 140ms var(--ease-out), background-color 140ms ease, color 140ms ease; }
.cat:nth-child(3n + 2) .dot { background: var(--mint-soft); }
.cat:nth-child(3n) .dot { background: var(--blush-soft); }
.cat .dot .ic { width: 26px; height: 26px; }
.cat .n { position: absolute; top: -3px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--bg); box-shadow: 0 0 0 1px var(--line-2);
  color: var(--ink-2); font-size: 11px; font-weight: 700; line-height: 20px; }
.cat .nm { display: -webkit-box; overflow: hidden; max-width: 100%; text-wrap: balance; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cat[aria-current="true"] { color: var(--ink); } /* same weight as the others: a bolder name would wrap or be cut, and the grid under the row would jump */
.cat[aria-current="true"] .dot { background: var(--ink); color: #fff; }
.cat:active .dot { transform: scale(0.95); }
.home { display: grid; gap: 20px; }
.home-intro { display: grid; gap: 16px; min-width: 0; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.searchtog[aria-expanded="true"] { background: var(--ink); color: #fff; }
.search { position: relative; flex: 1 0 100%; display: block; }
.search[hidden] { display: none; }
.search .ic { position: absolute; top: 10px; left: 12px; pointer-events: none; }
.search input { width: 100%; min-height: 44px; padding: 0 14px 0 44px; border: 0; border-radius: var(--pill); background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); font-size: 16px;
  -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; width: 20px; height: 20px; margin-left: 8px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e645e' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6.5 6.5 11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E") center / 18px no-repeat; }
.chips { flex: 1 1 60%; display: flex; align-items: center; gap: 8px; min-width: 0; margin: -3px calc(-1 * var(--gut)) -3px -3px; padding: 3px var(--gut) 3px 3px; overflow-x: auto;
  scrollbar-width: none; } /* runs to the screen edge on phones */
.chips::-webkit-scrollbar { display: none; }
.chips .lbl { flex: none; padding: 0 2px 0 4px; color: var(--ink-2); font-size: 13px; }
.grid { --row: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--row) 12px; align-content: start; }
/* under the grid: what the shop does, as the same beads with two short lines. A strip on a hairline, not cards */
.perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; margin: 28px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); list-style: none; }
.perks li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: start; color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.perks b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 14px; font-weight: 500; }
@media (min-width: 720px) {
  .grid { --row: 36px; column-gap: 20px; }
  .perks { column-gap: 20px; margin-top: 44px; }
  .grid:has(> .card:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } /* a small catalogue gets two large photos, not three columns with a hole */
}
.card { display: grid; align-content: start; gap: 10px; text-decoration: none; }

.ph { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-tile); background: var(--tile); transition: transform 220ms var(--ease-out); }
.ph img { transition: transform 320ms var(--ease-out); }
/* photos are mounted whole on their tile: the bitmap keeps its own ratio and takes the inner radius, so nothing is ever cropped.
   shortcut: a photo smaller than its tile is not scaled up (catalogue photos are 790px+, tiles at most 504px); revisit if small photos appear */
.ph img, .gal .main img, .thumbs img, .line .th img { position: absolute; inset: var(--mat); width: auto; height: auto; max-width: calc(100% - 2 * var(--mat)); max-height: calc(100% - 2 * var(--mat));
  margin: auto; border-radius: calc(var(--r) - var(--mat)); }
.ph { --mat: 6px; --r: var(--r-tile); }
.card .meta { display: grid; gap: 4px; padding: 0 4px; }
.card .name { display: -webkit-box; overflow: hidden; font-size: 14px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card .row { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 8px; }
/* cards in one row share their photo / name / price / tag lines, so prices line up whatever the name length. Spacing is
   margins here: a subgrid gap that differs from its parent's shifts the items inside their tracks */
@supports (grid-template-rows: subgrid) {
  .grid { row-gap: 0; margin-bottom: calc(-1 * var(--row)); }
  .card { grid-row: span 4; grid-template-rows: subgrid; gap: 0; margin-bottom: var(--row); }
  .card .ph { margin-bottom: 10px; }
  .card .meta { grid-row: span 3; grid-template-rows: subgrid; gap: 0; }
  .card .meta > * + * { margin-top: 4px; }
  .grid .state { margin-bottom: var(--row); }
}
.boot .card { animation: rise 420ms var(--ease-out) backwards; }
.boot .card:nth-child(2) { animation-delay: 50ms; }
.boot .card:nth-child(3) { animation-delay: 90ms; }
.boot .card:nth-child(n + 4) { animation-delay: 120ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.state { display: grid; justify-items: center; gap: 12px; padding: 40px 16px; color: var(--ink-2); text-align: center; }
.grid .state { grid-column: 1 / -1; }
@media (min-width: 960px) {
  h1 { font-size: 30px; }
  main { padding-top: 36px; }
  .hero { margin-bottom: 36px; }
  .cats { flex-wrap: wrap; gap: 8px 14px; margin: 0 0 32px -14px; padding: 0; overflow: visible; } /* room for all of them: no scrolling, first bead on the gutter */
  .cat { width: 84px; font-size: 13px; }
  .perks { grid-template-columns: repeat(4, minmax(0, 1fr)); } /* one row once each item has room for a one-line title */
  .home { grid-template-columns: 264px minmax(0, 1fr); gap: 64px; align-items: start; }
  .home-intro { gap: 24px; }
  .home-intro .steps { flex-direction: column; gap: 14px; }
  .home-intro .steps li { grid-template-columns: 40px 1fr; align-items: center; justify-items: start; gap: 12px; padding: 0; font-size: 14px; text-align: left; }
  .home-intro .steps li + li::before { top: -14px; left: 20px; width: 0; height: 14px; border-top: 0; border-left: 1.5px dashed var(--line-2); }
  .searchtog { display: none; }
  .search, .search[hidden] { display: block; order: -1; } /* room for the field here, so it is always open */
  .chips { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
}

@media (min-width: 960px) and (min-height: 760px) { .home-intro { position: sticky; top: 96px; } } /* shorter windows: it scrolls with the page */

/* product */
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: -8px 0 4px -8px; padding: 0 10px 0 4px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.back .ic { width: 20px; height: 20px; }
.pd { display: grid; gap: 16px; }
.gal { min-width: 0; }
.gal .main { --mat: 8px; --r: 26px; position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: var(--r); background: var(--tile); cursor: zoom-in; }
.galbar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.thumbs { flex: 1; display: flex; gap: 8px; min-width: 0; margin: -4px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button { --mat: 3px; --r: 14px; position: relative; flex: none; width: 56px; height: 56px; padding: 0; border: 0; border-radius: var(--r); background: var(--tile); cursor: pointer; }
.thumbs button[aria-current="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); }
.info { display: grid; gap: 16px; min-width: 0; }
.info .head { display: grid; gap: 8px; }
.info h1 { font-size: 22px; }
.pricerow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.info .price { font-size: 24px; line-height: 1.2; }
.info .desc { color: var(--ink-2); font-size: 14px; }
.info-opts { display: grid; gap: 14px; }
.info legend { margin-bottom: 8px; color: var(--ink-2); font-size: 13px; }
.info legend b { color: var(--ink); font-weight: 700; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.sizing { display: grid; gap: 10px; }
.buy { display: flex; align-items: center; gap: 10px; }
.buy .btn { flex: 1; min-width: 0; padding: 0 16px; }
.qty { flex: none; display: inline-flex; align-items: center; border-radius: var(--pill); background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.qty button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.qty button .ic { width: 18px; height: 18px; }
.qty button:disabled { color: var(--line-2); cursor: not-allowed; }
.qty output { min-width: 24px; font-weight: 700; text-align: center; }
.buy .qty button { height: 50px; }
.measure { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .lab, form.co legend { font-size: 13px; font-weight: 500; }
.field .hint { color: var(--ink-2); font-size: 12px; }
.opt { margin-left: 6px; color: var(--ink-2); font-size: 12px; font-weight: 400; }
input[type="text"], input[type="tel"], input[type="number"], textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--edge); border-radius: var(--r-field);
  background: var(--bg); font-size: 16px; -webkit-appearance: none; appearance: none; }
input::placeholder, textarea::placeholder { color: var(--ink-2); opacity: 1; }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
textarea { min-height: 84px; resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.err { color: var(--err); font-size: 13px; }
.err:empty { display: none; }
.reco { padding: 12px 14px; border-radius: var(--r-field); background: var(--soft); color: var(--ink-2); font-size: 14px; }
.reco.ok { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 8px 8px 8px 14px; background: var(--mint); color: var(--ink); }
.linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--pill); background: var(--bg); font-size: 14px; font-weight: 700;
  text-decoration: none; cursor: pointer; }
.linkbtn[hidden] { display: none; }
/* baby profile: one line under the size chips. Mint when it chose a size for the baby (mint is the size-match colour), quiet otherwise */
.babyline { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-height: 52px; padding: 4px 4px 4px 12px; border-radius: var(--r-field); background: var(--soft); color: var(--ink-2);
  font-size: 13px; line-height: 1.45; }
.babyline.ok { background: var(--mint-soft); color: var(--ink); }
.babyline > .ic { width: 20px; height: 20px; color: var(--ink); }
.babyline .txt { flex: 1 1 55%; min-width: 0; padding: 6px 0; }
.babyline b { font-weight: 700; }
.pf { display: grid; gap: 18px; max-width: 520px; }
.babyfrom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.babyfrom > * { margin-top: 8px; }
.babyfrom .hint:empty { display: none; }
.babyfrom .linkbtn { background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
table.size { width: 100%; border-collapse: collapse; font-size: 14px; }
table.size th { padding: 4px 10px; color: var(--ink-2); font-size: 12px; font-weight: 500; text-align: left; }
table.size td { padding: 9px 10px; border-top: 1px solid var(--line); }
table.size td:first-child { font-weight: 700; }
table.size tr.hit td { border-color: var(--mint); background: var(--mint-soft); }
.chartimg { display: block; width: 100%; overflow: hidden; padding: 0; border: 0; border-radius: var(--r-field); background: var(--tile); cursor: zoom-in; }
.chartimg img { width: 100%; height: auto; }
dl.facts { display: grid; gap: 12px; margin: 0; }
dl.facts dt { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12px; }
dl.facts dt .ic { width: 16px; height: 16px; }
dl.facts dd { margin: 2px 0 0 22px; font-size: 14px; }
@media (min-width: 900px) {
  .pd { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .pd .gal { position: sticky; top: 92px; }
  .info { max-width: 460px; gap: 22px; }
  .info h1 { font-size: 28px; }
}

/* cart */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 12px; }
.page-head .back { flex-basis: 100%; }
.lines { display: grid; }
.lines > .note { padding-top: 12px; }
.line { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line .th { --mat: 4px; --r: 16px; position: relative; width: 76px; height: 76px; border-radius: var(--r); background: var(--tile); }
.line .body { display: grid; align-content: start; gap: 4px; min-width: 0; }
.line .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.line .nm { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; line-height: 1.35; text-decoration: none; }
.line .rm { margin: 0 -10px 0 0; background: none; color: var(--ink-2); }
.line .rm .ic { width: 20px; height: 20px; }
.line .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ink-2); font-size: 12px; }
.line .row:last-child { flex-wrap: wrap; }
.line .tot { margin-left: auto; font-size: 16px; font-weight: 700; white-space: nowrap; }
.line.bad .th img { opacity: .5; }
.flag { justify-self: start; padding: 6px 10px; border-radius: 10px; background: var(--butter-soft); font-size: 13px; }
.flag.bad { background: var(--blush-soft); color: var(--err); }
.sum { display: grid; gap: 10px; }
.sum .r { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; }
.sum .r > :last-child { white-space: nowrap; }
.sum .r.big { font-size: 20px; font-weight: 700; }
.r.flow { flex-wrap: wrap; row-gap: 2px; } /* shipping row: on a 320px screen the value drops under its label instead of breaking the label in two */
.r.flow > :last-child { margin-left: auto; }
.panel { display: grid; gap: 14px; padding: 18px; border-radius: var(--r-panel); background: var(--soft); }
.panel .fold { border: 0; }
.panel .fold > summary { min-height: 44px; }
.panel .fold-body { padding-bottom: 0; }
.panel .line:first-child { padding-top: 4px; }
.layout2 { display: grid; gap: 20px; }
@media (min-width: 900px) {
  .layout2 { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 56px; align-items: start; }
  .layout2 > aside { position: sticky; top: 92px; }
  .layout2 > aside:first-child { grid-row: 1; grid-column: 2; } /* checkout: the summary is first in the DOM (top on phones), right column here */
  .layout2 > aside:first-child + * { grid-row: 1; grid-column: 1; }
}

/* checkout */
form.co { display: grid; gap: 18px; }
form.co legend { margin-bottom: 6px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 18px; background: var(--soft); }
/* input + span, not label:has(): the chosen channel must show in browsers without :has() too */
.choice label { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: var(--r-field); font-weight: 500; transition: background-color 160ms ease; }
.choice input:checked + span { background: var(--bg); box-shadow: var(--shadow); font-weight: 700; }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.baby { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.consent { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; font-size: 14px; cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); }
.legal { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: var(--butter-soft); font-size: 11px; }
.alert { display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--blush-soft); font-size: 14px; }
.alert > b { color: var(--err); }
.alert.info { background: var(--butter-soft); }
.alert.info > b { color: var(--ink); }
.alert ul { margin: 0; padding-left: 18px; }
.actions { display: grid; gap: 8px; }
@media (min-width: 560px) {
  .actions { grid-template-columns: 1fr 1fr; }
  .actions > :last-child:nth-child(odd) { grid-column: 1 / -1; } /* one or three buttons: no half-empty row */
}

/* order ID: a hang tag on its thread */
.done { display: grid; gap: 24px; max-width: 520px; margin: 0 auto; }
.done-head { display: grid; justify-items: center; gap: 8px; text-align: center; }
.idbox { position: relative; display: grid; justify-items: center; gap: 12px; margin-top: 22px; padding: 38px 22px 22px; border-radius: 26px; background: var(--butter-soft); text-align: center;
  transform-origin: 50% 18px; animation: hang 500ms var(--ease-out) backwards; }
.idbox::before { content: ""; position: absolute; top: 12px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--bg);
  box-shadow: inset 0 1px 2px rgba(58, 48, 44, .28); }
.idbox::after { content: ""; position: absolute; inset: 6px; border: 1.5px dashed rgba(58, 48, 44, .16); border-radius: 20px; pointer-events: none; }
.idbox .string { position: absolute; top: -28px; left: 50%; width: 32px; height: 52px; margin-left: -16px; color: var(--ink-2); transform: rotate(9deg); transform-origin: 50% 88%; }
.idbox .lbl { color: var(--ink-2); font-size: 13px; }
.idbox .id { font-size: clamp(28px, 8.4vw, 40px); font-weight: 700; line-height: 1.2; letter-spacing: .04em; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.idbox .btn { position: relative; z-index: 1; }
@keyframes hang { from { opacity: 0; transform: translateY(-10px) rotate(-4deg); } 60% { transform: rotate(1.2deg); } }
.receipt { justify-self: stretch; display: grid; gap: 8px; margin-top: 6px; padding-top: 14px; border-top: 1.5px dashed rgba(58, 48, 44, .22); font-size: 13px; text-align: left; }
.receipt .r { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.receipt .r > :last-child { white-space: nowrap; }
.receipt .r small { display: block; color: var(--ink-2); font-size: 12px; }
.next { display: grid; gap: 14px; }
.next h2 { text-align: center; }
.next .steps { width: 100%; margin: 0 auto; }
.msgbox { padding: 12px 16px; border-radius: 18px 18px 18px 6px; background: var(--soft); font-size: 14px; -webkit-user-select: all; user-select: all; }
.done > .btn { justify-self: center; }

/* zoom dialog + toast + footer */
dialog.zoom:not([open]) { display: none; }
dialog.zoom { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); }
dialog.zoom::backdrop { background: rgba(58, 48, 44, .5); }
dialog.zoom .scroller { display: grid; place-items: center; width: 100%; height: 100%; overflow: auto; touch-action: pan-x pan-y pinch-zoom; }
dialog.zoom img { width: min(1400px, 200vw); max-width: none; height: auto; }
dialog.zoom.fit img { width: auto; max-width: 100%; max-height: 100dvh; object-fit: contain; }
dialog.zoom .close { position: fixed; top: 12px; right: 12px; background: var(--bg); box-shadow: var(--shadow); }
dialog.zoom .tog { position: fixed; right: 0; bottom: 16px; left: 0; width: max-content; min-height: 44px; margin: 0 auto; background: var(--bg); box-shadow: var(--shadow); font-size: 14px; }
dialog[open].zoom { animation: fade 180ms var(--ease-out); }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; z-index: 60; display: flex; align-items: center; gap: 10px; width: max-content;
  max-width: calc(100vw - 24px); min-height: 52px; padding: 4px 18px; border-radius: 26px; background: var(--ink); box-shadow: var(--shadow); color: #fff; font-size: 14px; font-weight: 500;
  transform: translate(-50%, 0); transition: transform 300ms var(--ease-out), opacity 300ms var(--ease-out); }
.toast[hidden] { display: flex; opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }
.toast a { display: inline-flex; align-items: center; min-height: 44px; margin-right: -14px; padding: 0 16px; border-radius: var(--pill); background: rgba(255, 255, 255, .16); color: #fff;
  font-weight: 700; text-decoration: none; }
.toast a:focus-visible { outline-color: #fff; }
footer.foot { padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 12px; }
footer.foot .wrap { display: grid; gap: 4px; }
footer.foot p { max-width: 72ch; }
footer.foot .where { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--ink); font-size: 13px; font-weight: 500; }
footer.foot .where .ic { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
  .btn:active:not(:disabled), .chip:active:not(:disabled), .iconbtn:active, .cat:active .dot { transform: none; }
}
