/* Clothing designer (/design/) – loaded on the designer and basket pages only. Everything is prefixed cd- */
@font-face { font-family: "Bebas Neue"; src: url("../fonts/design/bebas-neue.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Anton"; src: url("../fonts/design/anton.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Oswald"; src: url("../fonts/design/oswald-600.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/design/playfair-700.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Pacifico"; src: url("../fonts/design/pacifico.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Permanent Marker"; src: url("../fonts/design/permanent-marker.woff2") format("woff2"); font-display: swap; }

.cd-intro { padding: 28px 0 18px; }
.cd-intro h1 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.035em; line-height: 1.05; margin: 0 0 8px; }
.cd-intro p { margin: 0; color: var(--muted); max-width: 680px; }
.cd-intro__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.cd-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.cd-steps > * { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 0; border-radius: 999px; padding: 6px 14px 6px 6px; font: inherit; font-weight: 700; font-size: .85rem; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.cd-steps button, .cd-steps a { cursor: pointer; transition: background .15s, color .15s; }
@media (hover: hover) { .cd-steps button:hover, .cd-steps a:hover { background: #fdf0f7; } }
.cd-steps > * i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: .78rem; color: var(--ink); }
.cd-steps > .on i { background: var(--m); color: #fff; }
.cd-steps > .cur { color: var(--m); }
.cd-basketlink { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.cd-basketlink b { background: var(--m); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: .78rem; padding: 0 6px; }
.cd-test { background: #fff3c4; color: #5c4600; border-radius: 12px; padding: 8px 14px; font-size: .85rem; font-weight: 600; margin: 0 0 12px; }

/* ---------- the designer (lays itself out by its own width) ---------- */
.cd { container-type: inline-size; padding-bottom: 40px; }
:where(.cd, [data-cd-basket]) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.cd, [data-cd-basket]) button { cursor: pointer; }
.cd-app { background: #fff; border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-columns: 76px 300px minmax(0, 1fr) 340px; min-height: 720px; position: relative; }
.cd-rail { background: var(--ink); display: flex; flex-direction: column; gap: 4px; padding: 12px 8px; }
.cd-rail button { border: 0; background: transparent; color: #cfcacc; border-radius: 16px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; }
.cd-rail button svg { width: 22px; height: 22px; }
.cd-rail button[aria-pressed=true] { background: rgba(255,255,255,.12); color: #fff; }
.cd-rail button[aria-pressed=true] svg { color: var(--m); }
.cd-rail button:focus-visible, .cd-bar button:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.cd-rail .cd-rail__undo { margin-top: auto; }
.cd-panel { border-right: 1px solid var(--line); padding: 20px 18px; overflow: auto; max-height: 820px; }
.cd-panel h3 { margin: 0 0 4px; font-size: 1.1rem; letter-spacing: -.01em; }
.cd-sub { margin: 0 0 14px; color: var(--soft); font-size: .85rem; }
.cd-f { display: block; font-weight: 700; font-size: .8rem; margin: 14px 0 6px; color: var(--ink-2); }
.cd-inp { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.cd-inp:focus { outline: 2px solid var(--m); outline-offset: 1px; border-color: transparent; }
.cd-inp.is-bad { border-color: #d0213f; box-shadow: 0 0 0 3px rgba(208,33,63,.15); }
.cd-btn { border: 0; border-radius: 999px; padding: 11px 18px; font-weight: 700; background: var(--m); color: #fff; min-height: 44px; }
.cd-btn:hover { background: var(--m-dark); }
.cd-btn:disabled { opacity: .45; cursor: not-allowed; }
.cd-btn--ghost { background: var(--bg); color: var(--ink); }
.cd-btn--ghost:hover { background: #e9e8e4; }
.cd-btn--block { display: block; width: 100%; }
.cd-prods { display: grid; gap: 10px; }
.cd-prods a { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-align: left; border: 2px solid var(--line); border-radius: 16px; background: #fff; padding: 8px; color: var(--ink); text-decoration: none; }
.cd-prods a[aria-current=true] { border-color: var(--m); box-shadow: 0 0 0 3px rgba(200,18,122,.12); }
.cd-prods canvas { width: 64px; height: 64px; background: var(--bg); border-radius: 10px; }
.cd-prods b { display: block; font-size: .92rem; }
.cd-prods small { color: var(--soft); font-size: .78rem; line-height: 1.35; display: block; }
.cd-sw { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-sw { position: relative; }
.cd-sw button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); padding: 0; background: var(--c, #ccc); cursor: pointer; }
.cd-sw button[hidden] { display: none; }
.cd-sw__n { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cd-sw button[aria-pressed=true] { box-shadow: 0 0 0 2px var(--m); }
.cd-swname { font-size: .82rem; color: var(--soft); margin-top: 6px; }
.cd-drop { display: block; border: 2px dashed #d7c3cf; border-radius: 18px; padding: 22px 14px; text-align: center; background: #fdf6fa; cursor: pointer; }
.cd-drop:hover, .cd-drop.is-over { border-color: var(--m); }
.cd-drop b { display: block; color: var(--m); }
.cd-drop small { display: block; margin-top: 4px; color: var(--soft); }
.cd-status { margin: 10px 0 0; font-size: .86rem; font-weight: 600; min-height: 1.2em; }
.cd-status.is-bad { color: #b0122f; }
.cd-fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cd-fonts button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 8px; font-size: 1.1rem; line-height: 1.1; min-height: 44px; }
.cd-fonts button[aria-pressed=true] { border-color: var(--m); box-shadow: 0 0 0 3px rgba(200,18,122,.12); }
.cd-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-range { width: 100%; accent-color: var(--m); }
.cd-layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cd-layers li { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: .88rem; background: #fff; cursor: pointer; }
.cd-layers li.on { border-color: var(--m); }
.cd-layers li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-layers li button { border: 0; background: var(--bg); border-radius: 8px; width: 32px; height: 32px; }
.cd-tip { background: #f6f5f2; border-radius: 14px; padding: 10px 12px; font-size: .82rem; color: var(--muted); margin-top: 14px; }
.cd-tip b { color: var(--ink); }
.cd-none { color: var(--soft); font-size: .88rem; }
/* stage */
.cd-stage { position: relative; background: #f6f6f4; display: flex; flex-direction: column; min-width: 0; }
.cd-stage::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#dcdad5 1px, transparent 1px); background-size: 18px 18px; opacity: .7; pointer-events: none; }
.cd-stage__top { position: relative; z-index: 4; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; gap: 10px; }
.cd-pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 6px 12px; font-size: .8rem; font-weight: 700; box-shadow: 0 0 0 1px rgba(27,23,24,.08), 0 4px 14px rgba(0,0,0,.08); min-width: 0; }
.cd-pill--ok { color: #17663a; } .cd-pill--warn { color: #9a4a06; } .cd-pill--bad { color: #b0122f; }
.cd-tools { display: flex; gap: 8px; flex: none; }
.cd-zoom { display: flex; align-items: center; gap: 2px; background: #fff; border-radius: 999px; padding: 4px; box-shadow: 0 0 0 1px rgba(27,23,24,.08), 0 4px 14px rgba(0,0,0,.08); }
.cd-zoom button { border: 0; background: transparent; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); }
.cd-zoom button svg { width: 20px; height: 20px; }
.cd-zoom button:hover:not(:disabled) { background: var(--bg); color: var(--m); }
.cd-zoom button:disabled { opacity: .3; cursor: default; }
.cd-zoom__val { min-width: 42px; text-align: center; font-size: .78rem; font-weight: 800; color: var(--soft); }
.cd-guidebtn { display: inline-flex; align-items: center; gap: 7px; border: 0; background: #fff; border-radius: 999px; padding: 6px 8px 6px 12px; font-size: .8rem; font-weight: 700; box-shadow: 0 0 0 1px rgba(27,23,24,.08), 0 4px 14px rgba(0,0,0,.08); color: var(--ink); }
.cd-guidebtn svg { width: 18px; height: 18px; color: var(--m); }
.cd-guidebtn[aria-pressed=false] svg { color: var(--soft); }
.cd-switch { position: relative; width: 32px; height: 18px; border-radius: 999px; background: #cfcbc6; transition: background .2s; flex: none; }
.cd-switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.cd-guidebtn[aria-pressed=true] .cd-switch { background: var(--m); }
.cd-guidebtn[aria-pressed=true] .cd-switch::after { transform: translateX(14px); }
.cd-canvas { position: relative; flex: 1; display: grid; place-items: center; overflow: hidden; touch-action: pan-y pinch-zoom;   /* a finger on the garment scrolls the page; designs (.cd-obj) still drag */ min-height: 420px; }
.cd-board { position: relative; width: min(560px, 92%); aspect-ratio: 1/1; }
.cd-board__in { will-change: transform; }
.cd-board__in { position: absolute; inset: 0; transform-origin: 0 0; transition: transform .45s cubic-bezier(.3,.7,.3,1); }
.cd-board__in > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cd-area { position: absolute; outline: 1.5px dashed rgba(200,18,122,.75); border-radius: 2px; }
.cd-area.no-guide { outline-color: transparent; }
.cd-area__lab { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); transform-origin: 50% 100%; margin-bottom: 4px; white-space: nowrap; background: rgba(200,18,122,.9); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; pointer-events: none; }
.cd-area.no-guide .cd-area__lab { display: none; }
.cd-area.is-out { outline-color: #c81e3a; }
.cd-onlayer { position: absolute; inset: 0; pointer-events: none; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.cd-area--on, .cd-area--top { outline: 0 !important; }
.cd-toplayer { position: absolute; inset: 0; pointer-events: none; }
.cd-area--top .cd-obj { pointer-events: auto; }
.cd-area--top .cd-area__lab { display: none; }
.cd-obj { position: absolute; cursor: move; user-select: none; -webkit-user-select: none; touch-action: none; }
.cd-obj > svg, .cd-obj > img { display: block; width: 100%; height: 100%; pointer-events: none; }
.cd-area--under .cd-obj > svg, .cd-area--under .cd-obj > img { opacity: .32; }
.cd-obj.sel { outline: 1.5px solid #2f6fed; outline-offset: 2px; }
.cd-obj.out { outline-color: #c81e3a; }
.cd-area--on .cd-obj { outline: 0 !important; }
.cd-h { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid #2f6fed; border-radius: 50%; display: none; }
.cd-obj.sel .cd-h { display: block; }
.cd-area--on .cd-h, .cd-area--on .cd-chip { display: none !important; }
.cd-h--br { right: -10px; bottom: -10px; cursor: nwse-resize; }
.cd-h--rot { left: 50%; top: -32px; margin-left: -8px; cursor: grab; }
.cd-h--rot::after { content: ""; position: absolute; left: 5px; top: 13px; width: 2px; height: 15px; background: #2f6fed; }
.cd-h--del { left: -11px; top: -11px; width: 20px; height: 20px; background: #d0213f; border-color: #fff; color: #fff; font: 800 14px/1 var(--font); text-align: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.cd-obj.sel .cd-h--del { display: grid; place-items: center; padding: 0; }
.cd-h--del svg { display: block; width: 10px; height: 10px; pointer-events: none; }
.cd-h--del:hover { background: #a3122f; }
.cd-chip { position: absolute; left: 50%; transform: translateX(-50%); transform-origin: 50% 0; top: calc(100% + 12px); background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; display: none; pointer-events: none; }
.cd-obj.sel .cd-chip { display: block; }
.cd-msg { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); border-radius: 12px; padding: 8px 14px; font-weight: 700; font-size: .85rem; z-index: 3; display: none; white-space: nowrap; }
.cd-msg--out { background: #fdecef; color: #b0122f; }
.cd-msg--wrap { background: #fff; color: var(--muted); box-shadow: 0 0 0 1px rgba(27,23,24,.08), 0 4px 14px rgba(0,0,0,.08); top: 62px; bottom: auto; font-size: .78rem; padding: 5px 12px; border-radius: 999px; }
.cd-msg.on { display: block; }
.cd-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; background: rgba(255,255,255,.95); border-radius: 18px; padding: 14px 18px; box-shadow: var(--shadow); text-align: center; max-width: 260px; font-size: .9rem; display: none; }
.cd-empty.on { display: block; }
.cd-empty b { display: block; font-size: 1rem; margin-bottom: 4px; }
.cd-views { position: relative; z-index: 2; display: flex; justify-content: center; gap: 6px; padding: 12px 12px 18px; flex-wrap: wrap; }
.cd-views button { border: 2px solid transparent; background: #fff; border-radius: 16px; padding: 6px 8px 6px 6px; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .8rem; box-shadow: 0 0 0 1px rgba(27,23,24,.08), 0 4px 14px rgba(0,0,0,.06); position: relative; text-align: left; }
.cd-views button canvas { width: 34px; height: 34px; border-radius: 10px; background: var(--bg); }
.cd-views button[aria-pressed=true] { border-color: var(--m); }
.cd-views .cd-dot { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; border-radius: 50%; background: #1f9d55; color: #fff; font-size: 10px; display: none; place-items: center; font-style: normal; }
.cd-views button.has .cd-dot { display: grid; }
.cd-views small { display: block; font-weight: 600; color: var(--soft); font-size: .7rem; }
/* order panel */
.cd-order { border-left: 1px solid var(--line); padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; overflow: auto; max-height: 820px; }
.cd-order h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.02em; }
.cd-meta { color: var(--soft); font-size: .85rem; margin: 4px 0 0; }
.cd-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; }
.cd-sz { border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 4px 4px; text-align: center; background: #fff; }
.cd-sz.has { border-color: var(--m); background: #fdf3f8; }
.cd-sz b { display: block; font-size: .8rem; }
.cd-sz small { display: block; font-size: .66rem; color: var(--soft); min-height: 1em; }
.cd .cd-sz input { flex: 1; width: 100%; min-width: 0; height: auto; min-height: 0; border: 0; border-radius: 6px; box-shadow: none; background: transparent; text-align: center; font-weight: 800; font-size: .95rem; padding: 2px 0; margin: 0; -moz-appearance: textfield; }
.cd .cd-sz input:focus { outline: 2px solid var(--m); background: #fff; }
.cd-sz input::-webkit-outer-spin-button, .cd-sz input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cd-sz .cd-st { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.cd-sz .cd-st button { border: 0; background: var(--bg); width: 26px; height: 26px; border-radius: 8px; font-weight: 800; line-height: 1; flex: none; }
.cd-price { background: #faf9f7; border-radius: 18px; padding: 14px; }
.cd-price__big { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cd-price__big b { font-size: 1.6rem; letter-spacing: -.02em; }
.cd-price__big small, .cd-price__each { color: var(--soft); font-size: .85rem; }
.cd-bd { margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed #dcd9d3; font-size: .84rem; display: none; }
.cd-bd.on { display: block; }
.cd-bd div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.cd-bd div span:last-child { font-weight: 700; white-space: nowrap; }
.cd-link { border: 0; background: none; color: var(--m); font-weight: 700; padding: 0; font-size: .84rem; margin-top: 6px; }
.cd-nudge { background: #fff7d6; border-radius: 12px; padding: 8px 12px; font-size: .84rem; font-weight: 600; }
.cd-nudge.is-bad { background: #fdecef; color: #b0122f; }
.cd-trust { display: grid; gap: 6px; font-size: .8rem; color: var(--muted); }
.cd-trust span::before { content: "✓ "; color: #1f9d55; font-weight: 800; }
.cd-guide { width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: 6px; }
.cd-guide td, .cd-guide th { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: center; }
/* compact layout (phones) */
.cd-ph, .cd-bar, .cd-sheet, .cd-foot, .cd-dim { display: none; }
@container (max-width: 760px) {
  .cd-app { grid-template-columns: 1fr; min-height: 0; border-radius: 22px; display: flex; flex-direction: column; overflow: clip; }   /* clip, not hidden, so the tool bar and price bar can stick to the bottom of the screen */
  .cd-rail, .cd-app > .cd-panel, .cd-app > .cd-order { display: none; }
  .cd-canvas { min-height: 0; }
  .cd-board { width: min(100%, 440px); }
  .cd-stage__top { padding: 10px; }
  .cd-pill { font-size: .72rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .cd-zoom button { width: 30px; height: 30px; }
  .cd-zoom__val { display: none; }
  .cd-guidebtn span { display: none; }
  .cd-guidebtn { padding: 6px 8px; }
  .cd-tools { gap: 6px; }
  .cd-views { padding: 8px 10px 12px; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .cd-views button { flex: none; padding: 4px 6px 4px 4px; font-size: .72rem; gap: 6px; }
  .cd-views button canvas { width: 30px; height: 30px; }
  .cd-views small { display: none; }
  .cd-msg--wrap { top: 56px; }
  .cd-ph { display: block; padding: 12px 14px 0; }
  .cd-ph b { display: block; font-size: 1.05rem; letter-spacing: -.01em; }
  .cd-ph small { color: var(--soft); }
  .cd-bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--ink); padding: 6px; position: sticky; bottom: 0; z-index: 6; }   /* same height everywhere (no extra space at the bottom) */
  .cd-bar button { border: 0; background: transparent; color: #cfcacc; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .66rem; font-weight: 700; padding: 6px 0; border-radius: 12px; }
  .cd-bar button svg { width: 20px; height: 20px; }
  .cd-bar button[aria-pressed=true] { color: #fff; background: rgba(255,255,255,.12); }
  .cd-foot { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px 14px; border-top: 1px solid var(--line); }   /* scrolls with the page; only the black bar stays put */
  .cd-foot div { flex: 1; line-height: 1.2; min-width: 0; }
  .cd-foot b { font-size: 1.05rem; }
  .cd-foot small { display: block; color: var(--soft); font-size: .75rem; }
  .cd-sheet { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25); max-height: 82vh; max-height: 82dvh; overflow: hidden auto; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .3s ease; visibility: hidden; }
  .cd-sheet.open { transform: none; visibility: visible; }
  .cd-sheet__grab { width: 44px; height: 5px; border-radius: 5px; background: #d9d6d2; margin: 4px auto 10px; }
  .cd-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; position: sticky; top: -8px; background: #fff; padding: 6px 0; z-index: 2; }
  .cd-sheet__head h3 { margin: 0; font-size: 1.05rem; }
  .cd-sheet .cd-panel, .cd-sheet .cd-order { display: flex; flex-direction: column; border: 0; padding: 0; max-height: none; }
  .cd-sheet .cd-panel { display: block; }
  .cd-sheet .cd-panel h3 { display: none; }
  .cd-dim { display: block; position: fixed; inset: 0; background: rgba(27,23,24,.35); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .cd-dim.on { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) { .cd-board__in, .cd-sheet { transition: none; } }

/* ---------- basket ---------- */
.cd-co { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; padding-bottom: 50px; }
@media (max-width: 960px) { .cd-co { grid-template-columns: 1fr; } }
.cd-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 20px; }
.cd-card + .cd-card { margin-top: 18px; }
.cd-card h2 { margin: 0 0 12px; font-size: 1.2rem; letter-spacing: -.02em; }
.cd-item { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.cd-item:first-child { border-top: 0; padding-top: 0; }
.cd-item__pics { display: flex; flex-wrap: wrap; gap: 4px; }
.cd-item__pics img { width: 110px; height: 110px; object-fit: cover; border-radius: 14px; background: var(--bg); }
.cd-item__pics img + img { width: 34px; height: 34px; border-radius: 8px; }
.cd-item h4 { margin: 0; font-size: 1rem; }
.cd-item p { margin: 2px 0; color: var(--muted); font-size: .85rem; }
.cd-item__acts { display: flex; gap: 14px; margin-top: 6px; }
.cd-item__acts a, .cd-item__acts button { border: 0; background: none; color: var(--m); font-weight: 700; padding: 0; font-size: .86rem; text-decoration: none; }
.cd-item__amt { text-align: right; font-weight: 800; white-space: nowrap; }
.cd-item__amt small { display: block; font-weight: 600; color: var(--soft); font-size: .78rem; }
@media (max-width: 560px) { .cd-item { grid-template-columns: 84px minmax(0, 1fr); } .cd-item__pics img { width: 84px; height: 84px; } .cd-item__amt { grid-column: 2; text-align: left; } }
.cd-opt { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-top: 10px; cursor: pointer; }
.cd-opt:has(input:checked) { border-color: var(--m); background: #fdf6fa; }
.cd-opt input { accent-color: var(--m); width: 18px; height: 18px; margin-top: 3px; flex: none; }
.cd-opt div { flex: 1; }
.cd-opt b { display: block; }
.cd-opt small { color: var(--soft); }
.cd-opt .cd-p { font-weight: 800; white-space: nowrap; }
.cd-warn { background: #fff8e6; border-radius: 16px; padding: 14px 16px; font-size: .88rem; margin-top: 14px; }
.cd-warn h3 { margin: 0 0 6px; font-size: .98rem; }
.cd-warn ul { margin: 6px 0 0; padding-left: 18px; }
.cd-tick { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin-top: 10px; cursor: pointer; }
.cd-tick input { accent-color: var(--m); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.cd-tick.is-bad { color: #b0122f; }
.cd-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.cd-fields label { display: block; font-weight: 700; font-size: .82rem; }
.cd-fields label span { color: var(--soft); font-weight: 500; }
.cd-fields .cd-inp { margin-top: 4px; font-weight: 400; }
.cd-fields .cd-wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .cd-fields { grid-template-columns: 1fr; } }
.cd-sum div { display: flex; justify-content: space-between; padding: 4px 0; font-size: .92rem; }
.cd-sum .cd-tot { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 1.15rem; font-weight: 800; }
.cd-send { margin-top: 14px; font-size: 1.02rem; }
.cd-small { font-size: .8rem; color: var(--soft); }
.cd-freebar { height: 8px; border-radius: 8px; background: #eceae6; overflow: hidden; margin: 10px 0 4px; }
.cd-freebar i { display: block; height: 100%; background: linear-gradient(90deg, var(--m), #e85aa8); border-radius: 8px; }
.cd-err { background: #fdecef; color: #b0122f; border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: .9rem; margin-top: 12px; }
.cd-done { text-align: center; padding: 30px 20px; }
.cd-done h2 { font-size: 1.6rem; margin: 0 0 8px; }
.cd-aside { position: sticky; top: 100px; }
@media (max-width: 960px) { .cd-aside { position: static; } }

/* dropping a file onto the garment */
.cd-canvas.is-over::after { content: attr(data-drop); position: absolute; inset: 12px; border: 3px dashed var(--m); border-radius: 22px; background: rgba(200,18,122,.06); display: grid; place-items: center; font-weight: 800; color: var(--m); font-size: 1.05rem; z-index: 5; pointer-events: none; }

/* long file names stay inside the box */
.cd-fname { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cd-tip { min-width: 0; overflow-wrap: anywhere; }
/* remove background editor */
.cd-bged { margin-top: 12px; border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; background: #fff; }
.cd-bged__how { margin: 0 0 10px; font-size: .86rem; line-height: 1.45; }
.cd-bged__pic { border-radius: 12px; overflow: hidden; background-color: #fff; background-image: linear-gradient(45deg, #e6e5e1 25%, transparent 25%), linear-gradient(-45deg, #e6e5e1 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e6e5e1 75%), linear-gradient(-45deg, transparent 75%, #e6e5e1 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.cd-bged__pic canvas { display: block; width: 100%; height: auto; max-height: 300px; object-fit: contain; cursor: crosshair; }
.cd-bged .cd-f span { color: var(--m); }
.cd-check { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; margin-top: 10px; cursor: pointer; }
.cd-check input { accent-color: var(--m); width: 17px; height: 17px; margin-top: 1px; flex: none; }

/* selected design: quick buttons */
.cd-objbar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 4; display: none; gap: 4px; background: #fff; border-radius: 999px; padding: 4px; box-shadow: 0 0 0 1px rgba(27,23,24,.08), 0 6px 18px rgba(0,0,0,.12); white-space: nowrap; }
.cd-objbar.on { display: flex; }
.cd-objbar button { border: 0; background: transparent; border-radius: 999px; padding: 7px 12px; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--ink); }
.cd-objbar button:hover { background: var(--bg); color: var(--m); }
.cd-objbar svg { width: 17px; height: 17px; }
.cd-objbar.on ~ .cd-msg--out, .cd-msg--out { bottom: 62px; }
/* other print areas on the same photo, shown but not editable here */
.cd-ctx { position: absolute; inset: 0; }
.cd-area--ctx { outline: 0 !important; }
.cd-area--ctx .cd-obj { cursor: default; }

/* front print or breast prints, not both */
.cd-ask { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; width: min(360px, 90%); background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 0 0 1px rgba(27,23,24,.06), 0 18px 40px rgba(0,0,0,.2); }
.cd-ask p { margin: 0 0 12px; font-size: .92rem; line-height: 1.5; }
.cd-ask .cd-btn { min-height: 42px; padding: 8px 12px; font-size: .86rem; }

.cd-area.has-sel .cd-area__lab { opacity: 0; }

/* sides: all on one line (picture above the name) */
.cd-views { flex-wrap: nowrap; gap: 6px; padding: 10px 10px 16px; }
.cd-views button { flex: 1 1 0; min-width: 0; max-width: 96px; flex-direction: column; justify-content: flex-start; gap: 3px; padding: 6px 4px 5px; text-align: center; font-size: .72rem; line-height: 1.2; border-radius: 14px; }
.cd-views button canvas { width: 32px; height: 32px; border-radius: 8px; }
.cd-views button > span { display: block; max-width: 100%; white-space: normal; overflow-wrap: normal; word-break: keep-all; }
.cd-views small { display: none !important; }
.cd-views .cd-dot { width: 16px; height: 16px; font-size: 9px; }
@container (max-width: 760px) {
  .cd-views { justify-content: flex-start; }
  .cd-views button { flex: none; width: 64px; max-width: none; padding: 4px 3px; font-size: .68rem; }
  .cd-views button canvas { width: 28px; height: 28px; }
}

/* chest group: front / left breast / right breast share one shaded box: front, or one or both breasts */
.cd-vgroup { position: relative; display: flex; gap: 4px; padding: 5px; margin-top: 6px; background: rgba(27,23,24,.07); border: 1px dashed rgba(27,23,24,.22); border-radius: 18px; flex: 3 1 0; min-width: 0; max-width: 306px; }
.cd-vgroup button { flex: 1 1 0; }
.cd-vgroup-tag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid rgba(27,23,24,.16); border-radius: 999px; padding: 1px 8px; font-style: normal; font-weight: 700; font-size: .6rem; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); white-space: nowrap; line-height: 1.4; z-index: 1; pointer-events: none; }
.cd-views { align-items: flex-end; }
@container (max-width: 760px) {
  .cd-vgroup { flex: none; max-width: none; padding: 4px; gap: 3px; }
  .cd-vgroup button { flex: none; }
}

/* every side button the same size, inside or outside the chest group */
.cd-views { align-items: center; }
.cd-views button, .cd-vgroup button { flex: none; width: 80px; max-width: none; height: 74px; }
.cd-vgroup { flex: none; max-width: none; margin-top: 0; }
@container (max-width: 760px) {
  .cd-views button, .cd-vgroup button { width: 64px; height: 62px; }
}
/* centred when it fits, scrolls sideways (from the start) when it doesn't */
.cd-views { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
.cd-views::-webkit-scrollbar { display: none; }
.cd-views > :first-child { margin-left: auto; }
.cd-views > :last-child { margin-right: auto; }

/* sleeker buttons: one line, slimmer, lighter outline style for the secondary ones */
.cd .cd-btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.cd .cd-btn--ghost { min-height: 36px; padding: 7px 12px; font-size: .82rem; font-weight: 600; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.cd .cd-btn--ghost:hover { background: var(--bg); border-color: #cfcdc7; }
.cd .cd-row2 { gap: 6px; }
.cd .cd-row2 .cd-btn:not(.cd-btn--ghost), .cd .cd-ask .cd-btn { min-height: 36px; padding: 7px 12px; font-size: .82rem; }
.cd .cd-ask { width: min(380px, 92%); }
.cd .cd-ask .cd-row2 { grid-template-columns: auto 1fr; }
.cd .cd-row2--icon { grid-template-columns: 1fr auto; }
.cd .cd-btn--icon { width: 36px; padding: 0; display: grid; place-items: center; }
.cd .cd-btn--icon:hover { color: #c62828; border-color: #f0b4b4; background: #fff5f5; }
.cd .cd-btn--ghost { padding: 7px 10px; }
/* the group tag sits fully above the group so it never covers a green tick */
.cd .cd-views { padding-top: 24px; }
.cd .cd-vgroup-tag { top: -19px; }
.cd .cd-views .cd-dot { z-index: 2; }
/* phones: every side fits across the screen (no sideways scrolling to find the sleeves); scrolls only if a garment has lots of sides */
@container (max-width: 520px) {
  .cd .cd-views { gap: 4px; padding-left: 6px; padding-right: 6px; }
  .cd .cd-views > :first-child { margin-left: 0; }
  .cd .cd-views > :last-child { margin-right: 0; }
  .cd .cd-vgroup { flex: 3 1 0; min-width: 0; padding: 3px; gap: 3px; }
  .cd .cd-views button, .cd .cd-vgroup button { flex: 1 1 0; width: auto; min-width: 44px; height: 58px; padding: 4px 2px; gap: 2px; font-size: .62rem; line-height: 1.15; border-radius: 12px; }
  .cd .cd-views button canvas { width: 26px; height: 26px; border-radius: 7px; }
  .cd .cd-views .cd-dot { width: 14px; height: 14px; font-size: 8px; top: -3px; right: -3px; }
}

/* sizes: compact one-line rows (size on the left, − qty + on the right) */
.cd .cd-sizes { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.cd .cd-sz { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 5px 5px 10px; text-align: left; border-radius: 10px; min-height: 42px; }
.cd .cd-sz__l { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.cd .cd-sz b { font-size: .84rem; }
.cd .cd-sz small { font-size: .62rem; min-height: 0; white-space: nowrap; }
.cd .cd-sz .cd-st { flex: none; gap: 2px; }
.cd .cd-sz .cd-st button { width: 24px; height: 24px; border-radius: 7px; }
.cd .cd-sz input { flex: none; width: 30px; font-size: .9rem; }
/* breathing room between the parts of the order panel */
.cd [data-cd-orderbox] { display: flex; flex-direction: column; gap: 18px; }
.cd [data-cd-orderbox] .cd-f { margin-bottom: 10px; }
.cd [data-cd-orderbox] .cd-meta { margin-top: 6px; }
.cd [data-cd-orderbox] [data-o=guidebtn] { margin-top: 10px; }
.cd .cd-price { padding: 16px 18px; }
.cd .cd-price__each { margin-top: 6px; }
.cd .cd-price [data-o=bdbtn] { margin-top: 8px; }
.cd .cd-nudge { padding: 10px 14px; line-height: 1.45; }
.cd .cd-trust { gap: 8px; }

/* print quality note: roomier, softly rounded box with a light tint */
.cd .cd-pill { border-radius: 10px; padding: 8px 14px; line-height: 1.4; gap: 8px; max-width: calc(100% - 24px); }
.cd .cd-pill--ok { background: #effaf3; box-shadow: 0 0 0 1px rgba(23,102,58,.18); }
.cd .cd-pill--warn { background: #fff6e8; box-shadow: 0 0 0 1px rgba(154,74,6,.2); }
.cd .cd-pill--bad { background: #fdf0f2; box-shadow: 0 0 0 1px rgba(176,18,47,.2); }
@container (max-width: 760px) { .cd .cd-pill { padding: 7px 12px; } }
/* on a phone the note drops just under the top buttons and shows in full (no "…") */
@container (max-width: 760px) {
  .cd .cd-stage__top { justify-content: flex-end; }
  .cd .cd-stage__top .cd-pill { position: absolute; top: 100%; left: 10px; right: 10px; max-width: none; margin-top: -4px; white-space: normal; overflow: visible; text-overflow: clip; font-size: .74rem; display: flex; }
}

/* "Check your design" popup before adding to the basket */
html.cd-noscroll { overflow: hidden; }
.cd-confirm { position: fixed; inset: 0; z-index: 1100; background: rgba(20,16,18,.55); display: grid; place-items: center; padding: 16px; animation: cdFade .18s ease; }
.cd-confirm__box { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; background: #fff; border-radius: 20px; padding: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.3); font-size: .92rem; color: #1b1718; animation: cdUp .22s ease; }
.cd-confirm__box h3 { margin: 0 0 6px; font-size: 1.3rem; letter-spacing: -.02em; }
.cd-confirm__x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f4f3f0; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.cd-confirm__sum { margin: 0 0 16px; font-weight: 700; line-height: 1.5; }
.cd-confirm__sum small { font-weight: 500; color: #6b6567; }
.cd-confirm__mocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 0 0 18px; }
.cd-confirm__mocks figure { margin: 0; }
.cd-confirm__img { aspect-ratio: 1; border-radius: 12px; background: #f4f3f0; display: grid; place-items: center; overflow: hidden; }
.cd-confirm__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-confirm__img span { font-size: .75rem; color: #8a8486; }
.cd-confirm__mocks figcaption { text-align: center; font-size: .78rem; font-weight: 700; margin-top: 6px; }
.cd-confirm__tick { display: flex; gap: 12px; align-items: flex-start; background: #fdf3f8; border: 1.5px solid #f2c6dc; border-radius: 12px; padding: 14px 16px; line-height: 1.5; cursor: pointer; }
.cd-confirm__tick input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: #c8127a; cursor: pointer; }
.cd-confirm__help { margin: 12px 0 18px; font-size: .82rem; color: #6b6567; line-height: 1.5; }
.cd-confirm__err { margin: 0 0 12px; color: #b0122f; font-weight: 600; font-size: .85rem; }
.cd-confirm__btns { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.cd-confirm .cd-btn { border-radius: 999px; min-height: 44px; padding: 10px 18px; font-weight: 700; font-size: .9rem; white-space: nowrap; cursor: pointer; border: 0; background: #c8127a; color: #fff; font-family: inherit; }
.cd-confirm .cd-btn:disabled { opacity: .4; cursor: not-allowed; }
.cd-confirm .cd-btn--ghost { background: #fff; color: #1b1718; border: 1px solid #e6e5e1; }
@keyframes cdFade { from { opacity: 0; } }
@keyframes cdUp { from { transform: translateY(14px); opacity: 0; } }
@media (max-width: 520px) {
  .cd-confirm { place-items: end center; padding: 0; }
  .cd-confirm__box { border-radius: 20px 20px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 92dvh; }
  .cd-confirm__mocks { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .cd-confirm__btns { grid-template-columns: 1fr; }
  .cd-confirm__btns [data-c=go] { order: -1; }
}

/* artwork thumbnails (list of every upload, and the selected one) */
.cd .cd-art__thumb { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background-color: #fff; background-image: linear-gradient(45deg, #eeede9 25%, transparent 25%), linear-gradient(-45deg, #eeede9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eeede9 75%), linear-gradient(-45deg, transparent 75%, #eeede9 75%); background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0; }
.cd .cd-art__thumb img { max-width: 84%; max-height: 84%; object-fit: contain; display: block; }
.cd .cd-art__head { display: flex; align-items: center; gap: 12px; }
.cd .cd-art__head .cd-art__thumb { width: 64px; flex: none; }
.cd .cd-art__where { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cd .cd-art__where b { font-size: .9rem; }
.cd .cd-art__where small { font-size: .76rem; color: var(--soft); }
.cd .cd-art__all { flex: none; font-size: .78rem; align-self: flex-start; }
.cd .cd-artlist { margin-top: 14px; }
.cd .cd-artlist .cd-f { margin: 0 0 8px; }
.cd .cd-artlist__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.cd .cd-artlist__grid button { border: 0; background: none; padding: 0; display: flex; flex-direction: column; gap: 4px; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.cd .cd-artlist__grid button:hover .cd-art__thumb, .cd .cd-artlist__grid button:focus-visible .cd-art__thumb { border-color: var(--m); box-shadow: 0 0 0 2px rgba(200,18,122,.15); }
.cd .cd-artlist__grid small { font-size: .7rem; font-weight: 600; color: var(--ink-2); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-confirm__note { margin: 10px 0 0; font-size: .8rem; line-height: 1.5; color: #6b6567; background: #f7f6f3; border-radius: 10px; padding: 10px 14px; }
.cd-confirm__note b { color: #1b1718; }

/* artwork check option: same width and corners as the yellow box under it */
.cd-opt { width: 100%; box-sizing: border-box; border-width: 1.5px; }
.cd-only { display: inline-block; margin: 4px 0 6px; background: #fdf0f6; color: var(--m, #c8127a); border: 1px solid #f2c6dc; border-radius: 6px; padding: 2px 8px; font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.cd-opt small { display: block; }
.cd-opt small strong { color: var(--ink-2, #3a3436); }
.cd .cd-artlist__grid button[aria-current=true] .cd-art__thumb { border: 2px solid var(--m); box-shadow: 0 0 0 3px rgba(200,18,122,.15); }
.cd .cd-artlist__grid button[aria-current=true] small { color: var(--m); }
.cd .cd-art .cd-artlist { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.cd .cd-art__thumb--text { background-image: none; }
.cd .cd-art__thumb--text > span { display: block; width: 80%; max-height: 70%; }
.cd .cd-art__thumb--text svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cd [data-p=textlist] .cd-artlist { margin-top: 14px; }

/* layers: thumbnail rows you can drag to reorder */
.cd .cd-layers li { gap: 10px; padding: 6px 8px 6px 4px; user-select: none; -webkit-user-select: none; position: relative; transition: box-shadow .15s; }
.cd .cd-grip { display: grid; place-items: center; width: 22px; height: 36px; color: #b3aeaa; cursor: grab; touch-action: none; flex: none; }
.cd .cd-layers li:hover .cd-grip { color: var(--ink-2); }
.cd .cd-layer__thumb { width: 38px; flex: none; border-radius: 8px; }
.cd .cd-layer__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cd .cd-layers .cd-layer__del { display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--ink-2); width: 32px; height: 32px; border-radius: 8px; flex: none; }
.cd .cd-layers .cd-layer__del:hover { color: #c62828; border-color: #f0b4b4; background: #fff5f5; }
.cd .cd-layers li.is-drag { z-index: 2; cursor: grabbing; box-shadow: 0 10px 24px rgba(0,0,0,.16); border-color: var(--m); }
.cd .cd-layers.is-sorting li:not(.is-drag) { transition: none; }
.cd .cd-layers.is-sorting, .cd .cd-layers.is-sorting * { cursor: grabbing; }

/* designs from another print area on the same photo: click to jump to them */
.cd .cd-area--ctx .cd-obj { pointer-events: auto; cursor: pointer; border-radius: 3px; }
.cd .cd-area--ctx .cd-obj:hover { outline: 1.5px dashed var(--m); outline-offset: 2px; }

/* the left panel scrolls inside its column instead of stretching the whole designer taller
   (otherwise a long panel pushed the garment and the position buttons further down the page) */
@container (min-width: 761px) {
  .cd .cd-app > .cd-panel { height: 0; min-height: 100%; max-height: none; overscroll-behavior: auto;   /* once the panel reaches its top or bottom, the page carries on scrolling */ }
}
/* smaller laptops and tablets: sizes and price move under the designer so the garment keeps a sensible size */
@container (min-width: 761px) and (max-width: 1099px) {
  .cd .cd-app { grid-template-columns: 76px 280px minmax(0, 1fr); }
  .cd .cd-app > .cd-order { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); max-height: none; overflow: visible; }
  .cd .cd-app > .cd-order [data-cd-orderbox] { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; align-items: start; }
  .cd .cd-app > .cd-order [data-cd-orderbox] > :first-child, .cd .cd-app > .cd-order [data-cd-orderbox] > .cd-trust { grid-column: 1 / -1; }
}

/* Preview button (top of the garment) */
.cd-prevbtn { display: inline-flex; align-items: center; gap: 7px; border: 0; background: var(--m); color: #fff; border-radius: 999px; padding: 6px 14px 6px 11px; font-size: .8rem; font-weight: 700; box-shadow: 0 4px 14px rgba(200,18,122,.25); cursor: pointer; min-height: 38px; }
.cd-prevbtn:hover { background: var(--m-dark); }
.cd-prevbtn svg { width: 18px; height: 18px; }
@container (max-width: 760px) { .cd-prevbtn { padding: 6px 12px 6px 10px; min-height: 36px; } }

/* Preview overlay: whole garment, front and back, flips round */
.cd-prev { position: fixed; inset: 0; z-index: 1200; background: rgba(20,16,18,.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: cdFade .18s ease; }
.cd-prev__box { width: min(720px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 12px; color: #fff; }
.cd-prev__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cd-prev__head b { display: block; font-size: 1.1rem; }
.cd-prev__head small { display: block; opacity: .75; font-size: .82rem; margin-top: 2px; }
.cd-prev__x { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.cd-prev__x:hover { background: rgba(255,255,255,.24); }
.cd-prev__stage { perspective: 1600px; width: min(100%, calc(100vh - 210px)); width: min(100%, calc(100dvh - 210px)); margin: 0 auto; cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cd-prev__card { position: relative; aspect-ratio: 1; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.45,.05,.25,1); }
.cd-prev__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px; overflow: hidden; background: #f3f3f1; display: grid; place-items: center; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.cd-prev__face--1 { transform: rotateY(180deg); }
.cd-prev__face img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.cd-prev__load { color: #8a8486; font-size: .85rem; }
.cd-prev__foot { display: flex; align-items: center; justify-content: center; gap: 14px; }
.cd-prev__side { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; background: rgba(255,255,255,.14); border-radius: 999px; padding: 6px 12px; }
.cd-prev .cd-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; min-height: 44px; padding: 10px 20px; font: inherit; font-weight: 700; background: #c8127a; color: #fff; cursor: pointer; }
.cd-prev .cd-btn:hover { background: #a90f67; }
.cd-prev__note { margin: 0; text-align: center; font-size: .74rem; opacity: .6; }
@media (prefers-reduced-motion: reduce) { .cd-prev__card { transition: none; } }
.cd-confirm__mocks figure { cursor: zoom-in; }
.cd-confirm__big { display: inline-block; margin: 0 0 14px; font-size: .84rem; border: 0; background: none; color: #c8127a; font-weight: 700; padding: 0; cursor: pointer; font-family: inherit; }
.cd .cd-wrapturn { position: absolute; inset: 0; }

/* Start again */
.cd .cd-rail .cd-rail__reset:hover { color: #ff9cb0; }
.cd .cd-rail .cd-rail__undo { margin-top: auto; }
.cd-ph__reset { float: right; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: .74rem; font-weight: 700; margin-left: 8px; cursor: pointer; }
.cd-ph__reset svg { width: 14px; height: 14px; }
.cd-reset__list { margin: 0 0 4px; padding-left: 20px; line-height: 1.7; }
.cd-confirm .cd-btn--danger { background: #c62828; }
.cd-confirm .cd-btn--danger:hover { background: #a61f1f; }
.cd .cd-rail .cd-rail__reset { white-space: nowrap; margin: 0 -6px; padding-left: 0; padding-right: 0; letter-spacing: -.01em; }
.cd-ph__reset { white-space: nowrap; }
.cd-tick__note { display: none; font-size: .78rem; color: var(--soft, #6b6567); margin-top: 2px; }
.cd-tick.is-off { opacity: .45; cursor: not-allowed; }
.cd-tick.is-off span > :first-child, .cd-tick.is-off span { text-decoration: none; }
.cd-tick.is-off .cd-tick__note { display: block; opacity: 1; }

/* ---------- choosing a garment ---------- */
.cd-gsearch { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 10px; color: var(--soft); margin: 0 0 10px; background: #fff; }
.cd-gsearch input { border: 0; outline: 0; padding: 9px 0; font: inherit; font-size: .88rem; width: 100%; background: none; color: var(--ink); }
.cd-gsearch:focus-within { border-color: var(--m); }
.cd-gchips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -2px 12px; padding: 2px; scrollbar-width: none; }
.cd-gchips::-webkit-scrollbar { display: none; }
.cd-gchips:empty { display: none; }
.cd-gchips button { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; font-size: .76rem; color: var(--ink-2); cursor: pointer; }
.cd-gchips button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cd-ggrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-gcard { display: flex; flex-direction: column; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; text-decoration: none; color: var(--ink); position: relative; }
.cd-gcard:hover { border-color: #cfcdc7; }
.cd-gcard[aria-current=true] { border-color: var(--m); box-shadow: 0 0 0 3px rgba(200,18,122,.12); }
.cd-gcard__pic { position: relative; aspect-ratio: 1; background: #f6f6f4; display: block; }
.cd-gcard__pic img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; }
.cd-gcard b { display: block; font-size: .78rem; padding: 7px 8px 0; line-height: 1.25; }
.cd-gcard small { display: block; font-size: .7rem; color: var(--soft); padding: 1px 8px 8px; }
.cd-gcard .cd-gcard__meta { padding-bottom: 2px; }
.cd-gbadge { position: absolute; top: 6px; left: 6px; font-style: normal; font-size: .58rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--m); color: #fff; padding: 2px 6px; border-radius: 999px; }
.cd-gbadge--new { background: var(--ink); }
.cd-gtick { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--m); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; }
.cd-gall { display: block; width: 100%; margin: 10px 0 2px; border: 0; background: none; color: var(--m); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; padding: 6px; }
.cd-gall:hover { text-decoration: underline; }
.cd-gdots { display: flex; gap: 3px; padding: 4px 8px 0; align-items: center; }
.cd-gdots i { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.cd-gdots em { font-style: normal; font-size: .66rem; color: var(--soft); margin-left: 2px; }
/* browse all */
.cd-gall-ov { position: fixed; inset: 0; z-index: 1100; background: rgba(20,16,18,.55); display: grid; place-items: center; padding: 16px; animation: cdFade .18s ease; }
.cd-gall-ov__box { width: min(1080px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.cd-gall-ov__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cd-gall-ov__head h3 { margin: 0; font-size: 1.3rem; }
.cd-gall-ov__head .cd-prev__x { background: #f3f1ee; color: var(--ink); }
.cd-gall-ov__bar { display: flex; gap: 10px; flex-wrap: wrap; }
.cd-gall-ov__bar .cd-gsearch { flex: 1 1 260px; }
.cd-gall-ov__bar select { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; font: inherit; font-size: .88rem; background: #fff; margin-bottom: 10px; }
.cd-ggrid--big { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cd-ggrid--big .cd-gcard b { font-size: .9rem; padding: 10px 10px 0; }
.cd-ggrid--big .cd-gcard small { font-size: .76rem; padding: 2px 10px 10px; }
.cd-ggrid--big .cd-gcard .cd-gcard__meta { padding-bottom: 0; }
.cd-ggrid--big .cd-gdots { padding: 6px 10px 0; }
@media (max-width: 520px) { .cd-gall-ov { padding: 0; place-items: end center; } .cd-gall-ov__box { border-radius: 20px 20px 0 0; max-height: 92dvh; padding: 18px 14px; } .cd-ggrid--big { grid-template-columns: 1fr 1fr; gap: 8px; } }
/* size chart */
.cd-chart table { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 8px; }
.cd-chart th, .cd-chart td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.cd-chart thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--soft); }
.cd-chart tbody th { font-weight: 800; }

/* added to basket: checkout or add another garment */
.cd-added__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cd-added__head h3 { margin: 0 !important; }
.cd-added__tick { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #1f9d55; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.cd-added__item { display: flex; align-items: center; gap: 12px; background: #f7f6f3; border-radius: 14px; padding: 10px; }
.cd-added__item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: #fff; }
.cd-added__item p { margin: 0; line-height: 1.45; }
.cd-added__item small { color: #6b6567; }
.cd-added__btns { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .cd-added__btns { grid-template-columns: 1fr; } .cd-added__btns [data-c=checkout] { order: -1; } }

/* basket: the garment picture opens the front and back preview */
button.cd-item__pics { position: relative; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: zoom-in; text-align: left; border-radius: 12px; }
button.cd-item__pics:focus-visible { outline: 2px solid #c8127a; outline-offset: 3px; }
button.cd-item__pics:hover 
/* your uploads: tap one to use it on this side too */
.cd-mine { margin-top: 16px; }
.cd .cd-mine .cd-f { margin: 0 0 8px; }
.cd-mine .cd-f small { font-weight: 500; color: var(--soft); text-transform: none; letter-spacing: 0; }
.cd-mine__row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.cd-mine__row button { position: relative; flex: none; width: 64px; height: 64px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: repeating-conic-gradient(#f1f0ed 0 25%, #fff 0 50%) 0 0 / 12px 12px; cursor: copy; }
.cd-mine__row button:hover { border-color: #c8127a; box-shadow: 0 0 0 1px #c8127a; }
.cd-mine__row img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cd-mine__row i { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: #c8127a; color: #fff; font-style: normal; font-weight: 800; font-size: 14px; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff; }

/* clipart: categories first, then a category's designs */
.cd-clgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cd-clgrid > button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 9px; cursor: copy; transition: border-color .12s, box-shadow .12s, transform .12s; }
.cd-clgrid > button:hover { border-color: #c8127a; box-shadow: 0 0 0 1px #c8127a; }
.cd-clgrid > button:active { transform: scale(.96); }
.cd-clgrid img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.cd-clcats { display: grid; grid-template-columns: 1fr; gap: 6px; }
.cd-clcat { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 12px 7px 7px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.cd-clcat:hover { border-color: #c8127a; box-shadow: 0 0 0 1px #c8127a; }
.cd-clcat::after { content: '›'; margin-left: auto; font-size: 1.3rem; color: var(--soft); line-height: 1; }
.cd-clcat__pic { width: 42px; height: 42px; flex: none; border-radius: 10px; background: #f6f5f2; display: grid; place-items: center; font-size: 1.4rem; }
.cd-clcat__pic img { width: 32px; height: 32px; object-fit: contain; }
.cd-clcat b { display: block; font-size: .86rem; line-height: 1.2; }
.cd-clcat small { display: block; font-size: .72rem; color: var(--soft); font-weight: 500; margin-top: 1px; }
@container (max-width: 760px) { .cd-clcats { grid-template-columns: 1fr 1fr; } .cd-clcat::after { display: none; } .cd-clcat { gap: 10px; padding-right: 8px; } }
.cd-clhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.cd-clhead:empty { display: none; }
.cd-clhead__t { font-weight: 700; font-size: .86rem; margin-left: auto; text-align: right; }
.cd-clback { font-size: .84rem; white-space: nowrap; }
.cd-clsel { background: #f6f5f2; border-radius: 14px; padding: 8px; margin: 0 0 12px; }
.cd-clsel__row { display: flex; align-items: center; gap: 10px; }
.cd-clsel__pic { width: 42px; height: 42px; flex: none; border-radius: 9px; background: repeating-conic-gradient(#efeee9 0 25%, #fff 0 50%) 0 0 / 10px 10px; display: grid; place-items: center; padding: 4px; }
.cd-clsel__pic img { max-width: 100%; max-height: 100%; }
.cd-clsel__txt { flex: 1; min-width: 0; }
.cd-clsel__txt b { display: block; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-clsel__txt small { font-size: .72rem; color: var(--soft); }
.cd-clsel .cd-btn--icon { flex: none; }
.cd-clsel__cols { margin-top: 8px; gap: 6px; }
.cd-clsel__cols button { width: 24px; height: 24px; }
.cd-toast { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); z-index: 20; background: #1b1718; color: #fff; font-weight: 600; font-size: .82rem; padding: 8px 14px; border-radius: 999px; box-shadow: 0 8px 20px rgba(0,0,0,.25); white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; pointer-events: none; animation: cdUp .2s ease; transition: opacity .35s; }
.cd-toast.is-bad { background: #b0122f; white-space: normal; text-align: center; }
.cd-toast.out { opacity: 0; }

/* design first, then sizes & price */
.cd-stepped [data-cd-order]:not(.is-sizes) [data-cd-orderbox], .cd-stepped [data-cd-order]:not(.is-sizes) [data-cd-back] { display: none; }
.cd-stepped [data-cd-order].is-sizes [data-cd-dsum] { display: none; }
.cd-dsum { display: flex; flex-direction: column; gap: 14px; }
.cd-dsum h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.02em; }
.cd-dsum .cd-meta { margin: -10px 0 0; }
.cd-dsum__card { background: #f6f5f2; border-radius: 16px; padding: 14px; }
.cd-dsum__card > b { font-size: .82rem; }
.cd-dsum__list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cd-dsum__list button { display: flex; align-items: center; gap: 6px; max-width: 100%; background: #fff; border: 0; border-radius: 10px; padding: 5px 9px 5px 5px; font: inherit; font-size: .76rem; font-weight: 700; color: var(--ink); box-shadow: 0 0 0 1px #e6e5e1; cursor: pointer; text-align: left; }
.cd-dsum__list button:hover { box-shadow: 0 0 0 1.5px var(--m); }
.cd-dsum__list img, .cd-dsum__list i { width: 26px; height: 26px; flex: none; object-fit: contain; border-radius: 6px; }
.cd-dsum__list i { display: grid; place-items: center; background: #f3f2ee; font-style: normal; font-weight: 800; color: var(--soft); font-size: .8rem; }
.cd-dsum__list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-dsum__list small { font-weight: 600; color: var(--soft); }
.cd-dsum__price b { font-size: 1.7rem; letter-spacing: -.02em; }
.cd-dsum__price small { color: var(--soft); font-weight: 600; font-size: .8rem; }
.cd-dsum__price span { display: block; font-size: .78rem; color: var(--soft); margin-top: 2px; }
.cd .cd-dsum__next { font-size: 1rem; padding: 14px; box-shadow: 0 10px 24px rgba(200,18,122,.25); }
.cd-dsum__note { margin: -6px 0 0; text-align: center; font-size: .76rem; color: var(--soft); }
.cd-dsum__note.is-bad { color: #b0122f; font-weight: 700; }
.cd .cd-dsum__back { display: block; align-self: flex-start; margin: 0 0 14px; font-size: .86rem; }
@media (max-width: 800px) {
  .cd-sheet.is-half { max-height: 52vh; max-height: 52dvh; }
}

/* the right-hand column (summary, or sizes & price) scrolls inside itself too, so switching between them
   never changes the height of the designer and the garment stays exactly where it is */
@container (min-width: 1100px) {
  .cd .cd-app > .cd-order { height: 0; min-height: 100%; max-height: none; overscroll-behavior: auto; }
}

/* basket over the online order limit */
.cd-over { border: 2px solid #f2c6dc; background: #fdf3f8; }
.cd-over h2 { color: #a00e62; }
.cd-over p { margin: 0 0 12px; line-height: 1.55; font-size: .92rem; }
.cd-added__over { margin: -6px 0 16px; background: #fdf3f8; border: 1px solid #f2c6dc; border-radius: 12px; padding: 10px 12px; font-size: .84rem; line-height: 1.5; color: #1b1718; }

/* lead time */
.cd-lead { display: flex; gap: 12px; align-items: flex-start; background: #eefaf2; border: 1px solid #cbe9d6; border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; }
.cd-lead:empty { display: none; }
.cd-lead > i { font-style: normal; font-size: 1.25rem; line-height: 1.1; }
.cd-lead b { display: block; font-size: .95rem; color: #16753f; }
.cd-lead small { display: block; color: #3f5a48; font-size: .78rem; line-height: 1.45; margin-top: 2px; }
[data-cd-orderbox] .cd-lead { margin: 0; }
.cd-dsum__lead { color: #16753f !important; font-weight: 700; margin-top: 6px !important; }
.cd-needby { max-width: 240px; }
.cd-needwarn { margin-top: 10px; background: #fff8e1; border: 1px solid #f3dc8a; border-radius: 12px; padding: 10px 12px; font-size: .86rem; line-height: 1.5; }
.cd-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* after paying */
.cd-thanks { text-align: center; padding: 30px 0 60px; }
.cd-thanks h1 { margin: 10px 0 10px; }
.cd-thanks > p { max-width: 620px; margin: 0 auto; line-height: 1.6; }
.cd-thanks__tick { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: #1f9d55; color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.cd-err.is-info { background: #f3f2ee; color: #1b1718; border-color: #e6e5e1; }

/* delivery address boxes */
.cd-fhead { margin: 8px 0 -4px; font-weight: 800; font-size: .95rem; }
.cd-postcode { text-transform: uppercase; }
.cd-postcode::placeholder { text-transform: none; }
.cd-pcmsg { display: block; margin-top: 6px; color: #b0122f; font-weight: 600; font-size: .8rem; }
.cd-pcmsg[hidden] { display: none; }
.cd-gbadge--premium { background: #c9a227; color: #1d1604; }
.cd-gcard__pic img[src*="-thumb."] { filter: drop-shadow(0 2px 5px rgba(27, 23, 24, .10)); }
/* keep room for the scrollbar even when there isn't one, so the panels don't change width (and squeeze the cards) between garments */
.cd-app > .cd-panel, .cd-app > .cd-order { scrollbar-gutter: stable; }
/* over the online order limit: "Price on request" instead of prices */
.is-quote [data-o=sub] { font-size: 1.25rem; }
.cd-item__quote { font-size: .85rem; font-weight: 700; white-space: nowrap; }
.cd-sum__quote { margin: 8px 0 0; line-height: 1.45; }
.is-quote .cd-pricenote { display: none; }
.is-quote .cd-price__big small { display: none; }
.cd-dsum__price small:first-child { margin-right: 5px; }
.cd-dsum__price b + small { margin-left: 3px; }
/* garment panel: the garment they're designing, and a button to change it */
.cd-gcur { border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; margin: 4px 0 10px; }
.cd-gcur__pic { display: grid; place-items: center; background: #f6f6f4; aspect-ratio: 4 / 3; position: relative; }
.cd-gcur__pic img { width: 72%; height: 92%; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(27, 23, 24, .10)); }
.cd-gcur__pic .cd-gbadge { position: absolute; top: 8px; left: 8px; }
.cd-gcur__txt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.cd-gcur__txt b { font-size: .95rem; }
.cd-gcur__txt small { font-size: .78rem; color: var(--soft); }
.cd-gcur__txt strong { color: var(--ink); }
.cd-gchange { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; padding: 10px 14px; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; margin-bottom: 16px; }
.cd-gchange:hover { background: var(--ink); color: #fff; }
.cd-f__n { font-weight: 500; color: var(--soft); }
.cd-gnow { position: absolute; top: 8px; right: 8px; background: var(--m); color: #fff; font-style: normal; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 3px 9px; }
/* phones: the garment as a compact row, so the button and colours fit in the half-height panel */
@media (max-width: 800px) {
  .cd-gcur { display: flex; align-items: center; }
  .cd-gcur__pic { width: 84px; flex: none; aspect-ratio: 1; }
  .cd-gcur__pic .cd-gbadge { display: none; }
  .cd-gcur__txt { padding: 8px 12px; }
}

/* colour names: an instant label over the swatch, and a named list while searching */
.cd-swtip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; white-space: nowrap; padding: 5px 9px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.cd-swtip[hidden] { display: none; }
.cd-swq { margin: 6px 0 10px; }
.cd-sw.is-named { flex-direction: column; flex-wrap: nowrap; gap: 4px; }
.cd-sw.is-named button { width: 100%; height: auto; border-radius: 12px; border: 1.5px solid var(--line); box-shadow: none; background: #fff; display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; text-align: left; font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink); }
.cd-sw.is-named button::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; }
.cd-sw.is-named button[aria-pressed=true] { border-color: var(--m); box-shadow: 0 0 0 2px rgba(200,18,122,.15); }
.cd-sw.is-named .cd-sw__n { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
.cd-sw.is-named button[hidden] { display: none; }
/* smaller colour dots */
.cd-sw { gap: 6px; }
.cd-sw button { width: 26px; height: 26px; border-width: 2px; }
/* "Choose a garment" sort: the site's drop-down, sized to sit beside the search box */
.cd-gall-ov__bar .dd { margin: 0 0 10px; flex: 0 0 auto; min-width: 190px; }
.cd-gall-ov__bar .dd__btn { min-height: 0; padding: 9px 38px 9px 12px; font-size: .88rem; font-weight: 600; background-color: #fff; }
.cd-gall-ov__bar .dd__list { left: auto; right: 0; }

/* fit the designer to the screen: on any laptop or desktop the whole tool (garment, tools and the right-hand column)
   fits inside the window below the site's sticky header (about 100px) once it's scrolled into view. The garment shrinks to fit the height that's left. */
@container (min-width: 1100px) {
  /* scrolling to the designer lands it just under the header */
  .cd .cd-app { scroll-margin-top: 106px; }
  .cd .cd-app { height: clamp(500px, calc(100vh - 118px), 820px); height: clamp(500px, calc(100dvh - 118px), 820px); min-height: 0; }
}
@container (min-width: 761px) and (max-width: 1099px) {
  .cd .cd-app { grid-template-rows: clamp(460px, calc(100vh - 118px), 820px) auto; grid-template-rows: clamp(460px, calc(100dvh - 118px), 820px) auto; min-height: 0; }
}
@container (min-width: 761px) {
  .cd .cd-stage { min-height: 0; }
  .cd .cd-canvas { min-height: 0; container-type: size; }
  .cd .cd-board { width: min(560px, 92cqw, 94cqh); }
}
/* shorter screens: the tool buttons on the left squeeze up a little so they all fit */
@container (min-width: 761px) {
  .cd .cd-rail { min-height: 0; overflow-y: auto; scrollbar-width: none; }
  .cd .cd-rail::-webkit-scrollbar { display: none; }
}
@media (max-height: 820px) {
  .cd .cd-rail { gap: 2px; padding: 8px 8px; }
  .cd .cd-rail button { padding: 7px 4px; gap: 3px; }
  .cd .cd-rail button svg { width: 20px; height: 20px; }
}

/* /design/ with no garment chosen yet: "Select your garment" in the page; the designer stays hidden until they pick */
.cd.is-picking { display: none; }
.cd-pick { padding-bottom: 48px; }
.cd-pick h2 { margin: 0 0 4px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cd-pick > .cd-sub { margin: 0 0 16px; }
.cd-pick .cd-gall-ov__box { width: auto; max-height: none; overflow: visible; box-shadow: none; border: 1px solid var(--line); }
@media (max-width: 520px) { .cd-pick .cd-gall-ov__box { border-radius: 20px; padding: 14px; } }

/* Phones: the four steps sit in one bar, and the basket button moves up beside the title */
@media (max-width: 700px) {
  .cd-intro .wrap { position: relative; }
  .cd-intro h1 { padding-right: 118px; }
  .cd-intro__row { display: block; margin-top: 16px; }
  .cd-intro .cd-basketlink { position: absolute; top: 4px; right: 24px; padding: 6px 12px; font-size: .85rem; }
  .cd-intro .cd-basketlink[href="/design/"] { position: static; display: inline-flex; margin-top: 10px; }   /* the basket page's "+ Design another item" stays under the steps */
  .cd-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 4px; background: #fff; border-radius: 999px; box-shadow: var(--shadow); }
  .cd-steps > * { justify-content: center; gap: 5px; padding: 7px 2px; font-size: .76rem; color: var(--muted); box-shadow: none; background: transparent; min-width: 0; }
  .cd-steps > * i { width: 18px; height: 18px; font-size: .68rem; flex: none; }
  .cd-steps > .on { color: var(--ink); }
  .cd-steps > .cur { background: #fdf0f7; color: var(--m); }
}
@media (max-width: 350px) { .cd-steps > * { font-size: .7rem; gap: 3px; } .cd-steps > * i { width: 16px; height: 16px; } }

/* phones: less space between the designer and the footer */
@media (max-width: 800px) { .cd { padding-bottom: 14px; } .site-footer { padding-top: 16px; } }

/* phone panel: a down arrow (hide) instead of "Done", so it can't be mistaken for sending anything */
.cd-sheet__hide { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--bg); color: var(--ink); cursor: pointer; }
.cd-sheet__hide:active { background: #e7e5e1; }

/* phones: the black tool bar runs the full width of the screen, like an app's bar */
@media (max-width: 800px) {
  .cd .cd-app { overflow: visible; }   /* nothing at the card's corners needs clipping on phones */
  .cd .cd-bar { border-radius: 0 0 22px 22px; transition: margin .2s ease, padding .2s ease, border-radius .2s ease; }
  .cd .cd-bar.is-stuck { margin: 0 -24px; border-radius: 0; padding-left: 18px; padding-right: 18px; }   /* full width only while it sits at the bottom of the screen */
}

/* basket: "which item?" when Design or Sizes is tapped with several items */
.cd-pickitem { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; background: #fdf0f7; color: #7a0b4a; font-weight: 600; font-size: .9rem; line-height: 1.4; scroll-margin-top: 140px; }
.cd-pickitem b { color: var(--m); }
.cd-item__acts a { transition: box-shadow .4s, background .4s, padding .2s; border-radius: 999px; }
[data-cd-items].is-picking .cd-item__acts a { background: #fdf0f7; padding: 6px 12px; box-shadow: 0 0 0 2px var(--m); }

/* the step chips have been removed: the basket button sits on its own on the right */
.cd-intro__row { justify-content: flex-end; }
.cd-intro__row:empty { display: none; }
/* computers too: the basket button sits beside the title instead of on a row of its own */
@media (min-width: 701px) {
  .cd-intro .wrap { position: relative; }
  .cd-intro h1 { padding-right: 150px; }
  .cd-intro h1 { padding-right: 240px; }
  .cd-intro .cd-basketlink, .cd-intro .cd-basketlink[href="/design/"] { position: absolute; top: 10px; right: 24px; margin: 0; }
  .cd-intro__row { margin: 0; }
}

/* the basket is in the top bar now: titles only make room for a button when there is one (the basket page's "+ Design another item") */
.cd-intro h1 { padding-right: 0; }
.cd-intro .wrap:has(.cd-basketlink) h1 { padding-right: 240px; }
@media (max-width: 700px) { .cd-intro .wrap:has(.cd-basketlink) h1 { padding-right: 0; } }

/* required fields */
.cd-req { color: #d0021b; font-weight: 800; margin-left: 2px; }
.cd-reqnote { margin: -4px 0 12px; }

/* thank-you page: waiting for the payment to be confirmed */
.cd-thanks__spin { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%; border: 4px solid #f3d3e4; border-top-color: var(--m, #c8127a); animation: cdspin .8s linear infinite; }
@keyframes cdspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cd-thanks__spin { animation-duration: 2.4s; } }

/* The garment size has to come from the canvas's own height. A plain @container rule on .cd-board was answered by the
   canvas (the nearest container, under 761px wide), so it never applied and the bottom of the garment slid under the
   view buttons on shorter screens. A named container fixes that. */
@container (min-width: 761px) { .cd .cd-canvas { container-name: cdcanvas; } }
@container cdcanvas (min-width: 1px) { .cd .cd-board { width: min(560px, 92cqw, 94cqh); } }
/* the phone tool bar's marker (clothing.js) isn't needed on bigger screens, and in the grid it would add an empty row
   that takes height from the garment area */
@container (min-width: 761px) { .cd .cd-barmark { display: none; } }

/* free delivery progress in the designer's dispatch box (clothing.js freeNote) */
.cd-lead .cd-lead__free { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #bfe0cb; font-size: .84rem; font-weight: 600; color: #1d5b36; line-height: 1.45; }
.cd-lead .cd-lead__free b { display: inline; font-size: inherit; margin: 0; }
.cd-lead .cd-lead__bar { display: block; height: 6px; border-radius: 99px; background: #d6ebdd; margin-top: 7px; overflow: hidden; }
.cd-lead .cd-lead__bar i { display: block; height: 100%; background: #2e9a5a; border-radius: 99px; transition: width .25s; }
.cd-p small { font-size: .72em; font-weight: 600; opacity: .7; }

/* The right-hand column (sizes, price, dispatch) no longer scrolls inside itself, where it was easy to miss there was more
   below: the designer grows as tall as that column needs and the page scrolls instead. The garment stays in view
   (sticky) while you scroll down to the price, so it still doesn't jump about. */
@container (min-width: 1100px) {
  .cd .cd-app { height: auto; min-height: clamp(500px, calc(100vh - 118px), 820px); min-height: clamp(500px, calc(100dvh - 118px), 820px); overflow: clip; }   /* clip, not hidden: hidden would stop the sticky columns sticking */
  .cd .cd-app > .cd-order { height: auto; min-height: 0; max-height: none; overflow: visible; }
  .cd .cd-app > .cd-stage { position: sticky; top: 106px; align-self: start; height: clamp(500px, calc(100vh - 118px), 820px); height: clamp(500px, calc(100dvh - 118px), 820px); }
  .cd .cd-app > .cd-rail { position: sticky; top: 106px; align-self: start; height: clamp(500px, calc(100vh - 118px), 820px); height: clamp(500px, calc(100dvh - 118px), 820px); }
  .cd .cd-app > .cd-panel { position: sticky; top: 106px; align-self: start; height: clamp(500px, calc(100vh - 118px), 820px); height: clamp(500px, calc(100dvh - 118px), 820px); min-height: 0; }
}
/* price: the inc / ex VAT switch drops under the price when the column is narrow, instead of hanging outside the box */
.cd .cd-price__big { flex-wrap: wrap; row-gap: 8px; }
.cd .cd-price__big [data-vatsw] { margin-left: auto; }
.cd .cd-price__big .vatsw { margin-left: 0; }

/* Undo above the garment (computers) and at the top of the designer (phones); Start again at the foot of the left panel */
.cd .cd-undo { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 14px 7px 11px; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.cd .cd-undo svg { width: 18px; height: 18px; }
.cd .cd-undo:hover:not(:disabled) { border-color: var(--ink); }
.cd .cd-undo:disabled { opacity: .4; cursor: default; box-shadow: none; }
.cd .cd-rail [data-tool="help"] { margin-top: auto; }
.cd .cd-panel__reset { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 22px; padding: 10px; border: 1.5px dashed #f0c3cd; border-radius: 12px; background: #fff8f9; color: #b0122f; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.cd .cd-panel__reset:hover { background: #fdeef1; border-style: solid; }
.cd .cd-panel__reset svg { width: 17px; height: 17px; }
.cd .cd-ph__acts { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.cd .cd-ph__acts .cd-ph__reset { float: none; color: #b0122f; border-color: #f0c3cd; background: #fff8f9; }
.cd .cd-ph__acts .cd-undo { padding: 5px 12px 5px 9px; font-size: .8rem; }
.cd .cd-ph__acts .cd-undo svg { width: 16px; height: 16px; }
/* the print-quality (DPI) note: its own full-width line under the top buttons, so the whole message fits */
@container (min-width: 761px) {
  .cd .cd-stage__top .cd-pill { position: absolute; top: 100%; left: 16px; right: 16px; max-width: none; margin-top: -4px; white-space: normal; display: flex; }
}
@container (max-width: 760px) { .cd .cd-undo--top { display: none; } }
