:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --text: #14181f;
  --muted: #5d6773;
  --line: #e3e8ef;
  --accent: #2563eb;
  --accent-soft: #eaf0ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1319;
    --bg-soft: #161c24;
    --text: #e8edf4;
    --muted: #98a3b3;
    --line: #232b36;
    --accent: #6c9bff;
    --accent-soft: #182234;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap { width: 100%; max-width: 940px; margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .5px;
}
.brand-name { font-size: 17px; }

.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }

.hero { padding: 56px 20px 28px; }
.hero h1 { margin: 0 0 14px; font-size: clamp(28px, 5vw, 44px); line-height: 1.15; letter-spacing: -.02em; }
.lead { margin: 0; max-width: 620px; color: var(--muted); font-size: 17px; }

.card {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 38px 18px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.drop:hover, .drop-active { border-color: var(--accent); background: var(--accent-soft); }
.drop-icon { font-size: 26px; color: var(--accent); }
.drop-title { font-weight: 600; }
.drop-hint { font-size: 13px; color: var(--muted); }

.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

@media (max-width: 720px) {
  .controls { grid-template-columns: 1fr 1fr; }
  .controls .btn { grid-column: 1 / -1; }
  .nav { gap: 14px; }
}

.control { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.control label { font-size: 13px; color: var(--muted); }
.control select, .control input[type="number"] {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.control input[type="range"] { width: 100%; accent-color: var(--accent); }
.muted { color: var(--muted); font-weight: 400; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px;
  border: 0; border-radius: 9px;
  background: var(--accent); color: #fff;
  font: inherit; font-weight: 600;
  cursor: pointer;
  transition: opacity .15s ease, transform .05s ease;
}
.btn:hover { opacity: .92; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-small { padding: 7px 14px; font-size: 14px; }

.status { min-height: 22px; margin: 14px 2px 0; font-size: 14px; color: var(--muted); }

.results { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.results li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font-size: 14px;
}
.result-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-meta { color: var(--muted); margin-left: auto; white-space: nowrap; }

h2 { margin: 52px 0 16px; font-size: 24px; letter-spacing: -.01em; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.muted-block { color: var(--muted); max-width: 680px; }

.legal { padding: 44px 20px 60px; max-width: 760px; }
.legal h1 { font-size: 30px; margin: 0 0 8px; letter-spacing: -.02em; }
.legal h2 { font-size: 19px; margin: 30px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 22px; }
.legal .updated { font-size: 13px; color: var(--muted); margin-bottom: 26px; }

.form { display: grid; gap: 14px; max-width: 520px; margin-top: 20px; }
.form label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg); color: var(--text); font: inherit;
}
.form textarea { min-height: 130px; resize: vertical; }
.form .note { font-size: 13px; color: var(--muted); }

.site-footer { margin-top: 64px; border-top: 1px solid var(--line); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 20px; font-size: 14px; color: var(--muted);
}
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--text); text-decoration: none; }

@media (max-width: 520px) {
  .hero { padding-top: 36px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* QR tool */
.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.text-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg); color: var(--text);
  font: inherit; resize: vertical;
}
.qr-out { margin-top: 16px; display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
#qrCanvas {
  width: 200px; height: 200px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  image-rendering: pixelated;
}
.qr-actions { display: flex; flex-direction: column; gap: 8px; }

/* hero badges */
.badges {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  margin: 18px 0 0; padding: 0;
}
.badges li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 13px; color: var(--muted);
}

/* language switch */
.lang { display: inline-flex; gap: 4px; margin-left: 14px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.lang-btn svg { display: block; border-radius: 2px; }
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 8px; }
  .lang { margin-left: auto; }
}
