*,*::before,*::after{box-sizing:border-box}:root{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}body{margin:0}img{max-width:100%}[hidden]{display:none!important}
@font-face{font-family:"Figtree";font-style:normal;font-weight:400 800;font-display:swap;src:url("fonts/figtree-latin-ext.woff2") format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:"Figtree";font-style:normal;font-weight:400 800;font-display:swap;src:url("fonts/figtree-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Gelasio";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/gelasio-latin-ext.woff2") format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:"Gelasio";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/gelasio-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

/* Layout: two-column workbench, form steps on the left, live branded preview pinned on the right; stacks on phones with preview first. */
:root {
  --bg: #FAF7F5;
  --surface: #FFFFFF;
  --fg: #282828;
  --muted: #6B6262;
  --line: #E9E0DD;
  --accent: #D31A2B;
  --accent-ink: #B0142A;
  --accent-soft: #FBE7E8;
  --stage: #EEE8E5;
  --ok: #3E7E52;
  --font: "Figtree", "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Gelasio", serif;
  --kv: linear-gradient(to bottom, #B22B3A 0 7.14%, #D31A2B 0 14.28%, #C02D46 0 21.42%, #DF5D41 0 28.56%, #B8945D 0 35.7%, #75A478 0 42.84%, #7BB36D 0 49.98%, #8CC375 0 57.12%, #85BE57 0 64.26%, #97C77B 0 71.4%, #CBC461 0 78.54%, #D59F43 0 85.68%, #E56024 0 92.82%, #D31A2B 0 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1C1A1A; --surface: #262223; --fg: #F3EEEC; --muted: #A99F9F; --line: #3A3434;
    --accent: #E8404F; --accent-ink: #F2727D; --accent-soft: #3A1E22; --stage: #141212; --ok: #7CC48F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1C1A1A; --surface: #262223; --fg: #F3EEEC; --muted: #A99F9F; --line: #3A3434;
  --accent: #E8404F; --accent-ink: #F2727D; --accent-soft: #3A1E22; --stage: #141212; --ok: #7CC48F;
  color-scheme: dark;
}
.kv { height: 56px; border-radius: 10px; background: var(--kv); }
.dates { font-family: var(--serif); font-size: 17px; color: var(--muted); margin: 0; }
html, body { background: var(--bg); color: var(--fg); }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 28px 56px;
}
.wrap { max-width: 1200px; margin: 0 auto; display: grid; gap: 28px; }
header.intro { display: grid; gap: 8px; max-width: 70ch; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.12; margin: 0; font-weight: 800; text-wrap: balance; }
.lede { margin: 0; color: var(--muted); font-size: 16px; }
.app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.steps { display: grid; gap: 18px; min-width: 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 14px; min-width: 0; }
.step h2 { margin: 0; font-size: 17px; font-weight: 700; display: flex; gap: 10px; align-items: baseline; }
.step h2 .n { font-size: 13px; font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.hint { margin: 0; color: var(--muted); font-size: 13.5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
label, .lbl { font-size: 13px; font-weight: 600; }
input[type="text"], select, textarea {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; width: 100%; box-sizing: border-box; min-width: 0;
}
textarea { resize: vertical; min-height: 170px; line-height: 1.45; }
input::placeholder { color: var(--muted); opacity: .75; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .choice:focus-within {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn {
  font: inherit; font-weight: 600; border-radius: 8px; padding: 10px 16px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.upload { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drop {
  border: 1.5px dashed var(--line); border-radius: 10px; padding: 16px; text-align: center; cursor: pointer;
  display: grid; gap: 4px; background: var(--bg); position: relative;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { font-size: 15px; }
.drop span { font-size: 12.5px; color: var(--muted); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.adjust { display: grid; gap: 10px; }
.slider { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; font-size: 13px; }
input[type="range"] { accent-color: var(--accent); width: 100%; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; background: var(--bg); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { font-size: 14px; }
.choice small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.media-info { font-size: 13px; color: var(--muted); }
.status { font-size: 13.5px; min-height: 1.4em; color: var(--muted); }
.status.ok { color: var(--ok); }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.preview-col { position: sticky; top: max(16px, env(safe-area-inset-top, 0px)); display: grid; gap: 12px; min-width: 0; }
.stage { background: var(--stage); border-radius: 14px; padding: 18px; display: grid; place-items: center; }
.stage canvas { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; border-radius: 4px; box-shadow: 0 6px 24px rgba(0,0,0,.18); touch-action: none; cursor: grab; }
.stage canvas.nomedia { cursor: default; }
.stage-note { font-size: 12.5px; color: var(--muted); text-align: center; margin: 0; }
.result { display: grid; gap: 10px; }
.result video { width: 100%; max-height: 50vh; border-radius: 8px; background: #000; }
.tips { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; display: grid; gap: 4px; }
.share { display: flex; flex-wrap: wrap; gap: 10px; }
.share a { color: var(--accent-ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.vhidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -9999px; top: 0; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .preview-col { position: static; order: -1; }
  .stage canvas { max-height: 60vh; }
}
@media (max-width: 520px) {
  .grid2, .upload { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .progress > i { transition: none; } }
