/**
 * QRVelo — tool-first QR generator (plain CSS, no framework)
 * Wide center workspace; layout works with or without future ad scripts
 */

:root {
  --bg: #f4f6f8;
  --bg-subtle: #eef1f5;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #0d9488;
  --accent-soft: rgba(13, 148, 136, 0.12);
  --accent-hover: #0f766e;
  --accent-ring: rgba(13, 148, 136, 0.35);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 16px;
  --font: "Plus Jakarta Sans", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ----- Site header ----- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: min(1440px, 100%);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-logo {
  display: block;
  width: clamp(170px, 18vw, 260px);
  height: clamp(44px, 4.8vw, 68px);
  background: url("/file.svg?v=20260401") no-repeat left center / contain;
  color: transparent;
  font-size: 0;
  line-height: 0;
  text-decoration: none;
  flex: 0 0 auto;
}
.site-logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

/* 桌面端：导航常驻，汉堡按钮和抽屉保持隐藏（由下方 @media 控制移动端显隐） */
.site-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.site-menu-toggle:hover {
  border-color: #cbd5e1;
}

.site-menu-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: flex-end;
}
.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
}
.site-nav a:hover {
  color: var(--accent);
}

/* 语言切换（与主导航同一行） */
.site-nav__lang {
  margin-left: 4px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--muted);
  position: relative;
}

.site-nav__lang-switcher {
  position: relative;
}

.site-nav__lang-menu {
  position: relative;
}

.site-nav__lang-button {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  box-shadow: var(--shadow-sm);
  font-family: inherit;
}

.site-nav__lang-button::-webkit-details-marker {
  display: none;
}

.site-nav__lang-button:hover {
  border-color: var(--border-strong);
  color: var(--text-secondary);
  background: var(--surface);
}

.site-nav__lang-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.site-nav__lang-caret {
  font-size: 0.75rem;
  color: currentColor;
}

.site-nav__lang-menu[open] .site-nav__lang-caret {
  transform: rotate(180deg);
}

.site-nav__lang-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 80;
}

.site-nav__lang-menu[open] .site-nav__lang-list {
  display: grid;
  gap: 4px;
}

.site-nav__lang-option {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
}

.site-nav__lang-option:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.site-nav__lang-option.is-current {
  font-weight: 600;
  color: var(--text);
  background: var(--bg-subtle);
}

/* —— 侧滑抽屉（桌面隐藏） —— */
.site-menu-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 202;
  width: 280px;
  max-width: 85vw;
  margin: 0;
  padding: 0;
  flex-direction: column;
  align-items: stretch;
  background: var(--surface);
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

/* 抽屉打开状态 */
.site-header.is-nav-open .site-menu-drawer {
  transform: translateX(0);
}

/* RTL: 从左边滑出 */
body.rtl .site-menu-drawer {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

body.rtl .site-header.is-nav-open .site-menu-drawer {
  transform: translateX(0);
}

/* —— 抽屉头部 —— */
.site-menu-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.site-menu-drawer__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.site-menu-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.site-menu-drawer__close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.site-menu-drawer__close::before {
  content: "\00D7";
  font-size: 28px;
  line-height: 1;
}

/* —— 可滚动内容区 —— */
.site-menu-drawer__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 12px 16px;
  padding-bottom: env(safe-area-inset-bottom, 12px);
  box-sizing: border-box;
  gap: 4px;
}

/* —— 菜单链接样式 —— */
.site-menu-drawer__body a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.site-menu-drawer__body a:hover {
  background: rgba(0, 0, 0, 0.05);
}

.site-menu-drawer__body a:active {
  background: rgba(0, 0, 0, 0.08);
}

/* —— 底部关闭区域 —— */
.site-menu-drawer__footer {
  flex-shrink: 0;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
}

.site-menu-drawer__close-bottom {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.site-menu-drawer__close-bottom:hover {
  background: rgba(0, 0, 0, 0.05);
}

.site-menu-drawer__close-bottom:active {
  background: rgba(0, 0, 0, 0.08);
}

/* —— 遮罩层 —— */
.site-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 201;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.site-header.is-nav-open ~ .site-menu-backdrop,
.site-header.is-nav-open + .site-menu-backdrop {
  opacity: 1;
  visibility: visible;
}

/* —— 滚动锁定 —— */
body.mc-site-nav-open {
  overflow: hidden;
}

/* 桌面端强制恢复"原始顶部导航" */
@media (min-width: 721px) {
  .site-nav {
    display: flex !important;
  }
  .site-menu-toggle {
    display: none !important;
  }
  .site-menu-drawer,
  .site-menu-backdrop {
    display: none !important;
  }
  .site-header.is-nav-open .site-menu-drawer,
  .site-header.is-nav-open ~ .site-menu-backdrop,
  .site-header.is-nav-open + .site-menu-backdrop {
    display: none !important;
  }
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover {
  text-decoration: none;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.site-menu-drawer__lang {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.site-menu-drawer__lang-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.site-menu-drawer__lang-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text-secondary);
  background: var(--surface);
}

.site-menu-drawer__lang-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.site-menu-drawer__lang-list {
  display: none;
  padding-top: 8px;
}

.site-menu-drawer__lang.is-open .site-menu-drawer__lang-list {
  display: grid;
  gap: 4px;
}

.site-menu-drawer__lang-list a,
.site-menu-drawer__lang-list span {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.site-menu-drawer__lang-list a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.site-menu-drawer__lang-list [aria-current="page"] {
  background: var(--bg-subtle);
  font-weight: 600;
  color: var(--text);
}
.btn--ghost:hover {
  background: #f1f5f9;
}

.btn--secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn--secondary:hover {
  background: #f8fafc;
  border-color: var(--accent);
  color: var(--accent);
}

/* ----- Page shell: single column, wide tool area ----- */
.page-shell {
  max-width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.page-shell--article {
  max-width: min(920px, 100%);
}

/* Optional inner wrapper if you later insert ads between major blocks via script */
.layout-main {
  min-width: 0;
}

.layout-with-sidebar {
  display: block;
}

.layout-sidebar {
  display: none;
}

/* ----- Typography ----- */
h1,
.h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 12px;
}

h2,
.h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h3,
.h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.lead {
  font-size: 1.0625rem;
  color: var(--muted);
  margin: 0 0 12px;
  max-width: 68ch;
}

.trust-line {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 72ch;
}
.trust-line strong {
  color: var(--text);
  font-weight: 600;
}

.section {
  margin-top: 48px;
}
.section:first-of-type {
  margin-top: 0;
}

.section__title {
  margin-bottom: 8px;
}

.section__intro {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 65ch;
}

.seo-hero-intro {
  background: linear-gradient(180deg, rgba(204, 251, 241, 0.45) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: var(--radius-lg);
}

.seo-hero-intro .container {
  max-width: 72ch;
}

.hero-note {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
  max-width: 72ch;
}

/* ----- Tool workspace layout ----- */
.tool-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tool-type-switch {
  padding: 14px 16px;
}

.type-row-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.type-row-main.is-collapsible {
  overflow: hidden;
  transition: max-height 0.26s ease;
}

.type-row-actions {
  margin-top: 10px;
}

.type-row-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.type-row-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tool-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 420px);
  gap: 32px;
  align-items: start;
}

@media (max-width: 1024px) {
  .tool-workspace {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px;
}

.card--elevated {
  box-shadow: var(--shadow-md);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.tab-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tab-btn[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.tab-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
}

.tab-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.required-star {
  color: #dc2626;
}

.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

/* 并列单选（如短信扫码系统） */
fieldset.form-group--radio {
  border: none;
  padding: 0;
  margin: 0 0 14px;
  min-width: 0;
}
.form-group__legend {
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
}
.form-radio-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}
.form-radio-item input[type="radio"] {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}
.form-radio-item__text {
  line-height: 1.35;
}

input[type="text"],
input[type="url"],
input[type="tel"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  background: #fff;
}
textarea {
  min-height: 120px;
  resize: vertical;
}

.input--hero {
  min-height: 120px;
  font-size: 1rem;
}

input.input--hero {
  min-height: 52px;
  font-size: 1rem;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.range-row input[type="range"] {
  flex: 1;
  min-width: 140px;
  accent-color: var(--accent);
}
.range-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  min-width: 3.5rem;
}

.form-actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.color-row label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 6px;
}
input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: none;
}

/* Preview card */
.preview-card {
  text-align: center;
  position: sticky;
  top: 96px;
}
@media (max-width: 1024px) {
  .preview-card {
    position: static;
  }
}
.preview-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
}

.qr-frame {
  display: inline-block;
  padding: 20px;
  border-radius: var(--radius);
  background: #fff;
  transition: box-shadow 0.2s, border-radius 0.2s;
}
.qr-frame--none {
  box-shadow: var(--shadow-md);
}
.qr-frame--soft {
  box-shadow: var(--shadow-md);
  border-radius: 20px;
}
.qr-frame--badge {
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border);
  border-radius: 12px;
}
.qr-frame--label {
  box-shadow: var(--shadow-md);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

#qr-live-host {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 260px;
}
#qr-live-host canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.preview-placeholder {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 32px 16px;
}

.preview-size-control {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.preview-size-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

.preview-size-meta strong {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.preview-size-meta span:first-child {
  text-align: left;
}

.preview-size-meta span:last-child {
  text-align: right;
}

.preview-size-control input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* Customization grid */
.custom-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 520px) {
  .custom-grid {
    grid-template-columns: 1fr;
  }
}

.file-input-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 6px;
}

/* 高级版上传预告：按钮可见但禁用，免费用户用直链即可 */
.pro-file-upload-teaser {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.pro-file-upload-teaser__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.pro-file-upload-teaser__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.pro-file-upload-teaser__badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(15, 118, 110, 0.35);
  padding: 3px 9px;
  border-radius: 999px;
  line-height: 1;
}
.pro-file-upload-teaser__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pro-file-upload-teaser__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}
.pro-file-upload-teaser__note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 58ch;
}
.pro-file-upload-teaser__note strong {
  color: var(--text);
  font-weight: 600;
}

/* Download block */
.download-block {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.trust-list li {
  padding: 4px 0 4px 22px;
  position: relative;
}
.trust-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

.future-hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 8px;
}

.editor-modules {
  display: grid;
  gap: 12px;
}

.editor-module {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.editor-module summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-module summary::-webkit-details-marker {
  display: none;
}

.editor-module[open] summary {
  border-bottom: 1px solid var(--border);
}

.module-summary-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.module-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #0f172a;
}

.module-summary-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}

.editor-module[open] .module-summary-toggle {
  color: var(--text);
}

.module-body {
  padding: 14px;
}

.color-input-pair {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.color-input-pair input[type="text"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.logo-preview-wrap {
  margin: 8px 0 12px;
  min-height: 74px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
}

#logo-preview-image {
  max-width: 72px;
  max-height: 72px;
  border-radius: 8px;
}

.logo-module-top {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 240px) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 12px;
}

@media (max-width: 980px) {
  .logo-module-top {
    grid-template-columns: 1fr;
  }
}

.logo-current-preview,
.logo-actions-box,
.logo-help-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.logo-section-title {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 600;
}

.logo-actions {
  margin-top: 0;
}

.btn-file {
  cursor: pointer;
}

#input-logo {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.logo-help-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.logo-help-list li + li {
  margin-top: 6px;
}

.logo-options-grid {
  margin-bottom: 8px;
}

.logo-library {
  margin-top: 14px;
}

.logo-library-head {
  margin-bottom: 8px;
}

.logo-library-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 1100px) {
  .logo-library-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .logo-library-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .logo-library-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .site-header__inner {
    padding: 12px 14px;
    flex-wrap: nowrap;
  }

  .site-nav {
    display: none;
  }

  .site-menu-toggle {
    display: inline-flex;
  }
}

.logo-library-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.logo-library-item:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.logo-library-item.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.logo-library-item::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.logo-library-item.is-active::after {
  background: #2563eb;
}

.logo-library-item img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  pointer-events: none;
}

/* ============================================
   移动端侧滑菜单样式 (max-width: 720px)
   ============================================ */
@media (max-width: 720px) {
  /* 避免 100vw + 滚动条撑出横向空白 */
  html, body, .page-shell, .layout-grid, .layout-main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    overscroll-behavior-x: none;
  }

  /* 顶栏: 添加阴影，取消吸顶 */
  .site-header {
    position: relative;
    top: auto;
    max-width: 100%;
    backdrop-filter: none;
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .site-header.is-nav-open {
    z-index: 200;
  }

  /* —— 汉堡按钮 —— */
  .site-menu-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-inline-start: auto;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text);
  }

  .site-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
  }

  .site-menu-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 8px;
  }

  /* 移除旧样式 */
  .site-menu-toggle svg {
    display: none;
  }

  /* —— 汉堡三线（静态，无动画） —— */
  .site-menu-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    margin: 0;
    background: var(--text);
    border-radius: 1px;
    transition: none;
  }

  /* 手机端保留抽屉布局，默认停在屏幕外 */
  .site-menu-drawer {
    display: flex;
  }

  /* —— 遮罩层 —— */
  .site-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 201;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
  }

  .site-header.is-nav-open .site-menu-backdrop {
    opacity: 1;
    visibility: visible;
  }

  /* —— 滚动锁定 —— */
  body.mc-site-nav-open {
    overflow: hidden;
  }

}
.style-group {
  margin-top: 14px;
}

.style-group-title {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 600;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 580px) {
  .style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.style-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.style-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.14);
}

.style-card-thumb {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 6px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.style-card-label {
  font-size: 0.75rem;
  color: var(--text);
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
.feature-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Comparison table */
.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  background: #f8fafc;
  font-weight: 600;
}
.compare-table tr:last-child td {
  border-bottom: none;
}

/* FAQ */
.faq-list details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface);
}
.faq-list summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list details[open] summary {
  margin-bottom: 8px;
}
.faq-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* SEO content sections */
.seo-block {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.seo-block:last-child {
  border-bottom: none;
}
.seo-block h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--text);
}
.seo-block p {
  color: var(--muted);
  margin: 0 0 12px;
  max-width: 70ch;
}
.seo-block p:last-child {
  margin-bottom: 0;
}

/* Upgrade CTA strip */
.upgrade-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #f0fdfa 0%, #fff 100%);
}
.upgrade-strip p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text);
  max-width: 52ch;
}

/* Natural content breaks — no reserved ad boxes (AdSense can target article flow later) */
.content-flow > * + * {
  margin-top: 0;
}

/* Blog */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: var(--muted);
}
.article-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.article-body h2 {
  font-size: 1.25rem;
  margin-top: 32px;
}
.article-body h3 {
  font-size: 1.0625rem;
  margin-top: 24px;
}
.article-body p,
.article-body ul {
  color: var(--muted);
  max-width: 68ch;
}
.article-body ul {
  padding-left: 1.25rem;
}

.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-list li {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.blog-list a {
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text);
}
.blog-list a:hover {
  color: var(--accent);
}

/* Site footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 20px;
  margin-top: 48px;
}
.site-footer__inner {
  max-width: min(1440px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}
@media (max-width: 720px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
  }
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--muted);
}
.footer-note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
  max-width: 40ch;
}

/* ----- 位置二维码页：Leaflet 容器必须有高度 ----- */
.location-map-wrap {
  height: min(52vh, 420px);
  min-height: 280px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e2e8f0;
}
.location-page .leaflet-container {
  font-family: inherit;
}
/* Leaflet 瓦片是 img，全站 img{max-width:100%} 会把瓦片压成一条线，看起来像「没有地图」 */
.location-map-wrap.leaflet-container img,
.location-page .leaflet-container img.leaflet-tile,
.location-page .leaflet-container img.leaflet-marker-icon,
.location-page .leaflet-container img.leaflet-marker-shadow {
  max-width: none !important;
  height: auto;
}
.location-page .leaflet-control-attribution {
  font-size: 10px;
  max-width: 60%;
}
#location-qr-host {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
}
#location-qr-host canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
.location-status {
  min-height: 1.25em;
  margin-top: 8px;
  margin-bottom: 0;
}
.location-status--error {
  color: #b91c1c;
}

/* 首页生成器内嵌小地图（勿用过高，避免压住预览区） */
.location-embed-map-wrap {
  height: clamp(200px, 26vh, 260px);
  min-height: 200px;
  max-height: 280px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e2e8f0;
}
#generator-panel .location-embed-map-wrap.leaflet-container img,
#generator-panel .leaflet-container img.leaflet-tile,
#generator-panel .leaflet-container img.leaflet-marker-icon,
#generator-panel .leaflet-container img.leaflet-marker-shadow {
  max-width: none !important;
}
#generator-panel .leaflet-container {
  font-family: inherit;
}
.location-embed-status {
  min-height: 1.2em;
  margin-top: 4px;
  margin-bottom: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

/* ----- Artistic QR standalone page ----- */
.artistic-qr-page .art-preview-box,
.artistic-qr-page .blend-canvas-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--surface);
}
.artistic-qr-page #qr-blend-canvas,
.artistic-qr-page #aq-blend-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.artistic-qr-page #qr-art-preview {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.artistic-qr-page #qr-art-preview canvas {
  max-width: 100%;
  height: auto;
}
.artistic-qr-page #qr-art-preview img.art-uploaded-qr-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
