/* getmoza mosaic studio v2 (frontend programme WP-4, SPEC §5, mockups/FINAL/creator.html).
   Loaded only while CREATOR_UI_V2 / ?ui=v2 is on, after main.css (and shell.css when SHELL_V2 is on).
   Everything is scoped to .mzc (the creator root, templates/_creator_v2.html) or to body.mz-studio,
   so today's v1 markup is never touched. The "Paper & Umber" tokens are re-declared on .mzc with the
   values of static/css/shell.css, so the studio also renders correctly while SHELL_V2 is off.

   HARD RULE (BRIEF 4): no zoom / transform:scale on #mosaicCropContainer or ANY ancestor of it.
   The only transforms in this file: translate on the off-screen bottom bars, spin on loaders, and
   the decorative fly-in thumbnails inside the render stage (outside the crop tool). */

.mzc {
  --gutter: max(1rem, 4vw);
  --content-w: min(calc(100vw - 2 * var(--gutter)), 118.75rem);   /* = shell.css (1900 px at a 16 px root) */
  --paper: #faf8f4; --paper-2: #f3efe8; --paper-3: #ebe5db; --paper-print: #f7f5f0;
  --surface: #ffffff; --line: #e6e0d6; --line-strong: #cfc6b8;
  --night: #1d1915; --night-2: #2a241f; --night-line: #3d352e;
  --ink: #1a1714; --text: #3b352f; --muted: #5f574f; --subtle: #6f665d;
  --on-night: #f6f1e9; --on-night-muted: #c9bfb2;
  --umber: #7a3e1d; --umber-strong: #5e2e14; --umber-wash: #f4e9e0;
  --amber: #e08a2c; --amber-soft: #f6d9b4;
  --ok: #2f6b45; --ok-bg: #eaf3ec; --warn-bg: #fdf3e2; --warn-ink: #7a4a08; --danger: #b3261e;
  --font-display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --font-ui: 'Inter', 'Inter Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-xs: clamp(0.8125rem, 0.78rem + 0.12vw, 0.875rem);
  --fs-sm: clamp(0.875rem, 0.84rem + 0.15vw, 0.9375rem);
  --fs-base: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  --fs-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
  --fs-xl: clamp(1.5rem, 1.3rem + 0.9vw, 2.25rem);
  --fs-2xl: clamp(2rem, 1.5rem + 2vw, 3.75rem);
  --r-xs: .25rem; --r-sm: .5rem; --r-md: .875rem; --r-lg: 1.25rem; --r-pill: 62.4375rem;
  --sh-1: 0 1px .125rem rgb(26 23 20 / .06), 0 .125rem .5rem rgb(26 23 20 / .05);
  --sh-2: 0 .25rem .75rem rgb(26 23 20 / .08), 0 .75rem 2rem rgb(26 23 20 / .08);
  --sh-3: 0 1.5rem 4rem rgb(26 23 20 / .18);
  --ring: 0 0 0 .125rem var(--paper), 0 0 0 .25rem var(--ink);
  --tap: 2.75rem;
  --header-h: clamp(3.75rem, 2.2vw + 2.75rem, 5.5rem);
  --bar-h: 3.5rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* creator primaries grow on very wide screens (SPEC §3: 56 → 76 px fluid) */
  --cta-h: clamp(3.5rem, 1.1vw + 2.125rem, 4.75rem);

  display: block; width: 100%; color: var(--text); font-family: var(--font-ui); font-size: var(--fs-base); line-height: 1.55;
  font-variant-numeric: lining-nums; background: var(--paper); text-align: left;
}
.mzc *, .mzc *::before, .mzc *::after { box-sizing: border-box; }
.mzc h2, .mzc h3 { color: var(--ink); margin: 0; }
.mzc p { margin: 0; }
.mzc img { max-width: 100%; }
.mzc .crop-container img { max-width: none; }   /* main.js sizes the photo larger than the frame (cover + zoom) */
.mzc [hidden] { display: none !important; }
.mzc :focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }
.mzc .num { font-variant-numeric: lining-nums tabular-nums; }
.mzc .muted { color: var(--muted); } .mzc .subtle { color: var(--subtle); } .mzc .ink { color: var(--ink); }
.mzc .small { font-size: var(--fs-sm); } .mzc .xs { font-size: var(--fs-xs); }
.mzc .eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--umber); }
.mzc .mzc-ok { color: var(--ok); }
.mzc .mzc-eyebrow-night { color: var(--amber-soft); }
.mzc .mzc-on-night-muted { color: var(--on-night-muted); }
.mzc .mzc-measure { max-width: 62ch; }
.mzc-wrap { width: var(--content-w); margin-inline: auto; }

/* ── components (self-contained copies of the shell's .ui-v2 ones; identical values) ── */
.mzc .btn { --h: 3rem; display: inline-flex; align-items: center; justify-content: center; gap: .625rem; min-height: var(--h); height: auto;
  padding: 0 1.375rem; border-radius: var(--r-sm); border: .09375rem solid transparent; font: 600 var(--fs-base)/1.2 var(--font-ui); letter-spacing: 0;
  text-decoration: none; cursor: pointer; white-space: nowrap; text-align: center; vertical-align: middle; opacity: 1;
  transition: background .15s, box-shadow .15s; }
.mzc .btn-lg { --h: var(--cta-h); padding: 0 1.75rem; font-size: var(--fs-lg); }
.mzc .btn-sm { --h: 2.75rem; padding: 0 1rem; font-size: var(--fs-sm); }
.mzc .btn-primary { background: var(--ink); color: var(--paper); }
.mzc .btn-primary:hover { background: #000; }
.mzc .btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.mzc .btn-secondary:hover { background: var(--paper-2); }
.mzc .btn-soft { background: var(--paper-2); color: var(--ink); border-color: var(--line); }
.mzc .btn-soft:hover { background: var(--paper-3); }
.mzc .btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }   /* main.js-built buttons (gate, nudges) */
.mzc .btn-outline:hover { background: var(--paper-2); }
.mzc .btn-block { width: 100%; }
.mzc .btn:disabled { background: var(--paper-2); color: var(--muted); border-color: var(--line); cursor: not-allowed; opacity: 1; }
.mzc .btn:focus-visible { box-shadow: var(--ring); }
.mzc .link { color: var(--umber); font-weight: 600; text-decoration: underline; text-underline-offset: .1875rem; text-decoration-thickness: 1px;
  display: inline-flex; align-items: center; min-height: var(--tap); }
.mzc .link:hover { color: var(--umber-strong); }
.mzc .mzc-linkbtn { background: none; border: 0; padding: 0 .125rem; font: inherit; font-weight: 600; cursor: pointer; }
.mzc .chip { display: inline-flex; align-items: center; gap: .375rem; min-height: 1.875rem; padding: .25rem .75rem; border-radius: var(--r-pill);
  background: var(--paper-2); color: var(--text); font-size: var(--fs-xs); font-weight: 500; }
.mzc .chip-night { background: rgb(255 255 255 / .1); color: var(--on-night); }
.mzc .tick { display: flex; gap: .625rem; align-items: flex-start; }
.mzc .tick svg { color: var(--ok); width: 1.125rem; height: 1.125rem; flex: none; margin-top: .22em; }
.mzc-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.125rem, 1.6vw, 2rem); box-shadow: var(--sh-1); }
.mzc-ico { width: 1.25rem; height: 1.25rem; flex: none; }
.mzc-input { min-height: 3rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 .875rem; font: inherit; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
.mzc-fine { font-size: var(--fs-xs); color: var(--subtle); display: flex; gap: .5rem; align-items: flex-start; }
.mzc-fine svg { width: 1rem; height: 1rem; flex: none; margin-top: .125rem; }
.mzc-sub-actions { display: flex; flex-wrap: wrap; gap: 0 1.125rem; font-size: var(--fs-sm); }
.mzc-row-btns { display: flex; flex-wrap: wrap; gap: .625rem; align-items: center; }
.mzc-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.mzc-choose, .mzc-add { position: relative; overflow: hidden; }
/* the real focus target is the invisible file input: draw the ring on its visible label (WCAG 2.4.7) */
.mzc .mzc-choose:focus-within, .mzc .mzc-add:focus-within, .mzc label:has(> .mzc-file:focus-visible) { box-shadow: var(--ring); }
.mzc .mzc-choose:has(> .mzc-file:focus:not(:focus-visible)), .mzc .mzc-add:has(> .mzc-file:focus:not(:focus-visible)) { box-shadow: none; }
.mzc-spin { width: 1rem; height: 1rem; border-radius: 50%; border: .125rem solid var(--line-strong); border-top-color: var(--ink); animation: mzc-spin .8s linear infinite; flex: none; display: inline-block; }
@keyframes mzc-spin { to { transform: rotate(360deg); } }
.mzc .only-touch { display: none !important; }
@media (hover: none) and (pointer: coarse) { .mzc .only-touch { display: revert !important; } .mzc .only-mouse { display: none !important; } }
.mzc-uppy-host { display: none !important; }   /* Uppy dashboards stay mounted (main.js targets) but are never shown */
.mzc .card-section { display: none; animation: none; }
.mzc .card-section.active { display: block; animation: none; }
.mzc .upload-section h3, .mzc .upload-section > p { margin: 0; font-size: inherit; color: inherit; }
.mzc .error { color: var(--danger); text-align: left; padding: 0; font-size: var(--fs-sm); }
.mzc .error:not(:empty) { padding: .75rem 0; }
.mzc .zoom-value { color: var(--muted); }   /* v1 main.css uses --text-subtle (#888, 3.1:1) */
.mzc-legacy, .mzc #step4Card, .mzc #popArtCard { display: none !important; }

/* ───────── studio bar (desktop: steps + Saved; phones: the ONE chrome row) ───────── */
.mzc-bar { display: none; }
body.mz-studio .mzc-bar { display: block; position: sticky; top: var(--sh-top, var(--header-h)); z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.mzc-bar-row { display: flex; align-items: center; gap: 1rem; min-height: var(--bar-h); }
.mzc-bar-logo, .mzc-bar-cart, .mzc-mprog { display: none; }
.mzc-steps { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); font-weight: 500; }
.mzc-steps li, .mzc .step-indicator { display: flex; align-items: center; gap: .25rem; padding: 0; border: 0; border-radius: 0; background: none; font-size: inherit; color: inherit; }
.mzc .steps-progress { position: static; margin: 0; padding: 0; background: none; justify-content: flex-start; flex-wrap: nowrap; }
.mzc-steps li + li::before { content: ""; width: clamp(.75rem, 2vw, 2.5rem); height: 1px; background: var(--line-strong); margin: 0 .375rem; }
.mzc-step-btn { display: inline-flex; align-items: center; gap: .5rem; min-height: var(--tap); padding: 0 .375rem; border: 0; background: none; border-radius: var(--r-sm);
  font: inherit; color: var(--subtle); cursor: default; }
.mzc-step-btn > span:last-child { white-space: nowrap; }
@media (max-width: 1180px) { .mzc-saved-txt { display: none; } }
.mzc-steps .completed .mzc-step-btn { cursor: pointer; color: var(--text); }
.mzc-steps .completed .mzc-step-btn:hover { color: var(--ink); background: var(--paper-2); }
.mzc-steps .step-num { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-grid; place-items: center; background: var(--paper-2); font-size: .75rem; font-weight: 700; color: var(--muted); }
.mzc-steps .completed .step-num { background: var(--ok); color: #fff; font-size: 0; }
.mzc-steps .completed .step-num::before { content: "✓"; font-size: .75rem; }
.mzc-steps .active .mzc-step-btn { color: var(--ink); }
.mzc-steps .active .step-num { background: var(--ink); color: var(--paper); }
.mzc-saved { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-size: var(--fs-xs); color: var(--muted);
  min-height: var(--tap); border: 0; background: none; cursor: pointer; padding: 0 .25rem; border-radius: var(--r-sm); }
.mzc-saved:hover { color: var(--ink); }
.mzc-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); flex: none; }
body.mz-studio .season-bar, body.mz-studio .season { display: none !important; }   /* the dates move into the panel */
@media (max-width: 760px) {
  body.mz-studio .site-header, body.mz-studio > header { display: none !important; }
  body.mz-studio .mzc-bar { top: 0; }
  .mzc-bar-row { gap: .625rem; min-height: 3.75rem; }
  .mzc-bar-logo { display: flex; align-items: center; min-width: var(--tap); min-height: var(--tap); }
  .mzc-bar-logo img { width: 1.875rem; height: 1.875rem; object-fit: cover; object-position: left center; }
  .mzc-bar-cart { display: inline-flex; position: relative; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); margin-right: -.5rem;
    border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: var(--r-sm); padding: 0; }
  .mzc-bar-cart-n { position: absolute; top: .25rem; right: 0; min-width: 1.125rem; height: 1.125rem; border-radius: .5625rem; background: var(--ink); color: var(--paper);
    font-size: .65625rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 .25rem; }
  .mzc-bar-cart-n[data-n="0"] { display: none; }
  .mzc-steps { display: none; }
  .mzc-mprog { display: grid; gap: .375rem; flex: 1; min-width: 0; font-size: .875rem; font-weight: 600; color: var(--ink); padding: .5rem 0; }
  .mzc-mprog > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mzc-segs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; }
  .mzc-segs i { height: .25rem; border-radius: .125rem; background: var(--paper-3); }
  .mzc-segs i.f { background: var(--ink); }
  .mzc-saved { margin-left: 0; width: var(--tap); justify-content: center; }
  .mzc-saved-txt, .mzc-saved .mzc-ico { display: none; }
}

/* studio mode: the page IS the studio (home sections collapse, footer stays) */
body.mz-studio [data-mz-home] { display: none !important; }
body.mz-studio #stickyCTA { display: none !important; }
body.mz-studio #mzResumeBar, body.mzc-has-returning #mzResumeBar { display: none !important; }
.mzc-screen { padding-block: clamp(1.25rem, 2vw, 3rem) clamp(7.5rem, 6vw, 8.75rem); }
body:not(.mz-studio) .mzc-screen { padding-block: clamp(1rem, 2vw, 2.5rem); }
.mzc-head { display: grid; gap: .5rem; margin-bottom: clamp(1rem, 1.4vw, 1.75rem); }
.mzc-head h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-2xl); line-height: 1.05; letter-spacing: -.01em; }
.mzc-head h2:focus { outline: none; }

/* ───────── start card (stub of the WP-2 hero card) ───────── */
.mzc-start { padding-block: clamp(1rem, 2vw, 2.5rem); }
.mzc-start-card { display: grid; gap: .875rem; max-width: 40rem; }
.mzc-mini-steps { display: flex; flex-wrap: wrap; gap: .375rem 1rem; list-style: none; margin: 0; padding: 0; font-size: var(--fs-xs); color: var(--subtle); font-weight: 500; }
.mzc-mini-steps b { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--paper-2); color: var(--muted); font-size: .6875rem; margin-right: .25rem; }
.mzc-mini-steps .on { color: var(--ink); } .mzc-mini-steps .on b { background: var(--ink); color: var(--paper); }
.mzc-start-title { font-size: var(--fs-lg); color: var(--ink); line-height: 1.35; font-weight: 500; }
.mzc-choose { width: 100%; max-width: 26.25rem; }
.mzc-start-card.is-drag { box-shadow: inset 0 0 0 .125rem var(--umber), var(--sh-1); }
.mzc-returning { display: grid; gap: .625rem; padding: .875rem 1rem; border-radius: var(--r-md); background: var(--ok-bg); }
.mzc-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .375rem; font-size: var(--fs-sm); }
.mzc-loading { display: flex; align-items: center; gap: .625rem; font-size: var(--fs-sm); color: var(--muted); min-height: 2.75rem; }
@media (max-width: 600px) { .mzc-hide-s { display: none !important; } }

/* ───────── step 1 · crop ───────── */
.mzc .crop-tool { display: none; margin: 0 auto; }
.mzc .crop-tool.visible { display: grid; }
.mzc-crop-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.25rem, 2.4vw, 3.5rem); align-items: start; }
.mzc-crop-stage { background: var(--paper-2); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 4rem); display: grid; justify-items: center; }
.mzc .crop-wrapper { display: grid; justify-items: center; gap: 1.125rem; width: 100%; }
.mzc .crop-container { width: min(100%, clamp(20rem, 24vw, 35rem)); max-width: none; margin: 0; border-radius: .125rem; box-shadow: var(--sh-3); }
.mzc .crop-container.landscape { width: min(100%, clamp(20rem, 30vw, 43.75rem)); }
.mzc-thirds { background:
  linear-gradient(90deg, transparent calc(33.33% - .5px), rgb(255 255 255 / .5) 0 calc(33.33% + .5px), transparent 0 calc(66.66% - .5px), rgb(255 255 255 / .5) 0 calc(66.66% + .5px), transparent 0),
  linear-gradient(transparent calc(33.33% - .5px), rgb(255 255 255 / .5) 0 calc(33.33% + .5px), transparent 0 calc(66.66% - .5px), rgb(255 255 255 / .5) 0 calc(66.66% + .5px), transparent 0); }
.mzc .crop-controls { width: min(100%, clamp(20rem, 24vw, 35rem)); margin: 0; justify-content: stretch; }
.mzc .zoom-control { display: flex; align-items: center; gap: .75rem; width: 100%; font-size: var(--fs-sm); color: var(--muted); }
.mzc .zoom-control label { font-size: var(--fs-sm); color: var(--muted); }
.mzc .zoom-control input[type="range"] { flex: 1; width: auto; min-width: 0; accent-color: var(--ink); height: var(--tap); }
.mzc .zoom-value { min-width: 4ch; text-align: right; }
.mzc-side { display: grid; gap: 1.125rem; }
.mzc-side .mzc-head { margin: 0; }
.mzc-formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .625rem; }
.mzc .mzc-fmt { display: grid; justify-items: center; align-content: start; gap: .5rem; padding: .875rem .5rem; border-radius: var(--r-md); border: .09375rem solid var(--line);
  background: var(--surface); cursor: pointer; text-align: center; font: inherit; font-size: var(--fs-sm); color: var(--text); min-height: var(--tap); }
.mzc .mzc-fmt b { color: var(--ink); font-weight: 600; }
.mzc-shape { display: block; background: var(--paper-3); border: .09375rem solid var(--line-strong); border-radius: .125rem; }
.mzc-fmt-p { font-size: var(--fs-xs); color: var(--muted); line-height: 1.35; }
.mzc .mzc-fmt[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mzc .mzc-fmt[aria-pressed="true"] .mzc-shape { background: var(--ink); border-color: var(--ink); }
@media (max-width: 1023px) { .mzc-crop-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .mzc-crop-stage { padding: 1rem; border-radius: var(--r-md); }
  .mzc-head h2 { font-size: 1.85rem; }
  .mzc .mzc-fmt { padding: .625rem .25rem; }
}

/* ───────── step 2 · photos ───────── */
.mzc-photos-grid { display: grid; grid-template-columns: minmax(18.75rem, 4fr) minmax(0, 8fr); gap: clamp(1.25rem, 2.4vw, 3.5rem); align-items: start; }
.mzc-meter-col { position: sticky; top: calc(var(--sh-top, var(--header-h)) + var(--bar-h) + 1.25rem); display: grid; gap: 1rem; }
.mzc-meter-head { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; }
.mzc-meter-head img { width: 4rem; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-xs); box-shadow: var(--sh-1); }
.mzc-meter-head img[src=""], .mzc-meter-head img:not([src]) { visibility: hidden; }
.mzc-big-count { font-weight: 600; letter-spacing: -0.03em; font-size: clamp(2.8rem, 2.2rem + 2vw, 5rem); line-height: .95; color: var(--ink); }
.mzc-count-label { font-size: var(--fs-sm); color: var(--muted); }
.mzc-verdict { font-weight: 600; color: var(--umber); }
.mzc-verdict:not(:empty)::before { content: " · "; color: var(--muted); font-weight: 400; }
.mzc-verdict.good { color: var(--ok); }
.mzc .image-counter { margin: 0; font-size: var(--fs-sm); color: var(--ink); }
.mzc-meter { position: relative; margin: 2.125rem 0 1.875rem; }
.mzc .counter-bar { height: .625rem; border-radius: .3125rem; background: var(--paper-3); margin: 0; overflow: hidden; }
.mzc .counter-fill { height: 100%; border-radius: .3125rem; background: linear-gradient(90deg, var(--umber), var(--amber)); transition: width .3s var(--ease); }
.mzc-mark { position: absolute; top: -.375rem; bottom: -.375rem; width: .125rem; background: rgb(26 23 20 / .35); }   /* fade only the tick, never its labels (AA contrast) */
.mzc-mark > span { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .75rem; font-weight: 600; color: var(--muted); }
.mzc-mark .t { top: -1.375rem; } .mzc-mark .b { bottom: -1.375rem; font-weight: 500; }
.mzc-mark[data-at="30"] { left: 12%; } .mzc-mark[data-at="100"] { left: 40%; } .mzc-mark[data-at="200"] { left: 72%; } .mzc-mark[data-at="300"] { left: calc(100% - .125rem); }
.mzc-mark[data-at="300"] > span { left: auto; right: 0; transform: none; }
.mzc-mark[data-at="30"] > span { left: 0; transform: none; }
.mzc-mark.hit { background: var(--ok); } .mzc-mark.hit .t { color: var(--ok); }
.mzc:not(.m200) .mzc-mark[data-m200] { display: none; }
.mzc-count-text { display: block; font-weight: 500; color: var(--ink); }
.mzc-up-slot:empty { display: none; }
.mzc-up-slot { margin-top: .5rem; }
.mzc #mzUploadStatus { margin: 0 !important; font-size: var(--fs-sm) !important; color: var(--muted) !important; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mzc #mzUploadStatus[data-state="failed"] { color: var(--warn-ink) !important; background: var(--warn-bg); padding: .25rem .625rem; border-radius: var(--r-sm); }
.mzc #mzUploadStatus #mzUploadRetryBtn { color: var(--warn-ink) !important; }
.mzc-sources { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .875rem; margin-bottom: 1.125rem; }
.mzc-src-main { display: grid; grid-template-columns: auto 1fr; gap: 1.125rem; align-items: center; padding: clamp(1.125rem, 1.6vw, 1.75rem); border-radius: var(--r-lg);
  border: .09375rem dashed var(--line-strong); background: var(--paper-print); }
.mzc-src-main.is-drag { border-color: var(--umber); background: var(--umber-wash); }
.mzc-src-ic { width: 3.5rem; height: 3.5rem; border-radius: 1rem; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.mzc-src-ic svg { width: 1.75rem; height: 1.75rem; }
.mzc-src-txt { display: grid; gap: .625rem; justify-items: start; }
.mzc-src-title { font-size: var(--fs-lg); line-height: 1.25; }
.mzc-src-alt { display: grid; gap: .625rem; align-content: start; }
.mzc-ig { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .75rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); margin: 0 !important; max-width: none !important; }
.mzc-ig > label { grid-column: 1 / -1; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }
.mzc-field { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; padding-left: .75rem; color: var(--subtle); min-height: 2.75rem; min-width: 0; }
.mzc-field input { border: 0; outline: 0; font: inherit; width: 100%; min-width: 0; padding: 0 .5rem 0 .125rem; background: transparent; color: var(--ink); min-height: 2.75rem; }
.mzc-ig-note { grid-column: 1 / -1; font-size: .78125rem; color: var(--subtle); }
.mzc-ig-msg { grid-column: 1 / -1; font-size: var(--fs-xs); line-height: 1.4; margin: 0 !important; text-align: left !important; }
.mzc-sample-btn { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .625rem .75rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; text-align: left; font: inherit; font-size: var(--fs-sm); min-height: 3.5rem; color: var(--text); }
.mzc-sample-btn:hover { background: var(--paper-2); }
.mzc-sample-btn:disabled { cursor: wait; }
.mzc-sample-on { display: grid; gap: .25rem; padding: .75rem .875rem; border-radius: var(--r-md); background: var(--ok-bg); color: var(--ok); font-size: var(--fs-sm); font-weight: 600; }
.mzc-tip { font-size: var(--fs-sm); color: var(--text); background: var(--warn-bg); border-radius: var(--r-md); padding: .75rem .875rem; margin-bottom: .875rem; display: none; }
.mzc-tip b { color: var(--ink); }
@media (hover: none) and (pointer: coarse) { html.is-ios .mzc-tip-ios { display: block; } html:not(.is-ios) .mzc-tip-android { display: block; } }
.mzc-thumbs-head { display: flex; justify-content: space-between; align-items: center; margin: .375rem 0 .625rem; font-size: var(--fs-sm); }
.mzc .thumbnails { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(4rem, 5vw, 6.5rem), 1fr)); gap: .375rem; max-height: none; overflow: visible; margin: 0; }
.mzc .thumbnails:empty { display: none; }
.mzc .thumbnails:not(.show-all) .thumb:nth-child(n+49) { display: none; }
.mzc .thumb { position: relative; width: auto; height: auto; aspect-ratio: 1; border-radius: var(--r-xs); overflow: visible; background: var(--paper-3); }
.mzc .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-xs); }
.mzc .thumb .remove { top: -.5rem; right: -.5rem; width: var(--tap); height: var(--tap); background: transparent; color: #fff; font-size: 0; }
.mzc .thumb .remove::before { content: "×"; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: rgb(26 23 20 / .78); font-size: 1rem; line-height: 1; }
.mzc .thumb .remove:hover::before { background: #000; }
.mzc-more-row { display: flex; justify-content: center; margin-top: .875rem; }
@media (max-width: 1023px) {
  .mzc-photos-grid { grid-template-columns: minmax(0, 1fr); }
  .mzc-meter-col { position: static; }
  .mzc-sources { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) { .mzc-cta-desktop { display: none !important; } }
@media (max-width: 600px) {
  .mzc-meter-col .mzc-panel { padding: .875rem 1rem; }
  .mzc-meter-head img { width: 2.75rem; }
  .mzc-big-count { font-size: 2.6rem; }
  .mzc-meter { margin: 1.75rem 0 1.625rem; }
  .mzc-mark:not([data-at="100"]) .b { display: none; }
  .mzc-src-main { border-style: solid; border-color: var(--line); grid-template-columns: minmax(0, 1fr); }
  .mzc-src-ic { display: none; }
  .mzc-src-txt, .mzc-add { width: 100%; }
  .mzc .thumbnails { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem; }
}

/* ───────── gate (main.js #previewGate, restyled: dialog on desktop, bottom sheet on phones) ───────── */
.mzc #previewGate.mzc-gate { position: fixed !important; inset: 0 !important; z-index: 110; /* above the sticky site header (100) so the backdrop dims it */ margin: 0 !important; padding: 1rem !important; border: 0 !important; border-radius: 0 !important;
  background: rgb(26 23 20 / .5) !important; text-align: left !important; align-items: center; justify-content: center; }
.mzc #previewGate.mzc-gate[style*="block"] { display: flex !important; }
.mzc-sheet { width: min(35rem, 100%); background: var(--surface); border-radius: var(--r-lg); padding: clamp(1.25rem, 2vw, 2.25rem); box-shadow: var(--sh-3); display: grid; gap: .875rem; max-height: calc(100svh - 2rem); overflow: auto; }
.mzc-sheet h3, .mzc-sheet .mzc-gate-title { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-xl) !important; line-height: 1.1; color: var(--ink) !important; margin: 0 !important; }
.mzc-sheet #previewGateBody { font-size: var(--fs-base) !important; color: var(--muted) !important; margin: 0 !important; }
.mzc-sheet .mzc-gate-btns { display: grid !important; grid-template-columns: 1fr 1fr; gap: .625rem !important; }
.mzc-sheet .mzc-gate-btns .btn { min-width: 0 !important; width: 100%; }
.mzc-sheet .mzc-gate-links { display: flex; flex-wrap: wrap; gap: 0 1.125rem; margin: 0 !important; font-size: var(--fs-sm) !important; }
.mzc-sheet .mzc-gate-links button { min-height: var(--tap); color: var(--umber) !important; font-weight: 600 !important; font-size: var(--fs-sm) !important; padding: 0 .125rem !important; }
.mzc-sheet .mzc-gate-links span { display: none !important; }
.mzc-gate-meter { position: relative; margin: 1.625rem 0 1.375rem; }
.mzc-gate-alt { border-top: 1px solid var(--line); padding-top: .75rem; font-size: var(--fs-sm); color: var(--muted); }
.mzc-gate-alt a { min-height: 0; display: inline; }
.mzc-dialog-backdrop { position: fixed; inset: 0; z-index: 110; background: rgb(26 23 20 / .5); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.mzc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; }
@media (max-width: 600px) {
  .mzc #previewGate.mzc-gate { align-items: flex-end; padding: 0 !important; }
  .mzc-dialog-backdrop { align-items: flex-end; padding: 0; }
  .mzc-sheet { border-radius: var(--r-lg) var(--r-lg) 0 0; padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); max-height: 92svh; }
  .mzc-sheet .mzc-gate-btns, .mzc-row2 { grid-template-columns: 1fr; }
}

/* ───────── step 3a · render wait ───────── */
.mzc .loading.mzc-wait { text-align: left; padding: 0; }
.mzc-render-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.25rem, 2.4vw, 3.5rem); align-items: stretch; }
.mzc-render-stage { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--night); color: var(--on-night);
  min-height: max(30rem, calc(100svh - 15rem)); display: grid;   /* full height at every width (no 1100 px cap: 5120x2880) */
  /* the build is sized from BOTH axes: at most 60svh tall (--bw = its width at that height), and never wider than
     what the stage leaves after the >= 240px copy column, so tall/narrow viewports cannot push it over the copy */
  --bw: calc(min(60svh, 47.5rem) * .75); grid-template-columns: minmax(0, var(--bw)) minmax(15rem, 1fr);
  gap: clamp(1.25rem, 3vw, 4.5rem); align-items: center; padding: clamp(1.25rem, 3vw, 4.5rem); }
.mzc-render-stage:has(> .mzc-build.square) { --bw: min(60svh, 47.5rem); }
.mzc-render-stage:has(> .mzc-build.landscape) { --bw: calc(min(48svh, 37.5rem) * 4 / 3); }
.mzc-build { position: relative; width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: .125rem; overflow: hidden; box-shadow: 0 1.875rem 5rem rgb(0 0 0 / .5); background: #111; }
.mzc-build.square { aspect-ratio: 1; } .mzc-build.landscape { aspect-ratio: 4 / 3; }
.mzc-build > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(1rem) saturate(.75) brightness(.72); }
.mzc-build > img[src=""] { display: none; }
.mzc-build canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; clip-path: inset(0 0 calc(100% - var(--p)) 0); }
.mzc-grid { position: absolute; inset: 0; clip-path: inset(0 0 calc(100% - var(--p)) 0);
  background-image: linear-gradient(rgb(0 0 0 / .13) 1px, transparent 1px), linear-gradient(90deg, rgb(0 0 0 / .13) 1px, transparent 1px);
  background-size: calc(100% / var(--cols, 56)) calc(100% / var(--rows, 75)); }
.mzc-edge { position: absolute; left: 0; right: 0; top: var(--p); height: .125rem; background: var(--amber); box-shadow: 0 0 1.125rem var(--amber); }
.mzc-fly { position: absolute; top: calc(var(--p) - 3.2%); width: 6.6%; aspect-ratio: 1; background-size: cover; background-position: center; box-shadow: 0 .25rem .625rem rgb(0 0 0 / .5);
  border: 1px solid rgb(255 255 255 / .6); animation: mzc-fly 2.4s var(--ease) infinite; }
.mzc-build.is-done .mzc-fly, .mzc-build.is-done .mzc-edge { display: none; }
@keyframes mzc-fly { 0% { opacity: 0; transform: translateY(80%); } 30%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mzc-fly { display: none; } .mzc *, .mzc *::before { transition: none !important; } .mzc-spin { animation-duration: 2s; } }
.mzc-render-copy { display: grid; gap: 1.375rem; align-content: center; min-width: 0; }
.mzc-render-copy h2 { font-family: var(--font-display); font-weight: 500; line-height: 1.05; color: var(--on-night); font-size: clamp(1.9rem, 1.4rem + 1.6vw, 3.6rem); }
.mzc-render-copy h2:focus { outline: none; }
.mzc-rsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; font-size: var(--fs-base); color: var(--on-night-muted); }
.mzc-rsteps li { display: flex; gap: .75rem; align-items: center; }
.mzc-rsteps i { width: 1.375rem; height: 1.375rem; border-radius: 50%; border: .09375rem solid var(--night-line); flex: none; display: grid; place-items: center; font-style: normal; font-size: .75rem; }
.mzc-rsteps .ok { color: var(--on-night); } .mzc-rsteps .ok i { background: #3c8a5a; border-color: #3c8a5a; color: #fff; }
.mzc-rsteps .ok i::before { content: "✓"; }
.mzc-rsteps .now { color: var(--on-night); } .mzc-rsteps .now i { border-color: var(--amber); border-top-color: transparent; animation: mzc-spin .9s linear infinite; }
.mzc .mzc-rbar { height: .25rem; border-radius: .125rem; background: var(--night-line); overflow: hidden; margin: 0; max-width: none; }
.mzc .mzc-rbar .progress-fill { height: 100%; background: var(--amber); border-radius: .125rem; }
.mzc #mzSlowNote { color: var(--on-night-muted) !important; margin: 0 !important; max-width: none !important; }
.mzc-wait-panel { display: grid; gap: 1rem; align-content: start; }
.mzc-wait-panel h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-xl); line-height: 1.1; }
.mzc-mini-product { display: grid; grid-template-columns: clamp(6rem, 7vw, 8.75rem) 1fr; gap: 1rem; align-items: center; }
.mzc-give { display: grid; gap: .5rem; }
.mzc-give label { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; min-height: 3.5rem; padding: .5rem .875rem; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; background: var(--surface); }
.mzc-give label.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mzc-give input { accent-color: var(--ink); width: 1.125rem; height: 1.125rem; margin: 0; }
.mzc-give b { color: var(--ink); display: block; line-height: 1.3; } .mzc-give small { color: var(--subtle); font-size: .78125rem; display: block; }
.mzc-pr { font-weight: 600; color: var(--ink); white-space: nowrap; }
.mzc-email-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.mzc-keep { border-top: 1px solid var(--line); padding-top: .875rem; display: grid; gap: .625rem; font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 1023px) { .mzc-render-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .mzc-render-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; min-height: 0; padding: 1.25rem; gap: 1.125rem; }
  .mzc-build { height: auto; width: min(56vw, 14.375rem); }
  .mzc-build.landscape { width: min(80vw, 20rem); height: auto; }
  .mzc-render-copy { width: 100%; gap: .875rem; } .mzc-render-copy h2 { font-size: 1.75rem; }
  .mzc-rsteps { font-size: .9375rem; gap: .5rem; }
  .mzc-email-row { grid-template-columns: minmax(0, 1fr); }
  .mzc-wait-panel .mzc-give, .mzc-wait-panel .mzc-give + p, .mzc-wait-panel > h3 { display: none; }
}

/* ───────── wall visualisation (true scale, static/collage/rooms.json via mzFacts.wallPlacement) ───────── */
.mzc-wall { position: relative; overflow: hidden; background: var(--paper-3); }
.mzc-wall-room { display: block; width: 100%; height: 100%; object-fit: cover; }
.mzc-wall-print { position: absolute; box-shadow: 0 .5rem 1.125rem rgb(0 0 0 / .28), 0 .125rem .25rem rgb(0 0 0 / .2); background: #ddd; }
/* big wall: the print edge (thin dark frame) + a softer cast shadow, as in mockups/FINAL wall_1440 */
.mzc-wall-big .mzc-wall-print { box-shadow: 0 0 0 clamp(.125rem, .25vw, .375rem) #1f1a16, 0 .875rem 1.875rem rgb(0 0 0 / .28), 0 .1875rem .375rem rgb(0 0 0 / .18); }
.mzc-wall-print img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mzc-wall-print img:not([src]), .mzc-wall-print img[src=""] { visibility: hidden; }
.mzc-wall-mini { aspect-ratio: 4 / 3; border-radius: var(--r-xs); box-shadow: var(--sh-2); }

/* ───────── step 3b · reveal + purchase ───────── */
.mzc .result-container { text-align: left; }
.mzc-preview-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(23.75rem, 30vw, 36.25rem); gap: clamp(1rem, 1.8vw, 2.5rem); align-items: start; }
.mzc-stage { position: relative; border-radius: var(--r-lg); background: radial-gradient(120% 90% at 50% 40%, #2c2620 0%, var(--night) 70%); color: var(--on-night);
  height: max(30rem, calc(100svh - var(--sh-top, var(--header-h)) - var(--bar-h) - 3.5rem));   /* SPEC §5.5 full height, no cap */ display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.mzc-stage-top { display: flex; justify-content: space-between; align-items: center; gap: .625rem; padding: .875rem; }
.mzc-seg { display: inline-flex; background: rgb(255 255 255 / .08); border-radius: var(--r-pill); padding: .25rem; min-width: 0; }
.mzc-seg button { min-height: 2.75rem; padding: 0 1rem; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--on-night-muted); font: 600 var(--fs-sm)/1 var(--font-ui); cursor: pointer; white-space: nowrap; }
.mzc-seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.mzc-icon-btns { display: flex; gap: .375rem; }
.mzc-icon-btns button { width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: rgb(255 255 255 / .1); color: var(--on-night); cursor: pointer; display: grid; place-items: center; padding: 0; }
.mzc-icon-btns svg { width: 1.25rem; height: 1.25rem; }
.mzc-view { position: relative; min-height: 0; overflow: hidden; }
.mzc-art { position: absolute; inset: 0 clamp(.875rem, 2vw, 2.5rem); }
.mzc .mzc-viewer, .mzc #mosaicViewer { width: 100%; height: 100% !important; min-height: 0 !important; margin: 0 !important; border: 0 !important; background: transparent !important; border-radius: 0; }
.mzc #mosaicViewer .openseadragon-container > div:not(.openseadragon-canvas):not(.openseadragon-message) { display: none !important; }
.mzc #previewResult, .mzc #step3Card { scroll-margin-top: calc(var(--sh-top, var(--header-h)) + var(--bar-h) + .75rem); }
.mzc #mosaicViewer > img { position: absolute; inset: 0; margin: auto; max-width: 100% !important; max-height: 100%; width: auto; height: auto !important; object-fit: contain; }
.mzc-wall-big, .mzc-close { display: none; position: absolute; inset: 0 .875rem; border-radius: var(--r-md); }
.mzc-wall-big .mzc-wall-room { object-position: 50% 50%; }
.mzc-close { background-color: #111; background-repeat: no-repeat; background-position: 50% 40%; }
.mzc-stage[data-view="wall"] .mzc-art, .mzc-stage[data-view="close"] .mzc-art { visibility: hidden; }
.mzc-stage[data-view="wall"] .mzc-wall-big { display: block; }
.mzc-stage[data-view="close"] .mzc-close { display: block; }
.mzc-stage[data-view="wall"] [data-mzc-zoom="in"], .mzc-stage[data-view="wall"] [data-mzc-zoom="out"],
.mzc-stage[data-view="close"] [data-mzc-zoom="in"], .mzc-stage[data-view="close"] [data-mzc-zoom="out"] { visibility: hidden; }
.mzc-stage-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding: .875rem 1.125rem; font-size: var(--fs-xs); color: var(--on-night-muted); }
.mzc-chips { display: flex; flex-wrap: wrap; gap: .375rem; }
.mzc-chips .chip:empty { display: none; }
.mzc-wall-sizes { display: none; gap: .375rem; }
.mzc-stage[data-view="wall"] .mzc-wall-sizes { display: inline-flex; }
.mzc-wall-sizes button { min-height: var(--tap); padding: 0 .75rem; border-radius: var(--r-pill); border: 1px solid var(--night-line); background: transparent; color: var(--on-night); font: 600 .8125rem/1 var(--font-ui); cursor: pointer; }
.mzc-wall-sizes button[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.mzc-buy { position: sticky; top: calc(var(--sh-top, var(--header-h)) + var(--bar-h) + 1rem); display: grid; gap: .875rem; margin: 0; }
.mzc .product-panel { padding: clamp(1.125rem, 1.6vw, 2rem); margin-top: 0; }
.mzc-buy h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-xl); line-height: 1.1; margin-top: .375rem; }
.mzc-buy h2:focus { outline: none; }
.mzc-after-note { padding: .75rem .875rem; border-radius: var(--r-md); background: var(--warn-bg); font-size: var(--fs-sm); }
.mzc-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--paper-2); border-radius: var(--r-md); padding: .25rem; gap: .25rem; }
.mzc-tabs button { min-height: var(--tap); border-radius: .625rem; border: 0; background: transparent; font: 600 var(--fs-sm)/1.15 var(--font-ui); cursor: pointer; color: var(--muted); padding: .25rem .375rem; }
.mzc-tabs button small { display: block; font-weight: 500; font-size: .71875rem; color: var(--subtle); }
.mzc-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.mzc-pane { display: grid; gap: .75rem; }
.mzc .mzc-fins { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .375rem; }
.mzc .mzc-fin { display: grid; gap: .375rem; justify-items: center; align-content: start; padding: .5rem .25rem .375rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; font: 600 .75rem/1.2 var(--font-ui); color: var(--text); text-align: center; min-height: var(--tap); }
.mzc .mzc-fin:hover { background: var(--paper-2); }
.mzc .mzc-fin small { font-weight: 500; color: var(--subtle); font-size: .71875rem; min-height: 1.2em; }
.mzc .mzc-fin[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.mzc-fin-art { display: block; width: 78%; aspect-ratio: 3 / 4; position: relative; background: var(--paper-3); }
.mzc.aspect-square .mzc-fin-art { aspect-ratio: 1; } .mzc.aspect-landscape .mzc-fin-art { aspect-ratio: 4 / 3; }
.mzc-fin-art img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.mzc-fin-art img[src=""], .mzc-fin-art img:not([src]) { visibility: hidden; }
.mzc-fin-print .mzc-fin-art { box-shadow: 0 0 0 .1875rem #fff, 0 .125rem .375rem rgb(0 0 0 / .25); }
.mzc-fin-canvas .mzc-fin-art { box-shadow: .1875rem .1875rem 0 #6d5a46, 0 .25rem .5rem rgb(0 0 0 / .3); }
.mzc-fin-aluminum .mzc-fin-art { box-shadow: 0 0 0 1px #c9cdd1, 0 .125rem .375rem rgb(0 0 0 / .25); }
.mzc-fin-acrylic .mzc-fin-art { box-shadow: 0 0 0 .125rem rgb(255 255 255 / .7), 0 .25rem .625rem rgb(0 0 0 / .3); }
.mzc-fin-acrylic .mzc-fin-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(130deg, rgb(255 255 255 / .45) 0 18%, transparent 40%); }
.mzc-fin-framed .mzc-fin-art { box-shadow: 0 0 0 .25rem #f7f5f0, 0 0 0 .5rem #2b2520, 0 .1875rem .5rem rgb(0 0 0 / .35); width: 62%; margin: .375rem 0; }
.mzc-mat-desc { font-size: var(--fs-sm); color: var(--muted); }
.mzc-sizes { display: grid; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.mzc-size { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .75rem; align-items: center; min-height: 3rem; padding: .25rem .875rem; border-top: 1px solid var(--line); cursor: pointer; background: var(--surface); }
.mzc-size:first-child { border-top: 0; }
.mzc-size input { accent-color: var(--ink); width: 1.125rem; height: 1.125rem; margin: 0; }
.mzc-size .mzc-s { font-weight: 600; color: var(--ink); white-space: nowrap; }
.mzc-size .mzc-tc { font-size: .78125rem; color: var(--subtle); white-space: nowrap; }
.mzc-size .mzc-price { font-weight: 600; color: var(--ink); }
.mzc-size.sel { background: var(--umber-wash); }
/* keyboard focus marks the whole row (inset: .mzc-sizes clips outer shadows) */
.mzc-size:has(input:focus-visible) { box-shadow: inset 0 0 0 .125rem var(--ink); }
.mzc-size .mzc-tag { display: block; font-size: .65625rem; font-weight: 700; color: var(--umber); line-height: 1.2; text-transform: uppercase; letter-spacing: .06em; }
.mzc-tiers { display: grid; gap: .5rem; }
.mzc-tier { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .75rem .875rem; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; background: var(--surface); }
.mzc-tier.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mzc-tier input { accent-color: var(--ink); width: 1.125rem; height: 1.125rem; margin: 0; }
.mzc-tier b { color: var(--ink); display: block; } .mzc-tier small { color: var(--subtle); font-size: .78125rem; display: block; }
.mzc-tier .mzc-price { font-weight: 700; color: var(--ink); white-space: nowrap; }
.mzc-denoms { display: flex; flex-wrap: wrap; gap: .5rem; }
.mzc-denoms button { min-height: var(--tap); padding: 0 1rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); font: 600 var(--fs-sm)/1 var(--font-ui); cursor: pointer; color: var(--ink); }
.mzc-denoms button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mzc-cta-row { display: grid; gap: .5rem; }
.mzc-gift-line { font-size: var(--fs-sm); color: var(--muted); display: flex; gap: .5rem; align-items: flex-start; }
.mzc-gift-line svg { width: 1.125rem; height: 1.125rem; flex: none; margin-top: .125rem; color: var(--umber); }
.mzc-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: var(--fs-sm); }
.mzc #lowTileNudge, .mzc #mzMakeItYours { margin: 0 0 .875rem !important; border-radius: var(--r-md) !important; background: var(--warn-bg) !important; border: 1px solid #efd9b6 !important; text-align: left !important; }
.mzc #mzMakeItYours h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-xl); }
.mzc #mzMakeItYours #mzMineBuy { min-height: var(--tap); color: var(--umber) !important; font-weight: 600; }
.mzc #finishIntentChip { width: var(--content-w); margin: .75rem auto !important; justify-content: flex-start !important; }
.mzc #finishIntentChip button { min-width: var(--tap); min-height: var(--tap); }
@media (max-width: 1023px) {
  .mzc-preview-grid { grid-template-columns: minmax(0, 1fr); }
  .mzc-stage { height: auto; grid-template-rows: auto auto auto; }
  .mzc-view { height: min(72svh, 132vw); }
  .mzc-stage[data-view="wall"] .mzc-view { height: auto; aspect-ratio: 4 / 3; }
  .mzc-stage.aspect-landscape .mzc-view, .mzc.aspect-landscape .mzc-stage[data-view="mosaic"] .mzc-view { height: min(60svh, 80vw); }
  .mzc-buy { position: static; }
  .mzc-buy .mzc-cta-row > .mzc-buy-btn { display: none !important; }   /* the sticky bar carries the live price + Add to cart */
}
@media (max-width: 600px) {
  .mzc-preview-grid.mzc-wrap { width: 100%; }
  .mzc-stage { border-radius: 0; }
  .mzc-stage-top { padding: .625rem .75rem; }
  .mzc-seg { flex: 1; } .mzc-seg button { flex: 1; padding: 0 .5rem; }
  .mzc-art { inset: 0 .5rem; }
  .mzc-stage-foot { padding: .75rem; }
  .mzc-buy { width: var(--content-w); margin: 0 auto; border-radius: var(--r-md); }
  .mzc .mzc-fins { gap: .25rem; } .mzc .mzc-fin { font-size: .6875rem; padding: .375rem .125rem; } .mzc .mzc-fin small { display: none; }
  .mzc-size .mzc-tc { display: none; }
}

/* ───────── phone bottom bars (opaque; nothing ghosts through) ───────── */
.mzc .bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--paper); border-top: 1px solid var(--line-strong);
  box-shadow: 0 -.375rem 1.5rem rgb(26 23 20 / .08); padding: .625rem var(--gutter) calc(.625rem + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .25s var(--ease); visibility: hidden; }
.mzc .bottom-bar.show { transform: none; visibility: visible; }
.mzc .bottom-bar .row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; max-width: var(--content-w); margin: 0 auto; }
@media (min-width: 1024px) { .mzc .mzc-stepbar { display: none; } }
.mzc-what { font-size: .8125rem; line-height: 1.3; color: var(--muted); min-width: 0; }
.mzc-what b { display: block; color: var(--ink); font-size: .9375rem; }
.mzc-what .mini { display: block; height: .25rem; width: 7.5rem; border-radius: .125rem; background: var(--paper-3); margin-top: .375rem; overflow: hidden; }
.mzc-what .mini i { display: block; height: 100%; background: linear-gradient(90deg, var(--umber), var(--amber)); }
.mzc-giveq { display: none; }
.mzc-stepbar.giving .row { display: none; }
.mzc-stepbar.giving .mzc-giveq { display: grid; gap: .5rem; }
.mzc-giveq-lbl { font-size: .8125rem; color: var(--muted); display: flex; justify-content: space-between; } .mzc-giveq-lbl b { color: var(--ink); }
.mzc-giveq-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .375rem; }
.mzc-giveq-opts button { min-height: 3rem; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); font: 600 .8125rem/1.2 var(--font-ui); cursor: pointer; color: var(--ink); }
.mzc-giveq-opts button small { display: block; font-weight: 500; color: var(--subtle); font-size: .75rem; }
.mzc-giveq-opts button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mzc-giveq-opts button[aria-pressed="true"] small { color: var(--on-night-muted); }
/* phones: room for the fixed bar at the end of the page */
@media (max-width: 1023px) { body.mz-studio { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); } }
