/* qr-gen — free QR code generator. Hand-written, no build step. */
@font-face { font-family: Geist; src: url(/assets/fonts/Geist-Variable.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/assets/fonts/GeistMono-Variable.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(/assets/fonts/instrument-serif-latin-400-italic.woff2) format('woff2'); font-style: italic; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(/assets/fonts/instrument-serif-latin-400-normal.woff2) format('woff2'); font-style: normal; font-display: swap; }

@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  color-scheme: dark;
  --bg: #07070c;
  --bg-2: #0d0d15;
  --surface: rgb(255 255 255 / .035);
  --surface-2: rgb(255 255 255 / .06);
  --surface-3: rgb(255 255 255 / .1);
  --line: rgb(255 255 255 / .08);
  --line-2: rgb(255 255 255 / .14);
  --text: #f3f3f8;
  --muted: #a3a3b8;
  --faint: #6d6d82;
  --violet: #a78bfa;
  --cyan: #22d3ee;
  --lime: #a3e635;
  --pink: #f472b6;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #fb7185;
  --accent: linear-gradient(110deg, #a78bfa, #22d3ee 55%, #a3e635);
  --glow: 0 0 0 1px rgb(167 139 250 / .35), 0 10px 40px -10px rgb(124 58 237 / .7), 0 4px 30px -8px rgb(34 211 238 / .5);
  --shadow: 0 30px 80px -30px rgb(0 0 0 / .8), 0 10px 30px -15px rgb(0 0 0 / .6);
  --r: 20px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --sans: Geist, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6fb; --bg-2: #ffffff;
  --surface: rgb(255 255 255 / .62); --surface-2: rgb(15 15 40 / .045); --surface-3: rgb(15 15 40 / .08);
  --line: rgb(15 15 40 / .09); --line-2: rgb(15 15 40 / .16);
  --text: #0e0e1a; --muted: #55556b; --faint: #8a8aa0;
  --violet: #7c3aed; --cyan: #0891b2; --lime: #65a30d; --pink: #db2777;
  --ok: #16a34a; --warn: #b45309; --bad: #e11d48;
  --accent: linear-gradient(110deg, #7c3aed, #0891b2 55%, #65a30d);
  --glow: 0 0 0 1px rgb(124 58 237 / .25), 0 10px 30px -10px rgb(124 58 237 / .45), 0 4px 20px -8px rgb(8 145 178 / .35);
  --shadow: 0 30px 70px -30px rgb(30 20 80 / .35), 0 10px 30px -15px rgb(30 20 80 / .2);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f6fb; --bg-2: #ffffff;
    --surface: rgb(255 255 255 / .62); --surface-2: rgb(15 15 40 / .045); --surface-3: rgb(15 15 40 / .08);
    --line: rgb(15 15 40 / .09); --line-2: rgb(15 15 40 / .16);
    --text: #0e0e1a; --muted: #55556b; --faint: #8a8aa0;
    --violet: #7c3aed; --cyan: #0891b2; --lime: #65a30d; --pink: #db2777;
    --ok: #16a34a; --warn: #b45309; --bad: #e11d48;
    --accent: linear-gradient(110deg, #7c3aed, #0891b2 55%, #65a30d);
    --glow: 0 0 0 1px rgb(124 58 237 / .25), 0 10px 30px -10px rgb(124 58 237 / .45), 0 4px 20px -8px rgb(8 145 178 / .35);
    --shadow: 0 30px 70px -30px rgb(30 20 80 / .35), 0 10px 30px -15px rgb(30 20 80 / .2);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; interpolate-size: allow-keywords; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; min-height: 100vh; }
img, svg { display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgb(167 139 250 / .35); }
[hidden] { display: none !important; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora { position: absolute; inset: -20% -10% auto; height: 900px; filter: blur(70px) saturate(1.2); opacity: .55; }
.aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 22s var(--ease) infinite alternate; }
.aurora i:nth-child(1) { width: 620px; height: 520px; left: 8%; top: 8%; background: radial-gradient(circle, #7c3aed, transparent 65%); }
.aurora i:nth-child(2) { width: 560px; height: 480px; right: 6%; top: 0; background: radial-gradient(circle, #0891b2, transparent 65%); animation-duration: 26s; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 520px; height: 420px; left: 40%; top: 30%; background: radial-gradient(circle, #db2777, transparent 65%); opacity: .55; animation-duration: 30s; animation-delay: -12s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.12); } 100% { transform: translate(-50px, 70px) scale(.95); } }
.grid { position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / .11) 1.1px, transparent 1.2px); background-size: 26px 26px; mask-image: radial-gradient(ellipse 70% 55% at 50% 12%, #000 10%, transparent 75%); animation: pan 60s linear infinite; }
@keyframes pan { to { background-position: 26px 26px; } }
.grain { position: absolute; inset: 0; opacity: .06; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
:root[data-theme="light"] .aurora { opacity: .28; }
:root[data-theme="light"] .aurora i { mix-blend-mode: multiply; }
:root[data-theme="light"] .grid { background-image: radial-gradient(rgb(20 20 60 / .12) 1.1px, transparent 1.2px); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .aurora { opacity: .28; }
  :root:not([data-theme="dark"]) .aurora i { mix-blend-mode: multiply; }
  :root:not([data-theme="dark"]) .grid { background-image: radial-gradient(rgb(20 20 60 / .12) 1.1px, transparent 1.2px); }
}

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top); transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.top.scrolled { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; filter: drop-shadow(0 0 12px rgb(34 211 238 / .35)); transition: transform .5s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14.5px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- Buttons ---------- */
.btn { --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 20px; border-radius: 999px; border: 0; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: transform .25s var(--spring), box-shadow .3s, background .3s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { --h: 52px; padding: 0 24px; font-size: 15.5px; }
.btn-glow { position: relative; color: #0b0b12; background: var(--accent); background-size: 160% 100%; box-shadow: var(--glow); isolation: isolate; }
.btn-glow:hover { background-position: 100% 0; transform: translateY(-1px); }
.btn-glow::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .55) 50%, transparent 65%); background-size: 250% 100%; background-position: 120% 0; mix-blend-mode: overlay; z-index: -1; }
.btn-glow:hover::after { animation: sheen 1.1s var(--ease); }
@keyframes sheen { to { background-position: -40% 0; } }
.btn-ghost { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn[disabled], .icon-btn[disabled] { opacity: .45; pointer-events: none; }
.export.is-sample .btn, .export.is-sample .icon-btn { opacity: .6; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); transition: background .2s, transform .25s var(--spring); }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn:active { transform: scale(.92); }
.icon-btn-lg { width: 52px; height: 52px; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--muted); font-size: 14px; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.link-btn:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: clamp(28px, 5vw, 60px) 0 clamp(26px, 3.4vw, 40px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 16px 7px 12px; border-radius: 999px; font-size: 13.5px; color: var(--muted); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(10px); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgb(74 222 128 / .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgb(74 222 128 / 0); } 100% { box-shadow: 0 0 0 0 rgb(74 222 128 / 0); } }
h1 { margin: 0 auto; max-width: 15ch; font-size: clamp(40px, 6.4vw, 78px); line-height: .98; letter-spacing: -.045em; font-weight: 650; text-wrap: balance; }
h1 em { font-size: 1.08em; letter-spacing: -.02em; background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.lede { margin: 22px auto 0; max-width: 58ch; color: var(--muted); font-size: clamp(16px, 1.7vw, 18.5px); text-wrap: pretty; }
.intro { animation: intro .9s var(--ease) both; }
.d1 { animation-delay: .06s; } .d2 { animation-delay: .14s; } .d3 { animation-delay: .24s; }
@keyframes intro { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }

/* ---------- App layout ---------- */
.app { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 440px; grid-template-areas: "input stage" "style stage"; align-items: start; padding-bottom: 40px; }
.p-input { grid-area: input; }
.p-style { grid-area: style; }
.stage-col { grid-area: stage; align-self: stretch; }
.stage-sticky { position: sticky; top: 88px; display: grid; gap: 14px; }
.panel { position: relative; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3); padding: 22px; }
.p-input::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--spin), transparent 0 60%, rgb(167 139 250 / .8), rgb(34 211 238 / .8), transparent 85%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 7s linear infinite; pointer-events: none; opacity: .9; }
@keyframes spin { to { --spin: 360deg; } }

/* Tabs */
.tabs { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; z-index: 1; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 14.5px; font-weight: 550; transition: color .25s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs .ico { width: 16px; height: 16px; }
.tab-ink { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 10px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2), 0 4px 14px -4px rgb(0 0 0 / .4); transition: transform .45s var(--spring), width .45s var(--spring); }
.tp { display: grid; gap: 14px; animation: tpIn .4s var(--ease); }
@keyframes tpIn { from { opacity: 0; transform: translateY(6px); } }

/* Fields */
.field { display: grid; gap: 7px; min-width: 0; }
.label { font-size: 13px; font-weight: 550; color: var(--muted); }
.label i { font-style: normal; color: var(--faint); font-weight: 400; margin-left: 4px; }
.input-wrap { position: relative; display: flex; align-items: center; }
input:not([type]), input[type="url"], input[type="email"], input[type="tel"], input[type="password"], input[type="text"], select, textarea {
  width: 100%; min-width: 0; height: 46px; padding: 0 14px; border-radius: var(--r-sm); border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); outline: 0; font-size: 15px; transition: box-shadow .2s, background .2s; }
textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select option { background: var(--bg-2); color: var(--text); }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 1.5px var(--violet), 0 0 0 4px rgb(167 139 250 / .15); background: var(--surface-3); }
::placeholder { color: var(--faint); }
.field-xl input { height: 62px; padding-left: 48px; padding-right: 104px; font-size: 18px; border-radius: 16px; letter-spacing: -.01em; }
.lead-ico { position: absolute; left: 17px; color: var(--faint); pointer-events: none; }
.input-wrap .chip-btn { position: absolute; right: 8px; }
.input-wrap input[type="password"], .input-wrap #f-pass { padding-right: 52px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--surface-3); color: var(--text); font-size: 13.5px; font-weight: 550; box-shadow: inset 0 0 0 1px var(--line); transition: background .2s; }
.chip-btn:hover { background: var(--line-2); }
.chip-btn .ico { width: 15px; height: 15px; }
.chip-btn[aria-pressed="true"] { color: var(--cyan); }
.hint { margin: 0; font-size: 13.5px; color: var(--faint); }
.hint b { color: var(--muted); font-weight: 550; }
.hint.ok { color: var(--muted); }
.hint.bad { color: var(--bad); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--muted); min-height: 46px; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { position: relative; width: 38px; height: 22px; border-radius: 99px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); transition: background .25s; flex: none; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .35s var(--spring); }
.switch input:checked + .sw { background: linear-gradient(110deg, var(--violet), var(--cyan)); }
.switch input:checked + .sw::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + .sw { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Segmented */
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); gap: 2px; max-width: 100%; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 4px; height: 38px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 550; color: var(--muted); transition: background .25s, color .25s, box-shadow .25s; white-space: nowrap; }
.seg small { font-size: 11.5px; color: var(--faint); font-weight: 500; }
.seg input:hover + span { color: var(--text); }
.seg input:checked + span { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), 0 3px 10px -4px rgb(0 0 0 / .4); }
.seg input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: -2px; }
.seg-sm span { height: 34px; padding: 0 12px; font-size: 13.5px; }
.p-style .seg { display: flex; }

/* Style groups */
.p-style { padding: 6px 22px; }
.grp { border-bottom: 1px solid var(--line); }
.grp:last-child { border-bottom: 0; }
.grp summary { list-style: none; display: flex; align-items: baseline; gap: 12px; padding: 18px 0; cursor: pointer; font-weight: 600; font-size: 15.5px; }
.grp summary::-webkit-details-marker { display: none; }
.grp summary em { font-family: var(--sans); font-style: normal; font-weight: 400; font-size: 13.5px; color: var(--faint); }
.grp summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: translateY(-3px) rotate(45deg); transition: transform .35s var(--spring); align-self: center; }
.grp[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.grp::details-content { block-size: 0; overflow: clip; transition: block-size .4s var(--ease), content-visibility .4s allow-discrete; }
.grp[open]::details-content { block-size: auto; }
.grp-body { display: grid; gap: 14px; padding: 0 0 22px; }
.mini-label { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }

.presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.preset { position: relative; display: grid; gap: 7px; padding: 8px 8px 9px; border: 0; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); text-align: center; font-size: 12.5px; font-weight: 550; color: var(--muted); transition: transform .3s var(--spring), box-shadow .25s, background .25s, color .2s; }
.preset:hover { transform: translateY(-3px); background: var(--surface-3); color: var(--text); }
.preset[aria-checked="true"] { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--violet), 0 8px 24px -10px rgb(124 58 237 / .7); }
.preset .pv { aspect-ratio: 1; border-radius: 9px; overflow: hidden; }
.preset .pv svg { width: 100%; height: 100%; }

.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.opt { display: grid; place-items: center; gap: 6px; padding: 10px 6px 8px; border: 0; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 12px; font-weight: 550; transition: transform .3s var(--spring), box-shadow .25s, color .2s, background .2s; }
.opt svg { width: 34px; height: 34px; fill: currentColor; }
.opt:hover { color: var(--text); background: var(--surface-3); transform: translateY(-2px); }
.opt[aria-checked="true"] { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--cyan), 0 6px 18px -8px rgb(34 211 238 / .6); }
.opt[aria-checked="true"] svg { fill: url(#bm); }

.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.color { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; min-width: 0; }
.color input[type="color"] { position: absolute; left: 7px; top: 7px; width: 36px; height: 36px; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.sw-c { width: 36px; height: 36px; border-radius: 10px; background: var(--c, #000); box-shadow: inset 0 0 0 1px rgb(127 127 127 / .35), 0 3px 10px -3px var(--c, #000); flex: none; pointer-events: none; transition: background .2s; }
.color.is-transparent .sw-c { background: repeating-conic-gradient(#888 0 25%, #ddd 0 50%) 0 0 / 12px 12px; }
.ct { display: grid; min-width: 0; line-height: 1.2; }
.ct > span { font-size: 12px; color: var(--faint); font-weight: 550; }
.hex { width: 100%; height: auto !important; padding: 0 !important; background: none !important; box-shadow: none !important; font: 500 14.5px var(--mono) !important; text-transform: uppercase; border-radius: 4px !important; }
.range { display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.range > span { display: flex; justify-content: space-between; }
.range output { font-family: var(--mono); color: var(--text); font-size: 13px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--cyan)) 0 / var(--p, 50%) 100% no-repeat, var(--surface-3); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--surface-3); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .4), 0 0 0 4px rgb(167 139 250 / .25); transition: transform .2s var(--spring); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .4), 0 0 0 4px rgb(167 139 250 / .25); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.2); }
.switches { display: flex; flex-wrap: wrap; column-gap: 22px; }

.logo-row { display: flex; gap: 10px; align-items: center; }
.drop { flex: 1; display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s; min-width: 0; }
.drop:hover, .drop.over { border-color: var(--violet); background: var(--surface-2); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop:focus-within { outline: 2px solid var(--cyan); outline-offset: 2px; }
.drop-thumb { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--surface-3); color: var(--muted); flex: none; overflow: hidden; }
.drop-thumb img { width: 100%; height: 100%; object-fit: contain; background: repeating-conic-gradient(#999 0 25%, #ddd 0 50%) 0 0 / 10px 10px; }
.drop b { display: block; font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop small { display: block; color: var(--faint); font-size: 12.5px; line-height: 1.4; }

/* ---------- Stage / preview ---------- */
.stage { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.04; border-radius: 28px; background:
  radial-gradient(120% 90% at 50% 0%, rgb(167 139 250 / .2), transparent 60%),
  radial-gradient(90% 70% at 50% 110%, rgb(34 211 238 / .16), transparent 60%), var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow); perspective: 1100px; overflow: hidden; }
.stage::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(circle at 50% 50%, #000, transparent 72%); opacity: .55; }
.card { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 30%; position: relative; width: 74%; transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .6s var(--ease); will-change: transform; animation: float 7s ease-in-out infinite; }
.stage.tilting .card { transition: transform .12s linear; animation-play-state: paused; }
@keyframes float { 50% { translate: 0 -8px; } }
.qr { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 1px 0 rgb(255 255 255 / .15) inset, 0 40px 70px -25px rgb(0 0 0 / .75), 0 18px 30px -18px rgb(0 0 0 / .6); view-transition-name: qr; background: repeating-conic-gradient(rgb(127 127 127 / .22) 0 25%, transparent 0 50%) 0 0 / 18px 18px; }
.qr svg { width: 100%; height: auto; }
.qr.is-sample { opacity: .92; }
.qr.bump { animation: bump .5s var(--spring); }
@keyframes bump { 40% { scale: .965; } }
.glare { position: absolute; inset: 0; border-radius: 18px; pointer-events: none; background: radial-gradient(circle at var(--gx) var(--gy), rgb(255 255 255 / .38), transparent 45%); mix-blend-mode: soft-light; opacity: 0; transition: opacity .4s; }
.stage.tilting .glare { opacity: 1; }
.empty-note { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.drop-hint { position: absolute; inset: 12px; z-index: 3; display: grid; place-items: center; align-content: center; gap: 10px; border-radius: 20px; border: 2px dashed var(--violet); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(6px); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drop-hint .ico { width: 30px; height: 30px; }
.stage.over .drop-hint { opacity: 1; }
::view-transition-old(qr), ::view-transition-new(qr) { animation-duration: .45s; animation-timing-function: var(--ease); }
::view-transition-old(qr) { animation-name: vtOut; }
::view-transition-new(qr) { animation-name: vtIn; }
@keyframes vtOut { to { opacity: 0; filter: blur(8px); scale: .94; } }
@keyframes vtIn { from { opacity: 0; filter: blur(8px); scale: 1.04; } }

.status { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px; border-radius: 999px; font-size: 13px; font-weight: 550; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.chip[data-state="ok"] { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 30%, transparent); }
.chip[data-state="ok"] .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.chip[data-state="bad"] { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 30%, transparent); }
.chip[data-state="bad"] .dot { background: var(--bad); }
.chip[data-state="busy"] .dot { background: var(--cyan); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.chip-ghost { font-family: var(--mono); font-size: 12px; font-weight: 450; }
.warn { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 25%, transparent); }

.export { display: grid; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(20px); }
.export-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.export-btns { display: flex; gap: 8px; }
.export-btns .btn-glow { flex: 1; }

.mini-qr { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; width: 76px; height: 76px; padding: 0; border: 0; border-radius: 18px; overflow: hidden; box-shadow: var(--glow), var(--shadow); background: #fff; animation: pop .45s var(--spring); }
.mini-qr svg { width: 100%; height: 100%; }
@keyframes pop { from { scale: .4; opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100; translate: -50% 0; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: color-mix(in srgb, var(--bg-2) 88%, transparent); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); font-size: 14.5px; font-weight: 550; animation: toast .4s var(--spring); }
.toast .ico { color: var(--ok); }
.toast.out { opacity: 0; translate: -50% 10px; transition: .3s; }
@keyframes toast { from { opacity: 0; translate: -50% 16px; scale: .95; } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 110px) 0 0; }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto clamp(30px, 4vw, 48px); }
.kicker { margin: 0 0 14px; font: 600 12.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { margin: 0; font-size: clamp(30px, 4.6vw, 54px); line-height: 1.04; letter-spacing: -.035em; font-weight: 650; text-wrap: balance; }
h2 em { color: var(--muted); }
.sec-sub { margin: 18px auto 0; color: var(--muted); font-size: 17px; max-width: 64ch; text-wrap: pretty; }
h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.02em; font-weight: 620; }

.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { position: relative; padding: 26px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: transform .4s var(--spring), box-shadow .3s; }
.tile:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); }
.tile::after { content: ''; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgb(167 139 250 / .12), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.tile:hover::after { opacity: 1; }
.tile-wide { grid-column: span 2; }
.tile p { margin: 0; color: var(--muted); font-size: 15px; max-width: 52ch; }
.tile-art { height: 96px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.art-forever small { font: 500 13px var(--mono); color: var(--muted); padding: 7px 12px; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); margin-left: 8px; }
.art-forever span { font: 400 120px/1 var(--serif); background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { letter-spacing: .1em; filter: drop-shadow(0 0 22px rgb(34 211 238 / .5)); } }
.tile-art svg { width: 64px; height: 64px; padding: 14px; border-radius: 18px; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.art-verify svg { stroke: var(--ok); stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 2.6s var(--ease) infinite; }
@keyframes draw { 40%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -24; } }
.art-vector b { padding: 10px 14px; border-radius: 12px; font: 600 15px var(--mono); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.art-vector b:first-child { color: var(--cyan); transform: rotate(-6deg); }
.art-vector b:last-child { color: var(--violet); transform: rotate(5deg) translateY(8px); }
.art-style i { width: 46px; height: 46px; border-radius: 14px; background: var(--accent); }
.art-style i:nth-child(2) { border-radius: 50%; background: linear-gradient(135deg, #f472b6, #fbbf24); animation: morph 4s ease-in-out infinite; }
.art-style i:nth-child(3) { border-radius: 4px; transform: rotate(45deg) scale(.82); background: linear-gradient(135deg, #22d3ee, #a3e635); }
@keyframes morph { 50% { border-radius: 14px; rotate: 90deg; } }
.art-nosign { flex-wrap: wrap; align-content: center; }
.art-nosign span { padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 550; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.art-nosign span::before { content: '✓'; margin-right: 6px; color: var(--ok); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps li { position: relative; padding: 26px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 18px; border-radius: 12px; font: 600 16px var(--mono); color: #0b0b12; background: var(--accent); box-shadow: var(--glow); }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; margin: 0 auto; }
.cmp { padding: 26px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cmp-good { box-shadow: inset 0 0 0 1.5px rgb(167 139 250 / .5), 0 20px 60px -30px rgb(124 58 237 / .7); background: linear-gradient(180deg, rgb(167 139 250 / .08), transparent 60%), var(--surface); }
.cmp h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; margin-bottom: 16px; }
.tag { font: 600 11.5px var(--mono); letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; color: #0b0b12; background: var(--accent); }
.cmp ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.cmp li { position: relative; padding-left: 30px; color: var(--muted); font-size: 15px; }
.cmp li::before { position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.cmp li.y::before { content: '✓'; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.cmp li.n::before { content: '–'; color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.tip { max-width: 900px; margin: 18px auto 0; padding: 16px 20px; border-radius: 14px; color: var(--muted); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; }
.tip b { color: var(--text); }

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: background .3s, box-shadow .3s; }
.faq details[open] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.faq summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; font-weight: 580; font-size: 16.5px; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-left: auto; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); font-size: 18px; font-weight: 400; color: var(--muted); transition: transform .35s var(--spring); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size .4s var(--ease), content-visibility .4s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq details > div { padding: 0 22px 20px; }
.faq p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 68ch; }

.cta { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: clamp(28px, 5vw, 52px); border-radius: 28px; overflow: hidden; background: radial-gradient(80% 140% at 0% 0%, rgb(124 58 237 / .3), transparent 60%), radial-gradient(70% 120% at 100% 100%, rgb(8 145 178 / .28), transparent 60%), var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); }
.cta h2 { font-size: clamp(28px, 3.6vw, 42px); }
.cta p:not(.kicker) { margin: 14px 0 0; color: var(--muted); max-width: 52ch; }
.cta-links { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }

.foot { margin-top: clamp(64px, 9vw, 110px); border-top: 1px solid var(--line); padding: 40px 0 calc(28px + env(safe-area-inset-bottom)); }
.foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-note { margin: 12px 0 0; color: var(--faint); font-size: 14px; max-width: 40ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-content: flex-start; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 14.5px; }
.foot-links a:hover { color: var(--text); }
.foot-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; }

/* Scroll-driven reveal (progressive enhancement: content is visible without it) */
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  @keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.98); } }
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .app { grid-template-columns: minmax(0, 1fr) 380px; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "input" "stage" "style"; }
  .stage-sticky { position: static; }
  .stage { aspect-ratio: auto; padding: 34px 0 44px; }
  .card { width: min(72%, 360px); }
  .bento { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .top-in { height: 60px; gap: 12px; }
  .top-actions .btn { display: none; }
  .panel { padding: 16px; }
  .p-style { padding: 2px 16px; }
  .tabs { display: grid; grid-template-columns: repeat(5, 1fr); }
  .tabs button { flex-direction: column; gap: 3px; height: 54px; padding: 0 2px; font-size: 12px; }
  .tabs .ico { width: 18px; height: 18px; }
  #pasteBtn { width: 40px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  #pasteBtn .ico { width: 17px; height: 17px; }
  .field-xl input { height: 56px; font-size: 16px; padding-left: 44px; padding-right: 56px; }
  .row2, .colors { grid-template-columns: 1fr; }
  .presets { gap: 6px; }
  .preset { padding: 5px 5px 6px; font-size: 11px; gap: 4px; border-radius: 11px; }
  .preset .pv { border-radius: 6px; }
  .bento, .compare { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; }
  .export-row { flex-direction: column; align-items: stretch; }
  .export-row .seg { display: flex; }
  .btn-lg { padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { animation: none !important; }
}
