/* ============================================================
   QR BC — vCard business card studio
   styles.css
============================================================ */

:root {
  --accent:        #DD4814;
  --accent-dark:   #BC3807;
  --accent-deep:   #8A2904;
  --accent-tint:   #FBF0EC;
  --accent-soft:   #FDE4D9;

  --cream:         #F4EFE7;
  --cream-2:       #EBE5D8;
  --paper:         #FFFCF7;
  --white:         #FFFFFF;
  --ink:           #1A1614;
  --ink-2:         #3A322E;
  --ink-3:         #6B6460;
  --ink-4:         #9C948D;
  --line:          #E0D7C9;
  --line-2:        #CFC4B2;

  --serif:         'Instrument Serif', 'Times New Roman', serif;
  --sans:          'Open Sans', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --mono:          'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     18px;
  --radius-xl:     24px;

  --shadow-1:      0 1px 2px rgba(26,22,20,.06), 0 1px 1px rgba(26,22,20,.04);
  --shadow-2:      0 8px 24px -8px rgba(26,22,20,.14), 0 2px 4px rgba(26,22,20,.05);
  --shadow-3:      0 32px 64px -24px rgba(26,22,20,.28), 0 6px 12px rgba(26,22,20,.08);
  --shadow-card:   0 28px 60px -24px rgba(26,22,20,.35), 0 10px 22px -10px rgba(26,22,20,.22);

  --ring:          0 0 0 3px rgba(221,72,20,.22);
  --t:             180ms cubic-bezier(.4,0,.2,1);
  --t-slow:        420ms cubic-bezier(.4,0,.2,1);
}

/* Theme variations */
body[data-theme="ink"]    { --accent: #1A1614; --accent-dark: #000; --accent-deep: #000; --accent-tint: #ECEAE6; --accent-soft: #D9D4CC; --ring: 0 0 0 3px rgba(26,22,20,.22); }
body[data-theme="forest"] { --accent: #1F6B43; --accent-dark: #145332; --accent-deep: #0E3C24; --accent-tint: #E9F2EC; --accent-soft: #CFE3D6; --ring: 0 0 0 3px rgba(31,107,67,.22); }
body[data-theme="navy"]   { --accent: #1E3A8A; --accent-dark: #152B67; --accent-deep: #0E1E47; --accent-tint: #E7ECF6; --accent-soft: #C9D2EB; --ring: 0 0 0 3px rgba(30,58,138,.22); }
body[data-theme="plum"]   { --accent: #7B2E5C; --accent-dark: #5C2245; --accent-deep: #3F172F; --accent-tint: #F2E7EE; --accent-soft: #E2C9D8; --ring: 0 0 0 3px rgba(123,46,92,.22); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  transition: background var(--t-slow);
}
::selection { background: var(--accent); color: white; }

/* Paper texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 38%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--accent) 4%, transparent), transparent 45%);
  pointer-events: none;
  z-index: 0;
  transition: background-image var(--t-slow);
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0.05 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
  opacity: 0.55;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

/* ============== TOPBAR ============== */
.topbar {
  position: sticky; top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1320px; margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
}
.brand-mark {
  position: relative;
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: grid; place-items: center;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 32%, transparent), inset 0 1px 0 rgba(255,255,255,.2);
  color: white;
  transition: background var(--t-slow), box-shadow var(--t-slow);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; gap: 2px; }
.brand-text .name { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -0.005em; }
.brand-text .tag { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--ink-4); letter-spacing: 0.08em; text-transform: uppercase; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.save-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--ink-3);
  background: var(--cream-2);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: var(--t);
}
.save-pill .ind {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2E8B47;
  box-shadow: 0 0 0 3px color-mix(in srgb, #2E8B47 20%, transparent);
  transition: var(--t);
}
.save-pill.is-saving .ind { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); animation: blink 1s infinite; }
.save-pill.is-empty .ind  { background: var(--ink-4); box-shadow: none; }
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .4 } }

.icon-btn {
  appearance: none;
  background: var(--cream-2);
  border: 1px solid var(--line);
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--ink-3);
  display: grid; place-items: center;
  cursor: pointer;
  transition: var(--t);
}
.icon-btn:hover { background: var(--paper); color: var(--accent); border-color: var(--line-2); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.icon-btn svg { width: 15px; height: 15px; }

.lang-switcher {
  display: inline-flex; gap: 2px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang-switcher button {
  appearance: none; border: 0; background: transparent;
  font: inherit;
  color: var(--ink-3);
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600; font-size: 11px;
  letter-spacing: 0.06em;
  transition: var(--t);
}
.lang-switcher button:hover { color: var(--ink); }
.lang-switcher button.is-active {
  background: var(--ink); color: white;
  box-shadow: 0 1px 2px rgba(26,22,20,.2);
}
.lang-switcher button:focus-visible { outline: none; box-shadow: var(--ring); }

/* ============== HERO ============== */
.hero {
  position: relative; z-index: 1;
}
.hero-inner {
  max-width: 1320px; margin: 0 auto;
  padding: 56px 28px 36px;
  max-width: min(1320px, 100vw);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}
.eyebrow-num {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--mono);
  transition: background var(--t-slow);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.022em;
  margin: 0 0 18px;
  color: var(--ink);
  text-wrap: balance;
  max-width: 900px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  transition: color var(--t-slow);
}
.hero-lead {
  font-size: 16px;
  color: var(--ink-2);
  max-width: 580px;
  margin: 0;
  text-wrap: pretty;
  line-height: 1.55;
}

/* ============== WORKSPACE ============== */
.workspace {
  position: relative; z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 28px;
  align-items: start;
}

/* ============== FORM ============== */
.form-col {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.form-head {
  padding: 20px 28px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--accent-tint) 0%, var(--paper) 100%);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  transition: background var(--t-slow);
}
.form-head .label {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color var(--t-slow);
}
.form-head .progress {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.form-head .progress-bar {
  width: 90px; height: 4px;
  background: var(--cream-2);
  border-radius: 2px;
  overflow: hidden;
}
.form-head .progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 320ms cubic-bezier(.4,0,.2,1), background var(--t-slow);
  border-radius: 2px;
}

.section {
  padding: 26px 28px;
  border-top: 1px solid var(--line);
}
.section:first-of-type { border-top: 0; }

.section-head {
  display: flex; align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.section-num {
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  color: var(--accent);
  font-weight: 400;
  min-width: 40px;
  padding-top: 4px;
  transition: color var(--t-slow);
}
.section-num em { font-style: italic; }
.section-titles { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.section-titles h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.section-titles .sub {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.45;
  max-width: 440px;
}
.section-pill {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  align-self: flex-start;
  margin-top: 6px;
}
.section-pill.is-req {
  color: var(--accent-deep);
  background: var(--accent-tint);
  border-color: var(--accent-soft);
  transition: var(--t-slow);
}

/* Fields */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field-grid .full { grid-column: 1 / -1; }

.field { position: relative; display: flex; flex-direction: column; }
.field label {
  font-size: 10.5px; font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.field input,
.field textarea {
  appearance: none;
  font: inherit;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  transition: var(--t);
  width: 100%;
  min-height: 44px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:hover, .field textarea:hover { border-color: var(--line-2); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.field.with-icon .input-wrap { position: relative; }
.field.with-icon .icon {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--ink-4);
  pointer-events: none;
  transition: var(--t);
}
.field.with-icon input { padding-left: 40px; }
.field.with-icon input:focus ~ .icon { color: var(--accent); }

/* Social rows */
.social-row {
  display: flex; align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  transition: var(--t);
}
.social-row:hover { border-color: var(--line-2); }
.social-row:focus-within {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.social-icon-box {
  display: flex; align-items: center;
  padding: 0 12px;
  background: var(--cream);
  border-right: 1.5px solid var(--line);
  color: var(--ink-3);
  flex-shrink: 0;
  transition: var(--t);
}
.social-row:focus-within .social-icon-box {
  background: var(--accent-tint);
  color: var(--accent);
  border-right-color: var(--accent-soft);
}
.social-icon-box svg { width: 15px; height: 15px; }
.social-prefix {
  display: inline-flex; align-items: center;
  padding: 0 4px 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-4);
  white-space: nowrap;
}
.social-row input {
  flex: 1;
  border: 0; background: transparent;
  padding: 11px 14px 11px 4px;
  font: inherit; font-size: 14px;
  color: var(--ink);
  min-height: 42px;
  outline: none;
}

/* ============== PREVIEW COL ============== */
.preview-col {
  position: sticky;
  top: 84px;
  display: flex; flex-direction: column;
  gap: 18px;
}

/* ===== Card stage ===== */
.card-stage {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 22px 18px;
  box-shadow: var(--shadow-2);
  perspective: 1400px;
  overflow: hidden;
}
.card-stage-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--ink) 6%, transparent), transparent 50%);
  pointer-events: none;
  transition: background-image var(--t-slow);
}
.card-stage::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0;
  opacity: 0.3;
  mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1), rgba(0,0,0,0) 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1), rgba(0,0,0,0) 70%);
  pointer-events: none;
}
.card-stage-label {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
  z-index: 2;
}
.card-stage-label .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  animation: pulse 2s ease-in-out infinite;
  transition: background var(--t-slow), box-shadow var(--t-slow);
}
.card-stage-label .side-label {
  margin-left: auto;
  color: var(--ink-4);
  font-weight: 500;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .5 } }

/* ===== Phone mockup ===== */
.stage-center {
  position: relative; z-index: 2;
  display: flex; justify-content: center;
  padding: 4px 0 10px;
}
.phone-shell {
  position: relative;
  width: min(252px, 78%);
  background: #161210;
  border-radius: 42px;
  padding: 10px;
  box-shadow: var(--shadow-card), inset 0 0 0 2px rgba(255,255,255,.07);
  transition: width var(--t);
}
.phone-screen {
  position: relative;
  border-radius: 33px;
  overflow: hidden;
  background: var(--paper);
}
.phone-screen canvas {
  display: block;
  width: 100%;
}
.phone-island {
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 72px; height: 21px;
  background: #000;
  border-radius: 12px;
  z-index: 4;
}
.phone-clock {
  position: absolute;
  top: 50px; left: 0; right: 0;
  z-index: 3;
  text-align: center;
  color: white;
  pointer-events: none;
  text-shadow: 0 2px 14px rgba(0,0,0,.5);
  display: flex; flex-direction: column; gap: 3px;
}
.phone-clock[hidden] { display: none; }
.phone-clock .pc-time {
  font-size: 46px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
}
.phone-clock .pc-date {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em;
  opacity: .92;
}
/* Classic (horizontal) mode — no bezel */
.phone-shell.no-phone {
  width: 100%;
  background: transparent;
  padding: 0;
  border-radius: 14px;
  box-shadow: none;
}
.no-phone .phone-screen {
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.no-phone .phone-island { display: none; }

/* Format chips */
.format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fmt-chip {
  appearance: none;
  border: 1.5px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: 10px 6px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: var(--t);
  font: inherit;
  color: var(--ink-3);
}
.fmt-chip svg { width: 18px; height: 18px; }
.fmt-chip:hover { border-color: var(--line-2); color: var(--ink); }
.fmt-chip:focus-visible { outline: none; box-shadow: var(--ring); }
.fmt-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.fmt-chip .fmt-name {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.03em;
  text-align: center;
}
.fmt-chip.is-active .fmt-name { color: var(--accent-deep); }

/* ===== Controls ===== */
.controls {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.control-block {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.control-block:first-child { border-top: 0; }

.control-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.control-label {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.control-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.03em;
  font-weight: 500;
  transition: color var(--t-slow);
}

/* Template chips */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tpl-chip {
  appearance: none; border: 1.5px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px 10px 10px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: var(--t);
  font: inherit;
}
.tpl-chip:hover { border-color: var(--line-2); }
.tpl-chip:focus-visible { outline: none; box-shadow: var(--ring); }
.tpl-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.tpl-chip .tpl-name {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.tpl-chip.is-active .tpl-name { color: var(--accent-deep); }

.tpl-icon {
  display: flex; flex-direction: column; gap: 3px;
  width: 50px; height: 32px;
  background: var(--cream);
  border-radius: 4px;
  padding: 5px 6px;
  position: relative;
  align-items: flex-start;
}
.tpl-bar {
  position: absolute; top: 0; right: 0;
  width: 12px; height: 3px;
  background: var(--accent);
  transition: background var(--t-slow);
}
.tpl-text { display: flex; gap: 2px; }
.tpl-text i {
  display: block; width: 18px; height: 4px;
  background: var(--ink);
  border-radius: 1px;
}
.tpl-text:nth-child(3) i { width: 12px; background: var(--ink-3); height: 2px; }

.tpl-icon-mono {
  padding: 4px 6px;
  background: white;
  border: 1px solid var(--line);
  font-family: var(--mono);
  gap: 2px;
  justify-content: center;
}
.tpl-icon-mono .mono-line {
  display: block; width: 100%; height: 2px;
  background: var(--ink);
  border-radius: 0;
}
.tpl-icon-mono .mono-line.short { width: 60%; }

.tpl-icon-bold {
  padding: 0;
  overflow: hidden;
  flex-direction: row;
  align-items: stretch;
}
.tpl-icon-bold .bold-block {
  width: 40%;
  background: var(--accent);
  transition: background var(--t-slow);
}
.tpl-icon-bold .bold-lines {
  flex: 1;
  display: flex; flex-direction: column;
  gap: 3px; padding: 6px 5px;
  background: var(--cream);
  justify-content: center;
}
.tpl-icon-bold .bold-lines i {
  display: block; height: 2px;
  background: var(--ink-3);
  border-radius: 1px;
}
.tpl-icon-bold .bold-lines i:nth-child(1) { background: var(--ink); width: 80%; height: 3px; }
.tpl-icon-bold .bold-lines i:nth-child(2) { width: 60%; }
.tpl-icon-bold .bold-lines i:nth-child(3) { width: 70%; }

/* Color swatches */
.color-row {
  display: flex; align-items: center; gap: 10px;
}
.swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1.5px var(--line);
  cursor: pointer;
  transition: var(--t);
  position: relative;
  appearance: none;
}
.swatch:hover { transform: scale(1.08); }
.swatch:focus-visible { outline: none; box-shadow: 0 0 0 1.5px var(--line), var(--ring); }
.swatch.is-active {
  box-shadow: 0 0 0 2px var(--c), 0 0 0 4px var(--paper), 0 0 0 5.5px var(--c);
  transform: scale(1.06);
}
.swatch.is-active::after {
  content: '';
  position: absolute;
  inset: 8px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Photo drop */
.photo-row { display: flex; align-items: center; gap: 10px; }
.photo-drop {
  flex: 1;
  display: flex; align-items: center; gap: 12px;
  padding: 10px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: var(--t);
}
.photo-drop:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.photo-drop.has-photo { border-style: solid; border-color: var(--accent-soft); background: var(--accent-tint); }
.photo-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: var(--cream);
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.photo-thumb svg { width: 22px; height: 22px; color: var(--ink-4); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-info { display: flex; flex-direction: column; line-height: 1.25; gap: 1px; min-width: 0; }
.photo-info .photo-title {
  font-size: 13px; font-weight: 600;
  color: var(--ink);
}
.photo-info .photo-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.photo-remove {
  appearance: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  color: var(--ink-3);
  display: grid; place-items: center;
  cursor: pointer;
  transition: var(--t);
}
.photo-remove:hover { background: var(--accent-tint); color: var(--accent); border-color: var(--accent-soft); }
.photo-remove svg { width: 14px; height: 14px; }
.photo-remove:focus-visible { outline: none; box-shadow: var(--ring); }

/* ============== ACTIONS ============== */
.actions {
  display: flex; flex-direction: column; gap: 8px;
}
.btn {
  appearance: none; border: 0;
  font-family: var(--sans); font-weight: 700;
  cursor: pointer;
  padding: 13px 16px;
  border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  gap: 9px;
  transition: var(--t);
  font-size: 13px;
  min-height: 46px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.btn svg { width: 15px; height: 15px; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 32%, transparent), inset 0 1px 0 rgba(255,255,255,.18);
  transition: var(--t), background var(--t-slow);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 42%, transparent);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  background: var(--line-2); color: white;
  cursor: not-allowed; transform: none; box-shadow: none;
  opacity: 0.6;
}

.btn-secondary {
  background: var(--white);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  transition: var(--t), color var(--t-slow), border-color var(--t-slow);
}
.btn-secondary:hover { background: var(--accent-tint); }
.btn-secondary:disabled {
  background: var(--cream); color: var(--ink-4);
  border-color: var(--line);
  cursor: not-allowed;
}
.action-row {
  display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px;
}

/* ============== FOOTER ============== */
.footer {
  position: relative; z-index: 1;
  background: var(--ink);
  color: var(--cream);
  padding: 64px 28px 32px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1320px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}
.footer-brand h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  color: white;
  text-wrap: balance;
}
.footer-brand h3 em { color: var(--accent); font-style: italic; transition: color var(--t-slow); }
.footer-brand p {
  font-size: 13px;
  color: rgba(244,239,231,.6);
  max-width: 380px;
  margin: 0;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: rgba(244,239,231,.5);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li {
  font-size: 13px;
  color: rgba(244,239,231,.75);
  display: flex; align-items: center; gap: 8px;
}
.footer-col ul li::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  transition: background var(--t-slow);
}
.footer-credit {
  max-width: 1320px; margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(244,239,231,.1);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(244,239,231,.5);
  letter-spacing: 0.04em;
}
.footer-credit b { color: var(--cream); font-weight: 500; }

/* ============== TOASTS ============== */
.toast-stack {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px;
  z-index: 100;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: white;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-3);
  display: inline-flex; align-items: center; gap: 10px;
  animation: tin 240ms cubic-bezier(.4,0,.2,1);
  pointer-events: auto;
}
.toast svg { width: 14px; height: 14px; color: var(--accent); }
.toast.is-out { animation: tout 200ms forwards; }
@keyframes tin { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: translateY(0) } }
@keyframes tout { to { opacity: 0; transform: translateY(8px) } }

/* ============== MOBILE ============== */
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .preview-col {
    position: static;
    order: -1;
  }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .topbar-inner { padding: 12px 18px; gap: 10px; }
  .save-pill { display: none; }
  .brand-text .tag { display: none; }
  .hero-inner { padding: 36px 18px 24px; }
  .workspace { padding: 0 18px 48px; }
  .form-head { padding: 16px 20px; }
  .section { padding: 22px 20px; }
  .section-head { gap: 12px; }
  .section-num { font-size: 22px; min-width: 30px; }
  .section-titles h2 { font-size: 22px; }
  .field-grid { grid-template-columns: 1fr; }
  .card-stage { padding: 22px 16px 14px; }
  .action-row { grid-template-columns: 1fr 1fr; }
  .action-row > :last-child { grid-column: 1 / -1; }
  .footer { padding: 44px 20px 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-credit { flex-direction: column; gap: 8px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card-3d { transition: none !important; }
}
