:root {
  --bg: #12151c;
  --bg-deep: #0d0f14;
  --panel: rgba(26, 30, 39, .82);
  --panel-solid: #1a1e27;
  --soft: rgba(40, 44, 55, .56);
  --line: rgba(255, 255, 255, .105);
  --ink: #f4f3ef;
  --muted: #a8a9ad;
  --orange: #ff8a42;
  --orange-soft: rgba(255, 138, 66, .13);
  --green: #9dff42;
  --radius: 18px;
  --sans: Inter, Arial, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg-deep); font-family: var(--sans); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.ambient-grid { position: fixed; inset: 0; z-index: -2; background: radial-gradient(circle at 72% 12%, rgba(255, 138, 66, .1), transparent 25%), radial-gradient(circle at 12% 42%, rgba(58, 90, 145, .13), transparent 34%), linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px), var(--bg); background-size: auto, auto, 64px 64px, 64px 64px, auto; }
.page-frame { width: min(1460px, calc(100% - 44px)); margin: 26px auto; border: 1px solid rgba(255,255,255,.08); border-radius: 34px; overflow: hidden; background: rgba(14, 16, 22, .58); box-shadow: 0 34px 100px rgba(0,0,0,.34); }

.topbar { width: calc(100% - 80px); min-height: 74px; margin: 18px 40px 0; padding: 12px 16px 12px 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(26,30,39,.82); backdrop-filter: blur(24px); display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; text-decoration: none; gap: 9px; }
.brand-symbol { width: 32px; height: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(-3deg); }
.brand-symbol i { border: 3px solid var(--ink); border-radius: 2px; }
.brand-symbol i:last-child { background: var(--orange); border-color: var(--orange); clip-path: polygon(0 0,100% 0,100% 70%,70% 70%,70% 100%,0 100%); }
.brand-name { font-size: 21px; line-height: 1; font-weight: 800; letter-spacing: -.055em; }
.brand-name span { font-weight: 300; }
.brand-ccmx { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .16em; align-self: flex-end; padding-bottom: 1px; }
.topbar nav { display: flex; align-items: center; gap: 30px; }
.topbar nav a { text-decoration: none; color: #c9c9cb; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; position: relative; }
.topbar nav a:hover, .topbar nav a.active { color: white; }
.topbar nav a.active::after { content: ""; position: absolute; height: 2px; left: 0; right: 50%; bottom: -10px; background: var(--orange); }
.topbar nav .nav-button { padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.topbar nav .nav-button::after { display: none; }
.local-badge { display: flex; align-items: center; gap: 8px; color: #b9c3bc; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.local-badge span { width: 6px; height: 6px; border-radius: 50%; background: #70d493; box-shadow: 0 0 0 4px rgba(112,212,147,.1); }

main { width: calc(100% - 80px); margin: 0 40px; }
.hero { padding: 76px 6px 58px; position: relative; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; border-bottom: 1px solid var(--line); }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.eyebrow span { width: 32px; height: 2px; background: var(--orange); }
.hero-row { display: grid; grid-template-columns: 1fr .42fr; align-items: end; gap: 70px; }
h1 { max-width: 850px; margin: 26px 0 0; font-size: clamp(46px, 5.4vw, 78px); line-height: 1.01; letter-spacing: -.068em; font-weight: 500; }
h1 em { color: var(--orange); font-style: normal; }
.hero-text { max-width: 350px; margin: 0 0 6px; color: #b6b7bb; font-size: 16px; line-height: 1.65; }

.section-intro { padding: 86px 0 42px; display: grid; grid-template-columns: .7fr 1fr .75fr; gap: 44px; align-items: end; }
.section-intro > p:first-child, .process > div > p { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .13em; align-self: start; }
.section-intro h2, .process h2 { margin: 0; font-size: clamp(42px, 4.7vw, 67px); line-height: .98; letter-spacing: -.06em; font-weight: 500; }
.section-intro h2 span { color: var(--orange); }
.section-intro > p:last-child { margin: 0 0 5px; color: var(--muted); line-height: 1.7; font-size: 14px; }

.workspace-header { padding: 42px 0 18px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.workspace-header span { color: var(--orange); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.workspace-header h2 { margin: 7px 0 0; font-size: 28px; font-weight: 500; letter-spacing: -.04em; }
.text-button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: #aaaeb6; cursor: pointer; font-size: 10px; }
.text-button:hover { color: white; border-color: rgba(255,255,255,.25); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(390px, .86fr); gap: 20px; align-items: start; padding-bottom: 70px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 25px 70px rgba(0,0,0,.18); backdrop-filter: blur(18px); }
.controls-panel { padding: 34px; }
.preview-panel { padding: 30px; position: sticky; top: 20px; }
.section-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 24px; }
.section-heading.compact { margin-bottom: 20px; }
.step { color: var(--orange); font-size: 10px; line-height: 25px; font-weight: 800; letter-spacing: .13em; }
.section-heading h3, .preview-heading h3 { margin: 0; font-size: 25px; font-weight: 500; letter-spacing: -.035em; }
.section-heading p { color: var(--muted); margin: 5px 0 0; font-size: 12px; }
.divider { height: 1px; background: var(--line); margin: 28px 0; }
.preset-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 5px; }
.preset { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 7px; border: 1px solid var(--line); border-radius: 8px; background: rgba(7,9,13,.24); color: #a7a9ae; cursor: pointer; font-size: 9px; }
.preset:hover, .preset.active { border-color: rgba(255,255,255,.26); color: white; background: var(--soft); }
.preset i { width: 17px; height: 17px; border-radius: 50%; background: linear-gradient(135deg,var(--p1) 0 50%,var(--p2) 50%); border: 1px solid rgba(255,255,255,.22); }

.content-tabs { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8,10,14,.32); margin-bottom: 18px; }
.tab { flex: 1; border: 0; border-radius: 8px; background: transparent; padding: 11px 8px; color: #9d9fa4; font-size: 11px; cursor: pointer; transition: .2s; }
.tab:hover { color: white; }
.tab.active { color: white; background: var(--soft); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); font-weight: 700; }
.field { display: grid; gap: 8px; margin-top: 16px; color: #d6d6d8; font-size: 11px; font-weight: 700; }
.dynamic-fields .field:first-child { margin-top: 0; }
.field-hint { margin: 8px 2px 0; color: #7f8289; font-size: 9px; line-height: 1.5; }
.field-hint strong { color: #aaaeb5; font-weight: 600; }
.check-row { display: inline-flex; align-items: center; gap: 8px; margin-top: 13px; color: #aaaeb5; font-size: 10px; cursor: pointer; }
.check-row input { accent-color: var(--orange); }
textarea, input[type="text"], input[type="url"], input[type="email"], input[type="password"], select { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: rgba(7,9,13,.35); color: white; padding: 13px; outline: none; transition: .2s; }
textarea { min-height: 102px; resize: vertical; line-height: 1.5; }
textarea:focus, input:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
select option { background: var(--panel-solid); }
.inline-status { min-height: 18px; display: flex; align-items: center; gap: 7px; margin-top: 10px; color: #82d89f; font-size: 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #70d493; }
.inline-status.error { color: #ff8d8d; }
.inline-status.error .status-dot { background: #ff7070; }
.char-count { margin-left: auto; color: #777a82; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.color-control { display: grid; grid-template-columns: 46px 1fr; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: rgba(7,9,13,.35); }
.color-control input[type="color"] { width: 46px; height: 44px; padding: 7px; border: 0; background: transparent; cursor: pointer; }
.color-control input[type="text"] { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; text-transform: uppercase; }
.segmented { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.segmented button { padding: 11px 8px; border: 0; border-right: 1px solid var(--line); background: rgba(7,9,13,.25); color: #a7a8ac; cursor: pointer; font-size: 11px; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { background: var(--ink); color: var(--bg); font-weight: 700; }
.range-row { display: grid; grid-template-columns: 1fr 42px; gap: 10px; align-items: center; }
input[type="range"] { width: 100%; accent-color: var(--orange); }
output { padding: 8px 5px; border-radius: 7px; background: var(--soft); color: white; text-align: center; font-family: ui-monospace, monospace; font-size: 10px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; cursor: pointer; }
.toggle-row > span:first-child { display: grid; gap: 3px; }
.toggle-row strong { font-size: 11px; }
.toggle-row small { color: var(--muted); font-size: 10px; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle { flex: 0 0 42px; height: 23px; border-radius: 99px; background: #474b54; padding: 3px; transition: .2s; }
.toggle::after { content: ""; display: block; width: 17px; height: 17px; border-radius: 50%; background: white; transition: .2s; }
.toggle-row input:checked + .toggle { background: var(--orange); }
.toggle-row input:checked + .toggle::after { transform: translateX(19px); }
.eye-color-row { max-width: calc(50% - 7px); }
.logo-drop { min-height: 94px; padding: 18px; display: flex; align-items: center; border: 1px dashed rgba(255,255,255,.22); border-radius: 12px; cursor: pointer; transition: .2s; }
.logo-drop:hover, .logo-drop.dragging, .logo-drop:focus { border-color: var(--orange); background: var(--orange-soft); outline: none; }
.logo-placeholder, .logo-loaded { width: 100%; display: flex; align-items: center; gap: 13px; }
.logo-placeholder > span:last-child, .logo-loaded > span { display: grid; gap: 4px; }
.logo-placeholder strong, .logo-loaded strong { font-size: 11px; }
.logo-placeholder small, .logo-loaded small { color: var(--muted); font-size: 10px; }
.upload-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: var(--soft); color: var(--orange); font-size: 19px; }
.logo-loaded img { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--line); border-radius: 9px; background: white; }
.logo-loaded button { margin-left: auto; border: 0; background: transparent; color: var(--orange); cursor: pointer; font-size: 10px; text-decoration: underline; }

.preview-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.preview-heading > div { display: flex; align-items: baseline; gap: 13px; }
.qr-meta { color: #7f8188; font-size: 9px; font-family: ui-monospace, monospace; }
.canvas-stage { position: relative; width: 100%; aspect-ratio: 1; padding: 18px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 15px; background-color: rgba(8,10,14,.32); background-image: linear-gradient(45deg,rgba(255,255,255,.035) 25%,transparent 25%),linear-gradient(-45deg,rgba(255,255,255,.035) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(255,255,255,.035) 75%),linear-gradient(-45deg,transparent 75%,rgba(255,255,255,.035) 75%); background-size: 18px 18px; background-position: 0 0,0 9px,9px -9px,-9px 0; }
#qr-canvas { width: 100%; height: 100%; display: block; border-radius: 8px; box-shadow: 0 18px 42px rgba(0,0,0,.24); }
.preview-error { position: absolute; inset: 18px; display: grid; place-items: center; padding: 30px; border-radius: 8px; background: rgba(26,30,39,.96); color: #ff9696; text-align: center; font-size: 12px; }
.quality-note { display: flex; align-items: center; gap: 10px; padding: 14px 0 18px; border-bottom: 1px solid var(--line); }
.quality-note > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(112,212,147,.1); color: #70d493; font-size: 11px; }
.quality-note p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.quality-note strong { color: #82d89f; }
.quality-note.warning > span { background: rgba(255,190,77,.12); color: #ffbe4d; }
.quality-note.warning strong { color: #ffbe4d; }
.quality-note.danger > span { background: rgba(255,112,112,.12); color: #ff7070; }
.quality-note.danger strong { color: #ff8d8d; }
.export-block { padding-top: 21px; }
.export-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 13px; }
.export-title h4 { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -.035em; }
.export-title label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.export-title select { width: auto; padding: 7px 23px 7px 8px; font-size: 9px; }
.filename-field { margin: 0 0 12px; }
.filename-field input { padding: 10px 12px; font-size: 10px; }
.download-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.download { min-width: 0; position: relative; display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); text-align: left; cursor: pointer; transition: .2s; }
.download:hover { border-color: var(--orange); transform: translateY(-2px); }
.download span { font-size: 11px; font-weight: 800; }
.download small { color: var(--muted); font-size: 9px; }
.download b { position: absolute; right: 11px; top: 17px; color: var(--orange); font-weight: 400; }
.download.primary { background: var(--orange); color: var(--bg); border-color: var(--orange); }
.download.primary small, .download.primary b { color: rgba(18,21,28,.7); }
.privacy { margin: 14px 0 0; color: #757880; font-size: 9px; line-height: 1.45; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 30; transform: translate(-50%,18px); padding: 11px 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(26,30,39,.96); color: white; box-shadow: 0 16px 45px rgba(0,0,0,.35); font-size: 11px; opacity: 0; pointer-events: none; transition: .22s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

.process { padding: 90px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; }
.process ol { margin: 0; padding: 0; list-style: none; }
.process li { display: grid; grid-template-columns: 62px 1fr; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.process li:last-child { border-bottom: 1px solid var(--line); }
.process li > span { color: var(--orange); font-size: 10px; font-weight: 800; }
.process li h3 { margin: 0 0 5px; font-size: 21px; font-weight: 500; letter-spacing: -.03em; }
.process li p { margin: 0; color: var(--muted); font-size: 12px; }

footer { padding: 52px 0 28px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.footer-brand { display: flex; align-items: flex-end; gap: 8px; }
footer > p { margin: 0; color: var(--muted); text-align: right; font-size: 12px; }
footer > a { color: var(--orange); text-decoration: none; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
footer small { color: #71737a; text-align: right; font-size: 9px; }

@media (max-width: 1050px) {
  .topbar nav { display: none; }
  .hero-row { grid-template-columns: 1fr; gap: 20px; }
  .section-intro { grid-template-columns: 1fr 1fr; }
  .section-intro > p:last-child { grid-column: 2; }
  .workspace { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
}
@media (max-width: 680px) {
  .page-frame { width: calc(100% - 18px); margin: 9px auto; border-radius: 22px; }
  .topbar, main { width: calc(100% - 28px); margin-left: 14px; margin-right: 14px; }
  .topbar { padding: 11px 13px; min-height: 65px; }
  .local-badge { display: none; }
  .brand-name { font-size: 18px; }
  .hero { padding: 58px 0 40px; }
  h1 { font-size: 45px; }
  .hero-text { font-size: 15px; }
  .workspace-header { padding-top: 30px; }
  .controls-panel, .preview-panel { padding: 22px 17px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .preset-row { grid-template-columns: repeat(2,1fr); }
  .eye-color-row { max-width: none; }
  .download-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; gap: 45px; }
  footer { grid-template-columns: 1fr; }
  footer > p, footer small { text-align: left; }
}
