/* genrateqrcode.online — shared stylesheet */
:root {
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eff6ff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --radius: 12px;
  --maxw: 1100px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ---------- header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo .dot { color: var(--accent); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.main-nav a { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }

/* ---------- layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 2rem 1rem; }
.hero { text-align: center; padding: 2.5rem 1rem 1rem; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 0.75rem; letter-spacing: -0.02em; }
.hero p { color: var(--muted); font-size: 1.05rem; margin: 0.4rem 0; }
section.block { margin: 2.5rem 0; }
section.block h2 { font-size: 1.5rem; margin: 0 0 0.75rem; letter-spacing: -0.01em; }

/* ---------- generator app ---------- */
.app { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(16,24,40,.06);
}
.panel h2 { font-size: 1.1rem; margin: 0 0 1rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.tab {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.tab:hover { border-color: var(--accent); }
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabpanel { display: none; }
.tabpanel.active { display: block; }
.field { margin-bottom: 0.9rem; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.3rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="number"], .field input[type="url"], .field input[type="datetime-local"],
.field select, .field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field textarea { min-height: 72px; resize: vertical; }
.field .hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.checkbox-row input { width: 1rem; height: 1rem; accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.char-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: var(--muted); margin-top: 0.6rem; }
.char-row .warn { color: #b45309; font-weight: 600; }

/* preview */
.preview-panel { text-align: center; position: sticky; top: 84px; }
.preview-box {
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  margin-bottom: 1rem;
  overflow: hidden;
}
.preview-box canvas, .preview-box svg { max-width: 100%; height: auto; image-rendering: pixelated; }
.preview-box .placeholder { color: var(--muted); font-size: 0.92rem; padding: 1rem; text-align: center; }
.preview-box .render-error { color: #b45309; font-size: 0.92rem; padding: 1rem; text-align: center; font-weight: 600; }
.action-row { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.btn {
  display: inline-block;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 8px;
  padding: 0.62rem 1.1rem;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--accent); }
.btn.secondary:hover { background: var(--accent-soft); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.color-field { display: flex; align-items: center; gap: 0.5rem; }
.color-field input[type="color"] { width: 2.4rem; height: 2.4rem; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
details.advanced { border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; margin-top: 1rem; }
details.advanced summary { font-weight: 700; cursor: pointer; font-size: 0.92rem; }

/* ---------- content sections ---------- */
.howto ol { padding-left: 1.4rem; }
.howto li { margin-bottom: 0.6rem; }
.faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 0.7rem; padding: 0.85rem 1rem; }
.faq-item summary { font-weight: 700; cursor: pointer; }
.faq-item p { margin: 0.5rem 0 0; color: var(--muted); }
.guides-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.guide-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; background: #fff; }
.guide-card h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.guide-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- blog typography ---------- */
.article { max-width: 760px; margin: 0 auto; }
.article h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.article .meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.5rem; }
.article h2 { font-size: 1.35rem; margin: 2rem 0 0.6rem; }
.article h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.article p { margin: 0 0 1rem; }
.article ul, .article ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.article li { margin-bottom: 0.4rem; }
.article blockquote { border-left: 3px solid var(--accent); margin: 1.2rem 0; padding: 0.4rem 1rem; color: var(--muted); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.article table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.92rem; }
.article th, .article td { border: 1px solid var(--border); padding: 0.55rem 0.75rem; text-align: left; }
.article th { background: var(--bg-soft); }
.article code { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 5px; padding: 0.1rem 0.35rem; font-size: 0.88em; }
.blog-list { list-style: none; padding: 0; margin: 0; }
.blog-list li { border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.blog-list h2, .blog-list h3 { font-size: 1.15rem; margin: 0 0 0.3rem; }
.blog-list p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.92rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 3rem; }
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 2rem 1rem 1.5rem; }
.footer-nav ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.footer-nav a { color: var(--muted); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--accent); }
.copyright { color: var(--muted); font-size: 0.85rem; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .hero h1 { font-size: 1.7rem; }
  .main-nav ul { gap: 0.8rem; }
  .main-nav a { font-size: 0.88rem; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .site-header .inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .container { padding: 1.25rem 0.9rem; }
}

/* ---- Blog compatibility layer ---- */
.wrap{max-width:1100px;margin:0 auto;padding:0 1rem}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between;padding-top:.9rem;padding-bottom:.9rem}
.site-header nav a{margin-left:1.1rem}
.post-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.25rem;margin:1.5rem 0 3rem}
.post-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:1.25rem;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.post-card h2{font-size:1.15rem;margin:0 0 .5rem;line-height:1.35}
.post-card h2 a{color:#111827;text-decoration:none}
.post-card h2 a:hover{color:#2563eb}
.post-card p{color:#4b5563;font-size:.95rem;margin:.5rem 0}
.read-more{color:#2563eb;font-weight:600;text-decoration:none}
.lede{font-size:1.1rem;color:#374151;max-width:720px}
.img-suggestion{border:2px dashed #93c5fd;background:#eff6ff;border-radius:10px;padding:1rem 1.25rem;color:#1e40af;font-size:.92rem;margin:1.5rem 0}
main article{max-width:760px}
main article h1{font-size:2rem;line-height:1.25;margin:1.25rem 0 .75rem}
main article h2{font-size:1.4rem;margin:2rem 0 .6rem;color:#111827}
main article h3{font-size:1.15rem;margin:1.5rem 0 .5rem;color:#1f2937}
main article p{line-height:1.7;color:#374151;margin:.8rem 0}
main article ul,main article ol{line-height:1.7;color:#374151;margin:.8rem 0;padding-left:1.4rem}
main article li{margin:.35rem 0}
main article a{color:#2563eb}
@media (prefers-color-scheme:dark){
  .post-card{background:#111827;border-color:#1f2937}
  .post-card h2 a{color:#f3f4f6}
  .post-card p{color:#9ca3af}
  .img-suggestion{background:#1e3a8a22;border-color:#3b82f6;color:#bfdbfe}
  main article h2,main article h3{color:#f3f4f6}
  main article p,main article li{color:#d1d5db}
  .lede{color:#d1d5db}
}
