/* ============================================================
   QR Studio — stylesheet
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --brand:        #6d4aff;
  --brand-strong: #5a35f0;
  --brand-soft:   #f1ecff;
  --accent:       #00c2a8;

  --bg:        #f7f7fb;
  --surface:   #ffffff;
  --surface-2: #fbfbfe;
  --ink:       #14121f;
  --ink-2:     #4b4860;
  --ink-3:     #7c7996;
  --line:      #e6e4f0;
  --line-2:    #d5d2e6;

  --danger:  #d92d5e;
  --warning: #b26a00;
  --success: #0f9d6b;

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(20, 18, 31, .06), 0 1px 3px rgba(20, 18, 31, .04);
  --shadow:    0 4px 16px rgba(20, 18, 31, .07), 0 1px 3px rgba(20, 18, 31, .05);
  --shadow-lg: 0 24px 60px rgba(20, 18, 31, .14), 0 4px 12px rgba(20, 18, 31, .06);

  --header-h: 68px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --brand:        #8b6bff;
  --brand-strong: #7a55ff;
  --brand-soft:   #241d47;
  --accent:       #2ad4ba;

  --bg:        #0d0c14;
  --surface:   #16151f;
  --surface-2: #1c1a28;
  --ink:       #f3f2f8;
  --ink-2:     #b3b0c6;
  --ink-3:     #837f9c;
  --line:      #2a2838;
  --line-2:    #383548;

  --danger:  #ff6b93;
  --warning: #f0a83c;
  --success: #34d399;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 4px 16px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 40px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; background: none;
  transition: transform .12s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(109, 74, 255, .3); }
.btn-primary:hover:not(:disabled) { background: var(--brand-strong); box-shadow: 0 8px 24px rgba(109, 74, 255, .38); }

.btn-outline { border-color: var(--line-2); color: var(--ink-2); background: var(--surface); }
.btn-outline:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }

.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand); }

.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-xs { padding: 5px 12px; font-size: 13px; border-radius: 999px; }
.btn-block { width: 100%; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); cursor: pointer; transition: .18s ease;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.sm svg { width: 16px; height: 16px; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-mark svg rect:first-child { fill: var(--brand); }
.brand-mark .bm-dots rect { fill: #fff; }
.brand-name { font-size: 19px; font-weight: 500; letter-spacing: -.03em; }
.brand-name strong { font-weight: 800; }

.site-nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.site-nav a { position: relative; padding: 4px 0; transition: color .18s; }
.site-nav a:hover { color: var(--brand); }
.site-nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--brand); border-radius: 2px; transition: right .22s ease;
}
.site-nav a:hover::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.site-nav + .header-actions { margin-left: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 84px 0 96px;
  background:
    radial-gradient(1000px 480px at 82% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 62%),
    radial-gradient(700px 400px at 8% 8%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 13px; font-weight: 600; letter-spacing: .01em; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(38px, 5vw, 62px); font-weight: 800; letter-spacing: -.035em; }
.grad {
  background: linear-gradient(105deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin-top: 20px; font-size: 18px; color: var(--ink-2); max-width: 52ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 48px; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.hero-stats span { font-size: 13px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }

.hero-art { position: relative; height: 440px; }
.hero-card {
  position: absolute; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 16px;
  animation: floaty 7s ease-in-out infinite;
}
.hero-card > div { width: 100%; height: 100%; }
.hero-card svg { width: 100%; height: auto; }
.hero-card-1 { width: 232px; top: 24px; left: 8%; z-index: 3; }
.hero-card-2 { width: 176px; top: 168px; right: 6%; z-index: 2; animation-delay: -2.3s; }
.hero-card-3 { width: 140px; bottom: 8px; left: 30%; z-index: 1; animation-delay: -4.6s; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-14px) rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .hero-card { animation: none; } }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 40px; }
.section-head.center { text-align: center; max-width: 640px; margin-inline: auto; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; }
.section-head p { margin-top: 12px; color: var(--ink-2); font-size: 17px; }

/* ---------- Generator layout ---------- */
.generator { padding: 72px 0 88px; }
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 396px; gap: 28px; align-items: start; }
.studio-main { display: grid; gap: 20px; min-width: 0; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm);
}
.panel-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.panel-head h3 { font-size: 19px; font-weight: 700; }
.panel-head p { font-size: 14px; color: var(--ink-3); margin-top: 3px; }
.step {
  flex: none; width: 30px; height: 30px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}

/* ---------- Type grid ---------- */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.type-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 15px 8px 13px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface-2);
  cursor: pointer; text-align: center; transition: .16s ease;
}
.type-tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.type-tile svg { width: 22px; height: 22px; stroke: var(--ink-2); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.type-tile span { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.type-tile.is-active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.type-tile.is-active svg { stroke: var(--brand); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full, .form-grid > .field:not(.half) { grid-column: 1 / -1; }
.field.half { grid-column: span 1; }
.field-label {
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.field-label em { font-style: normal; color: var(--ink-3); font-weight: 500; }
.control {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink);
  transition: border-color .16s, box-shadow .16s; font-size: 15px;
}
.control:hover { border-color: var(--line-2); }
.control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.control::placeholder { color: var(--ink-3); }
textarea.control { resize: vertical; min-height: 92px; line-height: 1.5; }
select.control {
  appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c7996' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.control.is-error { border-color: var(--danger); }
.field-error { font-size: 12.5px; color: var(--danger); font-weight: 500; }
.hint { font-size: 12.5px; color: var(--ink-3); }
.hint.warn { color: var(--warning); font-weight: 500; margin-top: 14px; }

.field.check, .mini-check { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; }
.field.check { align-self: end; padding-bottom: 11px; font-size: 14.5px; color: var(--ink-2); }
input[type="checkbox"] {
  appearance: none; width: 19px; height: 19px; flex: none; border-radius: 6px;
  border: 1.5px solid var(--line-2); background: var(--surface-2); cursor: pointer; transition: .15s;
  position: relative;
}
input[type="checkbox"]:checked { background: var(--brand); border-color: var(--brand); }
input[type="checkbox"]:checked::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }

.range { -webkit-appearance: none; appearance: none; padding: 0; height: 6px; border: none; background: var(--line); border-radius: 99px; cursor: pointer; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); border: 3px solid var(--surface); box-shadow: 0 1px 5px rgba(0,0,0,.25); cursor: grab;
}
.range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); border: 3px solid var(--surface); box-shadow: 0 1px 5px rgba(0,0,0,.25); cursor: grab;
}
.range:focus { box-shadow: none; }

.color-input { display: flex; align-items: center; gap: 10px; }
input[type="color"] {
  appearance: none; width: 46px; height: 42px; padding: 0; flex: none;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: none; cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 4px; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
input[type="color"]:disabled { opacity: .4; cursor: not-allowed; }
.hex {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface-2);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13.5px; text-transform: uppercase;
}
.hex:focus { outline: none; border-color: var(--brand); }
.mini-check { font-size: 13px; color: var(--ink-3); white-space: nowrap; }

.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.divider::before, .divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }

/* ---------- Presets ---------- */
.presets { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 22px; }
.preset {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface-2);
  cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: .16s;
}
.preset:hover { border-color: var(--brand); color: var(--brand); }
.preset.is-active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.preset i { width: 18px; height: 18px; border-radius: 6px; display: block; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 22px; overflow-x: auto; }
.tab {
  flex: 1; padding: 9px 14px; border: none; background: none; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--ink-3); cursor: pointer; white-space: nowrap; transition: .16s;
}
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Shape swatches ---------- */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; margin: 10px 0 22px; }
.swatch {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 6px 9px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface-2); cursor: pointer; transition: .16s;
}
.swatch:hover { border-color: var(--brand); transform: translateY(-2px); }
.swatch.is-active { border-color: var(--brand); background: var(--brand-soft); }
.swatch svg { width: 38px; height: 38px; }
.swatch svg [fill] { fill: var(--ink); }
.swatch.is-active svg [fill] { fill: var(--brand); }
.swatch span { font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-align: center; line-height: 1.2; }
.swatch.is-active span { color: var(--brand); }
.swatch-grid.frames { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.swatch-grid.frames svg { width: 52px; height: 56px; }

/* ---------- Logo drop ---------- */
.logo-drop {
  border: 2px dashed var(--line-2); border-radius: var(--radius);
  padding: 26px; text-align: center; cursor: pointer; transition: .18s; background: var(--surface-2);
}
.logo-drop:hover, .logo-drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.logo-drop-inner svg { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--ink-3); }
.logo-drop-inner p { font-size: 14.5px; color: var(--ink-2); }
.logo-drop-inner small { font-size: 12.5px; color: var(--ink-3); }
.logo-preview { display: flex; align-items: center; gap: 14px; text-align: left; }
.logo-preview img {
  width: 60px; height: 60px; object-fit: contain; flex: none;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; padding: 6px;
}
.logo-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.logo-meta span { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.logo-options { margin-top: 20px; display: grid; gap: 16px; }

/* ---------- Stats / raw ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0 16px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.stat span { display: block; font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.stat strong { font-size: 17px; font-weight: 700; }
.raw-details summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.raw {
  margin: 10px 0; padding: 13px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px;
  white-space: pre-wrap; word-break: break-all; max-height: 190px; overflow: auto; color: var(--ink-2);
}

/* ---------- Preview ---------- */
.studio-side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 18px; }
.preview-card, .saved-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow);
}
.preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.preview-head h3 { font-size: 16px; font-weight: 700; }
.preview-stage {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 1; padding: 18px; border-radius: var(--radius);
  background:
    linear-gradient(45deg, var(--surface-2) 25%, transparent 25%, transparent 75%, var(--surface-2) 75%) 0 0 / 20px 20px,
    linear-gradient(45deg, var(--surface-2) 25%, transparent 25%, transparent 75%, var(--surface-2) 75%) 10px 10px / 20px 20px,
    var(--surface);
  border: 1px solid var(--line);
}
.qr-holder { width: 100%; height: 100%; display: grid; place-items: center; }
.qr-holder svg { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.preview-empty {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px;
  color: var(--ink-3); text-align: center; padding: 24px; background: var(--surface); border-radius: var(--radius);
}
.preview-empty svg { width: 46px; height: 46px; opacity: .55; }
.preview-empty p { font-size: 14px; max-width: 22ch; }
.preview-note { font-size: 12.5px; color: var(--ink-3); text-align: center; margin: 12px 0 0; min-height: 19px; }
.preview-note.err { color: var(--danger); font-weight: 500; }

.download-row { display: grid; gap: 9px; margin-top: 16px; }
.download-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.download-more .btn { padding: 9px 8px; font-size: 13.5px; }

.scan-tip {
  display: flex; gap: 10px; margin-top: 18px; padding: 12px 14px;
  border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--brand);
}
.scan-tip svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.scan-tip p { font-size: 12.5px; font-weight: 500; line-height: 1.45; }

/* ---------- Saved list ---------- */
.saved-list { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.saved-item {
  display: flex; align-items: center; gap: 12px; padding: 9px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
  cursor: pointer; transition: .16s;
}
.saved-item:hover { border-color: var(--brand); }
.saved-item .thumb { width: 42px; height: 42px; flex: none; border-radius: 8px; overflow: hidden; background: #fff; padding: 2px; }
.saved-item .thumb svg { width: 100%; height: 100%; }
.saved-info { min-width: 0; flex: 1; }
.saved-info strong { display: block; font-size: 13.5px; font-weight: 600; }
.saved-info span { display: block; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-del { flex: none; border: none; background: none; color: var(--ink-3); cursor: pointer; padding: 4px; border-radius: 6px; }
.saved-del:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.saved-del svg { width: 15px; height: 15px; }

/* ---------- Types showcase ---------- */
.types-showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 14px; }
.type-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: .18s; text-align: left; width: 100%; font: inherit;
}
.type-card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow); }
.type-card-icon {
  width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft);
}
.type-card-icon svg { width: 20px; height: 20px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.type-card h3 { font-size: 15.5px; font-weight: 700; }
.type-card p { font-size: 13.5px; color: var(--ink-3); margin-top: 3px; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.feature { padding: 26px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature p { font-size: 14.5px; color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 4px 22px; transition: border-color .18s;
}
.faq details[open] { border-color: var(--brand); }
.faq summary {
  cursor: pointer; padding: 18px 30px 18px 0; font-weight: 650; font-size: 16px;
  list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 0; top: 50%; width: 11px; height: 11px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg); transition: transform .22s;
}
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); border-color: var(--brand); }
.faq details p { padding-bottom: 20px; color: var(--ink-2); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; padding-bottom: 44px; }
.footer-brand p { margin-top: 12px; color: var(--ink-3); font-size: 14.5px; max-width: 40ch; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.footer-cols h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 14px; }
.footer-cols ul { display: grid; gap: 9px; }
.footer-cols a, .footer-cols button {
  font-size: 14.5px; color: var(--ink-2); background: none; border: none; padding: 0;
  cursor: pointer; font: inherit; font-size: 14.5px; text-align: left; transition: color .16s;
}
.footer-cols a:hover, .footer-cols button:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--line); padding: 22px 0; }
.footer-bottom p { font-size: 13px; color: var(--ink-3); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: .25s ease; z-index: 100;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .studio { grid-template-columns: 1fr; }
  .studio-side { position: static; grid-template-columns: 1fr 1fr; display: grid; }
  .preview-card { max-width: none; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .site-nav { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 720px) {
  .wrap, .wrap.narrow { width: calc(100% - 32px); }
  .hero { padding: 56px 0 64px; }
  .section, .generator { padding: 56px 0; }
  .panel { padding: 20px 18px; }
  .studio-side { grid-template-columns: 1fr; }
  .form-grid, .field-row { grid-template-columns: 1fr; }
  .field.half { grid-column: 1 / -1; }
  .hero-stats { gap: 26px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .type-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .footer-cols { grid-template-columns: 1fr; }
}
@media print {
  .site-header, .hero, .section, .site-footer, .studio-main, .download-row,
  .scan-tip, .preview-head, .saved-card, .preview-note, .toast { display: none !important; }
  .studio { grid-template-columns: 1fr; }
  .preview-card { border: none; box-shadow: none; }
  .preview-stage { background: #fff; border: none; }
}
