/* Devesh Digital Studio: the collage frame designer (collage.html). Uses the colours, type and buttons in site.css. */

.cl-sec { padding: clamp(56px, 7vw, 96px) 0 clamp(24px, 4vw, 48px); }
.cl-h { margin: 0 0 clamp(24px, 3vw, 40px); text-align: center; font-size: clamp(30px, 3.6vw, 52px); }

/* One card: the preview on the left, a short set of options on the right */
.cl { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); max-width: 1160px; margin-inline: auto; overflow: clip; border-radius: 28px; border: 1px solid var(--line); background: linear-gradient(160deg, #1d1612, #120e0b); box-shadow: 0 50px 100px -50px #000; }

/* The stage: a warm wall, lit from the top left. "On the wall" adds a sideboard drawn to scale; "Close up" shows
   the frame as large as it fits, for moving and zooming photos. */
.cl-stage { position: relative; isolation: isolate; min-height: clamp(500px, 64vh, 600px); overflow: hidden; color: #1d140d;
  background:
    radial-gradient(70% 55% at 18% 6%, rgba(255, 252, 245, .85), rgba(255, 252, 245, 0) 70%),
    radial-gradient(60% 50% at 90% 100%, rgba(120, 80, 40, .16), transparent 70%),
    linear-gradient(180deg, #efe7dc, #e3d6c5); }
.cl-stage.is-over { outline: 3px dashed var(--saffron); outline-offset: -10px; }
.cl-room { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; transition: opacity .45s; }
.is-close .cl-room { opacity: 0; }

/* The frame. --d is one inch on screen, so the shadow and the moulding's light scale with the size. */
.cl-frame { --d: 10px; position: absolute; z-index: 1; left: 50%; top: 30%; width: 0; height: 0; background: var(--frame, #5a3923); border-radius: calc(var(--d) * .08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .1),
    inset 0 calc(var(--d) * .12) calc(var(--d) * .2) rgba(255, 255, 255, .14),
    inset 0 calc(var(--d) * -.15) calc(var(--d) * .35) rgba(0, 0, 0, .35),
    0 calc(var(--d) * .9) calc(var(--d) * 1.6) calc(var(--d) * -.3) rgba(50, 28, 10, .5),
    0 calc(var(--d) * .2) calc(var(--d) * .4) rgba(50, 28, 10, .25);
  transition: left .55s cubic-bezier(.2, .7, .2, 1), top .55s cubic-bezier(.2, .7, .2, 1), width .55s cubic-bezier(.2, .7, .2, 1), height .55s cubic-bezier(.2, .7, .2, 1), padding .55s cubic-bezier(.2, .7, .2, 1), background .3s; }
.cl-frame.is-acrylic { background: transparent; box-shadow: calc(var(--d) * .2) calc(var(--d) * 1) calc(var(--d) * 1.5) calc(var(--d) * -.2) rgba(50, 28, 10, .5); }
.cl-art { position: relative; width: 100%; height: 100%; overflow: hidden; background: #fff; transition: background-color .3s; }
/* The print sits a little inside a wooden frame; acrylic has a glassy shine and a bright edge */
.cl-art::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 calc(var(--d) * .1) calc(var(--d) * .25) rgba(0, 0, 0, .35); }
.is-acrylic .cl-art::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
  background: linear-gradient(125deg, rgba(255, 255, 255, .4) 0%, rgba(255, 255, 255, .08) 26%, rgba(255, 255, 255, 0) 44%, rgba(255, 255, 255, .1) 70%, rgba(255, 255, 255, 0)); }

/* Photo windows. A photo glides to its new place when the layout, number or size changes. */
.cl-slot { position: absolute; z-index: 1; display: block; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: rgba(0, 0, 0, .08); color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: left .45s cubic-bezier(.2, .7, .2, 1), top .45s cubic-bezier(.2, .7, .2, 1), width .45s cubic-bezier(.2, .7, .2, 1), height .45s cubic-bezier(.2, .7, .2, 1), opacity .35s; }
.cl-slot.is-new { opacity: 0; }
.cl-slot img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none;
  transition: left .45s cubic-bezier(.2, .7, .2, 1), top .45s cubic-bezier(.2, .7, .2, 1), width .45s cubic-bezier(.2, .7, .2, 1), height .45s cubic-bezier(.2, .7, .2, 1); }
.cl-slot.is-panning img { transition: none; }
.cl-slot::after { content: ""; position: absolute; inset: 0; pointer-events: none; transition: box-shadow .2s, background-color .2s; }
.cl-slot:focus-visible { outline: none; }
.cl-slot:focus-visible::after { box-shadow: inset 0 0 0 3px var(--marigold); }
.is-wall .cl-slot { cursor: zoom-in; }
.cl-slot.is-sel { z-index: 2; cursor: grab; touch-action: none; }
.cl-slot.is-sel::after { box-shadow: inset 0 0 0 3px var(--saffron), inset 0 0 0 5px rgba(0, 0, 0, .25); }
.cl-slot.is-panning { cursor: grabbing; }
.is-swapping .cl-slot { cursor: copy; }
.cl-slot.is-swap::after, .is-swapping .cl-slot:hover::after { box-shadow: inset 0 0 0 3px var(--marigold); background: rgba(255, 178, 62, .22); }
.cl-plus { display: none; }
.cl-slot.is-empty { background: rgba(128, 128, 128, .12); }
.cl-slot.is-empty::after { box-shadow: inset 0 0 0 1.5px rgba(128, 128, 128, .55); }
.cl-slot.is-empty img { display: none; }
.cl-slot.is-empty .cl-plus { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(128, 128, 128, .9); font: 600 clamp(16px, 2vw, 26px)/1 var(--body); }

/* An optional title, in a band at the top or bottom */
.cl-title { position: absolute; z-index: 2; pointer-events: none; }
.cl-title span { position: absolute; left: 0; right: 0; text-align: center; white-space: nowrap; line-height: 1; translate: 0 -50%; }
.cl-title .t2 { font-family: var(--body); font-weight: 500; }

/* On the stage: the view switch, Shuffle, a caption, the photo tools and short messages */
.cl-top { position: absolute; z-index: 4; left: 14px; right: 14px; top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.cl-top > * { pointer-events: auto; }
.cl-views, .cl-pill, .cl-cap { background: rgba(255, 255, 255, .84); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 8px 22px -10px rgba(60, 35, 10, .45); }
.cl-views { display: inline-flex; padding: 4px; border-radius: 999px; }
.cl-views button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent; color: #4a3a2c; font: 600 13.5px/1 var(--body); cursor: pointer; transition: background-color .2s, color .2s; }
.cl-views button .i { width: 15px; height: 15px; }
.cl-views button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.cl-pill { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 15px; border: 0; border-radius: 999px; color: #2a1c12; font: 600 13.5px/1 var(--body); cursor: pointer; transition: background-color .2s; }
.cl-pill:hover { background: #fff; }
.cl-pill .i { width: 16px; height: 16px; }
.cl-cap { position: absolute; z-index: 4; left: 14px; bottom: 14px; max-width: calc(100% - 28px); margin: 0; padding: 8px 13px; border-radius: 999px; color: #3b2c20; font: 600 12.5px/1.2 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .25s; }
.cl-stage:has(.cl-tools:not([hidden])) .cl-cap { opacity: 0; }
.cl-tools { position: absolute; z-index: 5; left: 50%; bottom: 14px; translate: -50% 0; display: flex; align-items: center; gap: 4px; max-width: calc(100% - 20px); padding: 6px; border-radius: 999px; background: var(--ink); color: var(--cream); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .6); }
.cl-tools-t { padding: 0 8px 0 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.cl-tools button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255, 245, 234, .08); color: inherit; font: 600 14px/1 var(--body); white-space: nowrap; cursor: pointer; transition: background-color .2s; }
.cl-tools button:hover { background: rgba(255, 245, 234, .18); }
.cl-tools button[data-tool="in"], .cl-tools button[data-tool="out"] { padding: 0; }
.cl-tools .i { width: 17px; height: 17px; }
.cl-tools .done { background: var(--saffron); color: #1a0900; }
.cl-tools .done:hover { background: #ff9142; }
.is-swapping .cl-tools [data-tool="swap"] { background: var(--marigold); color: #1a0900; }
.cl-toast { position: absolute; z-index: 6; left: 50%; top: 64px; max-width: calc(100% - 28px); margin: 0; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--cream); font: 500 14px/1.3 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; translate: -50% -8px; pointer-events: none; transition: opacity .25s, translate .25s; }
.cl-toast.on { opacity: 1; translate: -50% 0; }

/* The options: how many photos, the layouts in one row, "More" folded away, then the order */
.cl-panel { display: flex; flex-direction: column; min-width: 0; padding: clamp(24px, 2.6vw, 34px) clamp(22px, 2.8vw, 38px) clamp(22px, 2.4vw, 30px); transition: background-color .2s; }
.cl-panel.is-over { background: rgba(255, 122, 26, .08); }
.cl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cl-label { margin: 0; color: var(--cream); font: 600 16px/1.2 var(--head); letter-spacing: 0; }
.cl-step { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 245, 234, .03); }
.cl-step button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--cream); cursor: pointer; transition: background-color .2s, color .2s; }
.cl-step button .i { width: 17px; height: 17px; }
.cl-step button:hover:not(:disabled) { background: var(--saffron); color: #1a0900; }
.cl-step button:disabled { opacity: .3; cursor: default; }
.cl-step output { min-width: 34px; text-align: center; font: 700 20px/1 var(--head); font-variant-numeric: tabular-nums; }

.cl-range { --fill: 25%; display: block; width: 100%; height: 26px; margin: 12px 0 22px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.cl-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--saffron) var(--fill), rgba(255, 245, 234, .14) var(--fill)); }
.cl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; border: 4px solid var(--saffron); background: var(--cream); box-shadow: 0 4px 12px rgba(0, 0, 0, .45); }
.cl-range::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 245, 234, .14); }
.cl-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--saffron); }
.cl-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--saffron); background: var(--cream); }
.cl-range:focus-visible { outline: none; }
.cl-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(255, 178, 62, .45); }
.cl-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 5px rgba(255, 178, 62, .45); }

/* Layouts: one row of drawings, each made for the number of photos and the shape chosen. It scrolls sideways,
   with arrows on either end while there is more to see. */
.cl-lhead { margin-bottom: 10px; font-size: 14.5px; font-weight: 600; }
.cl-carousel { position: relative; margin: 0 -6px 18px; }
.cl-layouts { position: relative; display: flex; gap: 8px; padding: 3px 6px 2px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 6px; scrollbar-width: none; }
.cl-layouts::-webkit-scrollbar { display: none; }
.cl-layouts button { flex: none; display: grid; justify-items: center; gap: 7px; width: 86px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; scroll-snap-align: start; }
.cl-lt { display: grid; place-items: center; width: 86px; height: 72px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 245, 234, .03); transition: border-color .2s, background-color .2s; }
.cl-lt svg { display: block; width: 50px; height: 50px; }
.cl-lt rect { fill: rgba(255, 245, 234, .42); }
.cl-lt .f { fill: rgba(255, 245, 234, .1); }
.cl-lt .h { fill: var(--marigold); }
.cl-lt .b { fill: rgba(255, 245, 234, .7); }
.cl-layouts button:hover .cl-lt { border-color: rgba(255, 122, 26, .6); }
.cl-layouts button:focus-visible { outline: none; }
.cl-layouts button:focus-visible .cl-lt { outline: 3px solid var(--marigold); outline-offset: 2px; }
.cl-layouts button[aria-pressed="true"] .cl-lt { border-color: var(--saffron); background: rgba(255, 122, 26, .14); box-shadow: inset 0 0 0 1px var(--saffron); }
.cl-ln { font: 500 12.5px/1.2 var(--body); white-space: nowrap; }
.cl-layouts button[aria-pressed="true"] .cl-ln { color: var(--marigold); }
.cl-arr { position: absolute; z-index: 2; top: 21px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 245, 234, .2); border-radius: 50%; background: var(--ink); color: var(--cream); box-shadow: 0 6px 18px rgba(0, 0, 0, .55); cursor: pointer; transition: border-color .2s, color .2s; }
.cl-arr:hover { border-color: var(--saffron); color: var(--saffron); }
.cl-arr .i { width: 18px; height: 18px; }
.cl-arr.prev { left: -6px; }
.cl-arr.next { right: -6px; }

/* More: shape, gap, size, background and a title, with a one-line summary while it's closed */
.cl-more { margin-bottom: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 245, 234, .02); }
.cl-more summary { position: relative; display: grid; gap: 3px; padding: 13px 44px 13px 16px; border-radius: 18px; list-style: none; cursor: pointer; }
.cl-more summary::-webkit-details-marker { display: none; }
.cl-more summary::after { content: ""; position: absolute; right: 19px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--marigold); border-bottom: 2px solid var(--marigold); translate: 0 -70%; rotate: 45deg; transition: rotate .25s, translate .25s; }
.cl-more[open] summary::after { rotate: 225deg; translate: 0 -20%; }
.cl-more-t { font: 600 15px/1.2 var(--head); }
.cl-sub { overflow: hidden; color: var(--muted); font: 500 12.5px/1.35 var(--body); white-space: nowrap; text-overflow: ellipsis; }
.cl-more-in { padding: 0 16px 16px; container-type: inline-size; }
/* Shape and gap sit side by side when there's room, one under the other when not */
@container (max-width: 400px) {
  .cl-more-in .cl-2col { grid-template-columns: 1fr; gap: 0; }
  .cl-more-in > .cl-2col:first-child > div + div .cl-mini { margin-top: 14px; }
}
.cl-mini { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 8px; color: var(--cream); font: 600 13px/1.2 var(--body); }
.cl-more-in > :first-child .cl-mini, .cl-more-in > .cl-2col:first-child .cl-mini { margin-top: 4px; }
.cl-val { color: var(--muted); font-weight: 500; }
.cl-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.cl-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.cl-tiles button { display: grid; justify-items: center; align-content: center; gap: 5px; min-width: 0; min-height: 52px; padding: 7px 2px 6px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 12px/1.1 var(--body); cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.cl-tiles .i { width: 18px; height: 18px; }
.cl-tiles-sm button { min-height: 38px; padding: 0 4px; font-size: 13px; }
.cl-tiles button:hover, .cl-sizes button:hover { border-color: rgba(255, 122, 26, .6); }
.cl-tiles button[aria-pressed="true"], .cl-sizes button[aria-pressed="true"] { border-color: var(--saffron); background: rgba(255, 122, 26, .14); box-shadow: inset 0 0 0 1px var(--saffron); color: var(--cream); }
.cl-tiles .f-script { font: 400 19px/1 "Great Vibes", cursive; }
.cl-tiles .f-classic { font-family: "Playfair Display", Georgia, serif; }
.cl-sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cl-sizes button { height: 36px; padding: 0 2px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--cream); font: 600 13px/1 var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; transition: border-color .2s, background-color .2s; }
.cl-hint { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.cl-hint:empty { display: none; }
.cl-hint.warn { color: var(--marigold); }
.cl-sws { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-sw { position: relative; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); cursor: pointer; }
.cl-sw[aria-pressed="true"], .cl-anycol.on { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 0 0 0 2px #1a1410, 0 0 0 4px var(--saffron); }
.cl-anycol { overflow: hidden; background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #f43f5e); }
.cl-anycol.on { background: var(--c); }
.cl-anycol input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.cl-anycol:focus-within { outline: 3px solid var(--marigold); outline-offset: 3px; }
.cl-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.cl-fields input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 245, 234, .18); background: var(--ink); color: var(--cream); font: 400 14px/1 var(--body); transition: border-color .2s, box-shadow .2s; }
.cl-fields input::placeholder { color: rgba(255, 245, 234, .4); }
.cl-fields input:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(255, 122, 26, .18); }
.cl-titleopts { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; margin-top: 8px; }

/* The end of the panel: your photos (once added), the order button, two small links and the price */
.cl-end { margin-top: auto; }
.cl-mine { margin-bottom: 14px; }
.cl-thumbs { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0 0 4px; overflow-x: auto; scrollbar-width: thin; }
.cl-thumbs li { position: relative; flex: none; width: 50px; height: 50px; overflow: hidden; border-radius: 9px; background: var(--ink-3); }
.cl-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.cl-thumbs li.out img { opacity: .35; }
.cl-thumbs .no { position: absolute; left: 3px; top: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: rgba(13, 10, 8, .78); font: 600 10px/16px var(--body); text-align: center; }
.cl-thumbs .rm { position: absolute; right: 2px; top: 2px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(13, 10, 8, .78); color: var(--cream); cursor: pointer; }
.cl-thumbs .rm:hover { background: var(--chilli); }
.cl-thumbs .rm .i { width: 12px; height: 12px; stroke-width: 2.4; }
.cl-wa { --h: 54px; gap: 10px; width: 100%; }
.cl-wa .i { width: 20px; height: 20px; }
.cl-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 22px; margin-top: 10px; }
.cl-link { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; border: 0; background: none; color: var(--marigold); font: 600 14px/1.2 var(--body); cursor: pointer; transition: color .2s; }
.cl-link:hover { color: var(--cream); }
.cl-link .i { width: 17px; height: 17px; }
.cl-price { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; margin: 10px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.cl-chip { padding: 4px 10px; border-radius: 999px; background: rgba(255, 178, 62, .14); color: var(--marigold); font-weight: 600; }

/* Questions */
.cl-faq-sec { padding-bottom: clamp(90px, 11vw, 150px); }
.cl-faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.cl-faq-wrap .sec-head { flex-direction: column; align-items: flex-start; margin: 0; }
.cl-faq-wrap .sec-head .eyebrow { margin: 0; }
.cl-faq-wrap .sec-head h2 { font-size: clamp(32px, 3.8vw, 54px); }
.cl-faq details { border-bottom: 1px solid var(--line); }
.cl-faq details:first-child { border-top: 1px solid var(--line); }
.cl-faq summary { position: relative; padding: 22px 48px 22px 0; list-style: none; cursor: pointer; font: 600 clamp(17px, 1.4vw, 20px)/1.35 var(--head); transition: color .2s; }
.cl-faq summary::-webkit-details-marker { display: none; }
.cl-faq summary::before, .cl-faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 16px; height: 2px; border-radius: 2px; background: var(--marigold); transition: rotate .25s; }
.cl-faq summary::after { rotate: 90deg; }
.cl-faq details[open] summary::after { rotate: 0deg; }
.cl-faq summary:hover { color: var(--marigold); }
.cl-faq details p { max-width: 62ch; margin: 0 0 22px; color: var(--muted); }

/* Phones and tablets: the preview stays at the top of the screen while the options scroll under it */
@media (max-width: 900px) {
  .cl { display: flex; flex-direction: column; align-items: stretch; border-radius: 22px; }
  .cl-stage { position: sticky; top: 0; z-index: 10; min-height: 0; height: clamp(260px, 44svh, 420px); }
  .cl-panel { padding: 22px 18px 22px; }
  .cl-faq-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .cl-pill { width: 42px; padding: 0; justify-content: center; }
  .cl-pill span { display: none; }
  .cl-views button { padding: 0 11px; font-size: 13px; }
  .cl-tools { flex-wrap: wrap; justify-content: center; width: max-content; border-radius: 22px; }
  .cl-tools-t { flex-basis: 100%; padding: 4px 0 2px; text-align: center; }
  .cl-2col { grid-template-columns: 1fr; gap: 0; }
  .cl-arr { display: none; }
}

/* ==========================================================================
   Steps 2 and 3: full screen over the page. The site stays dark round a light "wall" where the frame is.
   ========================================================================== */
html.cs-open, html.cs-open body { overflow: hidden; }
.cs { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: var(--ink); color: var(--cream); }
.cs.is-over { outline: 3px dashed var(--saffron); outline-offset: -6px; }
.cs-top { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; height: 64px; padding: 0 clamp(12px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.cs-top > :first-child { justify-self: start; }
.cs-top-r { justify-self: end; }
.cs-ic { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--cream); font: 600 14px/1 var(--body); cursor: pointer; transition: border-color .2s, color .2s; }
.cs-ic:hover { border-color: var(--saffron); color: var(--marigold); }
.cs-ic .i { width: 18px; height: 18px; }
.cs-ic[data-back] { padding: 0; }
.cs-title { display: grid; justify-items: center; gap: 3px; margin: 0; text-align: center; }
.cs-title small { color: var(--muted); font: 600 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.cs-title span { font: 700 18px/1.1 var(--head); }
.cs-screen { position: relative; flex: 1; min-height: 0; }

/* The preview fills whatever space it is given in steps 2 and 3 */
.cs .cl-stage { position: absolute; inset: 0; min-height: 0; height: auto; }
.cl-stage.in-design .cl-top, .cl-stage.in-design .cl-cap { display: none; }
.cl-stage.in-design .cl-toast { top: 16px; }
.cl-stage.in-finish .cl-pill { display: none; }

/* Step 2: the frame large in the middle, a panel over its lower part, and the tabs and Next along the bottom */
.cs-d { display: flex; flex-direction: column; }
.cs-d-stage { position: relative; flex: 1; min-height: 0; }
.cs-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px max(16px, (100% - 980px) / 2); border-top: 1px solid var(--line); background: var(--ink-2); }
.cs-tabs { display: flex; gap: 4px; }
.cs-tabs button { display: grid; justify-items: center; gap: 5px; min-width: 70px; padding: 8px 10px 7px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font: 600 12.5px/1 var(--body); cursor: pointer; transition: background-color .2s, color .2s; }
.cs-tabs button .i { width: 21px; height: 21px; }
.cs-tabs button:hover { color: var(--cream); }
.cs-tabs button[aria-pressed="true"] { background: rgba(255, 122, 26, .14); color: var(--marigold); }
.cs-next { --h: 52px; gap: 10px; }
.cs-next .i { width: 19px; height: 19px; }
.cs-next .sm { display: none; }
.cs-sheet { position: absolute; z-index: 20; left: 50%; bottom: 12px; translate: -50% 0; width: min(780px, 100% - 24px); max-height: calc(100% - 24px); overflow: auto; overscroll-behavior: contain; padding: 14px 18px 18px; border-radius: 22px; border: 1px solid var(--line); background: var(--ink-2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .75); }
.cs-sh-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cs-sh-t { flex: 1; margin: 0; font: 700 17px/1.2 var(--head); }
.cs-x { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--cream); cursor: pointer; }
.cs-x:hover { border-color: var(--saffron); color: var(--marigold); }
.cs-x .i { width: 16px; height: 16px; }
.cs-chipbtn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--cream); font: 600 13.5px/1 var(--body); cursor: pointer; }
.cs-chipbtn:hover { border-color: var(--saffron); }
.cs-chipbtn .i { width: 15px; height: 15px; }
.cs-drop { display: grid; justify-items: center; gap: 10px; padding: 20px 16px; border-radius: 18px; border: 1.5px dashed rgba(255, 178, 62, .45); background: rgba(255, 178, 62, .06); text-align: center; }
.cs-drop p { max-width: 46ch; margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.cl-add { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--cream); color: var(--ink); font: 700 15px/1 var(--head); cursor: pointer; transition: background-color .2s; }
.cl-add:hover { background: #fff; }
.cl-add .i { width: 18px; height: 18px; }
.cs-sheet .cl-thumbs { flex-wrap: wrap; overflow: visible; gap: 8px; }
.cs-sheet .cl-thumbs li { width: 64px; height: 64px; }
.cl-thumbs .pick { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.cl-thumbs li:not(.out) .no { background: var(--saffron); color: #1a0900; }
.cs-sheet .cl-hint { font-size: 13px; }
.cs-sheet .cl-link { margin-top: 6px; }
.cs-lrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cs-shapes { flex: 0 1 330px; }
.cs-shapes button { grid-auto-flow: column; min-height: 40px; gap: 7px; font-size: 13px; }
.cs-sheet .cl-carousel { margin-bottom: 0; }
.cs-style .cl-mini:first-child { margin-top: 0; }

/* Step 3: the frame on a wall on the left, finish, size and the order on the right */
.cs-f { overflow-y: auto; overscroll-behavior: contain; }
.cs-f-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; width: min(1180px, 100% - 2 * var(--gutter)); margin: clamp(16px, 3vw, 32px) auto 48px; }
.cs-f-view { position: sticky; top: 0; }
.cs-reedit { display: inline-flex; align-items: center; gap: 8px; height: 38px; margin-bottom: 12px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--cream); font: 600 14px/1 var(--body); cursor: pointer; }
.cs-reedit:hover { border-color: var(--saffron); color: var(--marigold); }
.cs-reedit .i { width: 16px; height: 16px; }
.cs-f-stage { position: relative; height: clamp(380px, calc(100vh - 190px), 640px); overflow: hidden; border-radius: 24px; border: 1px solid var(--line); }
.cs-f-opts { min-width: 0; padding-top: 50px; }
.cs-mini { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font: 700 16px/1.2 var(--head); }
.cs-fins { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-bottom: 22px; }
.cs-fins button { display: grid; justify-items: center; gap: 8px; padding: 12px 6px 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 245, 234, .03); color: var(--muted); font: 600 12.5px/1.1 var(--body); cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.cs-fins button:hover { border-color: rgba(255, 122, 26, .6); }
.cs-fins button[aria-pressed="true"] { border-color: var(--saffron); background: rgba(255, 122, 26, .14); box-shadow: inset 0 0 0 1px var(--saffron); color: var(--cream); }
/* a little frame drawn in each finish */
.cs-fins .fs { display: block; width: 44px; height: 34px; padding: 5px; border-radius: 2px; background: var(--fr); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 4px 10px -4px #000; }
.cs-fins .fs i { display: block; height: 100%; background: linear-gradient(135deg, #e9dccb, #c9b39a); }
.cs-fins .fs.acr { padding: 0; background: none; }
.cs-fins .fs.acr i { background: linear-gradient(125deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .1) 40%, rgba(255, 255, 255, .25) 70%), linear-gradient(135deg, #e9dccb, #c9b39a); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); }
.cs-sizehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cs-sizehead .cs-mini { margin: 0; }
.cs-select select { height: 36px; padding: 0 34px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-2) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23ffb23e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 10px center / 16px; color: var(--cream); font: 600 13.5px/1 var(--body); -webkit-appearance: none; appearance: none; cursor: pointer; }
.cs-select select:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
.cs-sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cl-sizes button strong { font: inherit; }
.cl-sizes button small { display: none; }
.cs-sizes button { display: grid; justify-items: start; align-content: center; gap: 4px; height: auto; min-height: 58px; padding: 10px 14px; border-radius: 14px; font-size: 16px; text-align: left; }
.cs-sizes button small { display: block; color: var(--muted); font: 500 12.5px/1.2 var(--body); }
.cs-sizes button[aria-pressed="true"] small { color: var(--marigold); }
.cs-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 22px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.cs-price strong { font: 700 clamp(26px, 2.6vw, 34px)/1.1 var(--head); letter-spacing: -.02em; }
.cs-price span { color: var(--muted); font-size: 14px; }
.cs-buy { display: flex; gap: 10px; }
.cs-qty { flex: none; padding: 6px; }
.cs-qty output { min-width: 30px; }
.cs-wa { --h: 56px; flex: 1; gap: 10px; }
.cs-wa .i { width: 20px; height: 20px; }
.cs-f-opts .cl-links { justify-content: flex-start; margin-top: 8px; }
.cs-acc { margin-top: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 245, 234, .02); }
.cs-acc summary { position: relative; display: grid; gap: 3px; padding: 14px 44px 14px 16px; list-style: none; cursor: pointer; font: 600 15px/1.2 var(--head); }
.cs-acc summary::-webkit-details-marker { display: none; }
.cs-acc summary small { color: var(--muted); font: 500 12.5px/1.3 var(--body); }
.cs-acc summary::after { content: ""; position: absolute; right: 19px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--marigold); border-bottom: 2px solid var(--marigold); translate: 0 -70%; rotate: 45deg; transition: rotate .25s, translate .25s; }
.cs-acc[open] summary::after { rotate: 225deg; translate: 0 -20%; }
.cs-acc ol { display: grid; gap: 10px; margin: 0; padding: 0 18px 16px 36px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.cs-acc strong { color: var(--cream); font-weight: 600; }

/* Size lines round the frame (step 3, on the wall) */
.cl-dim { position: absolute; z-index: 3; display: none; pointer-events: none; color: #5d4c3d; transition: left .55s cubic-bezier(.2, .7, .2, 1), top .55s cubic-bezier(.2, .7, .2, 1), width .55s cubic-bezier(.2, .7, .2, 1), height .55s cubic-bezier(.2, .7, .2, 1); }
.with-dims.is-wall .cl-dim { display: block; }
.cl-dim.w { height: 0; border-top: 1px solid currentColor; }
.cl-dim.h { width: 0; border-left: 1px solid currentColor; }
.cl-dim::before, .cl-dim::after { content: ""; position: absolute; background: currentColor; }
.cl-dim.w::before, .cl-dim.w::after { top: -5px; width: 1px; height: 9px; }
.cl-dim.w::before { left: 0; }
.cl-dim.w::after { right: 0; }
.cl-dim.h::before, .cl-dim.h::after { left: -5px; width: 9px; height: 1px; }
.cl-dim.h::before { top: 0; }
.cl-dim.h::after { bottom: 0; }
.cl-dim span { position: absolute; padding: 0 6px; background: #ece3d6; font: 600 11.5px/1 var(--body); white-space: nowrap; }
.cl-dim.w span { left: 50%; top: 0; translate: -50% -50%; }
.cl-dim.h span { left: 0; top: 50%; translate: -50% -50%; rotate: -90deg; }

@media (max-width: 900px) {
  .cs-f-in { grid-template-columns: 1fr; gap: 18px; margin-top: 12px; }
  .cs-f-view { position: static; }
  .cs-f-stage { height: clamp(300px, 52svh, 480px); }
  .cs-f-opts { padding-top: 0; }
}
@media (max-width: 600px) {
  .cs-top { height: 56px; }
  .cs-wide { width: 42px; padding: 0; }
  .cs-wide span { display: none; }
  .cs-bar { gap: 8px; padding: 8px 10px; }
  .cs-tabs { gap: 0; }
  .cs-tabs button { min-width: 54px; padding: 7px 4px 6px; font-size: 11.5px; }
  .cs-next { --h: 48px; padding: 0 18px; }
  .cs-next .lg { display: none; }
  .cs-next .sm { display: inline; }
  .cs-sheet { bottom: 8px; width: calc(100% - 16px); max-height: 62%; padding: 12px 14px 14px; border-radius: 18px; }
  .cs-lrow { flex-wrap: wrap; }
  .cs-shapes { flex: 1 1 100%; }
  .cs-sheet .cl-thumbs li { width: 56px; height: 56px; }
  .cs-buy { flex-wrap: wrap; }
}
