/* ==========================================================================
   wa.mdesigner — hoja de estilos única
   Identidad: mdesigner.co (tinta, papel, dorado, azul)
   ========================================================================== */

@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/source-sans-3.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Anybody';
  src: url('../fonts/anybody.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif Display';
  src: url('../fonts/noto-serif-display-italic-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f9f7f4;
  --bg-deep: #efedeb;
  --surface: #ffffff;
  --surface-soft: #f9f7f4;
  --surface-muted: #efedeb;
  --paper: #f1ede4;
  --paper-deep: #e8e1d3;
  --ink: #121820;
  --ink-soft: #263346;
  --muted: #59616b;
  --muted-2: #7d8ea3;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.2);
  --gold: #d68b26;
  --gold-deep: #b06f12;
  --gold-ink: #8a5f13;
  --gold-soft: #fff6e8;
  --blue: #125573;
  --blue-deep: #0d4057;
  --blue-soft: #eaf6fd;
  --success: #166534;
  --success-soft: #ecfdf3;
  --warning: #9a3412;
  --warning-soft: #fff7ed;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --chat-bg: #efe7d9;
  --chat-bubble: #ffffff;
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.09);
  --shadow-strong: 0 28px 70px rgba(15, 23, 42, 0.18);
  --ring: 0 0 0 3px rgba(38, 160, 214, 0.28);
  --radius-lg: 12px;
  --radius: 8px;
  --radius-sm: 5px;
  --font-sans: 'Source Sans 3', 'Segoe UI', sans-serif;
  --font-serif: 'Anybody', 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
  --wrap: 1220px;
  --header-h: 74px;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b1117;
  --bg-deep: #070c11;
  --surface: #141c26;
  --surface-soft: #101821;
  --surface-muted: #1a2431;
  --paper: #1c2634;
  --paper-deep: #232f40;
  --ink: #f2f6fb;
  --ink-soft: #dbe5f0;
  --muted: #9fb0c3;
  --muted-2: #7e91a8;
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.22);
  --gold: #e2a24a;
  --gold-deep: #d68b26;
  --gold-ink: #f0b35e;
  --gold-soft: rgba(214, 139, 38, 0.13);
  --blue: #4db8e8;
  --blue-deep: #38a6d8;
  --blue-soft: rgba(38, 160, 214, 0.14);
  --success: #7ee2a8;
  --success-soft: rgba(22, 101, 52, 0.22);
  --warning: #fbbf24;
  --warning-soft: rgba(154, 52, 18, 0.24);
  --danger: #fca5a5;
  --danger-soft: rgba(185, 28, 28, 0.2);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.34);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
  --shadow-strong: 0 32px 90px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 3px rgba(77, 184, 232, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% -8%, rgba(38, 160, 214, 0.12), transparent 34rem),
    radial-gradient(circle at 92% 2%, rgba(214, 139, 38, 0.13), transparent 30rem),
    radial-gradient(rgba(18, 24, 32, 0.055) 1px, transparent 1px);
  background-size: auto, auto, 22px 22px;
  background-attachment: fixed;
  overflow-x: hidden;
}

html[data-theme='dark'] body {
  background-image:
    radial-gradient(circle at 12% -8%, rgba(38, 160, 214, 0.14), transparent 34rem),
    radial-gradient(circle at 92% 2%, rgba(214, 139, 38, 0.12), transparent 30rem),
    radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
}

::selection {
  background: rgba(214, 139, 38, 0.28);
  color: var(--ink);
}

img,
svg,
canvas {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

h3 {
  font-weight: 650;
  line-height: 1.25;
}

a {
  color: var(--blue-deep);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--gold-ink);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
a[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.5;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:focus-visible {
  outline: 2px solid var(--blue-deep);
  outline-offset: 2px;
  box-shadow: var(--ring);
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 28px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}
.skip-link:focus {
  transform: translateY(0);
  color: var(--surface);
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

.brand-slash {
  color: var(--muted-2);
  font-size: 20px;
  font-weight: 300;
  margin-inline: -2px;
}

.brand-product {
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-dot {
  color: var(--gold);
}

.main-nav {
  display: flex;
  gap: 24px;
  margin-left: 10px;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover {
  color: var(--ink);
  border-color: var(--gold);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.net-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.net-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.net-pill.is-offline .net-dot {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 139, 38, 0.18);
}

.net-pill.is-offline {
  color: var(--gold-ink);
  border-color: rgba(214, 139, 38, 0.4);
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
  background: var(--surface-soft);
}

.history-label {
  font-size: 12px;
  font-weight: 600;
}

.count-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: #121820;
  font-size: 10px;
  font-weight: 800;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  text-align: center;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-gold {
  background: var(--gold);
  color: #121820;
  box-shadow: 0 10px 22px rgba(214, 139, 38, 0.24);
}
.btn-gold:hover {
  background: #c47d1c;
  color: #121820;
}

.btn-dark {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}
.btn-dark:hover {
  background: var(--ink-soft);
  color: var(--surface);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: var(--ink);
  background: var(--surface-soft);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface);
  color: var(--ink);
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
}

.text-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--gold-ink);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(214, 139, 38, 0.4);
  text-underline-offset: 3px;
}
.text-btn:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}
.text-btn-danger {
  color: var(--danger);
  text-decoration-color: transparent;
}
.text-btn-danger:hover {
  color: var(--danger);
  text-decoration-color: var(--danger);
}
.text-btn-light {
  color: var(--gold);
}
.text-btn-light:hover {
  color: #ffffff;
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 64px 0 44px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: 64px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(214, 139, 38, 0.14);
}

.hero h1 {
  font-size: clamp(3rem, 6.4vw, 5.15rem);
  max-width: 13ch;
  color: var(--ink);
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-ink);
  text-decoration: underline;
  text-decoration-color: rgba(214, 139, 38, 0.45);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.12em;
}

.hero-lede {
  margin-top: 24px;
  max-width: 50ch;
  font-size: 17px;
  color: var(--muted);
}

.hero-lede code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-muted);
  color: var(--ink-soft);
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-list span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 10px;
  font-weight: 900;
}

.hero-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted-2);
}

/* ticket */
.hero-ticket {
  position: relative;
  width: 100%;
  max-width: 430px;
  justify-self: end;
  background: #121820;
  color: #f3f7fb;
  border-radius: 22px;
  box-shadow: var(--shadow-strong), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transform: rotate(-1.6deg);
  overflow: hidden;
  isolation: isolate;
}

.hero-ticket::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.55;
  z-index: -1;
}

.hero-ticket::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: calc(100% + 400px) 0 0 0 var(--bg);
  transform: translateY(-50%);
}

.ticket-top,
.ticket-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(243, 247, 251, 0.62);
}

.ticket-top {
  border-bottom: 1px dashed rgba(243, 247, 251, 0.18);
}

.ticket-number {
  color: var(--gold);
}

.ticket-body {
  padding: 24px;
}

.ticket-title {
  font-family: var(--font-serif);
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #f3f7fb;
}

.ticket-link {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #f3f7fb;
  word-break: break-all;
}
.ticket-link span {
  color: rgba(243, 247, 251, 0.5);
}

.ticket-qr {
  width: 92px;
  height: 92px;
  margin: 18px auto 14px;
  padding: 8px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.ticket-qr canvas,
.ticket-qr img {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.ticket-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(243, 247, 251, 0.12);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(243, 247, 251, 0.48);
}
.ticket-meta strong {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--gold);
}

.ticket-bottom {
  background: var(--gold);
  color: #121820;
  font-weight: 700;
  padding-block: 12px;
}

/* ------------------------------------------------------------------ workspace */

.workspace {
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-soft);
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-muted);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.toolbar-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(330px, 0.78fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: clip;
}

.form-panel {
  padding: 30px;
  min-width: 0;
}

.preview-panel {
  padding: 24px;
  background: linear-gradient(180deg, var(--surface-soft), var(--surface));
  border-left: 1px solid var(--border);
  min-width: 0;
}

.preview-panel > * {
  max-width: 420px;
  margin-inline: auto;
}

/* ------------------------------------------------------------------ steps & form */

.step {
  margin: 0 0 26px;
  padding: 0 0 24px;
  border: 0;
  border-bottom: 1px dashed var(--border-strong);
}

.step:last-of-type {
  border-bottom: 0;
  padding-bottom: 4px;
}

.step-tight {
  margin-bottom: 18px;
  padding-bottom: 18px;
}

.step legend {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.step-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-ink);
}

.field-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.38fr) minmax(0, 1fr);
  gap: 14px;
}

.field-row > .field:only-child {
  grid-column: 1 / -1;
}

.field {
  min-width: 0;
  margin-bottom: 14px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label,
.color-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-soft);
}

.optional {
  font-weight: 400;
  color: var(--muted-2);
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.char-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.char-count.is-near {
  color: var(--gold-ink);
}
.char-count.is-over {
  color: var(--danger);
}

input[type='text'],
input[type='tel'],
input[type='search'],
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue-deep);
  box-shadow: var(--ring);
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235f7288' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

html[data-theme='dark'] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%239fb0c3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.select-wrap {
  position: relative;
}

.phone-input-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.phone-input-wrap:focus-within {
  border-color: var(--blue-deep);
  box-shadow: var(--ring);
}

.phone-input-wrap input {
  border: 0;
  border-radius: 0;
  min-height: 44px;
  padding-left: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.phone-input-wrap input:focus {
  box-shadow: none;
}

.dial-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-right: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.field-hint {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted-2);
}

.field-status {
  min-height: 20px;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.45;
}
.field-status.is-error {
  color: var(--danger);
}
.field-status.is-ok {
  color: var(--success);
}
.field-status.is-warn {
  color: var(--warning);
}

.message-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.template-strip {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.strip-label {
  display: block;
  margin-bottom: 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 550;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
}

.chip.is-active {
  border-color: var(--gold);
  background: var(--gold);
  color: #fff;
}

.chip.is-active::before {
  background: #fff;
}

.chip::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.values-panel {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid rgba(214, 139, 38, 0.32);
  border-radius: 14px;
  background: var(--gold-soft);
}

.values-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.values-head p {
  font-size: 12px;
  color: var(--muted);
}
.values-head strong {
  color: var(--ink);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.values-grid .field {
  margin: 0;
}

.values-grid input {
  min-height: 40px;
  padding: 8px 11px;
  font-size: 13px;
}

.values-grid .field-hint {
  margin-top: 3px;
  font-size: 10.5px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.form-actions .btn {
  flex: 1 1 190px;
}

.form-actions-stack {
  flex-direction: column;
}

.form-actions-stack .btn {
  flex-basis: auto;
  width: 100%;
}

/* ------------------------------------------------------------------ preview */

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.preview-head h2 {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.live-badge span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.chat-mock {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: #efe7d9;
  box-shadow: var(--shadow-soft);
}

.chat-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: #121820;
  color: #f3f7fb;
}

.chat-avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: var(--gold);
  color: #121820;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  font-weight: 600;
  text-transform: uppercase;
}

.chat-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.chat-id strong {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-id span {
  font-size: 10.5px;
  color: rgba(243, 247, 251, 0.58);
  font-variant-numeric: tabular-nums;
}

.chat-icon {
  margin-left: auto;
  color: rgba(243, 247, 251, 0.55);
}

.chat-body {
  min-height: 268px;
  padding: 16px 13px 12px;
  background-image: radial-gradient(rgba(18, 24, 32, 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}

.chat-day {
  align-self: center;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  color: #6b7a8c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.chat-bubble {
  position: relative;
  align-self: flex-start;
  max-width: 90%;
  padding: 8px 10px 6px;
  border-radius: 10px 10px 10px 2px;
  background: #ffffff;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.08);
  color: #121820;
}

.chat-bubble p {
  font-size: 13.2px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.chat-bubble .token {
  padding: 0 2px;
  border-radius: 3px;
  background: #fff1d6;
  color: #8a5f13;
  font-weight: 600;
}

.chat-time {
  display: block;
  margin-top: 3px;
  text-align: right;
  font-size: 9px;
  color: #7d8a99;
  font-variant-numeric: tabular-nums;
}
.checks {
  color: #26a0d6;
  letter-spacing: -0.16em;
  margin-left: 2px;
}

.chat-empty {
  align-self: flex-start;
  max-width: 96%;
  font-size: 11px;
  color: #6b7a8c;
  font-style: italic;
  padding: 2px 4px;
}

.chat-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  background: #f7f4ee;
  border-top: 1px solid rgba(18, 24, 32, 0.08);
  color: #8b97a5;
  font-size: 11.5px;
}

.chat-send {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: #121820;
  font-size: 12px;
}

.link-card {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.link-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.link-length {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0;
  color: var(--muted);
}

.link-output {
  display: block;
  max-height: 104px;
  overflow: auto;
  padding: 10px;
  border-radius: 9px;
  background: var(--surface-2, var(--surface-soft));
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
  word-break: break-all;
  -webkit-overflow-scrolling: touch;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.link-output.is-empty {
  border-style: dashed;
  background: transparent;
  color: var(--muted-2);
  font-style: italic;
}

.copy-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
  border: 1px solid rgba(214, 139, 38, 0.3);
  border-radius: 9px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 12.5px;
  font-weight: 700;
  transition: background 0.15s ease;
}
.copy-full:hover {
  background: rgba(214, 139, 38, 0.2);
}

.validation-msg {
  min-height: 0;
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
.validation-msg:empty {
  display: none;
}
.validation-msg.is-error {
  color: var(--danger);
}
.validation-msg.is-warn {
  color: var(--warning);
}
.validation-msg.is-ok {
  color: var(--success);
}

.preview-actions {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}
.preview-actions .btn {
  flex: 1;
}

.mini-qr-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.mini-qr-card canvas {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  image-rendering: pixelated;
}

.mini-qr-card strong {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
}
.mini-qr-card p {
  margin: 2px 0 4px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.preview-foot {
  margin-top: 14px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted-2);
  text-align: center;
}

/* ------------------------------------------------------------------ QR studio */

.qr-studio {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 26px;
  align-items: start;
}

.qr-preview-card {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, var(--gold-soft), transparent 70%),
    var(--surface-soft);
  text-align: center;
}

.qr-canvas-wrap {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

#qrCanvas {
  width: min(100%, 340px);
  height: auto;
  display: block;
  image-rendering: pixelated;
}

.qr-caption {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.qr-scan-note {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.preset {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.preset:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.preset.is-active {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.preset-swatch {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: linear-gradient(135deg, var(--swatch-fg) 50%, var(--swatch-bg) 50%);
}

.color-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.color-control {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
}

.color-control input[type='color'] {
  width: 32px;
  height: 32px;
  padding: 2px;
  border: 0;
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

.color-control input[type='text'] {
  min-height: 32px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: lowercase;
}
.color-control input[type='text']:focus {
  box-shadow: none;
}

.contrast-note {
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
.contrast-note.is-warn {
  color: var(--warning);
}
.contrast-note.is-bad {
  color: var(--danger);
}

.advanced {
  margin-top: 10px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.advanced summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  list-style: none;
}
.advanced summary::-webkit-details-marker {
  display: none;
}
.advanced summary::before {
  content: '+ ';
  color: var(--gold-ink);
  font-weight: 800;
}
.advanced[open] summary::before {
  content: '– ';
}
.advanced > *:not(summary) {
  margin-top: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-deep);
}

input[type='file'] {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  background: var(--surface-soft);
  font-size: 11.5px;
}
input[type='file']::file-selector-button {
  margin-right: 8px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* ------------------------------------------------------------------ bulk */

.bulk-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.bulk-intro p {
  font-size: 13px;
  color: var(--muted);
}
.bulk-intro code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--ink-soft);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 20px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone.is-drag {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.dropzone svg {
  color: var(--gold-ink);
  margin-bottom: 4px;
}
.dropzone p {
  font-size: 13px;
  color: var(--muted);
}
.dropzone strong {
  color: var(--ink);
}
.link-label {
  color: var(--gold-ink);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.bulk-paste {
  margin-top: 16px;
}

.bulk-paste-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 9px;
}

#bulkText {
  font-family: var(--font-mono);
  font-size: 12px;
}

.bulk-mapping {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}
.bulk-mapping h3 {
  font-size: 13px;
  margin-bottom: 10px;
}
.mapping-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.mapping-grid .field {
  margin: 0;
}
.mapping-grid label {
  font-size: 10.5px;
}
.mapping-grid select {
  min-height: 40px;
  font-size: 12px;
}

.bulk-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.summary-chip strong {
  color: var(--ink);
}
.summary-chip.is-ok {
  background: var(--success-soft);
  color: var(--success);
}
.summary-chip.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.table-wrap {
  overflow: auto;
  max-height: 420px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  min-width: 680px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 10px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: var(--surface-soft);
}

.data-table .cell-link {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.status-tag.is-ok {
  background: var(--success-soft);
  color: var(--success);
}
.status-tag.is-warn {
  background: var(--warning-soft);
  color: var(--warning);
}
.status-tag.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.row-copy {
  cursor: pointer;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}
.row-copy:hover {
  border-color: var(--gold);
  color: var(--gold-ink);
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
}
.progress-wrap progress {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  accent-color: var(--gold);
}

/* ------------------------------------------------------------------ sections */

.section {
  padding: 76px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  color: var(--ink);
}
.section-head h2 em {
  font-style: italic;
  color: var(--gold-ink);
}

.section-lede {
  margin-top: 14px;
  max-width: 58ch;
  font-size: 15.5px;
  color: var(--muted);
}

.section-ink {
  margin-top: 10px;
  background: #121820;
  color: #f3f7fb;
  background-image:
    radial-gradient(circle at 85% 12%, rgba(214, 139, 38, 0.16), transparent 26rem),
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: auto, 22px 22px;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.section-head-light h2 {
  color: #f3f7fb;
}
.section-head-light h2 em {
  color: var(--gold);
}
.eyebrow-gold {
  color: rgba(243, 247, 251, 0.6);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.steps-grid li {
  position: relative;
  padding-top: 24px;
  border-top: 1px solid rgba(243, 247, 251, 0.18);
}

.step-big {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 58px;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  letter-spacing: -0.04em;
}

.steps-grid h3 {
  font-size: 19px;
  color: #f3f7fb;
  margin-bottom: 8px;
}

.steps-grid p {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(243, 247, 251, 0.62);
}

.section-cta {
  margin-top: 36px;
}

.template-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-chip {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.filter-chip:hover {
  border-color: var(--gold);
  color: var(--ink);
}
.filter-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.template-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.template-card:hover {
  transform: translateY(-3px);
  border-color: rgba(214, 139, 38, 0.45);
  box-shadow: var(--shadow);
}

.template-cat {
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.template-card h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.template-card p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.template-card .template-use {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 6px;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  border-top: 1px solid var(--border);
}

.faq-grid details {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.faq-grid summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
}
.faq-grid summary::-webkit-details-marker {
  display: none;
}
.faq-grid summary::after {
  content: '+';
  flex: 0 0 auto;
  color: var(--gold-ink);
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
}
.faq-grid details[open] summary::after {
  content: '–';
}
.faq-grid details p {
  margin-top: 10px;
  padding-right: 28px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* callout */
.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 40px;
  border: 1px solid rgba(214, 139, 38, 0.28);
  border-radius: 26px;
  background:
    radial-gradient(circle at 0% 0%, rgba(214, 139, 38, 0.14), transparent 40%),
    var(--paper);
  box-shadow: var(--shadow-soft);
}

.callout h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  max-width: 18ch;
}
.callout h2 em {
  color: var(--gold-ink);
  font-style: italic;
}
.callout p:not(.eyebrow) {
  margin-top: 12px;
  max-width: 54ch;
  font-size: 14px;
  color: var(--muted);
}
.callout-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  background: #121820;
  color: rgba(243, 247, 251, 0.72);
  padding: 46px 0 24px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 36px;
}

.footer-brand img {
  height: 40px;
  width: auto;
  margin-bottom: 12px;
}
.footer-brand p {
  max-width: 30ch;
  font-size: 12.5px;
  color: rgba(243, 247, 251, 0.52);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.footer-nav div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.footer-nav strong {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-nav a {
  color: rgba(243, 247, 251, 0.68);
  text-decoration: none;
  font-size: 12.5px;
}
.footer-nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 247, 251, 0.4);
}

/* ------------------------------------------------------------------ dialogs */

.dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-strong);
  overflow: hidden;
}

.dialog-wide {
  width: min(1080px, calc(100vw - 32px));
}

.dialog[open] {
  animation: dialog-in 0.18s ease-out;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.dialog::backdrop {
  background: rgba(7, 12, 17, 0.62);
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.dialog-kicker {
  margin-bottom: 3px;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.dialog-head h2 {
  font-size: 26px;
}

.dialog-close {
  flex: 0 0 auto;
}

.dialog-body {
  padding: 20px 22px;
  overflow: auto;
  max-height: calc(86vh - 150px);
}

.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
}

.history-empty {
  padding: 26px 10px;
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
}

.history-item strong {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
}
.history-item .history-phone {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}
.history-item p {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42ch;
}
.history-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.history-actions button {
  min-width: 30px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}
.history-actions button:hover {
  border-color: var(--gold);
  color: var(--gold-ink);
}

/* poster */
.poster-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.poster-stage {
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    linear-gradient(45deg, rgba(18, 24, 32, 0.035) 25%, transparent 25%, transparent 75%, rgba(18, 24, 32, 0.035) 75%),
    var(--paper);
  background-size: 18px 18px;
  min-height: 300px;
}

#posterCanvas {
  max-height: min(64vh, 760px);
  max-width: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.24);
  border-radius: 4px;
}

.poster-form {
  display: flex;
  flex-direction: column;
}

.poster-form .field {
  margin-bottom: 11px;
}
.poster-form label {
  font-size: 11px;
}
.poster-form input,
.poster-form select {
  min-height: 40px;
  font-size: 13px;
}
.poster-form .field-row {
  grid-template-columns: 1fr 1fr;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  max-width: min(92vw, 460px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-strong);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------------ animations */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1180px) {
  .main-nav {
    display: none;
  }
  .hero-grid {
    gap: 40px;
  }
  .brand-logo {
    height: 28px;
  }
  .qr-studio {
    grid-template-columns: 1fr;
  }
  .qr-preview-card {
    position: static;
  }
}

@media (max-width: 1020px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .preview-panel > * {
    max-width: 560px;
  }
  .hero-ticket {
    transform: rotate(0);
  }
  .mapping-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .poster-layout {
    grid-template-columns: 1fr;
  }
  #posterCanvas {
    max-height: 52vh;
  }
}

@media (max-width: 860px) {
  .hero {
    padding-top: 44px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-ticket {
    justify-self: center;
    max-width: 460px;
  }
  .trust-list {
    gap: 8px 16px;
  }
  .section {
    padding: 58px 0;
  }
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .step-big {
    font-size: 46px;
    margin-bottom: 10px;
  }
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .callout {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .header-cta {
    display: none;
  }
}

@media (max-width: 680px) {
  .wrap {
    padding-inline: 18px;
  }
  .header-inner {
    gap: 10px;
  }
  .brand {
    gap: 8px;
  }
  .brand-logo {
    height: 24px;
  }
  .brand-slash {
    display: none;
  }
  .brand-product {
    font-size: 15px;
  }
  .net-pill {
    display: none;
  }
  .history-label {
    display: none;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px;
  }
  .tabs {
    width: 100%;
  }
  .tab {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
    font-size: 12px;
  }
  .toolbar-note {
    justify-content: center;
  }
  .form-panel {
    padding: 20px 16px;
  }
  .preview-panel {
    padding: 18px 16px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .values-grid {
    grid-template-columns: 1fr;
  }
  .color-row {
    grid-template-columns: 1fr;
  }
  .form-actions .btn {
    flex-basis: 100%;
  }
  .template-grid {
    grid-template-columns: 1fr;
  }
  .bulk-intro {
    flex-direction: column;
    gap: 8px;
  }
  .mapping-grid {
    grid-template-columns: 1fr;
  }
  .footer-nav {
    grid-template-columns: 1fr 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }
  .dialog {
    width: calc(100vw - 20px);
    max-height: 92vh;
  }
  .dialog-body {
    max-height: calc(92vh - 150px);
    padding: 16px;
  }
  .dialog-head {
    padding: 16px;
  }
  .poster-form .field-row {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: clamp(2.6rem, 11vw, 3.6rem);
  }
  .hero-lede {
    font-size: 15.5px;
  }
  .hero-ticket {
    max-width: 100%;
  }
  .ticket-title {
    font-size: 23px;
  }
  .chat-body {
    min-height: 230px;
  }
  .preset-grid {
    grid-template-columns: 1fr 1fr;
  }
  .section-head h2 {
    font-size: clamp(1.9rem, 8vw, 2.7rem);
  }
  .callout-actions {
    width: 100%;
  }
  .callout-actions .btn {
    width: 100%;
  }
  .history-item {
    grid-template-columns: 1fr;
  }
  .history-actions {
    justify-content: flex-end;
  }
  .history-item p {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .header-actions .icon-btn {
    padding: 0 8px;
  }
  .tabs .tab svg {
    display: none;
  }
  .hero-ticket {
    border-radius: 18px;
  }
  .ticket-body {
    padding: 18px;
  }
  .stat,
  .summary-chip {
    font-size: 10.5px;
  }
}

/* --------------------------------------------------------- páginas de texto */

.doc-page {
  padding: 54px 0 76px;
}

.doc-hero {
  max-width: 760px;
  margin-bottom: 38px;
}

.doc-hero h1 {
  margin: 10px 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.doc-hero .lede {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.65;
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 44px;
  align-items: start;
}

.doc-body {
  min-width: 0;
  max-width: 72ch;
}

.doc-body section + section {
  margin-top: 42px;
  padding-top: 38px;
  border-top: 1px solid var(--border);
}

.doc-body h2 {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.doc-body h3 {
  margin: 26px 0 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.doc-body p,
.doc-body li {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.72;
}

.doc-body p {
  margin: 0 0 14px;
}

.doc-body ul,
.doc-body ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.doc-body li + li {
  margin-top: 7px;
}

.doc-body a {
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-muted);
  font-size: 0.88em;
}

.doc-note {
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid rgba(214, 139, 38, 0.35);
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: var(--gold-soft);
}

.doc-note p {
  margin: 0;
  font-size: 14px;
}

.doc-note strong {
  color: var(--gold-ink);
}

.doc-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.doc-toc strong {
  display: block;
  margin-bottom: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.doc-toc a {
  display: block;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
}

.doc-toc a:last-child {
  border-bottom: 0;
}

.doc-toc a:hover {
  color: var(--gold-ink);
}

.doc-faq details {
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.doc-faq summary {
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.5;
}

.doc-faq details p {
  margin: 10px 0 0;
  font-size: 14px;
}

.doc-table-wrap {
  margin: 18px 0 22px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.doc-table th,
.doc-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.doc-table th {
  background: var(--surface-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table code {
  white-space: nowrap;
}

.doc-steps {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: doc-step;
}

.doc-steps li {
  position: relative;
  margin: 0;
  padding: 0 0 18px 46px;
  counter-increment: doc-step;
}

.doc-steps li::before {
  content: counter(doc-step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.doc-steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 34px;
  bottom: 4px;
  left: 14px;
  width: 1px;
  background: var(--border-strong);
}

.doc-steps strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14.5px;
}

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .doc-toc {
    position: static;
    order: -1;
  }
  .doc-toc nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
  }
}

@media (max-width: 560px) {
  .doc-page {
    padding: 34px 0 56px;
  }
  .doc-toc nav {
    grid-template-columns: 1fr;
  }
  .doc-body p,
  .doc-body li {
    font-size: 14.5px;
  }
}

/* ------------------------------------------------------------------ print */

#printArea {
  display: none;
}

@media print {
  body > *:not(#printArea) {
    display: none !important;
  }
  #printArea {
    display: block !important;
    margin: 0;
    padding: 0;
  }
  #printArea img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
  }
  @page {
    margin: 0;
  }
}
