:root {
  --bg: #f7f6fd;
  --surface: #ffffff;
  --surface-2: #f1effa;
  --ink: #15122b;
  --muted: #6b6886;
  --line: #e6e3f3;
  --brand: #6d28d9;
  --brand-2: #a21caf;
  --brand-ink: #ffffff;
  --brand-soft: #efe7ff;
  --ok: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(40, 20, 120, 0.07);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0c1b; --surface: #17142b; --surface-2: #1f1b38; --ink: #f2f0ff; --muted: #a29ec2;
    --line: #2b2750; --brand: #8b5cf6; --brand-2: #d946ef; --brand-soft: #2a2052; color-scheme: dark;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --bg: #0e0c1b; --surface: #17142b; --surface-2: #1f1b38; --ink: #f2f0ff; --muted: #a29ec2;
  --line: #2b2750; --brand: #8b5cf6; --brand-2: #d946ef; --brand-soft: #2a2052; color-scheme: dark;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
img, svg, canvas { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -0.03em; }
.logo-mark { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; }
.logo-mark svg { width: 20px; height: 20px; }

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; background: var(--brand); color: var(--brand-ink);
  padding: 10px 18px; border-radius: 12px; font: 600 .95rem var(--font); cursor: pointer; text-decoration: none; transition: transform .08s, filter .15s, background .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--line); }
.btn.lg { padding: 14px 24px; font-size: 1.05rem; border-radius: 14px; }
.btn.sm { padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.btn.block { width: 100%; }
.icon-btn { background: transparent; border: 1px solid var(--line); color: var(--ink); width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 90px; }
input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--brand); }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: .92rem; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }

/* ---------- Top nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .container { display: flex; align-items: center; gap: 20px; height: 64px; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.lang-select { width: auto; padding: 6px 8px; font-size: .85rem; }
@media (max-width: 760px) { .nav-links { display: none; } .nav .btn.ghost.hide-sm { display: none; } }

/* ---------- Landing ---------- */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
.hero h1 .grad { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 540px; }
.hero .row { margin-top: 24px; }
.trust { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.demo-card { padding: 22px; }
.demo-card .qr-box { background: var(--surface-2); border-radius: 14px; display: grid; place-items: center; padding: 20px; min-height: 260px; }
.demo-card .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 36px; } }

.section { padding: 64px 0; }
.section h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); text-align: center; }
.section .sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 36px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 12px; }
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { position: relative; padding-top: 28px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -14px; left: 20px; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--brand); position: relative; }
.price-card.featured::before { content: attr(data-tag); position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.price { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; }
.price small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 24px; flex: 1; }
.price-card li { padding: 6px 0 6px 26px; position: relative; }
.price-card li::before { content: ""; position: absolute; left: 0; top: 11px; width: 14px; height: 8px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.price-card li.no { color: var(--muted); text-decoration: line-through; }
.price-card li.no::before { border-color: var(--line); }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 10px 0 0; }
.cta-band { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-radius: 24px; padding: 48px 24px; text-align: center; }
.cta-band p { opacity: .9; }
.cta-band .btn { background: #fff; color: var(--brand); }
footer.site { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
footer.site a { color: var(--muted); text-decoration: none; margin-right: 16px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(150deg, var(--brand), var(--brand-2)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .logo { color: #fff; }
.auth-side .logo-mark { background: rgba(255,255,255,.2); }
.auth-side h2 { font-size: 2rem; max-width: 420px; }
.auth-side ul { padding-left: 18px; opacity: .92; }
.auth-main { display: grid; place-items: center; padding: 32px 16px; }
.auth-box { width: 100%; max-width: 400px; }
.tabs { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; font: 600 .92rem var(--font); color: var(--muted); cursor: pointer; }
.tabs button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.form-error { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); padding: 10px 12px; border-radius: 10px; font-size: .9rem; margin-bottom: 14px; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { margin: 4px 8px 20px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 500; }
.side-link:hover { background: var(--surface-2); color: var(--ink); }
.side-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side-link svg { width: 18px; height: 18px; flex: none; }
.plan-box { margin-top: auto; background: var(--surface-2); border-radius: 12px; padding: 14px; font-size: .88rem; }
.main { padding: 28px 32px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 1.6rem; margin: 0; }
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .mobile-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 30; }
  .main { padding: 20px 16px 60px; }
}

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stat .k { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
@media (max-width: 760px) { .stats-row { grid-template-columns: 1fr 1fr; } }

.qr-list { display: grid; gap: 12px; }
.qr-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; }
.qr-thumb { width: 76px; height: 76px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.qr-thumb canvas, .qr-thumb svg { width: 68px !important; height: 68px !important; }
.qr-item h3 { font-size: 1.02rem; margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--muted); }
.qr-meta .dest { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.qr-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.scan-count { text-align: right; margin-right: 8px; }
.scan-count b { font-size: 1.3rem; display: block; line-height: 1; }
@media (max-width: 760px) {
  .qr-item { grid-template-columns: 60px 1fr; }
  .qr-thumb { width: 60px; height: 60px; }
  .qr-thumb canvas, .qr-thumb svg { width: 54px !important; height: 54px !important; }
  .qr-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.empty { text-align: center; padding: 56px 20px; }
.empty .ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }

/* ---------- Editor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.preview-col { position: sticky; top: 20px; }
@media (max-width: 1080px) { .editor { grid-template-columns: 1fr; } .preview-col { position: static; } }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.type-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font: 600 .82rem var(--font); color: var(--ink); }
.type-btn svg { width: 22px; height: 22px; color: var(--brand); }
.type-btn.active { border-color: var(--brand); background: var(--brand-soft); }
.type-btn:disabled { opacity: .45; cursor: not-allowed; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 700; margin: 0 0 14px; }
.section-title .num { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .8rem; display: grid; place-items: center; }
.editor .card + .card { margin-top: 16px; }
.smart-input { display: flex; gap: 8px; margin-bottom: 16px; }
.smart-input input { flex: 1; }
.style-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-bottom: 14px; }
.style-opt { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 4px; cursor: pointer; font: 500 .75rem var(--font); color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.style-opt.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.style-opt .sw { width: 30px; height: 30px; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.preset { width: 38px; height: 38px; border-radius: 10px; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.preset:hover { border-color: var(--brand); }
.color-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.color-row > span { flex: 1; font-size: .9rem; }
.accordion > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 700; padding: 4px 0; }
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary::after { content: "+"; margin-left: auto; font-size: 1.2rem; color: var(--muted); }
.accordion[open] > summary::after { content: "–"; }
.accordion > .body { padding-top: 14px; }
.accordion + .accordion { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.lock { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; }
.preview-box { background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 20px 20px; border-radius: 14px; padding: 20px; display: grid; place-items: center; min-height: 320px; }
.preview-box canvas { max-width: 100%; height: auto !important; border-radius: 6px; }
.score { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.score-ring { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .95rem; flex: none; }
.tips { margin: 0; padding-left: 18px; font-size: .85rem; color: var(--muted); }
.tips li { margin-bottom: 4px; }
.dl-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.short-url { display: flex; gap: 6px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: .88rem; margin-top: 12px; }
.short-url code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dyn-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.dyn-opt { border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; background: var(--surface); text-align: left; font: inherit; color: var(--ink); }
.dyn-opt.active { border-color: var(--brand); background: var(--brand-soft); }
.dyn-opt b { display: block; margin-bottom: 2px; }
.dyn-opt span { font-size: .8rem; color: var(--muted); }
.notice { background: var(--brand-soft); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-size: .9rem; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.notice.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); }

/* ---------- Reports ---------- */
.charts { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.charts .wide { grid-column: 1 / -1; }
.chart-card h3 { font-size: .95rem; margin-bottom: 12px; }
.chart-wrap { position: relative; height: 260px; }
.bar-list { display: grid; gap: 8px; }
.bar-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: .88rem; }
.bar-item .track { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar-item .fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 6px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.tbl th, table.tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.tbl th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.locked-overlay { position: relative; }
.locked-overlay .blur { filter: blur(5px); pointer-events: none; user-select: none; }
.locked-overlay .unlock { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
@media (max-width: 900px) { .charts { grid-template-columns: 1fr; } }

/* ---------- Toast & modal ---------- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .92rem; box-shadow: var(--shadow); animation: up .2s ease; }
.toast.err { background: var(--bad); color: #fff; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
.modal-bg { position: fixed; inset: 0; background: rgba(10, 8, 30, .5); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; padding: 24px; max-width: 440px; width: 100%; box-shadow: var(--shadow); }
.modal h3 { margin-top: 0; }
.modal .row { justify-content: flex-end; margin-top: 18px; }

.legal { max-width: 760px; margin: 40px auto; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.2rem; margin-top: 28px; }
.legal p, .legal li { color: var(--muted); }

/* ================= Ad-supported site (youqr.com) ================= */
body[data-site="ads"] {
  --brand: #0b63f6; --brand-2: #06b6d4; --brand-soft: #e6f0ff; --bg: #f5f8fc; --surface-2: #eef3fa; --line: #e1e8f2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body[data-site="ads"] { --brand: #4d8dff; --brand-2: #22d3ee; --brand-soft: #14254a; --bg: #0b1120; --surface: #121a2e; --surface-2: #19233b; --line: #243150; }
}
[data-site="ads"] .free-hero { padding: 40px 0 8px; text-align: center; }
[data-site="ads"] .free-hero h1 { font-size: clamp(1.8rem, 4.4vw, 2.8rem); }
[data-site="ads"] .free-hero .lead { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto 14px; }
.free-badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; color: var(--ok); font-weight: 600; font-size: .9rem; }
.free-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-top: 8px; }
.free-side { position: sticky; top: 80px; }
.free-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
.free-preview { position: sticky; top: 80px; align-self: start; }
.free-form .fstep { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin: 18px 0 12px; }
.free-form .fstep .num, .how-list .num { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .8rem; display: grid; place-items: center; flex: none; }
.type-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 4px; scrollbar-width: thin; }
.type-chip { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.type-chip:hover { border-color: var(--brand); }
.type-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.preview-box { background: var(--surface-2); border-radius: 14px; padding: 16px; display: grid; place-items: center; min-height: 260px; }
.preview-box canvas { width: 100%; max-width: 280px; height: auto; display: block; margin: 0 auto; }
.preview-box canvas.placeholder { opacity: .25; filter: grayscale(1); }
.free-preview #score { margin: 14px 0; }
.free-preview .tips { margin: 4px 0 0; padding-left: 18px; }
.dl-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.dl-row .btn { padding-left: 6px; padding-right: 6px; }
.ready { margin-top: 16px; border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.ready h3 { color: var(--ok); font-size: 1rem; }
.how-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how-list li { display: flex; gap: 12px; }
.how-list h3 { font-size: 1.05rem; margin-bottom: 4px; }
.how-list p { margin: 0; color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-4 h3 { font-size: 1rem; }
.type-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.type-card:hover { border-color: var(--brand); }
.section.narrow { max-width: 760px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { color: var(--muted); margin: 10px 0 0; }
.center { text-align: center; }
.lead { font-size: 1.1rem; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: .9rem; background: var(--surface); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; min-width: 150px; z-index: 30; }
.lang-list a, .lang-list span { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.lang-list a:hover { background: var(--surface-2); }
.lang-list .on { color: var(--brand); font-weight: 700; }
.ads-foot .container { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-start; justify-content: space-between; }
.ads-foot p { margin: 6px 0 0; }
.lang-foot a, .lang-foot span { margin-right: 0; font-size: .85rem; }
.lang-foot .on { font-weight: 700; color: var(--ink); }
/* Ad slots: always clearly labelled and separated from the generator's buttons (AdSense policy). */
.ad-slot { margin: 18px auto; text-align: center; min-height: 100px; }
.ad-slot.ad-top { max-width: 970px; min-height: 90px; }
.ad-slot.ad-side { min-height: 600px; margin-top: 0; }
.ad-slot.ad-mid, .ad-slot.ad-ready { max-width: 640px; min-height: 250px; }
.ad-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.ad-placeholder { border: 2px dashed var(--line); border-radius: 12px; color: var(--muted); display: grid; place-items: center; min-height: inherit; height: 100%; font-size: .85rem; padding: 20px; background: repeating-linear-gradient(45deg, transparent, transparent 10px, var(--surface-2) 10px, var(--surface-2) 20px); }
.ad-side .ad-placeholder { min-height: 600px; }
.ad-top .ad-placeholder { min-height: 90px; }
.ad-mid .ad-placeholder, .ad-ready .ad-placeholder { min-height: 250px; }
@media (max-width: 1080px) {
  .free-grid { grid-template-columns: minmax(0, 1fr); }
  .free-side { position: static; }
  .ad-slot.ad-side, .ad-side .ad-placeholder { min-height: 250px; }
}
@media (max-width: 760px) {
  .free-cols { grid-template-columns: minmax(0, 1fr); }
  .free-preview { position: static; }
  .preview-box canvas { max-width: 220px; }
  .preview-box { min-height: 0; }
  .how-list, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .grid-4 { grid-template-columns: 1fr; } }

/* Monthly / yearly switch */
.interval-toggle { display: flex; justify-content: center; margin: 0 0 22px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 600 .9rem var(--font); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg .save { color: var(--ok); font-size: .78rem; margin-left: 4px; }
.price-card .billed { min-height: 1.2em; margin-top: -4px; }

/* A/B admin */
.ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ab-card.lead { border: 2px solid var(--ok); }
.ab-big { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; margin-top: 10px; }
.ab-table td:not(:first-child), .ab-table th:not(:first-child) { text-align: right; }
@media (max-width: 640px) { .ab-grid { grid-template-columns: 1fr; } }
.free-main, .free-form, .free-preview { min-width: 0; }
