:root {
  /* Decorators United brand defaults (decoratorsunited.com). SITE.theme in
     js/config.js can override these, but the page looks right even before
     (or without) JavaScript. */
  /* Foundation 50% charcoal black · Structure 20% stark white ·
     Edge 20% Dakar yellow (Pantone 602 C) · Complement 10% deep violet */
  --bg: #141414;
  --bg-2: #1b1b1b;
  --card: #1d1d1f;
  --card-2: #26262a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: #a6a6a6;
  --accent: #f0e87b;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-2: #f7f2b4;
  --on-accent: #170d26;
  --violet: #170d26;
  --ok: #3ddc97;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Oswald', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

/* Light UI (SITE.theme.mode = 'light'). Brand colors come from SITE.theme. */
:root[data-ui='light'] {
  --bg: #f6f5f2;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-2: #f1efea;
  --line: rgba(20, 18, 14, 0.08);
  --line-2: rgba(20, 18, 14, 0.15);
  --text: #17181b;
  --muted: #6a6c73;
  --tint: rgba(20, 18, 14, 0.025);
  --topbar-bg: rgba(255, 255, 255, 0.8);
  --danger: #c2401f;
  color-scheme: light;
}
:root[data-ui='light'] .card { background: var(--card); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
:root[data-ui='light'] .modal-card { box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.35); }
:root[data-ui='light'] .stage { box-shadow: 0 0 0 1px var(--line), 0 30px 60px -36px rgba(0, 0, 0, 0.35); }
:root[data-ui='light'] .art-thumb { background: repeating-conic-gradient(#e6e4df 0 25%, #f4f3ef 0 50%) 0 0 / 12px 12px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 75% -10%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, color-mix(in srgb, var(--accent-2) 5%, transparent), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------- Top bar ---------------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 14px clamp(16px, 3vw, 36px);
  background: var(--topbar-bg);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; font-size: 17px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: var(--on-accent); box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
.brand-mark svg { width: 22px; height: 22px; }
.topnav { display: flex; gap: 4px; margin-left: 8px; }
.topnav a { text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 999px; font-size: 14px; transition: color 0.2s, background 0.2s; }
.topnav a:hover { color: var(--text); background: var(--line); }
.topnav a[aria-current='page'] { color: var(--text); background: var(--line); }
.pill { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.15); }

/* ---------------- Studio layout ---------------- */
.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: clamp(16px, 2vw, 28px);
  padding: clamp(16px, 2.4vw, 32px) clamp(16px, 3vw, 36px) 48px;
  max-width: 1480px;
  margin: 0 auto;
  align-items: start;
}
.stage-col { position: sticky; top: 78px; min-width: 0; }

.stage-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.2vw, 40px); letter-spacing: -0.03em; line-height: 1.05; }
h1 span { color: var(--muted); font-weight: 500; }
.stage-tools { display: flex; align-items: center; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.stage-tools .sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 2px; }

.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; transition: background 0.2s, transform 0.2s var(--spring), opacity 0.2s; }
.icon-btn:hover:not(:disabled) { background: var(--line-2); }
.icon-btn:active:not(:disabled) { transform: scale(0.92); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }

/* ---------------- Stage ---------------- */
.stage {
  --bg-a: #fbfaf7; --bg-b: #e6e3dd; --bg-c: #cfcbc3;
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  height: min(calc(100vh - 330px), 780px);
  min-height: 440px;
  display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 30%, var(--bg-a) 0%, var(--bg-b) 55%, var(--bg-c) 100%);
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  transition: background 0.6s var(--ease);
  touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.stage[data-bg='dark'] { --bg-a: #3a3b40; --bg-b: #1d1e22; --bg-c: #111215; }
.stage-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px 400px at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.55), transparent 70%); opacity: 0.55; transition: opacity 0.4s; mix-blend-mode: soft-light; }
.stage[data-bg='dark'] .stage-glow { opacity: 0.35; mix-blend-mode: screen; background: radial-gradient(600px 400px at var(--mx, 50%) var(--my, 30%), rgba(255, 140, 90, 0.18), transparent 70%); }

.tilt-host { position: relative; height: 94%; aspect-ratio: 4 / 5; max-width: 94%; perspective: 1400px; }
.tilt { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
#canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity 0.35s var(--ease), transform 0.5s var(--ease), filter 0.35s; }
#canvas.swap { opacity: 0; transform: translateX(var(--swap-x, 18px)) scale(0.985); filter: blur(4px); }
.stage[data-has-art='true'] #canvas { cursor: default; }
.stage.over-deco #canvas { cursor: grab; }
.stage.dragging #canvas { cursor: grabbing; }

.floor-shadow { position: absolute; left: 12%; right: 12%; bottom: 13%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.32), transparent); filter: blur(10px); transform: translate(calc(var(--tx, 0) * -14px), 0) scaleX(calc(1 + var(--ty, 0) * 0.04)); pointer-events: none; }
.stage[data-view='side'] .floor-shadow { bottom: 27%; }
.stage[data-view='back'] .floor-shadow { bottom: 18%; }
.stage[data-bg='dark'] .floor-shadow { background: radial-gradient(closest-side, rgba(0, 0, 0, 0.7), transparent); }

.glare {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 25%), rgba(255, 255, 255, 0.16), var(--tint) 28%, transparent 52%);
  mix-blend-mode: screen;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  opacity: 0; transition: opacity 0.5s;
}
.stage.hovering .glare { opacity: 1; }

.guide { position: absolute; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.guide.on { opacity: 1; }
.guide-v { left: 50%; top: 18%; bottom: 30%; width: 0; border-left: 1px dashed var(--accent); }
.guide-h { left: 14%; right: 14%; height: 0; border-top: 1px dashed var(--accent); }

/* Selection */
.sel { position: absolute; border: 1.5px solid var(--accent); border-radius: 6px; pointer-events: none; box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0); transition: opacity 0.2s; }
.stage:not(.show-sel) .sel { opacity: 0; }
.stage:not(.show-sel) .sel .h, .stage:not(.show-sel) .sel .h-rot { pointer-events: none; }
.sel .h { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); pointer-events: auto; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: transform 0.2s var(--spring); }
.sel .h:hover { transform: scale(1.3); }
.h-nw { left: -8px; top: -8px; cursor: nwse-resize; }
.h-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.h-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.h-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.h-rot { position: absolute; left: 50%; top: -40px; width: 28px; height: 28px; margin-left: -14px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #111; pointer-events: auto; cursor: grab; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); transition: transform 0.2s var(--spring); }
.h-rot:hover { transform: scale(1.12) rotate(-20deg); }
.h-rot svg { width: 15px; height: 15px; stroke-width: 2.2; }
.h-rot::after { content: ''; position: absolute; left: 50%; top: 28px; height: 12px; border-left: 1.5px solid var(--accent); }
.sel-size { position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%); white-space: nowrap; font: 600 11.5px/1 var(--font); letter-spacing: 0.02em; color: #fff; background: rgba(17, 17, 19, 0.88); padding: 6px 9px; border-radius: 999px; backdrop-filter: blur(6px); font-variant-numeric: tabular-nums; }

/* Empty state */
.ghost-drop {
  position: absolute; left: 31%; top: 34.5%; width: 38%; height: 23%;
  border: 0; background: transparent; cursor: pointer; padding: 0;
  display: grid; place-items: center;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.ghost-ring { position: absolute; inset: 0; border-radius: 16px; border: 1.5px dashed rgba(255, 255, 255, 0.55); background: var(--tint); animation: breathe 2.6s var(--ease) infinite; }
.ghost-drop:hover .ghost-ring { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ghost-label { position: relative; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, 0.1); padding: 8px 12px; border-radius: 999px; backdrop-filter: blur(6px); }
.ghost-drop.gone { opacity: 0; transform: scale(0.94); pointer-events: none; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.035); opacity: 1; } }

.drop-veil { position: absolute; inset: 10px; border-radius: 22px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity 0.2s; backdrop-filter: blur(2px); }
.drop-veil div { text-align: center; background: rgba(12, 12, 14, 0.85); padding: 14px 20px; border-radius: 14px; display: grid; gap: 2px; }
.drop-veil span { color: var(--muted); font-size: 12.5px; }
.stage.drop-active .drop-veil { opacity: 1; }

.loader { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; transition: opacity 0.4s; }
.loader span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(0, 0, 0, 0.12); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.stage.ready .loader { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Stage foot */
.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.views { display: flex; gap: 10px; }
.view-tab { position: relative; display: grid; justify-items: center; gap: 6px; padding: 6px 6px 8px; border: 1px solid var(--line); background: var(--card); border-radius: 14px; cursor: pointer; transition: border-color 0.25s, transform 0.25s var(--spring), background 0.25s; }
.view-tab:hover { transform: translateY(-2px); border-color: var(--line-2); }
.view-tab[aria-selected='true'] { border-color: var(--accent); background: var(--card-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.view-tab canvas { width: 64px; height: 80px; border-radius: 9px; background: radial-gradient(120% 90% at 50% 30%, #f6f5f1, #d9d6cf); }
.view-tab span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.view-tab[aria-selected='true'] span { color: var(--text); }
.view-tab .badge { position: absolute; top: 3px; right: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card); transform: scale(0); transition: transform 0.3s var(--spring); }
.view-tab.has-art .badge { transform: scale(1); }
.hint { margin: 0; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: flex-end; }
kbd { font: 600 11px/1 var(--font); color: var(--text); background: var(--card-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; margin-right: 2px; }

/* ---------------- Panel ---------------- */
.panel { display: grid; gap: 12px; }
.card { background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-head h2 { margin: 0; white-space: nowrap; font: 700 15px/1 var(--display); letter-spacing: -0.01em; }
.num { font: 600 11px/1 var(--font); color: var(--accent); background: var(--accent-soft); padding: 4px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 500; }
.label-row output { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; font-size: 12.5px; }

.product { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--tint); border: 1px solid var(--line); }
.product > div:last-child { display: grid; gap: 2px; font-size: 14px; }
.product .muted { font-size: 12px; line-height: 1.35; }
.product-thumb { width: 56px; height: 64px; border-radius: 10px; background: radial-gradient(120% 90% at 50% 30%, #f6f5f1, #d9d6cf); display: grid; place-items: center; overflow: hidden; flex: none; }
.product-thumb img { width: 64px; height: auto; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: linear-gradient(135deg, var(--a) 0 50%, var(--b) 50% 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); transition: transform 0.25s var(--spring); }
.swatch::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; transition: border-color 0.2s; }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-checked='true']::after { border-color: var(--accent); }
.swatch.soon { opacity: 0.4; }
.swatch.soon::before { content: ''; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='3'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / 8px no-repeat; }
.swatches.small .swatch { width: 26px; height: 26px; }

.dropzone { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: var(--tint); cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease); }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:active { transform: scale(0.99); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dz-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
.dz-text { display: grid; gap: 2px; }
.dz-text strong { font-size: 14px; }
.dz-text span { font-size: 12px; color: var(--muted); }
.has-art .dropzone { display: none; }

.art-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--tint); animation: rise 0.4s var(--ease); }
.art-thumb { width: 56px; height: 56px; border-radius: 10px; flex: none; overflow: hidden; background: repeating-conic-gradient(#2a2b30 0 25%, #212227 0 50%) 0 0 / 12px 12px; }
.art-thumb canvas { width: 100%; height: 100%; display: block; }
.art-meta { display: grid; min-width: 0; flex: 1; font-size: 13.5px; }
.art-meta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-meta .muted { font-size: 12px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.link-btn { justify-self: start; background: none; border: 0; padding: 0; color: var(--muted); font-size: 12.5px; cursor: pointer; transition: color 0.2s; }
.link-btn:hover { color: var(--accent); }
.has-art #sampleBtn { display: none; }

.switch { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.track { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background 0.25s; flex: none; }
.knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.3s var(--spring); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track .knob { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.style-btn { text-align: left; display: grid; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--tint); cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--spring); }
.style-btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.style-btn[aria-checked='true'] { border-color: var(--accent); background: var(--accent-soft); }
.style-btn .ico { width: 34px; height: 34px; border-radius: 10px; display: block; }
.style-btn strong { font-size: 13.5px; display: block; }
.style-btn small { font-size: 11.5px; color: var(--muted); line-height: 1.3; display: block; }
.ico-embroidery { background: repeating-linear-gradient(45deg, #e7e3da 0 2px, #b8b2a5 2px 4px); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.25), inset 2px 2px 0 rgba(255, 255, 255, 0.35); }
.ico-leather { background: radial-gradient(circle at 30% 25%, #d5a678, #8e5f39); box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5); }
.ico-woven { background: #f1ede4; box-shadow: inset 0 0 0 3px #1b1b1b, inset 0 0 0 5px #f1ede4, inset 0 0 0 30px var(--accent); }
.ico-print { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.sub { display: grid; gap: 10px; padding-top: 4px; animation: rise 0.35s var(--ease); }
.shapes { display: flex; gap: 8px; }
.shape-btn { width: 44px; height: 40px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--line); background: var(--tint); cursor: pointer; transition: all 0.2s var(--ease); color: var(--muted); }
.shape-btn:hover { color: var(--text); border-color: var(--line-2); }
.shape-btn[aria-checked='true'] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.shape-btn svg { width: 22px; height: 22px; }

.chips { margin-left: auto; display: flex; gap: 4px; }
.chip { font-size: 11.5px; font-weight: 600; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: all 0.2s; display: inline-flex; gap: 5px; align-items: center; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: background 0.2s; }
.chip[aria-pressed='true'] { color: var(--text); border-color: var(--line-2); }
.chip[aria-pressed='true']::before { background: var(--accent); }
.chip.current { box-shadow: 0 0 0 1px var(--line-2) inset; color: var(--text); }

.control { display: grid; gap: 8px; }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; --p: 50%; }
input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p), var(--line-2) var(--p)); }
input[type='range']::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p), var(--line-2) var(--p)); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px var(--accent-soft), 0 2px 6px rgba(0, 0, 0, 0.4); transition: transform 0.2s var(--spring), box-shadow 0.2s; }
input[type='range']::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px var(--accent-soft), 0 2px 6px rgba(0, 0, 0, 0.4); }
input[type='range']:hover::-webkit-slider-thumb { transform: scale(1.15); box-shadow: 0 0 0 6px var(--accent-soft), 0 2px 6px rgba(0, 0, 0, 0.4); }
input[type='range']:disabled { opacity: 0.35; cursor: default; }

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-weight: 600; font-size: 13.5px; transition: background 0.2s, transform 0.2s var(--spring), box-shadow 0.25s, opacity 0.2s; }
.btn:hover:not(:disabled) { background: var(--line); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.primary { height: 50px; border: 0; color: var(--on-accent); background: linear-gradient(140deg, var(--accent), var(--accent-2)); box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--accent) 80%, transparent); font-size: 14.5px; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn.wide { width: 100%; }
.fine { margin: 0; text-align: center; font-size: 11.5px; color: var(--muted); }

/* ---------------- Content ---------------- */
.content { padding: 72px clamp(16px, 3vw, 36px); border-top: 1px solid var(--line); }
.content.alt { background: var(--bg-2); }
.content-inner { max-width: 960px; margin: 0 auto; }
.content h2 { margin: 0 0 28px; font: 800 clamp(24px, 3vw, 34px)/1.1 var(--display); letter-spacing: -0.025em; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.steps li { display: grid; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.steps li > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.steps h3 { margin: 0 0 6px; font: 700 16px/1.2 var(--display); }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent); font-size: 20px; line-height: 1; transition: transform 0.3s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; color: var(--muted); max-width: 70ch; }
.foot { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding: 24px clamp(16px, 3vw, 36px); border-top: 1px solid var(--line); font-size: 12.5px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #f3f2ee; color: #111; padding: 11px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 500; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6); transition: opacity 0.3s var(--ease), transform 0.4s var(--spring); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { text-align: center; padding: 20px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .studio { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 900px) {
  .studio { grid-template-columns: 1fr; }
  .stage-col { position: relative; top: 0; }
  .stage { height: auto; aspect-ratio: 4 / 4.4; min-height: 0; border-radius: 22px; }
  .topnav { display: none; }
  .panel { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 560px) {
  .pill { display: none; }
  .stage-head { align-items: center; }
  .stage-foot { flex-direction: column; align-items: stretch; }
  .views { justify-content: center; }
  .hint { justify-content: center; }
  .panel { grid-template-columns: 1fr; }
  .h-rot { top: -46px; width: 34px; height: 34px; margin-left: -17px; }
  .sel .h { width: 20px; height: 20px; }
  .h-nw { left: -11px; top: -11px; } .h-se { right: -11px; bottom: -11px; }
  .h-ne { right: -11px; top: -11px; } .h-sw { left: -11px; bottom: -11px; }
}
@media (hover: none) {
  .hint .desk { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------- v2: toolbar, zoom, colors ---------------- */
.zoom-out { min-width: 44px; text-align: center; font: 600 12px/1 var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.tool-cta { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; margin-left: 2px; border: 0; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--on-accent); background: linear-gradient(140deg, var(--accent), var(--accent-2)); transition: transform 0.2s var(--spring), box-shadow 0.25s; }
.tool-cta:hover { box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.tool-cta:active { transform: scale(0.95); }
.tool-cta svg { width: 14px; height: 14px; stroke: none; }
.tilt-host { transition: transform 0.55s var(--ease); transform-origin: var(--zx, 50%) var(--zy, 46%); }

.swatch.custom { background: conic-gradient(from 200deg, #e2582a, #f0c043, #5d8a4a, #2d5f8f, #7a4a9a, #e2582a); }
.custom-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; animation: rise 0.35s var(--ease); }
.custom-colors label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--tint); font-size: 12.5px; cursor: pointer; }
.custom-colors input[type='color'] { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; flex: none; }
.custom-colors input[type='color']::-webkit-color-swatch-wrapper { padding: 0; }
.custom-colors input[type='color']::-webkit-color-swatch { border: 1px solid var(--line-2); border-radius: 8px; }
.custom-colors input[type='color']::-moz-color-swatch { border: 1px solid var(--line-2); border-radius: 8px; }

.styles { grid-template-columns: 1fr 1fr; }
.ico-puff { background: radial-gradient(circle at 35% 30%, #fff 0 8%, transparent 9%), repeating-linear-gradient(80deg, #f2f0ea 0 2px, #c9c4b8 2px 4px); border-radius: 12px; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.3), inset 3px 3px 0 rgba(255, 255, 255, 0.5); }
.ico-pvc { background: linear-gradient(150deg, #3e4a3a, #1d241c); box-shadow: inset 0 0 0 3px #59684f, inset 2px 2px 0 4px rgba(255, 255, 255, 0.25); }
.switch.sub { padding-top: 2px; }

.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-grid .span2 { grid-column: span 2; }

/* ---------------- Modals ---------------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px 16px; background: rgba(5, 5, 7, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade 0.25s var(--ease); }
.modal-card { width: min(760px, 100%); max-height: calc(100vh - 48px); overflow: auto; display: grid; gap: 14px; padding: 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9); animation: pop 0.4s var(--spring); }
.modal-card.wide { width: min(1180px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h2 { margin: 0; font: 800 22px/1.15 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.modal-actions { display: flex; gap: 8px; align-items: center; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.modal-foot .btn.primary { height: 46px; padding: 0 20px; text-decoration: none; }
.export-preview { border-radius: 14px; overflow: hidden; background: repeating-conic-gradient(#202126 0 25%, #1a1b1f 0 50%) 0 0 / 18px 18px; display: grid; place-items: center; max-height: 62vh; }
.export-preview img { max-width: 100%; max-height: 62vh; display: block; object-fit: contain; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } }

.lineup { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.lineup-tile { position: relative; display: grid; gap: 8px; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; text-align: left; transition: transform 0.25s var(--spring), border-color 0.2s; }
.lineup-tile:hover { transform: translateY(-3px); border-color: var(--line-2); }
.lineup-tile[aria-current='true'] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lineup-tile canvas { width: 100%; aspect-ratio: 4 / 5; height: auto; border-radius: 11px; background: radial-gradient(120% 90% at 50% 30%, #fbfaf7, #e6e3dd 55%, #cfcbc3); }
.lineup-tile canvas.pending { animation: shimmer 1.2s ease-in-out infinite; }
.lineup-tile strong { font-size: 13px; padding: 0 4px 2px; }
@keyframes shimmer { 50% { opacity: 0.55; } }

/* ---------------- Presentation mode ---------------- */
.present-bar { position: absolute; left: 0; right: 0; bottom: 0; display: none; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 28px clamp(16px, 4vw, 48px) calc(28px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); color: #fff; pointer-events: none; }
.pb-meta { display: grid; gap: 4px; }
.pb-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); }
.pb-meta strong { font: 800 clamp(26px, 4vw, 48px)/1 var(--display); letter-spacing: -0.03em; }
.pb-meta span:last-child { color: rgba(255, 255, 255, 0.72); font-size: 15px; }
.pb-ctrl { display: flex; gap: 6px; pointer-events: auto; background: rgba(20, 20, 24, 0.6); border: 1px solid rgba(255, 255, 255, 0.12); padding: 5px; border-radius: 14px; backdrop-filter: blur(10px); }
.pb-ctrl .icon-btn { color: #fff; }
.pb-dots { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 6px; }
.pb-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); transition: all 0.3s var(--ease); }
.pb-dots i.on { width: 22px; border-radius: 4px; background: #fff; }

body.presenting { overflow: hidden; }
body.presenting .stage { position: fixed; inset: 0; z-index: 70; height: auto; min-height: 0; aspect-ratio: auto; border-radius: 0; }
body.presenting .present-bar { display: flex; }
body.presenting .sel, body.presenting .ghost-drop, body.presenting .guide { display: none; }
body.presenting .tilt-host { height: 82%; }
body.presenting #canvas { transition-duration: 0.6s; }

@media (max-width: 560px) {
  .stage-tools { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 2px; }
  .stage-tools .sep { display: none; }
  .zoom-out { display: none; }
  .stage-head { flex-direction: column; align-items: flex-start; }
  .pb-meta strong { font-size: 26px; }
  .present-bar { flex-direction: column; align-items: flex-start; }
  .lineup { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- v3: product picker ---------------- */
.products { display: grid; gap: 8px; }
.product-card { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--tint); cursor: pointer; text-align: left; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--spring); }
.product-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.product-card[aria-checked='true'] { border-color: var(--accent); background: var(--accent-soft); }
.product-card .product-thumb { width: 52px; height: 58px; }
.product-card .product-thumb img { width: 62px; }
.product-card .product-thumb svg { width: 34px; height: 30px; color: #8d8a83; stroke-width: 2.4; }
.product-text { display: grid; gap: 1px; min-width: 0; }
.product-text strong { font-size: 13.5px; }
.product-text .muted { font-size: 12px; }
.product-text em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent-2); }
.product-card.pending { opacity: 0.7; }
.fine.left { text-align: left; }
.loop-note { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--text); }

/* ---------------- v4: UI review fixes ---------------- */
.switch.sub { display: flex; }
.style-btn { align-content: start; grid-template-rows: auto 1fr; }
.swatches { gap: 9px; }
.swatch { width: 30px; height: 30px; }
.card-head { flex-wrap: wrap; row-gap: 8px; }
.stage-foot { min-height: 104px; }

/* ---------------- v4: account + plan chrome ---------------- */
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13.5px; cursor: pointer; transition: color 0.2s, background 0.2s; }
.top-btn:hover { color: var(--text); background: var(--line); }
.top-btn svg { width: 16px; height: 16px; }
.plan-chip { height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: 600 12.5px/1 var(--font); cursor: pointer; }
.plan-chip[data-plan='pro'], .plan-chip[data-plan='team'] { border-color: transparent; color: var(--on-accent); background: linear-gradient(140deg, var(--accent), var(--accent-2)); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }

[data-feature].locked { position: relative; }
[data-feature].locked:not(.swatch)::after { content: 'PRO'; position: absolute; top: -7px; right: -6px; padding: 2px 5px; border-radius: 5px; font: 700 9.5px/1.2 var(--font); letter-spacing: 0.06em; color: var(--on-accent); background: linear-gradient(140deg, var(--accent), var(--accent-2)); pointer-events: none; }
.swatch.locked::before { content: 'PRO'; position: absolute; top: -7px; right: -12px; z-index: 1; padding: 2px 4px; border-radius: 5px; font: 700 8.5px/1.2 var(--font); letter-spacing: 0.05em; color: var(--on-accent); background: linear-gradient(140deg, var(--accent), var(--accent-2)); pointer-events: none; }
.pro-tag { display: inline-block; vertical-align: middle; padding: 2px 6px; border-radius: 5px; font: 700 10px/1.2 var(--font); color: var(--on-accent); background: linear-gradient(140deg, var(--accent), var(--accent-2)); }

.quote-btn { height: 46px; border: 0; color: var(--text); background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent-2) 16%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.quote-btn:hover:not(:disabled) { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 30%, transparent), color-mix(in srgb, var(--accent-2) 22%, transparent)); }

.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); justify-self: start; }
.seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 600 12.5px/1 var(--font); cursor: pointer; transition: all 0.2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed='true'] { background: var(--card-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
.export-preview.checker { background: repeating-conic-gradient(#d9d9d9 0 25%, #f4f4f4 0 50%) 0 0 / 18px 18px; }

/* plans (pricing section + upgrade dialog) */
.content-inner.wide { max-width: 1160px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.plan { display: grid; gap: 12px; align-content: start; padding: 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 30px 60px -30px color-mix(in srgb, var(--accent) 45%, transparent); }
.plan header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan h3 { margin: 0; font: 800 20px/1 var(--display); }
.plan .tag { font: 700 11px/1 var(--font); padding: 5px 8px; border-radius: 999px; color: var(--on-accent); background: linear-gradient(140deg, var(--accent), var(--accent-2)); }
.plan .price { margin: 0; }
.plan .price strong { font: 800 40px/1 var(--display); letter-spacing: -0.03em; }
.plan .price span { color: var(--muted); }
.plan p.muted { margin: 0; font-size: 14px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li svg { width: 16px; height: 16px; color: var(--ok); margin-top: 2px; }
.plan .btn { width: 100%; text-decoration: none; }
.modal .plans { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.license-form { display: grid; gap: 8px; padding-top: 4px; }
.license-form label, .brand-fields > label:not(.switch), .quote label { font-size: 13px; font-weight: 600; color: var(--muted); }
.license-form .row, .save-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input:not([type]), input[type='text'], input[type='email'], input[type='tel'], input[type='number'], input[type='date'], textarea {
  font: 500 14px/1.4 var(--font); color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; min-width: 0; transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled { opacity: 0.5; }
.license-form .row input { flex: 1 1 220px; }
.form-msg { margin: 0; min-height: 1.2em; font-size: 13px; color: var(--muted); }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--danger); }
.small { font-size: 12px; }

.acct-block { display: grid; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); }
.acct-block h3 { margin: 0; font: 700 16px/1.2 var(--display); }
.acct-block p { margin: 0; }
.acct-block code { font-size: 12.5px; padding: 2px 6px; border-radius: 6px; background: var(--card-2); }
.acct-block.is-locked .brand-row { opacity: 0.55; }
.brand-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.brand-logo { position: relative; width: 96px; height: 96px; border-radius: 14px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; overflow: hidden; cursor: pointer; font-size: 12px; color: var(--muted); background: var(--card); }
.brand-logo img { max-width: 84%; max-height: 84%; object-fit: contain; }
.brand-logo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.brand-fields { display: grid; gap: 8px; flex: 1 1 200px; min-width: 0; }

.save-row input { flex: 1 1 240px; }
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.design { display: grid; gap: 10px; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); }
.design img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: #e6e3dd; }
.design > div:nth-child(2) { display: grid; gap: 2px; font-size: 13px; min-width: 0; }
.design strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.design-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.design-actions .btn { height: 36px; font-size: 12.5px; }
.btn.danger { color: var(--danger); border-color: rgba(255, 138, 107, 0.5); }
.empty { color: var(--muted); padding: 24px 0; }

.quote { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.quote-fields { display: grid; gap: 12px; min-width: 0; }
.quote label { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quote fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.quote legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 6px; }
.color-checks { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow: auto; }
.cchip { display: inline-flex !important; cursor: pointer; }
.cchip input { position: absolute; opacity: 0; pointer-events: none; }
.cchip span { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); font-weight: 500; transition: all 0.2s; }
.cchip input:checked + span { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.cchip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.estimate { position: sticky; top: 0; display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.estimate img { width: 100%; border-radius: 10px; aspect-ratio: 4 / 5; object-fit: cover; }
.estimate h3 { margin: 0; font: 700 15px/1 var(--display); }
.estimate dl { margin: 0; display: grid; gap: 6px; font-size: 13px; }
.estimate dl div { display: flex; justify-content: space-between; gap: 10px; }
.estimate dt { color: var(--muted); }
.estimate dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.estimate .sum, .estimate .total { border-top: 1px solid var(--line); padding-top: 6px; }
.estimate .total dd { font: 800 20px/1 var(--display); color: var(--accent-2); }
.estimate .warn { margin: 0; font-size: 12.5px; color: var(--danger); }
.estimate p.muted { margin: 0; }
.estimate .btn { width: 100%; }
.quote-text { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; resize: vertical; }
.selectable { user-select: all; color: var(--text); }

/* embed mode (?embed=1): studio only, for iframes on your site */
body.embed .topnav, body.embed .content, body.embed .foot, body.embed .skip { display: none; }
body.embed .studio { padding-top: 16px; }

@media (max-width: 900px) {
  .quote { grid-template-columns: 1fr; }
  .estimate { position: static; }
  .top-btn span { display: none; }
}
@media (max-width: 560px) {
  .top-actions .plan-chip { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .brand-name { font-size: 15px; }
  .topbar { gap: 12px; }
}

/* =====================================================================
   v5: Decorators United brand theme (switched on by SITE.theme.style)
   ===================================================================== */

/* stage: brand backdrop (deep blue, twill, stitched border like the site hero) */
.stage[data-bg='brand'] { --bg-a: #34343a; --bg-b: #1f1f22; --bg-c: #120e19; background: radial-gradient(85% 75% at 50% 42%, var(--bg-a) 0%, var(--bg-b) 45%, var(--bg-c) 100%); }
.stage[data-bg='brand']::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(140, 180, 255, 0.06) 0 1px, transparent 1px 7px); }
.stage[data-bg='brand']::after { content: ''; position: absolute; inset: 14px; border: 1.5px dashed rgba(240, 232, 123, 0.28); border-radius: calc(var(--radius) + 4px); pointer-events: none; }
.stage[data-bg='brand'] .stage-glow { mix-blend-mode: screen; opacity: 0.4; background: radial-gradient(520px 380px at var(--mx, 50%) var(--my, 40%), color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%); }
.stage[data-bg='brand'] .floor-shadow { background: radial-gradient(closest-side, rgba(0, 0, 0, 0.75), transparent); }
.stage[data-bg='brand'] .loader span { border-color: rgba(255, 255, 255, 0.15); border-top-color: var(--accent-2); }

/* header logo as text */
.brand-mark.text-logo { width: auto; height: auto; padding: 0; background: none; box-shadow: none; color: var(--accent); font: italic 700 34px/1 var(--display); letter-spacing: -0.04em; transform: skewX(-6deg); text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 45%, transparent); }
.brand-text { display: grid; line-height: 1.1; }
.brand-tagline { font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); }
.brand-tagline:empty { display: none; }

/* mono eyebrows: // LABEL ▌ */
:root[data-eyebrow='mono'] .eyebrow, :root[data-eyebrow='mono'] .pb-eyebrow { font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); }
:root[data-eyebrow='mono'] .eyebrow::before { content: '// '; }
:root[data-eyebrow='mono'] .stage-head .eyebrow::after, :root[data-eyebrow='mono'] .content .eyebrow::after { content: ''; display: inline-block; width: 0.55em; height: 1.05em; margin-left: 6px; vertical-align: -0.18em; background: var(--accent-2); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
:root[data-eyebrow='mono'] .num { font-family: var(--mono); color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
:root[data-eyebrow='mono'] .sel-size, :root[data-eyebrow='mono'] kbd, :root[data-eyebrow='mono'] .zoom-out, :root[data-eyebrow='mono'] .label-row output { font-family: var(--mono); letter-spacing: 0.02em; }

/* condensed uppercase headlines */
:root[data-headings='upper'] h1, :root[data-headings='upper'] .content h2, :root[data-headings='upper'] .modal-head h2,
:root[data-headings='upper'] .card-head h2, :root[data-headings='upper'] .plan h3, :root[data-headings='upper'] .pb-meta strong,
:root[data-headings='upper'] .steps h3, :root[data-headings='upper'] .acct-block h3, :root[data-headings='upper'] .estimate h3 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.005em;
}
:root[data-headings='upper'] h1 { font-size: clamp(34px, 4.2vw, 58px); line-height: 0.95; }
:root[data-headings='upper'] h1 span { color: var(--accent); font-weight: 700; }
:root[data-headings='upper'] .content h2 { font-size: clamp(30px, 4vw, 52px); line-height: 1; }
:root[data-headings='upper'] .card-head h2 { font-size: 17px; letter-spacing: 0.03em; }
:root[data-headings='upper'] .plan .price strong, :root[data-headings='upper'] .estimate .total dd { font-family: var(--display); font-weight: 700; }
:root[data-headings='upper'] body { font-weight: 400; }
:root[data-headings='upper'] .steps p, :root[data-headings='upper'] details p, :root[data-headings='upper'] .plan p.muted { font-weight: 300; font-size: 15px; }

/* pill buttons, solid accent fills */
:root[data-buttons='pill'] .btn, :root[data-buttons='pill'] .tool-cta, :root[data-buttons='pill'] .top-btn,
:root[data-buttons='pill'] .plan-chip, :root[data-buttons='pill'] .seg, :root[data-buttons='pill'] .seg button { border-radius: 999px; }
:root[data-buttons='pill'] .btn.primary, :root[data-buttons='pill'] .tool-cta, :root[data-buttons='pill'] .dz-icon,
:root[data-buttons='pill'] .plan .tag, :root[data-buttons='pill'] .plan-chip[data-plan='pro'], :root[data-buttons='pill'] .plan-chip[data-plan='team'] {
  background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}
:root[data-buttons='pill'] .btn.primary:hover:not(:disabled), :root[data-buttons='pill'] .tool-cta:hover { filter: brightness(1.12); }
:root[data-buttons='pill'] .btn.ghost { border-color: var(--line-2); }
:root[data-buttons='pill'] [data-feature].locked:not(.swatch)::after, :root[data-buttons='pill'] .swatch.locked::before, :root[data-buttons='pill'] .pro-tag { background: var(--violet); color: var(--accent); }
:root[data-buttons='pill'] .quote-btn { background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 30%, transparent), color-mix(in srgb, var(--accent-2) 22%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-2) 55%, transparent); }

/* cards: navy with a faint blue edge */
:root[data-buttons='pill'] .card, :root[data-buttons='pill'] .plan, :root[data-buttons='pill'] .steps li, :root[data-buttons='pill'] .modal-card {
  background: var(--card); border-color: color-mix(in srgb, var(--accent) 16%, var(--line));
}
:root[data-buttons='pill'] body { background: radial-gradient(1100px 520px at 70% -12%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 62%), var(--bg); }
:root[data-buttons='pill'] .topbar { background: color-mix(in srgb, var(--bg) 82%, transparent); }
:root[data-buttons='pill'] .topnav a { font-weight: 400; font-size: 15px; color: color-mix(in srgb, var(--text) 82%, transparent); }
:root[data-buttons='pill'] .view-tab canvas, :root[data-buttons='pill'] .lineup-tile canvas { background: radial-gradient(85% 75% at 50% 42%, #34343a, #1f1f22 50%, #121014); }
:root[data-buttons='pill'] .product-thumb { background: radial-gradient(85% 75% at 50% 42%, #34343a, #1f1f22 50%, #121014); }

body.embed .steps li { align-content: start; }
:root[data-eyebrow='mono'] .steps li > span { font-family: var(--mono); }
@media (max-width: 560px) { .brand-tagline { display: none; } .brand-name { font-size: 16px !important; } .top-btn span { display: none; } }

/* sample DU patch shown until the customer uploads */
.sample-chip { position: absolute; top: 16px; left: 16px; z-index: 3; display: none; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(6, 11, 22, 0.62); color: #fff; font: 500 12px/1 var(--mono, var(--font)); letter-spacing: 0.06em; text-transform: uppercase; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer; transition: transform 0.2s var(--spring), background 0.2s; }
.sample-chip strong { height: 24px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 600 12px/1 var(--font); letter-spacing: 0; text-transform: none; }
.sample-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 25%, transparent); animation: breathe 2.2s var(--ease) infinite; }
.sample-chip:hover { transform: translateY(-1px); background: rgba(6, 11, 22, 0.8); }
.stage.is-sample .sample-chip { display: inline-flex; }
body.presenting .sample-chip { display: none; }
.art-row.is-placeholder { border: 1px dashed color-mix(in srgb, var(--accent-2) 40%, transparent); }
.art-row.is-placeholder .art-thumb { background: radial-gradient(85% 75% at 50% 42%, #34343a, #1f1f22 50%, #121014); }

/* ---------------- v6: header (brand lockup + pill nav) ---------------- */
:root[data-buttons='pill'] .topbar { gap: 22px; padding-block: 12px; }
:root[data-buttons='pill'] .brand { gap: 14px; }
:root[data-buttons='pill'] .brand-mark.text-logo { font-size: 40px; }
:root[data-buttons='pill'] .brand-text { gap: 3px; }
:root[data-buttons='pill'] .brand-name { font: 700 21px/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; color: var(--text); }
:root[data-buttons='pill'] .brand-tagline { font: 500 11px/1 var(--mono); letter-spacing: 0.3em; color: var(--accent-2); }
:root[data-buttons='pill'] .brand-tagline::before { content: '// '; letter-spacing: 0.1em; }
:root[data-buttons='pill'] .topnav { gap: 6px; margin-left: 10px; }
:root[data-buttons='pill'] .topnav a { padding: 11px 20px; border-radius: 999px; font: 400 15.5px/1 var(--font); color: color-mix(in srgb, var(--text) 62%, transparent); border: 1px solid transparent; }
:root[data-buttons='pill'] .topnav a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
:root[data-buttons='pill'] .topnav a[aria-current='page'] { color: var(--text); background: color-mix(in srgb, var(--accent) 12%, var(--card)); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
:root[data-buttons='pill'] .top-actions { gap: 10px; }
:root[data-buttons='pill'] .top-btn, :root[data-buttons='pill'] .plan-chip { height: 44px; padding: 0 18px; font: 500 14.5px/1 var(--font); color: var(--text); border-color: var(--line-2); }
:root[data-buttons='pill'] .btn.sm { height: 44px; padding: 0 22px; font-size: 15px; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 90%, transparent); }
@media (max-width: 1100px) { :root[data-buttons='pill'] .topnav a { padding: 10px 13px; font-size: 14.5px; } }
@media (max-width: 560px) {
  :root[data-buttons='pill'] .brand-mark.text-logo { font-size: 32px; }
  :root[data-buttons='pill'] .top-btn, :root[data-buttons='pill'] .btn.sm { height: 40px; }
}

@media (max-width: 560px) {
  :root[data-buttons='pill'] .topbar { gap: 10px; }
  :root[data-buttons='pill'] .brand { gap: 8px; }
  :root[data-buttons='pill'] .brand-name { font-size: 14px !important; }
  :root[data-buttons='pill'] .top-actions { gap: 6px; }
  :root[data-buttons='pill'] .top-btn { width: 40px; padding: 0; justify-content: center; }
  :root[data-buttons='pill'] .btn.sm { padding: 0 14px; font-size: 14px; }
}

/* ---------------- v7: per-location artwork, text tool, units, welcome ---------------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.loc-art { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.seg.wide { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg.wide button { height: 36px; font-size: 13.5px; }
.text-panel { display: grid; gap: 10px; animation: rise 0.3s var(--ease); }
.text-panel input { width: 100%; font-size: 16px; }
.font-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.font-chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; transition: all 0.2s; }
.font-chip:hover { color: var(--text); }
.font-chip[aria-checked='true'] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.row-end { display: inline-flex; align-items: center; gap: 10px; }
.seg.mini { padding: 2px; border-radius: 999px; }
.seg.mini button { height: 24px; padding: 0 9px; font-size: 11.5px; border-radius: 999px; }
.link-btn.center { justify-self: center; text-align: center; width: 100%; }
.hint .link-btn { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }

.welcome { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 4; width: min(440px, calc(100% - 32px)); display: grid; gap: 10px; padding: 18px 20px; border-radius: calc(var(--radius) - 2px); background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: rise 0.5s var(--ease); }
.welcome h3 { margin: 0; font: 700 22px/1.05 var(--display); text-transform: uppercase; }
.welcome .eyebrow { margin: 0; }
.welcome ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.welcome li { display: flex; gap: 10px; align-items: center; }
.welcome li b { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; font: 600 12px/1 var(--mono, var(--font)); color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 14%, transparent); }
.welcome .btn { justify-self: start; }
body.presenting .welcome { display: none; }

.shortcuts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.shortcuts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.shortcuts dd { margin: 0; color: var(--muted); text-align: right; }
@media (max-width: 560px) { .shortcuts { grid-template-columns: 1fr; } .welcome { bottom: 12px; padding: 14px; } }

/* ---------------- v8: patch catalogue ---------------- */
.style-group { grid-column: 1 / -1; margin: 6px 0 -2px; font: 600 11px/1.2 var(--mono, var(--font)); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.style-group:first-child { margin-top: 0; }
.ico-embpatch { background: repeating-linear-gradient(90deg, #1d3f8a 0 3px, #24489a 3px 5px); box-shadow: inset 0 0 0 3px #f2efe6, inset 0 0 0 4px rgba(0,0,0,.4); }
.ico-wovenlabel { background: repeating-linear-gradient(0deg, #f4f2ec 0 1px, #e3dfd5 1px 2px); border-radius: 5px !important; box-shadow: inset 4px 0 0 rgba(0,0,0,.18), inset -4px 0 0 rgba(0,0,0,.18); }
.ico-sublimated { background: linear-gradient(135deg, #00c2ff, #0b63ff 40%, #ff5b2e 75%, #ffd34d); box-shadow: inset 0 0 0 3px #f4f2ec; }
.ico-leatherette { background: radial-gradient(circle at 30% 25%, #3a3836, #141312); box-shadow: inset 0 0 0 2px #c9a24a; }
.ico-loop { background: linear-gradient(90deg, rgba(0,0,0,.45), transparent 35%), #1d1d1d; border-radius: 12px 4px 4px 12px !important; box-shadow: inset 0 0 0 1px #3a3a3a; }
.ico-print { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

/* ---------------- v9: gentle idle float (replaces cursor tilt) ---------------- */
.tilt { transform: none; animation: hat-float 7s ease-in-out infinite; }
.tilt .floor-shadow { animation: shadow-float 7s ease-in-out infinite; transform: none; }
@keyframes hat-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-1.1%) rotate(-0.3deg); }
}
/* the shadow stays on the floor: counter the lift and soften as the hat rises */
@keyframes shadow-float {
  0%, 100% { transform: translateY(0) scaleX(1); opacity: 1; }
  50% { transform: translateY(13%) scaleX(0.94); opacity: 0.8; }
}
.stage.dragging .tilt, .stage.dragging .floor-shadow,
.stage.over-deco .tilt, .stage.over-deco .floor-shadow { animation-play-state: paused; }
.stage-glow { --mx: 50%; --my: 35%; }

/* ---------------- v9: export formats + send CTA ---------------- */
.export-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.send-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 10%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.send-cta div { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; }
.send-cta strong { font: 700 16px/1.2 var(--display); text-transform: uppercase; }
.send-cta span { font-size: 13px; color: var(--muted); }
.send-cta .btn { height: 44px; }
.send-note { margin: 0; }
#exportModal .modal-card { gap: 12px; }
#exportModal .export-preview, #exportModal .export-preview img { max-height: min(46vh, 520px); }

/* ---------------- v10: client documents ---------------- */
.docs-card { width: min(1240px, 100%); }
.docs-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 20px; align-items: start; }
.docs-form { display: grid; gap: 12px; min-width: 0; max-height: 72vh; overflow: auto; padding-right: 6px; }
.docs-form label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.docs-form select { font: 500 14px/1.4 var(--font); color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 10px; min-width: 0; }
.doc-tabs { justify-self: start; }
.doc-sec { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); }
.doc-sec summary { cursor: pointer; font-weight: 600; display: flex; gap: 10px; align-items: baseline; }
.doc-sec summary .muted { font-weight: 400; font-size: 13px; }
details.doc-sec[open] > summary { margin-bottom: 4px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.doc-biz { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.doc-biz .field-grid { flex: 1 1 320px; }
.doc-logo { position: relative; width: 120px; height: 96px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: #fff; display: grid !important; place-items: center; overflow: hidden; cursor: pointer; }
.doc-logo img { max-width: 88%; max-height: 72%; object-fit: contain; }
.doc-logo span { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: 11px; padding: 3px; color: #fff; background: rgba(0, 0, 0, 0.55); }
.doc-logo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.qty-rows { display: grid; gap: 8px; }
.qty-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 36px; gap: 8px; align-items: center; }
.docs-preview { position: sticky; top: 0; display: grid; gap: 12px; }
.docs-preview canvas { width: 100%; height: auto; aspect-ratio: 8.5 / 11; border-radius: 10px; background: #fff; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.7); }
.docs-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.docs-actions .btn { flex: 1 1 auto; height: 44px; }
.docs-btn { height: 46px; }
@media (max-width: 960px) { .docs-body { grid-template-columns: 1fr; } .docs-form { max-height: none; } .docs-preview { position: static; } }
.doc-sheet { position: relative; }
.doc-x-layer { position: absolute; inset: 0; pointer-events: none; }
.doc-x { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(20, 22, 26, 0.78); color: #fff; cursor: pointer; pointer-events: auto; opacity: 0.85; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: transform 0.15s var(--spring), opacity 0.15s, background 0.15s; }
.doc-x svg { width: 12px; height: 12px; stroke-width: 2.6; }
.doc-x:hover { opacity: 1; transform: scale(1.12); background: #d93a2b; }

/* ---------------- v11: rights + brand check ---------------- */
.consent-card { width: min(560px, 100%); }
.consent-card p { margin: 0; line-height: 1.55; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 14px; line-height: 1.45; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.check a { color: var(--accent-2); }
.dz-text .dz-legal { font-size: 11px; opacity: 0.8; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); text-decoration: underline; }

/* =====================================================================
   v12: polish pass
   ===================================================================== */

/* ---- Studio fits the screen; the hat is pinned and the page scrolls the tools ---- */
@media (min-width: 901px) {
  .studio { align-items: start; padding-bottom: 28px; }
  .stage-col { position: sticky; top: 84px; }
  /* one natural page scroll: the hat stays pinned while the tool list scrolls past it */
  .panel { padding-bottom: 28px; }
  .stage { height: max(420px, min(calc(100vh - 300px), 820px)); }
}

/* ---- Compact studio heading: one line, toolbar on the same row ---- */
.stage-head { align-items: center; margin-bottom: 12px; }
.stage-head > div:first-child { min-width: 0; flex: 1 1 auto; }
.stage-head .eyebrow { margin-bottom: 2px; }
:root[data-headings='upper'] .stage-head h1 { font-size: clamp(28px, 2.7vw, 40px); line-height: 1; white-space: nowrap; }
.stage-tools { flex: none; }
.tool-cta { height: 36px; padding: 0 14px 0 12px; }
[data-feature].locked:not(.swatch)::after { top: -8px; right: -4px; }

/* ---- Header: even rhythm, aligned baselines ---- */
:root[data-buttons='pill'] .topbar { padding-block: 10px; min-height: 68px; }
:root[data-buttons='pill'] .brand-text { gap: 4px; }
:root[data-buttons='pill'] .brand-tagline { letter-spacing: 0.24em; font-size: 10.5px; }
:root[data-buttons='pill'] .topnav { gap: 4px; }
:root[data-buttons='pill'] .topnav a { padding: 10px 18px; line-height: 1; }
:root[data-buttons='pill'] .top-btn, :root[data-buttons='pill'] .plan-chip, :root[data-buttons='pill'] .btn.sm { height: 42px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
:root[data-buttons='pill'] .top-btn { gap: 8px; padding: 0 16px; }

/* ---- Pills and chips: text optically centred ---- */
.btn, .chip, .seg button, .font-chip, .cchip span, .plan .tag, .pro-tag { line-height: 1; }
.chip { height: 28px; padding: 0 10px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; }
.sample-chip { height: 36px; padding: 0 5px 0 12px; }
.sample-chip strong { height: 26px; padding: 0 12px; }
.num { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; line-height: 1; }
.card-head { min-height: 26px; }
kbd { line-height: 1; display: inline-flex; align-items: center; }

/* ---- Decoration picker: compact cards ---- */
.styles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.style-group { grid-column: 1 / -1; margin: 4px 0 0; }
.style-btn { grid-column: span 3; display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: none; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; min-height: 56px; }
.style-btn .ico { width: 30px; height: 30px; border-radius: 8px; }
.style-btn strong { font-size: 13px; line-height: 1.2; }
.style-btn small { font-size: 11px; line-height: 1.3; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.style-btn:hover { transform: none; }
.style-btn.direct { grid-column: span 2; grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 6px; padding: 10px 6px; }
.style-btn.direct small { display: none; }

/* ---- Artwork card copy ---- */
.dz-text span { line-height: 1.35; }
.dz-text .dz-legal { margin-top: 2px; }

/* ---- Content sections share one width and left edge ---- */
.content-inner, .content-inner.wide { max-width: 1160px; }
#faq details { max-width: 860px; }
#faq details p { max-width: 70ch; }
.steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps li { gap: 12px; }
.steps li > span { font-family: var(--mono, var(--font)); font-size: 13px; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
:root[data-headings='upper'] .steps h3 { font-size: 18px; line-height: 1.15; letter-spacing: 0.01em; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } :root[data-headings='upper'] .stage-head h1 { white-space: normal; } }

/* ---- Footer ---- */
.foot { align-items: center; row-gap: 10px; }
.foot .muted { flex-basis: 100%; font-size: 12px; }
@media (min-width: 901px) { .stage { height: max(400px, min(calc(100vh - 318px), 820px)); } }
.stage-foot { min-height: 0; margin-top: 12px; }
.view-tab { padding: 5px 5px 7px; gap: 5px; }
.view-tab canvas { width: 58px; height: 72px; }
.dropzone { gap: 12px; padding: 14px; }
.dz-icon { width: 38px; height: 38px; }
.dz-text span, .art-meta .muted, .product-text .muted, .fine { text-wrap: balance; }
.art-meta { gap: 2px; }
@media (min-width: 901px) { .stage { min-height: 0; height: max(360px, min(calc(100vh - 336px), 820px)); } }

/* ---- never let header labels wrap ---- */
.topnav a, .top-btn, .plan-chip, .btn, .brand-name { white-space: nowrap; }
/* ---- medium screens: tighter header, title above toolbar ---- */
@media (max-width: 1180px) {
  :root[data-buttons='pill'] .topnav a { padding: 10px 12px; font-size: 14.5px; }
  :root[data-buttons='pill'] .top-btn span { display: none; }
  :root[data-buttons='pill'] .top-btn { width: 42px; padding: 0; }
}
@media (max-width: 1100px) {
  .stage-head { flex-wrap: wrap; align-items: flex-end; row-gap: 10px; }
  .stage-head > div:first-child { flex-basis: 100%; }
  .stage-tools { margin-left: auto; }
  .brand-tagline { display: none; }
}
@media (max-width: 960px) {
  :root[data-buttons='pill'] .plan-chip { display: none; }
  .topnav { margin-left: 0; }
}
/* ---- step cards: title and copy grouped, even spacing ---- */
.steps li { gap: 14px; grid-template-rows: auto 1fr; }
.steps li > div { display: grid; gap: 8px; align-content: start; }
.steps h3 { margin: 0; }
/* ---- pricing: cards align, buttons sit at the bottom of each card ---- */
.plans { align-items: stretch; }
.plan { grid-template-rows: auto auto auto 1fr auto; }
.plan ul { align-content: start; }
.plan .price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan .link-btn.center { margin-top: -4px; }
.modal .plans { align-items: stretch; }

.steps h3 + p { margin-top: 0; }
:root[data-headings='upper'] .steps h3 { margin-bottom: 8px; }
.steps p { line-height: 1.6; }
.plan h3 { line-height: 1; }
.plan header { min-height: 22px; }
.lineup { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 1100px) { #lineupModal .lineup { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.brand-row { align-items: center; }
.brand-fields { gap: 6px; }
.brand-fields input { width: 100%; }
.color-checks { max-height: 132px; gap: 6px 6px; }
.cchip span { display: inline-flex; align-items: center; height: 30px; }
.estimate dd { text-align: right; }
@media (max-width: 560px) {
  }

/* ---------------- v13: your own hat + delete handle ---------------- */
.own-card .product-thumb svg { width: 22px; height: 22px; color: var(--accent-2); }
.own-card:not([aria-checked='true']) { border-style: dashed; }
.own-hat { display: grid; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--bg-2)); animation: rise 0.3s var(--ease); }
.own-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.own-slot { position: relative; display: grid; gap: 6px; justify-items: center; }
.own-drop { position: relative; width: 100%; aspect-ratio: 4 / 5; display: grid; place-items: center; border-radius: 12px; border: 1.5px dashed var(--line-2); background: radial-gradient(85% 75% at 50% 42%, #34343a, #1f1f22 50%, #121014); cursor: pointer; overflow: hidden; transition: border-color 0.2s; }
.own-drop:hover { border-color: var(--accent-2); }
.own-slot.filled .own-drop { border-style: solid; border-color: var(--line); }
.own-drop img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45)); }
.own-drop > svg { width: 22px; height: 22px; color: #cfe0ff; }
.own-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.own-busy { position: absolute; inset: 0; display: none; place-items: center; align-content: center; gap: 8px; padding: 6px; text-align: center; font: 600 10.5px/1.25 var(--font); color: #fff; background: rgba(6, 11, 22, 0.72); }
.own-busy i { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.2); border-top-color: var(--accent-2); animation: spin 0.8s linear infinite; }
.own-slot.busy .own-busy { display: grid; }
.own-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.own-slot.filled .own-label { color: var(--text); }
.own-actions { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; }
.icon-btn.sm { width: 24px; height: 24px; border-radius: 7px; background: rgba(6, 11, 22, 0.7); color: #fff; }
.icon-btn.sm svg { width: 13px; height: 13px; stroke-width: 2.2; }
.icon-btn.sm:hover:not(:disabled) { background: rgba(6, 11, 22, 0.92); }
.icon-btn.sm[data-own="del"]:hover { background: #d93a2b; }

.own-missing { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; display: grid; gap: 8px; justify-items: center; text-align: center; width: min(320px, 80%); padding: 22px; border-radius: 18px; background: rgba(6, 11, 22, 0.66); border: 1px dashed rgba(160, 200, 255, 0.4); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.own-missing .eyebrow { margin: 0; }
.own-missing strong { font: 700 20px/1.1 var(--display); text-transform: uppercase; }
.own-missing span { font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.own-missing .btn { height: 42px; margin-top: 4px; }
.stage.view-missing .ghost-drop, .stage.view-missing .sel, .stage.view-missing .sample-chip { display: none; }

/* × in the top-right corner of the selection box */
.h-del { position: absolute; right: -12px; top: -12px; width: 24px; height: 24px; padding: 0; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #16181d; color: #fff; cursor: pointer; pointer-events: auto; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); transition: transform 0.15s var(--spring), background 0.15s; }
.h-del svg { width: 12px; height: 12px; stroke-width: 2.8; pointer-events: none; }
.h-del:hover { background: #d93a2b; transform: scale(1.12); }
.stage:not(.show-sel) .sel .h-del { pointer-events: none; }
@media (max-width: 560px) { .h-del { width: 30px; height: 30px; right: -15px; top: -15px; } }

/* Small phones: keep the whole header on screen */
@media (max-width: 420px) {
  :root[data-buttons='pill'] .topbar { gap: 8px; }
  :root[data-buttons='pill'] .brand-name { font-size: 12.5px !important; letter-spacing: 0.01em; }
  :root[data-buttons='pill'] .brand-mark.text-logo { font-size: 28px; }
  :root[data-buttons='pill'] .btn.sm { padding: 0 12px; }
}
@media (max-width: 374px) {
  :root[data-buttons='pill'] .brand-name { font-size: 11.5px !important; }
  :root[data-buttons='pill'] .top-btn { width: 36px; height: 36px; }
  :root[data-buttons='pill'] .btn.sm { padding: 0 10px; height: 36px; font-size: 13px; }
}

/* ---------------- v14: checkout and upgrade flow ---------------- */
#pricing .lede { margin: -4px 0 18px; color: var(--muted); font-size: 16px; }
.pricing-billing { display: flex; justify-content: center; margin: 0 0 22px; }
.seg.billing { justify-self: center; }
.seg.billing button { height: 36px; padding: 0 16px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; }
.seg.billing .save { white-space: nowrap; font: 700 10.5px/1 var(--font); padding: 4px 7px; border-radius: 999px; color: var(--on-accent); background: linear-gradient(140deg, var(--accent), var(--accent-2)); }
.plan .price-note { margin: -4px 0 0; font-size: 13px; color: var(--accent-2); }
.btn.big { height: 52px; font-size: 16px; width: 100%; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 0; font-size: 12.5px; color: var(--muted); }
.trust span { display: inline-flex; align-items: center; gap: 5px; }
.trust svg { width: 14px; height: 14px; color: var(--ok); }
.plan.featured { position: relative; }
@media (min-width: 900px) { #pricingGrid .plan.featured { transform: translateY(-10px); } }

.upgrade-card { max-width: 760px; }
.upgrade-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }
.up-list { list-style: none; margin: 0; padding: 4px 0; display: grid; gap: 12px; font-size: 15px; }
.up-list li { display: flex; gap: 10px; align-items: flex-start; }
.up-list svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--ok); }
.up-buy { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 20px; border-radius: 18px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); box-shadow: 0 0 0 3px var(--accent-soft); }
.up-buy .price { margin: 4px 0 0; }
.up-buy .price strong { font: 800 48px/1 var(--display); letter-spacing: -0.02em; }
.up-buy .price span { color: var(--muted); }
.up-buy .price-note { margin: -4px 0 4px; font-size: 13px; color: var(--accent-2); }
.up-foot { display: grid; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.up-foot .link-btn { font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.license-details summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.license-details summary:hover { color: var(--text); }
.license-details[open] summary { margin-bottom: 10px; }
@media (max-width: 680px) {
  .upgrade-body { grid-template-columns: 1fr; }
  .up-buy { order: -1; }
  .up-list { font-size: 14px; gap: 9px; }
}

.pro-nudge { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--bg-2)); }
.pro-nudge[hidden] { display: none; }
.pro-nudge p { margin: 0; flex: 1; font-size: 13.5px; color: var(--muted); }
.pro-nudge p strong { color: var(--text); }
.pro-nudge .btn { flex: none; }
@media (max-width: 560px) { .pro-nudge { flex-direction: column; align-items: stretch; } }
@media (max-width: 560px) { #upgradeTop .up-price { display: none; } }
#upgradeTop .up-price { margin-left: -2px; font-weight: 600; opacity: 0.9; }

/* ---------------- v15: how it works converts ---------------- */
:root .steps li.pro-step { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.pro-tag { display: inline-block; margin-left: 6px; padding: 3px 7px; border-radius: 999px; font: 700 10.5px/1 var(--font); font-style: normal; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 3px; color: var(--on-accent); background: linear-gradient(140deg, var(--accent), var(--accent-2)); }
.how-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.how-cta .btn { text-decoration: none; }
@media (max-width: 560px) { .how-cta .btn { flex: 1 1 100%; } }
.how-cta .btn { height: 50px; padding: 0 24px; font-size: 15px; }

/* ---------------- v16: colorway lineup in the sidebar ---------------- */
.lineup-cta { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 4px; padding: 12px 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 14%, var(--card)), color-mix(in srgb, var(--accent-2) 6%, var(--card))); color: var(--text); text-align: left; cursor: pointer; transition: border-color 0.2s, transform 0.2s var(--spring), box-shadow 0.25s; }
.lineup-cta[hidden] { display: none; }
.lineup-cta:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 10px 28px -14px color-mix(in srgb, var(--accent) 70%, transparent); }
.lineup-cta:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.lineup-cta-art { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 40px; height: 40px; }
.lineup-cta-art i { border-radius: 6px; background: var(--card-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.lineup-cta-text { flex: 1; display: grid; gap: 3px; min-width: 0; }
.lineup-cta-text strong { font-size: 14.5px; }
.lineup-cta-text span { font-size: 12.5px; color: var(--muted); }
.lineup-cta-go { flex: none; width: 20px; height: 20px; color: var(--accent-2); transition: transform 0.2s var(--spring); }
.lineup-cta:hover .lineup-cta-go { transform: translateX(3px); }
.color-note { margin: 2px 0 0; font-size: 11.5px; }

/* ---------------- v17: denser sidebar, more visible without scrolling ---------------- */
/* Hats: 2 x 2 tiles instead of four full-width rows */
.products { grid-template-columns: 1fr 1fr; gap: 8px; }
.product-card { gap: 9px; padding: 7px 8px 7px 7px; min-width: 0; }
.product-card .product-thumb { width: 40px; height: 46px; border-radius: 9px; }
.product-card .product-thumb img { width: 48px; }
.product-card .product-thumb svg { width: 24px; height: 22px; }
.product-card .product-text { min-width: 0; gap: 2px; }
.product-card .product-text strong { font-size: 12.5px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .product-text .muted { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Patches: icon + name tiles, three across (the description shows on hover) */
.style-btn { grid-column: span 2; grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 6px; padding: 10px 6px; min-height: 0; }
.style-btn small { display: none; }
.style-btn strong { font-size: 12.5px; line-height: 1.2; }
/* Lineup button and color note */
.lineup-cta { padding: 9px 12px; gap: 10px; }
.lineup-cta-art { width: 34px; height: 34px; }
.lineup-cta-text strong { font-size: 14px; }
.lineup-cta-text span { font-size: 12px; }
.color-note { font-size: 11px; line-height: 1.35; }

/* ---------------- v18: accounts, sync and install ---------------- */
.sync-block p { margin: 0; }
.sync-line { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sync-line::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.sync-line.ok::before { background: var(--ok); }
.sync-line.syncing::before { background: var(--accent-2); animation: pulse 1s ease-in-out infinite; }
.sync-line.error { color: #ff8a7a; }
.sync-line.error::before { background: #ff6a55; }
@keyframes pulse { 50% { opacity: 0.3; } }
.foot-install { font-size: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.foot-install:hover { color: var(--text); }
.foot-install[hidden] { display: none; }

/* ---------------- v19: lifestyle scenes ---------------- */
.scene-cta { margin-top: 2px; }
.scene-cta-art { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(140deg, var(--accent), var(--accent-2)); }
.scene-cta-art svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.scenes-card { width: min(1100px, 100%); }
.scenes-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; min-height: 0; }
.scene-list { display: grid; gap: 8px; align-content: start; max-height: min(66vh, 640px); overflow-y: auto; padding: 2px; }
.scene-card { position: relative; display: grid; gap: 6px; padding: 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--tint); color: var(--text); text-align: left; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.scene-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; display: block; }
.scene-card em { position: absolute; top: 10px; left: 10px; font: 700 10px/1 var(--font); font-style: normal; padding: 4px 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; }
.scene-card.on { border-color: var(--accent); background: var(--accent-soft); }
.scene-add { place-items: center; text-align: center; min-height: 120px; border-style: dashed; color: var(--muted); }
.scene-add .plus { font: 300 34px/1 var(--font); color: var(--accent-2); }
.scene-add small { font-weight: 400; font-size: 11.5px; }
.scene-add:hover { border-color: var(--accent); color: var(--text); }
.scene-main { display: grid; gap: 12px; align-content: start; min-width: 0; }
.scene-stage { position: relative; width: 100%; max-height: 62vh; border-radius: 14px; overflow: hidden; background: var(--bg-2); display: grid; place-items: center; touch-action: none; }
.scene-stage canvas { width: 100%; height: 100%; display: block; object-fit: contain; }
.scene-empty { margin: 0; padding: 60px 20px; color: var(--muted); text-align: center; }
.scene-edit { position: absolute; inset: 0; }
.scene-edit svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-edit polygon { fill: color-mix(in srgb, var(--accent-2) 14%, transparent); stroke: var(--accent-2); stroke-width: 0.003; stroke-dasharray: 0.01 0.006; vector-effect: non-scaling-stroke; }
.scene-handle { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; background: var(--accent); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); cursor: grab; touch-action: none; padding: 0; }
.scene-handle:active { cursor: grabbing; transform: scale(1.15); }
.scene-handle:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.scene-sliders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.scene-sliders label { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.scene-controls .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.danger { color: #ff8a7a; }
@media (max-width: 760px) {
  .scenes-body { grid-template-columns: 1fr; }
  .scene-list { grid-auto-flow: column; grid-auto-columns: 132px; max-height: none; overflow-x: auto; overflow-y: hidden; }
  .scene-sliders { grid-template-columns: 1fr; }
  .scene-handle { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
}

/* ---------------- v20: one-screen quote request ---------------- */
.quote-card { max-width: 820px; }
.quote2 { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.q-preview { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.q-preview img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; }
.q-preview div { display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.q-preview strong { color: var(--text); font-size: 14px; }
.q-main { display: grid; gap: 16px; min-width: 0; }
.q-main label { display: grid; gap: 6px; }
.q-main .opt { font-weight: 400; color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.q-contact { display: grid; gap: 12px; }
.q-me { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--tint); }
.q-me > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.q-me strong { font-size: 15px; }
.q-me span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid !important; place-items: center; font: 700 16px/1 var(--font); color: var(--on-accent) !important; background: linear-gradient(140deg, var(--accent), var(--accent-2)); }
.q-qty { display: grid; gap: 8px; }
.q-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.q-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.q-picks button { height: 44px; min-width: 64px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--tint); color: var(--text); font: 600 15px/1 var(--font); cursor: pointer; }
.q-picks button[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.q-picks input { width: 96px; height: 44px; }
.q-hint { font-size: 12.5px; color: #ffb4a8; min-height: 0; }
.q-hint:empty { display: none; }
.q-more { border-top: 1px solid var(--line); padding-top: 12px; }
.q-more summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.q-more summary span { opacity: 0.75; }
.q-more[open] summary { margin-bottom: 12px; }
.q-more > *:not(summary) + * { margin-top: 12px; }
.q-more fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.q-more legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 6px; }
.quote2 .trust { justify-content: flex-start; }
.q-next { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 15px; }
.q-next li::marker { color: var(--accent-2); font-weight: 700; }
@media (max-width: 680px) {
  .quote2 { grid-template-columns: 1fr; }
  .q-preview { grid-template-columns: 96px minmax(0, 1fr); align-items: center; padding: 10px; }
  .q-preview img { aspect-ratio: 1; }
  .q-picks button { flex: 1 1 0; min-width: 0; padding: 0 8px; }
  .q-picks input { flex: 1 1 100%; width: auto; }
}
.quote2 > *, .q-main > *, .q-contact .field-row > * { min-width: 0; }
.q-main input, .q-main textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.q-picks input { width: 96px; flex: none; }
.q-more summary { justify-content: flex-start; gap: 6px; }
.q-more summary span { margin-right: auto; font-weight: 400; }
@media (max-width: 680px) {
  .q-contact .field-row { grid-template-columns: 1fr; }
  .q-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .q-picks input { grid-column: 1 / -1; width: 100%; }
}

/* ---------------- v21: beta + founding price tags ---------------- */
.beta-tag { display: inline-block; margin-left: 6px; padding: 3px 7px; border-radius: 999px; font: 700 10px/1 var(--font); font-style: normal; letter-spacing: 0.05em; text-transform: uppercase; vertical-align: 2px; color: var(--text); border: 1px solid currentColor; opacity: 0.85; }
.lineup-cta-text .pro-tag { margin-left: 4px; }
.founding { margin: 0; display: inline-flex; align-self: start; justify-self: center; font: 700 11px/1 var(--mono, var(--font)); letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); }
.plan .founding { justify-self: start; }
#pricing .founding.center { display: table; margin: -6px 0 14px; }
@media (max-width: 700px) {
  .stage-head { align-items: stretch !important; }
  .stage-head > div:first-child { align-self: flex-start; width: 100%; }
}
.export-preview { transition: background-color 0.2s; }

/* ---------------- v22: hat + beanie groups, 4 photo slots ---------------- */
.product-group { grid-column: 1 / -1; margin: 4px 0 -2px; font: 600 11px/1.2 var(--mono, var(--font)); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.product-group:first-child { margin-top: 0; }
.own-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-card.pending .product-thumb { opacity: 0.8; }

/* ---------------- v23: patch color pickers ---------------- */
.swatch-tag { flex-basis: 100%; margin: 4px 0 -2px; font: 600 10.5px/1.2 var(--mono, var(--font)); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.swatches .tool-swatch { display: grid; place-items: center; background: var(--tint); border: 1px dashed var(--line-2); color: var(--text); }
.swatches .tool-swatch svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.swatches .wheel-swatch { position: relative; background: conic-gradient(#f44, #fd4, #4f6, #4df, #46f, #e4f, #f44) !important; cursor: pointer; }
.swatches .wheel-swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.swatches .wheel-swatch.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.swatches .swatch.popular { position: relative; }
.swatches .swatch.popular::after { content: '★'; position: absolute; top: -7px; right: -6px; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; font-size: 9px; line-height: 1; color: var(--on-accent); background: var(--accent); }


/* ---------------- v24: charcoal / white / Dakar yellow / deep violet ---------------- */
.stage[data-bg='white'] { --bg-a: #ffffff; --bg-b: #ffffff; --bg-c: #f4f4f2; background: #ffffff; }
.stage[data-bg='white']::after { content: ''; position: absolute; inset: 14px; border: 1.5px dashed rgba(23, 13, 38, 0.14); border-radius: calc(var(--radius) - 8px); pointer-events: none; }
.stage[data-bg='white'] .stage-glow { opacity: 0; }
.stage[data-bg='white'] .floor-shadow { background: radial-gradient(closest-side, rgba(0, 0, 0, 0.32), transparent); }
/* free plan: a soft repeating DU mark behind every stage color (Pro hides it) */
.stage.wm .wm-layer { display: block; }
.wm-layer { display: none; position: absolute; inset: 0; pointer-events: none; background-image: var(--wm); background-size: 270px 270px; opacity: 0.07; }
.stage[data-bg='white'] .wm-layer, .stage[data-bg='light'] .wm-layer { opacity: 0.06; }
.pro-tag, .plan .tag, [data-feature].locked:not(.swatch)::after { background: var(--violet) !important; color: var(--accent) !important; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.primary { color: var(--on-accent); }
::selection { background: var(--accent); color: var(--violet); }

/* ---------------- v25: sign-in sheet, library tabs, reorder ---------------- */
.signin-card { max-width: 460px; }
.signin-providers { display: grid; gap: 10px; }
.signin-providers .g-btn { min-height: 44px; display: flex; justify-content: center; }
.apple-btn { height: 44px; width: 100%; background: #000; color: #fff; border: 1px solid #333; font-weight: 600; gap: 10px; }
.apple-btn svg { width: 18px; height: 18px; fill: #fff; }
.or { display: flex; align-items: center; gap: 10px; margin: 2px 0; font-size: 12px; color: var(--muted); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.lib-tabs { justify-self: start; }
.lib-tabs .count { margin-left: 6px; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--line-2); }
.designs.orders .design img { background: var(--bg-2); }
.reorder-sum { margin: 0; display: grid; gap: 6px; font-size: 14px; padding: 12px 14px; border-radius: 14px; background: var(--tint); border: 1px solid var(--line); }
.reorder-sum div { display: flex; justify-content: space-between; gap: 12px; }
.reorder-sum dt { color: var(--muted); }
.reorder-sum dd { margin: 0; text-align: right; }
#roColor, #roNotes { width: 100%; font: 500 15px/1.4 var(--font); color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 12px; }
#roColor:focus, #roNotes:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
#roNotes { resize: vertical; }
#roColor { height: 44px; }

/* ---------- share row (export dialog) ---------- */
.share-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 2px 2px; }
.share-label { font: 600 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; min-width: 34px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: 600 13px/1 var(--font); cursor: pointer; text-decoration: none; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--spring); }
.share-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-btn:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.share-btn.native { padding: 0 12px; }
.share-btn[hidden] { display: none; }
.share-tag { margin-left: auto; font-size: 12px; color: var(--muted); }
.share-tag a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.share-tag a:hover { border-bottom-color: var(--accent); }
@media (max-width: 560px) { .share-tag { margin-left: 0; width: 100%; } }

/* ---------- feedback card (once, after the first saved file) ---------- */
.feedback-card { position: fixed; right: 20px; bottom: 20px; z-index: 95; width: min(360px, calc(100vw - 32px)); padding: 18px 18px 16px; border-radius: 18px; background: var(--card); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line-2)); box-shadow: 0 28px 60px -18px rgba(0, 0, 0, 0.7); opacity: 0; transform: translateY(16px); transition: opacity 0.3s var(--ease), transform 0.4s var(--spring); }
.feedback-card.show { opacity: 1; transform: none; }
.feedback-card h3 { margin: 4px 0 6px; font: 600 20px/1.15 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.feedback-card .fb-close { position: absolute; top: 10px; right: 10px; }
.fb-stars { display: flex; gap: 4px; margin: 10px 0; }
.fb-stars button { font-size: 26px; line-height: 1; background: none; border: 0; padding: 2px; cursor: pointer; color: var(--line-2); transition: color 0.15s, transform 0.2s var(--spring); }
.fb-stars button:hover, .fb-stars button.on { color: var(--accent); }
.fb-stars button:hover { transform: scale(1.15); }
.fb-form { display: grid; gap: 8px; }
.fb-form textarea, .fb-form input { width: 100%; font: 500 14px/1.4 var(--font); color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; resize: vertical; }
.fb-form textarea:focus, .fb-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 560px) { .feedback-card { right: 16px; left: 16px; width: auto; bottom: 16px; } }

/* modal grids never grow past the card; long segment rows wrap on phones */
.modal-card { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 560px) {
  #exportBg, #exportFormat { flex-wrap: wrap; justify-content: flex-start; }
  .export-row { flex-wrap: wrap; }
}

/* the title never gets squeezed: the toolbar drops to its own row when space runs out */
.stage-head { flex-wrap: wrap; row-gap: 10px; }
.stage-head > div:first-child { flex-shrink: 0; max-width: 100%; }
.stage-head .stage-tools { margin-left: auto; }

/* ---------- intro: 30-second demo above the visualizer (first visit only) ---------- */
.intro { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(18px, 3vw, 40px); align-items: center; max-width: 1480px; margin: clamp(14px, 2vw, 24px) auto 0; padding: clamp(18px, 2.6vw, 32px); width: calc(100% - 2 * clamp(16px, 3vw, 36px)); border-radius: var(--radius); background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 55%), var(--card); border: 1px solid var(--line-2); overflow: hidden; transition: opacity 0.35s var(--ease), max-height 0.45s var(--ease), margin 0.45s var(--ease), padding 0.45s var(--ease); max-height: 900px; }
.intro-off .intro:not(.open), body.embed .intro:not(.open), .intro[hidden] { display: none; }
.intro.closing { opacity: 0; max-height: 0; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
.intro h2 { margin: 2px 0 10px; font: 700 clamp(26px, 3vw, 40px)/1.04 var(--display); letter-spacing: -0.01em; text-transform: uppercase; }
.intro h2 span { color: var(--accent); }
.intro-lede { margin: 0 0 14px; color: var(--muted); font-size: 15.5px; line-height: 1.5; max-width: 46ch; }
.intro-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 14px; font-weight: 500; }
.intro-steps li { display: flex; align-items: center; gap: 9px; }
.intro-steps b { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--accent); color: var(--on-accent); font: 700 12px/1 var(--mono); }
.intro-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.intro-actions .link-btn { font-size: 13px; }
.intro-video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #170d26; border: 1px solid var(--line-2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.intro-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.intro-play { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; gap: 10px; padding: 16px; border: 0; background: linear-gradient(to top, rgba(23, 13, 38, 0.55), transparent 45%); color: #fff; font: 600 14px/1 var(--font); cursor: pointer; }
.intro-play svg { width: 44px; height: 44px; padding: 12px 10px 12px 14px; border-radius: 50%; background: var(--accent); fill: var(--on-accent); stroke: none; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.6); transition: transform 0.25s var(--spring); }
.intro-play:hover svg { transform: scale(1.08); }
.intro-video.playing .intro-play { display: none; }
.intro-close { position: absolute; top: 10px; right: 10px; z-index: 2; }
@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; }
  .intro-video { order: -1; }
}
@media (max-width: 560px) {
  .intro { width: calc(100% - 32px); padding: 14px; gap: 14px; }
  .intro h2 { font-size: 26px; padding-right: 0; }
  .intro-steps { display: none; }
  .intro-lede { font-size: 14.5px; margin-bottom: 10px; }
  .intro-close { top: 18px; right: 18px; background: rgba(23, 13, 38, 0.7); color: #fff; }
}
@media (prefers-reduced-motion: reduce) { .intro { transition: none; } }

/* patch fine-tuning */
.fine-tune { display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.fine-tune .control { margin: 0; }
.fine-tune[hidden], .fine-tune .control[hidden] { display: none; }

.demo-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; padding: 0; background: none; border: 0; color: var(--muted); font: 500 13px/1 var(--font); cursor: pointer; transition: color 0.2s; }
.demo-link svg { width: 14px; height: 14px; padding: 3px 2px 3px 4px; border-radius: 50%; background: var(--accent); fill: var(--on-accent); }
.demo-link:hover { color: var(--accent); }
body.presenting .demo-link { display: none; }

/* top bar: icon-only account buttons until there is room for labels */
@media (max-width: 1500px) {
  #signInBtn span, #libraryBtn span { display: none; }
  #signInBtn, #libraryBtn { width: 42px; padding: 0; justify-content: center; }
}
@media (max-width: 700px) { .brand-text { display: none; } }
@media (max-width: 560px) {
  .top-actions { gap: 6px; }
  #upgradeTop .up-price { display: none; }
}
@media (max-width: 1360px) { .plan-chip { display: none; } .topnav a:nth-child(n+3) { display: none; } }
@media (max-width: 1060px) { .topnav a:nth-child(n+2) { display: none; } }

/* client documents v2: fit-to-screen preview, sticky actions, edit/preview toggle on phones */
.docs-card { width: min(1240px, 100%); height: min(880px, calc(100vh - 32px)); max-height: none; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.docs-card .modal-head { align-items: center; }
.docs-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.docs-form { max-height: none; min-height: 0; overflow: auto; align-content: start; }
.docs-form .field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.docs-form .field-grid .span2 { grid-column: 1 / -1; }
.docs-form input[type='number'] { width: 100%; }
.doc-hint { margin: -4px 0 0; font-size: 13px; color: var(--muted); }
.docs-preview { position: static; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.doc-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, 0.18); }
.doc-sheet { position: relative; }
.docs-preview canvas { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 6px; background: #fff; box-shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.75); }
.docs-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.docs-actions .btn { flex: 0 0 auto; height: 44px; padding: 0 20px; }
.docs-actions .quote-btn { margin-left: auto; }
.docs-note { flex-basis: 100%; margin: 0; }
.docs-switch { display: none; margin-left: auto; margin-right: 8px; }
@media (max-width: 960px) {
  .docs-card { height: calc(100vh - 24px); }
  .docs-switch { display: inline-flex; }
  .docs-body { grid-template-columns: 1fr; }
  .docs-body[data-pane='edit'] .docs-preview { display: none; }
  .docs-body[data-pane='preview'] .docs-form { display: none; }
  .docs-actions .quote-btn { margin-left: 0; flex: 1 1 100%; }
  .docs-actions .btn { flex: 1 1 auto; }
  .docs-note { display: none; }
}
