/* /disena/ : phone first. Stage (photo) on top, controls below, a fixed action bar at the bottom.
   ≥ 900 px: stage sticky on the left, controls on the right. Light only (matches the marketing site). */
:root {
  --paper: #fbf8f1; --card: #ffffff; --ink: #14161a; --ink-2: #555a52; --line: #e6dfcf;
  --green: #1f6f5c; --green-2: #17594a; --gold: #f2b23a; --soft: #f3efe4;
  --display: "Gabarito", "Avenir Next", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --r: 8px; --tap: 48px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); -webkit-tap-highlight-color: transparent; padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
img { max-width: 100%; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.dz-top { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.dz-logo { display: flex; }
.dz-logo img { height: 28px; width: auto; }
.dz-free { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--green); background: #e7f1ed; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.dz-lang { min-height: 36px; min-width: 44px; border: 1px solid var(--line); background: var(--card); border-radius: var(--r); font-weight: 700; font-size: 13px; cursor: pointer; }

.dz-main { max-width: 1120px; margin: 0 auto; padding: 14px 16px 24px; display: grid; gap: 18px; }
.dz-stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dz-stage h1 { font: 900 clamp(28px, 7vw, 44px)/1.05 var(--display); margin: 2px 0 0; letter-spacing: -0.01em; text-wrap: balance; }
.dz-products { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.dz-products::-webkit-scrollbar { display: none; }
.dz-frame { position: relative; border-radius: 14px; overflow: hidden; background: var(--soft); box-shadow: 0 10px 30px -12px rgba(20, 22, 26, .35); aspect-ratio: 1 / 1; max-width: 100%; }
.dz-frame canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.dz-busy { position: absolute; right: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); border-top-color: var(--green); animation: dz-spin .8s linear infinite; }
@keyframes dz-spin { to { transform: rotate(360deg); } }
.dz-scenes { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.dz-scene { flex: 0 0 auto; width: 56px; height: 56px; border-radius: var(--r); border: 2px solid transparent; background: var(--soft) center / cover no-repeat; cursor: pointer; padding: 0; }
.dz-scene.is-on { border-color: var(--green); box-shadow: 0 0 0 2px var(--paper) inset; }
.dz-ai { margin: 0; font-size: 12.5px; color: var(--ink-2); }

.dz-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dz-field { display: flex; flex-direction: column; gap: 6px; }
.dz-field > label, .dz-group legend, .dz-upload > span, .dz-sliders span { font-weight: 700; font-size: 14px; letter-spacing: .01em; }
.dz-field input[type="text"] { min-height: 52px; padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--r); background: var(--card); font-size: 18px; font-weight: 600; }
.dz-field input[type="text"]:focus { border-color: var(--green); outline: none; }
.dz-group { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dz-group legend { padding: 0; margin-bottom: 8px; }
.dz-group[hidden] { display: none; }

.dz-chips, .dz-ideas, .dz-icons { display: flex; gap: 8px; flex-wrap: wrap; }
.dz-ideas { margin-top: -4px; }
.dz-chip { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-size: 15px; line-height: 1.1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: transform .12s ease, background .12s ease; }
.dz-chip:active { transform: scale(.96); }
.dz-chip.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.dz-ideas .dz-chip { min-height: 38px; font-size: 14px; background: var(--soft); border-color: transparent; }
.dz-icons .dz-chip { width: 52px; height: 52px; padding: 0; border-radius: var(--r); }
.dz-icons .dz-chip:first-child { width: auto; padding: 0 14px; }
.dz-icons .dz-chip.is-on { background: #e7f1ed; color: var(--green); border-color: var(--green); }
.dz-products .dz-chip { font-weight: 700; flex: 0 0 auto; }

.dz-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.dz-sw { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--sw); cursor: pointer; padding: 0; position: relative; }
.dz-sw.is-on { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--green); border-color: transparent; }

.dz-upload { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
.dz-upload > span { flex: 1 1 100%; }
.dz-sliders { display: grid; gap: 12px; }
.dz-sliders label { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 10px; }
.dz-sliders input[type="range"] { width: 100%; accent-color: var(--green); min-height: 36px; }

.dz-btn { min-height: var(--tap); padding: 0 20px; border-radius: var(--r); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.dz-btn-primary { background: var(--gold); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.dz-btn-primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.dz-btn-ghost { background: var(--card); color: var(--ink); border-color: var(--ink); }
.dz-btn[disabled] { opacity: .6; }
.dz-link { background: none; border: 0; color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }

.dz-sell { background: var(--green); color: #fff; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.dz-sell h2 { font: 800 24px/1.15 var(--display); margin: 0; }
.dz-sell p { margin: 0; color: #dcebe5; }
.dz-sell .dz-link { color: #fff; }
.dz-lead { display: grid; gap: 10px; width: 100%; }
.dz-l { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.dz-l input, .dz-l select { min-height: 48px; border-radius: var(--r); border: 2px solid transparent; padding: 8px 12px; font-size: 16px; background: #fff; color: var(--ink); width: 100%; }
.dz-l input:focus, .dz-l select:focus { border-color: var(--gold); outline: none; }
.dz-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #dcebe5; }
.dz-consent input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--gold); flex: 0 0 auto; }
.dz-consent a { color: #fff; }
.dz-lead .dz-btn { width: 100%; }
.dz-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dz-status { margin: 0; min-height: 1.2em; font-weight: 600; scroll-margin-bottom: 110px; }
.is-invalid { outline: 3px solid #ffd38a !important; outline-offset: 2px; border-radius: var(--r); }
.dz-l input, .dz-l select, .dz-consent { scroll-margin-bottom: 120px; scroll-margin-top: 90px; }
.dz-thanks { width: 100%; background: #fff; color: var(--ink); border-radius: 14px; padding: 22px; display: grid; gap: 8px; justify-items: start; scroll-margin-bottom: 120px; }
.dz-thanks:focus { outline: none; }
.dz-thanks-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font: 900 28px var(--display); }
.dz-thanks h3 { font: 900 26px/1.1 var(--display); margin: 0; color: var(--green); }
.dz-thanks p { margin: 0; color: var(--ink); }
.dz-status.is-err { color: #ffd38a; }
.dz-status.is-ok { color: #fff; background: rgba(255,255,255,.12); padding: 10px 12px; border-radius: var(--r); }

.dz-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: rgba(251, 248, 241, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.dz-bar .dz-btn { width: 100%; padding: 0 10px; }

.dz-toast { position: fixed; left: 16px; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); margin: 0 auto; max-width: 420px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r); opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; z-index: 7; }
.dz-toast.is-on { opacity: 1; transform: none; }

/* phone: the stage's children join the main grid, so the pinned preview stays on screen while the controls scroll under it */
@media (max-width: 899px) {
  .dz-stage { display: contents; }
  .dz-pin { position: sticky; top: 57px; z-index: 4; background: var(--paper); margin: 0 -16px; padding: 4px 16px 10px; }
  .dz-frame { width: min(100%, 46vh); margin: 0 auto; }
  .dz-stage h1, .dz-products, .dz-scenes, .dz-ai { order: 0; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .dz-main { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; padding-top: 28px; align-items: start; }
  .dz-stage { position: sticky; top: 76px; }
  .dz-frame { width: min(100%, calc(100vh - 230px)); }
  .dz-bar { position: static; background: none; border: 0; padding: 0; backdrop-filter: none; max-width: 1120px; margin: -8px auto 40px; padding-inline: 16px; grid-template-columns: 220px 220px; justify-content: start; }
  .dz-products { margin: 0; padding: 2px 0; }
}
@media (prefers-reduced-motion: reduce) { .dz-busy { animation: none; } .dz-chip, .dz-toast { transition: none; } }
