:root {
  --bg: #f7f7fb;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-soft: #f4f5f8;
  --text: #111827;
  --muted: #667085;
  --border: #e4e7ec;
  --accent: #111827;
  --accent-hover: #252f3f;
  --success: #18794e;
  --danger: #c4320a;
  --shadow: 0 22px 60px rgba(17, 24, 39, 0.10);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 13px;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(214, 219, 255, 0.60), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(255, 224, 234, 0.52), transparent 27%),
    var(--bg);
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

[v-cloak] { display: none; }

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 28px;
}

.hero {
  max-width: 740px;
  margin: 0 auto 34px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #475467;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 16px 0 10px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-copy {
  margin: 0 auto;
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #edf8f1;
  color: #136c45;
  font-size: 13px;
  font-weight: 650;
}

.privacy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f9d61;
  box-shadow: 0 0 0 4px rgba(31, 157, 97, 0.12);
}

.generator-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.84fr);
  overflow: hidden;
  border: 1px solid rgba(228, 231, 236, 0.95);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.form-panel,
.preview-panel { padding: clamp(28px, 5vw, 50px); }

.form-panel { border-right: 1px solid var(--border); }
.preview-panel { background: rgba(249, 250, 251, 0.72); }

.field-label {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 750;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 8px 0 16px;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius-md);
  background: white;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-wrap:focus-within {
  border-color: #98a2b3;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.07);
}

.input-wrap.has-error { border-color: #f04438; }
.input-wrap input[type="text"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}
.input-wrap input::placeholder { color: #98a2b3; }

.clear-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #98a2b3;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.clear-button:hover { background: #f2f4f7; color: #475467; }

.field-help,
.error-text {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
}
.field-help { color: var(--muted); }
.error-text { color: var(--danger); font-weight: 650; }

.advanced {
  margin-top: 26px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.advanced summary {
  cursor: pointer;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
  list-style-position: inside;
  user-select: none;
}

.advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 0 4px;
}

.mini-field {
  display: grid;
  gap: 7px;
  color: #475467;
  font-size: 12.5px;
  font-weight: 650;
}

.mini-field select {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: white;
  color: var(--text);
}

.color-field input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 4px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: white;
  cursor: pointer;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 50px;
  border-radius: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 28px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
}
.primary-button:hover { background: var(--accent-hover); transform: translateY(-1px); }
.primary-button:active { transform: translateY(0); }

.preview-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 390px;
  overflow: hidden;
  border: 1px dashed #cfd4dc;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f8fafc 75%),
    linear-gradient(-45deg, transparent 75%, #f8fafc 75%),
    #fff;
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}

.qr-canvas {
  display: none;
  width: min(100%, 320px);
  height: auto;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}
.preview-frame.ready .qr-canvas { display: block; }

.empty-state {
  display: grid;
  place-items: center;
  max-width: 260px;
  text-align: center;
  color: #475467;
}
.empty-state strong { margin-top: 16px; font-size: 14px; }
.empty-state small { margin-top: 7px; color: #98a2b3; line-height: 1.5; }

.empty-icon {
  display: grid;
  grid-template-columns: 28px 28px;
  grid-template-rows: 28px 28px;
  gap: 7px;
  opacity: 0.5;
}
.empty-icon span {
  border: 5px solid #667085;
  border-radius: 4px;
}
.empty-icon span:last-child { border-width: 0; background: #667085; border-radius: 2px; }

.preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.secondary-button {
  border: 1px solid #d0d5dd;
  background: white;
  color: #344054;
}
.secondary-button:hover:not(:disabled) { border-color: #98a2b3; background: #f9fafb; }

.ghost-button {
  border: 1px solid transparent;
  background: transparent;
  color: #475467;
}
.ghost-button:hover:not(:disabled) { background: #f2f4f7; }

.secondary-button:disabled,
.ghost-button:disabled { opacity: 0.45; cursor: not-allowed; }

.generated-meta {
  margin: 10px 0 0;
  text-align: center;
  color: #98a2b3;
  font-size: 12px;
}

.footer {
  padding: 22px 0;
  text-align: center;
  color: #98a2b3;
  font-size: 12.5px;
}

.noscript,
.fatal-card {
  margin: 30px auto;
  padding: 24px;
  max-width: 760px;
  border: 1px solid #fecdca;
  border-radius: 16px;
  background: #fffbfa;
  color: #912018;
}
.fatal-card { display: block; }
.fatal-card h1 { font-size: 28px; letter-spacing: -0.03em; }

@media (max-width: 800px) {
  .page-shell { padding-top: 42px; }
  .generator-card { grid-template-columns: 1fr; }
  .form-panel { border-right: 0; border-bottom: 1px solid var(--border); }
  .preview-frame { min-height: 330px; }
}

@media (max-width: 520px) {
  .page-shell { width: min(100% - 20px, 1120px); padding-top: 28px; }
  h1 { font-size: 38px; }
  .hero-copy { font-size: 15px; }
  .form-panel, .preview-panel { padding: 22px 18px; }
  .advanced-grid, .preview-actions { grid-template-columns: 1fr; }
  .preview-frame { min-height: 300px; }
  .qr-canvas { width: min(100%, 270px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
