/* The Cookie Club: the cookie design editor (/shop/design/, drawn by src/shop/design-page.mjs and run by
   assets/js/design-editor.js). In the storefront's look (fresh.css): the page is the sand "bench" a
   cookie is worked on, with one white card of tools beside it.

   Measurements that come from the editor itself (design-stage.js): the stage is 1240 units across with
   the icing (the part that's printed) 1000 of them, so the icing sits 9.677% in from each side; the
   biscuit under it is a little wider, 6.45% in. */

.dz { --dz-in: 9.677%; --dz-warn: #fff1cf; --dz-bad: #a13a28; background: radial-gradient(46% 42% at 32% 34%, var(--field-glow) 0%, transparent 72%), var(--field); padding: calc(var(--head-h) + clamp(0.75rem, 1.8vw, 1.4rem)) 0 clamp(2.5rem, 5vw, 4rem); min-height: 86vh; }
.dz .wrap { margin-inline: auto; }
.dz-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ------------------------------ the top of the page ------------------------------ */
.chrome-new .dz .f-crumbs, .chrome-new .dz .f-crumbs a { color: var(--field-ink); }
.dz .f-crumbs ol { opacity: 0.8; margin-bottom: 8px; }
.dz-headrow { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; margin-bottom: clamp(0.8rem, 1.6vw, 1.2rem); }
.dz h1 { margin: 0; font-size: clamp(2rem, 3.4vw, 2.7rem); color: var(--field-head); }
.dz-sub { margin: 0.45rem 0 0; max-width: 78ch; font-size: 1.02rem; font-weight: 700; line-height: 1.4; color: var(--field-ink); }
.dz-status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0; min-height: 40px; font-size: 0.92rem; font-weight: 800; color: var(--field-ink); }
.dz-status:empty { display: none; }
.dz-status-ref { padding: 0.55em 0.95em; border-radius: 999px; background: #fff; }
.dz-status-ref strong { font-weight: 900; color: var(--text); letter-spacing: 0.02em; }
.dz-status-save { display: inline-flex; align-items: center; gap: 0.5em; }
.dz-status-save::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brown); }
.dz-status-save.is-waiting::before { background: none; box-shadow: inset 0 0 0 2.5px var(--brown); }

.dz-notice { margin: 0 0 16px; padding: 16px 20px; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow); font-weight: 700; line-height: 1.45; color: var(--text); }
.dz-notice[hidden] { display: none; }
.dz-notice.is-warn { background: var(--dz-warn); }
.dz-notice strong { font-weight: 900; }
.dz-note { display: block; margin: 10px 0; padding: 12px 16px; border-radius: var(--r-sm); background: #fff; white-space: pre-wrap; }
.dz-link { border: 0; padding: 0.35em 0; background: none; font: 900 0.95rem/1.2 var(--font-body); color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
.dz-link:hover { text-decoration-color: var(--mark); }

.dz-loading { display: grid; justify-items: center; gap: 14px; padding: clamp(3rem, 12vh, 7rem) 0; font-weight: 800; color: var(--field-ink); text-align: center; }
.dz-loading[hidden] { display: none; }
.dz-loading p { margin: 0; max-width: 46ch; }
.dz-spin { width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--sand-3); border-top-color: var(--brown); animation: dz-spin 0.9s linear infinite; }
@keyframes dz-spin { to { transform: rotate(360deg); } }

.dz-closed { max-width: 640px; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); }
.dz-closed h2 { margin: 0 0 12px; font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.dz-closed p { margin: 0 0 12px; max-width: 54ch; font-weight: 600; line-height: 1.5; }
.dz-closed-btns { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 6px; }

/* ------------------------------ the two columns ------------------------------ */
.dz-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 424px); gap: clamp(16px, 2.4vw, 34px); align-items: start; }
.dz-app[hidden] { display: none; }
/* (The cookie is as large as leaves all of it on the screen when the page first opens, under the heading.) */
.dz-stagecol { --dz-side: min(100%, 640px, max(340px, calc(100svh - 356px))); position: sticky; top: calc(var(--head-h) + 10px); min-width: 0; }

/* The row above the cookie: undo and redo, the flat view or the 3D one, and starting again. */
.dz-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; width: var(--dz-side); min-width: min(100%, 300px); margin: 0 auto 10px; }
.dz-bar-group { display: flex; align-items: center; gap: 8px; }
.dz-bar-end { justify-content: flex-end; }
.dz-ico { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--text); box-shadow: 0 3px 0 var(--line); cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; -webkit-tap-highlight-color: transparent; }
.dz-ico:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.dz-ico[disabled] { opacity: 0.45; box-shadow: none; cursor: default; transform: none; }
.dz-view { display: inline-flex; padding: 4px; border-radius: 999px; background: #fff; box-shadow: 0 3px 0 var(--line); }
.dz-view[hidden] { display: none; }
.dz-view button { display: inline-flex; align-items: center; gap: 0.45em; min-height: 40px; padding: 0.5em 1.05em 0.5em 0.8em; border: 0; border-radius: 999px; background: none; font: 900 0.95rem/1 var(--font-body); color: var(--text); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; -webkit-tap-highlight-color: transparent; }
.dz-view button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); }
.dz-quiet { min-height: 44px; padding: 0.55em 0.4em; border: 0; background: none; font: 800 0.95rem/1.2 var(--font-body); color: var(--text); text-decoration: underline; text-decoration-color: var(--field-line); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
.dz-quiet[hidden] { display: none; }
.dz-quiet:hover { text-decoration-color: var(--mark); }

/* ------------------------------ the cookie ------------------------------ */
.dz-stagebox { position: relative; width: var(--dz-side); min-width: min(100%, 300px); aspect-ratio: 1; margin: 0 auto; }
.dz-stage { position: absolute; inset: 0; container-type: inline-size; border-radius: var(--r-lg); -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.chrome-new .dz-stage:focus-visible { outline-offset: -3px; border-radius: var(--r-lg); }
.dz-cookie { position: absolute; inset: 0; pointer-events: none; }
/* The biscuit: golden, baked a little browner at the rim, with its shadow on the bench. */
.dz-cookie-edge { position: absolute; inset: 6.45%; border-radius: 50%; background: radial-gradient(circle at 40% 32%, #ebbb7b 0%, #e0aa65 58%, #cf9552 100%); box-shadow: 0 16px 30px -10px rgba(var(--shade-deep), 0.55), 0 3px 6px rgba(var(--shade-deep), 0.22), inset 0 -5px 9px rgba(140, 84, 30, 0.32), inset 0 4px 6px rgba(255, 236, 200, 0.5); }
/* The icing: white fondant with a soft rounded edge. This is the part that's printed. */
.dz-cookie-top { position: absolute; inset: var(--dz-in); border-radius: 50%; background: #fffdf9; box-shadow: 0 3px 6px rgba(150, 100, 50, 0.34), inset 0 -6px 10px rgba(222, 205, 186, 0.5), inset 0 3px 5px #fff; }
@supports (width: 1cqw) {
  .dz-cookie-edge { box-shadow: 0 2.6cqw 4.8cqw -1.6cqw rgba(var(--shade-deep), 0.55), 0 0.5cqw 1cqw rgba(var(--shade-deep), 0.22), inset 0 -0.8cqw 1.4cqw rgba(140, 84, 30, 0.32), inset 0 0.6cqw 1cqw rgba(255, 236, 200, 0.5); }
  .dz-cookie-top { box-shadow: 0 0.5cqw 1cqw rgba(150, 100, 50, 0.34), inset 0 -1cqw 1.6cqw rgba(222, 205, 186, 0.5), inset 0 0.5cqw 0.8cqw #fff; }
}
/* (The drawing library wraps the canvas in a box of its own, and adds a second canvas over it.) */
.dz-stage .canvas-container { position: absolute !important; inset: 0; touch-action: none; }
.dz-stage canvas { display: block; }

/* The dotted line to keep inside, and the lines that show when something catches on the middle. */
.dz-guides { position: absolute; left: var(--dz-in); top: var(--dz-in); width: calc(100% - var(--dz-in) * 2); height: calc(100% - var(--dz-in) * 2); overflow: visible; pointer-events: none; }
.dz-safe { fill: none; stroke: var(--brown); stroke-opacity: 0.42; stroke-width: 2; stroke-dasharray: 1 9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dz-mid { stroke: #e8477f; stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: 0; }
.dz-mid.is-on { opacity: 1; }
.is-locked .dz-guides, .dz-stagebox.is-3d .dz-guides { display: none; }

/* The small bar of buttons that follows what's chosen. */
.dz-float { position: absolute; left: 0; top: 0; z-index: 3; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: #fff; box-shadow: 0 10px 24px -12px rgba(var(--shade-deep), 0.7), 0 0 0 1px rgba(var(--shade), 0.14); will-change: transform; }
.dz-float[hidden] { display: none; }
.dz-float button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dz-float button:active { background: var(--soft-2); }
.dz-float [data-do='delete'] { color: var(--dz-bad); }
@media (pointer: coarse) { .dz-float button { width: 44px; height: 44px; } }

/* A blank cookie asks what should go on it. */
.dz-empty { position: absolute; inset: var(--dz-in); z-index: 2; display: grid; place-content: center; justify-items: center; gap: 4px; padding: 12%; border-radius: 50%; text-align: center; }
.dz-empty[hidden] { display: none; }
.dz-empty p { margin: 0; font-weight: 700; color: var(--text-soft); }
.dz-empty .dz-empty-h { font: 400 clamp(1.45rem, 3.2vw, 2.1rem)/1 var(--font-display); color: var(--heading); }
.dz-empty-btns { display: grid; justify-items: stretch; gap: 12px; margin-top: 16px; }
.dz-empty-btns .f-btn { white-space: nowrap; }
.dz-drop { position: absolute; inset: var(--dz-in); z-index: 4; display: grid; place-items: center; padding: 14%; border: 3px dashed var(--brown); border-radius: 50%; background: rgba(255, 253, 249, 0.92); pointer-events: none; text-align: center; }
.dz-drop[hidden] { display: none; }
.dz-drop p { margin: 0; font-weight: 900; font-size: 1.15rem; color: var(--text); }

/* The cookie in 3D: small in the corner while a design is put together, the whole stage when it's asked for. */
.dz-look { position: absolute; right: 0; bottom: 0; z-index: 3; width: 21%; min-width: 76px; aspect-ratio: 1; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.62); box-shadow: 0 10px 24px -14px rgba(var(--shade-deep), 0.6); overflow: hidden; opacity: 0; visibility: hidden; transition: opacity 0.25s ease; }
.dz-look[hidden] { display: none; }
.dz-look.is-live { opacity: 1; visibility: visible; }
.dz-look canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.dz-look-btn { position: absolute; inset: 0; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dz-look-btn::after { content: '3D'; position: absolute; left: 7px; top: 7px; padding: 0.38em 0.6em; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 900 0.72rem/1 var(--font-body); }
.dz-look-hint { display: none; }
.dz-stagebox.is-3d .dz-stage { visibility: hidden; }
.dz-stagebox.is-3d .dz-look { inset: 0; width: auto; min-width: 0; aspect-ratio: auto; border-radius: var(--r-lg); background: none; box-shadow: none; }
.dz-stagebox.is-3d .dz-look canvas { cursor: grab; touch-action: none; }
.dz-stagebox.is-3d .dz-look.is-turning canvas { cursor: grabbing; }
.dz-stagebox.is-3d .dz-look-btn { display: none; }
.dz-stagebox.is-3d .dz-look-hint { display: block; position: absolute; left: 50%; bottom: 10px; margin: 0; padding: 0.6em 1.1em; border-radius: 999px; background: #fff; color: var(--text); font-weight: 800; font-size: 0.9rem; white-space: nowrap; transform: translateX(-50%); pointer-events: none; transition: opacity 0.3s ease; }
.dz-stagebox.is-3d .dz-look.is-turned .dz-look-hint { opacity: 0; }
.dz-fine { width: var(--dz-side); margin: 10px auto 0; text-align: center; font-size: 0.88rem; font-weight: 700; color: var(--field-ink); opacity: 0.85; }

/* ------------------------------ the card of tools ------------------------------ */
.dz-panel { display: flex; flex-direction: column; min-width: 0; padding: 12px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); }
.dz-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 24px; background: var(--soft); }
.dz-tab { display: grid; justify-items: center; gap: 5px; min-height: 60px; padding: 10px 4px 9px; border: 0; border-radius: 20px; background: none; font: 900 0.88rem/1 var(--font-body); color: var(--text); cursor: pointer; transition: background-color 0.15s ease; -webkit-tap-highlight-color: transparent; }
.dz-tab[hidden] { display: none; }
.dz-tab[aria-selected='true'] { background: #fff; color: var(--accent-deep); box-shadow: 0 2px 8px -2px rgba(var(--shade), 0.35); }
.is-locked .dz-tabs { display: none; }
.dz-panels { min-height: 300px; padding: 20px 8px 10px; }
.dz-p[hidden] { display: none; }
.dz-p h2 { margin: 0 0 14px; font: 900 1.28rem/1.2 var(--font-body); letter-spacing: -0.01em; color: var(--text); }
.dz-p h3 { margin: 22px 0 10px; font: 900 0.98rem/1.2 var(--font-body); color: var(--text); }
.dz-help { margin: 12px 0 0; font-size: 0.9rem; font-weight: 600; line-height: 1.45; color: var(--muted); }
small.dz-help { display: block; margin: 0; }

/* Your logo */
.dz-dropzone { position: relative; display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border: 2.5px dashed var(--field-line); border-radius: var(--r-md); background: var(--paper); color: var(--text); text-align: center; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease; }
.dz-dropzone:hover { background: var(--soft); border-color: var(--brown); }
.dz-dropzone:focus-within { outline: 3px solid var(--mark); outline-offset: 3px; }
.dz-dropzone strong { font-weight: 900; font-size: 1.08rem; }
.dz-dropzone span { font-weight: 700; font-size: 0.92rem; color: var(--muted); }
.dz-dropzone .dz-dropzone-ico { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 50%; background: var(--soft-2); color: var(--brown); }
.dz-dropzone.is-busy { pointer-events: none; }
.dz-dropzone.is-busy > * { opacity: 0.35; }
.dz-dropzone.is-busy::after { content: ''; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; border: 4px solid var(--sand-3); border-top-color: var(--brown); animation: dz-spin 0.9s linear infinite; }
.dz-mine { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.dz-mine button, .dz-pics button { display: block; width: 100%; aspect-ratio: 1; padding: 9px; border: 0; border-radius: var(--r-sm); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; -webkit-tap-highlight-color: transparent; }
.dz-mine img, .dz-pics img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dz-mine button:active, .dz-pics button:active { transform: scale(0.95); }
.dz-rights { font-size: 0.84rem; }

/* Words */
.dz-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.dz-presets button { display: grid; align-content: center; justify-items: center; gap: 7px; width: 100%; min-height: 88px; padding: 10px 6px; border: 0; border-radius: var(--r-sm); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; transition: transform 0.12s ease; -webkit-tap-highlight-color: transparent; }
.dz-presets button:active { transform: scale(0.97); }
.dz-presets span { max-width: 100%; font-size: 1.22rem; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
.dz-presets small { font: 700 0.74rem/1.1 var(--font-body); color: var(--muted); }

/* Pictures */
.dz-search input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 0 18px; border: 2px solid var(--field-line); border-radius: 999px; background: #fff; font: 700 1rem/1.2 var(--font-body); color: var(--text); }
.dz-search input::placeholder { color: var(--muted); opacity: 1; }
.dz-chips { display: flex; gap: 6px; margin: 0 -8px; padding: 12px 8px; overflow-x: auto; scrollbar-width: none; }
.dz-chips::-webkit-scrollbar { display: none; }
.dz-chips button { flex: none; min-height: 40px; padding: 0.55em 1em; border: 0; border-radius: 999px; background: var(--soft); font: 800 0.88rem/1 var(--font-body); color: var(--text); cursor: pointer; }
.dz-chips button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); }
.dz-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.dz-pics-none { grid-column: 1 / -1; padding: 18px 4px; font-weight: 700; color: var(--muted); }

/* Edit: what's on the cookie, and the controls for the thing that's chosen */
.dz-edit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dz-edit-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-warn { margin: 0 0 10px; padding: 11px 14px; border-radius: var(--r-sm); background: var(--dz-warn); font-size: 0.92rem; font-weight: 700; line-height: 1.4; color: var(--text); }
#dz-warns:not(:empty) { margin-bottom: 16px; }
.dz-field { display: grid; gap: 8px; margin: 0 0 18px; }
.dz-field[hidden], .dz-range[hidden] { display: none; }
.dz-field > span, .dz-range > span, .dz-hex > span { font-size: 0.92rem; font-weight: 900; color: var(--text); }
.dz-field textarea, .dz-field input, .dz-hex input { box-sizing: border-box; width: 100%; padding: 12px 14px; border: 2px solid var(--field-line); border-radius: var(--r-sm); background: #fff; font: 700 1.02rem/1.35 var(--font-body); color: var(--text); }
.dz-field textarea { min-height: 76px; resize: vertical; }
.dz-fonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 236px; padding: 3px; margin: -3px; overflow-y: auto; overscroll-behavior: contain; }
.dz-font { display: grid; gap: 3px; min-height: 54px; padding: 8px 12px; border: 0; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dz-font span { font-size: 1.16rem; line-height: 1.2; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-font small { font: 700 0.72rem/1 var(--font-body); color: var(--muted); }
.dz-font[aria-pressed='true'] { background: #fff; box-shadow: inset 0 0 0 3px var(--mark); }
.dz-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.dz-swatch { position: relative; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(var(--shade-deep), 0.28); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dz-swatch::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; }
.dz-swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--mark); }
.dz-swatch-none { background: linear-gradient(135deg, transparent 46%, var(--dz-bad) 46% 54%, transparent 54%), #fff; }
.dz-swatch-gap { width: 2px; margin: 4px 2px; border-radius: 2px; background: var(--line); }
.dz-hex { display: grid; grid-template-columns: auto minmax(0, 8.5em); align-items: center; gap: 10px; margin-top: 6px; }
.dz-hex input { padding: 9px 12px; font-size: 0.98rem; }
.dz-range { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; margin: 0 0 16px; }
.dz-range output { font-size: 0.86rem; font-weight: 800; color: var(--muted); }
.dz-range input { grid-column: 1 / -1; width: 100%; height: 34px; margin: 0; background: none; accent-color: var(--brown); -webkit-appearance: none; appearance: none; cursor: pointer; }
.dz-range input::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: var(--sand-2); }
.dz-range input::-moz-range-track { height: 8px; border-radius: 999px; background: var(--sand-2); }
.dz-range input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border: 3px solid var(--brown); border-radius: 50%; background: #fff; box-shadow: 0 2px 0 var(--line); }
.dz-range input::-moz-range-thumb { box-sizing: border-box; width: 26px; height: 26px; border: 3px solid var(--brown); border-radius: 50%; background: #fff; box-shadow: 0 2px 0 var(--line); }
.dz-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.dz-seg button, .dz-pill { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 0.45em; min-height: 44px; padding: 0.5em 1em; border: 0; border-radius: 999px; background: var(--soft); font: 800 0.9rem/1.15 var(--font-body); color: var(--text); cursor: pointer; transition: background-color 0.15s ease; -webkit-tap-highlight-color: transparent; }
.dz-seg button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); }
.dz-more { margin: 0 0 18px; border-radius: var(--r-sm); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.dz-more summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px; font-weight: 900; font-size: 0.92rem; color: var(--text); cursor: pointer; list-style: none; border-radius: var(--r-sm); }
.dz-more summary::-webkit-details-marker { display: none; }
.dz-more summary::after { content: ''; width: 9px; height: 9px; margin-right: 4px; border-right: 2.5px solid var(--brown); border-bottom: 2.5px solid var(--brown); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s var(--ease-out); }
.dz-more[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.dz-more-in { padding: 4px 14px 2px; }
.dz-more .dz-range { margin: 14px 0 12px; }
.dz-edit-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; padding-top: 16px; border-top: 2px solid var(--soft); }
.dz-pill-bad { color: var(--dz-bad); }
.dz-layers { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dz-layer { display: flex; align-items: center; gap: 12px; box-sizing: border-box; width: 100%; min-height: 58px; padding: 6px 14px 6px 6px; border: 0; border-radius: var(--r-sm); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); font: 800 0.98rem/1.2 var(--font-body); color: var(--text); text-align: left; }
button.dz-layer { cursor: pointer; }
.dz-layer > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-layer img, .dz-layer-aa { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: #fff; object-fit: contain; font: 400 1.25rem/1 var(--font-display); color: var(--brown); }
.dz-tips { margin: 18px 0 0; padding: 14px 16px 14px 34px; border-radius: var(--r-sm); background: var(--soft); font-size: 0.9rem; font-weight: 700; line-height: 1.45; color: var(--text-soft); }
.dz-tips li + li { margin-top: 6px; }

/* Finishing: use the design, or have it emailed. */
.dz-finish { display: grid; justify-items: center; gap: 4px; margin-top: auto; padding: 16px 8px 6px; border-top: 2px solid var(--soft); }
.dz-mailme { display: inline-flex; align-items: center; gap: 0.5em; }
.dz-mailme[hidden] { display: none; }
#dz-use.is-busy #dz-use-words::after { content: '…'; }

@media (hover: hover) and (pointer: fine) {
  .dz-ico:not([disabled]):hover, .dz-float button:hover { background: var(--soft); }
  .dz-view button:not([aria-pressed='true']):hover, .dz-tab:not([aria-selected='true']):hover { background: var(--soft-2); }
  .dz-mine button:hover, .dz-pics button:hover, .dz-presets button:hover, .dz-font:hover, button.dz-layer:hover { box-shadow: inset 0 0 0 2.5px var(--mark); }
  .dz-font[aria-pressed='true']:hover { box-shadow: inset 0 0 0 3px var(--mark); }
  .dz-seg button:not([aria-pressed='true']):hover, .dz-pill:hover, .dz-chips button:not([aria-pressed='true']):hover { background: var(--soft-2); }
}

/* ------------------------------ small messages, and the two small boxes ------------------------------ */
.dz-toast { position: fixed; left: 50%; bottom: 22px; z-index: 90; box-sizing: border-box; max-width: min(92vw, 520px); padding: 14px 22px; border-radius: 22px; background: var(--deep, #5b412b); color: #fff9f3; font: 800 0.98rem/1.35 var(--font-body, sans-serif); text-align: center; box-shadow: 0 18px 40px -18px rgba(91, 65, 43, 0.8); opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.23, 1, 0.32, 1); }
.dz-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.dz-toast.is-bad { background: #a13a28; }
.ui-ask .dz-field { display: grid; gap: 8px; margin: 14px 0 0; }
.ui-ask .dz-field > span { font-weight: 900; font-size: 0.92rem; }
.ui-ask .dz-field input { box-sizing: border-box; width: 100%; min-height: 52px; padding: 0 16px; border: 2px solid #a08a76; border-radius: 14px; background: #fff; font: 700 1.05rem/1.2 var(--ui-body, sans-serif); color: inherit; }
.ui-ask .dz-field input:focus-visible { outline: 3px solid var(--ui-brown, #876345); outline-offset: 2px; }
.dz-mail-err { margin: 10px 0 0; font-weight: 800; color: #a13a28; }
.dz-mail-err[hidden] { display: none; }
/* The box that emails a design's link: the address, the spam check, then the question about news and
   offers, whose two answers are the two ways of sending it (as on the quote calculator). */
.dz-mailbox { width: min(480px, calc(100vw - 32px)); }
.dz-mail-ts { min-height: 65px; margin-top: 14px; }
.dz-mail-err:focus { outline: none; }
.dz-mail-err.is-note { color: inherit; font-weight: 700; }
.dz-news-btns .f-btn[aria-busy='true'] { cursor: progress; }
.dz-news { display: grid; gap: 12px; margin-top: 16px; padding: 16px; border-radius: 22px; background: var(--ui-soft, #f7eae2); }
.dz-news:focus { outline: none; }
.dz-news:focus-visible { outline: 3px solid var(--ui-brown, #876345); outline-offset: 3px; }
.ui-ask .dz-news-ask { margin: 0; max-width: none; line-height: 1.45; }
.dz-news-ask strong { display: block; margin-bottom: 3px; font-weight: 900; font-size: 1.05rem; }
.dz-news-ask span { font-size: 0.92rem; font-weight: 600; }
.ui-ask .dz-news .dz-field { margin: 0; }
.dz-news .dz-field small { font-size: 0.86rem; font-weight: 600; }
.dz-news-btns { display: grid; gap: 12px; }
.dz-news .f-btn--soft { background: #fff; }
.ui-ask .dz-mail-small { max-width: none; margin: 14px 0 0; font-size: 0.86rem; font-weight: 600; line-height: 1.45; }
.ui-ask .dz-mail-close { max-width: none; margin: 6px 0 0; text-align: center; }
.dz-choose-list { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.dz-choose-list button { display: flex; align-items: center; gap: 14px; box-sizing: border-box; width: 100%; min-height: 68px; padding: 8px 16px 8px 8px; border: 0; border-radius: 18px; background: var(--ui-soft, #f7eae2); font: 900 1.02rem/1.2 var(--ui-body, sans-serif); color: inherit; text-align: left; cursor: pointer; }
.dz-choose-list img { flex: none; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.dz-choose-list button:focus-visible { outline: 3px solid var(--ui-brown, #876345); outline-offset: 2px; }

/* ------------------------------ a phone, or a narrow window ------------------------------ */
/* One column: the cookie stays in view at the top while the tools scroll under it, so every change can
   be seen as it's made. While something is being typed the cookie is drawn smaller, to leave room for
   the keyboard. */
@media (max-width: 900px) {
  .dz { padding-bottom: 2rem; background: var(--field); }
  .dz-app { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .dz h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .dz-sub { font-size: 0.98rem; }
  .dz-headrow { margin-bottom: 8px; }
  .dz-status-ref { padding: 0.45em 0.85em; }
  /* (The heading and any notice ride over the patch of sand that hides the tools as they scroll up behind the menu.) */
  .dz-head, .dz-notice { position: relative; z-index: 6; }
  .dz-stagecol { --dz-side: min(100%, 46svh); top: var(--head-h); z-index: 5; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 10px; background: var(--field); }
  .dz-stagecol::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--head-h); background: var(--field); pointer-events: none; }
  .dz-bar { width: 100%; margin-bottom: 6px; }
  .dz-fine { display: none; }
  .dz-view button svg, .dz-wide { display: none; }
  .dz-view button { padding: 0.5em 1.1em; }
  .dz-app.is-typing .dz-stagecol { --dz-side: min(100%, 25svh); }
  .dz-app.is-typing .dz-stagebox { min-width: 0; }
  .dz-app.is-typing .dz-bar, .dz-app.is-typing .dz-look, .dz-app.is-typing .dz-float { display: none; }
  .dz-panels { min-height: 0; padding-inline: 4px; }
  .dz-empty { padding: 8%; }
  .dz-empty p:not(.dz-empty-h) { display: none; }
  .dz-empty-btns { gap: 10px; margin-top: 10px; }
  .dz-empty-btns .f-btn { font-size: 0.88rem; padding: 0.7em 1em; }
}
@media (max-width: 600px) {
  .dz-sub { display: none; }
}
@media (max-width: 420px) {
  .dz-fonts { max-height: 218px; }
  .dz-status { font-size: 0.86rem; }
}

@media (prefers-reduced-motion: reduce) {
  .dz-spin, .dz-dropzone.is-busy::after { animation: none; }
  .dz-ico, .dz-view button, .dz-tab, .dz-look, .dz-look-hint, .dz-toast, .dz-mine button, .dz-pics button, .dz-presets button, .dz-seg button, .dz-pill, .dz-dropzone, .dz-more summary::after { transition: none; }
}
