/* Al Qamis — configurator, split screen: on a computer the shirt stands the full height of the screen on
   the left and the choices sit in a panel on the right (steps on top, picture cards, price and Next at
   the foot). On a phone the shirt fills the screen and the panel is a glass sheet that folds down. */

.cfg { padding-top: 20px; padding-bottom: 40px; }
.cfg__head { margin-bottom: 0; }
.cfg__head h1 { font-size: clamp(1.9rem, 3.4vw, 2.4rem); margin-bottom: 4px; }
.cfg__head .notice { margin: 8px 0 12px; max-width: 640px; }
.cfg__title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; }
/* The tabs name the step, so the heading is kept for screen readers only. */
.cfg__title-row h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cfg__switch { font-size: .88rem; font-weight: 500; color: var(--brass-ink); }

.split { display: grid; grid-template-columns: minmax(0, 1fr); }
.split > * { min-width: 0; }
@media (min-width: 980px) {
  .split {
    grid-template-columns: minmax(0, 1.3fr) minmax(400px, 1fr); gap: 18px;
    height: calc(100vh - var(--menu-h, var(--header-h)) - 22px); min-height: 600px; max-height: 980px;
  }
}
@media (min-width: 1280px) { .split { grid-template-columns: minmax(0, 1.35fr) minmax(460px, 1fr); gap: 22px; } }

/* ---- the stage ---- */
.split__stage {
  position: relative; display: flex; flex-direction: column; align-items: stretch; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  background: radial-gradient(70% 75% at 50% 32%, #fff 0%, rgba(233, 240, 241, .7) 70%, rgba(214, 226, 228, .8) 100%);
}
.split__stage::after { content: ''; position: absolute; inset: 10px; border: 1.5px dashed rgba(184, 146, 90, .3); border-radius: 4px; pointer-events: none; }
.split__views { position: absolute; z-index: 3; top: 16px; left: 16px; }
.cfg__shirt { position: relative; flex: 1; min-height: 0; width: 100%; margin: 0; padding: 58px 24px 4px; }
.cfg__shirt > svg { position: absolute; inset: 58px 24px 4px; width: calc(100% - 48px); height: calc(100% - 62px); transition: opacity .15s ease; will-change: transform; }
/* The drawing carries many soft-shadow filters: on its own layer it is painted once per change, never
   again because the panel beside it scrolls or a card is hovered. The panel and the stage keep their
   repaints to themselves. */
.split__stage { contain: paint; }
.split__scroll { contain: content; }
.cfg__shirt > svg.is-fading-in { opacity: 0; transition: none; }
.cfg__shirt > svg.is-preparing { opacity: .001; } /* painted ahead, shown when the zoom lands */
.cfg__shirt.is-3d { touch-action: none; padding: 0; }
.cfg__caption { position: relative; z-index: 1; text-align: center; margin: 4px 0 16px; font-family: var(--font-serif); font-size: 1.15rem; font-style: italic; color: var(--ink-soft); }
.cfg__3d-note { position: relative; z-index: 1; text-align: center; margin: -10px 0 14px; }
.split__switch { position: absolute; z-index: 2; right: 22px; bottom: 18px; }
.dots { display: none; }

.view-toggle { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 6px; background: rgba(255, 255, 255, .88); border: 1px solid var(--line); box-shadow: 0 8px 20px -14px rgba(19, 39, 41, .45); }
.view-toggle button { min-height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: none; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.view-toggle button:hover { color: var(--ink); }
.view-toggle button[aria-pressed='true'] { background: var(--ink); color: #fff; }
.view-toggle__3d { display: inline-flex; align-items: center; gap: 6px; }
.view-toggle__3d svg { width: 16px; height: 16px; }
.view-toggle button.view-toggle__3d:not([aria-pressed='true']) { color: var(--brass-ink); }

/* ---- the panel ---- */
.split__panel {
  position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  border-radius: var(--radius); background: #fff; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
}
.sheet__grab { display: none; }
.split__tabs { flex: none; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .7); }
.steps { display: flex; margin: 0; padding: 0 8px; list-style: none; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps li { flex: none; }
.steps__tab {
  position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 52px; padding: 0 9px;
  border: 0; border-bottom: 3px solid transparent; background: none; cursor: pointer;
  font: inherit; font-size: .83rem; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .15s, border-color .2s;
}
.steps__tab:hover { color: var(--ink); }
.steps__tab.is-done::before { content: '✓'; color: var(--brass); font-weight: 700; }
.steps__tab[aria-current='step'] { color: var(--ink); border-bottom-color: var(--brass); }
.steps__tab.has-error { color: var(--danger); }
.steps__flag { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; }

.split__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 20px; display: grid; gap: 14px; align-content: start; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.cfg__errors:empty { display: none; }
.split__note { display: grid; gap: 3px; }
.split__note.is-new > * { animation: noteIn .3s var(--ease) both; }
@keyframes noteIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.note__kicker { margin: 0; display: flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-ink); }
.note__row { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.note__name { font-family: var(--font-serif); font-size: clamp(1.5rem, 2.1vw, 1.9rem); font-weight: 600; line-height: 1.05; color: var(--ink); }
.note__price { flex: none; font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; color: var(--brass-ink); }
.note__desc { margin: 0; font-size: .88rem; color: var(--muted); }
.tag { display: inline-flex; align-items: center; height: 19px; padding: 0 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.split__step { display: grid; gap: 12px; }
.split__step:focus { outline: none; }
.split__step.is-entering .dock__body { animation: stepIn .3s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dock__head { display: flex; align-items: center; gap: 10px; }
.dock__title { margin: 0; font-size: 1.4rem; }
.dock__pills { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pill {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 1px solid var(--line-2);
  border-radius: 999px; background: #fff; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink-soft);
}
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brass); }
.dock__reset { margin-left: auto; align-self: flex-start; flex: none; border: 0; background: none; padding: 8px 2px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dock__reset:hover { color: var(--ink); }
.dock__body { display: grid; gap: 10px; min-width: 0; container-type: inline-size; }
.dock__note { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: .8rem; color: var(--warning); }
.dock__note svg { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.dock__mono { display: grid; gap: 14px; padding-top: 6px; border-top: 1px dashed var(--line-2); }
.dock__mono .field { margin: 0; max-width: 260px; }
.cfg__part-title { margin: 0 0 8px; font-family: var(--font-sans); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.split .chips { margin-bottom: 0; }

/* The panel's foot: where you are, the price (opens "Your shirt"), Back and Next. */
.split__foot { position: relative; flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .94); }
.split__progress { position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: rgba(28, 53, 56, .06); }
.split__progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ink), var(--brass)); border-radius: 0 3px 3px 0; transition: width .35s var(--ease); }
.split__sum { display: grid; gap: 1px; padding: 2px 4px; margin-left: -4px; border: 0; border-radius: 3px; background: none; cursor: pointer; font: inherit; text-align: left; line-height: 1.15; color: var(--ink); }
.split__sum:hover { background: var(--ivory-2); }
.split__sum small { white-space: nowrap; font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-ink); }
.split__sum strong { font-family: var(--font-serif); font-size: 1.65rem; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.split__sum strong.is-changing { animation: tick .45s var(--ease); }
@keyframes tick { 0% { color: var(--brass-ink); } 100% { color: var(--ink); } }
.split__sum-link { font-size: .75rem; font-weight: 600; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.split__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.split__back { display: grid; place-items: center; width: 46px; height: 46px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; }
.split__back:disabled { opacity: .3; cursor: default; }
.split__back svg, .split__next svg { width: 18px; height: 18px; }
.split__next { min-height: 46px; gap: 8px; white-space: nowrap; }
.split__next svg { transition: transform .2s var(--ease); }
.split__next:hover svg { transform: translateX(3px); }

/* "Your shirt": slides up over the panel. */
.summary { position: absolute; inset: auto 0 0 0; z-index: 5; max-height: calc(100% - 20px); display: flex; flex-direction: column; background: #fff; border-top: 1px solid var(--line); border-radius: 6px 6px 0 0; box-shadow: 0 -24px 40px -20px rgba(19, 39, 41, .4); animation: sheetUp .28s var(--ease); }
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.summary__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
.summary__head h2 { margin: 0; font-size: 1.5rem; }
.summary__close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 1.3rem; line-height: 1; color: var(--ink); cursor: pointer; }
.summary__body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 18px; }
.summary__lines { margin: 0; padding: 0; list-style: none; }
.summary__line { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 4px; border: 0; border-bottom: 1px dashed var(--line); background: none; font: inherit; text-align: left; color: var(--ink); }
button.summary__line { cursor: pointer; }
button.summary__line:hover { background: var(--ivory); }
.summary__what { display: grid; min-width: 0; }
.summary__label { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.summary__detail { font-size: .92rem; font-weight: 500; }
.summary__amount { flex: none; font-family: var(--font-serif); font-size: 1.08rem; font-weight: 600; color: var(--brass-ink); font-variant-numeric: lining-nums tabular-nums; }
.summary__amount.is-zero { font-family: var(--font-sans); font-size: .78rem; font-weight: 500; color: var(--muted); }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 4px 0; font-weight: 600; }
.summary__total strong { font-family: var(--font-serif); font-size: 1.7rem; }
.summary__foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 18px 18px; }
.summary__foot .btn { flex: 1 1 160px; }
.cfg__price-note { margin: 10px 0 0; font-size: .8rem; color: var(--muted); }

/* The option cards: a grid of three (four on a wide panel) on a computer, a row you swipe on a phone. */
.strip { position: relative; min-width: 0; }
.strip__track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 4px 2px 6px; }
@container (min-width: 560px) { .strip__track { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.strip__track:has(.tile--round) { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.strip__arrow { display: none !important; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px 11px; border: 1px solid rgba(28, 53, 56, .1); border-radius: 5px; background: #fff; cursor: pointer; text-align: center;
  box-shadow: 0 1px 2px rgba(19, 39, 41, .05), 0 8px 18px -14px rgba(19, 39, 41, .35);
  transition: transform .2s var(--ease), border-color .2s; /* the shadow changes at once: animating it repaints every frame */
}
@media (hover: hover) { .tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(19, 39, 41, .06), 0 14px 24px -16px rgba(19, 39, 41, .5); border-color: var(--line-2); } }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 5px rgba(184, 146, 90, .28), 0 14px 26px -16px rgba(19, 39, 41, .55); }
.tile:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.tile:has(input:disabled:not(:checked)) { cursor: not-allowed; opacity: .4; transform: none; box-shadow: none; }
.tile__art { display: block; width: 100%; aspect-ratio: 96 / 80; }
.tile__art svg { display: block; width: 100%; height: 100%; }
.tile__name { font-size: .82rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.tile__price {
  position: absolute; top: 7px; left: 7px; padding: 2px 7px; border-radius: 999px; background: var(--brass-soft);
  font-size: .7rem; font-weight: 700; letter-spacing: .02em; color: var(--brass-ink); font-variant-numeric: lining-nums tabular-nums;
}
.tile__tag {
  position: absolute; top: -8px; left: 50%; z-index: 1; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: var(--ink); color: #fff; font-size: .6rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; box-shadow: 0 0 0 2px #fff;
}
.tile:has(.tile__tag) .tile__price { top: 16px; }
.tile__tick { position: absolute; top: 7px; right: 7px; display: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; box-shadow: 0 0 0 2px #fff; }
.tile:has(input:checked) .tile__tick { display: grid; animation: tickIn .25s var(--ease); }
@keyframes tickIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.tile__tick svg { width: 12px; height: 12px; }
.tile.is-picked .tile__art { animation: pick .45s var(--ease); }
@keyframes pick { 0% { transform: scale(.88); } 55% { transform: scale(1.08); } 100% { transform: none; } }
.tile--round .tile__art { width: 60px; aspect-ratio: 1; margin: 4px 0; }
.tile--small .tile__art { aspect-ratio: 96 / 60; }
.tile--fabric { padding: 6px 6px 10px; }
.tile--fabric .tile__art { aspect-ratio: 1.45; border-radius: 3px; overflow: hidden; border: 1px solid rgba(19, 39, 41, .12); }
.tile--fabric .tile__price { top: auto; bottom: 34px; left: 12px; }
.tile--fabric .tile__art svg, .tile--fabric .tile__art img { width: 100%; height: 100%; object-fit: cover; }
.tile-wrap { position: relative; display: flex; }
.tile-wrap .tile { flex: 1; }
.tile__info {
  position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--brass-ink); cursor: pointer; box-shadow: var(--shadow-sm);
}
.tile__info svg { width: 16px; height: 16px; }
.tile__info:hover { border-color: var(--ink); }
.tile-wrap .tile:has(input:checked) .tile__tick { right: auto; left: 12px; top: 12px; }
.tile.tile--fabric .tile__price, .tile.tile--fabric:has(.tile__tag) .tile__price { top: auto; bottom: 34px; left: 12px; } /* on the cloth, clear of the tick */
@media (prefers-reduced-motion: reduce) {
  .tile, .tile:hover { transform: none; transition: none; }
  .tile.is-picked .tile__art, .split__step.is-entering .dock__body, .split__note.is-new > *, .split__sum strong.is-changing, .summary { animation: none; }
}

/* ---- phones: the shirt fills the screen; the panel is a glass sheet over it that folds down ---- */
@media (max-width: 979px) {
  .cfg { padding-top: 0; padding-bottom: calc(var(--sheet-h, 300px) + 16px); }
  .split__stage {
    margin: 0 -20px; border-radius: 0; border: 0; box-shadow: none;
    height: calc(100svh - var(--header-h)); min-height: 520px;
  }
  .split__stage::after { display: none; }
  .split__views { top: 10px; left: 12px; right: 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .split__views::-webkit-scrollbar { display: none; }
  .view-toggle button { min-height: 30px; padding: 0 10px; font-size: .74rem; }
  .cfg__shirt { flex: none; height: calc(100svh - var(--header-h) - var(--sheet-h, 300px) - 44px); min-height: 190px; padding: 52px 30px 4px; }
  .cfg__shirt > svg { inset: 52px 30px 4px; width: calc(100% - 60px); height: calc(100% - 56px); }
  .cfg__shirt.is-3d { height: calc(100svh - var(--header-h) - var(--sheet-h, 300px) - 10px); min-height: 280px; }
  .cfg__caption, .cfg__3d-note, .split__switch { display: none; }
  .dots { position: absolute; z-index: 2; right: 12px; top: 56px; display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
  .dots li { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #b9c7c9; background: #fff; }
  .dots li.is-done { background: var(--brass); border-color: var(--brass); }
  .dots li.is-on { width: 9px; height: 9px; margin-left: -1px; background: var(--ink); border-color: var(--ink); }
  .dots li.has-error { background: var(--danger); border-color: var(--danger); }

  .split__panel {
    position: fixed; z-index: 30; left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); bottom: calc(8px + env(safe-area-inset-bottom));
    max-height: 58svh; border-radius: 6px; background: #fff; box-shadow: 0 -10px 40px -16px rgba(19, 39, 41, .45);
  }
  .sheet__grab { display: block; flex: none; position: relative; height: 22px; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; }
  .sheet__grab::before { content: ''; position: absolute; left: 50%; top: 8px; width: 40px; height: 5px; margin-left: -20px; border-radius: 5px; background: #c7d3d5; }
  .split__tabs { border-bottom: 0; background: none; }
  .steps__tab { min-height: 36px; padding: 0 9px; font-size: .8rem; }
  .split__scroll { padding: 6px 12px 10px; gap: 8px; }
  .split__note { display: none; }
  .dock__pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
  .dock__pills::-webkit-scrollbar { display: none; }
  .pill { flex: none; min-height: 32px; padding: 0 12px; font-size: .78rem; }
  .dock__title { font-size: 1.2rem; }
  .strip__track {
    display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 108px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; margin: 0 -12px; padding: 10px 12px 8px; scroll-padding-left: 12px; scrollbar-width: none;
  }
  .strip__track::-webkit-scrollbar { display: none; }
  .strip__track:has(.tile--round) { grid-template-columns: none; grid-auto-columns: 88px; }
  .strip__track:has(.tile--fabric) { grid-auto-columns: 128px; }
  .tile { scroll-snap-align: start; padding: 12px 6px 9px; }
  .tile__art { aspect-ratio: 96 / 68; }
  .split__foot { padding: 10px 10px 10px 14px; }
  .split__sum strong { font-size: 1.4rem; }
  .split__sum-link { display: none; }
  .split__back { width: 42px; height: 42px; }
  .split__next { min-height: 42px; padding: 0 14px; font-size: .84rem; }
  /* Folded: only the handle, the tabs and the foot stay, and the shirt grows. */
  .split__panel.is-folded .split__scroll { display: none; }
  .summary { max-height: 100%; }
  .cfg-loading { min-height: 70vh; }
}

/* Size step rows (they keep a list: the size step has fields as well as choices) */
.opt-list { display: grid; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .7); }
.opt { position: relative; display: flex; align-items: center; gap: 16px; padding: 10px 16px 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line); transition: background .15s; }
.opt:last-child { border-bottom: 0; }
.opt:hover { background: rgba(233, 240, 241, .75); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked) { background: var(--brass-soft); box-shadow: inset 5px 0 0 var(--brass); }
.opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.opt:has(input:disabled:not(:checked)) { cursor: not-allowed; }
.opt:has(input:disabled:not(:checked)) .opt__art, .opt:has(input:disabled:not(:checked)) .opt__name, .opt:has(input:disabled:not(:checked)) .opt__desc { opacity: .38; }
.opt__art { flex: none; display: block; width: 84px; height: 70px; border-radius: 3px; background: #fff; box-shadow: inset 0 0 0 1px rgba(28, 53, 56, .06); }
.opt__art svg { width: 100%; height: 100%; display: block; }
.opt--plain { padding-left: 18px; }
.opt__body { display: grid; gap: 2px; min-width: 0; }
.opt__name { font-family: var(--font-serif); font-size: 1.18rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.opt__desc { font-size: .82rem; color: var(--muted); }
.opt__note { display: flex; align-items: flex-start; gap: 5px; margin: 4px 0 0; font-size: .78rem; color: var(--warning); }
.opt__note svg { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.opt__price { margin-left: auto; padding-left: 8px; font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600; color: var(--brass-ink); white-space: nowrap; }

/* Sort the buttons: Featured, Name, Colour */
.seg { display: inline-flex; justify-self: start; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .7); }
.seg button { min-height: 36px; padding: 0 16px; border: 0; border-left: 1px solid var(--line); background: none; font: inherit; font-size: .82rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed='true'] { background: var(--ink); color: #fff; }
.dot-fallback { display: block; width: 100%; height: 100%; border-radius: 50%; border: 1px solid rgba(19, 39, 41, .2); }

/* Embroidery */
.monogram-input.mono-font--block { font-family: var(--font-sans); font-style: normal; font-weight: 700; font-size: 1.3rem !important; }
.monogram-input.mono-font--roman { font-style: normal; font-weight: 600; }

/* Size: the ways to give it, and "Send us your favourite shirt" */
.sizing-modes { margin-bottom: 18px; }
.copy-shirt { display: grid; gap: 18px; padding: 16px 18px; border-radius: 4px; background: rgba(255, 255, 255, .7); border: 1px dashed var(--brass); }
.copy-shirt h3 { margin: 0; font-size: 1.25rem; }
.copy-shirt__steps { margin: 0; padding: 0; list-style: none; counter-reset: cs; display: grid; gap: 10px; }
.copy-shirt__steps li { counter-increment: cs; position: relative; padding-left: 38px; font-size: .9rem; }
.copy-shirt__steps li::before { content: counter(cs); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 700; }
.copy-shirt .field { margin: 0; }

/* Initials field */
.monogram-input { max-width: 200px; font-family: var(--font-serif); font-size: 1.5rem !important; font-style: italic; letter-spacing: .15em; text-transform: uppercase; }

/* Sizing */
.profile-list { display: grid; gap: 10px; margin-bottom: 8px; }
.sizing-new { display: grid; gap: 24px; }
@container (min-width: 600px) { .sizing-new { grid-template-columns: 1fr 180px; align-items: start; } }
.measure-grid { display: grid; gap: 14px 16px; grid-template-columns: 1fr 1fr; }
.measure-grid .field + .field { margin-top: 0; }
.field--measure label { display: flex; align-items: center; gap: 8px; }
.measure-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brass-soft); color: var(--brass-ink); font-size: .72rem; font-weight: 700; }
.field--measure .field-help { display: flex; align-items: center; justify-content: space-between; }
.measure-help { padding: 14px; border-radius: var(--radius-sm); background: var(--ivory); border: 1px dashed var(--line-2); }
.measure-help h3 { font-family: var(--font-sans); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.measure-help p { font-size: .82rem; color: var(--muted); margin-top: 10px; }
.measure-figure { width: 100%; max-width: 180px; margin: 0 auto; }
.measure-figure .mf-body { fill: var(--ivory-2); stroke: var(--line-2); stroke-width: 1.4; }
.mf-line ellipse, .mf-line path { fill: none; stroke: var(--brass); stroke-width: 1.6; stroke-dasharray: 3 3; transition: stroke .2s, stroke-width .2s; }
.mf-num circle { fill: #fff; stroke: var(--brass); stroke-width: 1.2; transition: fill .2s; }
.mf-num text { font-size: 8.5px; font-weight: 700; fill: var(--brass-ink); font-family: var(--font-sans); }
.mf-line.is-active ellipse, .mf-line.is-active path { stroke: var(--ink); stroke-width: 2.4; stroke-dasharray: none; }
.mf-line.is-active .mf-num circle { fill: var(--ink); stroke: var(--ink); }
.mf-line.is-active .mf-num text { fill: #fff; }
.save-profile { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line-2); display: grid; gap: 12px; }
.save-profile .field { max-width: 320px; }

.cfg-loading { display: grid; place-items: center; min-height: 50vh; color: var(--muted); font-family: var(--font-serif); font-size: 1.3rem; font-style: italic; }

/* Standard size */
.sizing-book { margin: -4px 0 20px; }
.std-size { display: grid; gap: 22px; }
.std-size__pick { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--ivory); }
@media (min-width: 560px) { .std-size__pick { grid-template-columns: 1fr 1fr; } .std-size__pick .std-size__note { grid-column: 1 / -1; } }
.std-size__pick .field { margin: 0; }
.std-size__pick select { width: 100%; }
.std-size__note { margin: 0; }
.std-size__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.std-size__head h3 { font-size: 1.2rem; margin: 0; }
.std-rows { display: grid; gap: 0 28px; margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.std-rows .std-row.field { margin: 0; }
.std-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.std-row label { margin: 0; font-size: .9rem; font-weight: 500; display: flex; flex-direction: column; align-self: center; }
.std-row__adjusted { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brass-ink); }
.std-row .field-error { flex-basis: 100%; }
.std-row { flex-wrap: wrap; }
.stepper-input { display: inline-flex; align-items: center; gap: 4px; }
.stepper-input input { width: 70px; min-height: 40px; padding: 0 4px; text-align: center; font-variant-numeric: lining-nums tabular-nums; -moz-appearance: textfield; }
.stepper-input input::-webkit-outer-spin-button, .stepper-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-input__btn {
  width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff;
  font-size: 1.1rem; line-height: 1; color: var(--ink); cursor: pointer;
}
.stepper-input__btn:hover { border-color: var(--ink); background: var(--ivory-2); }
.stepper-input__unit { font-size: .78rem; color: var(--muted); }

/* "Skip to your size": a quiet link on its own line above Back / Next; the size step then says what was kept. */
.split__actions:has(.split__skip:not([hidden])) { flex-wrap: wrap; justify-content: flex-end; row-gap: 0; }
.split__skip {
  flex: 1 0 100%; order: -1; text-align: right;
  min-height: 26px; padding: 0 2px; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font: inherit; font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brass-ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.split__skip:hover { color: var(--ink); }
@media (max-width: 1099px) { .split__skip { font-size: .6rem; letter-spacing: .08em; min-height: 24px; } }
.skip-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 10px 12px; font-size: .86rem; line-height: 1.5; }
.skip-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

/* ---- Fabric: the search box, the Filter button and the filter panel (owner review, 5 Nov 2026) ---- */
.dock__body:has(.fab-find) .chips { margin-bottom: 10px; }
.fab-area { min-width: 0; } /* the card row scrolls inside it on a phone */
.fab-find { display: flex; gap: 8px; margin-bottom: 12px; min-width: 0; }
.fab-find__search { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.fab-find__search svg { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.fab-find__search input {
  width: 100%; min-height: 46px; padding: 0 12px 0 40px; border: 1px solid var(--line-2); border-radius: 3px; background: #fff;
  font: inherit; font-size: .92rem; color: var(--ink); -webkit-appearance: none; appearance: none;
}
.fab-find__search input::placeholder { color: var(--muted); opacity: .85; }
.fab-find__search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(184, 146, 90, .25); }
.fab-find__filter {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px;
  border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: #fff; cursor: pointer;
  font: inherit; font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.fab-find__filter svg { width: 19px; height: 19px; }
.fab-find__filter[aria-expanded="true"] { background: #fff; color: var(--ink); }
.fab-find__filter:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.fab-find__count { display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--brass); color: #fff; font-size: .66rem; letter-spacing: 0; }
.fab-find__count[hidden] { display: none; }
.fab-count { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: .8rem; color: var(--muted); }
.fab-count__clear { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--brass-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fab-empty { display: grid; justify-items: center; gap: 12px; padding: 30px 16px; border: 1px dashed var(--line-2); border-radius: 5px; text-align: center; color: var(--muted); }
.fab-empty p { margin: 0; }

.fab-panel { border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.fab-panel__sort { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.fab-panel__sort label, .fab-facet summary { font-family: var(--font-serif); font-size: 1.16rem; font-weight: 600; color: var(--ink); }
.fab-panel__sort select {
  min-height: 42px; min-width: 0; width: min(220px, 60%); padding: 0 36px 0 12px; border: 1px solid var(--line-2); border-radius: 3px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231c3538' stroke-width='1.5'/%3E%3C/svg%3E") right 12px center / 12px 8px no-repeat;
  font: inherit; font-size: .88rem; color: var(--ink); -webkit-appearance: none; appearance: none;
}
.fab-facet { border-bottom: 1px solid var(--line); }
.fab-facet summary { display: flex; align-items: center; gap: 8px; padding: 13px 16px; list-style: none; cursor: pointer; }
.fab-facet summary::-webkit-details-marker { display: none; }
.fab-facet summary::after {
  content: ''; width: 8px; height: 8px; margin-left: auto; margin-top: -4px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); transition: transform .2s var(--ease);
}
.fab-facet[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
.fab-facet summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.fab-facet__on { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-family: var(--font-sans); font-size: .68rem; font-weight: 700; }
.fab-facet__on[hidden] { display: none; }
.fab-facet__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding: 0 16px 12px; }
.fab-facet__opts--colours { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 14px 6px; padding-bottom: 16px; }
.fab-colour, .fab-check { position: relative; cursor: pointer; }
.fab-colour input, .fab-check input { position: absolute; opacity: 0; pointer-events: none; }
.fab-colour { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: .74rem; line-height: 1.25; color: var(--ink-soft); }
.fab-colour__dot {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(19, 39, 41, .2); color: #fff; transition: box-shadow .15s;
}
.fab-colour__dot svg { width: 16px; height: 16px; opacity: 0; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .75)); }
.fab-colour input:checked + .fab-colour__dot { box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--ink); }
.fab-colour input:checked + .fab-colour__dot svg { opacity: 1; }
.fab-colour input:checked ~ .fab-colour__name { font-weight: 600; color: var(--ink); }
.fab-colour input:focus-visible + .fab-colour__dot { outline: 2px solid var(--focus); outline-offset: 4px; }
.fab-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: .86rem; color: var(--ink); }
.fab-check__box { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--line-2); border-radius: 2px; background: #fff; color: #fff; }
.fab-check__box svg { width: 12px; height: 12px; opacity: 0; }
.fab-check input:checked + .fab-check__box { border-color: var(--ink); background: var(--ink); }
.fab-check input:checked + .fab-check__box svg { opacity: 1; }
.fab-check input:focus-visible + .fab-check__box { outline: 2px solid var(--focus); outline-offset: 2px; }
.fab-check__name { min-width: 0; }
.fab-check__n { margin-left: auto; font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.fab-panel__foot { position: sticky; bottom: -20px; z-index: 2; display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; border-radius: 0 0 5px 5px; }
.fab-panel__foot .btn--primary { flex: 1; }

/* ---- Option rows: picture, name and a line of description (collar stays, collar stiffness) ---- */
.dock__question { margin: 0 0 2px; font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; line-height: 1.2; color: var(--ink); }
.strip__track:has(.tile--row) { grid-template-columns: 1fr; gap: 8px; }
.tile--row { flex-direction: row; align-items: center; gap: 16px; padding: 10px 44px 10px 10px; text-align: left; }
.tile--row .tile__art { flex: none; width: 120px; padding: 4px; border-radius: 3px; background: var(--ivory); }
.tile__text { display: grid; gap: 3px; min-width: 0; }
.tile--row .tile__name { font-family: var(--font-serif); font-size: 1.14rem; font-weight: 600; }
.tile__desc { font-size: .8rem; line-height: 1.45; color: var(--muted); }
.tile--row .tile__tick { top: 50%; right: 14px; margin-top: -10px; }
.tile--row:has(input:checked) { box-shadow: inset 3px 0 0 var(--brass), 0 0 0 1.5px var(--ink), 0 14px 26px -16px rgba(19, 39, 41, .55); }
@media (max-width: 979px) {
  .strip__track:has(.tile--row) {
    grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow: visible; scroll-snap-type: none;
    margin: 0; padding: 4px 0 6px;
  }
  .tile--row { padding: 8px 40px 8px 8px; gap: 12px; }
  .tile--row .tile__art { width: 84px; aspect-ratio: 96 / 80; }
  .tile--row .tile__name { font-size: 1.02rem; }
  .tile__desc { font-size: .76rem; }
  .dock__question { font-size: 1.1rem; }
  .fab-find { margin-bottom: 8px; }
  .fab-find__search input, .fab-find__filter { min-height: 42px; }
  .fab-find__search input { font-size: 16px; } /* no zoom on iPhone */
  .fab-find__word { display: none; }
  .fab-find__filter { padding: 0 12px; }
  .fab-panel__foot { bottom: -10px; }
}

/* A long "Next: Collar stiffness" shortens with an ellipsis instead of pushing out of a narrow panel. */
.split__actions { min-width: 0; }
.split__next { min-width: 0; max-width: 100%; }
.split__next-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.split__next svg { flex: none; }
@media (max-width: 979px) {
  /* With the filter panel open the sheet grows to nearly the whole screen, and the family chips step aside. */
  .split__panel:has(.fab-panel) { max-height: calc(100svh - var(--header-h) - 16px); }
  .dock__body:has(.fab-panel) .chips { display: none; }
}
